generated-configure.sh revision 860:dffe654ab24c
1#! /bin/sh
2# Guess values for system-dependent variables and create Makefiles.
3# Generated by GNU Autoconf 2.69 for OpenJDK jdk8.
4#
5# Report bugs to <build-dev@openjdk.java.net>.
6#
7#
8# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
9#
10#
11# This configure script is free software; the Free Software Foundation
12# gives unlimited permission to copy, distribute and modify it.
13## -------------------- ##
14## M4sh Initialization. ##
15## -------------------- ##
16
17# Be more Bourne compatible
18DUALCASE=1; export DUALCASE # for MKS sh
19if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
20  emulate sh
21  NULLCMD=:
22  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
23  # is contrary to our usage.  Disable this feature.
24  alias -g '${1+"$@"}'='"$@"'
25  setopt NO_GLOB_SUBST
26else
27  case `(set -o) 2>/dev/null` in #(
28  *posix*) :
29    set -o posix ;; #(
30  *) :
31     ;;
32esac
33fi
34
35
36as_nl='
37'
38export as_nl
39# Printing a long string crashes Solaris 7 /usr/bin/printf.
40as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
41as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
42as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
43# Prefer a ksh shell builtin over an external printf program on Solaris,
44# but without wasting forks for bash or zsh.
45if test -z "$BASH_VERSION$ZSH_VERSION" \
46    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
47  as_echo='print -r --'
48  as_echo_n='print -rn --'
49elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
50  as_echo='printf %s\n'
51  as_echo_n='printf %s'
52else
53  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
54    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
55    as_echo_n='/usr/ucb/echo -n'
56  else
57    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
58    as_echo_n_body='eval
59      arg=$1;
60      case $arg in #(
61      *"$as_nl"*)
62	expr "X$arg" : "X\\(.*\\)$as_nl";
63	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
64      esac;
65      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
66    '
67    export as_echo_n_body
68    as_echo_n='sh -c $as_echo_n_body as_echo'
69  fi
70  export as_echo_body
71  as_echo='sh -c $as_echo_body as_echo'
72fi
73
74# The user is always right.
75if test "${PATH_SEPARATOR+set}" != set; then
76  PATH_SEPARATOR=:
77  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
78    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
79      PATH_SEPARATOR=';'
80  }
81fi
82
83
84# IFS
85# We need space, tab and new line, in precisely that order.  Quoting is
86# there to prevent editors from complaining about space-tab.
87# (If _AS_PATH_WALK were called with IFS unset, it would disable word
88# splitting by setting IFS to empty value.)
89IFS=" ""	$as_nl"
90
91# Find who we are.  Look in the path if we contain no directory separator.
92as_myself=
93case $0 in #((
94  *[\\/]* ) as_myself=$0 ;;
95  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
96for as_dir in $PATH
97do
98  IFS=$as_save_IFS
99  test -z "$as_dir" && as_dir=.
100    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
101  done
102IFS=$as_save_IFS
103
104     ;;
105esac
106# We did not find ourselves, most probably we were run as `sh COMMAND'
107# in which case we are not to be found in the path.
108if test "x$as_myself" = x; then
109  as_myself=$0
110fi
111if test ! -f "$as_myself"; then
112  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
113  exit 1
114fi
115
116# Unset variables that we do not need and which cause bugs (e.g. in
117# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
118# suppresses any "Segmentation fault" message there.  '((' could
119# trigger a bug in pdksh 5.2.14.
120for as_var in BASH_ENV ENV MAIL MAILPATH
121do eval test x\${$as_var+set} = xset \
122  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
123done
124PS1='$ '
125PS2='> '
126PS4='+ '
127
128# NLS nuisances.
129LC_ALL=C
130export LC_ALL
131LANGUAGE=C
132export LANGUAGE
133
134# CDPATH.
135(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
136
137# Use a proper internal environment variable to ensure we don't fall
138  # into an infinite loop, continuously re-executing ourselves.
139  if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
140    _as_can_reexec=no; export _as_can_reexec;
141    # We cannot yet assume a decent shell, so we have to provide a
142# neutralization value for shells without unset; and this also
143# works around shells that cannot unset nonexistent variables.
144# Preserve -v and -x to the replacement shell.
145BASH_ENV=/dev/null
146ENV=/dev/null
147(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
148case $- in # ((((
149  *v*x* | *x*v* ) as_opts=-vx ;;
150  *v* ) as_opts=-v ;;
151  *x* ) as_opts=-x ;;
152  * ) as_opts= ;;
153esac
154exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
155# Admittedly, this is quite paranoid, since all the known shells bail
156# out after a failed `exec'.
157$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
158as_fn_exit 255
159  fi
160  # We don't want this to propagate to other subprocesses.
161          { _as_can_reexec=; unset _as_can_reexec;}
162if test "x$CONFIG_SHELL" = x; then
163  as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
164  emulate sh
165  NULLCMD=:
166  # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
167  # is contrary to our usage.  Disable this feature.
168  alias -g '\${1+\"\$@\"}'='\"\$@\"'
169  setopt NO_GLOB_SUBST
170else
171  case \`(set -o) 2>/dev/null\` in #(
172  *posix*) :
173    set -o posix ;; #(
174  *) :
175     ;;
176esac
177fi
178"
179  as_required="as_fn_return () { (exit \$1); }
180as_fn_success () { as_fn_return 0; }
181as_fn_failure () { as_fn_return 1; }
182as_fn_ret_success () { return 0; }
183as_fn_ret_failure () { return 1; }
184
185exitcode=0
186as_fn_success || { exitcode=1; echo as_fn_success failed.; }
187as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
188as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
189as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
190if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
191
192else
193  exitcode=1; echo positional parameters were not saved.
194fi
195test x\$exitcode = x0 || exit 1
196test -x / || exit 1"
197  as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
198  as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
199  eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
200  test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
201test \$(( 1 + 1 )) = 2 || exit 1"
202  if (eval "$as_required") 2>/dev/null; then :
203  as_have_required=yes
204else
205  as_have_required=no
206fi
207  if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
208
209else
210  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
211as_found=false
212for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
213do
214  IFS=$as_save_IFS
215  test -z "$as_dir" && as_dir=.
216  as_found=:
217  case $as_dir in #(
218	 /*)
219	   for as_base in sh bash ksh sh5; do
220	     # Try only shells that exist, to save several forks.
221	     as_shell=$as_dir/$as_base
222	     if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
223		    { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
224  CONFIG_SHELL=$as_shell as_have_required=yes
225		   if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
226  break 2
227fi
228fi
229	   done;;
230       esac
231  as_found=false
232done
233$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
234	      { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
235  CONFIG_SHELL=$SHELL as_have_required=yes
236fi; }
237IFS=$as_save_IFS
238
239
240      if test "x$CONFIG_SHELL" != x; then :
241  export CONFIG_SHELL
242             # We cannot yet assume a decent shell, so we have to provide a
243# neutralization value for shells without unset; and this also
244# works around shells that cannot unset nonexistent variables.
245# Preserve -v and -x to the replacement shell.
246BASH_ENV=/dev/null
247ENV=/dev/null
248(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
249case $- in # ((((
250  *v*x* | *x*v* ) as_opts=-vx ;;
251  *v* ) as_opts=-v ;;
252  *x* ) as_opts=-x ;;
253  * ) as_opts= ;;
254esac
255exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
256# Admittedly, this is quite paranoid, since all the known shells bail
257# out after a failed `exec'.
258$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
259exit 255
260fi
261
262    if test x$as_have_required = xno; then :
263  $as_echo "$0: This script requires a shell more modern than all"
264  $as_echo "$0: the shells that I found on your system."
265  if test x${ZSH_VERSION+set} = xset ; then
266    $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
267    $as_echo "$0: be upgraded to zsh 4.3.4 or later."
268  else
269    $as_echo "$0: Please tell bug-autoconf@gnu.org and
270$0: build-dev@openjdk.java.net about your system, including
271$0: any error possibly output before this message. Then
272$0: install a modern shell, or manually run the script
273$0: under such a shell if you do have one."
274  fi
275  exit 1
276fi
277fi
278fi
279SHELL=${CONFIG_SHELL-/bin/sh}
280export SHELL
281# Unset more variables known to interfere with behavior of common tools.
282CLICOLOR_FORCE= GREP_OPTIONS=
283unset CLICOLOR_FORCE GREP_OPTIONS
284
285## --------------------- ##
286## M4sh Shell Functions. ##
287## --------------------- ##
288# as_fn_unset VAR
289# ---------------
290# Portably unset VAR.
291as_fn_unset ()
292{
293  { eval $1=; unset $1;}
294}
295as_unset=as_fn_unset
296
297# as_fn_set_status STATUS
298# -----------------------
299# Set $? to STATUS, without forking.
300as_fn_set_status ()
301{
302  return $1
303} # as_fn_set_status
304
305# as_fn_exit STATUS
306# -----------------
307# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
308as_fn_exit ()
309{
310  set +e
311  as_fn_set_status $1
312  exit $1
313} # as_fn_exit
314
315# as_fn_mkdir_p
316# -------------
317# Create "$as_dir" as a directory, including parents if necessary.
318as_fn_mkdir_p ()
319{
320
321  case $as_dir in #(
322  -*) as_dir=./$as_dir;;
323  esac
324  test -d "$as_dir" || eval $as_mkdir_p || {
325    as_dirs=
326    while :; do
327      case $as_dir in #(
328      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
329      *) as_qdir=$as_dir;;
330      esac
331      as_dirs="'$as_qdir' $as_dirs"
332      as_dir=`$as_dirname -- "$as_dir" ||
333$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
334	 X"$as_dir" : 'X\(//\)[^/]' \| \
335	 X"$as_dir" : 'X\(//\)$' \| \
336	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
337$as_echo X"$as_dir" |
338    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
339	    s//\1/
340	    q
341	  }
342	  /^X\(\/\/\)[^/].*/{
343	    s//\1/
344	    q
345	  }
346	  /^X\(\/\/\)$/{
347	    s//\1/
348	    q
349	  }
350	  /^X\(\/\).*/{
351	    s//\1/
352	    q
353	  }
354	  s/.*/./; q'`
355      test -d "$as_dir" && break
356    done
357    test -z "$as_dirs" || eval "mkdir $as_dirs"
358  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
359
360
361} # as_fn_mkdir_p
362
363# as_fn_executable_p FILE
364# -----------------------
365# Test if FILE is an executable regular file.
366as_fn_executable_p ()
367{
368  test -f "$1" && test -x "$1"
369} # as_fn_executable_p
370# as_fn_append VAR VALUE
371# ----------------------
372# Append the text in VALUE to the end of the definition contained in VAR. Take
373# advantage of any shell optimizations that allow amortized linear growth over
374# repeated appends, instead of the typical quadratic growth present in naive
375# implementations.
376if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
377  eval 'as_fn_append ()
378  {
379    eval $1+=\$2
380  }'
381else
382  as_fn_append ()
383  {
384    eval $1=\$$1\$2
385  }
386fi # as_fn_append
387
388# as_fn_arith ARG...
389# ------------------
390# Perform arithmetic evaluation on the ARGs, and store the result in the
391# global $as_val. Take advantage of shells that can avoid forks. The arguments
392# must be portable across $(()) and expr.
393if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
394  eval 'as_fn_arith ()
395  {
396    as_val=$(( $* ))
397  }'
398else
399  as_fn_arith ()
400  {
401    as_val=`expr "$@" || test $? -eq 1`
402  }
403fi # as_fn_arith
404
405
406# as_fn_error STATUS ERROR [LINENO LOG_FD]
407# ----------------------------------------
408# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
409# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
410# script with STATUS, using 1 if that was 0.
411as_fn_error ()
412{
413  as_status=$1; test $as_status -eq 0 && as_status=1
414  if test "$4"; then
415    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
416    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
417  fi
418  $as_echo "$as_me: error: $2" >&2
419  as_fn_exit $as_status
420} # as_fn_error
421
422if expr a : '\(a\)' >/dev/null 2>&1 &&
423   test "X`expr 00001 : '.*\(...\)'`" = X001; then
424  as_expr=expr
425else
426  as_expr=false
427fi
428
429if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
430  as_basename=basename
431else
432  as_basename=false
433fi
434
435if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
436  as_dirname=dirname
437else
438  as_dirname=false
439fi
440
441as_me=`$as_basename -- "$0" ||
442$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
443	 X"$0" : 'X\(//\)$' \| \
444	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
445$as_echo X/"$0" |
446    sed '/^.*\/\([^/][^/]*\)\/*$/{
447	    s//\1/
448	    q
449	  }
450	  /^X\/\(\/\/\)$/{
451	    s//\1/
452	    q
453	  }
454	  /^X\/\(\/\).*/{
455	    s//\1/
456	    q
457	  }
458	  s/.*/./; q'`
459
460# Avoid depending upon Character Ranges.
461as_cr_letters='abcdefghijklmnopqrstuvwxyz'
462as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
463as_cr_Letters=$as_cr_letters$as_cr_LETTERS
464as_cr_digits='0123456789'
465as_cr_alnum=$as_cr_Letters$as_cr_digits
466
467
468  as_lineno_1=$LINENO as_lineno_1a=$LINENO
469  as_lineno_2=$LINENO as_lineno_2a=$LINENO
470  eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
471  test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
472  # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
473  sed -n '
474    p
475    /[$]LINENO/=
476  ' <$as_myself |
477    sed '
478      s/[$]LINENO.*/&-/
479      t lineno
480      b
481      :lineno
482      N
483      :loop
484      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
485      t loop
486      s/-\n.*//
487    ' >$as_me.lineno &&
488  chmod +x "$as_me.lineno" ||
489    { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
490
491  # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
492  # already done that, so ensure we don't try to do so again and fall
493  # in an infinite loop.  This has already happened in practice.
494  _as_can_reexec=no; export _as_can_reexec
495  # Don't try to exec as it changes $[0], causing all sort of problems
496  # (the dirname of $[0] is not the place where we might find the
497  # original and so on.  Autoconf is especially sensitive to this).
498  . "./$as_me.lineno"
499  # Exit status is that of the last command.
500  exit
501}
502
503ECHO_C= ECHO_N= ECHO_T=
504case `echo -n x` in #(((((
505-n*)
506  case `echo 'xy\c'` in
507  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
508  xy)  ECHO_C='\c';;
509  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
510       ECHO_T='	';;
511  esac;;
512*)
513  ECHO_N='-n';;
514esac
515
516rm -f conf$$ conf$$.exe conf$$.file
517if test -d conf$$.dir; then
518  rm -f conf$$.dir/conf$$.file
519else
520  rm -f conf$$.dir
521  mkdir conf$$.dir 2>/dev/null
522fi
523if (echo >conf$$.file) 2>/dev/null; then
524  if ln -s conf$$.file conf$$ 2>/dev/null; then
525    as_ln_s='ln -s'
526    # ... but there are two gotchas:
527    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
528    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
529    # In both cases, we have to default to `cp -pR'.
530    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
531      as_ln_s='cp -pR'
532  elif ln conf$$.file conf$$ 2>/dev/null; then
533    as_ln_s=ln
534  else
535    as_ln_s='cp -pR'
536  fi
537else
538  as_ln_s='cp -pR'
539fi
540rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
541rmdir conf$$.dir 2>/dev/null
542
543if mkdir -p . 2>/dev/null; then
544  as_mkdir_p='mkdir -p "$as_dir"'
545else
546  test -d ./-p && rmdir ./-p
547  as_mkdir_p=false
548fi
549
550as_test_x='test -x'
551as_executable_p=as_fn_executable_p
552
553# Sed expression to map a string onto a valid CPP name.
554as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
555
556# Sed expression to map a string onto a valid variable name.
557as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
558
559
560test -n "$DJDIR" || exec 7<&0 </dev/null
561exec 6>&1
562
563# Name of the host.
564# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
565# so uname gets run too.
566ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
567
568#
569# Initializations.
570#
571ac_default_prefix=/usr/local
572ac_clean_files=
573ac_config_libobj_dir=.
574LIBOBJS=
575cross_compiling=no
576subdirs=
577MFLAGS=
578MAKEFLAGS=
579
580# Identity of this package.
581PACKAGE_NAME='OpenJDK'
582PACKAGE_TARNAME='openjdk'
583PACKAGE_VERSION='jdk8'
584PACKAGE_STRING='OpenJDK jdk8'
585PACKAGE_BUGREPORT='build-dev@openjdk.java.net'
586PACKAGE_URL='http://openjdk.java.net'
587
588# Factoring default headers for most tests.
589ac_includes_default="\
590#include <stdio.h>
591#ifdef HAVE_SYS_TYPES_H
592# include <sys/types.h>
593#endif
594#ifdef HAVE_SYS_STAT_H
595# include <sys/stat.h>
596#endif
597#ifdef STDC_HEADERS
598# include <stdlib.h>
599# include <stddef.h>
600#else
601# ifdef HAVE_STDLIB_H
602#  include <stdlib.h>
603# endif
604#endif
605#ifdef HAVE_STRING_H
606# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
607#  include <memory.h>
608# endif
609# include <string.h>
610#endif
611#ifdef HAVE_STRINGS_H
612# include <strings.h>
613#endif
614#ifdef HAVE_INTTYPES_H
615# include <inttypes.h>
616#endif
617#ifdef HAVE_STDINT_H
618# include <stdint.h>
619#endif
620#ifdef HAVE_UNISTD_H
621# include <unistd.h>
622#endif"
623
624ac_subst_vars='LTLIBOBJS
625LIBOBJS
626CCACHE
627USE_PRECOMPILED_HEADER
628SJAVAC_SERVER_DIR
629ENABLE_SJAVAC
630SJAVAC_SERVER_JAVA
631JOBS
632MEMORY_SIZE
633NUM_CORES
634ENABLE_INTREE_EC
635SALIB_NAME
636HOTSPOT_MAKE_ARGS
637FIXPATH
638LIBCXX
639LLVM_LIBS
640LLVM_LDFLAGS
641LLVM_CFLAGS
642LLVM_CONFIG
643LIBFFI_LIBS
644LIBFFI_CFLAGS
645STATIC_CXX_SETTING
646LIBDL
647LIBM
648LIBZIP_CAN_USE_MMAP
649USE_EXTERNAL_LIBZ
650USE_EXTERNAL_LIBGIF
651USE_EXTERNAL_LIBJPEG
652ALSA_LIBS
653ALSA_CFLAGS
654FREETYPE2_LIB_PATH
655USING_SYSTEM_FT_LIB
656FREETYPE2_LIBS
657FREETYPE2_CFLAGS
658CUPS_CFLAGS
659OPENWIN_HOME
660X_EXTRA_LIBS
661X_LIBS
662X_PRE_LIBS
663X_CFLAGS
664XMKMF
665CXXFLAGS_DEBUG_SYMBOLS
666CFLAGS_DEBUG_SYMBOLS
667ZIP_DEBUGINFO_FILES
668ENABLE_DEBUG_SYMBOLS
669COMPILER_SUPPORTS_TARGET_BITS_FLAG
670ZERO_ARCHFLAG
671LDFLAGS_CXX_JDK
672LDFLAGS_JDKEXE_SUFFIX
673LDFLAGS_JDKLIB_SUFFIX
674LDFLAGS_JDKEXE
675LDFLAGS_JDKLIB
676CXXFLAGS_JDKEXE
677CXXFLAGS_JDKLIB
678CFLAGS_JDKEXE
679CFLAGS_JDKLIB
680MACOSX_VERSION_MIN
681PACKAGE_PATH
682LEGACY_EXTRA_LDFLAGS
683LEGACY_EXTRA_CXXFLAGS
684LEGACY_EXTRA_CFLAGS
685CXX_FLAG_DEPS
686C_FLAG_DEPS
687CXX_O_FLAG_NONE
688CXX_O_FLAG_NORM
689CXX_O_FLAG_HI
690CXX_O_FLAG_HIGHEST
691C_O_FLAG_NONE
692C_O_FLAG_NORM
693C_O_FLAG_HI
694C_O_FLAG_HIGHEST
695POST_MCS_CMD
696POST_STRIP_CMD
697SET_EXECUTABLE_ORIGIN
698SET_SHARED_LIBRARY_ORIGIN
699CXX_FLAG_REORDER
700C_FLAG_REORDER
701SET_SHARED_LIBRARY_MAPFILE
702SET_SHARED_LIBRARY_NAME
703SHARED_LIBRARY_FLAGS
704EXE_SUFFIX
705STATIC_LIBRARY_SUFFIX
706SHARED_LIBRARY_SUFFIX
707LIBRARY_PREFIX
708STATIC_LIBRARY
709SHARED_LIBRARY
710OBJ_SUFFIX
711COMPILER_NAME
712JT_HOME
713JTREGEXE
714LIPO
715ac_ct_OBJDUMP
716OBJDUMP
717ac_ct_OBJCOPY
718OBJCOPY
719MCS
720STRIP
721GNM
722NM
723AS
724CXXCPP
725CPP
726COMPILER_TYPE
727RC_FLAGS
728DUMPBIN
729WINAR
730HOTSPOT_RC
731HOTSPOT_MT
732RC
733MT
734WINLD
735HOTSPOT_LD
736HOTSPOT_CXX
737ARFLAGS
738AR
739LDEXECXX
740LDCXX
741LDEXE
742LD
743ac_ct_OBJC
744OBJCFLAGS
745OBJC
746ac_ct_CXX
747CXXFLAGS
748CXX
749ac_ct_PROPER_COMPILER_CXX
750PROPER_COMPILER_CXX
751POTENTIAL_CXX
752TOOLS_DIR_CXX
753OBJEXT
754EXEEXT
755ac_ct_CC
756CPPFLAGS
757LDFLAGS
758CFLAGS
759CC
760ac_ct_PROPER_COMPILER_CC
761PROPER_COMPILER_CC
762POTENTIAL_CC
763TOOLS_DIR_CC
764BUILD_LD
765BUILD_CXX
766BUILD_CC
767MSVCR_DLL
768VS_PATH
769VS_LIB
770VS_INCLUDE
771CYGWIN_LINK
772AR_OUT_OPTION
773LD_OUT_OPTION
774EXE_OUT_OPTION
775CC_OUT_OPTION
776BUILD_HOTSPOT
777HOTSPOT_DIST
778BUILD_OUTPUT
779OVERRIDE_SRC_ROOT
780ADD_SRC_ROOT
781JDK_TOPDIR
782NASHORN_TOPDIR
783HOTSPOT_TOPDIR
784JAXWS_TOPDIR
785JAXP_TOPDIR
786CORBA_TOPDIR
787LANGTOOLS_TOPDIR
788BOOT_JDK_JVMARGS
789JAVAC_FLAGS
790BOOT_JDK_SOURCETARGET
791BOOT_JDK
792BOOT_TOOLSJAR
793BOOT_RTJAR
794JAVA_CHECK
795JAVAC_CHECK
796COOKED_BUILD_NUMBER
797JDK_VERSION
798COPYRIGHT_YEAR
799MACOSX_BUNDLE_ID_BASE
800MACOSX_BUNDLE_NAME_BASE
801COMPANY_NAME
802JDK_RC_PLATFORM_NAME
803PRODUCT_SUFFIX
804PRODUCT_NAME
805LAUNCHER_NAME
806MILESTONE
807JDK_BUILD_NUMBER
808JDK_UPDATE_VERSION
809JDK_MICRO_VERSION
810JDK_MINOR_VERSION
811JDK_MAJOR_VERSION
812USER_RELEASE_SUFFIX
813COMPRESS_JARS
814UNLIMITED_CRYPTO
815CACERTS_FILE
816TEST_IN_BUILD
817BUILD_HEADLESS
818SUPPORT_HEADFUL
819SUPPORT_HEADLESS
820BDEPS_FTP
821BDEPS_UNZIP
822OS_VERSION_MICRO
823OS_VERSION_MINOR
824OS_VERSION_MAJOR
825PKG_CONFIG
826CODESIGN
827XATTR
828IS_GNU_TIME
829TIME
830STAT
831HG
832READELF
833OTOOL
834LDD
835ZIP
836UNZIP
837FIND_DELETE
838MAKE
839CHECK_TOOLSDIR_MAKE
840CHECK_TOOLSDIR_GMAKE
841CHECK_MAKE
842CHECK_GMAKE
843PKGHANDLER
844OUTPUT_ROOT
845CONF_NAME
846SPEC
847BUILD_VARIANT_RELEASE
848DEBUG_CLASSFILES
849FASTDEBUG
850VARIANT
851DEBUG_LEVEL
852MACOSX_UNIVERSAL
853INCLUDE_SA
854JVM_VARIANT_ZEROSHARK
855JVM_VARIANT_ZERO
856JVM_VARIANT_KERNEL
857JVM_VARIANT_MINIMAL1
858JVM_VARIANT_CLIENT
859JVM_VARIANT_SERVER
860JVM_VARIANTS
861JDK_VARIANT
862SET_OPENJDK
863BUILD_LOG_WRAPPER
864BUILD_LOG_PREVIOUS
865BUILD_LOG
866SYS_ROOT
867PATH_SEP
868SRC_ROOT
869ZERO_ARCHDEF
870DEFINE_CROSS_COMPILE_ARCH
871LP64
872OPENJDK_TARGET_OS_API_DIR
873OPENJDK_TARGET_CPU_JLI_CFLAGS
874OPENJDK_TARGET_CPU_OSARCH
875OPENJDK_TARGET_CPU_ISADIR
876OPENJDK_TARGET_CPU_LIBDIR
877OPENJDK_TARGET_CPU_LEGACY_LIB
878OPENJDK_TARGET_CPU_LEGACY
879REQUIRED_OS_VERSION
880REQUIRED_OS_NAME
881COMPILE_TYPE
882OPENJDK_TARGET_CPU_ENDIAN
883OPENJDK_TARGET_CPU_BITS
884OPENJDK_TARGET_CPU_ARCH
885OPENJDK_TARGET_CPU
886OPENJDK_TARGET_OS_API
887OPENJDK_TARGET_OS
888OPENJDK_BUILD_CPU_ENDIAN
889OPENJDK_BUILD_CPU_BITS
890OPENJDK_BUILD_CPU_ARCH
891OPENJDK_BUILD_CPU
892OPENJDK_BUILD_OS_API
893OPENJDK_BUILD_OS
894OPENJDK_BUILD_AUTOCONF_NAME
895OPENJDK_TARGET_AUTOCONF_NAME
896target_os
897target_vendor
898target_cpu
899target
900host_os
901host_vendor
902host_cpu
903host
904build_os
905build_vendor
906build_cpu
907build
908SETFILE
909DF
910READLINK
911CYGPATH
912NAWK
913SED
914FGREP
915EGREP
916GREP
917AWK
918XARGS
919WHICH
920WC
921UNIQ
922UNAME
923TR
924TOUCH
925TEE
926TAR
927TAIL
928SORT
929SH
930RM
931PRINTF
932MV
933MKTEMP
934MKDIR
935LS
936LN
937HEAD
938FIND
939FILE
940EXPR
941ECHO
942DIRNAME
943DIFF
944DATE
945CUT
946CPIO
947CP
948COMM
949CMP
950CHMOD
951CAT
952BASH
953BASENAME
954DATE_WHEN_CONFIGURED
955CONFIGURE_COMMAND_LINE
956CUSTOM_MAKE_DIR
957target_alias
958host_alias
959build_alias
960LIBS
961ECHO_T
962ECHO_N
963ECHO_C
964DEFS
965mandir
966localedir
967libdir
968psdir
969pdfdir
970dvidir
971htmldir
972infodir
973docdir
974oldincludedir
975includedir
976localstatedir
977sharedstatedir
978sysconfdir
979datadir
980datarootdir
981libexecdir
982sbindir
983bindir
984program_transform_name
985prefix
986exec_prefix
987PACKAGE_URL
988PACKAGE_BUGREPORT
989PACKAGE_STRING
990PACKAGE_VERSION
991PACKAGE_TARNAME
992PACKAGE_NAME
993PATH_SEPARATOR
994SHELL'
995ac_subst_files=''
996ac_user_opts='
997enable_option_checking
998with_custom_make_dir
999with_target_bits
1000with_sys_root
1001with_tools_dir
1002with_devkit
1003enable_openjdk_only
1004with_jdk_variant
1005with_jvm_variants
1006enable_debug
1007with_debug_level
1008with_conf_name
1009with_builddeps_conf
1010with_builddeps_server
1011with_builddeps_dir
1012with_builddeps_group
1013enable_headful
1014enable_hotspot_test_in_build
1015with_cacerts_file
1016enable_unlimited_crypto
1017with_milestone
1018with_update_version
1019with_user_release_suffix
1020with_build_number
1021with_boot_jdk
1022with_boot_jdk_jvmargs
1023with_add_source_root
1024with_override_source_root
1025with_adds_and_overrides
1026with_override_langtools
1027with_override_corba
1028with_override_jaxp
1029with_override_jaxws
1030with_override_hotspot
1031with_override_nashorn
1032with_override_jdk
1033with_import_hotspot
1034with_msvcr_dll
1035with_dxsdk
1036with_dxsdk_lib
1037with_dxsdk_include
1038with_jtreg
1039with_extra_cflags
1040with_extra_cxxflags
1041with_extra_ldflags
1042enable_debug_symbols
1043enable_zip_debug_info
1044enable_macosx_runtime_support
1045with_x
1046with_cups
1047with_cups_include
1048with_freetype
1049with_alsa
1050with_alsa_include
1051with_alsa_lib
1052with_giflib
1053with_zlib
1054with_stdc__lib
1055with_num_cores
1056with_memory_size
1057with_jobs
1058with_sjavac_server_java
1059enable_sjavac
1060enable_precompiled_headers
1061enable_ccache
1062with_ccache_dir
1063'
1064      ac_precious_vars='build_alias
1065host_alias
1066target_alias
1067PKG_CONFIG
1068CC
1069CFLAGS
1070LDFLAGS
1071LIBS
1072CPPFLAGS
1073CXX
1074CXXFLAGS
1075CCC
1076OBJC
1077OBJCFLAGS
1078CPP
1079CXXCPP
1080XMKMF
1081FREETYPE2_CFLAGS
1082FREETYPE2_LIBS
1083ALSA_CFLAGS
1084ALSA_LIBS
1085LIBFFI_CFLAGS
1086LIBFFI_LIBS'
1087
1088
1089# Initialize some variables set by options.
1090ac_init_help=
1091ac_init_version=false
1092ac_unrecognized_opts=
1093ac_unrecognized_sep=
1094# The variables have the same names as the options, with
1095# dashes changed to underlines.
1096cache_file=/dev/null
1097exec_prefix=NONE
1098no_create=
1099no_recursion=
1100prefix=NONE
1101program_prefix=NONE
1102program_suffix=NONE
1103program_transform_name=s,x,x,
1104silent=
1105site=
1106srcdir=
1107verbose=
1108x_includes=NONE
1109x_libraries=NONE
1110
1111# Installation directory options.
1112# These are left unexpanded so users can "make install exec_prefix=/foo"
1113# and all the variables that are supposed to be based on exec_prefix
1114# by default will actually change.
1115# Use braces instead of parens because sh, perl, etc. also accept them.
1116# (The list follows the same order as the GNU Coding Standards.)
1117bindir='${exec_prefix}/bin'
1118sbindir='${exec_prefix}/sbin'
1119libexecdir='${exec_prefix}/libexec'
1120datarootdir='${prefix}/share'
1121datadir='${datarootdir}'
1122sysconfdir='${prefix}/etc'
1123sharedstatedir='${prefix}/com'
1124localstatedir='${prefix}/var'
1125includedir='${prefix}/include'
1126oldincludedir='/usr/include'
1127docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1128infodir='${datarootdir}/info'
1129htmldir='${docdir}'
1130dvidir='${docdir}'
1131pdfdir='${docdir}'
1132psdir='${docdir}'
1133libdir='${exec_prefix}/lib'
1134localedir='${datarootdir}/locale'
1135mandir='${datarootdir}/man'
1136
1137ac_prev=
1138ac_dashdash=
1139for ac_option
1140do
1141  # If the previous option needs an argument, assign it.
1142  if test -n "$ac_prev"; then
1143    eval $ac_prev=\$ac_option
1144    ac_prev=
1145    continue
1146  fi
1147
1148  case $ac_option in
1149  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1150  *=)   ac_optarg= ;;
1151  *)    ac_optarg=yes ;;
1152  esac
1153
1154  # Accept the important Cygnus configure options, so we can diagnose typos.
1155
1156  case $ac_dashdash$ac_option in
1157  --)
1158    ac_dashdash=yes ;;
1159
1160  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1161    ac_prev=bindir ;;
1162  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1163    bindir=$ac_optarg ;;
1164
1165  -build | --build | --buil | --bui | --bu)
1166    ac_prev=build_alias ;;
1167  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1168    build_alias=$ac_optarg ;;
1169
1170  -cache-file | --cache-file | --cache-fil | --cache-fi \
1171  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1172    ac_prev=cache_file ;;
1173  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1174  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1175    cache_file=$ac_optarg ;;
1176
1177  --config-cache | -C)
1178    cache_file=config.cache ;;
1179
1180  -datadir | --datadir | --datadi | --datad)
1181    ac_prev=datadir ;;
1182  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1183    datadir=$ac_optarg ;;
1184
1185  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1186  | --dataroo | --dataro | --datar)
1187    ac_prev=datarootdir ;;
1188  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1189  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1190    datarootdir=$ac_optarg ;;
1191
1192  -disable-* | --disable-*)
1193    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1194    # Reject names that are not valid shell variable names.
1195    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1196      as_fn_error $? "invalid feature name: $ac_useropt"
1197    ac_useropt_orig=$ac_useropt
1198    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1199    case $ac_user_opts in
1200      *"
1201"enable_$ac_useropt"
1202"*) ;;
1203      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1204	 ac_unrecognized_sep=', ';;
1205    esac
1206    eval enable_$ac_useropt=no ;;
1207
1208  -docdir | --docdir | --docdi | --doc | --do)
1209    ac_prev=docdir ;;
1210  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1211    docdir=$ac_optarg ;;
1212
1213  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1214    ac_prev=dvidir ;;
1215  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1216    dvidir=$ac_optarg ;;
1217
1218  -enable-* | --enable-*)
1219    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1220    # Reject names that are not valid shell variable names.
1221    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1222      as_fn_error $? "invalid feature name: $ac_useropt"
1223    ac_useropt_orig=$ac_useropt
1224    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1225    case $ac_user_opts in
1226      *"
1227"enable_$ac_useropt"
1228"*) ;;
1229      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1230	 ac_unrecognized_sep=', ';;
1231    esac
1232    eval enable_$ac_useropt=\$ac_optarg ;;
1233
1234  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1235  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1236  | --exec | --exe | --ex)
1237    ac_prev=exec_prefix ;;
1238  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1239  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1240  | --exec=* | --exe=* | --ex=*)
1241    exec_prefix=$ac_optarg ;;
1242
1243  -gas | --gas | --ga | --g)
1244    # Obsolete; use --with-gas.
1245    with_gas=yes ;;
1246
1247  -help | --help | --hel | --he | -h)
1248    ac_init_help=long ;;
1249  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1250    ac_init_help=recursive ;;
1251  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1252    ac_init_help=short ;;
1253
1254  -host | --host | --hos | --ho)
1255    ac_prev=host_alias ;;
1256  -host=* | --host=* | --hos=* | --ho=*)
1257    host_alias=$ac_optarg ;;
1258
1259  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1260    ac_prev=htmldir ;;
1261  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1262  | --ht=*)
1263    htmldir=$ac_optarg ;;
1264
1265  -includedir | --includedir | --includedi | --included | --include \
1266  | --includ | --inclu | --incl | --inc)
1267    ac_prev=includedir ;;
1268  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1269  | --includ=* | --inclu=* | --incl=* | --inc=*)
1270    includedir=$ac_optarg ;;
1271
1272  -infodir | --infodir | --infodi | --infod | --info | --inf)
1273    ac_prev=infodir ;;
1274  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1275    infodir=$ac_optarg ;;
1276
1277  -libdir | --libdir | --libdi | --libd)
1278    ac_prev=libdir ;;
1279  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1280    libdir=$ac_optarg ;;
1281
1282  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1283  | --libexe | --libex | --libe)
1284    ac_prev=libexecdir ;;
1285  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1286  | --libexe=* | --libex=* | --libe=*)
1287    libexecdir=$ac_optarg ;;
1288
1289  -localedir | --localedir | --localedi | --localed | --locale)
1290    ac_prev=localedir ;;
1291  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1292    localedir=$ac_optarg ;;
1293
1294  -localstatedir | --localstatedir | --localstatedi | --localstated \
1295  | --localstate | --localstat | --localsta | --localst | --locals)
1296    ac_prev=localstatedir ;;
1297  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1298  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1299    localstatedir=$ac_optarg ;;
1300
1301  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1302    ac_prev=mandir ;;
1303  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1304    mandir=$ac_optarg ;;
1305
1306  -nfp | --nfp | --nf)
1307    # Obsolete; use --without-fp.
1308    with_fp=no ;;
1309
1310  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1311  | --no-cr | --no-c | -n)
1312    no_create=yes ;;
1313
1314  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1315  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1316    no_recursion=yes ;;
1317
1318  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1319  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1320  | --oldin | --oldi | --old | --ol | --o)
1321    ac_prev=oldincludedir ;;
1322  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1323  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1324  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1325    oldincludedir=$ac_optarg ;;
1326
1327  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1328    ac_prev=prefix ;;
1329  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1330    prefix=$ac_optarg ;;
1331
1332  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1333  | --program-pre | --program-pr | --program-p)
1334    ac_prev=program_prefix ;;
1335  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1336  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1337    program_prefix=$ac_optarg ;;
1338
1339  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1340  | --program-suf | --program-su | --program-s)
1341    ac_prev=program_suffix ;;
1342  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1343  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1344    program_suffix=$ac_optarg ;;
1345
1346  -program-transform-name | --program-transform-name \
1347  | --program-transform-nam | --program-transform-na \
1348  | --program-transform-n | --program-transform- \
1349  | --program-transform | --program-transfor \
1350  | --program-transfo | --program-transf \
1351  | --program-trans | --program-tran \
1352  | --progr-tra | --program-tr | --program-t)
1353    ac_prev=program_transform_name ;;
1354  -program-transform-name=* | --program-transform-name=* \
1355  | --program-transform-nam=* | --program-transform-na=* \
1356  | --program-transform-n=* | --program-transform-=* \
1357  | --program-transform=* | --program-transfor=* \
1358  | --program-transfo=* | --program-transf=* \
1359  | --program-trans=* | --program-tran=* \
1360  | --progr-tra=* | --program-tr=* | --program-t=*)
1361    program_transform_name=$ac_optarg ;;
1362
1363  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1364    ac_prev=pdfdir ;;
1365  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1366    pdfdir=$ac_optarg ;;
1367
1368  -psdir | --psdir | --psdi | --psd | --ps)
1369    ac_prev=psdir ;;
1370  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1371    psdir=$ac_optarg ;;
1372
1373  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1374  | -silent | --silent | --silen | --sile | --sil)
1375    silent=yes ;;
1376
1377  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1378    ac_prev=sbindir ;;
1379  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1380  | --sbi=* | --sb=*)
1381    sbindir=$ac_optarg ;;
1382
1383  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1384  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1385  | --sharedst | --shareds | --shared | --share | --shar \
1386  | --sha | --sh)
1387    ac_prev=sharedstatedir ;;
1388  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1389  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1390  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1391  | --sha=* | --sh=*)
1392    sharedstatedir=$ac_optarg ;;
1393
1394  -site | --site | --sit)
1395    ac_prev=site ;;
1396  -site=* | --site=* | --sit=*)
1397    site=$ac_optarg ;;
1398
1399  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1400    ac_prev=srcdir ;;
1401  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1402    srcdir=$ac_optarg ;;
1403
1404  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1405  | --syscon | --sysco | --sysc | --sys | --sy)
1406    ac_prev=sysconfdir ;;
1407  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1408  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1409    sysconfdir=$ac_optarg ;;
1410
1411  -target | --target | --targe | --targ | --tar | --ta | --t)
1412    ac_prev=target_alias ;;
1413  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1414    target_alias=$ac_optarg ;;
1415
1416  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1417    verbose=yes ;;
1418
1419  -version | --version | --versio | --versi | --vers | -V)
1420    ac_init_version=: ;;
1421
1422  -with-* | --with-*)
1423    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1424    # Reject names that are not valid shell variable names.
1425    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1426      as_fn_error $? "invalid package name: $ac_useropt"
1427    ac_useropt_orig=$ac_useropt
1428    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1429    case $ac_user_opts in
1430      *"
1431"with_$ac_useropt"
1432"*) ;;
1433      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1434	 ac_unrecognized_sep=', ';;
1435    esac
1436    eval with_$ac_useropt=\$ac_optarg ;;
1437
1438  -without-* | --without-*)
1439    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1440    # Reject names that are not valid shell variable names.
1441    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1442      as_fn_error $? "invalid package name: $ac_useropt"
1443    ac_useropt_orig=$ac_useropt
1444    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1445    case $ac_user_opts in
1446      *"
1447"with_$ac_useropt"
1448"*) ;;
1449      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1450	 ac_unrecognized_sep=', ';;
1451    esac
1452    eval with_$ac_useropt=no ;;
1453
1454  --x)
1455    # Obsolete; use --with-x.
1456    with_x=yes ;;
1457
1458  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1459  | --x-incl | --x-inc | --x-in | --x-i)
1460    ac_prev=x_includes ;;
1461  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1462  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1463    x_includes=$ac_optarg ;;
1464
1465  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1466  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1467    ac_prev=x_libraries ;;
1468  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1469  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1470    x_libraries=$ac_optarg ;;
1471
1472  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1473Try \`$0 --help' for more information"
1474    ;;
1475
1476  *=*)
1477    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1478    # Reject names that are not valid shell variable names.
1479    case $ac_envvar in #(
1480      '' | [0-9]* | *[!_$as_cr_alnum]* )
1481      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1482    esac
1483    eval $ac_envvar=\$ac_optarg
1484    export $ac_envvar ;;
1485
1486  *)
1487    # FIXME: should be removed in autoconf 3.0.
1488    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1489    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1490      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1491    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1492    ;;
1493
1494  esac
1495done
1496
1497if test -n "$ac_prev"; then
1498  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1499  as_fn_error $? "missing argument to $ac_option"
1500fi
1501
1502if test -n "$ac_unrecognized_opts"; then
1503  case $enable_option_checking in
1504    no) ;;
1505    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1506    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1507  esac
1508fi
1509
1510# Check all directory arguments for consistency.
1511for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1512		datadir sysconfdir sharedstatedir localstatedir includedir \
1513		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1514		libdir localedir mandir
1515do
1516  eval ac_val=\$$ac_var
1517  # Remove trailing slashes.
1518  case $ac_val in
1519    */ )
1520      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1521      eval $ac_var=\$ac_val;;
1522  esac
1523  # Be sure to have absolute directory names.
1524  case $ac_val in
1525    [\\/$]* | ?:[\\/]* )  continue;;
1526    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1527  esac
1528  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1529done
1530
1531# There might be people who depend on the old broken behavior: `$host'
1532# used to hold the argument of --host etc.
1533# FIXME: To remove some day.
1534build=$build_alias
1535host=$host_alias
1536target=$target_alias
1537
1538# FIXME: To remove some day.
1539if test "x$host_alias" != x; then
1540  if test "x$build_alias" = x; then
1541    cross_compiling=maybe
1542  elif test "x$build_alias" != "x$host_alias"; then
1543    cross_compiling=yes
1544  fi
1545fi
1546
1547ac_tool_prefix=
1548test -n "$host_alias" && ac_tool_prefix=$host_alias-
1549
1550test "$silent" = yes && exec 6>/dev/null
1551
1552
1553ac_pwd=`pwd` && test -n "$ac_pwd" &&
1554ac_ls_di=`ls -di .` &&
1555ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1556  as_fn_error $? "working directory cannot be determined"
1557test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1558  as_fn_error $? "pwd does not report name of working directory"
1559
1560
1561# Find the source files, if location was not specified.
1562if test -z "$srcdir"; then
1563  ac_srcdir_defaulted=yes
1564  # Try the directory containing this script, then the parent directory.
1565  ac_confdir=`$as_dirname -- "$as_myself" ||
1566$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1567	 X"$as_myself" : 'X\(//\)[^/]' \| \
1568	 X"$as_myself" : 'X\(//\)$' \| \
1569	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1570$as_echo X"$as_myself" |
1571    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1572	    s//\1/
1573	    q
1574	  }
1575	  /^X\(\/\/\)[^/].*/{
1576	    s//\1/
1577	    q
1578	  }
1579	  /^X\(\/\/\)$/{
1580	    s//\1/
1581	    q
1582	  }
1583	  /^X\(\/\).*/{
1584	    s//\1/
1585	    q
1586	  }
1587	  s/.*/./; q'`
1588  srcdir=$ac_confdir
1589  if test ! -r "$srcdir/$ac_unique_file"; then
1590    srcdir=..
1591  fi
1592else
1593  ac_srcdir_defaulted=no
1594fi
1595if test ! -r "$srcdir/$ac_unique_file"; then
1596  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1597  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1598fi
1599ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1600ac_abs_confdir=`(
1601	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1602	pwd)`
1603# When building in place, set srcdir=.
1604if test "$ac_abs_confdir" = "$ac_pwd"; then
1605  srcdir=.
1606fi
1607# Remove unnecessary trailing slashes from srcdir.
1608# Double slashes in file names in object file debugging info
1609# mess up M-x gdb in Emacs.
1610case $srcdir in
1611*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1612esac
1613for ac_var in $ac_precious_vars; do
1614  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1615  eval ac_env_${ac_var}_value=\$${ac_var}
1616  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1617  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1618done
1619
1620#
1621# Report the --help message.
1622#
1623if test "$ac_init_help" = "long"; then
1624  # Omit some internal or obsolete options to make the list less imposing.
1625  # This message is too long to be a string in the A/UX 3.1 sh.
1626  cat <<_ACEOF
1627\`configure' configures OpenJDK jdk8 to adapt to many kinds of systems.
1628
1629Usage: $0 [OPTION]... [VAR=VALUE]...
1630
1631To assign environment variables (e.g., CC, CFLAGS...), specify them as
1632VAR=VALUE.  See below for descriptions of some of the useful variables.
1633
1634Defaults for the options are specified in brackets.
1635
1636Configuration:
1637  -h, --help              display this help and exit
1638      --help=short        display options specific to this package
1639      --help=recursive    display the short help of all the included packages
1640  -V, --version           display version information and exit
1641  -q, --quiet, --silent   do not print \`checking ...' messages
1642      --cache-file=FILE   cache test results in FILE [disabled]
1643  -C, --config-cache      alias for \`--cache-file=config.cache'
1644  -n, --no-create         do not create output files
1645      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1646
1647Installation directories:
1648  --prefix=PREFIX         install architecture-independent files in PREFIX
1649                          [$ac_default_prefix]
1650  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1651                          [PREFIX]
1652
1653By default, \`make install' will install all the files in
1654\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1655an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1656for instance \`--prefix=\$HOME'.
1657
1658For better control, use the options below.
1659
1660Fine tuning of the installation directories:
1661  --bindir=DIR            user executables [EPREFIX/bin]
1662  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1663  --libexecdir=DIR        program executables [EPREFIX/libexec]
1664  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1665  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1666  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1667  --libdir=DIR            object code libraries [EPREFIX/lib]
1668  --includedir=DIR        C header files [PREFIX/include]
1669  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1670  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1671  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1672  --infodir=DIR           info documentation [DATAROOTDIR/info]
1673  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1674  --mandir=DIR            man documentation [DATAROOTDIR/man]
1675  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1676  --htmldir=DIR           html documentation [DOCDIR]
1677  --dvidir=DIR            dvi documentation [DOCDIR]
1678  --pdfdir=DIR            pdf documentation [DOCDIR]
1679  --psdir=DIR             ps documentation [DOCDIR]
1680_ACEOF
1681
1682  cat <<\_ACEOF
1683
1684X features:
1685  --x-includes=DIR    X include files are in DIR
1686  --x-libraries=DIR   X library files are in DIR
1687
1688System types:
1689  --build=BUILD     configure for building on BUILD [guessed]
1690  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1691  --target=TARGET   configure for building compilers for TARGET [HOST]
1692_ACEOF
1693fi
1694
1695if test -n "$ac_init_help"; then
1696  case $ac_init_help in
1697     short | recursive ) echo "Configuration of OpenJDK jdk8:";;
1698   esac
1699  cat <<\_ACEOF
1700
1701Optional Features:
1702  --disable-option-checking  ignore unrecognized --enable/--with options
1703  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1704  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1705  --enable-openjdk-only   suppress building custom source even if present
1706                          [disabled]
1707  --enable-debug          set the debug level to fastdebug (shorthand for
1708                          --with-debug-level=fastdebug) [disabled]
1709  --disable-headful       disable building headful support (graphical UI
1710                          support) [enabled]
1711  --enable-hotspot-test-in-build
1712                          run the Queens test after Hotspot build [disabled]
1713  --enable-unlimited-crypto
1714                          Enable unlimited crypto policy [disabled]
1715  --disable-debug-symbols disable generation of debug symbols [enabled]
1716  --disable-zip-debug-info
1717                          disable zipping of debug-info files [enabled]
1718  --disable-macosx-runtime-support
1719                          disable the use of MacOSX Java runtime support
1720                          framework [enabled]
1721  --enable-sjavac         use sjavac to do fast incremental compiles
1722                          [disabled]
1723  --disable-precompiled-headers
1724                          disable using precompiled headers when compiling C++
1725                          [enabled]
1726  --disable-ccache        disable using ccache to speed up recompilations
1727                          [enabled]
1728
1729Optional Packages:
1730  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1731  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1732  --with-custom-make-dir  use this directory for custom build/make files
1733  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
1734                          support it), e.g. --with-target-bits=32 [guessed]
1735  --with-sys-root         pass this sys-root to the compilers and tools (for
1736                          cross-compiling)
1737  --with-tools-dir        search this directory for compilers and tools (for
1738                          cross-compiling)
1739  --with-devkit           use this directory as base for tools-dir and
1740                          sys-root (for cross-compiling)
1741  --with-jdk-variant      JDK variant to build (normal) [normal]
1742  --with-jvm-variants     JVM variants (separated by commas) to build (server,
1743                          client, minimal1, kernel, zero, zeroshark) [server]
1744  --with-debug-level      set the debug level (release, fastdebug, slowdebug)
1745                          [release]
1746  --with-conf-name        use this as the name of the configuration [generated
1747                          from important configuration options]
1748  --with-builddeps-conf   use this configuration file for the builddeps
1749  --with-builddeps-server download and use build dependencies from this server
1750                          url
1751  --with-builddeps-dir    store downloaded build dependencies here
1752                          [/localhome/builddeps]
1753  --with-builddeps-group  chgrp the downloaded build dependencies to this
1754                          group
1755  --with-cacerts-file     specify alternative cacerts file
1756  --with-milestone        Set milestone value for build [internal]
1757  --with-update-version   Set update version value for build [b00]
1758  --with-user-release-suffix
1759                          Add a custom string to the version string if build
1760                          number isn't set.[username_builddateb00]
1761  --with-build-number     Set build number value for build [b00]
1762  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
1763  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all
1764                          invocations of the Boot JDK, overriding the default
1765                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
1766                          -enableassertions"
1767  --with-add-source-root  for each and every source directory, look in this
1768                          additional source root for the same directory; if it
1769                          exists and have files in it, include it in the build
1770  --with-override-source-root
1771                          for each and every source directory, look in this
1772                          override source root for the same directory; if it
1773                          exists, use that directory instead and ignore the
1774                          directory in the original source root
1775  --with-adds-and-overrides
1776                          use the subdirs 'adds' and 'overrides' in the
1777                          specified directory as add-source-root and
1778                          override-source-root
1779  --with-override-langtools
1780                          use this langtools dir for the build
1781  --with-override-corba   use this corba dir for the build
1782  --with-override-jaxp    use this jaxp dir for the build
1783  --with-override-jaxws   use this jaxws dir for the build
1784  --with-override-hotspot use this hotspot dir for the build
1785  --with-override-nashorn use this nashorn dir for the build
1786  --with-override-jdk     use this jdk dir for the build
1787  --with-import-hotspot   import hotspot binaries from this jdk image or
1788                          hotspot build dist dir instead of building from
1789                          source
1790  --with-msvcr-dll        copy this msvcr100.dll into the built JDK (Windows
1791                          only) [probed]
1792  --with-dxsdk            Deprecated. Option is kept for backwards
1793                          compatibility and is ignored
1794  --with-dxsdk-lib        Deprecated. Option is kept for backwards
1795                          compatibility and is ignored
1796  --with-dxsdk-include    Deprecated. Option is kept for backwards
1797                          compatibility and is ignored
1798  --with-jtreg            Regression Test Harness [probed]
1799  --with-extra-cflags     extra flags to be used when compiling jdk c-files
1800  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
1801  --with-extra-ldflags    extra flags to be used when linking jdk
1802  --with-x                use the X Window System
1803  --with-cups             specify prefix directory for the cups package
1804                          (expecting the headers under PATH/include)
1805  --with-cups-include     specify directory for the cups include files
1806  --with-freetype         specify prefix directory for the freetype2 package
1807                          (expecting the libraries under PATH/lib and the
1808                          headers under PATH/include)
1809  --with-alsa             specify prefix directory for the alsa package
1810                          (expecting the libraries under PATH/lib and the
1811                          headers under PATH/include)
1812  --with-alsa-include     specify directory for the alsa include files
1813  --with-alsa-lib         specify directory for the alsa library
1814  --with-giflib           use giflib from build system or OpenJDK source
1815                          (system, bundled) [bundled]
1816  --with-zlib             use zlib from build system or OpenJDK source
1817                          (system, bundled) [bundled]
1818  --with-stdc++lib=<static>,<dynamic>,<default>
1819                          force linking of the C++ runtime on Linux to either
1820                          static or dynamic, default is static with dynamic as
1821                          fallback
1822  --with-num-cores        number of cores in the build system, e.g.
1823                          --with-num-cores=8 [probed]
1824  --with-memory-size      memory (in MB) available in the build system, e.g.
1825                          --with-memory-size=1024 [probed]
1826  --with-jobs             number of parallel jobs to let make run [calculated
1827                          based on cores and memory]
1828  --with-sjavac-server-java
1829                          use this java binary for running the sjavac
1830                          background server [Boot JDK java]
1831  --with-ccache-dir       where to store ccache files [~/.ccache]
1832
1833Some influential environment variables:
1834  PKG_CONFIG  path to pkg-config utility
1835  CC          C compiler command
1836  CFLAGS      C compiler flags
1837  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1838              nonstandard directory <lib dir>
1839  LIBS        libraries to pass to the linker, e.g. -l<library>
1840  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1841              you have headers in a nonstandard directory <include dir>
1842  CXX         C++ compiler command
1843  CXXFLAGS    C++ compiler flags
1844  OBJC        Objective C compiler command
1845  OBJCFLAGS   Objective C compiler flags
1846  CPP         C preprocessor
1847  CXXCPP      C++ preprocessor
1848  XMKMF       Path to xmkmf, Makefile generator for X Window System
1849  FREETYPE2_CFLAGS
1850              C compiler flags for FREETYPE2, overriding pkg-config
1851  FREETYPE2_LIBS
1852              linker flags for FREETYPE2, overriding pkg-config
1853  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
1854  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
1855  LIBFFI_CFLAGS
1856              C compiler flags for LIBFFI, overriding pkg-config
1857  LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
1858
1859Use these variables to override the choices made by `configure' or to help
1860it to find libraries and programs with nonstandard names/locations.
1861
1862Report bugs to <build-dev@openjdk.java.net>.
1863OpenJDK home page: <http://openjdk.java.net>.
1864_ACEOF
1865ac_status=$?
1866fi
1867
1868if test "$ac_init_help" = "recursive"; then
1869  # If there are subdirs, report their specific --help.
1870  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1871    test -d "$ac_dir" ||
1872      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1873      continue
1874    ac_builddir=.
1875
1876case "$ac_dir" in
1877.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1878*)
1879  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1880  # A ".." for each directory in $ac_dir_suffix.
1881  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1882  case $ac_top_builddir_sub in
1883  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1884  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1885  esac ;;
1886esac
1887ac_abs_top_builddir=$ac_pwd
1888ac_abs_builddir=$ac_pwd$ac_dir_suffix
1889# for backward compatibility:
1890ac_top_builddir=$ac_top_build_prefix
1891
1892case $srcdir in
1893  .)  # We are building in place.
1894    ac_srcdir=.
1895    ac_top_srcdir=$ac_top_builddir_sub
1896    ac_abs_top_srcdir=$ac_pwd ;;
1897  [\\/]* | ?:[\\/]* )  # Absolute name.
1898    ac_srcdir=$srcdir$ac_dir_suffix;
1899    ac_top_srcdir=$srcdir
1900    ac_abs_top_srcdir=$srcdir ;;
1901  *) # Relative name.
1902    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1903    ac_top_srcdir=$ac_top_build_prefix$srcdir
1904    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1905esac
1906ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1907
1908    cd "$ac_dir" || { ac_status=$?; continue; }
1909    # Check for guested configure.
1910    if test -f "$ac_srcdir/configure.gnu"; then
1911      echo &&
1912      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1913    elif test -f "$ac_srcdir/configure"; then
1914      echo &&
1915      $SHELL "$ac_srcdir/configure" --help=recursive
1916    else
1917      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1918    fi || ac_status=$?
1919    cd "$ac_pwd" || { ac_status=$?; break; }
1920  done
1921fi
1922
1923test -n "$ac_init_help" && exit $ac_status
1924if $ac_init_version; then
1925  cat <<\_ACEOF
1926OpenJDK configure jdk8
1927generated by GNU Autoconf 2.69
1928
1929Copyright (C) 2012 Free Software Foundation, Inc.
1930This configure script is free software; the Free Software Foundation
1931gives unlimited permission to copy, distribute and modify it.
1932_ACEOF
1933  exit
1934fi
1935
1936## ------------------------ ##
1937## Autoconf initialization. ##
1938## ------------------------ ##
1939
1940# ac_fn_c_try_compile LINENO
1941# --------------------------
1942# Try to compile conftest.$ac_ext, and return whether this succeeded.
1943ac_fn_c_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_c_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; ${as_lineno_stack:+:} unset as_lineno
1974  as_fn_set_status $ac_retval
1975
1976} # ac_fn_c_try_compile
1977
1978# ac_fn_cxx_try_compile LINENO
1979# ----------------------------
1980# Try to compile conftest.$ac_ext, and return whether this succeeded.
1981ac_fn_cxx_try_compile ()
1982{
1983  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1984  rm -f conftest.$ac_objext
1985  if { { ac_try="$ac_compile"
1986case "(($ac_try" in
1987  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1988  *) ac_try_echo=$ac_try;;
1989esac
1990eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1991$as_echo "$ac_try_echo"; } >&5
1992  (eval "$ac_compile") 2>conftest.err
1993  ac_status=$?
1994  if test -s conftest.err; then
1995    grep -v '^ *+' conftest.err >conftest.er1
1996    cat conftest.er1 >&5
1997    mv -f conftest.er1 conftest.err
1998  fi
1999  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2000  test $ac_status = 0; } && {
2001	 test -z "$ac_cxx_werror_flag" ||
2002	 test ! -s conftest.err
2003       } && test -s conftest.$ac_objext; then :
2004  ac_retval=0
2005else
2006  $as_echo "$as_me: failed program was:" >&5
2007sed 's/^/| /' conftest.$ac_ext >&5
2008
2009	ac_retval=1
2010fi
2011  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2012  as_fn_set_status $ac_retval
2013
2014} # ac_fn_cxx_try_compile
2015
2016# ac_fn_objc_try_compile LINENO
2017# -----------------------------
2018# Try to compile conftest.$ac_ext, and return whether this succeeded.
2019ac_fn_objc_try_compile ()
2020{
2021  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2022  rm -f conftest.$ac_objext
2023  if { { ac_try="$ac_compile"
2024case "(($ac_try" in
2025  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2026  *) ac_try_echo=$ac_try;;
2027esac
2028eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2029$as_echo "$ac_try_echo"; } >&5
2030  (eval "$ac_compile") 2>conftest.err
2031  ac_status=$?
2032  if test -s conftest.err; then
2033    grep -v '^ *+' conftest.err >conftest.er1
2034    cat conftest.er1 >&5
2035    mv -f conftest.er1 conftest.err
2036  fi
2037  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2038  test $ac_status = 0; } && {
2039	 test -z "$ac_objc_werror_flag" ||
2040	 test ! -s conftest.err
2041       } && test -s conftest.$ac_objext; then :
2042  ac_retval=0
2043else
2044  $as_echo "$as_me: failed program was:" >&5
2045sed 's/^/| /' conftest.$ac_ext >&5
2046
2047	ac_retval=1
2048fi
2049  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2050  as_fn_set_status $ac_retval
2051
2052} # ac_fn_objc_try_compile
2053
2054# ac_fn_c_try_cpp LINENO
2055# ----------------------
2056# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2057ac_fn_c_try_cpp ()
2058{
2059  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2060  if { { ac_try="$ac_cpp conftest.$ac_ext"
2061case "(($ac_try" in
2062  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2063  *) ac_try_echo=$ac_try;;
2064esac
2065eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2066$as_echo "$ac_try_echo"; } >&5
2067  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2068  ac_status=$?
2069  if test -s conftest.err; then
2070    grep -v '^ *+' conftest.err >conftest.er1
2071    cat conftest.er1 >&5
2072    mv -f conftest.er1 conftest.err
2073  fi
2074  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2075  test $ac_status = 0; } > conftest.i && {
2076	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2077	 test ! -s conftest.err
2078       }; then :
2079  ac_retval=0
2080else
2081  $as_echo "$as_me: failed program was:" >&5
2082sed 's/^/| /' conftest.$ac_ext >&5
2083
2084    ac_retval=1
2085fi
2086  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2087  as_fn_set_status $ac_retval
2088
2089} # ac_fn_c_try_cpp
2090
2091# ac_fn_cxx_try_cpp LINENO
2092# ------------------------
2093# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2094ac_fn_cxx_try_cpp ()
2095{
2096  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2097  if { { ac_try="$ac_cpp conftest.$ac_ext"
2098case "(($ac_try" in
2099  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2100  *) ac_try_echo=$ac_try;;
2101esac
2102eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2103$as_echo "$ac_try_echo"; } >&5
2104  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2105  ac_status=$?
2106  if test -s conftest.err; then
2107    grep -v '^ *+' conftest.err >conftest.er1
2108    cat conftest.er1 >&5
2109    mv -f conftest.er1 conftest.err
2110  fi
2111  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2112  test $ac_status = 0; } > conftest.i && {
2113	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2114	 test ! -s conftest.err
2115       }; then :
2116  ac_retval=0
2117else
2118  $as_echo "$as_me: failed program was:" >&5
2119sed 's/^/| /' conftest.$ac_ext >&5
2120
2121    ac_retval=1
2122fi
2123  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2124  as_fn_set_status $ac_retval
2125
2126} # ac_fn_cxx_try_cpp
2127
2128# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2129# ---------------------------------------------------------
2130# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2131# the include files in INCLUDES and setting the cache variable VAR
2132# accordingly.
2133ac_fn_cxx_check_header_mongrel ()
2134{
2135  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2136  if eval \${$3+:} false; then :
2137  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2138$as_echo_n "checking for $2... " >&6; }
2139if eval \${$3+:} false; then :
2140  $as_echo_n "(cached) " >&6
2141fi
2142eval ac_res=\$$3
2143	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2144$as_echo "$ac_res" >&6; }
2145else
2146  # Is the header compilable?
2147{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2148$as_echo_n "checking $2 usability... " >&6; }
2149cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2150/* end confdefs.h.  */
2151$4
2152#include <$2>
2153_ACEOF
2154if ac_fn_cxx_try_compile "$LINENO"; then :
2155  ac_header_compiler=yes
2156else
2157  ac_header_compiler=no
2158fi
2159rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2160{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2161$as_echo "$ac_header_compiler" >&6; }
2162
2163# Is the header present?
2164{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2165$as_echo_n "checking $2 presence... " >&6; }
2166cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2167/* end confdefs.h.  */
2168#include <$2>
2169_ACEOF
2170if ac_fn_cxx_try_cpp "$LINENO"; then :
2171  ac_header_preproc=yes
2172else
2173  ac_header_preproc=no
2174fi
2175rm -f conftest.err conftest.i conftest.$ac_ext
2176{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2177$as_echo "$ac_header_preproc" >&6; }
2178
2179# So?  What about this header?
2180case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2181  yes:no: )
2182    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2183$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2184    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2185$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2186    ;;
2187  no:yes:* )
2188    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2189$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2190    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2191$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2192    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2193$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2194    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2195$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2196    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2197$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2198( $as_echo "## ----------------------------------------- ##
2199## Report this to build-dev@openjdk.java.net ##
2200## ----------------------------------------- ##"
2201     ) | sed "s/^/$as_me: WARNING:     /" >&2
2202    ;;
2203esac
2204  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2205$as_echo_n "checking for $2... " >&6; }
2206if eval \${$3+:} false; then :
2207  $as_echo_n "(cached) " >&6
2208else
2209  eval "$3=\$ac_header_compiler"
2210fi
2211eval ac_res=\$$3
2212	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2213$as_echo "$ac_res" >&6; }
2214fi
2215  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2216
2217} # ac_fn_cxx_check_header_mongrel
2218
2219# ac_fn_cxx_try_run LINENO
2220# ------------------------
2221# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2222# that executables *can* be run.
2223ac_fn_cxx_try_run ()
2224{
2225  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2226  if { { ac_try="$ac_link"
2227case "(($ac_try" in
2228  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2229  *) ac_try_echo=$ac_try;;
2230esac
2231eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2232$as_echo "$ac_try_echo"; } >&5
2233  (eval "$ac_link") 2>&5
2234  ac_status=$?
2235  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2236  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2237  { { case "(($ac_try" in
2238  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2239  *) ac_try_echo=$ac_try;;
2240esac
2241eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2242$as_echo "$ac_try_echo"; } >&5
2243  (eval "$ac_try") 2>&5
2244  ac_status=$?
2245  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2246  test $ac_status = 0; }; }; then :
2247  ac_retval=0
2248else
2249  $as_echo "$as_me: program exited with status $ac_status" >&5
2250       $as_echo "$as_me: failed program was:" >&5
2251sed 's/^/| /' conftest.$ac_ext >&5
2252
2253       ac_retval=$ac_status
2254fi
2255  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2256  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2257  as_fn_set_status $ac_retval
2258
2259} # ac_fn_cxx_try_run
2260
2261# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2262# ---------------------------------------------------------
2263# Tests whether HEADER exists and can be compiled using the include files in
2264# INCLUDES, setting the cache variable VAR accordingly.
2265ac_fn_cxx_check_header_compile ()
2266{
2267  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2268  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2269$as_echo_n "checking for $2... " >&6; }
2270if eval \${$3+:} false; then :
2271  $as_echo_n "(cached) " >&6
2272else
2273  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2274/* end confdefs.h.  */
2275$4
2276#include <$2>
2277_ACEOF
2278if ac_fn_cxx_try_compile "$LINENO"; then :
2279  eval "$3=yes"
2280else
2281  eval "$3=no"
2282fi
2283rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2284fi
2285eval ac_res=\$$3
2286	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2287$as_echo "$ac_res" >&6; }
2288  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2289
2290} # ac_fn_cxx_check_header_compile
2291
2292# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2293# ----------------------------------------------
2294# Tries to find the compile-time value of EXPR in a program that includes
2295# INCLUDES, setting VAR accordingly. Returns whether the value could be
2296# computed
2297ac_fn_cxx_compute_int ()
2298{
2299  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2300  if test "$cross_compiling" = yes; then
2301    # Depending upon the size, compute the lo and hi bounds.
2302cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2303/* end confdefs.h.  */
2304$4
2305int
2306main ()
2307{
2308static int test_array [1 - 2 * !(($2) >= 0)];
2309test_array [0] = 0;
2310return test_array [0];
2311
2312  ;
2313  return 0;
2314}
2315_ACEOF
2316if ac_fn_cxx_try_compile "$LINENO"; then :
2317  ac_lo=0 ac_mid=0
2318  while :; do
2319    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2320/* end confdefs.h.  */
2321$4
2322int
2323main ()
2324{
2325static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2326test_array [0] = 0;
2327return test_array [0];
2328
2329  ;
2330  return 0;
2331}
2332_ACEOF
2333if ac_fn_cxx_try_compile "$LINENO"; then :
2334  ac_hi=$ac_mid; break
2335else
2336  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2337			if test $ac_lo -le $ac_mid; then
2338			  ac_lo= ac_hi=
2339			  break
2340			fi
2341			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2342fi
2343rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2344  done
2345else
2346  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2347/* end confdefs.h.  */
2348$4
2349int
2350main ()
2351{
2352static int test_array [1 - 2 * !(($2) < 0)];
2353test_array [0] = 0;
2354return test_array [0];
2355
2356  ;
2357  return 0;
2358}
2359_ACEOF
2360if ac_fn_cxx_try_compile "$LINENO"; then :
2361  ac_hi=-1 ac_mid=-1
2362  while :; do
2363    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2364/* end confdefs.h.  */
2365$4
2366int
2367main ()
2368{
2369static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2370test_array [0] = 0;
2371return test_array [0];
2372
2373  ;
2374  return 0;
2375}
2376_ACEOF
2377if ac_fn_cxx_try_compile "$LINENO"; then :
2378  ac_lo=$ac_mid; break
2379else
2380  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2381			if test $ac_mid -le $ac_hi; then
2382			  ac_lo= ac_hi=
2383			  break
2384			fi
2385			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2386fi
2387rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2388  done
2389else
2390  ac_lo= ac_hi=
2391fi
2392rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2393fi
2394rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2395# Binary search between lo and hi bounds.
2396while test "x$ac_lo" != "x$ac_hi"; do
2397  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2398  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2399/* end confdefs.h.  */
2400$4
2401int
2402main ()
2403{
2404static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2405test_array [0] = 0;
2406return test_array [0];
2407
2408  ;
2409  return 0;
2410}
2411_ACEOF
2412if ac_fn_cxx_try_compile "$LINENO"; then :
2413  ac_hi=$ac_mid
2414else
2415  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2416fi
2417rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2418done
2419case $ac_lo in #((
2420?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2421'') ac_retval=1 ;;
2422esac
2423  else
2424    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2425/* end confdefs.h.  */
2426$4
2427static long int longval () { return $2; }
2428static unsigned long int ulongval () { return $2; }
2429#include <stdio.h>
2430#include <stdlib.h>
2431int
2432main ()
2433{
2434
2435  FILE *f = fopen ("conftest.val", "w");
2436  if (! f)
2437    return 1;
2438  if (($2) < 0)
2439    {
2440      long int i = longval ();
2441      if (i != ($2))
2442	return 1;
2443      fprintf (f, "%ld", i);
2444    }
2445  else
2446    {
2447      unsigned long int i = ulongval ();
2448      if (i != ($2))
2449	return 1;
2450      fprintf (f, "%lu", i);
2451    }
2452  /* Do not output a trailing newline, as this causes \r\n confusion
2453     on some platforms.  */
2454  return ferror (f) || fclose (f) != 0;
2455
2456  ;
2457  return 0;
2458}
2459_ACEOF
2460if ac_fn_cxx_try_run "$LINENO"; then :
2461  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2462else
2463  ac_retval=1
2464fi
2465rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2466  conftest.$ac_objext conftest.beam conftest.$ac_ext
2467rm -f conftest.val
2468
2469  fi
2470  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2471  as_fn_set_status $ac_retval
2472
2473} # ac_fn_cxx_compute_int
2474
2475# ac_fn_cxx_try_link LINENO
2476# -------------------------
2477# Try to link conftest.$ac_ext, and return whether this succeeded.
2478ac_fn_cxx_try_link ()
2479{
2480  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2481  rm -f conftest.$ac_objext conftest$ac_exeext
2482  if { { ac_try="$ac_link"
2483case "(($ac_try" in
2484  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2485  *) ac_try_echo=$ac_try;;
2486esac
2487eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2488$as_echo "$ac_try_echo"; } >&5
2489  (eval "$ac_link") 2>conftest.err
2490  ac_status=$?
2491  if test -s conftest.err; then
2492    grep -v '^ *+' conftest.err >conftest.er1
2493    cat conftest.er1 >&5
2494    mv -f conftest.er1 conftest.err
2495  fi
2496  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2497  test $ac_status = 0; } && {
2498	 test -z "$ac_cxx_werror_flag" ||
2499	 test ! -s conftest.err
2500       } && test -s conftest$ac_exeext && {
2501	 test "$cross_compiling" = yes ||
2502	 test -x conftest$ac_exeext
2503       }; then :
2504  ac_retval=0
2505else
2506  $as_echo "$as_me: failed program was:" >&5
2507sed 's/^/| /' conftest.$ac_ext >&5
2508
2509	ac_retval=1
2510fi
2511  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2512  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2513  # interfere with the next link command; also delete a directory that is
2514  # left behind by Apple's compiler.  We do this before executing the actions.
2515  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2516  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2517  as_fn_set_status $ac_retval
2518
2519} # ac_fn_cxx_try_link
2520
2521# ac_fn_cxx_check_func LINENO FUNC VAR
2522# ------------------------------------
2523# Tests whether FUNC exists, setting the cache variable VAR accordingly
2524ac_fn_cxx_check_func ()
2525{
2526  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2527  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2528$as_echo_n "checking for $2... " >&6; }
2529if eval \${$3+:} false; then :
2530  $as_echo_n "(cached) " >&6
2531else
2532  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2533/* end confdefs.h.  */
2534/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2535   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2536#define $2 innocuous_$2
2537
2538/* System header to define __stub macros and hopefully few prototypes,
2539    which can conflict with char $2 (); below.
2540    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2541    <limits.h> exists even on freestanding compilers.  */
2542
2543#ifdef __STDC__
2544# include <limits.h>
2545#else
2546# include <assert.h>
2547#endif
2548
2549#undef $2
2550
2551/* Override any GCC internal prototype to avoid an error.
2552   Use char because int might match the return type of a GCC
2553   builtin and then its argument prototype would still apply.  */
2554#ifdef __cplusplus
2555extern "C"
2556#endif
2557char $2 ();
2558/* The GNU C library defines this for functions which it implements
2559    to always fail with ENOSYS.  Some functions are actually named
2560    something starting with __ and the normal name is an alias.  */
2561#if defined __stub_$2 || defined __stub___$2
2562choke me
2563#endif
2564
2565int
2566main ()
2567{
2568return $2 ();
2569  ;
2570  return 0;
2571}
2572_ACEOF
2573if ac_fn_cxx_try_link "$LINENO"; then :
2574  eval "$3=yes"
2575else
2576  eval "$3=no"
2577fi
2578rm -f core conftest.err conftest.$ac_objext \
2579    conftest$ac_exeext conftest.$ac_ext
2580fi
2581eval ac_res=\$$3
2582	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2583$as_echo "$ac_res" >&6; }
2584  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2585
2586} # ac_fn_cxx_check_func
2587
2588# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2589# -------------------------------------------------------
2590# Tests whether HEADER exists and can be compiled using the include files in
2591# INCLUDES, setting the cache variable VAR accordingly.
2592ac_fn_c_check_header_compile ()
2593{
2594  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2595  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2596$as_echo_n "checking for $2... " >&6; }
2597if eval \${$3+:} false; then :
2598  $as_echo_n "(cached) " >&6
2599else
2600  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2601/* end confdefs.h.  */
2602$4
2603#include <$2>
2604_ACEOF
2605if ac_fn_c_try_compile "$LINENO"; then :
2606  eval "$3=yes"
2607else
2608  eval "$3=no"
2609fi
2610rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2611fi
2612eval ac_res=\$$3
2613	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2614$as_echo "$ac_res" >&6; }
2615  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2616
2617} # ac_fn_c_check_header_compile
2618cat >config.log <<_ACEOF
2619This file contains any messages produced by compilers while
2620running configure, to aid debugging if configure makes a mistake.
2621
2622It was created by OpenJDK $as_me jdk8, which was
2623generated by GNU Autoconf 2.69.  Invocation command line was
2624
2625  $ $0 $@
2626
2627_ACEOF
2628exec 5>>config.log
2629{
2630cat <<_ASUNAME
2631## --------- ##
2632## Platform. ##
2633## --------- ##
2634
2635hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2636uname -m = `(uname -m) 2>/dev/null || echo unknown`
2637uname -r = `(uname -r) 2>/dev/null || echo unknown`
2638uname -s = `(uname -s) 2>/dev/null || echo unknown`
2639uname -v = `(uname -v) 2>/dev/null || echo unknown`
2640
2641/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2642/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2643
2644/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2645/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2646/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2647/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2648/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2649/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2650/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2651
2652_ASUNAME
2653
2654as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2655for as_dir in $PATH
2656do
2657  IFS=$as_save_IFS
2658  test -z "$as_dir" && as_dir=.
2659    $as_echo "PATH: $as_dir"
2660  done
2661IFS=$as_save_IFS
2662
2663} >&5
2664
2665cat >&5 <<_ACEOF
2666
2667
2668## ----------- ##
2669## Core tests. ##
2670## ----------- ##
2671
2672_ACEOF
2673
2674
2675# Keep a trace of the command line.
2676# Strip out --no-create and --no-recursion so they do not pile up.
2677# Strip out --silent because we don't want to record it for future runs.
2678# Also quote any args containing shell meta-characters.
2679# Make two passes to allow for proper duplicate-argument suppression.
2680ac_configure_args=
2681ac_configure_args0=
2682ac_configure_args1=
2683ac_must_keep_next=false
2684for ac_pass in 1 2
2685do
2686  for ac_arg
2687  do
2688    case $ac_arg in
2689    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2690    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2691    | -silent | --silent | --silen | --sile | --sil)
2692      continue ;;
2693    *\'*)
2694      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2695    esac
2696    case $ac_pass in
2697    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2698    2)
2699      as_fn_append ac_configure_args1 " '$ac_arg'"
2700      if test $ac_must_keep_next = true; then
2701	ac_must_keep_next=false # Got value, back to normal.
2702      else
2703	case $ac_arg in
2704	  *=* | --config-cache | -C | -disable-* | --disable-* \
2705	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2706	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2707	  | -with-* | --with-* | -without-* | --without-* | --x)
2708	    case "$ac_configure_args0 " in
2709	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2710	    esac
2711	    ;;
2712	  -* ) ac_must_keep_next=true ;;
2713	esac
2714      fi
2715      as_fn_append ac_configure_args " '$ac_arg'"
2716      ;;
2717    esac
2718  done
2719done
2720{ ac_configure_args0=; unset ac_configure_args0;}
2721{ ac_configure_args1=; unset ac_configure_args1;}
2722
2723# When interrupted or exit'd, cleanup temporary files, and complete
2724# config.log.  We remove comments because anyway the quotes in there
2725# would cause problems or look ugly.
2726# WARNING: Use '\'' to represent an apostrophe within the trap.
2727# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2728trap 'exit_status=$?
2729  # Save into config.log some information that might help in debugging.
2730  {
2731    echo
2732
2733    $as_echo "## ---------------- ##
2734## Cache variables. ##
2735## ---------------- ##"
2736    echo
2737    # The following way of writing the cache mishandles newlines in values,
2738(
2739  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2740    eval ac_val=\$$ac_var
2741    case $ac_val in #(
2742    *${as_nl}*)
2743      case $ac_var in #(
2744      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2745$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2746      esac
2747      case $ac_var in #(
2748      _ | IFS | as_nl) ;; #(
2749      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2750      *) { eval $ac_var=; unset $ac_var;} ;;
2751      esac ;;
2752    esac
2753  done
2754  (set) 2>&1 |
2755    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2756    *${as_nl}ac_space=\ *)
2757      sed -n \
2758	"s/'\''/'\''\\\\'\'''\''/g;
2759	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2760      ;; #(
2761    *)
2762      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2763      ;;
2764    esac |
2765    sort
2766)
2767    echo
2768
2769    $as_echo "## ----------------- ##
2770## Output variables. ##
2771## ----------------- ##"
2772    echo
2773    for ac_var in $ac_subst_vars
2774    do
2775      eval ac_val=\$$ac_var
2776      case $ac_val in
2777      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2778      esac
2779      $as_echo "$ac_var='\''$ac_val'\''"
2780    done | sort
2781    echo
2782
2783    if test -n "$ac_subst_files"; then
2784      $as_echo "## ------------------- ##
2785## File substitutions. ##
2786## ------------------- ##"
2787      echo
2788      for ac_var in $ac_subst_files
2789      do
2790	eval ac_val=\$$ac_var
2791	case $ac_val in
2792	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2793	esac
2794	$as_echo "$ac_var='\''$ac_val'\''"
2795      done | sort
2796      echo
2797    fi
2798
2799    if test -s confdefs.h; then
2800      $as_echo "## ----------- ##
2801## confdefs.h. ##
2802## ----------- ##"
2803      echo
2804      cat confdefs.h
2805      echo
2806    fi
2807    test "$ac_signal" != 0 &&
2808      $as_echo "$as_me: caught signal $ac_signal"
2809    $as_echo "$as_me: exit $exit_status"
2810  } >&5
2811  rm -f core *.core core.conftest.* &&
2812    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2813    exit $exit_status
2814' 0
2815for ac_signal in 1 2 13 15; do
2816  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2817done
2818ac_signal=0
2819
2820# confdefs.h avoids OS command line length limits that DEFS can exceed.
2821rm -f -r conftest* confdefs.h
2822
2823$as_echo "/* confdefs.h */" > confdefs.h
2824
2825# Predefined preprocessor variables.
2826
2827cat >>confdefs.h <<_ACEOF
2828#define PACKAGE_NAME "$PACKAGE_NAME"
2829_ACEOF
2830
2831cat >>confdefs.h <<_ACEOF
2832#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2833_ACEOF
2834
2835cat >>confdefs.h <<_ACEOF
2836#define PACKAGE_VERSION "$PACKAGE_VERSION"
2837_ACEOF
2838
2839cat >>confdefs.h <<_ACEOF
2840#define PACKAGE_STRING "$PACKAGE_STRING"
2841_ACEOF
2842
2843cat >>confdefs.h <<_ACEOF
2844#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2845_ACEOF
2846
2847cat >>confdefs.h <<_ACEOF
2848#define PACKAGE_URL "$PACKAGE_URL"
2849_ACEOF
2850
2851
2852# Let the site file select an alternate cache file if it wants to.
2853# Prefer an explicitly selected file to automatically selected ones.
2854ac_site_file1=NONE
2855ac_site_file2=NONE
2856if test -n "$CONFIG_SITE"; then
2857  # We do not want a PATH search for config.site.
2858  case $CONFIG_SITE in #((
2859    -*)  ac_site_file1=./$CONFIG_SITE;;
2860    */*) ac_site_file1=$CONFIG_SITE;;
2861    *)   ac_site_file1=./$CONFIG_SITE;;
2862  esac
2863elif test "x$prefix" != xNONE; then
2864  ac_site_file1=$prefix/share/config.site
2865  ac_site_file2=$prefix/etc/config.site
2866else
2867  ac_site_file1=$ac_default_prefix/share/config.site
2868  ac_site_file2=$ac_default_prefix/etc/config.site
2869fi
2870for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2871do
2872  test "x$ac_site_file" = xNONE && continue
2873  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2874    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2875$as_echo "$as_me: loading site script $ac_site_file" >&6;}
2876    sed 's/^/| /' "$ac_site_file" >&5
2877    . "$ac_site_file" \
2878      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2879$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2880as_fn_error $? "failed to load site script $ac_site_file
2881See \`config.log' for more details" "$LINENO" 5; }
2882  fi
2883done
2884
2885if test -r "$cache_file"; then
2886  # Some versions of bash will fail to source /dev/null (special files
2887  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
2888  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2889    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2890$as_echo "$as_me: loading cache $cache_file" >&6;}
2891    case $cache_file in
2892      [\\/]* | ?:[\\/]* ) . "$cache_file";;
2893      *)                      . "./$cache_file";;
2894    esac
2895  fi
2896else
2897  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2898$as_echo "$as_me: creating cache $cache_file" >&6;}
2899  >$cache_file
2900fi
2901
2902# Check that the precious variables saved in the cache have kept the same
2903# value.
2904ac_cache_corrupted=false
2905for ac_var in $ac_precious_vars; do
2906  eval ac_old_set=\$ac_cv_env_${ac_var}_set
2907  eval ac_new_set=\$ac_env_${ac_var}_set
2908  eval ac_old_val=\$ac_cv_env_${ac_var}_value
2909  eval ac_new_val=\$ac_env_${ac_var}_value
2910  case $ac_old_set,$ac_new_set in
2911    set,)
2912      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2913$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2914      ac_cache_corrupted=: ;;
2915    ,set)
2916      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2917$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2918      ac_cache_corrupted=: ;;
2919    ,);;
2920    *)
2921      if test "x$ac_old_val" != "x$ac_new_val"; then
2922	# differences in whitespace do not lead to failure.
2923	ac_old_val_w=`echo x $ac_old_val`
2924	ac_new_val_w=`echo x $ac_new_val`
2925	if test "$ac_old_val_w" != "$ac_new_val_w"; then
2926	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2927$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2928	  ac_cache_corrupted=:
2929	else
2930	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2931$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2932	  eval $ac_var=\$ac_old_val
2933	fi
2934	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
2935$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
2936	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
2937$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
2938      fi;;
2939  esac
2940  # Pass precious variables to config.status.
2941  if test "$ac_new_set" = set; then
2942    case $ac_new_val in
2943    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2944    *) ac_arg=$ac_var=$ac_new_val ;;
2945    esac
2946    case " $ac_configure_args " in
2947      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
2948      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2949    esac
2950  fi
2951done
2952if $ac_cache_corrupted; then
2953  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2954$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2955  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2956$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2957  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2958fi
2959## -------------------- ##
2960## Main body of script. ##
2961## -------------------- ##
2962
2963ac_ext=c
2964ac_cpp='$CPP $CPPFLAGS'
2965ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2966ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2967ac_compiler_gnu=$ac_cv_c_compiler_gnu
2968
2969
2970
2971ac_aux_dir=
2972for ac_dir in build-aux "$srcdir"/build-aux; do
2973  if test -f "$ac_dir/install-sh"; then
2974    ac_aux_dir=$ac_dir
2975    ac_install_sh="$ac_aux_dir/install-sh -c"
2976    break
2977  elif test -f "$ac_dir/install.sh"; then
2978    ac_aux_dir=$ac_dir
2979    ac_install_sh="$ac_aux_dir/install.sh -c"
2980    break
2981  elif test -f "$ac_dir/shtool"; then
2982    ac_aux_dir=$ac_dir
2983    ac_install_sh="$ac_aux_dir/shtool install -c"
2984    break
2985  fi
2986done
2987if test -z "$ac_aux_dir"; then
2988  as_fn_error $? "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5
2989fi
2990
2991# These three variables are undocumented and unsupported,
2992# and are intended to be withdrawn in a future Autoconf release.
2993# They can cause serious problems if a builder's source tree is in a directory
2994# whose full name contains unusual characters.
2995ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
2996ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
2997ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
2998
2999
3000# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3001
3002#
3003# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3004# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3005#
3006# This code is free software; you can redistribute it and/or modify it
3007# under the terms of the GNU General Public License version 2 only, as
3008# published by the Free Software Foundation.  Oracle designates this
3009# particular file as subject to the "Classpath" exception as provided
3010# by Oracle in the LICENSE file that accompanied this code.
3011#
3012# This code is distributed in the hope that it will be useful, but WITHOUT
3013# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3014# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3015# version 2 for more details (a copy is included in the LICENSE file that
3016# accompanied this code).
3017#
3018# You should have received a copy of the GNU General Public License version
3019# 2 along with this work; if not, write to the Free Software Foundation,
3020# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3021#
3022# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3023# or visit www.oracle.com if you need additional information or have any
3024# questions.
3025#
3026
3027#
3028# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
3029#
3030# This program is free software; you can redistribute it and/or modify
3031# it under the terms of the GNU General Public License as published by
3032# the Free Software Foundation; either version 2 of the License, or
3033# (at your option) any later version.
3034#
3035# This program is distributed in the hope that it will be useful, but
3036# WITHOUT ANY WARRANTY; without even the implied warranty of
3037# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3038# General Public License for more details.
3039#
3040# You should have received a copy of the GNU General Public License
3041# along with this program; if not, write to the Free Software
3042# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3043#
3044# As a special exception to the GNU General Public License, if you
3045# distribute this file as part of a program that contains a
3046# configuration script generated by Autoconf, you may include it under
3047# the same distribution terms that you use for the rest of that program.
3048
3049# PKG_PROG_PKG_CONFIG([MIN-VERSION])
3050# ----------------------------------
3051# PKG_PROG_PKG_CONFIG
3052
3053# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3054#
3055# Check to see whether a particular set of modules exists.  Similar
3056# to PKG_CHECK_MODULES(), but does not set variables or print errors.
3057#
3058#
3059# Similar to PKG_CHECK_MODULES, make sure that the first instance of
3060# this or PKG_CHECK_MODULES is called, or make sure to call
3061# PKG_CHECK_EXISTS manually
3062# --------------------------------------------------------------
3063
3064
3065
3066# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3067# ---------------------------------------------
3068# _PKG_CONFIG
3069
3070# _PKG_SHORT_ERRORS_SUPPORTED
3071# -----------------------------
3072# _PKG_SHORT_ERRORS_SUPPORTED
3073
3074
3075# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3076# [ACTION-IF-NOT-FOUND])
3077#
3078#
3079# Note that if there is a possibility the first call to
3080# PKG_CHECK_MODULES might not happen, you should be sure to include an
3081# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3082#
3083#
3084# --------------------------------------------------------------
3085# PKG_CHECK_MODULES
3086
3087
3088# Include these first...
3089#
3090# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
3091# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3092#
3093# This code is free software; you can redistribute it and/or modify it
3094# under the terms of the GNU General Public License version 2 only, as
3095# published by the Free Software Foundation.  Oracle designates this
3096# particular file as subject to the "Classpath" exception as provided
3097# by Oracle in the LICENSE file that accompanied this code.
3098#
3099# This code is distributed in the hope that it will be useful, but WITHOUT
3100# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3101# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3102# version 2 for more details (a copy is included in the LICENSE file that
3103# accompanied this code).
3104#
3105# You should have received a copy of the GNU General Public License version
3106# 2 along with this work; if not, write to the Free Software Foundation,
3107# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3108#
3109# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3110# or visit www.oracle.com if you need additional information or have any
3111# questions.
3112#
3113
3114# Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3115# If so, then append $1 to $2 \
3116# Also set JVM_ARG_OK to true/false depending on outcome.
3117
3118
3119# Appends a string to a path variable, only adding the : when needed.
3120
3121
3122# This will make sure the given variable points to a full and proper
3123# path. This means:
3124# 1) There will be no spaces in the path. On posix platforms,
3125#    spaces in the path will result in an error. On Windows,
3126#    the path will be rewritten using short-style to be space-free.
3127# 2) The path will be absolute, and it will be in unix-style (on
3128#     cygwin).
3129# $1: The name of the variable to fix
3130
3131
3132# This will make sure the given variable points to a executable
3133# with a full and proper path. This means:
3134# 1) There will be no spaces in the path. On posix platforms,
3135#    spaces in the path will result in an error. On Windows,
3136#    the path will be rewritten using short-style to be space-free.
3137# 2) The path will be absolute, and it will be in unix-style (on
3138#     cygwin).
3139# Any arguments given to the executable is preserved.
3140# If the input variable does not have a directory specification, then
3141# it need to be in the PATH.
3142# $1: The name of the variable to fix
3143
3144
3145
3146
3147# Register a --with argument but mark it as deprecated
3148# $1: The name of the with argument to deprecate, not including --with-
3149
3150
3151
3152
3153# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3154# $1: variable to check
3155# $2: executable name to print in warning (optional)
3156
3157
3158# Does AC_PATH_PROG followed by BASIC_CHECK_NONEMPTY.
3159# Arguments as AC_PATH_PROG:
3160# $1: variable to set
3161# $2: executable name to look for
3162
3163
3164# Setup the most fundamental tools that relies on not much else to set up,
3165# but is used by much of the early bootstrap code.
3166
3167
3168# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3169
3170
3171
3172
3173
3174
3175
3176#%%% Simple tools %%%
3177
3178# Check if we have found a usable version of make
3179# $1: the path to a potential make binary (or empty)
3180# $2: the description on how we found this
3181
3182
3183# Goes looking for a usable version of GNU make.
3184
3185
3186
3187
3188
3189
3190# Check if build directory is on local disk. If not possible to determine,
3191# we prefer to claim it's local.
3192# Argument 1: directory to test
3193# Argument 2: what to do if it is on local disk
3194# Argument 3: what to do otherwise (remote disk or failure)
3195
3196
3197# Check that source files have basic read permissions set. This might
3198# not be the case in cygwin in certain conditions.
3199
3200
3201
3202
3203#
3204# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3205# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3206#
3207# This code is free software; you can redistribute it and/or modify it
3208# under the terms of the GNU General Public License version 2 only, as
3209# published by the Free Software Foundation.  Oracle designates this
3210# particular file as subject to the "Classpath" exception as provided
3211# by Oracle in the LICENSE file that accompanied this code.
3212#
3213# This code is distributed in the hope that it will be useful, but WITHOUT
3214# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3215# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3216# version 2 for more details (a copy is included in the LICENSE file that
3217# accompanied this code).
3218#
3219# You should have received a copy of the GNU General Public License version
3220# 2 along with this work; if not, write to the Free Software Foundation,
3221# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3222#
3223# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3224# or visit www.oracle.com if you need additional information or have any
3225# questions.
3226#
3227
3228
3229
3230
3231
3232# Helper function which possibly converts a path using DOS-style short mode.
3233# If so, the updated path is stored in $new_path.
3234# $1: The path to check
3235
3236
3237# Helper function which possibly converts a path using DOS-style short mode.
3238# If so, the updated path is stored in $new_path.
3239# $1: The path to check
3240
3241
3242# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3243# and could probably be heavily simplified. However, all changes in this
3244# area tend to need lot of testing in different scenarios, and in lack of
3245# proper unit testing, cleaning this up has not been deemed worth the effort
3246# at the moment.
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3257
3258
3259
3260
3261#
3262# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3263# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3264#
3265# This code is free software; you can redistribute it and/or modify it
3266# under the terms of the GNU General Public License version 2 only, as
3267# published by the Free Software Foundation.  Oracle designates this
3268# particular file as subject to the "Classpath" exception as provided
3269# by Oracle in the LICENSE file that accompanied this code.
3270#
3271# This code is distributed in the hope that it will be useful, but WITHOUT
3272# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3273# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3274# version 2 for more details (a copy is included in the LICENSE file that
3275# accompanied this code).
3276#
3277# You should have received a copy of the GNU General Public License version
3278# 2 along with this work; if not, write to the Free Software Foundation,
3279# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3280#
3281# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3282# or visit www.oracle.com if you need additional information or have any
3283# questions.
3284#
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296# ... then the rest
3297#
3298# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3299# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3300#
3301# This code is free software; you can redistribute it and/or modify it
3302# under the terms of the GNU General Public License version 2 only, as
3303# published by the Free Software Foundation.  Oracle designates this
3304# particular file as subject to the "Classpath" exception as provided
3305# by Oracle in the LICENSE file that accompanied this code.
3306#
3307# This code is distributed in the hope that it will be useful, but WITHOUT
3308# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3309# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3310# version 2 for more details (a copy is included in the LICENSE file that
3311# accompanied this code).
3312#
3313# You should have received a copy of the GNU General Public License version
3314# 2 along with this work; if not, write to the Free Software Foundation,
3315# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3316#
3317# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3318# or visit www.oracle.com if you need additional information or have any
3319# questions.
3320#
3321
3322# Execute the check given as argument, and verify the result
3323# If the Boot JDK was previously found, do nothing
3324# $1 A command line (typically autoconf macro) to execute
3325
3326
3327# Test: Is bootjdk explicitely set by command line arguments?
3328
3329
3330# Test: Is bootjdk available from builddeps?
3331
3332
3333# Test: Is $JAVA_HOME set?
3334
3335
3336# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3337
3338
3339# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3340
3341
3342# Look for a jdk in the given path. If there are multiple, try to select the newest.
3343# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3344# $1 = Path to directory containing jdk installations.
3345# $2 = String to append to the found JDK directory to get the proper JDK home
3346
3347
3348# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3349# environmental variable as base for where to look.
3350# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3351
3352
3353# Test: Is there a JDK installed in default, well-known locations?
3354
3355
3356# Check that a command-line tool in the Boot JDK is correct
3357# $1 = name of variable to assign
3358# $2 = name of binary
3359
3360
3361###############################################################################
3362#
3363# We need a Boot JDK to bootstrap the build.
3364#
3365
3366
3367
3368
3369
3370#
3371# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3372# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3373#
3374# This code is free software; you can redistribute it and/or modify it
3375# under the terms of the GNU General Public License version 2 only, as
3376# published by the Free Software Foundation.  Oracle designates this
3377# particular file as subject to the "Classpath" exception as provided
3378# by Oracle in the LICENSE file that accompanied this code.
3379#
3380# This code is distributed in the hope that it will be useful, but WITHOUT
3381# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3382# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3383# version 2 for more details (a copy is included in the LICENSE file that
3384# accompanied this code).
3385#
3386# You should have received a copy of the GNU General Public License version
3387# 2 along with this work; if not, write to the Free Software Foundation,
3388# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3389#
3390# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3391# or visit www.oracle.com if you need additional information or have any
3392# questions.
3393#
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414#
3415# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3416# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3417#
3418# This code is free software; you can redistribute it and/or modify it
3419# under the terms of the GNU General Public License version 2 only, as
3420# published by the Free Software Foundation.  Oracle designates this
3421# particular file as subject to the "Classpath" exception as provided
3422# by Oracle in the LICENSE file that accompanied this code.
3423#
3424# This code is distributed in the hope that it will be useful, but WITHOUT
3425# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3426# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3427# version 2 for more details (a copy is included in the LICENSE file that
3428# accompanied this code).
3429#
3430# You should have received a copy of the GNU General Public License version
3431# 2 along with this work; if not, write to the Free Software Foundation,
3432# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3433#
3434# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3435# or visit www.oracle.com if you need additional information or have any
3436# questions.
3437#
3438
3439
3440
3441
3442
3443cygwin_help() {
3444  case $1 in
3445    unzip)
3446      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
3447      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3448      ;;
3449    zip)
3450      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
3451      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3452      ;;
3453    make)
3454      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
3455      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3456      ;;
3457    freetype2)
3458      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
3459        HELP_MSG="To install freetype, run:
3460wget \"http://gnuwin32.sourceforge.net/downlinks/freetype.php\" -O /tmp/freetype-setup.exe
3461chmod +x /tmp/freetype-setup.exe
3462/tmp/freetype-setup.exe
3463Follow GUI prompts, and install to default directory \"C:\Program Files (x86)\GnuWin32\".
3464After installation, locate lib/libfreetype.dll.a and make a copy with the name freetype.dll."
3465      else
3466        HELP_MSG="You need to build a 64-bit version of freetype.
3467This is not readily available.
3468You can find source code and build instructions on
3469http://www.freetype.org/
3470If you put the resulting build in \"C:\Program Files\GnuWin32\", it will be found automatically."
3471      fi
3472      ;;
3473    * )
3474      break ;;
3475  esac
3476}
3477
3478msys_help() {
3479  PKGHANDLER_COMMAND=""
3480}
3481
3482apt_help() {
3483  case $1 in
3484    devkit)
3485      PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
3486    openjdk)
3487      PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
3488    alsa)
3489      PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
3490    cups)
3491      PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
3492    freetype2)
3493      PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
3494    pulse)
3495      PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;;
3496    x11)
3497      PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
3498    ccache)
3499      PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
3500    * )
3501      break ;;
3502  esac
3503}
3504
3505yum_help() {
3506  case $1 in
3507    devkit)
3508      PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
3509    openjdk)
3510      PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
3511    alsa)
3512      PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
3513    cups)
3514      PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
3515    freetype2)
3516      PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
3517    pulse)
3518      PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;;
3519    x11)
3520      PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel" ;;
3521    ccache)
3522      PKGHANDLER_COMMAND="sudo yum install ccache" ;;
3523    * )
3524      break ;;
3525  esac
3526}
3527
3528port_help() {
3529  PKGHANDLER_COMMAND=""
3530}
3531
3532pkgutil_help() {
3533  PKGHANDLER_COMMAND=""
3534}
3535
3536pkgadd_help() {
3537  PKGHANDLER_COMMAND=""
3538}
3539
3540
3541
3542#
3543# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
3544# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3545#
3546# This code is free software; you can redistribute it and/or modify it
3547# under the terms of the GNU General Public License version 2 only, as
3548# published by the Free Software Foundation.  Oracle designates this
3549# particular file as subject to the "Classpath" exception as provided
3550# by Oracle in the LICENSE file that accompanied this code.
3551#
3552# This code is distributed in the hope that it will be useful, but WITHOUT
3553# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3554# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3555# version 2 for more details (a copy is included in the LICENSE file that
3556# accompanied this code).
3557#
3558# You should have received a copy of the GNU General Public License version
3559# 2 along with this work; if not, write to the Free Software Foundation,
3560# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3561#
3562# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3563# or visit www.oracle.com if you need additional information or have any
3564# questions.
3565#
3566
3567
3568
3569
3570
3571
3572
3573
3574###############################################################################
3575#
3576# Should we build only OpenJDK even if closed sources are present?
3577#
3578
3579
3580
3581
3582###############################################################################
3583#
3584# Setup version numbers
3585#
3586
3587
3588
3589
3590
3591
3592# Support for customization of the build process. Some build files
3593# will include counterparts from this location, if they exist. This allows
3594# for a degree of customization of the build targets and the rules/recipes
3595# to create them
3596
3597# Check whether --with-custom-make-dir was given.
3598if test "${with_custom_make_dir+set}" = set; then :
3599  withval=$with_custom_make_dir; CUSTOM_MAKE_DIR=$with_custom_make_dir
3600fi
3601
3602
3603
3604#
3605# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3606# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3607#
3608# This code is free software; you can redistribute it and/or modify it
3609# under the terms of the GNU General Public License version 2 only, as
3610# published by the Free Software Foundation.  Oracle designates this
3611# particular file as subject to the "Classpath" exception as provided
3612# by Oracle in the LICENSE file that accompanied this code.
3613#
3614# This code is distributed in the hope that it will be useful, but WITHOUT
3615# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3616# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3617# version 2 for more details (a copy is included in the LICENSE file that
3618# accompanied this code).
3619#
3620# You should have received a copy of the GNU General Public License version
3621# 2 along with this work; if not, write to the Free Software Foundation,
3622# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3623#
3624# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3625# or visit www.oracle.com if you need additional information or have any
3626# questions.
3627#
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643#
3644# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3645# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3646#
3647# This code is free software; you can redistribute it and/or modify it
3648# under the terms of the GNU General Public License version 2 only, as
3649# published by the Free Software Foundation.  Oracle designates this
3650# particular file as subject to the "Classpath" exception as provided
3651# by Oracle in the LICENSE file that accompanied this code.
3652#
3653# This code is distributed in the hope that it will be useful, but WITHOUT
3654# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3655# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3656# version 2 for more details (a copy is included in the LICENSE file that
3657# accompanied this code).
3658#
3659# You should have received a copy of the GNU General Public License version
3660# 2 along with this work; if not, write to the Free Software Foundation,
3661# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3662#
3663# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3664# or visit www.oracle.com if you need additional information or have any
3665# questions.
3666#
3667
3668# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
3669# Converts autoconf style CPU name to OpenJDK style, into
3670# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
3671
3672
3673# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
3674# Converts autoconf style OS name to OpenJDK style, into
3675# VAR_OS and VAR_OS_API.
3676
3677
3678# Expects $host_os $host_cpu $build_os and $build_cpu
3679# and $with_target_bits to have been setup!
3680#
3681# Translate the standard triplet(quadruplet) definition
3682# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
3683# OPENJDK_BUILD_OS, etc.
3684
3685
3686# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
3687# accordingly. Must be done after setting up build and target system, but before
3688# doing anything else with these values.
3689
3690
3691# Setup the legacy variables, for controlling the old makefiles.
3692#
3693
3694
3695
3696
3697#%%% Build and target systems %%%
3698
3699
3700
3701
3702# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
3703# Add -mX to various FLAGS variables.
3704
3705
3706
3707
3708
3709
3710#
3711# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3712# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3713#
3714# This code is free software; you can redistribute it and/or modify it
3715# under the terms of the GNU General Public License version 2 only, as
3716# published by the Free Software Foundation.  Oracle designates this
3717# particular file as subject to the "Classpath" exception as provided
3718# by Oracle in the LICENSE file that accompanied this code.
3719#
3720# This code is distributed in the hope that it will be useful, but WITHOUT
3721# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3722# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3723# version 2 for more details (a copy is included in the LICENSE file that
3724# accompanied this code).
3725#
3726# You should have received a copy of the GNU General Public License version
3727# 2 along with this work; if not, write to the Free Software Foundation,
3728# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3729#
3730# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3731# or visit www.oracle.com if you need additional information or have any
3732# questions.
3733#
3734
3735
3736
3737
3738
3739
3740
3741
3742#
3743# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3744# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3745#
3746# This code is free software; you can redistribute it and/or modify it
3747# under the terms of the GNU General Public License version 2 only, as
3748# published by the Free Software Foundation.  Oracle designates this
3749# particular file as subject to the "Classpath" exception as provided
3750# by Oracle in the LICENSE file that accompanied this code.
3751#
3752# This code is distributed in the hope that it will be useful, but WITHOUT
3753# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3754# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3755# version 2 for more details (a copy is included in the LICENSE file that
3756# accompanied this code).
3757#
3758# You should have received a copy of the GNU General Public License version
3759# 2 along with this work; if not, write to the Free Software Foundation,
3760# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3761#
3762# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3763# or visit www.oracle.com if you need additional information or have any
3764# questions.
3765#
3766
3767# $1 = compiler to test (CC or CXX)
3768# $2 = human readable name of compiler (C or C++)
3769
3770
3771
3772
3773
3774# $1 = compiler to test (CC or CXX)
3775# $2 = human readable name of compiler (C or C++)
3776# $3 = list of compiler names to search for
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790# TOOLCHAIN_COMPILER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3791#                                   [RUN-IF-FALSE])
3792# ------------------------------------------------------------
3793# Check that the c and c++ compilers support an argument
3794
3795
3796
3797
3798# Setup the JTREG paths
3799
3800
3801#
3802# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3803# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3804#
3805# This code is free software; you can redistribute it and/or modify it
3806# under the terms of the GNU General Public License version 2 only, as
3807# published by the Free Software Foundation.  Oracle designates this
3808# particular file as subject to the "Classpath" exception as provided
3809# by Oracle in the LICENSE file that accompanied this code.
3810#
3811# This code is distributed in the hope that it will be useful, but WITHOUT
3812# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3813# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3814# version 2 for more details (a copy is included in the LICENSE file that
3815# accompanied this code).
3816#
3817# You should have received a copy of the GNU General Public License version
3818# 2 along with this work; if not, write to the Free Software Foundation,
3819# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3820#
3821# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3822# or visit www.oracle.com if you need additional information or have any
3823# questions.
3824#
3825
3826
3827
3828
3829
3830
3831
3832# Check if the VS env variables were setup prior to running configure.
3833# If not, then find vcvarsall.bat and run it automatically, and integrate
3834# the set env variables into the spec file.
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845# This line needs to be here, verbatim, after all includes and the dummy hook
3846# definitions. It is replaced with custom functionality when building
3847# custom sources.
3848#CUSTOM_AUTOCONF_INCLUDE
3849
3850# Do not change or remove the following line, it is needed for consistency checks:
3851DATE_WHEN_GENERATED=1382433088
3852
3853###############################################################################
3854#
3855# Initialization / Boot-strapping
3856#
3857# The bootstrapping process needs to solve the "chicken or the egg" problem,
3858# thus it jumps back and forth, each time gaining something needed later on.
3859#
3860###############################################################################
3861
3862# Basic initialization that must happen first of all
3863
3864  # Save the original command line. This is passed to us by the wrapper configure script.
3865
3866  DATE_WHEN_CONFIGURED=`LANG=C date`
3867
3868  { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
3869$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
3870  { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
3871$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
3872
3873
3874
3875  # Start with tools that do not need have cross compilation support
3876  # and can be expected to be found in the default PATH. These tools are
3877  # used by configure. Nor are these tools expected to be found in the
3878  # devkit from the builddeps server either, since they are
3879  # needed to download the devkit.
3880
3881  # First are all the simple required tools.
3882
3883  for ac_prog in basename
3884do
3885  # Extract the first word of "$ac_prog", so it can be a program name with args.
3886set dummy $ac_prog; ac_word=$2
3887{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3888$as_echo_n "checking for $ac_word... " >&6; }
3889if ${ac_cv_path_BASENAME+:} false; then :
3890  $as_echo_n "(cached) " >&6
3891else
3892  case $BASENAME in
3893  [\\/]* | ?:[\\/]*)
3894  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
3895  ;;
3896  *)
3897  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3898for as_dir in $PATH
3899do
3900  IFS=$as_save_IFS
3901  test -z "$as_dir" && as_dir=.
3902    for ac_exec_ext in '' $ac_executable_extensions; do
3903  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3904    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
3905    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3906    break 2
3907  fi
3908done
3909  done
3910IFS=$as_save_IFS
3911
3912  ;;
3913esac
3914fi
3915BASENAME=$ac_cv_path_BASENAME
3916if test -n "$BASENAME"; then
3917  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
3918$as_echo "$BASENAME" >&6; }
3919else
3920  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3921$as_echo "no" >&6; }
3922fi
3923
3924
3925  test -n "$BASENAME" && break
3926done
3927
3928
3929  if test "x$BASENAME" = x; then
3930    if test "xbasename" = x; then
3931      PROG_NAME=basename
3932    else
3933      PROG_NAME=basename
3934    fi
3935    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3936$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3937    as_fn_error $? "Cannot continue" "$LINENO" 5
3938  fi
3939
3940
3941
3942  for ac_prog in bash
3943do
3944  # Extract the first word of "$ac_prog", so it can be a program name with args.
3945set dummy $ac_prog; ac_word=$2
3946{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3947$as_echo_n "checking for $ac_word... " >&6; }
3948if ${ac_cv_path_BASH+:} false; then :
3949  $as_echo_n "(cached) " >&6
3950else
3951  case $BASH in
3952  [\\/]* | ?:[\\/]*)
3953  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
3954  ;;
3955  *)
3956  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3957for as_dir in $PATH
3958do
3959  IFS=$as_save_IFS
3960  test -z "$as_dir" && as_dir=.
3961    for ac_exec_ext in '' $ac_executable_extensions; do
3962  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3963    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
3964    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3965    break 2
3966  fi
3967done
3968  done
3969IFS=$as_save_IFS
3970
3971  ;;
3972esac
3973fi
3974BASH=$ac_cv_path_BASH
3975if test -n "$BASH"; then
3976  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
3977$as_echo "$BASH" >&6; }
3978else
3979  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3980$as_echo "no" >&6; }
3981fi
3982
3983
3984  test -n "$BASH" && break
3985done
3986
3987
3988  if test "x$BASH" = x; then
3989    if test "xbash" = x; then
3990      PROG_NAME=bash
3991    else
3992      PROG_NAME=bash
3993    fi
3994    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3995$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3996    as_fn_error $? "Cannot continue" "$LINENO" 5
3997  fi
3998
3999
4000
4001  for ac_prog in cat
4002do
4003  # Extract the first word of "$ac_prog", so it can be a program name with args.
4004set dummy $ac_prog; ac_word=$2
4005{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4006$as_echo_n "checking for $ac_word... " >&6; }
4007if ${ac_cv_path_CAT+:} false; then :
4008  $as_echo_n "(cached) " >&6
4009else
4010  case $CAT in
4011  [\\/]* | ?:[\\/]*)
4012  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4013  ;;
4014  *)
4015  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4016for as_dir in $PATH
4017do
4018  IFS=$as_save_IFS
4019  test -z "$as_dir" && as_dir=.
4020    for ac_exec_ext in '' $ac_executable_extensions; do
4021  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4022    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4023    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4024    break 2
4025  fi
4026done
4027  done
4028IFS=$as_save_IFS
4029
4030  ;;
4031esac
4032fi
4033CAT=$ac_cv_path_CAT
4034if test -n "$CAT"; then
4035  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4036$as_echo "$CAT" >&6; }
4037else
4038  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4039$as_echo "no" >&6; }
4040fi
4041
4042
4043  test -n "$CAT" && break
4044done
4045
4046
4047  if test "x$CAT" = x; then
4048    if test "xcat" = x; then
4049      PROG_NAME=cat
4050    else
4051      PROG_NAME=cat
4052    fi
4053    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4054$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4055    as_fn_error $? "Cannot continue" "$LINENO" 5
4056  fi
4057
4058
4059
4060  for ac_prog in chmod
4061do
4062  # Extract the first word of "$ac_prog", so it can be a program name with args.
4063set dummy $ac_prog; ac_word=$2
4064{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4065$as_echo_n "checking for $ac_word... " >&6; }
4066if ${ac_cv_path_CHMOD+:} false; then :
4067  $as_echo_n "(cached) " >&6
4068else
4069  case $CHMOD in
4070  [\\/]* | ?:[\\/]*)
4071  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
4072  ;;
4073  *)
4074  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4075for as_dir in $PATH
4076do
4077  IFS=$as_save_IFS
4078  test -z "$as_dir" && as_dir=.
4079    for ac_exec_ext in '' $ac_executable_extensions; do
4080  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4081    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
4082    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4083    break 2
4084  fi
4085done
4086  done
4087IFS=$as_save_IFS
4088
4089  ;;
4090esac
4091fi
4092CHMOD=$ac_cv_path_CHMOD
4093if test -n "$CHMOD"; then
4094  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
4095$as_echo "$CHMOD" >&6; }
4096else
4097  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4098$as_echo "no" >&6; }
4099fi
4100
4101
4102  test -n "$CHMOD" && break
4103done
4104
4105
4106  if test "x$CHMOD" = x; then
4107    if test "xchmod" = x; then
4108      PROG_NAME=chmod
4109    else
4110      PROG_NAME=chmod
4111    fi
4112    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4113$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4114    as_fn_error $? "Cannot continue" "$LINENO" 5
4115  fi
4116
4117
4118
4119  for ac_prog in cmp
4120do
4121  # Extract the first word of "$ac_prog", so it can be a program name with args.
4122set dummy $ac_prog; ac_word=$2
4123{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4124$as_echo_n "checking for $ac_word... " >&6; }
4125if ${ac_cv_path_CMP+:} false; then :
4126  $as_echo_n "(cached) " >&6
4127else
4128  case $CMP in
4129  [\\/]* | ?:[\\/]*)
4130  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
4131  ;;
4132  *)
4133  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4134for as_dir in $PATH
4135do
4136  IFS=$as_save_IFS
4137  test -z "$as_dir" && as_dir=.
4138    for ac_exec_ext in '' $ac_executable_extensions; do
4139  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4140    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
4141    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4142    break 2
4143  fi
4144done
4145  done
4146IFS=$as_save_IFS
4147
4148  ;;
4149esac
4150fi
4151CMP=$ac_cv_path_CMP
4152if test -n "$CMP"; then
4153  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
4154$as_echo "$CMP" >&6; }
4155else
4156  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4157$as_echo "no" >&6; }
4158fi
4159
4160
4161  test -n "$CMP" && break
4162done
4163
4164
4165  if test "x$CMP" = x; then
4166    if test "xcmp" = x; then
4167      PROG_NAME=cmp
4168    else
4169      PROG_NAME=cmp
4170    fi
4171    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4172$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4173    as_fn_error $? "Cannot continue" "$LINENO" 5
4174  fi
4175
4176
4177
4178  for ac_prog in comm
4179do
4180  # Extract the first word of "$ac_prog", so it can be a program name with args.
4181set dummy $ac_prog; ac_word=$2
4182{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4183$as_echo_n "checking for $ac_word... " >&6; }
4184if ${ac_cv_path_COMM+:} false; then :
4185  $as_echo_n "(cached) " >&6
4186else
4187  case $COMM in
4188  [\\/]* | ?:[\\/]*)
4189  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
4190  ;;
4191  *)
4192  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4193for as_dir in $PATH
4194do
4195  IFS=$as_save_IFS
4196  test -z "$as_dir" && as_dir=.
4197    for ac_exec_ext in '' $ac_executable_extensions; do
4198  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4199    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
4200    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4201    break 2
4202  fi
4203done
4204  done
4205IFS=$as_save_IFS
4206
4207  ;;
4208esac
4209fi
4210COMM=$ac_cv_path_COMM
4211if test -n "$COMM"; then
4212  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
4213$as_echo "$COMM" >&6; }
4214else
4215  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4216$as_echo "no" >&6; }
4217fi
4218
4219
4220  test -n "$COMM" && break
4221done
4222
4223
4224  if test "x$COMM" = x; then
4225    if test "xcomm" = x; then
4226      PROG_NAME=comm
4227    else
4228      PROG_NAME=comm
4229    fi
4230    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4231$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4232    as_fn_error $? "Cannot continue" "$LINENO" 5
4233  fi
4234
4235
4236
4237  for ac_prog in cp
4238do
4239  # Extract the first word of "$ac_prog", so it can be a program name with args.
4240set dummy $ac_prog; ac_word=$2
4241{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4242$as_echo_n "checking for $ac_word... " >&6; }
4243if ${ac_cv_path_CP+:} false; then :
4244  $as_echo_n "(cached) " >&6
4245else
4246  case $CP in
4247  [\\/]* | ?:[\\/]*)
4248  ac_cv_path_CP="$CP" # Let the user override the test with a path.
4249  ;;
4250  *)
4251  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4252for as_dir in $PATH
4253do
4254  IFS=$as_save_IFS
4255  test -z "$as_dir" && as_dir=.
4256    for ac_exec_ext in '' $ac_executable_extensions; do
4257  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4258    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
4259    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4260    break 2
4261  fi
4262done
4263  done
4264IFS=$as_save_IFS
4265
4266  ;;
4267esac
4268fi
4269CP=$ac_cv_path_CP
4270if test -n "$CP"; then
4271  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
4272$as_echo "$CP" >&6; }
4273else
4274  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4275$as_echo "no" >&6; }
4276fi
4277
4278
4279  test -n "$CP" && break
4280done
4281
4282
4283  if test "x$CP" = x; then
4284    if test "xcp" = x; then
4285      PROG_NAME=cp
4286    else
4287      PROG_NAME=cp
4288    fi
4289    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4290$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4291    as_fn_error $? "Cannot continue" "$LINENO" 5
4292  fi
4293
4294
4295
4296  for ac_prog in cpio
4297do
4298  # Extract the first word of "$ac_prog", so it can be a program name with args.
4299set dummy $ac_prog; ac_word=$2
4300{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4301$as_echo_n "checking for $ac_word... " >&6; }
4302if ${ac_cv_path_CPIO+:} false; then :
4303  $as_echo_n "(cached) " >&6
4304else
4305  case $CPIO in
4306  [\\/]* | ?:[\\/]*)
4307  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
4308  ;;
4309  *)
4310  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4311for as_dir in $PATH
4312do
4313  IFS=$as_save_IFS
4314  test -z "$as_dir" && as_dir=.
4315    for ac_exec_ext in '' $ac_executable_extensions; do
4316  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4317    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
4318    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4319    break 2
4320  fi
4321done
4322  done
4323IFS=$as_save_IFS
4324
4325  ;;
4326esac
4327fi
4328CPIO=$ac_cv_path_CPIO
4329if test -n "$CPIO"; then
4330  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
4331$as_echo "$CPIO" >&6; }
4332else
4333  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4334$as_echo "no" >&6; }
4335fi
4336
4337
4338  test -n "$CPIO" && break
4339done
4340
4341
4342  if test "x$CPIO" = x; then
4343    if test "xcpio" = x; then
4344      PROG_NAME=cpio
4345    else
4346      PROG_NAME=cpio
4347    fi
4348    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4349$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4350    as_fn_error $? "Cannot continue" "$LINENO" 5
4351  fi
4352
4353
4354
4355  for ac_prog in cut
4356do
4357  # Extract the first word of "$ac_prog", so it can be a program name with args.
4358set dummy $ac_prog; ac_word=$2
4359{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4360$as_echo_n "checking for $ac_word... " >&6; }
4361if ${ac_cv_path_CUT+:} false; then :
4362  $as_echo_n "(cached) " >&6
4363else
4364  case $CUT in
4365  [\\/]* | ?:[\\/]*)
4366  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
4367  ;;
4368  *)
4369  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4370for as_dir in $PATH
4371do
4372  IFS=$as_save_IFS
4373  test -z "$as_dir" && as_dir=.
4374    for ac_exec_ext in '' $ac_executable_extensions; do
4375  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4376    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
4377    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4378    break 2
4379  fi
4380done
4381  done
4382IFS=$as_save_IFS
4383
4384  ;;
4385esac
4386fi
4387CUT=$ac_cv_path_CUT
4388if test -n "$CUT"; then
4389  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
4390$as_echo "$CUT" >&6; }
4391else
4392  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4393$as_echo "no" >&6; }
4394fi
4395
4396
4397  test -n "$CUT" && break
4398done
4399
4400
4401  if test "x$CUT" = x; then
4402    if test "xcut" = x; then
4403      PROG_NAME=cut
4404    else
4405      PROG_NAME=cut
4406    fi
4407    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4408$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4409    as_fn_error $? "Cannot continue" "$LINENO" 5
4410  fi
4411
4412
4413
4414  for ac_prog in date
4415do
4416  # Extract the first word of "$ac_prog", so it can be a program name with args.
4417set dummy $ac_prog; ac_word=$2
4418{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4419$as_echo_n "checking for $ac_word... " >&6; }
4420if ${ac_cv_path_DATE+:} false; then :
4421  $as_echo_n "(cached) " >&6
4422else
4423  case $DATE in
4424  [\\/]* | ?:[\\/]*)
4425  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
4426  ;;
4427  *)
4428  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4429for as_dir in $PATH
4430do
4431  IFS=$as_save_IFS
4432  test -z "$as_dir" && as_dir=.
4433    for ac_exec_ext in '' $ac_executable_extensions; do
4434  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4435    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
4436    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4437    break 2
4438  fi
4439done
4440  done
4441IFS=$as_save_IFS
4442
4443  ;;
4444esac
4445fi
4446DATE=$ac_cv_path_DATE
4447if test -n "$DATE"; then
4448  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
4449$as_echo "$DATE" >&6; }
4450else
4451  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4452$as_echo "no" >&6; }
4453fi
4454
4455
4456  test -n "$DATE" && break
4457done
4458
4459
4460  if test "x$DATE" = x; then
4461    if test "xdate" = x; then
4462      PROG_NAME=date
4463    else
4464      PROG_NAME=date
4465    fi
4466    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4467$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4468    as_fn_error $? "Cannot continue" "$LINENO" 5
4469  fi
4470
4471
4472
4473  for ac_prog in gdiff diff
4474do
4475  # Extract the first word of "$ac_prog", so it can be a program name with args.
4476set dummy $ac_prog; ac_word=$2
4477{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4478$as_echo_n "checking for $ac_word... " >&6; }
4479if ${ac_cv_path_DIFF+:} false; then :
4480  $as_echo_n "(cached) " >&6
4481else
4482  case $DIFF in
4483  [\\/]* | ?:[\\/]*)
4484  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
4485  ;;
4486  *)
4487  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4488for as_dir in $PATH
4489do
4490  IFS=$as_save_IFS
4491  test -z "$as_dir" && as_dir=.
4492    for ac_exec_ext in '' $ac_executable_extensions; do
4493  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4494    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
4495    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4496    break 2
4497  fi
4498done
4499  done
4500IFS=$as_save_IFS
4501
4502  ;;
4503esac
4504fi
4505DIFF=$ac_cv_path_DIFF
4506if test -n "$DIFF"; then
4507  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
4508$as_echo "$DIFF" >&6; }
4509else
4510  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4511$as_echo "no" >&6; }
4512fi
4513
4514
4515  test -n "$DIFF" && break
4516done
4517
4518
4519  if test "x$DIFF" = x; then
4520    if test "xgdiff diff" = x; then
4521      PROG_NAME=diff
4522    else
4523      PROG_NAME=gdiff diff
4524    fi
4525    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4526$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4527    as_fn_error $? "Cannot continue" "$LINENO" 5
4528  fi
4529
4530
4531
4532  for ac_prog in dirname
4533do
4534  # Extract the first word of "$ac_prog", so it can be a program name with args.
4535set dummy $ac_prog; ac_word=$2
4536{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4537$as_echo_n "checking for $ac_word... " >&6; }
4538if ${ac_cv_path_DIRNAME+:} false; then :
4539  $as_echo_n "(cached) " >&6
4540else
4541  case $DIRNAME in
4542  [\\/]* | ?:[\\/]*)
4543  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
4544  ;;
4545  *)
4546  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4547for as_dir in $PATH
4548do
4549  IFS=$as_save_IFS
4550  test -z "$as_dir" && as_dir=.
4551    for ac_exec_ext in '' $ac_executable_extensions; do
4552  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4553    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
4554    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4555    break 2
4556  fi
4557done
4558  done
4559IFS=$as_save_IFS
4560
4561  ;;
4562esac
4563fi
4564DIRNAME=$ac_cv_path_DIRNAME
4565if test -n "$DIRNAME"; then
4566  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
4567$as_echo "$DIRNAME" >&6; }
4568else
4569  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4570$as_echo "no" >&6; }
4571fi
4572
4573
4574  test -n "$DIRNAME" && break
4575done
4576
4577
4578  if test "x$DIRNAME" = x; then
4579    if test "xdirname" = x; then
4580      PROG_NAME=dirname
4581    else
4582      PROG_NAME=dirname
4583    fi
4584    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4585$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4586    as_fn_error $? "Cannot continue" "$LINENO" 5
4587  fi
4588
4589
4590
4591  for ac_prog in echo
4592do
4593  # Extract the first word of "$ac_prog", so it can be a program name with args.
4594set dummy $ac_prog; ac_word=$2
4595{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4596$as_echo_n "checking for $ac_word... " >&6; }
4597if ${ac_cv_path_ECHO+:} false; then :
4598  $as_echo_n "(cached) " >&6
4599else
4600  case $ECHO in
4601  [\\/]* | ?:[\\/]*)
4602  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
4603  ;;
4604  *)
4605  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4606for as_dir in $PATH
4607do
4608  IFS=$as_save_IFS
4609  test -z "$as_dir" && as_dir=.
4610    for ac_exec_ext in '' $ac_executable_extensions; do
4611  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4612    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
4613    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4614    break 2
4615  fi
4616done
4617  done
4618IFS=$as_save_IFS
4619
4620  ;;
4621esac
4622fi
4623ECHO=$ac_cv_path_ECHO
4624if test -n "$ECHO"; then
4625  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
4626$as_echo "$ECHO" >&6; }
4627else
4628  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4629$as_echo "no" >&6; }
4630fi
4631
4632
4633  test -n "$ECHO" && break
4634done
4635
4636
4637  if test "x$ECHO" = x; then
4638    if test "xecho" = x; then
4639      PROG_NAME=echo
4640    else
4641      PROG_NAME=echo
4642    fi
4643    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4644$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4645    as_fn_error $? "Cannot continue" "$LINENO" 5
4646  fi
4647
4648
4649
4650  for ac_prog in expr
4651do
4652  # Extract the first word of "$ac_prog", so it can be a program name with args.
4653set dummy $ac_prog; ac_word=$2
4654{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4655$as_echo_n "checking for $ac_word... " >&6; }
4656if ${ac_cv_path_EXPR+:} false; then :
4657  $as_echo_n "(cached) " >&6
4658else
4659  case $EXPR in
4660  [\\/]* | ?:[\\/]*)
4661  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
4662  ;;
4663  *)
4664  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4665for as_dir in $PATH
4666do
4667  IFS=$as_save_IFS
4668  test -z "$as_dir" && as_dir=.
4669    for ac_exec_ext in '' $ac_executable_extensions; do
4670  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4671    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
4672    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4673    break 2
4674  fi
4675done
4676  done
4677IFS=$as_save_IFS
4678
4679  ;;
4680esac
4681fi
4682EXPR=$ac_cv_path_EXPR
4683if test -n "$EXPR"; then
4684  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
4685$as_echo "$EXPR" >&6; }
4686else
4687  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4688$as_echo "no" >&6; }
4689fi
4690
4691
4692  test -n "$EXPR" && break
4693done
4694
4695
4696  if test "x$EXPR" = x; then
4697    if test "xexpr" = x; then
4698      PROG_NAME=expr
4699    else
4700      PROG_NAME=expr
4701    fi
4702    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4703$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4704    as_fn_error $? "Cannot continue" "$LINENO" 5
4705  fi
4706
4707
4708
4709  for ac_prog in file
4710do
4711  # Extract the first word of "$ac_prog", so it can be a program name with args.
4712set dummy $ac_prog; ac_word=$2
4713{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4714$as_echo_n "checking for $ac_word... " >&6; }
4715if ${ac_cv_path_FILE+:} false; then :
4716  $as_echo_n "(cached) " >&6
4717else
4718  case $FILE in
4719  [\\/]* | ?:[\\/]*)
4720  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
4721  ;;
4722  *)
4723  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4724for as_dir in $PATH
4725do
4726  IFS=$as_save_IFS
4727  test -z "$as_dir" && as_dir=.
4728    for ac_exec_ext in '' $ac_executable_extensions; do
4729  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4730    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
4731    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4732    break 2
4733  fi
4734done
4735  done
4736IFS=$as_save_IFS
4737
4738  ;;
4739esac
4740fi
4741FILE=$ac_cv_path_FILE
4742if test -n "$FILE"; then
4743  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
4744$as_echo "$FILE" >&6; }
4745else
4746  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4747$as_echo "no" >&6; }
4748fi
4749
4750
4751  test -n "$FILE" && break
4752done
4753
4754
4755  if test "x$FILE" = x; then
4756    if test "xfile" = x; then
4757      PROG_NAME=file
4758    else
4759      PROG_NAME=file
4760    fi
4761    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4762$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4763    as_fn_error $? "Cannot continue" "$LINENO" 5
4764  fi
4765
4766
4767
4768  for ac_prog in find
4769do
4770  # Extract the first word of "$ac_prog", so it can be a program name with args.
4771set dummy $ac_prog; ac_word=$2
4772{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4773$as_echo_n "checking for $ac_word... " >&6; }
4774if ${ac_cv_path_FIND+:} false; then :
4775  $as_echo_n "(cached) " >&6
4776else
4777  case $FIND in
4778  [\\/]* | ?:[\\/]*)
4779  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
4780  ;;
4781  *)
4782  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4783for as_dir in $PATH
4784do
4785  IFS=$as_save_IFS
4786  test -z "$as_dir" && as_dir=.
4787    for ac_exec_ext in '' $ac_executable_extensions; do
4788  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4789    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
4790    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4791    break 2
4792  fi
4793done
4794  done
4795IFS=$as_save_IFS
4796
4797  ;;
4798esac
4799fi
4800FIND=$ac_cv_path_FIND
4801if test -n "$FIND"; then
4802  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
4803$as_echo "$FIND" >&6; }
4804else
4805  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4806$as_echo "no" >&6; }
4807fi
4808
4809
4810  test -n "$FIND" && break
4811done
4812
4813
4814  if test "x$FIND" = x; then
4815    if test "xfind" = x; then
4816      PROG_NAME=find
4817    else
4818      PROG_NAME=find
4819    fi
4820    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4821$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4822    as_fn_error $? "Cannot continue" "$LINENO" 5
4823  fi
4824
4825
4826
4827  for ac_prog in head
4828do
4829  # Extract the first word of "$ac_prog", so it can be a program name with args.
4830set dummy $ac_prog; ac_word=$2
4831{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4832$as_echo_n "checking for $ac_word... " >&6; }
4833if ${ac_cv_path_HEAD+:} false; then :
4834  $as_echo_n "(cached) " >&6
4835else
4836  case $HEAD in
4837  [\\/]* | ?:[\\/]*)
4838  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
4839  ;;
4840  *)
4841  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4842for as_dir in $PATH
4843do
4844  IFS=$as_save_IFS
4845  test -z "$as_dir" && as_dir=.
4846    for ac_exec_ext in '' $ac_executable_extensions; do
4847  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4848    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
4849    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4850    break 2
4851  fi
4852done
4853  done
4854IFS=$as_save_IFS
4855
4856  ;;
4857esac
4858fi
4859HEAD=$ac_cv_path_HEAD
4860if test -n "$HEAD"; then
4861  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
4862$as_echo "$HEAD" >&6; }
4863else
4864  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4865$as_echo "no" >&6; }
4866fi
4867
4868
4869  test -n "$HEAD" && break
4870done
4871
4872
4873  if test "x$HEAD" = x; then
4874    if test "xhead" = x; then
4875      PROG_NAME=head
4876    else
4877      PROG_NAME=head
4878    fi
4879    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4880$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4881    as_fn_error $? "Cannot continue" "$LINENO" 5
4882  fi
4883
4884
4885
4886  for ac_prog in ln
4887do
4888  # Extract the first word of "$ac_prog", so it can be a program name with args.
4889set dummy $ac_prog; ac_word=$2
4890{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4891$as_echo_n "checking for $ac_word... " >&6; }
4892if ${ac_cv_path_LN+:} false; then :
4893  $as_echo_n "(cached) " >&6
4894else
4895  case $LN in
4896  [\\/]* | ?:[\\/]*)
4897  ac_cv_path_LN="$LN" # Let the user override the test with a path.
4898  ;;
4899  *)
4900  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4901for as_dir in $PATH
4902do
4903  IFS=$as_save_IFS
4904  test -z "$as_dir" && as_dir=.
4905    for ac_exec_ext in '' $ac_executable_extensions; do
4906  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4907    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
4908    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4909    break 2
4910  fi
4911done
4912  done
4913IFS=$as_save_IFS
4914
4915  ;;
4916esac
4917fi
4918LN=$ac_cv_path_LN
4919if test -n "$LN"; then
4920  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
4921$as_echo "$LN" >&6; }
4922else
4923  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4924$as_echo "no" >&6; }
4925fi
4926
4927
4928  test -n "$LN" && break
4929done
4930
4931
4932  if test "x$LN" = x; then
4933    if test "xln" = x; then
4934      PROG_NAME=ln
4935    else
4936      PROG_NAME=ln
4937    fi
4938    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4939$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4940    as_fn_error $? "Cannot continue" "$LINENO" 5
4941  fi
4942
4943
4944
4945  for ac_prog in ls
4946do
4947  # Extract the first word of "$ac_prog", so it can be a program name with args.
4948set dummy $ac_prog; ac_word=$2
4949{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4950$as_echo_n "checking for $ac_word... " >&6; }
4951if ${ac_cv_path_LS+:} false; then :
4952  $as_echo_n "(cached) " >&6
4953else
4954  case $LS in
4955  [\\/]* | ?:[\\/]*)
4956  ac_cv_path_LS="$LS" # Let the user override the test with a path.
4957  ;;
4958  *)
4959  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4960for as_dir in $PATH
4961do
4962  IFS=$as_save_IFS
4963  test -z "$as_dir" && as_dir=.
4964    for ac_exec_ext in '' $ac_executable_extensions; do
4965  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4966    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
4967    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4968    break 2
4969  fi
4970done
4971  done
4972IFS=$as_save_IFS
4973
4974  ;;
4975esac
4976fi
4977LS=$ac_cv_path_LS
4978if test -n "$LS"; then
4979  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
4980$as_echo "$LS" >&6; }
4981else
4982  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4983$as_echo "no" >&6; }
4984fi
4985
4986
4987  test -n "$LS" && break
4988done
4989
4990
4991  if test "x$LS" = x; then
4992    if test "xls" = x; then
4993      PROG_NAME=ls
4994    else
4995      PROG_NAME=ls
4996    fi
4997    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4998$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4999    as_fn_error $? "Cannot continue" "$LINENO" 5
5000  fi
5001
5002
5003
5004  for ac_prog in mkdir
5005do
5006  # Extract the first word of "$ac_prog", so it can be a program name with args.
5007set dummy $ac_prog; ac_word=$2
5008{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5009$as_echo_n "checking for $ac_word... " >&6; }
5010if ${ac_cv_path_MKDIR+:} false; then :
5011  $as_echo_n "(cached) " >&6
5012else
5013  case $MKDIR in
5014  [\\/]* | ?:[\\/]*)
5015  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
5016  ;;
5017  *)
5018  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5019for as_dir in $PATH
5020do
5021  IFS=$as_save_IFS
5022  test -z "$as_dir" && as_dir=.
5023    for ac_exec_ext in '' $ac_executable_extensions; do
5024  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5025    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
5026    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5027    break 2
5028  fi
5029done
5030  done
5031IFS=$as_save_IFS
5032
5033  ;;
5034esac
5035fi
5036MKDIR=$ac_cv_path_MKDIR
5037if test -n "$MKDIR"; then
5038  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
5039$as_echo "$MKDIR" >&6; }
5040else
5041  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5042$as_echo "no" >&6; }
5043fi
5044
5045
5046  test -n "$MKDIR" && break
5047done
5048
5049
5050  if test "x$MKDIR" = x; then
5051    if test "xmkdir" = x; then
5052      PROG_NAME=mkdir
5053    else
5054      PROG_NAME=mkdir
5055    fi
5056    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5057$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5058    as_fn_error $? "Cannot continue" "$LINENO" 5
5059  fi
5060
5061
5062
5063  for ac_prog in mktemp
5064do
5065  # Extract the first word of "$ac_prog", so it can be a program name with args.
5066set dummy $ac_prog; ac_word=$2
5067{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5068$as_echo_n "checking for $ac_word... " >&6; }
5069if ${ac_cv_path_MKTEMP+:} false; then :
5070  $as_echo_n "(cached) " >&6
5071else
5072  case $MKTEMP in
5073  [\\/]* | ?:[\\/]*)
5074  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
5075  ;;
5076  *)
5077  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5078for as_dir in $PATH
5079do
5080  IFS=$as_save_IFS
5081  test -z "$as_dir" && as_dir=.
5082    for ac_exec_ext in '' $ac_executable_extensions; do
5083  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5084    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
5085    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5086    break 2
5087  fi
5088done
5089  done
5090IFS=$as_save_IFS
5091
5092  ;;
5093esac
5094fi
5095MKTEMP=$ac_cv_path_MKTEMP
5096if test -n "$MKTEMP"; then
5097  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
5098$as_echo "$MKTEMP" >&6; }
5099else
5100  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5101$as_echo "no" >&6; }
5102fi
5103
5104
5105  test -n "$MKTEMP" && break
5106done
5107
5108
5109  if test "x$MKTEMP" = x; then
5110    if test "xmktemp" = x; then
5111      PROG_NAME=mktemp
5112    else
5113      PROG_NAME=mktemp
5114    fi
5115    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5116$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5117    as_fn_error $? "Cannot continue" "$LINENO" 5
5118  fi
5119
5120
5121
5122  for ac_prog in mv
5123do
5124  # Extract the first word of "$ac_prog", so it can be a program name with args.
5125set dummy $ac_prog; ac_word=$2
5126{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5127$as_echo_n "checking for $ac_word... " >&6; }
5128if ${ac_cv_path_MV+:} false; then :
5129  $as_echo_n "(cached) " >&6
5130else
5131  case $MV in
5132  [\\/]* | ?:[\\/]*)
5133  ac_cv_path_MV="$MV" # Let the user override the test with a path.
5134  ;;
5135  *)
5136  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5137for as_dir in $PATH
5138do
5139  IFS=$as_save_IFS
5140  test -z "$as_dir" && as_dir=.
5141    for ac_exec_ext in '' $ac_executable_extensions; do
5142  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5143    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
5144    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5145    break 2
5146  fi
5147done
5148  done
5149IFS=$as_save_IFS
5150
5151  ;;
5152esac
5153fi
5154MV=$ac_cv_path_MV
5155if test -n "$MV"; then
5156  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
5157$as_echo "$MV" >&6; }
5158else
5159  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5160$as_echo "no" >&6; }
5161fi
5162
5163
5164  test -n "$MV" && break
5165done
5166
5167
5168  if test "x$MV" = x; then
5169    if test "xmv" = x; then
5170      PROG_NAME=mv
5171    else
5172      PROG_NAME=mv
5173    fi
5174    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5175$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5176    as_fn_error $? "Cannot continue" "$LINENO" 5
5177  fi
5178
5179
5180
5181  for ac_prog in printf
5182do
5183  # Extract the first word of "$ac_prog", so it can be a program name with args.
5184set dummy $ac_prog; ac_word=$2
5185{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5186$as_echo_n "checking for $ac_word... " >&6; }
5187if ${ac_cv_path_PRINTF+:} false; then :
5188  $as_echo_n "(cached) " >&6
5189else
5190  case $PRINTF in
5191  [\\/]* | ?:[\\/]*)
5192  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
5193  ;;
5194  *)
5195  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5196for as_dir in $PATH
5197do
5198  IFS=$as_save_IFS
5199  test -z "$as_dir" && as_dir=.
5200    for ac_exec_ext in '' $ac_executable_extensions; do
5201  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5202    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
5203    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5204    break 2
5205  fi
5206done
5207  done
5208IFS=$as_save_IFS
5209
5210  ;;
5211esac
5212fi
5213PRINTF=$ac_cv_path_PRINTF
5214if test -n "$PRINTF"; then
5215  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
5216$as_echo "$PRINTF" >&6; }
5217else
5218  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5219$as_echo "no" >&6; }
5220fi
5221
5222
5223  test -n "$PRINTF" && break
5224done
5225
5226
5227  if test "x$PRINTF" = x; then
5228    if test "xprintf" = x; then
5229      PROG_NAME=printf
5230    else
5231      PROG_NAME=printf
5232    fi
5233    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5234$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5235    as_fn_error $? "Cannot continue" "$LINENO" 5
5236  fi
5237
5238
5239
5240  for ac_prog in rm
5241do
5242  # Extract the first word of "$ac_prog", so it can be a program name with args.
5243set dummy $ac_prog; ac_word=$2
5244{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5245$as_echo_n "checking for $ac_word... " >&6; }
5246if ${ac_cv_path_RM+:} false; then :
5247  $as_echo_n "(cached) " >&6
5248else
5249  case $RM in
5250  [\\/]* | ?:[\\/]*)
5251  ac_cv_path_RM="$RM" # Let the user override the test with a path.
5252  ;;
5253  *)
5254  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5255for as_dir in $PATH
5256do
5257  IFS=$as_save_IFS
5258  test -z "$as_dir" && as_dir=.
5259    for ac_exec_ext in '' $ac_executable_extensions; do
5260  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5261    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
5262    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5263    break 2
5264  fi
5265done
5266  done
5267IFS=$as_save_IFS
5268
5269  ;;
5270esac
5271fi
5272RM=$ac_cv_path_RM
5273if test -n "$RM"; then
5274  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
5275$as_echo "$RM" >&6; }
5276else
5277  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5278$as_echo "no" >&6; }
5279fi
5280
5281
5282  test -n "$RM" && break
5283done
5284
5285
5286  if test "x$RM" = x; then
5287    if test "xrm" = x; then
5288      PROG_NAME=rm
5289    else
5290      PROG_NAME=rm
5291    fi
5292    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5293$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5294    as_fn_error $? "Cannot continue" "$LINENO" 5
5295  fi
5296
5297
5298
5299  for ac_prog in sh
5300do
5301  # Extract the first word of "$ac_prog", so it can be a program name with args.
5302set dummy $ac_prog; ac_word=$2
5303{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5304$as_echo_n "checking for $ac_word... " >&6; }
5305if ${ac_cv_path_SH+:} false; then :
5306  $as_echo_n "(cached) " >&6
5307else
5308  case $SH in
5309  [\\/]* | ?:[\\/]*)
5310  ac_cv_path_SH="$SH" # Let the user override the test with a path.
5311  ;;
5312  *)
5313  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5314for as_dir in $PATH
5315do
5316  IFS=$as_save_IFS
5317  test -z "$as_dir" && as_dir=.
5318    for ac_exec_ext in '' $ac_executable_extensions; do
5319  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5320    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
5321    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5322    break 2
5323  fi
5324done
5325  done
5326IFS=$as_save_IFS
5327
5328  ;;
5329esac
5330fi
5331SH=$ac_cv_path_SH
5332if test -n "$SH"; then
5333  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
5334$as_echo "$SH" >&6; }
5335else
5336  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5337$as_echo "no" >&6; }
5338fi
5339
5340
5341  test -n "$SH" && break
5342done
5343
5344
5345  if test "x$SH" = x; then
5346    if test "xsh" = x; then
5347      PROG_NAME=sh
5348    else
5349      PROG_NAME=sh
5350    fi
5351    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5352$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5353    as_fn_error $? "Cannot continue" "$LINENO" 5
5354  fi
5355
5356
5357
5358  for ac_prog in sort
5359do
5360  # Extract the first word of "$ac_prog", so it can be a program name with args.
5361set dummy $ac_prog; ac_word=$2
5362{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5363$as_echo_n "checking for $ac_word... " >&6; }
5364if ${ac_cv_path_SORT+:} false; then :
5365  $as_echo_n "(cached) " >&6
5366else
5367  case $SORT in
5368  [\\/]* | ?:[\\/]*)
5369  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
5370  ;;
5371  *)
5372  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5373for as_dir in $PATH
5374do
5375  IFS=$as_save_IFS
5376  test -z "$as_dir" && as_dir=.
5377    for ac_exec_ext in '' $ac_executable_extensions; do
5378  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5379    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
5380    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5381    break 2
5382  fi
5383done
5384  done
5385IFS=$as_save_IFS
5386
5387  ;;
5388esac
5389fi
5390SORT=$ac_cv_path_SORT
5391if test -n "$SORT"; then
5392  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
5393$as_echo "$SORT" >&6; }
5394else
5395  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5396$as_echo "no" >&6; }
5397fi
5398
5399
5400  test -n "$SORT" && break
5401done
5402
5403
5404  if test "x$SORT" = x; then
5405    if test "xsort" = x; then
5406      PROG_NAME=sort
5407    else
5408      PROG_NAME=sort
5409    fi
5410    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5411$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5412    as_fn_error $? "Cannot continue" "$LINENO" 5
5413  fi
5414
5415
5416
5417  for ac_prog in tail
5418do
5419  # Extract the first word of "$ac_prog", so it can be a program name with args.
5420set dummy $ac_prog; ac_word=$2
5421{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5422$as_echo_n "checking for $ac_word... " >&6; }
5423if ${ac_cv_path_TAIL+:} false; then :
5424  $as_echo_n "(cached) " >&6
5425else
5426  case $TAIL in
5427  [\\/]* | ?:[\\/]*)
5428  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
5429  ;;
5430  *)
5431  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5432for as_dir in $PATH
5433do
5434  IFS=$as_save_IFS
5435  test -z "$as_dir" && as_dir=.
5436    for ac_exec_ext in '' $ac_executable_extensions; do
5437  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5438    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
5439    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5440    break 2
5441  fi
5442done
5443  done
5444IFS=$as_save_IFS
5445
5446  ;;
5447esac
5448fi
5449TAIL=$ac_cv_path_TAIL
5450if test -n "$TAIL"; then
5451  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
5452$as_echo "$TAIL" >&6; }
5453else
5454  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5455$as_echo "no" >&6; }
5456fi
5457
5458
5459  test -n "$TAIL" && break
5460done
5461
5462
5463  if test "x$TAIL" = x; then
5464    if test "xtail" = x; then
5465      PROG_NAME=tail
5466    else
5467      PROG_NAME=tail
5468    fi
5469    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5470$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5471    as_fn_error $? "Cannot continue" "$LINENO" 5
5472  fi
5473
5474
5475
5476  for ac_prog in tar
5477do
5478  # Extract the first word of "$ac_prog", so it can be a program name with args.
5479set dummy $ac_prog; ac_word=$2
5480{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5481$as_echo_n "checking for $ac_word... " >&6; }
5482if ${ac_cv_path_TAR+:} false; then :
5483  $as_echo_n "(cached) " >&6
5484else
5485  case $TAR in
5486  [\\/]* | ?:[\\/]*)
5487  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
5488  ;;
5489  *)
5490  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5491for as_dir in $PATH
5492do
5493  IFS=$as_save_IFS
5494  test -z "$as_dir" && as_dir=.
5495    for ac_exec_ext in '' $ac_executable_extensions; do
5496  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5497    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
5498    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5499    break 2
5500  fi
5501done
5502  done
5503IFS=$as_save_IFS
5504
5505  ;;
5506esac
5507fi
5508TAR=$ac_cv_path_TAR
5509if test -n "$TAR"; then
5510  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
5511$as_echo "$TAR" >&6; }
5512else
5513  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5514$as_echo "no" >&6; }
5515fi
5516
5517
5518  test -n "$TAR" && break
5519done
5520
5521
5522  if test "x$TAR" = x; then
5523    if test "xtar" = x; then
5524      PROG_NAME=tar
5525    else
5526      PROG_NAME=tar
5527    fi
5528    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5529$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5530    as_fn_error $? "Cannot continue" "$LINENO" 5
5531  fi
5532
5533
5534
5535  for ac_prog in tee
5536do
5537  # Extract the first word of "$ac_prog", so it can be a program name with args.
5538set dummy $ac_prog; ac_word=$2
5539{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5540$as_echo_n "checking for $ac_word... " >&6; }
5541if ${ac_cv_path_TEE+:} false; then :
5542  $as_echo_n "(cached) " >&6
5543else
5544  case $TEE in
5545  [\\/]* | ?:[\\/]*)
5546  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
5547  ;;
5548  *)
5549  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5550for as_dir in $PATH
5551do
5552  IFS=$as_save_IFS
5553  test -z "$as_dir" && as_dir=.
5554    for ac_exec_ext in '' $ac_executable_extensions; do
5555  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5556    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
5557    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5558    break 2
5559  fi
5560done
5561  done
5562IFS=$as_save_IFS
5563
5564  ;;
5565esac
5566fi
5567TEE=$ac_cv_path_TEE
5568if test -n "$TEE"; then
5569  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
5570$as_echo "$TEE" >&6; }
5571else
5572  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5573$as_echo "no" >&6; }
5574fi
5575
5576
5577  test -n "$TEE" && break
5578done
5579
5580
5581  if test "x$TEE" = x; then
5582    if test "xtee" = x; then
5583      PROG_NAME=tee
5584    else
5585      PROG_NAME=tee
5586    fi
5587    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5588$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5589    as_fn_error $? "Cannot continue" "$LINENO" 5
5590  fi
5591
5592
5593
5594  for ac_prog in touch
5595do
5596  # Extract the first word of "$ac_prog", so it can be a program name with args.
5597set dummy $ac_prog; ac_word=$2
5598{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5599$as_echo_n "checking for $ac_word... " >&6; }
5600if ${ac_cv_path_TOUCH+:} false; then :
5601  $as_echo_n "(cached) " >&6
5602else
5603  case $TOUCH in
5604  [\\/]* | ?:[\\/]*)
5605  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
5606  ;;
5607  *)
5608  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5609for as_dir in $PATH
5610do
5611  IFS=$as_save_IFS
5612  test -z "$as_dir" && as_dir=.
5613    for ac_exec_ext in '' $ac_executable_extensions; do
5614  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5615    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
5616    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5617    break 2
5618  fi
5619done
5620  done
5621IFS=$as_save_IFS
5622
5623  ;;
5624esac
5625fi
5626TOUCH=$ac_cv_path_TOUCH
5627if test -n "$TOUCH"; then
5628  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
5629$as_echo "$TOUCH" >&6; }
5630else
5631  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5632$as_echo "no" >&6; }
5633fi
5634
5635
5636  test -n "$TOUCH" && break
5637done
5638
5639
5640  if test "x$TOUCH" = x; then
5641    if test "xtouch" = x; then
5642      PROG_NAME=touch
5643    else
5644      PROG_NAME=touch
5645    fi
5646    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5647$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5648    as_fn_error $? "Cannot continue" "$LINENO" 5
5649  fi
5650
5651
5652
5653  for ac_prog in tr
5654do
5655  # Extract the first word of "$ac_prog", so it can be a program name with args.
5656set dummy $ac_prog; ac_word=$2
5657{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5658$as_echo_n "checking for $ac_word... " >&6; }
5659if ${ac_cv_path_TR+:} false; then :
5660  $as_echo_n "(cached) " >&6
5661else
5662  case $TR in
5663  [\\/]* | ?:[\\/]*)
5664  ac_cv_path_TR="$TR" # Let the user override the test with a path.
5665  ;;
5666  *)
5667  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5668for as_dir in $PATH
5669do
5670  IFS=$as_save_IFS
5671  test -z "$as_dir" && as_dir=.
5672    for ac_exec_ext in '' $ac_executable_extensions; do
5673  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5674    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
5675    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5676    break 2
5677  fi
5678done
5679  done
5680IFS=$as_save_IFS
5681
5682  ;;
5683esac
5684fi
5685TR=$ac_cv_path_TR
5686if test -n "$TR"; then
5687  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
5688$as_echo "$TR" >&6; }
5689else
5690  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5691$as_echo "no" >&6; }
5692fi
5693
5694
5695  test -n "$TR" && break
5696done
5697
5698
5699  if test "x$TR" = x; then
5700    if test "xtr" = x; then
5701      PROG_NAME=tr
5702    else
5703      PROG_NAME=tr
5704    fi
5705    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5706$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5707    as_fn_error $? "Cannot continue" "$LINENO" 5
5708  fi
5709
5710
5711
5712  for ac_prog in uname
5713do
5714  # Extract the first word of "$ac_prog", so it can be a program name with args.
5715set dummy $ac_prog; ac_word=$2
5716{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5717$as_echo_n "checking for $ac_word... " >&6; }
5718if ${ac_cv_path_UNAME+:} false; then :
5719  $as_echo_n "(cached) " >&6
5720else
5721  case $UNAME in
5722  [\\/]* | ?:[\\/]*)
5723  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
5724  ;;
5725  *)
5726  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5727for as_dir in $PATH
5728do
5729  IFS=$as_save_IFS
5730  test -z "$as_dir" && as_dir=.
5731    for ac_exec_ext in '' $ac_executable_extensions; do
5732  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5733    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
5734    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5735    break 2
5736  fi
5737done
5738  done
5739IFS=$as_save_IFS
5740
5741  ;;
5742esac
5743fi
5744UNAME=$ac_cv_path_UNAME
5745if test -n "$UNAME"; then
5746  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
5747$as_echo "$UNAME" >&6; }
5748else
5749  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5750$as_echo "no" >&6; }
5751fi
5752
5753
5754  test -n "$UNAME" && break
5755done
5756
5757
5758  if test "x$UNAME" = x; then
5759    if test "xuname" = x; then
5760      PROG_NAME=uname
5761    else
5762      PROG_NAME=uname
5763    fi
5764    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5765$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5766    as_fn_error $? "Cannot continue" "$LINENO" 5
5767  fi
5768
5769
5770
5771  for ac_prog in uniq
5772do
5773  # Extract the first word of "$ac_prog", so it can be a program name with args.
5774set dummy $ac_prog; ac_word=$2
5775{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5776$as_echo_n "checking for $ac_word... " >&6; }
5777if ${ac_cv_path_UNIQ+:} false; then :
5778  $as_echo_n "(cached) " >&6
5779else
5780  case $UNIQ in
5781  [\\/]* | ?:[\\/]*)
5782  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
5783  ;;
5784  *)
5785  as_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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5792    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
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
5800  ;;
5801esac
5802fi
5803UNIQ=$ac_cv_path_UNIQ
5804if test -n "$UNIQ"; then
5805  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
5806$as_echo "$UNIQ" >&6; }
5807else
5808  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5809$as_echo "no" >&6; }
5810fi
5811
5812
5813  test -n "$UNIQ" && break
5814done
5815
5816
5817  if test "x$UNIQ" = x; then
5818    if test "xuniq" = x; then
5819      PROG_NAME=uniq
5820    else
5821      PROG_NAME=uniq
5822    fi
5823    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5824$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5825    as_fn_error $? "Cannot continue" "$LINENO" 5
5826  fi
5827
5828
5829
5830  for ac_prog in wc
5831do
5832  # Extract the first word of "$ac_prog", so it can be a program name with args.
5833set dummy $ac_prog; ac_word=$2
5834{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5835$as_echo_n "checking for $ac_word... " >&6; }
5836if ${ac_cv_path_WC+:} false; then :
5837  $as_echo_n "(cached) " >&6
5838else
5839  case $WC in
5840  [\\/]* | ?:[\\/]*)
5841  ac_cv_path_WC="$WC" # Let the user override the test with a path.
5842  ;;
5843  *)
5844  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5845for as_dir in $PATH
5846do
5847  IFS=$as_save_IFS
5848  test -z "$as_dir" && as_dir=.
5849    for ac_exec_ext in '' $ac_executable_extensions; do
5850  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5851    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
5852    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5853    break 2
5854  fi
5855done
5856  done
5857IFS=$as_save_IFS
5858
5859  ;;
5860esac
5861fi
5862WC=$ac_cv_path_WC
5863if test -n "$WC"; then
5864  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
5865$as_echo "$WC" >&6; }
5866else
5867  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5868$as_echo "no" >&6; }
5869fi
5870
5871
5872  test -n "$WC" && break
5873done
5874
5875
5876  if test "x$WC" = x; then
5877    if test "xwc" = x; then
5878      PROG_NAME=wc
5879    else
5880      PROG_NAME=wc
5881    fi
5882    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5883$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5884    as_fn_error $? "Cannot continue" "$LINENO" 5
5885  fi
5886
5887
5888
5889  for ac_prog in which
5890do
5891  # Extract the first word of "$ac_prog", so it can be a program name with args.
5892set dummy $ac_prog; ac_word=$2
5893{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5894$as_echo_n "checking for $ac_word... " >&6; }
5895if ${ac_cv_path_WHICH+:} false; then :
5896  $as_echo_n "(cached) " >&6
5897else
5898  case $WHICH in
5899  [\\/]* | ?:[\\/]*)
5900  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
5901  ;;
5902  *)
5903  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5904for as_dir in $PATH
5905do
5906  IFS=$as_save_IFS
5907  test -z "$as_dir" && as_dir=.
5908    for ac_exec_ext in '' $ac_executable_extensions; do
5909  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5910    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
5911    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5912    break 2
5913  fi
5914done
5915  done
5916IFS=$as_save_IFS
5917
5918  ;;
5919esac
5920fi
5921WHICH=$ac_cv_path_WHICH
5922if test -n "$WHICH"; then
5923  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
5924$as_echo "$WHICH" >&6; }
5925else
5926  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5927$as_echo "no" >&6; }
5928fi
5929
5930
5931  test -n "$WHICH" && break
5932done
5933
5934
5935  if test "x$WHICH" = x; then
5936    if test "xwhich" = x; then
5937      PROG_NAME=which
5938    else
5939      PROG_NAME=which
5940    fi
5941    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5942$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5943    as_fn_error $? "Cannot continue" "$LINENO" 5
5944  fi
5945
5946
5947
5948  for ac_prog in xargs
5949do
5950  # Extract the first word of "$ac_prog", so it can be a program name with args.
5951set dummy $ac_prog; ac_word=$2
5952{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5953$as_echo_n "checking for $ac_word... " >&6; }
5954if ${ac_cv_path_XARGS+:} false; then :
5955  $as_echo_n "(cached) " >&6
5956else
5957  case $XARGS in
5958  [\\/]* | ?:[\\/]*)
5959  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
5960  ;;
5961  *)
5962  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5963for as_dir in $PATH
5964do
5965  IFS=$as_save_IFS
5966  test -z "$as_dir" && as_dir=.
5967    for ac_exec_ext in '' $ac_executable_extensions; do
5968  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5969    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
5970    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5971    break 2
5972  fi
5973done
5974  done
5975IFS=$as_save_IFS
5976
5977  ;;
5978esac
5979fi
5980XARGS=$ac_cv_path_XARGS
5981if test -n "$XARGS"; then
5982  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
5983$as_echo "$XARGS" >&6; }
5984else
5985  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5986$as_echo "no" >&6; }
5987fi
5988
5989
5990  test -n "$XARGS" && break
5991done
5992
5993
5994  if test "x$XARGS" = x; then
5995    if test "xxargs" = x; then
5996      PROG_NAME=xargs
5997    else
5998      PROG_NAME=xargs
5999    fi
6000    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6001$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6002    as_fn_error $? "Cannot continue" "$LINENO" 5
6003  fi
6004
6005
6006
6007  # Then required tools that require some special treatment.
6008  for ac_prog in gawk mawk nawk awk
6009do
6010  # Extract the first word of "$ac_prog", so it can be a program name with args.
6011set dummy $ac_prog; ac_word=$2
6012{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6013$as_echo_n "checking for $ac_word... " >&6; }
6014if ${ac_cv_prog_AWK+:} false; then :
6015  $as_echo_n "(cached) " >&6
6016else
6017  if test -n "$AWK"; then
6018  ac_cv_prog_AWK="$AWK" # Let the user override the test.
6019else
6020as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6021for as_dir in $PATH
6022do
6023  IFS=$as_save_IFS
6024  test -z "$as_dir" && as_dir=.
6025    for ac_exec_ext in '' $ac_executable_extensions; do
6026  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6027    ac_cv_prog_AWK="$ac_prog"
6028    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6029    break 2
6030  fi
6031done
6032  done
6033IFS=$as_save_IFS
6034
6035fi
6036fi
6037AWK=$ac_cv_prog_AWK
6038if test -n "$AWK"; then
6039  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
6040$as_echo "$AWK" >&6; }
6041else
6042  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6043$as_echo "no" >&6; }
6044fi
6045
6046
6047  test -n "$AWK" && break
6048done
6049
6050
6051  if test "x$AWK" = x; then
6052    if test "x" = x; then
6053      PROG_NAME=awk
6054    else
6055      PROG_NAME=
6056    fi
6057    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6058$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6059    as_fn_error $? "Cannot continue" "$LINENO" 5
6060  fi
6061
6062  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
6063$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
6064if ${ac_cv_path_GREP+:} false; then :
6065  $as_echo_n "(cached) " >&6
6066else
6067  if test -z "$GREP"; then
6068  ac_path_GREP_found=false
6069  # Loop through the user's path and test for each of PROGNAME-LIST
6070  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6071for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6072do
6073  IFS=$as_save_IFS
6074  test -z "$as_dir" && as_dir=.
6075    for ac_prog in grep ggrep; do
6076    for ac_exec_ext in '' $ac_executable_extensions; do
6077      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
6078      as_fn_executable_p "$ac_path_GREP" || continue
6079# Check for GNU ac_path_GREP and select it if it is found.
6080  # Check for GNU $ac_path_GREP
6081case `"$ac_path_GREP" --version 2>&1` in
6082*GNU*)
6083  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
6084*)
6085  ac_count=0
6086  $as_echo_n 0123456789 >"conftest.in"
6087  while :
6088  do
6089    cat "conftest.in" "conftest.in" >"conftest.tmp"
6090    mv "conftest.tmp" "conftest.in"
6091    cp "conftest.in" "conftest.nl"
6092    $as_echo 'GREP' >> "conftest.nl"
6093    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6094    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6095    as_fn_arith $ac_count + 1 && ac_count=$as_val
6096    if test $ac_count -gt ${ac_path_GREP_max-0}; then
6097      # Best one so far, save it but keep looking for a better one
6098      ac_cv_path_GREP="$ac_path_GREP"
6099      ac_path_GREP_max=$ac_count
6100    fi
6101    # 10*(2^10) chars as input seems more than enough
6102    test $ac_count -gt 10 && break
6103  done
6104  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6105esac
6106
6107      $ac_path_GREP_found && break 3
6108    done
6109  done
6110  done
6111IFS=$as_save_IFS
6112  if test -z "$ac_cv_path_GREP"; then
6113    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6114  fi
6115else
6116  ac_cv_path_GREP=$GREP
6117fi
6118
6119fi
6120{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
6121$as_echo "$ac_cv_path_GREP" >&6; }
6122 GREP="$ac_cv_path_GREP"
6123
6124
6125
6126  if test "x$GREP" = x; then
6127    if test "x" = x; then
6128      PROG_NAME=grep
6129    else
6130      PROG_NAME=
6131    fi
6132    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6133$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6134    as_fn_error $? "Cannot continue" "$LINENO" 5
6135  fi
6136
6137  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
6138$as_echo_n "checking for egrep... " >&6; }
6139if ${ac_cv_path_EGREP+:} false; then :
6140  $as_echo_n "(cached) " >&6
6141else
6142  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
6143   then ac_cv_path_EGREP="$GREP -E"
6144   else
6145     if test -z "$EGREP"; then
6146  ac_path_EGREP_found=false
6147  # Loop through the user's path and test for each of PROGNAME-LIST
6148  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6149for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6150do
6151  IFS=$as_save_IFS
6152  test -z "$as_dir" && as_dir=.
6153    for ac_prog in egrep; do
6154    for ac_exec_ext in '' $ac_executable_extensions; do
6155      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
6156      as_fn_executable_p "$ac_path_EGREP" || continue
6157# Check for GNU ac_path_EGREP and select it if it is found.
6158  # Check for GNU $ac_path_EGREP
6159case `"$ac_path_EGREP" --version 2>&1` in
6160*GNU*)
6161  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
6162*)
6163  ac_count=0
6164  $as_echo_n 0123456789 >"conftest.in"
6165  while :
6166  do
6167    cat "conftest.in" "conftest.in" >"conftest.tmp"
6168    mv "conftest.tmp" "conftest.in"
6169    cp "conftest.in" "conftest.nl"
6170    $as_echo 'EGREP' >> "conftest.nl"
6171    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6172    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6173    as_fn_arith $ac_count + 1 && ac_count=$as_val
6174    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
6175      # Best one so far, save it but keep looking for a better one
6176      ac_cv_path_EGREP="$ac_path_EGREP"
6177      ac_path_EGREP_max=$ac_count
6178    fi
6179    # 10*(2^10) chars as input seems more than enough
6180    test $ac_count -gt 10 && break
6181  done
6182  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6183esac
6184
6185      $ac_path_EGREP_found && break 3
6186    done
6187  done
6188  done
6189IFS=$as_save_IFS
6190  if test -z "$ac_cv_path_EGREP"; then
6191    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6192  fi
6193else
6194  ac_cv_path_EGREP=$EGREP
6195fi
6196
6197   fi
6198fi
6199{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
6200$as_echo "$ac_cv_path_EGREP" >&6; }
6201 EGREP="$ac_cv_path_EGREP"
6202
6203
6204
6205  if test "x$EGREP" = x; then
6206    if test "x" = x; then
6207      PROG_NAME=egrep
6208    else
6209      PROG_NAME=
6210    fi
6211    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6212$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6213    as_fn_error $? "Cannot continue" "$LINENO" 5
6214  fi
6215
6216  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
6217$as_echo_n "checking for fgrep... " >&6; }
6218if ${ac_cv_path_FGREP+:} false; then :
6219  $as_echo_n "(cached) " >&6
6220else
6221  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
6222   then ac_cv_path_FGREP="$GREP -F"
6223   else
6224     if test -z "$FGREP"; then
6225  ac_path_FGREP_found=false
6226  # Loop through the user's path and test for each of PROGNAME-LIST
6227  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6228for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6229do
6230  IFS=$as_save_IFS
6231  test -z "$as_dir" && as_dir=.
6232    for ac_prog in fgrep; do
6233    for ac_exec_ext in '' $ac_executable_extensions; do
6234      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
6235      as_fn_executable_p "$ac_path_FGREP" || continue
6236# Check for GNU ac_path_FGREP and select it if it is found.
6237  # Check for GNU $ac_path_FGREP
6238case `"$ac_path_FGREP" --version 2>&1` in
6239*GNU*)
6240  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
6241*)
6242  ac_count=0
6243  $as_echo_n 0123456789 >"conftest.in"
6244  while :
6245  do
6246    cat "conftest.in" "conftest.in" >"conftest.tmp"
6247    mv "conftest.tmp" "conftest.in"
6248    cp "conftest.in" "conftest.nl"
6249    $as_echo 'FGREP' >> "conftest.nl"
6250    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
6251    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6252    as_fn_arith $ac_count + 1 && ac_count=$as_val
6253    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
6254      # Best one so far, save it but keep looking for a better one
6255      ac_cv_path_FGREP="$ac_path_FGREP"
6256      ac_path_FGREP_max=$ac_count
6257    fi
6258    # 10*(2^10) chars as input seems more than enough
6259    test $ac_count -gt 10 && break
6260  done
6261  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6262esac
6263
6264      $ac_path_FGREP_found && break 3
6265    done
6266  done
6267  done
6268IFS=$as_save_IFS
6269  if test -z "$ac_cv_path_FGREP"; then
6270    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6271  fi
6272else
6273  ac_cv_path_FGREP=$FGREP
6274fi
6275
6276   fi
6277fi
6278{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
6279$as_echo "$ac_cv_path_FGREP" >&6; }
6280 FGREP="$ac_cv_path_FGREP"
6281
6282
6283
6284  if test "x$FGREP" = x; then
6285    if test "x" = x; then
6286      PROG_NAME=fgrep
6287    else
6288      PROG_NAME=
6289    fi
6290    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6291$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6292    as_fn_error $? "Cannot continue" "$LINENO" 5
6293  fi
6294
6295  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
6296$as_echo_n "checking for a sed that does not truncate output... " >&6; }
6297if ${ac_cv_path_SED+:} false; then :
6298  $as_echo_n "(cached) " >&6
6299else
6300            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
6301     for ac_i in 1 2 3 4 5 6 7; do
6302       ac_script="$ac_script$as_nl$ac_script"
6303     done
6304     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
6305     { ac_script=; unset ac_script;}
6306     if test -z "$SED"; then
6307  ac_path_SED_found=false
6308  # Loop through the user's path and test for each of PROGNAME-LIST
6309  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6310for as_dir in $PATH
6311do
6312  IFS=$as_save_IFS
6313  test -z "$as_dir" && as_dir=.
6314    for ac_prog in sed gsed; do
6315    for ac_exec_ext in '' $ac_executable_extensions; do
6316      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
6317      as_fn_executable_p "$ac_path_SED" || continue
6318# Check for GNU ac_path_SED and select it if it is found.
6319  # Check for GNU $ac_path_SED
6320case `"$ac_path_SED" --version 2>&1` in
6321*GNU*)
6322  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
6323*)
6324  ac_count=0
6325  $as_echo_n 0123456789 >"conftest.in"
6326  while :
6327  do
6328    cat "conftest.in" "conftest.in" >"conftest.tmp"
6329    mv "conftest.tmp" "conftest.in"
6330    cp "conftest.in" "conftest.nl"
6331    $as_echo '' >> "conftest.nl"
6332    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
6333    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6334    as_fn_arith $ac_count + 1 && ac_count=$as_val
6335    if test $ac_count -gt ${ac_path_SED_max-0}; then
6336      # Best one so far, save it but keep looking for a better one
6337      ac_cv_path_SED="$ac_path_SED"
6338      ac_path_SED_max=$ac_count
6339    fi
6340    # 10*(2^10) chars as input seems more than enough
6341    test $ac_count -gt 10 && break
6342  done
6343  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6344esac
6345
6346      $ac_path_SED_found && break 3
6347    done
6348  done
6349  done
6350IFS=$as_save_IFS
6351  if test -z "$ac_cv_path_SED"; then
6352    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
6353  fi
6354else
6355  ac_cv_path_SED=$SED
6356fi
6357
6358fi
6359{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
6360$as_echo "$ac_cv_path_SED" >&6; }
6361 SED="$ac_cv_path_SED"
6362  rm -f conftest.sed
6363
6364
6365  if test "x$SED" = x; then
6366    if test "x" = x; then
6367      PROG_NAME=sed
6368    else
6369      PROG_NAME=
6370    fi
6371    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6372$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6373    as_fn_error $? "Cannot continue" "$LINENO" 5
6374  fi
6375
6376
6377  for ac_prog in nawk gawk awk
6378do
6379  # Extract the first word of "$ac_prog", so it can be a program name with args.
6380set dummy $ac_prog; ac_word=$2
6381{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6382$as_echo_n "checking for $ac_word... " >&6; }
6383if ${ac_cv_path_NAWK+:} false; then :
6384  $as_echo_n "(cached) " >&6
6385else
6386  case $NAWK in
6387  [\\/]* | ?:[\\/]*)
6388  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
6389  ;;
6390  *)
6391  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6392for as_dir in $PATH
6393do
6394  IFS=$as_save_IFS
6395  test -z "$as_dir" && as_dir=.
6396    for ac_exec_ext in '' $ac_executable_extensions; do
6397  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6398    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
6399    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6400    break 2
6401  fi
6402done
6403  done
6404IFS=$as_save_IFS
6405
6406  ;;
6407esac
6408fi
6409NAWK=$ac_cv_path_NAWK
6410if test -n "$NAWK"; then
6411  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
6412$as_echo "$NAWK" >&6; }
6413else
6414  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6415$as_echo "no" >&6; }
6416fi
6417
6418
6419  test -n "$NAWK" && break
6420done
6421
6422
6423  if test "x$NAWK" = x; then
6424    if test "x" = x; then
6425      PROG_NAME=nawk
6426    else
6427      PROG_NAME=
6428    fi
6429    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6430$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6431    as_fn_error $? "Cannot continue" "$LINENO" 5
6432  fi
6433
6434
6435  # Always force rm.
6436  RM="$RM -f"
6437
6438  # pwd behaves differently on various platforms and some don't support the -L flag.
6439  # Always use the bash builtin pwd to get uniform behavior.
6440  THEPWDCMD=pwd
6441
6442  # These are not required on all platforms
6443  # Extract the first word of "cygpath", so it can be a program name with args.
6444set dummy cygpath; ac_word=$2
6445{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6446$as_echo_n "checking for $ac_word... " >&6; }
6447if ${ac_cv_path_CYGPATH+:} false; then :
6448  $as_echo_n "(cached) " >&6
6449else
6450  case $CYGPATH in
6451  [\\/]* | ?:[\\/]*)
6452  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
6453  ;;
6454  *)
6455  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6456for as_dir in $PATH
6457do
6458  IFS=$as_save_IFS
6459  test -z "$as_dir" && as_dir=.
6460    for ac_exec_ext in '' $ac_executable_extensions; do
6461  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6462    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
6463    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6464    break 2
6465  fi
6466done
6467  done
6468IFS=$as_save_IFS
6469
6470  ;;
6471esac
6472fi
6473CYGPATH=$ac_cv_path_CYGPATH
6474if test -n "$CYGPATH"; then
6475  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
6476$as_echo "$CYGPATH" >&6; }
6477else
6478  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6479$as_echo "no" >&6; }
6480fi
6481
6482
6483  # Extract the first word of "readlink", so it can be a program name with args.
6484set dummy readlink; ac_word=$2
6485{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6486$as_echo_n "checking for $ac_word... " >&6; }
6487if ${ac_cv_path_READLINK+:} false; then :
6488  $as_echo_n "(cached) " >&6
6489else
6490  case $READLINK in
6491  [\\/]* | ?:[\\/]*)
6492  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
6493  ;;
6494  *)
6495  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6496for as_dir in $PATH
6497do
6498  IFS=$as_save_IFS
6499  test -z "$as_dir" && as_dir=.
6500    for ac_exec_ext in '' $ac_executable_extensions; do
6501  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6502    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
6503    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6504    break 2
6505  fi
6506done
6507  done
6508IFS=$as_save_IFS
6509
6510  ;;
6511esac
6512fi
6513READLINK=$ac_cv_path_READLINK
6514if test -n "$READLINK"; then
6515  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
6516$as_echo "$READLINK" >&6; }
6517else
6518  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6519$as_echo "no" >&6; }
6520fi
6521
6522
6523  # Extract the first word of "df", so it can be a program name with args.
6524set dummy df; ac_word=$2
6525{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6526$as_echo_n "checking for $ac_word... " >&6; }
6527if ${ac_cv_path_DF+:} false; then :
6528  $as_echo_n "(cached) " >&6
6529else
6530  case $DF in
6531  [\\/]* | ?:[\\/]*)
6532  ac_cv_path_DF="$DF" # Let the user override the test with a path.
6533  ;;
6534  *)
6535  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6536for as_dir in $PATH
6537do
6538  IFS=$as_save_IFS
6539  test -z "$as_dir" && as_dir=.
6540    for ac_exec_ext in '' $ac_executable_extensions; do
6541  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6542    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
6543    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6544    break 2
6545  fi
6546done
6547  done
6548IFS=$as_save_IFS
6549
6550  ;;
6551esac
6552fi
6553DF=$ac_cv_path_DF
6554if test -n "$DF"; then
6555  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
6556$as_echo "$DF" >&6; }
6557else
6558  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6559$as_echo "no" >&6; }
6560fi
6561
6562
6563  # Extract the first word of "SetFile", so it can be a program name with args.
6564set dummy SetFile; ac_word=$2
6565{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6566$as_echo_n "checking for $ac_word... " >&6; }
6567if ${ac_cv_path_SETFILE+:} false; then :
6568  $as_echo_n "(cached) " >&6
6569else
6570  case $SETFILE in
6571  [\\/]* | ?:[\\/]*)
6572  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
6573  ;;
6574  *)
6575  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6576for as_dir in $PATH
6577do
6578  IFS=$as_save_IFS
6579  test -z "$as_dir" && as_dir=.
6580    for ac_exec_ext in '' $ac_executable_extensions; do
6581  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6582    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
6583    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6584    break 2
6585  fi
6586done
6587  done
6588IFS=$as_save_IFS
6589
6590  ;;
6591esac
6592fi
6593SETFILE=$ac_cv_path_SETFILE
6594if test -n "$SETFILE"; then
6595  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
6596$as_echo "$SETFILE" >&6; }
6597else
6598  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6599$as_echo "no" >&6; }
6600fi
6601
6602
6603
6604
6605# Now we can determine OpenJDK build and target platforms. This is required to
6606# have early on.
6607# Make sure we can run config.sub.
6608$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
6609  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
6610
6611{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
6612$as_echo_n "checking build system type... " >&6; }
6613if ${ac_cv_build+:} false; then :
6614  $as_echo_n "(cached) " >&6
6615else
6616  ac_build_alias=$build_alias
6617test "x$ac_build_alias" = x &&
6618  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
6619test "x$ac_build_alias" = x &&
6620  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
6621ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
6622  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
6623
6624fi
6625{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
6626$as_echo "$ac_cv_build" >&6; }
6627case $ac_cv_build in
6628*-*-*) ;;
6629*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
6630esac
6631build=$ac_cv_build
6632ac_save_IFS=$IFS; IFS='-'
6633set x $ac_cv_build
6634shift
6635build_cpu=$1
6636build_vendor=$2
6637shift; shift
6638# Remember, the first character of IFS is used to create $*,
6639# except with old shells:
6640build_os=$*
6641IFS=$ac_save_IFS
6642case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
6643
6644
6645{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
6646$as_echo_n "checking host system type... " >&6; }
6647if ${ac_cv_host+:} false; then :
6648  $as_echo_n "(cached) " >&6
6649else
6650  if test "x$host_alias" = x; then
6651  ac_cv_host=$ac_cv_build
6652else
6653  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
6654    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
6655fi
6656
6657fi
6658{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
6659$as_echo "$ac_cv_host" >&6; }
6660case $ac_cv_host in
6661*-*-*) ;;
6662*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
6663esac
6664host=$ac_cv_host
6665ac_save_IFS=$IFS; IFS='-'
6666set x $ac_cv_host
6667shift
6668host_cpu=$1
6669host_vendor=$2
6670shift; shift
6671# Remember, the first character of IFS is used to create $*,
6672# except with old shells:
6673host_os=$*
6674IFS=$ac_save_IFS
6675case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
6676
6677
6678{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
6679$as_echo_n "checking target system type... " >&6; }
6680if ${ac_cv_target+:} false; then :
6681  $as_echo_n "(cached) " >&6
6682else
6683  if test "x$target_alias" = x; then
6684  ac_cv_target=$ac_cv_host
6685else
6686  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
6687    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
6688fi
6689
6690fi
6691{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
6692$as_echo "$ac_cv_target" >&6; }
6693case $ac_cv_target in
6694*-*-*) ;;
6695*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
6696esac
6697target=$ac_cv_target
6698ac_save_IFS=$IFS; IFS='-'
6699set x $ac_cv_target
6700shift
6701target_cpu=$1
6702target_vendor=$2
6703shift; shift
6704# Remember, the first character of IFS is used to create $*,
6705# except with old shells:
6706target_os=$*
6707IFS=$ac_save_IFS
6708case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
6709
6710
6711# The aliases save the names the user supplied, while $host etc.
6712# will get canonicalized.
6713test -n "$target_alias" &&
6714  test "$program_prefix$program_suffix$program_transform_name" = \
6715    NONENONEs,x,x, &&
6716  program_prefix=${target_alias}-
6717
6718  # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
6719  # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
6720  # product you're building. The target of this build is called "host". Since this is confusing to most people, we
6721  # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
6722  # to use the configure naming style.
6723
6724
6725
6726
6727
6728  # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
6729  # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
6730  # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
6731  # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
6732  OPENJDK_TARGET_AUTOCONF_NAME="$host"
6733  OPENJDK_BUILD_AUTOCONF_NAME="$build"
6734
6735
6736
6737  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
6738
6739  case "$build_os" in
6740    *linux*)
6741      VAR_OS=linux
6742      VAR_OS_API=posix
6743      VAR_OS_ENV=linux
6744      ;;
6745    *solaris*)
6746      VAR_OS=solaris
6747      VAR_OS_API=posix
6748      VAR_OS_ENV=solaris
6749      ;;
6750    *darwin*)
6751      VAR_OS=macosx
6752      VAR_OS_API=posix
6753      VAR_OS_ENV=macosx
6754      ;;
6755    *bsd*)
6756      VAR_OS=bsd
6757      VAR_OS_API=posix
6758      VAR_OS_ENV=bsd
6759      ;;
6760    *cygwin*)
6761      VAR_OS=windows
6762      VAR_OS_API=winapi
6763      VAR_OS_ENV=windows.cygwin
6764      ;;
6765    *mingw*)
6766      VAR_OS=windows
6767      VAR_OS_API=winapi
6768      VAR_OS_ENV=windows.msys
6769      ;;
6770    *)
6771      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
6772      ;;
6773  esac
6774
6775
6776  # First argument is the cpu name from the trip/quad
6777  case "$build_cpu" in
6778    x86_64)
6779      VAR_CPU=x86_64
6780      VAR_CPU_ARCH=x86
6781      VAR_CPU_BITS=64
6782      VAR_CPU_ENDIAN=little
6783      ;;
6784    i?86)
6785      VAR_CPU=x86
6786      VAR_CPU_ARCH=x86
6787      VAR_CPU_BITS=32
6788      VAR_CPU_ENDIAN=little
6789      ;;
6790    arm*)
6791      VAR_CPU=arm
6792      VAR_CPU_ARCH=arm
6793      VAR_CPU_BITS=32
6794      VAR_CPU_ENDIAN=little
6795      ;;
6796    powerpc)
6797      VAR_CPU=ppc
6798      VAR_CPU_ARCH=ppc
6799      VAR_CPU_BITS=32
6800      VAR_CPU_ENDIAN=big
6801      ;;
6802    powerpc64)
6803      VAR_CPU=ppc64
6804      VAR_CPU_ARCH=ppc
6805      VAR_CPU_BITS=64
6806      VAR_CPU_ENDIAN=big
6807      ;;
6808    s390)
6809      VAR_CPU=s390
6810      VAR_CPU_ARCH=s390
6811      VAR_CPU_BITS=32
6812      VAR_CPU_ENDIAN=big
6813      ;;
6814    s390x)
6815      VAR_CPU=s390x
6816      VAR_CPU_ARCH=s390
6817      VAR_CPU_BITS=64
6818      VAR_CPU_ENDIAN=big
6819      ;;
6820    sparc)
6821      VAR_CPU=sparc
6822      VAR_CPU_ARCH=sparc
6823      VAR_CPU_BITS=32
6824      VAR_CPU_ENDIAN=big
6825      ;;
6826    sparcv9)
6827      VAR_CPU=sparcv9
6828      VAR_CPU_ARCH=sparc
6829      VAR_CPU_BITS=64
6830      VAR_CPU_ENDIAN=big
6831      ;;
6832    *)
6833      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
6834      ;;
6835  esac
6836
6837  # ..and setup our own variables. (Do this explicitely to facilitate searching)
6838  OPENJDK_BUILD_OS="$VAR_OS"
6839  OPENJDK_BUILD_OS_API="$VAR_OS_API"
6840  OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
6841  OPENJDK_BUILD_CPU="$VAR_CPU"
6842  OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
6843  OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
6844  OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
6845
6846
6847
6848
6849
6850
6851
6852  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
6853$as_echo_n "checking openjdk-build os-cpu... " >&6; }
6854  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
6855$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
6856
6857  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
6858
6859  case "$host_os" in
6860    *linux*)
6861      VAR_OS=linux
6862      VAR_OS_API=posix
6863      VAR_OS_ENV=linux
6864      ;;
6865    *solaris*)
6866      VAR_OS=solaris
6867      VAR_OS_API=posix
6868      VAR_OS_ENV=solaris
6869      ;;
6870    *darwin*)
6871      VAR_OS=macosx
6872      VAR_OS_API=posix
6873      VAR_OS_ENV=macosx
6874      ;;
6875    *bsd*)
6876      VAR_OS=bsd
6877      VAR_OS_API=posix
6878      VAR_OS_ENV=bsd
6879      ;;
6880    *cygwin*)
6881      VAR_OS=windows
6882      VAR_OS_API=winapi
6883      VAR_OS_ENV=windows.cygwin
6884      ;;
6885    *mingw*)
6886      VAR_OS=windows
6887      VAR_OS_API=winapi
6888      VAR_OS_ENV=windows.msys
6889      ;;
6890    *)
6891      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
6892      ;;
6893  esac
6894
6895
6896  # First argument is the cpu name from the trip/quad
6897  case "$host_cpu" in
6898    x86_64)
6899      VAR_CPU=x86_64
6900      VAR_CPU_ARCH=x86
6901      VAR_CPU_BITS=64
6902      VAR_CPU_ENDIAN=little
6903      ;;
6904    i?86)
6905      VAR_CPU=x86
6906      VAR_CPU_ARCH=x86
6907      VAR_CPU_BITS=32
6908      VAR_CPU_ENDIAN=little
6909      ;;
6910    arm*)
6911      VAR_CPU=arm
6912      VAR_CPU_ARCH=arm
6913      VAR_CPU_BITS=32
6914      VAR_CPU_ENDIAN=little
6915      ;;
6916    powerpc)
6917      VAR_CPU=ppc
6918      VAR_CPU_ARCH=ppc
6919      VAR_CPU_BITS=32
6920      VAR_CPU_ENDIAN=big
6921      ;;
6922    powerpc64)
6923      VAR_CPU=ppc64
6924      VAR_CPU_ARCH=ppc
6925      VAR_CPU_BITS=64
6926      VAR_CPU_ENDIAN=big
6927      ;;
6928    s390)
6929      VAR_CPU=s390
6930      VAR_CPU_ARCH=s390
6931      VAR_CPU_BITS=32
6932      VAR_CPU_ENDIAN=big
6933      ;;
6934    s390x)
6935      VAR_CPU=s390x
6936      VAR_CPU_ARCH=s390
6937      VAR_CPU_BITS=64
6938      VAR_CPU_ENDIAN=big
6939      ;;
6940    sparc)
6941      VAR_CPU=sparc
6942      VAR_CPU_ARCH=sparc
6943      VAR_CPU_BITS=32
6944      VAR_CPU_ENDIAN=big
6945      ;;
6946    sparcv9)
6947      VAR_CPU=sparcv9
6948      VAR_CPU_ARCH=sparc
6949      VAR_CPU_BITS=64
6950      VAR_CPU_ENDIAN=big
6951      ;;
6952    *)
6953      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
6954      ;;
6955  esac
6956
6957  # ... and setup our own variables. (Do this explicitely to facilitate searching)
6958  OPENJDK_TARGET_OS="$VAR_OS"
6959  OPENJDK_TARGET_OS_API="$VAR_OS_API"
6960  OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
6961  OPENJDK_TARGET_CPU="$VAR_CPU"
6962  OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
6963  OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
6964  OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
6965
6966
6967
6968
6969
6970
6971
6972  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
6973$as_echo_n "checking openjdk-target os-cpu... " >&6; }
6974  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
6975$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
6976
6977
6978
6979# Check whether --with-target-bits was given.
6980if test "${with_target_bits+set}" = set; then :
6981  withval=$with_target_bits;
6982fi
6983
6984
6985  # We have three types of compiles:
6986  # native  == normal compilation, target system == build system
6987  # cross   == traditional cross compilation, target system != build system; special toolchain needed
6988  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
6989  #
6990  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
6991    # We're doing a proper cross-compilation
6992    COMPILE_TYPE="cross"
6993  else
6994    COMPILE_TYPE="native"
6995  fi
6996
6997  if test "x$with_target_bits" != x; then
6998    if test "x$COMPILE_TYPE" = "xcross"; then
6999      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
7000    fi
7001
7002    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7003      # A reduced build is requested
7004      COMPILE_TYPE="reduced"
7005      OPENJDK_TARGET_CPU_BITS=32
7006      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
7007        OPENJDK_TARGET_CPU=x86
7008      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
7009        OPENJDK_TARGET_CPU=sparc
7010      else
7011        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
7012      fi
7013    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
7014      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
7015    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
7016      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
7017$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
7018    else
7019      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
7020    fi
7021  fi
7022
7023
7024  { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
7025$as_echo_n "checking compilation type... " >&6; }
7026  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
7027$as_echo "$COMPILE_TYPE" >&6; }
7028
7029
7030  if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
7031    REQUIRED_OS_NAME=SunOS
7032    REQUIRED_OS_VERSION=5.10
7033  fi
7034  if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
7035    REQUIRED_OS_NAME=Linux
7036    REQUIRED_OS_VERSION=2.6
7037  fi
7038  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
7039    REQUIRED_OS_NAME=Windows
7040    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
7041      REQUIRED_OS_VERSION=5.2
7042    else
7043      REQUIRED_OS_VERSION=5.1
7044    fi
7045  fi
7046  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
7047    REQUIRED_OS_NAME=Darwin
7048    REQUIRED_OS_VERSION=11.2
7049  fi
7050
7051
7052
7053
7054
7055  # Also store the legacy naming of the cpu.
7056  # Ie i586 and amd64 instead of x86 and x86_64
7057  OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
7058  if test "x$OPENJDK_TARGET_CPU" = xx86; then
7059    OPENJDK_TARGET_CPU_LEGACY="i586"
7060  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7061    # On all platforms except MacOSX replace x86_64 with amd64.
7062    OPENJDK_TARGET_CPU_LEGACY="amd64"
7063  fi
7064
7065
7066  # And the second legacy naming of the cpu.
7067  # Ie i386 and amd64 instead of x86 and x86_64.
7068  OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
7069  if test "x$OPENJDK_TARGET_CPU" = xx86; then
7070    OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
7071  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7072    OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
7073  fi
7074
7075
7076  # This is the name of the cpu (but using i386 and amd64 instead of
7077  # x86 and x86_64, respectively), preceeded by a /, to be used when
7078  # locating libraries. On macosx, it's empty, though.
7079  OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
7080  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
7081    OPENJDK_TARGET_CPU_LIBDIR=""
7082  fi
7083
7084
7085  # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
7086  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
7087  # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
7088  OPENJDK_TARGET_CPU_ISADIR=""
7089  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
7090    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7091      OPENJDK_TARGET_CPU_ISADIR="/amd64"
7092    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
7093      OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
7094    fi
7095  fi
7096
7097
7098  # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
7099  OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
7100  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
7101    # On linux only, we replace x86 with i386.
7102    OPENJDK_TARGET_CPU_OSARCH="i386"
7103  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7104    # On all platforms except macosx, we replace x86_64 with amd64.
7105    OPENJDK_TARGET_CPU_OSARCH="amd64"
7106  fi
7107
7108
7109  OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
7110  if test "x$OPENJDK_TARGET_CPU" = xx86; then
7111    OPENJDK_TARGET_CPU_JLI="i386"
7112  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7113    # On all platforms except macosx, we replace x86_64 with amd64.
7114    OPENJDK_TARGET_CPU_JLI="amd64"
7115  fi
7116  # Now setup the -D flags for building libjli.
7117  OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
7118  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
7119    if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
7120      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
7121    elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
7122      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
7123    fi
7124  fi
7125
7126
7127  # Setup OPENJDK_TARGET_OS_API_DIR, used in source paths.
7128  if test "x$OPENJDK_TARGET_OS_API" = xposix; then
7129    OPENJDK_TARGET_OS_API_DIR="solaris"
7130  fi
7131  if test "x$OPENJDK_TARGET_OS_API" = xwinapi; then
7132    OPENJDK_TARGET_OS_API_DIR="windows"
7133  fi
7134
7135
7136  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7137    A_LP64="LP64:="
7138    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
7139    # unpack200.exe
7140    if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
7141      ADD_LP64="-D_LP64=1"
7142    fi
7143  fi
7144  LP64=$A_LP64
7145
7146
7147  if test "x$COMPILE_TYPE" = "xcross"; then
7148    # FIXME: ... or should this include reduced builds..?
7149    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
7150  else
7151    DEFINE_CROSS_COMPILE_ARCH=""
7152  fi
7153
7154
7155  # ZERO_ARCHDEF is used to enable architecture-specific code
7156  case "${OPENJDK_TARGET_CPU}" in
7157    ppc*)    ZERO_ARCHDEF=PPC   ;;
7158    s390*)   ZERO_ARCHDEF=S390  ;;
7159    sparc*)  ZERO_ARCHDEF=SPARC ;;
7160    x86_64*) ZERO_ARCHDEF=AMD64 ;;
7161    x86)     ZERO_ARCHDEF=IA32  ;;
7162    *)      ZERO_ARCHDEF=$(echo "${OPENJDK_TARGET_CPU_LEGACY_LIB}" | tr a-z A-Z)
7163  esac
7164
7165
7166
7167
7168# Continue setting up basic stuff. Most remaining code require fundamental tools.
7169
7170  # Locate the directory of this script.
7171  SCRIPT="$0"
7172  AUTOCONF_DIR=`cd \`$DIRNAME $SCRIPT\`; $THEPWDCMD -L`
7173
7174  # Where is the source? It is located two levels above the configure script.
7175  CURDIR="$PWD"
7176  cd "$AUTOCONF_DIR/../.."
7177  SRC_ROOT="`$THEPWDCMD -L`"
7178
7179  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
7180    PATH_SEP=";"
7181
7182  SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
7183  if test $SRC_ROOT_LENGTH -gt 100; then
7184    as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
7185  fi
7186
7187  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7188    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
7189$as_echo_n "checking cygwin release... " >&6; }
7190    CYGWIN_VERSION=`$UNAME -r`
7191    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
7192$as_echo "$CYGWIN_VERSION" >&6; }
7193    WINDOWS_ENV_VENDOR='cygwin'
7194    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
7195
7196    CYGWIN_VERSION_OK=`$ECHO $CYGWIN_VERSION | $GREP ^1.7.`
7197    if test "x$CYGWIN_VERSION_OK" = x; then
7198      { $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
7199$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;}
7200      as_fn_error $? "Cannot continue" "$LINENO" 5
7201    fi
7202    if test "x$CYGPATH" = x; then
7203      as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
7204    fi
7205    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
7206$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
7207    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
7208    cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
7209    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
7210    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
7211    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
7212$as_echo "$CYGWIN_ROOT_PATH" >&6; }
7213    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
7214    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
7215    if test "x$test_cygdrive_prefix" = x; then
7216      as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
7217    fi
7218  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7219    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
7220$as_echo_n "checking msys release... " >&6; }
7221    MSYS_VERSION=`$UNAME -r`
7222    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
7223$as_echo "$MSYS_VERSION" >&6; }
7224
7225    WINDOWS_ENV_VENDOR='msys'
7226    WINDOWS_ENV_VERSION="$MSYS_VERSION"
7227
7228    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
7229$as_echo_n "checking msys root directory as unix-style path... " >&6; }
7230    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
7231    MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
7232
7233  windows_path="$MSYS_ROOT_PATH"
7234  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7235    unix_path=`$CYGPATH -u "$windows_path"`
7236    MSYS_ROOT_PATH="$unix_path"
7237  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7238    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7239    MSYS_ROOT_PATH="$unix_path"
7240  fi
7241
7242    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
7243$as_echo "$MSYS_ROOT_PATH" >&6; }
7244    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
7245  else
7246    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
7247  fi
7248
7249  # Test if windows or unix (cygwin/msys) find is first in path.
7250  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
7251$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
7252  FIND_BINARY_OUTPUT=`find --version 2>&1`
7253  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
7254    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
7255$as_echo "unix style" >&6; }
7256  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
7257    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
7258$as_echo "Windows" >&6; }
7259    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
7260$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
7261    { $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
7262$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
7263    as_fn_error $? "Cannot continue" "$LINENO" 5
7264  else
7265    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
7266$as_echo "unknown" >&6; }
7267    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
7268$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
7269  fi
7270
7271  else
7272    PATH_SEP=":"
7273  fi
7274
7275
7276
7277  cd "$CURDIR"
7278
7279
7280  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7281
7282  # Input might be given as Windows format, start by converting to
7283  # unix format.
7284  path="$SRC_ROOT"
7285  new_path=`$CYGPATH -u "$path"`
7286
7287  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7288  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7289  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7290  # "foo.exe" is OK but "foo" is an error.
7291  #
7292  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7293  # It is also a way to make sure we got the proper file name for the real test later on.
7294  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7295  if test "x$test_shortpath" = x; then
7296    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5
7297$as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;}
7298    as_fn_error $? "Cannot locate the the path of SRC_ROOT" "$LINENO" 5
7299  fi
7300
7301  # Call helper function which possibly converts this using DOS-style short mode.
7302  # If so, the updated path is stored in $new_path.
7303
7304  input_path="$new_path"
7305  # Check if we need to convert this using DOS-style short mode. If the path
7306  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7307  # take no chances and rewrite it.
7308  # Note: m4 eats our [], so we need to use [ and ] instead.
7309  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7310  if test "x$has_forbidden_chars" != x; then
7311    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7312    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7313    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7314    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7315      # Going to short mode and back again did indeed matter. Since short mode is
7316      # case insensitive, let's make it lowercase to improve readability.
7317      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7318      # Now convert it back to Unix-stile (cygpath)
7319      input_path=`$CYGPATH -u "$shortmode_path"`
7320      new_path="$input_path"
7321    fi
7322  fi
7323
7324  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7325  if test "x$test_cygdrive_prefix" = x; then
7326    # As a simple fix, exclude /usr/bin since it's not a real path.
7327    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7328      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7329      # a path prefixed by /cygdrive for fixpath to work.
7330      new_path="$CYGWIN_ROOT_PATH$input_path"
7331    fi
7332  fi
7333
7334
7335  if test "x$path" != "x$new_path"; then
7336    SRC_ROOT="$new_path"
7337    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5
7338$as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;}
7339  fi
7340
7341  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7342
7343  path="$SRC_ROOT"
7344  has_colon=`$ECHO $path | $GREP ^.:`
7345  new_path="$path"
7346  if test "x$has_colon" = x; then
7347    # Not in mixed or Windows style, start by that.
7348    new_path=`cmd //c echo $path`
7349  fi
7350
7351
7352  input_path="$new_path"
7353  # Check if we need to convert this using DOS-style short mode. If the path
7354  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7355  # take no chances and rewrite it.
7356  # Note: m4 eats our [], so we need to use [ and ] instead.
7357  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7358  if test "x$has_forbidden_chars" != x; then
7359    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7360    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7361  fi
7362
7363
7364  windows_path="$new_path"
7365  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7366    unix_path=`$CYGPATH -u "$windows_path"`
7367    new_path="$unix_path"
7368  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7369    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7370    new_path="$unix_path"
7371  fi
7372
7373  if test "x$path" != "x$new_path"; then
7374    SRC_ROOT="$new_path"
7375    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5
7376$as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;}
7377  fi
7378
7379  # Save the first 10 bytes of this path to the storage, so fixpath can work.
7380  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7381
7382  else
7383    # We're on a posix platform. Hooray! :)
7384    path="$SRC_ROOT"
7385    has_space=`$ECHO "$path" | $GREP " "`
7386    if test "x$has_space" != x; then
7387      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5
7388$as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;}
7389      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7390    fi
7391
7392    # Use eval to expand a potential ~
7393    eval path="$path"
7394    if test ! -f "$path" && test ! -d "$path"; then
7395      as_fn_error $? "The path of SRC_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
7396    fi
7397
7398    SRC_ROOT="`cd "$path"; $THEPWDCMD -L`"
7399  fi
7400
7401
7402  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7403
7404  # Input might be given as Windows format, start by converting to
7405  # unix format.
7406  path="$CURDIR"
7407  new_path=`$CYGPATH -u "$path"`
7408
7409  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7410  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7411  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7412  # "foo.exe" is OK but "foo" is an error.
7413  #
7414  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7415  # It is also a way to make sure we got the proper file name for the real test later on.
7416  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7417  if test "x$test_shortpath" = x; then
7418    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
7419$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
7420    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
7421  fi
7422
7423  # Call helper function which possibly converts this using DOS-style short mode.
7424  # If so, the updated path is stored in $new_path.
7425
7426  input_path="$new_path"
7427  # Check if we need to convert this using DOS-style short mode. If the path
7428  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7429  # take no chances and rewrite it.
7430  # Note: m4 eats our [], so we need to use [ and ] instead.
7431  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7432  if test "x$has_forbidden_chars" != x; then
7433    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7434    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7435    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7436    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7437      # Going to short mode and back again did indeed matter. Since short mode is
7438      # case insensitive, let's make it lowercase to improve readability.
7439      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7440      # Now convert it back to Unix-stile (cygpath)
7441      input_path=`$CYGPATH -u "$shortmode_path"`
7442      new_path="$input_path"
7443    fi
7444  fi
7445
7446  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7447  if test "x$test_cygdrive_prefix" = x; then
7448    # As a simple fix, exclude /usr/bin since it's not a real path.
7449    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7450      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7451      # a path prefixed by /cygdrive for fixpath to work.
7452      new_path="$CYGWIN_ROOT_PATH$input_path"
7453    fi
7454  fi
7455
7456
7457  if test "x$path" != "x$new_path"; then
7458    CURDIR="$new_path"
7459    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
7460$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
7461  fi
7462
7463  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7464
7465  path="$CURDIR"
7466  has_colon=`$ECHO $path | $GREP ^.:`
7467  new_path="$path"
7468  if test "x$has_colon" = x; then
7469    # Not in mixed or Windows style, start by that.
7470    new_path=`cmd //c echo $path`
7471  fi
7472
7473
7474  input_path="$new_path"
7475  # Check if we need to convert this using DOS-style short mode. If the path
7476  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7477  # take no chances and rewrite it.
7478  # Note: m4 eats our [], so we need to use [ and ] instead.
7479  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7480  if test "x$has_forbidden_chars" != x; then
7481    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7482    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7483  fi
7484
7485
7486  windows_path="$new_path"
7487  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7488    unix_path=`$CYGPATH -u "$windows_path"`
7489    new_path="$unix_path"
7490  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7491    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7492    new_path="$unix_path"
7493  fi
7494
7495  if test "x$path" != "x$new_path"; then
7496    CURDIR="$new_path"
7497    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
7498$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
7499  fi
7500
7501  # Save the first 10 bytes of this path to the storage, so fixpath can work.
7502  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7503
7504  else
7505    # We're on a posix platform. Hooray! :)
7506    path="$CURDIR"
7507    has_space=`$ECHO "$path" | $GREP " "`
7508    if test "x$has_space" != x; then
7509      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
7510$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
7511      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7512    fi
7513
7514    # Use eval to expand a potential ~
7515    eval path="$path"
7516    if test ! -f "$path" && test ! -d "$path"; then
7517      as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
7518    fi
7519
7520    CURDIR="`cd "$path"; $THEPWDCMD -L`"
7521  fi
7522
7523
7524  if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
7525    # Add extra search paths on solaris for utilities like ar and as etc...
7526    PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
7527  fi
7528
7529  # You can force the sys-root if the sys-root encoded into the cross compiler tools
7530  # is not correct.
7531
7532# Check whether --with-sys-root was given.
7533if test "${with_sys_root+set}" = set; then :
7534  withval=$with_sys_root;
7535fi
7536
7537
7538  if test "x$with_sys_root" != x; then
7539    SYS_ROOT=$with_sys_root
7540  else
7541    SYS_ROOT=/
7542  fi
7543
7544
7545
7546# Check whether --with-tools-dir was given.
7547if test "${with_tools_dir+set}" = set; then :
7548  withval=$with_tools_dir; TOOLS_DIR=$with_tools_dir
7549
7550fi
7551
7552
7553
7554# Check whether --with-devkit was given.
7555if test "${with_devkit+set}" = set; then :
7556  withval=$with_devkit;
7557        if test "x$with_sys_root" != x; then
7558          as_fn_error $? "Cannot specify both --with-devkit and --with-sys-root at the same time" "$LINENO" 5
7559        fi
7560
7561  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7562
7563  # Input might be given as Windows format, start by converting to
7564  # unix format.
7565  path="$with_devkit"
7566  new_path=`$CYGPATH -u "$path"`
7567
7568  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7569  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7570  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7571  # "foo.exe" is OK but "foo" is an error.
7572  #
7573  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7574  # It is also a way to make sure we got the proper file name for the real test later on.
7575  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7576  if test "x$test_shortpath" = x; then
7577    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
7578$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
7579    as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
7580  fi
7581
7582  # Call helper function which possibly converts this using DOS-style short mode.
7583  # If so, the updated path is stored in $new_path.
7584
7585  input_path="$new_path"
7586  # Check if we need to convert this using DOS-style short mode. If the path
7587  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7588  # take no chances and rewrite it.
7589  # Note: m4 eats our [], so we need to use [ and ] instead.
7590  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7591  if test "x$has_forbidden_chars" != x; then
7592    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7593    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7594    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7595    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7596      # Going to short mode and back again did indeed matter. Since short mode is
7597      # case insensitive, let's make it lowercase to improve readability.
7598      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7599      # Now convert it back to Unix-stile (cygpath)
7600      input_path=`$CYGPATH -u "$shortmode_path"`
7601      new_path="$input_path"
7602    fi
7603  fi
7604
7605  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7606  if test "x$test_cygdrive_prefix" = x; then
7607    # As a simple fix, exclude /usr/bin since it's not a real path.
7608    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7609      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7610      # a path prefixed by /cygdrive for fixpath to work.
7611      new_path="$CYGWIN_ROOT_PATH$input_path"
7612    fi
7613  fi
7614
7615
7616  if test "x$path" != "x$new_path"; then
7617    with_devkit="$new_path"
7618    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
7619$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
7620  fi
7621
7622  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7623
7624  path="$with_devkit"
7625  has_colon=`$ECHO $path | $GREP ^.:`
7626  new_path="$path"
7627  if test "x$has_colon" = x; then
7628    # Not in mixed or Windows style, start by that.
7629    new_path=`cmd //c echo $path`
7630  fi
7631
7632
7633  input_path="$new_path"
7634  # Check if we need to convert this using DOS-style short mode. If the path
7635  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7636  # take no chances and rewrite it.
7637  # Note: m4 eats our [], so we need to use [ and ] instead.
7638  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7639  if test "x$has_forbidden_chars" != x; then
7640    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7641    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7642  fi
7643
7644
7645  windows_path="$new_path"
7646  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7647    unix_path=`$CYGPATH -u "$windows_path"`
7648    new_path="$unix_path"
7649  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7650    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7651    new_path="$unix_path"
7652  fi
7653
7654  if test "x$path" != "x$new_path"; then
7655    with_devkit="$new_path"
7656    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
7657$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
7658  fi
7659
7660  # Save the first 10 bytes of this path to the storage, so fixpath can work.
7661  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7662
7663  else
7664    # We're on a posix platform. Hooray! :)
7665    path="$with_devkit"
7666    has_space=`$ECHO "$path" | $GREP " "`
7667    if test "x$has_space" != x; then
7668      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
7669$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
7670      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7671    fi
7672
7673    # Use eval to expand a potential ~
7674    eval path="$path"
7675    if test ! -f "$path" && test ! -d "$path"; then
7676      as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
7677    fi
7678
7679    with_devkit="`cd "$path"; $THEPWDCMD -L`"
7680  fi
7681
7682
7683  if test "x$TOOLS_DIR" = x; then
7684    TOOLS_DIR="$with_devkit/bin"
7685  else
7686    TOOLS_DIR="$TOOLS_DIR:$with_devkit/bin"
7687  fi
7688
7689        if test -d "$with_devkit/$host_alias/libc"; then
7690          SYS_ROOT=$with_devkit/$host_alias/libc
7691        elif test -d "$with_devkit/$host/sys-root"; then
7692          SYS_ROOT=$with_devkit/$host/sys-root
7693        fi
7694
7695fi
7696
7697
7698
7699  # Setup default logging of stdout and stderr to build.log in the output root.
7700  BUILD_LOG='$(OUTPUT_ROOT)/build.log'
7701  BUILD_LOG_PREVIOUS='$(OUTPUT_ROOT)/build.log.old'
7702  BUILD_LOG_WRAPPER='$(BASH) $(SRC_ROOT)/common/bin/logger.sh $(BUILD_LOG)'
7703
7704
7705
7706
7707
7708# Check if it's a pure open build or if custom sources are to be used.
7709
7710  # Check whether --enable-openjdk-only was given.
7711if test "${enable_openjdk_only+set}" = set; then :
7712  enableval=$enable_openjdk_only;
7713else
7714  enable_openjdk_only="no"
7715fi
7716
7717
7718  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
7719$as_echo_n "checking for presence of closed sources... " >&6; }
7720  if test -d "$SRC_ROOT/jdk/src/closed"; then
7721    CLOSED_SOURCE_PRESENT=yes
7722  else
7723    CLOSED_SOURCE_PRESENT=no
7724  fi
7725  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
7726$as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
7727
7728  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
7729$as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
7730  SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
7731  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
7732$as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
7733
7734  if test "x$CLOSED_SOURCE_PRESENT" = xno; then
7735    OPENJDK=true
7736    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
7737      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
7738$as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
7739    fi
7740  else
7741    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
7742      OPENJDK=true
7743    else
7744      OPENJDK=false
7745    fi
7746  fi
7747
7748  if test "x$OPENJDK" = "xtrue"; then
7749    SET_OPENJDK="OPENJDK=true"
7750  fi
7751
7752
7753
7754
7755# These are needed to be able to create a configuration name (and thus the output directory)
7756
7757  ###############################################################################
7758  #
7759  # Check which variant of the JDK that we want to build.
7760  # Currently we have:
7761  #    normal:   standard edition
7762  # but the custom make system may add other variants
7763  #
7764  # Effectively the JDK variant gives a name to a specific set of
7765  # modules to compile into the JDK. In the future, these modules
7766  # might even be Jigsaw modules.
7767  #
7768  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
7769$as_echo_n "checking which variant of the JDK to build... " >&6; }
7770
7771# Check whether --with-jdk-variant was given.
7772if test "${with_jdk_variant+set}" = set; then :
7773  withval=$with_jdk_variant;
7774fi
7775
7776
7777  if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
7778    JDK_VARIANT="normal"
7779  else
7780    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
7781  fi
7782
7783
7784
7785  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
7786$as_echo "$JDK_VARIANT" >&6; }
7787
7788
7789
7790  ###############################################################################
7791  #
7792  # Check which variants of the JVM that we want to build.
7793  # Currently we have:
7794  #    server: normal interpreter and a tiered C1/C2 compiler
7795  #    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
7796  #    minimal1: reduced form of client with optional VM services and features stripped out
7797  #    kernel: kernel footprint JVM that passes the TCK without major performance problems,
7798  #             ie normal interpreter and C1, only the serial GC, kernel jvmti etc
7799  #    zero: no machine code interpreter, no compiler
7800  #    zeroshark: zero interpreter and shark/llvm compiler backend
7801  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
7802$as_echo_n "checking which variants of the JVM to build... " >&6; }
7803
7804# Check whether --with-jvm-variants was given.
7805if test "${with_jvm_variants+set}" = set; then :
7806  withval=$with_jvm_variants;
7807fi
7808
7809
7810  if test "x$with_jvm_variants" = x; then
7811    with_jvm_variants="server"
7812  fi
7813
7814  JVM_VARIANTS=",$with_jvm_variants,"
7815  TEST_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,//' -e 's/client,//'  -e 's/minimal1,//' -e 's/kernel,//' -e 's/zero,//' -e 's/zeroshark,//'`
7816
7817  if test "x$TEST_VARIANTS" != "x,"; then
7818    as_fn_error $? "The available JVM variants are: server, client, minimal1, kernel, zero, zeroshark" "$LINENO" 5
7819  fi
7820  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
7821$as_echo "$with_jvm_variants" >&6; }
7822
7823  JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
7824  JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
7825  JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
7826  JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
7827  JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
7828  JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
7829
7830  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
7831    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7832      as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
7833    fi
7834  fi
7835  if test "x$JVM_VARIANT_KERNEL" = xtrue; then
7836    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7837      as_fn_error $? "You cannot build a kernel JVM for a 64-bit machine." "$LINENO" 5
7838    fi
7839  fi
7840  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
7841    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7842      as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
7843    fi
7844  fi
7845
7846  # Replace the commas with AND for use in the build directory name.
7847  ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/'`
7848  COUNT_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,/1/' -e 's/client,/1/' -e 's/minimal1,/1/' -e 's/kernel,/1/' -e 's/zero,/1/' -e 's/zeroshark,/1/'`
7849  if test "x$COUNT_VARIANTS" != "x,1"; then
7850    BUILDING_MULTIPLE_JVM_VARIANTS=yes
7851  else
7852    BUILDING_MULTIPLE_JVM_VARIANTS=no
7853  fi
7854
7855
7856
7857
7858
7859
7860
7861
7862
7863  INCLUDE_SA=true
7864  if test "x$JVM_VARIANT_ZERO" = xtrue ; then
7865    INCLUDE_SA=false
7866  fi
7867  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then
7868    INCLUDE_SA=false
7869  fi
7870
7871
7872  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
7873    MACOSX_UNIVERSAL="true"
7874  fi
7875
7876
7877
7878
7879  ###############################################################################
7880  #
7881  # Set the debug level
7882  #    release: no debug information, all optimizations, no asserts.
7883  #    fastdebug: debug information (-g), all optimizations, all asserts
7884  #    slowdebug: debug information (-g), no optimizations, all asserts
7885  #
7886  DEBUG_LEVEL="release"
7887  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
7888$as_echo_n "checking which debug level to use... " >&6; }
7889  # Check whether --enable-debug was given.
7890if test "${enable_debug+set}" = set; then :
7891  enableval=$enable_debug;
7892        ENABLE_DEBUG="${enableval}"
7893        DEBUG_LEVEL="fastdebug"
7894
7895else
7896  ENABLE_DEBUG="no"
7897fi
7898
7899
7900
7901# Check whether --with-debug-level was given.
7902if test "${with_debug_level+set}" = set; then :
7903  withval=$with_debug_level;
7904        DEBUG_LEVEL="${withval}"
7905        if test "x$ENABLE_DEBUG" = xyes; then
7906          as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
7907        fi
7908
7909fi
7910
7911  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
7912$as_echo "$DEBUG_LEVEL" >&6; }
7913
7914  if test "x$DEBUG_LEVEL" != xrelease && \
7915      test "x$DEBUG_LEVEL" != xfastdebug && \
7916      test "x$DEBUG_LEVEL" != xslowdebug; then
7917    as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
7918  fi
7919
7920
7921  ###############################################################################
7922  #
7923  # Setup legacy vars/targets and new vars to deal with different debug levels.
7924  #
7925
7926  case $DEBUG_LEVEL in
7927    release )
7928      VARIANT="OPT"
7929      FASTDEBUG="false"
7930      DEBUG_CLASSFILES="false"
7931      BUILD_VARIANT_RELEASE=""
7932      HOTSPOT_DEBUG_LEVEL="product"
7933      HOTSPOT_EXPORT="product"
7934      ;;
7935    fastdebug )
7936      VARIANT="DBG"
7937      FASTDEBUG="true"
7938      DEBUG_CLASSFILES="true"
7939      BUILD_VARIANT_RELEASE="-fastdebug"
7940      HOTSPOT_DEBUG_LEVEL="fastdebug"
7941      HOTSPOT_EXPORT="fastdebug"
7942      ;;
7943    slowdebug )
7944      VARIANT="DBG"
7945      FASTDEBUG="false"
7946      DEBUG_CLASSFILES="true"
7947      BUILD_VARIANT_RELEASE="-debug"
7948      HOTSPOT_DEBUG_LEVEL="jvmg"
7949      HOTSPOT_EXPORT="debug"
7950      ;;
7951  esac
7952
7953  #####
7954  # Generate the legacy makefile targets for hotspot.
7955  # The hotspot api for selecting the build artifacts, really, needs to be improved.
7956  # JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
7957  # determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
7958  # But until then ...
7959  HOTSPOT_TARGET=""
7960
7961  if test "x$JVM_VARIANT_SERVER" = xtrue; then
7962    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
7963  fi
7964
7965  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
7966    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
7967  fi
7968
7969  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
7970    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
7971  fi
7972
7973  if test "x$JVM_VARIANT_KERNEL" = xtrue; then
7974    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
7975  fi
7976
7977  if test "x$JVM_VARIANT_ZERO" = xtrue; then
7978    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
7979  fi
7980
7981  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
7982    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
7983  fi
7984
7985  HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
7986
7987  # On Macosx universal binaries are produced, but they only contain
7988  # 64 bit intel. This invalidates control of which jvms are built
7989  # from configure, but only server is valid anyway. Fix this
7990  # when hotspot makefiles are rewritten.
7991  if test "x$MACOSX_UNIVERSAL" = xtrue; then
7992    HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
7993  fi
7994
7995  #####
7996
7997
7998
7999
8000
8001
8002
8003
8004# With basic setup done, call the custom early hook.
8005
8006
8007# To properly create a configuration name, we need to have the OpenJDK target
8008# and options (variants and debug level) parsed.
8009
8010
8011
8012# Check whether --with-conf-name was given.
8013if test "${with_conf_name+set}" = set; then :
8014  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
8015fi
8016
8017
8018  # Test from where we are running configure, in or outside of src root.
8019  if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
8020      || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
8021      || test "x$CURDIR" = "x$SRC_ROOT/common/makefiles" ; then
8022    # We are running configure from the src root.
8023    # Create a default ./build/target-variant-debuglevel output root.
8024    if test "x${CONF_NAME}" = x; then
8025      CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
8026    fi
8027    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
8028    $MKDIR -p "$OUTPUT_ROOT"
8029    if test ! -d "$OUTPUT_ROOT"; then
8030      as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
8031    fi
8032  else
8033    # We are running configure from outside of the src dir.
8034    # Then use the current directory as output dir!
8035    # If configuration is situated in normal build directory, just use the build
8036    # directory name as configuration name, otherwise use the complete path.
8037    if test "x${CONF_NAME}" = x; then
8038      CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
8039    fi
8040    OUTPUT_ROOT="$CURDIR"
8041
8042    # WARNING: This might be a bad thing to do. You need to be sure you want to
8043    # have a configuration in this directory. Do some sanity checks!
8044
8045    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
8046      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
8047      # other files
8048      files_present=`$LS $OUTPUT_ROOT`
8049      # Configure has already touched config.log and confdefs.h in the current dir when this check
8050      # is performed.
8051      filtered_files=`$ECHO "$files_present" | $SED -e 's/config.log//g' -e 's/confdefs.h//g' -e 's/ //g' \
8052      | $TR -d '\n'`
8053      if test "x$filtered_files" != x; then
8054        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
8055$as_echo "$as_me: Current directory is $CURDIR." >&6;}
8056        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
8057$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
8058        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
8059$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
8060        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
8061$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
8062        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
8063$as_echo "$as_me: seriously mess up just about everything." >&6;}
8064        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
8065$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
8066        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
8067$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
8068        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
8069      fi
8070    fi
8071  fi
8072  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
8073$as_echo_n "checking what configuration name to use... " >&6; }
8074  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
8075$as_echo "$CONF_NAME" >&6; }
8076
8077
8078  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8079
8080  # Input might be given as Windows format, start by converting to
8081  # unix format.
8082  path="$OUTPUT_ROOT"
8083  new_path=`$CYGPATH -u "$path"`
8084
8085  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8086  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8087  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8088  # "foo.exe" is OK but "foo" is an error.
8089  #
8090  # This test is therefore slightly more accurate than "test -f" to check for file precense.
8091  # It is also a way to make sure we got the proper file name for the real test later on.
8092  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8093  if test "x$test_shortpath" = x; then
8094    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
8095$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
8096    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
8097  fi
8098
8099  # Call helper function which possibly converts this using DOS-style short mode.
8100  # If so, the updated path is stored in $new_path.
8101
8102  input_path="$new_path"
8103  # Check if we need to convert this using DOS-style short mode. If the path
8104  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8105  # take no chances and rewrite it.
8106  # Note: m4 eats our [], so we need to use [ and ] instead.
8107  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8108  if test "x$has_forbidden_chars" != x; then
8109    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8110    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8111    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8112    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8113      # Going to short mode and back again did indeed matter. Since short mode is
8114      # case insensitive, let's make it lowercase to improve readability.
8115      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8116      # Now convert it back to Unix-stile (cygpath)
8117      input_path=`$CYGPATH -u "$shortmode_path"`
8118      new_path="$input_path"
8119    fi
8120  fi
8121
8122  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8123  if test "x$test_cygdrive_prefix" = x; then
8124    # As a simple fix, exclude /usr/bin since it's not a real path.
8125    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
8126      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8127      # a path prefixed by /cygdrive for fixpath to work.
8128      new_path="$CYGWIN_ROOT_PATH$input_path"
8129    fi
8130  fi
8131
8132
8133  if test "x$path" != "x$new_path"; then
8134    OUTPUT_ROOT="$new_path"
8135    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
8136$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
8137  fi
8138
8139  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8140
8141  path="$OUTPUT_ROOT"
8142  has_colon=`$ECHO $path | $GREP ^.:`
8143  new_path="$path"
8144  if test "x$has_colon" = x; then
8145    # Not in mixed or Windows style, start by that.
8146    new_path=`cmd //c echo $path`
8147  fi
8148
8149
8150  input_path="$new_path"
8151  # Check if we need to convert this using DOS-style short mode. If the path
8152  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8153  # take no chances and rewrite it.
8154  # Note: m4 eats our [], so we need to use [ and ] instead.
8155  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8156  if test "x$has_forbidden_chars" != x; then
8157    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8158    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8159  fi
8160
8161
8162  windows_path="$new_path"
8163  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8164    unix_path=`$CYGPATH -u "$windows_path"`
8165    new_path="$unix_path"
8166  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8167    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8168    new_path="$unix_path"
8169  fi
8170
8171  if test "x$path" != "x$new_path"; then
8172    OUTPUT_ROOT="$new_path"
8173    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
8174$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
8175  fi
8176
8177  # Save the first 10 bytes of this path to the storage, so fixpath can work.
8178  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8179
8180  else
8181    # We're on a posix platform. Hooray! :)
8182    path="$OUTPUT_ROOT"
8183    has_space=`$ECHO "$path" | $GREP " "`
8184    if test "x$has_space" != x; then
8185      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
8186$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
8187      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
8188    fi
8189
8190    # Use eval to expand a potential ~
8191    eval path="$path"
8192    if test ! -f "$path" && test ! -d "$path"; then
8193      as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
8194    fi
8195
8196    OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
8197  fi
8198
8199
8200  SPEC=$OUTPUT_ROOT/spec.gmk
8201
8202  CONF_NAME=$CONF_NAME
8203
8204  OUTPUT_ROOT=$OUTPUT_ROOT
8205
8206
8207  # Most of the probed defines are put into config.h
8208  ac_config_headers="$ac_config_headers $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in"
8209
8210  # The spec.gmk file contains all variables for the make system.
8211  ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
8212
8213  # The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
8214  ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
8215
8216  # The bootcycle-spec.gmk file contains support for boot cycle builds.
8217  ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
8218
8219  # The compare.sh is used to compare the build output to other builds.
8220  ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
8221
8222  # Spec.sh is currently used by compare-objects.sh
8223  ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in"
8224
8225  # The generated Makefile knows where the spec.gmk is and where the source is.
8226  # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
8227  # which will look for generated configurations
8228  ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
8229
8230
8231  # Save the arguments given to us
8232  echo "$CONFIGURE_COMMAND_LINE" > $OUTPUT_ROOT/configure-arguments
8233
8234
8235# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
8236
8237  for ac_prog in apt-get yum port pkgutil pkgadd
8238do
8239  # Extract the first word of "$ac_prog", so it can be a program name with args.
8240set dummy $ac_prog; ac_word=$2
8241{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8242$as_echo_n "checking for $ac_word... " >&6; }
8243if ${ac_cv_prog_PKGHANDLER+:} false; then :
8244  $as_echo_n "(cached) " >&6
8245else
8246  if test -n "$PKGHANDLER"; then
8247  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
8248else
8249as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8250for as_dir in $PATH
8251do
8252  IFS=$as_save_IFS
8253  test -z "$as_dir" && as_dir=.
8254    for ac_exec_ext in '' $ac_executable_extensions; do
8255  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8256    ac_cv_prog_PKGHANDLER="$ac_prog"
8257    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8258    break 2
8259  fi
8260done
8261  done
8262IFS=$as_save_IFS
8263
8264fi
8265fi
8266PKGHANDLER=$ac_cv_prog_PKGHANDLER
8267if test -n "$PKGHANDLER"; then
8268  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
8269$as_echo "$PKGHANDLER" >&6; }
8270else
8271  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8272$as_echo "no" >&6; }
8273fi
8274
8275
8276  test -n "$PKGHANDLER" && break
8277done
8278
8279
8280
8281# Setup tools that requires more complex handling, or that is not needed by the configure script.
8282
8283
8284  # We need to find a recent version of GNU make. Especially on Solaris, this can be tricky.
8285  if test "x$MAKE" != x; then
8286    # User has supplied a make, test it.
8287    if test ! -f "$MAKE"; then
8288      as_fn_error $? "The specified make (by MAKE=$MAKE) is not found." "$LINENO" 5
8289    fi
8290
8291  MAKE_CANDIDATE=""$MAKE""
8292  DESCRIPTION="user supplied MAKE=$MAKE"
8293  if test "x$MAKE_CANDIDATE" != x; then
8294    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8295$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8296    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8297    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8298    if test "x$IS_GNU_MAKE" = x; then
8299      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8300$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8301    else
8302      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '\(3\.8[12]\)\|\(4\.\)'`
8303      if test "x$IS_MODERN_MAKE" = x; then
8304        { $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
8305$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;}
8306      else
8307        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8308          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8309            MAKE_EXPECTED_ENV='cygwin'
8310          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8311            MAKE_EXPECTED_ENV='msys'
8312          else
8313            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8314          fi
8315          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8316          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8317        else
8318          # Not relevant for non-Windows
8319          IS_MAKE_CORRECT_ENV=true
8320        fi
8321        if test "x$IS_MAKE_CORRECT_ENV" = x; then
8322          { $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
8323$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;}
8324        else
8325          FOUND_MAKE=$MAKE_CANDIDATE
8326
8327  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8328
8329  # First separate the path from the arguments. This will split at the first
8330  # space.
8331  complete="$FOUND_MAKE"
8332  path="${complete%% *}"
8333  tmp="$complete EOL"
8334  arguments="${tmp#* }"
8335
8336  # Input might be given as Windows format, start by converting to
8337  # unix format.
8338  new_path=`$CYGPATH -u "$path"`
8339
8340  # Now try to locate executable using which
8341  new_path=`$WHICH "$new_path" 2> /dev/null`
8342  # bat and cmd files are not always considered executable in cygwin causing which
8343  # to not find them
8344  if test "x$new_path" = x \
8345      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8346      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8347    new_path=`$CYGPATH -u "$path"`
8348  fi
8349  if test "x$new_path" = x; then
8350    # Oops. Which didn't find the executable.
8351    # The splitting of arguments from the executable at a space might have been incorrect,
8352    # since paths with space are more likely in Windows. Give it another try with the whole
8353    # argument.
8354    path="$complete"
8355    arguments="EOL"
8356    new_path=`$CYGPATH -u "$path"`
8357    new_path=`$WHICH "$new_path" 2> /dev/null`
8358    # bat and cmd files are not always considered executable in cygwin causing which
8359    # to not find them
8360    if test "x$new_path" = x \
8361        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8362        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8363      new_path=`$CYGPATH -u "$path"`
8364    fi
8365    if test "x$new_path" = x; then
8366      # It's still not found. Now this is an unrecoverable error.
8367      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8368$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8369      has_space=`$ECHO "$complete" | $GREP " "`
8370      if test "x$has_space" != x; then
8371        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8372$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8373      fi
8374      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8375    fi
8376  fi
8377
8378  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8379  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8380  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8381  # "foo.exe" is OK but "foo" is an error.
8382  #
8383  # This test is therefore slightly more accurate than "test -f" to check for file presence.
8384  # It is also a way to make sure we got the proper file name for the real test later on.
8385  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8386  if test "x$test_shortpath" = x; then
8387    # Short path failed, file does not exist as specified.
8388    # Try adding .exe or .cmd
8389    if test -f "${new_path}.exe"; then
8390      input_to_shortpath="${new_path}.exe"
8391    elif test -f "${new_path}.cmd"; then
8392      input_to_shortpath="${new_path}.cmd"
8393    else
8394      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8395$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8396      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8397$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8398      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8399    fi
8400  else
8401    input_to_shortpath="$new_path"
8402  fi
8403
8404  # Call helper function which possibly converts this using DOS-style short mode.
8405  # If so, the updated path is stored in $new_path.
8406  new_path="$input_to_shortpath"
8407
8408  input_path="$input_to_shortpath"
8409  # Check if we need to convert this using DOS-style short mode. If the path
8410  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8411  # take no chances and rewrite it.
8412  # Note: m4 eats our [], so we need to use [ and ] instead.
8413  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8414  if test "x$has_forbidden_chars" != x; then
8415    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8416    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8417    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8418    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8419      # Going to short mode and back again did indeed matter. Since short mode is
8420      # case insensitive, let's make it lowercase to improve readability.
8421      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8422      # Now convert it back to Unix-stile (cygpath)
8423      input_path=`$CYGPATH -u "$shortmode_path"`
8424      new_path="$input_path"
8425    fi
8426  fi
8427
8428  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8429  if test "x$test_cygdrive_prefix" = x; then
8430    # As a simple fix, exclude /usr/bin since it's not a real path.
8431    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8432      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8433      # a path prefixed by /cygdrive for fixpath to work.
8434      new_path="$CYGWIN_ROOT_PATH$input_path"
8435    fi
8436  fi
8437
8438  # remove trailing .exe if any
8439  new_path="${new_path/%.exe/}"
8440
8441  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8442
8443  # First separate the path from the arguments. This will split at the first
8444  # space.
8445  complete="$FOUND_MAKE"
8446  path="${complete%% *}"
8447  tmp="$complete EOL"
8448  arguments="${tmp#* }"
8449
8450  # Input might be given as Windows format, start by converting to
8451  # unix format.
8452  new_path="$path"
8453
8454  windows_path="$new_path"
8455  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8456    unix_path=`$CYGPATH -u "$windows_path"`
8457    new_path="$unix_path"
8458  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8459    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8460    new_path="$unix_path"
8461  fi
8462
8463
8464  # Now try to locate executable using which
8465  new_path=`$WHICH "$new_path" 2> /dev/null`
8466
8467  if test "x$new_path" = x; then
8468    # Oops. Which didn't find the executable.
8469    # The splitting of arguments from the executable at a space might have been incorrect,
8470    # since paths with space are more likely in Windows. Give it another try with the whole
8471    # argument.
8472    path="$complete"
8473    arguments="EOL"
8474    new_path="$path"
8475
8476  windows_path="$new_path"
8477  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8478    unix_path=`$CYGPATH -u "$windows_path"`
8479    new_path="$unix_path"
8480  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8481    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8482    new_path="$unix_path"
8483  fi
8484
8485
8486    new_path=`$WHICH "$new_path" 2> /dev/null`
8487
8488    if test "x$new_path" = x; then
8489      # It's still not found. Now this is an unrecoverable error.
8490      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8491$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8492      has_space=`$ECHO "$complete" | $GREP " "`
8493      if test "x$has_space" != x; then
8494        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8495$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8496      fi
8497      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8498    fi
8499  fi
8500
8501  # Now new_path has a complete unix path to the binary
8502  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8503    # Keep paths in /bin as-is, but remove trailing .exe if any
8504    new_path="${new_path/%.exe/}"
8505    # Do not save /bin paths to all_fixpath_prefixes!
8506  else
8507    # Not in mixed or Windows style, start by that.
8508    new_path=`cmd //c echo $new_path`
8509
8510  input_path="$new_path"
8511  # Check if we need to convert this using DOS-style short mode. If the path
8512  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8513  # take no chances and rewrite it.
8514  # Note: m4 eats our [], so we need to use [ and ] instead.
8515  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8516  if test "x$has_forbidden_chars" != x; then
8517    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8518    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8519  fi
8520
8521    # Output is in $new_path
8522
8523  windows_path="$new_path"
8524  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8525    unix_path=`$CYGPATH -u "$windows_path"`
8526    new_path="$unix_path"
8527  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8528    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8529    new_path="$unix_path"
8530  fi
8531
8532    # remove trailing .exe if any
8533    new_path="${new_path/%.exe/}"
8534
8535    # Save the first 10 bytes of this path to the storage, so fixpath can work.
8536    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8537  fi
8538
8539  else
8540    # We're on a posix platform. Hooray! :)
8541    # First separate the path from the arguments. This will split at the first
8542    # space.
8543    complete="$FOUND_MAKE"
8544    path="${complete%% *}"
8545    tmp="$complete EOL"
8546    arguments="${tmp#* }"
8547
8548    # Cannot rely on the command "which" here since it doesn't always work.
8549    is_absolute_path=`$ECHO "$path" | $GREP ^/`
8550    if test -z "$is_absolute_path"; then
8551      # Path to executable is not absolute. Find it.
8552      IFS_save="$IFS"
8553      IFS=:
8554      for p in $PATH; do
8555        if test -f "$p/$path" && test -x "$p/$path"; then
8556          new_path="$p/$path"
8557          break
8558        fi
8559      done
8560      IFS="$IFS_save"
8561    else
8562      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
8563$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
8564      new_path="$path"
8565    fi
8566
8567    if test "x$new_path" = x; then
8568      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8569$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8570      has_space=`$ECHO "$complete" | $GREP " "`
8571      if test "x$has_space" != x; then
8572        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
8573$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
8574      fi
8575      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8576    fi
8577  fi
8578
8579  # Now join together the path and the arguments once again
8580  if test "x$arguments" != xEOL; then
8581    new_complete="$new_path ${arguments% *}"
8582  else
8583    new_complete="$new_path"
8584  fi
8585
8586  if test "x$complete" != "x$new_complete"; then
8587    FOUND_MAKE="$new_complete"
8588    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
8589$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
8590  fi
8591
8592        fi
8593      fi
8594    fi
8595  fi
8596
8597    if test "x$FOUND_MAKE" = x; then
8598      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make 3.81 or newer." "$LINENO" 5
8599    fi
8600  else
8601    # Try our hardest to locate a correct version of GNU make
8602    for ac_prog in gmake
8603do
8604  # Extract the first word of "$ac_prog", so it can be a program name with args.
8605set dummy $ac_prog; ac_word=$2
8606{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8607$as_echo_n "checking for $ac_word... " >&6; }
8608if ${ac_cv_path_CHECK_GMAKE+:} false; then :
8609  $as_echo_n "(cached) " >&6
8610else
8611  case $CHECK_GMAKE in
8612  [\\/]* | ?:[\\/]*)
8613  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
8614  ;;
8615  *)
8616  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8617for as_dir in $PATH
8618do
8619  IFS=$as_save_IFS
8620  test -z "$as_dir" && as_dir=.
8621    for ac_exec_ext in '' $ac_executable_extensions; do
8622  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8623    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
8624    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8625    break 2
8626  fi
8627done
8628  done
8629IFS=$as_save_IFS
8630
8631  ;;
8632esac
8633fi
8634CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
8635if test -n "$CHECK_GMAKE"; then
8636  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
8637$as_echo "$CHECK_GMAKE" >&6; }
8638else
8639  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8640$as_echo "no" >&6; }
8641fi
8642
8643
8644  test -n "$CHECK_GMAKE" && break
8645done
8646
8647
8648  MAKE_CANDIDATE=""$CHECK_GMAKE""
8649  DESCRIPTION="gmake in PATH"
8650  if test "x$MAKE_CANDIDATE" != x; then
8651    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8652$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8653    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8654    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8655    if test "x$IS_GNU_MAKE" = x; then
8656      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8657$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8658    else
8659      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '\(3\.8[12]\)\|\(4\.\)'`
8660      if test "x$IS_MODERN_MAKE" = x; then
8661        { $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
8662$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;}
8663      else
8664        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8665          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8666            MAKE_EXPECTED_ENV='cygwin'
8667          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8668            MAKE_EXPECTED_ENV='msys'
8669          else
8670            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8671          fi
8672          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8673          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8674        else
8675          # Not relevant for non-Windows
8676          IS_MAKE_CORRECT_ENV=true
8677        fi
8678        if test "x$IS_MAKE_CORRECT_ENV" = x; then
8679          { $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
8680$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;}
8681        else
8682          FOUND_MAKE=$MAKE_CANDIDATE
8683
8684  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8685
8686  # First separate the path from the arguments. This will split at the first
8687  # space.
8688  complete="$FOUND_MAKE"
8689  path="${complete%% *}"
8690  tmp="$complete EOL"
8691  arguments="${tmp#* }"
8692
8693  # Input might be given as Windows format, start by converting to
8694  # unix format.
8695  new_path=`$CYGPATH -u "$path"`
8696
8697  # Now try to locate executable using which
8698  new_path=`$WHICH "$new_path" 2> /dev/null`
8699  # bat and cmd files are not always considered executable in cygwin causing which
8700  # to not find them
8701  if test "x$new_path" = x \
8702      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8703      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8704    new_path=`$CYGPATH -u "$path"`
8705  fi
8706  if test "x$new_path" = x; then
8707    # Oops. Which didn't find the executable.
8708    # The splitting of arguments from the executable at a space might have been incorrect,
8709    # since paths with space are more likely in Windows. Give it another try with the whole
8710    # argument.
8711    path="$complete"
8712    arguments="EOL"
8713    new_path=`$CYGPATH -u "$path"`
8714    new_path=`$WHICH "$new_path" 2> /dev/null`
8715    # bat and cmd files are not always considered executable in cygwin causing which
8716    # to not find them
8717    if test "x$new_path" = x \
8718        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8719        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8720      new_path=`$CYGPATH -u "$path"`
8721    fi
8722    if test "x$new_path" = x; then
8723      # It's still not found. Now this is an unrecoverable error.
8724      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8725$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8726      has_space=`$ECHO "$complete" | $GREP " "`
8727      if test "x$has_space" != x; then
8728        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8729$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8730      fi
8731      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8732    fi
8733  fi
8734
8735  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8736  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8737  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8738  # "foo.exe" is OK but "foo" is an error.
8739  #
8740  # This test is therefore slightly more accurate than "test -f" to check for file presence.
8741  # It is also a way to make sure we got the proper file name for the real test later on.
8742  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8743  if test "x$test_shortpath" = x; then
8744    # Short path failed, file does not exist as specified.
8745    # Try adding .exe or .cmd
8746    if test -f "${new_path}.exe"; then
8747      input_to_shortpath="${new_path}.exe"
8748    elif test -f "${new_path}.cmd"; then
8749      input_to_shortpath="${new_path}.cmd"
8750    else
8751      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8752$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8753      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8754$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8755      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8756    fi
8757  else
8758    input_to_shortpath="$new_path"
8759  fi
8760
8761  # Call helper function which possibly converts this using DOS-style short mode.
8762  # If so, the updated path is stored in $new_path.
8763  new_path="$input_to_shortpath"
8764
8765  input_path="$input_to_shortpath"
8766  # Check if we need to convert this using DOS-style short mode. If the path
8767  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8768  # take no chances and rewrite it.
8769  # Note: m4 eats our [], so we need to use [ and ] instead.
8770  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8771  if test "x$has_forbidden_chars" != x; then
8772    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8773    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8774    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8775    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8776      # Going to short mode and back again did indeed matter. Since short mode is
8777      # case insensitive, let's make it lowercase to improve readability.
8778      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8779      # Now convert it back to Unix-stile (cygpath)
8780      input_path=`$CYGPATH -u "$shortmode_path"`
8781      new_path="$input_path"
8782    fi
8783  fi
8784
8785  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8786  if test "x$test_cygdrive_prefix" = x; then
8787    # As a simple fix, exclude /usr/bin since it's not a real path.
8788    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8789      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8790      # a path prefixed by /cygdrive for fixpath to work.
8791      new_path="$CYGWIN_ROOT_PATH$input_path"
8792    fi
8793  fi
8794
8795  # remove trailing .exe if any
8796  new_path="${new_path/%.exe/}"
8797
8798  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8799
8800  # First separate the path from the arguments. This will split at the first
8801  # space.
8802  complete="$FOUND_MAKE"
8803  path="${complete%% *}"
8804  tmp="$complete EOL"
8805  arguments="${tmp#* }"
8806
8807  # Input might be given as Windows format, start by converting to
8808  # unix format.
8809  new_path="$path"
8810
8811  windows_path="$new_path"
8812  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8813    unix_path=`$CYGPATH -u "$windows_path"`
8814    new_path="$unix_path"
8815  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8816    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8817    new_path="$unix_path"
8818  fi
8819
8820
8821  # Now try to locate executable using which
8822  new_path=`$WHICH "$new_path" 2> /dev/null`
8823
8824  if test "x$new_path" = x; then
8825    # Oops. Which didn't find the executable.
8826    # The splitting of arguments from the executable at a space might have been incorrect,
8827    # since paths with space are more likely in Windows. Give it another try with the whole
8828    # argument.
8829    path="$complete"
8830    arguments="EOL"
8831    new_path="$path"
8832
8833  windows_path="$new_path"
8834  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8835    unix_path=`$CYGPATH -u "$windows_path"`
8836    new_path="$unix_path"
8837  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8838    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8839    new_path="$unix_path"
8840  fi
8841
8842
8843    new_path=`$WHICH "$new_path" 2> /dev/null`
8844
8845    if test "x$new_path" = x; then
8846      # It's still not found. Now this is an unrecoverable error.
8847      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8848$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8849      has_space=`$ECHO "$complete" | $GREP " "`
8850      if test "x$has_space" != x; then
8851        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8852$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8853      fi
8854      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8855    fi
8856  fi
8857
8858  # Now new_path has a complete unix path to the binary
8859  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8860    # Keep paths in /bin as-is, but remove trailing .exe if any
8861    new_path="${new_path/%.exe/}"
8862    # Do not save /bin paths to all_fixpath_prefixes!
8863  else
8864    # Not in mixed or Windows style, start by that.
8865    new_path=`cmd //c echo $new_path`
8866
8867  input_path="$new_path"
8868  # Check if we need to convert this using DOS-style short mode. If the path
8869  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8870  # take no chances and rewrite it.
8871  # Note: m4 eats our [], so we need to use [ and ] instead.
8872  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8873  if test "x$has_forbidden_chars" != x; then
8874    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8875    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8876  fi
8877
8878    # Output is in $new_path
8879
8880  windows_path="$new_path"
8881  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8882    unix_path=`$CYGPATH -u "$windows_path"`
8883    new_path="$unix_path"
8884  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8885    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8886    new_path="$unix_path"
8887  fi
8888
8889    # remove trailing .exe if any
8890    new_path="${new_path/%.exe/}"
8891
8892    # Save the first 10 bytes of this path to the storage, so fixpath can work.
8893    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8894  fi
8895
8896  else
8897    # We're on a posix platform. Hooray! :)
8898    # First separate the path from the arguments. This will split at the first
8899    # space.
8900    complete="$FOUND_MAKE"
8901    path="${complete%% *}"
8902    tmp="$complete EOL"
8903    arguments="${tmp#* }"
8904
8905    # Cannot rely on the command "which" here since it doesn't always work.
8906    is_absolute_path=`$ECHO "$path" | $GREP ^/`
8907    if test -z "$is_absolute_path"; then
8908      # Path to executable is not absolute. Find it.
8909      IFS_save="$IFS"
8910      IFS=:
8911      for p in $PATH; do
8912        if test -f "$p/$path" && test -x "$p/$path"; then
8913          new_path="$p/$path"
8914          break
8915        fi
8916      done
8917      IFS="$IFS_save"
8918    else
8919      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
8920$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
8921      new_path="$path"
8922    fi
8923
8924    if test "x$new_path" = x; then
8925      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8926$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8927      has_space=`$ECHO "$complete" | $GREP " "`
8928      if test "x$has_space" != x; then
8929        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
8930$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
8931      fi
8932      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8933    fi
8934  fi
8935
8936  # Now join together the path and the arguments once again
8937  if test "x$arguments" != xEOL; then
8938    new_complete="$new_path ${arguments% *}"
8939  else
8940    new_complete="$new_path"
8941  fi
8942
8943  if test "x$complete" != "x$new_complete"; then
8944    FOUND_MAKE="$new_complete"
8945    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
8946$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
8947  fi
8948
8949        fi
8950      fi
8951    fi
8952  fi
8953
8954
8955    if test "x$FOUND_MAKE" = x; then
8956      for ac_prog in make
8957do
8958  # Extract the first word of "$ac_prog", so it can be a program name with args.
8959set dummy $ac_prog; ac_word=$2
8960{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8961$as_echo_n "checking for $ac_word... " >&6; }
8962if ${ac_cv_path_CHECK_MAKE+:} false; then :
8963  $as_echo_n "(cached) " >&6
8964else
8965  case $CHECK_MAKE in
8966  [\\/]* | ?:[\\/]*)
8967  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
8968  ;;
8969  *)
8970  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8971for as_dir in $PATH
8972do
8973  IFS=$as_save_IFS
8974  test -z "$as_dir" && as_dir=.
8975    for ac_exec_ext in '' $ac_executable_extensions; do
8976  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8977    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
8978    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8979    break 2
8980  fi
8981done
8982  done
8983IFS=$as_save_IFS
8984
8985  ;;
8986esac
8987fi
8988CHECK_MAKE=$ac_cv_path_CHECK_MAKE
8989if test -n "$CHECK_MAKE"; then
8990  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
8991$as_echo "$CHECK_MAKE" >&6; }
8992else
8993  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8994$as_echo "no" >&6; }
8995fi
8996
8997
8998  test -n "$CHECK_MAKE" && break
8999done
9000
9001
9002  MAKE_CANDIDATE=""$CHECK_MAKE""
9003  DESCRIPTION="make in PATH"
9004  if test "x$MAKE_CANDIDATE" != x; then
9005    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
9006$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
9007    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
9008    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
9009    if test "x$IS_GNU_MAKE" = x; then
9010      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
9011$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
9012    else
9013      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '\(3\.8[12]\)\|\(4\.\)'`
9014      if test "x$IS_MODERN_MAKE" = x; then
9015        { $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
9016$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;}
9017      else
9018        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9019          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9020            MAKE_EXPECTED_ENV='cygwin'
9021          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9022            MAKE_EXPECTED_ENV='msys'
9023          else
9024            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
9025          fi
9026          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
9027          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
9028        else
9029          # Not relevant for non-Windows
9030          IS_MAKE_CORRECT_ENV=true
9031        fi
9032        if test "x$IS_MAKE_CORRECT_ENV" = x; then
9033          { $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
9034$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;}
9035        else
9036          FOUND_MAKE=$MAKE_CANDIDATE
9037
9038  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9039
9040  # First separate the path from the arguments. This will split at the first
9041  # space.
9042  complete="$FOUND_MAKE"
9043  path="${complete%% *}"
9044  tmp="$complete EOL"
9045  arguments="${tmp#* }"
9046
9047  # Input might be given as Windows format, start by converting to
9048  # unix format.
9049  new_path=`$CYGPATH -u "$path"`
9050
9051  # Now try to locate executable using which
9052  new_path=`$WHICH "$new_path" 2> /dev/null`
9053  # bat and cmd files are not always considered executable in cygwin causing which
9054  # to not find them
9055  if test "x$new_path" = x \
9056      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9057      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9058    new_path=`$CYGPATH -u "$path"`
9059  fi
9060  if test "x$new_path" = x; then
9061    # Oops. Which didn't find the executable.
9062    # The splitting of arguments from the executable at a space might have been incorrect,
9063    # since paths with space are more likely in Windows. Give it another try with the whole
9064    # argument.
9065    path="$complete"
9066    arguments="EOL"
9067    new_path=`$CYGPATH -u "$path"`
9068    new_path=`$WHICH "$new_path" 2> /dev/null`
9069    # bat and cmd files are not always considered executable in cygwin causing which
9070    # to not find them
9071    if test "x$new_path" = x \
9072        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9073        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9074      new_path=`$CYGPATH -u "$path"`
9075    fi
9076    if test "x$new_path" = x; then
9077      # It's still not found. Now this is an unrecoverable error.
9078      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9079$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9080      has_space=`$ECHO "$complete" | $GREP " "`
9081      if test "x$has_space" != x; then
9082        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9083$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9084      fi
9085      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9086    fi
9087  fi
9088
9089  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9090  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9091  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9092  # "foo.exe" is OK but "foo" is an error.
9093  #
9094  # This test is therefore slightly more accurate than "test -f" to check for file presence.
9095  # It is also a way to make sure we got the proper file name for the real test later on.
9096  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9097  if test "x$test_shortpath" = x; then
9098    # Short path failed, file does not exist as specified.
9099    # Try adding .exe or .cmd
9100    if test -f "${new_path}.exe"; then
9101      input_to_shortpath="${new_path}.exe"
9102    elif test -f "${new_path}.cmd"; then
9103      input_to_shortpath="${new_path}.cmd"
9104    else
9105      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9106$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9107      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9108$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9109      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9110    fi
9111  else
9112    input_to_shortpath="$new_path"
9113  fi
9114
9115  # Call helper function which possibly converts this using DOS-style short mode.
9116  # If so, the updated path is stored in $new_path.
9117  new_path="$input_to_shortpath"
9118
9119  input_path="$input_to_shortpath"
9120  # Check if we need to convert this using DOS-style short mode. If the path
9121  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9122  # take no chances and rewrite it.
9123  # Note: m4 eats our [], so we need to use [ and ] instead.
9124  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9125  if test "x$has_forbidden_chars" != x; then
9126    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9127    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9128    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9129    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9130      # Going to short mode and back again did indeed matter. Since short mode is
9131      # case insensitive, let's make it lowercase to improve readability.
9132      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9133      # Now convert it back to Unix-stile (cygpath)
9134      input_path=`$CYGPATH -u "$shortmode_path"`
9135      new_path="$input_path"
9136    fi
9137  fi
9138
9139  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9140  if test "x$test_cygdrive_prefix" = x; then
9141    # As a simple fix, exclude /usr/bin since it's not a real path.
9142    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9143      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9144      # a path prefixed by /cygdrive for fixpath to work.
9145      new_path="$CYGWIN_ROOT_PATH$input_path"
9146    fi
9147  fi
9148
9149  # remove trailing .exe if any
9150  new_path="${new_path/%.exe/}"
9151
9152  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9153
9154  # First separate the path from the arguments. This will split at the first
9155  # space.
9156  complete="$FOUND_MAKE"
9157  path="${complete%% *}"
9158  tmp="$complete EOL"
9159  arguments="${tmp#* }"
9160
9161  # Input might be given as Windows format, start by converting to
9162  # unix format.
9163  new_path="$path"
9164
9165  windows_path="$new_path"
9166  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9167    unix_path=`$CYGPATH -u "$windows_path"`
9168    new_path="$unix_path"
9169  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9170    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9171    new_path="$unix_path"
9172  fi
9173
9174
9175  # Now try to locate executable using which
9176  new_path=`$WHICH "$new_path" 2> /dev/null`
9177
9178  if test "x$new_path" = x; then
9179    # Oops. Which didn't find the executable.
9180    # The splitting of arguments from the executable at a space might have been incorrect,
9181    # since paths with space are more likely in Windows. Give it another try with the whole
9182    # argument.
9183    path="$complete"
9184    arguments="EOL"
9185    new_path="$path"
9186
9187  windows_path="$new_path"
9188  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9189    unix_path=`$CYGPATH -u "$windows_path"`
9190    new_path="$unix_path"
9191  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9192    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9193    new_path="$unix_path"
9194  fi
9195
9196
9197    new_path=`$WHICH "$new_path" 2> /dev/null`
9198
9199    if test "x$new_path" = x; then
9200      # It's still not found. Now this is an unrecoverable error.
9201      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9202$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9203      has_space=`$ECHO "$complete" | $GREP " "`
9204      if test "x$has_space" != x; then
9205        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9206$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9207      fi
9208      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9209    fi
9210  fi
9211
9212  # Now new_path has a complete unix path to the binary
9213  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9214    # Keep paths in /bin as-is, but remove trailing .exe if any
9215    new_path="${new_path/%.exe/}"
9216    # Do not save /bin paths to all_fixpath_prefixes!
9217  else
9218    # Not in mixed or Windows style, start by that.
9219    new_path=`cmd //c echo $new_path`
9220
9221  input_path="$new_path"
9222  # Check if we need to convert this using DOS-style short mode. If the path
9223  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9224  # take no chances and rewrite it.
9225  # Note: m4 eats our [], so we need to use [ and ] instead.
9226  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9227  if test "x$has_forbidden_chars" != x; then
9228    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9229    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9230  fi
9231
9232    # Output is in $new_path
9233
9234  windows_path="$new_path"
9235  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9236    unix_path=`$CYGPATH -u "$windows_path"`
9237    new_path="$unix_path"
9238  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9239    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9240    new_path="$unix_path"
9241  fi
9242
9243    # remove trailing .exe if any
9244    new_path="${new_path/%.exe/}"
9245
9246    # Save the first 10 bytes of this path to the storage, so fixpath can work.
9247    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9248  fi
9249
9250  else
9251    # We're on a posix platform. Hooray! :)
9252    # First separate the path from the arguments. This will split at the first
9253    # space.
9254    complete="$FOUND_MAKE"
9255    path="${complete%% *}"
9256    tmp="$complete EOL"
9257    arguments="${tmp#* }"
9258
9259    # Cannot rely on the command "which" here since it doesn't always work.
9260    is_absolute_path=`$ECHO "$path" | $GREP ^/`
9261    if test -z "$is_absolute_path"; then
9262      # Path to executable is not absolute. Find it.
9263      IFS_save="$IFS"
9264      IFS=:
9265      for p in $PATH; do
9266        if test -f "$p/$path" && test -x "$p/$path"; then
9267          new_path="$p/$path"
9268          break
9269        fi
9270      done
9271      IFS="$IFS_save"
9272    else
9273      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9274$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9275      new_path="$path"
9276    fi
9277
9278    if test "x$new_path" = x; then
9279      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9280$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9281      has_space=`$ECHO "$complete" | $GREP " "`
9282      if test "x$has_space" != x; then
9283        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9284$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9285      fi
9286      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9287    fi
9288  fi
9289
9290  # Now join together the path and the arguments once again
9291  if test "x$arguments" != xEOL; then
9292    new_complete="$new_path ${arguments% *}"
9293  else
9294    new_complete="$new_path"
9295  fi
9296
9297  if test "x$complete" != "x$new_complete"; then
9298    FOUND_MAKE="$new_complete"
9299    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9300$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9301  fi
9302
9303        fi
9304      fi
9305    fi
9306  fi
9307
9308    fi
9309
9310    if test "x$FOUND_MAKE" = x; then
9311      if test "x$TOOLS_DIR" != x; then
9312        # We have a tools-dir, check that as well before giving up.
9313        OLD_PATH=$PATH
9314        PATH=$TOOLS_DIR:$PATH
9315        for ac_prog in gmake
9316do
9317  # Extract the first word of "$ac_prog", so it can be a program name with args.
9318set dummy $ac_prog; ac_word=$2
9319{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9320$as_echo_n "checking for $ac_word... " >&6; }
9321if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
9322  $as_echo_n "(cached) " >&6
9323else
9324  case $CHECK_TOOLSDIR_GMAKE in
9325  [\\/]* | ?:[\\/]*)
9326  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
9327  ;;
9328  *)
9329  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9330for as_dir in $PATH
9331do
9332  IFS=$as_save_IFS
9333  test -z "$as_dir" && as_dir=.
9334    for ac_exec_ext in '' $ac_executable_extensions; do
9335  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9336    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
9337    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9338    break 2
9339  fi
9340done
9341  done
9342IFS=$as_save_IFS
9343
9344  ;;
9345esac
9346fi
9347CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
9348if test -n "$CHECK_TOOLSDIR_GMAKE"; then
9349  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
9350$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
9351else
9352  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9353$as_echo "no" >&6; }
9354fi
9355
9356
9357  test -n "$CHECK_TOOLSDIR_GMAKE" && break
9358done
9359
9360
9361  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
9362  DESCRIPTION="gmake in tools-dir"
9363  if test "x$MAKE_CANDIDATE" != x; then
9364    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
9365$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
9366    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
9367    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
9368    if test "x$IS_GNU_MAKE" = x; then
9369      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
9370$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
9371    else
9372      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '\(3\.8[12]\)\|\(4\.\)'`
9373      if test "x$IS_MODERN_MAKE" = x; then
9374        { $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
9375$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;}
9376      else
9377        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9378          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9379            MAKE_EXPECTED_ENV='cygwin'
9380          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9381            MAKE_EXPECTED_ENV='msys'
9382          else
9383            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
9384          fi
9385          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
9386          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
9387        else
9388          # Not relevant for non-Windows
9389          IS_MAKE_CORRECT_ENV=true
9390        fi
9391        if test "x$IS_MAKE_CORRECT_ENV" = x; then
9392          { $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
9393$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;}
9394        else
9395          FOUND_MAKE=$MAKE_CANDIDATE
9396
9397  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9398
9399  # First separate the path from the arguments. This will split at the first
9400  # space.
9401  complete="$FOUND_MAKE"
9402  path="${complete%% *}"
9403  tmp="$complete EOL"
9404  arguments="${tmp#* }"
9405
9406  # Input might be given as Windows format, start by converting to
9407  # unix format.
9408  new_path=`$CYGPATH -u "$path"`
9409
9410  # Now try to locate executable using which
9411  new_path=`$WHICH "$new_path" 2> /dev/null`
9412  # bat and cmd files are not always considered executable in cygwin causing which
9413  # to not find them
9414  if test "x$new_path" = x \
9415      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9416      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9417    new_path=`$CYGPATH -u "$path"`
9418  fi
9419  if test "x$new_path" = x; then
9420    # Oops. Which didn't find the executable.
9421    # The splitting of arguments from the executable at a space might have been incorrect,
9422    # since paths with space are more likely in Windows. Give it another try with the whole
9423    # argument.
9424    path="$complete"
9425    arguments="EOL"
9426    new_path=`$CYGPATH -u "$path"`
9427    new_path=`$WHICH "$new_path" 2> /dev/null`
9428    # bat and cmd files are not always considered executable in cygwin causing which
9429    # to not find them
9430    if test "x$new_path" = x \
9431        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9432        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9433      new_path=`$CYGPATH -u "$path"`
9434    fi
9435    if test "x$new_path" = x; then
9436      # It's still not found. Now this is an unrecoverable error.
9437      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9438$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9439      has_space=`$ECHO "$complete" | $GREP " "`
9440      if test "x$has_space" != x; then
9441        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9442$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9443      fi
9444      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9445    fi
9446  fi
9447
9448  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9449  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9450  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9451  # "foo.exe" is OK but "foo" is an error.
9452  #
9453  # This test is therefore slightly more accurate than "test -f" to check for file presence.
9454  # It is also a way to make sure we got the proper file name for the real test later on.
9455  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9456  if test "x$test_shortpath" = x; then
9457    # Short path failed, file does not exist as specified.
9458    # Try adding .exe or .cmd
9459    if test -f "${new_path}.exe"; then
9460      input_to_shortpath="${new_path}.exe"
9461    elif test -f "${new_path}.cmd"; then
9462      input_to_shortpath="${new_path}.cmd"
9463    else
9464      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9465$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9466      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9467$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9468      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9469    fi
9470  else
9471    input_to_shortpath="$new_path"
9472  fi
9473
9474  # Call helper function which possibly converts this using DOS-style short mode.
9475  # If so, the updated path is stored in $new_path.
9476  new_path="$input_to_shortpath"
9477
9478  input_path="$input_to_shortpath"
9479  # Check if we need to convert this using DOS-style short mode. If the path
9480  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9481  # take no chances and rewrite it.
9482  # Note: m4 eats our [], so we need to use [ and ] instead.
9483  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9484  if test "x$has_forbidden_chars" != x; then
9485    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9486    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9487    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9488    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9489      # Going to short mode and back again did indeed matter. Since short mode is
9490      # case insensitive, let's make it lowercase to improve readability.
9491      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9492      # Now convert it back to Unix-stile (cygpath)
9493      input_path=`$CYGPATH -u "$shortmode_path"`
9494      new_path="$input_path"
9495    fi
9496  fi
9497
9498  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9499  if test "x$test_cygdrive_prefix" = x; then
9500    # As a simple fix, exclude /usr/bin since it's not a real path.
9501    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9502      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9503      # a path prefixed by /cygdrive for fixpath to work.
9504      new_path="$CYGWIN_ROOT_PATH$input_path"
9505    fi
9506  fi
9507
9508  # remove trailing .exe if any
9509  new_path="${new_path/%.exe/}"
9510
9511  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9512
9513  # First separate the path from the arguments. This will split at the first
9514  # space.
9515  complete="$FOUND_MAKE"
9516  path="${complete%% *}"
9517  tmp="$complete EOL"
9518  arguments="${tmp#* }"
9519
9520  # Input might be given as Windows format, start by converting to
9521  # unix format.
9522  new_path="$path"
9523
9524  windows_path="$new_path"
9525  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9526    unix_path=`$CYGPATH -u "$windows_path"`
9527    new_path="$unix_path"
9528  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9529    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9530    new_path="$unix_path"
9531  fi
9532
9533
9534  # Now try to locate executable using which
9535  new_path=`$WHICH "$new_path" 2> /dev/null`
9536
9537  if test "x$new_path" = x; then
9538    # Oops. Which didn't find the executable.
9539    # The splitting of arguments from the executable at a space might have been incorrect,
9540    # since paths with space are more likely in Windows. Give it another try with the whole
9541    # argument.
9542    path="$complete"
9543    arguments="EOL"
9544    new_path="$path"
9545
9546  windows_path="$new_path"
9547  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9548    unix_path=`$CYGPATH -u "$windows_path"`
9549    new_path="$unix_path"
9550  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9551    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9552    new_path="$unix_path"
9553  fi
9554
9555
9556    new_path=`$WHICH "$new_path" 2> /dev/null`
9557
9558    if test "x$new_path" = x; then
9559      # It's still not found. Now this is an unrecoverable error.
9560      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9561$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9562      has_space=`$ECHO "$complete" | $GREP " "`
9563      if test "x$has_space" != x; then
9564        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9565$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9566      fi
9567      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9568    fi
9569  fi
9570
9571  # Now new_path has a complete unix path to the binary
9572  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9573    # Keep paths in /bin as-is, but remove trailing .exe if any
9574    new_path="${new_path/%.exe/}"
9575    # Do not save /bin paths to all_fixpath_prefixes!
9576  else
9577    # Not in mixed or Windows style, start by that.
9578    new_path=`cmd //c echo $new_path`
9579
9580  input_path="$new_path"
9581  # Check if we need to convert this using DOS-style short mode. If the path
9582  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9583  # take no chances and rewrite it.
9584  # Note: m4 eats our [], so we need to use [ and ] instead.
9585  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9586  if test "x$has_forbidden_chars" != x; then
9587    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9588    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9589  fi
9590
9591    # Output is in $new_path
9592
9593  windows_path="$new_path"
9594  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9595    unix_path=`$CYGPATH -u "$windows_path"`
9596    new_path="$unix_path"
9597  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9598    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9599    new_path="$unix_path"
9600  fi
9601
9602    # remove trailing .exe if any
9603    new_path="${new_path/%.exe/}"
9604
9605    # Save the first 10 bytes of this path to the storage, so fixpath can work.
9606    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9607  fi
9608
9609  else
9610    # We're on a posix platform. Hooray! :)
9611    # First separate the path from the arguments. This will split at the first
9612    # space.
9613    complete="$FOUND_MAKE"
9614    path="${complete%% *}"
9615    tmp="$complete EOL"
9616    arguments="${tmp#* }"
9617
9618    # Cannot rely on the command "which" here since it doesn't always work.
9619    is_absolute_path=`$ECHO "$path" | $GREP ^/`
9620    if test -z "$is_absolute_path"; then
9621      # Path to executable is not absolute. Find it.
9622      IFS_save="$IFS"
9623      IFS=:
9624      for p in $PATH; do
9625        if test -f "$p/$path" && test -x "$p/$path"; then
9626          new_path="$p/$path"
9627          break
9628        fi
9629      done
9630      IFS="$IFS_save"
9631    else
9632      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9633$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9634      new_path="$path"
9635    fi
9636
9637    if test "x$new_path" = x; then
9638      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9639$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9640      has_space=`$ECHO "$complete" | $GREP " "`
9641      if test "x$has_space" != x; then
9642        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9643$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9644      fi
9645      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9646    fi
9647  fi
9648
9649  # Now join together the path and the arguments once again
9650  if test "x$arguments" != xEOL; then
9651    new_complete="$new_path ${arguments% *}"
9652  else
9653    new_complete="$new_path"
9654  fi
9655
9656  if test "x$complete" != "x$new_complete"; then
9657    FOUND_MAKE="$new_complete"
9658    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9659$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9660  fi
9661
9662        fi
9663      fi
9664    fi
9665  fi
9666
9667        if test "x$FOUND_MAKE" = x; then
9668          for ac_prog in make
9669do
9670  # Extract the first word of "$ac_prog", so it can be a program name with args.
9671set dummy $ac_prog; ac_word=$2
9672{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9673$as_echo_n "checking for $ac_word... " >&6; }
9674if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
9675  $as_echo_n "(cached) " >&6
9676else
9677  case $CHECK_TOOLSDIR_MAKE in
9678  [\\/]* | ?:[\\/]*)
9679  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
9680  ;;
9681  *)
9682  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9683for as_dir in $PATH
9684do
9685  IFS=$as_save_IFS
9686  test -z "$as_dir" && as_dir=.
9687    for ac_exec_ext in '' $ac_executable_extensions; do
9688  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9689    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
9690    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9691    break 2
9692  fi
9693done
9694  done
9695IFS=$as_save_IFS
9696
9697  ;;
9698esac
9699fi
9700CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
9701if test -n "$CHECK_TOOLSDIR_MAKE"; then
9702  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
9703$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
9704else
9705  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9706$as_echo "no" >&6; }
9707fi
9708
9709
9710  test -n "$CHECK_TOOLSDIR_MAKE" && break
9711done
9712
9713
9714  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
9715  DESCRIPTION="make in tools-dir"
9716  if test "x$MAKE_CANDIDATE" != x; then
9717    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
9718$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
9719    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
9720    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
9721    if test "x$IS_GNU_MAKE" = x; then
9722      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
9723$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
9724    else
9725      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '\(3\.8[12]\)\|\(4\.\)'`
9726      if test "x$IS_MODERN_MAKE" = x; then
9727        { $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
9728$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;}
9729      else
9730        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9731          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9732            MAKE_EXPECTED_ENV='cygwin'
9733          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9734            MAKE_EXPECTED_ENV='msys'
9735          else
9736            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
9737          fi
9738          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
9739          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
9740        else
9741          # Not relevant for non-Windows
9742          IS_MAKE_CORRECT_ENV=true
9743        fi
9744        if test "x$IS_MAKE_CORRECT_ENV" = x; then
9745          { $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
9746$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;}
9747        else
9748          FOUND_MAKE=$MAKE_CANDIDATE
9749
9750  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9751
9752  # First separate the path from the arguments. This will split at the first
9753  # space.
9754  complete="$FOUND_MAKE"
9755  path="${complete%% *}"
9756  tmp="$complete EOL"
9757  arguments="${tmp#* }"
9758
9759  # Input might be given as Windows format, start by converting to
9760  # unix format.
9761  new_path=`$CYGPATH -u "$path"`
9762
9763  # Now try to locate executable using which
9764  new_path=`$WHICH "$new_path" 2> /dev/null`
9765  # bat and cmd files are not always considered executable in cygwin causing which
9766  # to not find them
9767  if test "x$new_path" = x \
9768      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9769      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9770    new_path=`$CYGPATH -u "$path"`
9771  fi
9772  if test "x$new_path" = x; then
9773    # Oops. Which didn't find the executable.
9774    # The splitting of arguments from the executable at a space might have been incorrect,
9775    # since paths with space are more likely in Windows. Give it another try with the whole
9776    # argument.
9777    path="$complete"
9778    arguments="EOL"
9779    new_path=`$CYGPATH -u "$path"`
9780    new_path=`$WHICH "$new_path" 2> /dev/null`
9781    # bat and cmd files are not always considered executable in cygwin causing which
9782    # to not find them
9783    if test "x$new_path" = x \
9784        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9785        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9786      new_path=`$CYGPATH -u "$path"`
9787    fi
9788    if test "x$new_path" = x; then
9789      # It's still not found. Now this is an unrecoverable error.
9790      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9791$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9792      has_space=`$ECHO "$complete" | $GREP " "`
9793      if test "x$has_space" != x; then
9794        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9795$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9796      fi
9797      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9798    fi
9799  fi
9800
9801  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9802  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9803  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9804  # "foo.exe" is OK but "foo" is an error.
9805  #
9806  # This test is therefore slightly more accurate than "test -f" to check for file presence.
9807  # It is also a way to make sure we got the proper file name for the real test later on.
9808  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9809  if test "x$test_shortpath" = x; then
9810    # Short path failed, file does not exist as specified.
9811    # Try adding .exe or .cmd
9812    if test -f "${new_path}.exe"; then
9813      input_to_shortpath="${new_path}.exe"
9814    elif test -f "${new_path}.cmd"; then
9815      input_to_shortpath="${new_path}.cmd"
9816    else
9817      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9818$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9819      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9820$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9821      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9822    fi
9823  else
9824    input_to_shortpath="$new_path"
9825  fi
9826
9827  # Call helper function which possibly converts this using DOS-style short mode.
9828  # If so, the updated path is stored in $new_path.
9829  new_path="$input_to_shortpath"
9830
9831  input_path="$input_to_shortpath"
9832  # Check if we need to convert this using DOS-style short mode. If the path
9833  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9834  # take no chances and rewrite it.
9835  # Note: m4 eats our [], so we need to use [ and ] instead.
9836  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9837  if test "x$has_forbidden_chars" != x; then
9838    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9839    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9840    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9841    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9842      # Going to short mode and back again did indeed matter. Since short mode is
9843      # case insensitive, let's make it lowercase to improve readability.
9844      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9845      # Now convert it back to Unix-stile (cygpath)
9846      input_path=`$CYGPATH -u "$shortmode_path"`
9847      new_path="$input_path"
9848    fi
9849  fi
9850
9851  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9852  if test "x$test_cygdrive_prefix" = x; then
9853    # As a simple fix, exclude /usr/bin since it's not a real path.
9854    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9855      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9856      # a path prefixed by /cygdrive for fixpath to work.
9857      new_path="$CYGWIN_ROOT_PATH$input_path"
9858    fi
9859  fi
9860
9861  # remove trailing .exe if any
9862  new_path="${new_path/%.exe/}"
9863
9864  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9865
9866  # First separate the path from the arguments. This will split at the first
9867  # space.
9868  complete="$FOUND_MAKE"
9869  path="${complete%% *}"
9870  tmp="$complete EOL"
9871  arguments="${tmp#* }"
9872
9873  # Input might be given as Windows format, start by converting to
9874  # unix format.
9875  new_path="$path"
9876
9877  windows_path="$new_path"
9878  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9879    unix_path=`$CYGPATH -u "$windows_path"`
9880    new_path="$unix_path"
9881  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9882    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9883    new_path="$unix_path"
9884  fi
9885
9886
9887  # Now try to locate executable using which
9888  new_path=`$WHICH "$new_path" 2> /dev/null`
9889
9890  if test "x$new_path" = x; then
9891    # Oops. Which didn't find the executable.
9892    # The splitting of arguments from the executable at a space might have been incorrect,
9893    # since paths with space are more likely in Windows. Give it another try with the whole
9894    # argument.
9895    path="$complete"
9896    arguments="EOL"
9897    new_path="$path"
9898
9899  windows_path="$new_path"
9900  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9901    unix_path=`$CYGPATH -u "$windows_path"`
9902    new_path="$unix_path"
9903  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9904    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9905    new_path="$unix_path"
9906  fi
9907
9908
9909    new_path=`$WHICH "$new_path" 2> /dev/null`
9910
9911    if test "x$new_path" = x; then
9912      # It's still not found. Now this is an unrecoverable error.
9913      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9914$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9915      has_space=`$ECHO "$complete" | $GREP " "`
9916      if test "x$has_space" != x; then
9917        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9918$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9919      fi
9920      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9921    fi
9922  fi
9923
9924  # Now new_path has a complete unix path to the binary
9925  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9926    # Keep paths in /bin as-is, but remove trailing .exe if any
9927    new_path="${new_path/%.exe/}"
9928    # Do not save /bin paths to all_fixpath_prefixes!
9929  else
9930    # Not in mixed or Windows style, start by that.
9931    new_path=`cmd //c echo $new_path`
9932
9933  input_path="$new_path"
9934  # Check if we need to convert this using DOS-style short mode. If the path
9935  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9936  # take no chances and rewrite it.
9937  # Note: m4 eats our [], so we need to use [ and ] instead.
9938  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9939  if test "x$has_forbidden_chars" != x; then
9940    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9941    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9942  fi
9943
9944    # Output is in $new_path
9945
9946  windows_path="$new_path"
9947  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9948    unix_path=`$CYGPATH -u "$windows_path"`
9949    new_path="$unix_path"
9950  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9951    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9952    new_path="$unix_path"
9953  fi
9954
9955    # remove trailing .exe if any
9956    new_path="${new_path/%.exe/}"
9957
9958    # Save the first 10 bytes of this path to the storage, so fixpath can work.
9959    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9960  fi
9961
9962  else
9963    # We're on a posix platform. Hooray! :)
9964    # First separate the path from the arguments. This will split at the first
9965    # space.
9966    complete="$FOUND_MAKE"
9967    path="${complete%% *}"
9968    tmp="$complete EOL"
9969    arguments="${tmp#* }"
9970
9971    # Cannot rely on the command "which" here since it doesn't always work.
9972    is_absolute_path=`$ECHO "$path" | $GREP ^/`
9973    if test -z "$is_absolute_path"; then
9974      # Path to executable is not absolute. Find it.
9975      IFS_save="$IFS"
9976      IFS=:
9977      for p in $PATH; do
9978        if test -f "$p/$path" && test -x "$p/$path"; then
9979          new_path="$p/$path"
9980          break
9981        fi
9982      done
9983      IFS="$IFS_save"
9984    else
9985      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9986$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9987      new_path="$path"
9988    fi
9989
9990    if test "x$new_path" = x; then
9991      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9992$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9993      has_space=`$ECHO "$complete" | $GREP " "`
9994      if test "x$has_space" != x; then
9995        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9996$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9997      fi
9998      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9999    fi
10000  fi
10001
10002  # Now join together the path and the arguments once again
10003  if test "x$arguments" != xEOL; then
10004    new_complete="$new_path ${arguments% *}"
10005  else
10006    new_complete="$new_path"
10007  fi
10008
10009  if test "x$complete" != "x$new_complete"; then
10010    FOUND_MAKE="$new_complete"
10011    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
10012$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
10013  fi
10014
10015        fi
10016      fi
10017    fi
10018  fi
10019
10020        fi
10021        PATH=$OLD_PATH
10022      fi
10023    fi
10024
10025    if test "x$FOUND_MAKE" = x; then
10026      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
10027    fi
10028  fi
10029
10030  MAKE=$FOUND_MAKE
10031
10032  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
10033$as_echo "$as_me: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
10034
10035
10036
10037  # Test if find supports -delete
10038  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
10039$as_echo_n "checking if find supports -delete... " >&6; }
10040  FIND_DELETE="-delete"
10041
10042  DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
10043
10044  echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
10045
10046  TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
10047  if test -f $DELETEDIR/TestIfFindSupportsDelete; then
10048    # No, it does not.
10049    rm $DELETEDIR/TestIfFindSupportsDelete
10050    FIND_DELETE="-exec rm \{\} \+"
10051    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10052$as_echo "no" >&6; }
10053  else
10054    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10055$as_echo "yes" >&6; }
10056  fi
10057  rmdir $DELETEDIR
10058
10059
10060
10061  # These tools might not be installed by default,
10062  # need hint on how to install them.
10063
10064  for ac_prog in unzip
10065do
10066  # Extract the first word of "$ac_prog", so it can be a program name with args.
10067set dummy $ac_prog; ac_word=$2
10068{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10069$as_echo_n "checking for $ac_word... " >&6; }
10070if ${ac_cv_path_UNZIP+:} false; then :
10071  $as_echo_n "(cached) " >&6
10072else
10073  case $UNZIP in
10074  [\\/]* | ?:[\\/]*)
10075  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
10076  ;;
10077  *)
10078  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10079for as_dir in $PATH
10080do
10081  IFS=$as_save_IFS
10082  test -z "$as_dir" && as_dir=.
10083    for ac_exec_ext in '' $ac_executable_extensions; do
10084  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10085    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
10086    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10087    break 2
10088  fi
10089done
10090  done
10091IFS=$as_save_IFS
10092
10093  ;;
10094esac
10095fi
10096UNZIP=$ac_cv_path_UNZIP
10097if test -n "$UNZIP"; then
10098  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
10099$as_echo "$UNZIP" >&6; }
10100else
10101  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10102$as_echo "no" >&6; }
10103fi
10104
10105
10106  test -n "$UNZIP" && break
10107done
10108
10109
10110  if test "x$UNZIP" = x; then
10111    if test "xunzip" = x; then
10112      PROG_NAME=unzip
10113    else
10114      PROG_NAME=unzip
10115    fi
10116    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10117$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10118    as_fn_error $? "Cannot continue" "$LINENO" 5
10119  fi
10120
10121
10122
10123  for ac_prog in zip
10124do
10125  # Extract the first word of "$ac_prog", so it can be a program name with args.
10126set dummy $ac_prog; ac_word=$2
10127{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10128$as_echo_n "checking for $ac_word... " >&6; }
10129if ${ac_cv_path_ZIP+:} false; then :
10130  $as_echo_n "(cached) " >&6
10131else
10132  case $ZIP in
10133  [\\/]* | ?:[\\/]*)
10134  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
10135  ;;
10136  *)
10137  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10138for as_dir in $PATH
10139do
10140  IFS=$as_save_IFS
10141  test -z "$as_dir" && as_dir=.
10142    for ac_exec_ext in '' $ac_executable_extensions; do
10143  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10144    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
10145    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10146    break 2
10147  fi
10148done
10149  done
10150IFS=$as_save_IFS
10151
10152  ;;
10153esac
10154fi
10155ZIP=$ac_cv_path_ZIP
10156if test -n "$ZIP"; then
10157  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
10158$as_echo "$ZIP" >&6; }
10159else
10160  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10161$as_echo "no" >&6; }
10162fi
10163
10164
10165  test -n "$ZIP" && break
10166done
10167
10168
10169  if test "x$ZIP" = x; then
10170    if test "xzip" = x; then
10171      PROG_NAME=zip
10172    else
10173      PROG_NAME=zip
10174    fi
10175    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10176$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10177    as_fn_error $? "Cannot continue" "$LINENO" 5
10178  fi
10179
10180
10181
10182  # Non-required basic tools
10183
10184  # Extract the first word of "ldd", so it can be a program name with args.
10185set dummy ldd; ac_word=$2
10186{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10187$as_echo_n "checking for $ac_word... " >&6; }
10188if ${ac_cv_path_LDD+:} false; then :
10189  $as_echo_n "(cached) " >&6
10190else
10191  case $LDD in
10192  [\\/]* | ?:[\\/]*)
10193  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
10194  ;;
10195  *)
10196  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10197for as_dir in $PATH
10198do
10199  IFS=$as_save_IFS
10200  test -z "$as_dir" && as_dir=.
10201    for ac_exec_ext in '' $ac_executable_extensions; do
10202  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10203    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
10204    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10205    break 2
10206  fi
10207done
10208  done
10209IFS=$as_save_IFS
10210
10211  ;;
10212esac
10213fi
10214LDD=$ac_cv_path_LDD
10215if test -n "$LDD"; then
10216  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
10217$as_echo "$LDD" >&6; }
10218else
10219  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10220$as_echo "no" >&6; }
10221fi
10222
10223
10224  if test "x$LDD" = "x"; then
10225    # List shared lib dependencies is used for
10226    # debug output and checking for forbidden dependencies.
10227    # We can build without it.
10228    LDD="true"
10229  fi
10230  # Extract the first word of "otool", so it can be a program name with args.
10231set dummy otool; ac_word=$2
10232{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10233$as_echo_n "checking for $ac_word... " >&6; }
10234if ${ac_cv_path_OTOOL+:} false; then :
10235  $as_echo_n "(cached) " >&6
10236else
10237  case $OTOOL in
10238  [\\/]* | ?:[\\/]*)
10239  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
10240  ;;
10241  *)
10242  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10243for as_dir in $PATH
10244do
10245  IFS=$as_save_IFS
10246  test -z "$as_dir" && as_dir=.
10247    for ac_exec_ext in '' $ac_executable_extensions; do
10248  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10249    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
10250    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10251    break 2
10252  fi
10253done
10254  done
10255IFS=$as_save_IFS
10256
10257  ;;
10258esac
10259fi
10260OTOOL=$ac_cv_path_OTOOL
10261if test -n "$OTOOL"; then
10262  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
10263$as_echo "$OTOOL" >&6; }
10264else
10265  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10266$as_echo "no" >&6; }
10267fi
10268
10269
10270  if test "x$OTOOL" = "x"; then
10271    OTOOL="true"
10272  fi
10273  for ac_prog in readelf greadelf
10274do
10275  # Extract the first word of "$ac_prog", so it can be a program name with args.
10276set dummy $ac_prog; ac_word=$2
10277{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10278$as_echo_n "checking for $ac_word... " >&6; }
10279if ${ac_cv_path_READELF+:} false; then :
10280  $as_echo_n "(cached) " >&6
10281else
10282  case $READELF in
10283  [\\/]* | ?:[\\/]*)
10284  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
10285  ;;
10286  *)
10287  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10288for as_dir in $PATH
10289do
10290  IFS=$as_save_IFS
10291  test -z "$as_dir" && as_dir=.
10292    for ac_exec_ext in '' $ac_executable_extensions; do
10293  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10294    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
10295    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10296    break 2
10297  fi
10298done
10299  done
10300IFS=$as_save_IFS
10301
10302  ;;
10303esac
10304fi
10305READELF=$ac_cv_path_READELF
10306if test -n "$READELF"; then
10307  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
10308$as_echo "$READELF" >&6; }
10309else
10310  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10311$as_echo "no" >&6; }
10312fi
10313
10314
10315  test -n "$READELF" && break
10316done
10317
10318  # Extract the first word of "hg", so it can be a program name with args.
10319set dummy hg; ac_word=$2
10320{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10321$as_echo_n "checking for $ac_word... " >&6; }
10322if ${ac_cv_path_HG+:} false; then :
10323  $as_echo_n "(cached) " >&6
10324else
10325  case $HG in
10326  [\\/]* | ?:[\\/]*)
10327  ac_cv_path_HG="$HG" # Let the user override the test with a path.
10328  ;;
10329  *)
10330  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10331for as_dir in $PATH
10332do
10333  IFS=$as_save_IFS
10334  test -z "$as_dir" && as_dir=.
10335    for ac_exec_ext in '' $ac_executable_extensions; do
10336  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10337    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
10338    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10339    break 2
10340  fi
10341done
10342  done
10343IFS=$as_save_IFS
10344
10345  ;;
10346esac
10347fi
10348HG=$ac_cv_path_HG
10349if test -n "$HG"; then
10350  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
10351$as_echo "$HG" >&6; }
10352else
10353  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10354$as_echo "no" >&6; }
10355fi
10356
10357
10358  # Extract the first word of "stat", so it can be a program name with args.
10359set dummy stat; ac_word=$2
10360{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10361$as_echo_n "checking for $ac_word... " >&6; }
10362if ${ac_cv_path_STAT+:} false; then :
10363  $as_echo_n "(cached) " >&6
10364else
10365  case $STAT in
10366  [\\/]* | ?:[\\/]*)
10367  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
10368  ;;
10369  *)
10370  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10371for as_dir in $PATH
10372do
10373  IFS=$as_save_IFS
10374  test -z "$as_dir" && as_dir=.
10375    for ac_exec_ext in '' $ac_executable_extensions; do
10376  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10377    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
10378    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10379    break 2
10380  fi
10381done
10382  done
10383IFS=$as_save_IFS
10384
10385  ;;
10386esac
10387fi
10388STAT=$ac_cv_path_STAT
10389if test -n "$STAT"; then
10390  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
10391$as_echo "$STAT" >&6; }
10392else
10393  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10394$as_echo "no" >&6; }
10395fi
10396
10397
10398  # Extract the first word of "time", so it can be a program name with args.
10399set dummy time; ac_word=$2
10400{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10401$as_echo_n "checking for $ac_word... " >&6; }
10402if ${ac_cv_path_TIME+:} false; then :
10403  $as_echo_n "(cached) " >&6
10404else
10405  case $TIME in
10406  [\\/]* | ?:[\\/]*)
10407  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
10408  ;;
10409  *)
10410  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10411for as_dir in $PATH
10412do
10413  IFS=$as_save_IFS
10414  test -z "$as_dir" && as_dir=.
10415    for ac_exec_ext in '' $ac_executable_extensions; do
10416  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10417    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
10418    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10419    break 2
10420  fi
10421done
10422  done
10423IFS=$as_save_IFS
10424
10425  ;;
10426esac
10427fi
10428TIME=$ac_cv_path_TIME
10429if test -n "$TIME"; then
10430  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
10431$as_echo "$TIME" >&6; }
10432else
10433  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10434$as_echo "no" >&6; }
10435fi
10436
10437
10438  # Check if it's GNU time
10439  IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
10440  if test "x$IS_GNU_TIME" != x; then
10441    IS_GNU_TIME=yes
10442  else
10443    IS_GNU_TIME=no
10444  fi
10445
10446
10447  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
10448
10449  for ac_prog in comm
10450do
10451  # Extract the first word of "$ac_prog", so it can be a program name with args.
10452set dummy $ac_prog; ac_word=$2
10453{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10454$as_echo_n "checking for $ac_word... " >&6; }
10455if ${ac_cv_path_COMM+:} false; then :
10456  $as_echo_n "(cached) " >&6
10457else
10458  case $COMM in
10459  [\\/]* | ?:[\\/]*)
10460  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
10461  ;;
10462  *)
10463  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10464for as_dir in $PATH
10465do
10466  IFS=$as_save_IFS
10467  test -z "$as_dir" && as_dir=.
10468    for ac_exec_ext in '' $ac_executable_extensions; do
10469  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10470    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
10471    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10472    break 2
10473  fi
10474done
10475  done
10476IFS=$as_save_IFS
10477
10478  ;;
10479esac
10480fi
10481COMM=$ac_cv_path_COMM
10482if test -n "$COMM"; then
10483  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
10484$as_echo "$COMM" >&6; }
10485else
10486  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10487$as_echo "no" >&6; }
10488fi
10489
10490
10491  test -n "$COMM" && break
10492done
10493
10494
10495  if test "x$COMM" = x; then
10496    if test "xcomm" = x; then
10497      PROG_NAME=comm
10498    else
10499      PROG_NAME=comm
10500    fi
10501    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10502$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10503    as_fn_error $? "Cannot continue" "$LINENO" 5
10504  fi
10505
10506
10507  fi
10508
10509  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
10510
10511  for ac_prog in xattr
10512do
10513  # Extract the first word of "$ac_prog", so it can be a program name with args.
10514set dummy $ac_prog; ac_word=$2
10515{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10516$as_echo_n "checking for $ac_word... " >&6; }
10517if ${ac_cv_path_XATTR+:} false; then :
10518  $as_echo_n "(cached) " >&6
10519else
10520  case $XATTR in
10521  [\\/]* | ?:[\\/]*)
10522  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
10523  ;;
10524  *)
10525  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10526for as_dir in $PATH
10527do
10528  IFS=$as_save_IFS
10529  test -z "$as_dir" && as_dir=.
10530    for ac_exec_ext in '' $ac_executable_extensions; do
10531  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10532    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
10533    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10534    break 2
10535  fi
10536done
10537  done
10538IFS=$as_save_IFS
10539
10540  ;;
10541esac
10542fi
10543XATTR=$ac_cv_path_XATTR
10544if test -n "$XATTR"; then
10545  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
10546$as_echo "$XATTR" >&6; }
10547else
10548  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10549$as_echo "no" >&6; }
10550fi
10551
10552
10553  test -n "$XATTR" && break
10554done
10555
10556
10557  if test "x$XATTR" = x; then
10558    if test "xxattr" = x; then
10559      PROG_NAME=xattr
10560    else
10561      PROG_NAME=xattr
10562    fi
10563    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10564$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10565    as_fn_error $? "Cannot continue" "$LINENO" 5
10566  fi
10567
10568
10569    # Extract the first word of "codesign", so it can be a program name with args.
10570set dummy codesign; ac_word=$2
10571{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10572$as_echo_n "checking for $ac_word... " >&6; }
10573if ${ac_cv_path_CODESIGN+:} false; then :
10574  $as_echo_n "(cached) " >&6
10575else
10576  case $CODESIGN in
10577  [\\/]* | ?:[\\/]*)
10578  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
10579  ;;
10580  *)
10581  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10582for as_dir in $PATH
10583do
10584  IFS=$as_save_IFS
10585  test -z "$as_dir" && as_dir=.
10586    for ac_exec_ext in '' $ac_executable_extensions; do
10587  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10588    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
10589    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10590    break 2
10591  fi
10592done
10593  done
10594IFS=$as_save_IFS
10595
10596  ;;
10597esac
10598fi
10599CODESIGN=$ac_cv_path_CODESIGN
10600if test -n "$CODESIGN"; then
10601  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
10602$as_echo "$CODESIGN" >&6; }
10603else
10604  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10605$as_echo "no" >&6; }
10606fi
10607
10608
10609    if test "x$CODESIGN" != "x"; then
10610      # Verify that the openjdk_codesign certificate is present
10611      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
10612$as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
10613      rm -f codesign-testfile
10614      touch codesign-testfile
10615      codesign -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
10616      rm -f codesign-testfile
10617      if test "x$CODESIGN" = x; then
10618        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10619$as_echo "no" >&6; }
10620      else
10621        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10622$as_echo "yes" >&6; }
10623      fi
10624    fi
10625  fi
10626
10627
10628# Check if pkg-config is available.
10629
10630
10631if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
10632	if test -n "$ac_tool_prefix"; then
10633  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
10634set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
10635{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10636$as_echo_n "checking for $ac_word... " >&6; }
10637if ${ac_cv_path_PKG_CONFIG+:} false; then :
10638  $as_echo_n "(cached) " >&6
10639else
10640  case $PKG_CONFIG in
10641  [\\/]* | ?:[\\/]*)
10642  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10643  ;;
10644  *)
10645  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10646for as_dir in $PATH
10647do
10648  IFS=$as_save_IFS
10649  test -z "$as_dir" && as_dir=.
10650    for ac_exec_ext in '' $ac_executable_extensions; do
10651  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10652    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10653    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10654    break 2
10655  fi
10656done
10657  done
10658IFS=$as_save_IFS
10659
10660  ;;
10661esac
10662fi
10663PKG_CONFIG=$ac_cv_path_PKG_CONFIG
10664if test -n "$PKG_CONFIG"; then
10665  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
10666$as_echo "$PKG_CONFIG" >&6; }
10667else
10668  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10669$as_echo "no" >&6; }
10670fi
10671
10672
10673fi
10674if test -z "$ac_cv_path_PKG_CONFIG"; then
10675  ac_pt_PKG_CONFIG=$PKG_CONFIG
10676  # Extract the first word of "pkg-config", so it can be a program name with args.
10677set dummy pkg-config; ac_word=$2
10678{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10679$as_echo_n "checking for $ac_word... " >&6; }
10680if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
10681  $as_echo_n "(cached) " >&6
10682else
10683  case $ac_pt_PKG_CONFIG in
10684  [\\/]* | ?:[\\/]*)
10685  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
10686  ;;
10687  *)
10688  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10689for as_dir in $PATH
10690do
10691  IFS=$as_save_IFS
10692  test -z "$as_dir" && as_dir=.
10693    for ac_exec_ext in '' $ac_executable_extensions; do
10694  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10695    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10696    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10697    break 2
10698  fi
10699done
10700  done
10701IFS=$as_save_IFS
10702
10703  ;;
10704esac
10705fi
10706ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
10707if test -n "$ac_pt_PKG_CONFIG"; then
10708  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
10709$as_echo "$ac_pt_PKG_CONFIG" >&6; }
10710else
10711  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10712$as_echo "no" >&6; }
10713fi
10714
10715  if test "x$ac_pt_PKG_CONFIG" = x; then
10716    PKG_CONFIG=""
10717  else
10718    case $cross_compiling:$ac_tool_warned in
10719yes:)
10720{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10721$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10722ac_tool_warned=yes ;;
10723esac
10724    PKG_CONFIG=$ac_pt_PKG_CONFIG
10725  fi
10726else
10727  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
10728fi
10729
10730fi
10731if test -n "$PKG_CONFIG"; then
10732	_pkg_min_version=0.9.0
10733	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
10734$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
10735	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
10736		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10737$as_echo "yes" >&6; }
10738	else
10739		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10740$as_echo "no" >&6; }
10741		PKG_CONFIG=""
10742	fi
10743
10744fi
10745
10746# After basic tools have been setup, we can check build os specific details.
10747
10748  ###############################################################################
10749
10750  # Note that this is the build platform OS version!
10751
10752  OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
10753  OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
10754  OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
10755  OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
10756
10757
10758
10759
10760
10761# Setup builddeps, for automatic downloading of tools we need.
10762# This is needed before we can call BDEPS_CHECK_MODULE, which is done in
10763# boot-jdk setup, but we need to have basic tools setup first.
10764
10765
10766# Check whether --with-builddeps-conf was given.
10767if test "${with_builddeps_conf+set}" = set; then :
10768  withval=$with_builddeps_conf;
10769fi
10770
10771
10772
10773# Check whether --with-builddeps-server was given.
10774if test "${with_builddeps_server+set}" = set; then :
10775  withval=$with_builddeps_server;
10776fi
10777
10778
10779
10780# Check whether --with-builddeps-dir was given.
10781if test "${with_builddeps_dir+set}" = set; then :
10782  withval=$with_builddeps_dir;
10783else
10784  with_builddeps_dir=/localhome/builddeps
10785fi
10786
10787
10788
10789# Check whether --with-builddeps-group was given.
10790if test "${with_builddeps_group+set}" = set; then :
10791  withval=$with_builddeps_group;
10792fi
10793
10794
10795
10796
10797  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
10798    if test "x$with_builddeps_conf" != x; then
10799      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for supplied builddeps configuration file" >&5
10800$as_echo_n "checking for supplied builddeps configuration file... " >&6; }
10801      builddepsfile=$with_builddeps_conf
10802      if test -s $builddepsfile; then
10803        . $builddepsfile
10804        { $as_echo "$as_me:${as_lineno-$LINENO}: result: loaded!" >&5
10805$as_echo "loaded!" >&6; }
10806      else
10807        as_fn_error $? "The given builddeps conf file $with_builddeps_conf could not be loaded!" "$LINENO" 5
10808      fi
10809    else
10810      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builddeps.conf files in sources..." >&5
10811$as_echo_n "checking for builddeps.conf files in sources...... " >&6; }
10812      builddepsfile=`mktemp`
10813      touch $builddepsfile
10814      # Put all found confs into a single file.
10815      find ${SRC_ROOT} -name builddeps.conf -exec cat \{\} \; >> $builddepsfile
10816      # Source the file to acquire the variables
10817      if test -s $builddepsfile; then
10818        . $builddepsfile
10819        { $as_echo "$as_me:${as_lineno-$LINENO}: result: found at least one!" >&5
10820$as_echo "found at least one!" >&6; }
10821      else
10822        as_fn_error $? "Could not find any builddeps.conf at all!" "$LINENO" 5
10823      fi
10824    fi
10825    # Create build and target names that use _ instead of "-" and ".".
10826    # This is necessary to use them in variable names.
10827    build_var=`echo ${OPENJDK_BUILD_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
10828    target_var=`echo ${OPENJDK_TARGET_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
10829    # Extract rewrite information for build and target
10830    eval rewritten_build=\${REWRITE_${build_var}}
10831    if test "x$rewritten_build" = x; then
10832      rewritten_build=${OPENJDK_BUILD_AUTOCONF_NAME}
10833      echo Build stays the same $rewritten_build
10834    else
10835      echo Rewriting build for builddeps into $rewritten_build
10836    fi
10837    eval rewritten_target=\${REWRITE_${target_var}}
10838    if test "x$rewritten_target" = x; then
10839      rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME}
10840      echo Target stays the same $rewritten_target
10841    else
10842      echo Rewriting target for builddeps into $rewritten_target
10843    fi
10844    rewritten_build_var=`echo ${rewritten_build} | tr '-' '_' | tr '.' '_'`
10845    rewritten_target_var=`echo ${rewritten_target} | tr '-' '_' | tr '.' '_'`
10846  fi
10847  for ac_prog in 7z unzip
10848do
10849  # Extract the first word of "$ac_prog", so it can be a program name with args.
10850set dummy $ac_prog; ac_word=$2
10851{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10852$as_echo_n "checking for $ac_word... " >&6; }
10853if ${ac_cv_prog_BDEPS_UNZIP+:} false; then :
10854  $as_echo_n "(cached) " >&6
10855else
10856  if test -n "$BDEPS_UNZIP"; then
10857  ac_cv_prog_BDEPS_UNZIP="$BDEPS_UNZIP" # Let the user override the test.
10858else
10859as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10860for as_dir in $PATH
10861do
10862  IFS=$as_save_IFS
10863  test -z "$as_dir" && as_dir=.
10864    for ac_exec_ext in '' $ac_executable_extensions; do
10865  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10866    ac_cv_prog_BDEPS_UNZIP="$ac_prog"
10867    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10868    break 2
10869  fi
10870done
10871  done
10872IFS=$as_save_IFS
10873
10874fi
10875fi
10876BDEPS_UNZIP=$ac_cv_prog_BDEPS_UNZIP
10877if test -n "$BDEPS_UNZIP"; then
10878  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_UNZIP" >&5
10879$as_echo "$BDEPS_UNZIP" >&6; }
10880else
10881  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10882$as_echo "no" >&6; }
10883fi
10884
10885
10886  test -n "$BDEPS_UNZIP" && break
10887done
10888
10889  if test "x$BDEPS_UNZIP" = x7z; then
10890    BDEPS_UNZIP="7z x"
10891  fi
10892
10893  for ac_prog in wget lftp ftp
10894do
10895  # Extract the first word of "$ac_prog", so it can be a program name with args.
10896set dummy $ac_prog; ac_word=$2
10897{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10898$as_echo_n "checking for $ac_word... " >&6; }
10899if ${ac_cv_prog_BDEPS_FTP+:} false; then :
10900  $as_echo_n "(cached) " >&6
10901else
10902  if test -n "$BDEPS_FTP"; then
10903  ac_cv_prog_BDEPS_FTP="$BDEPS_FTP" # Let the user override the test.
10904else
10905as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10906for as_dir in $PATH
10907do
10908  IFS=$as_save_IFS
10909  test -z "$as_dir" && as_dir=.
10910    for ac_exec_ext in '' $ac_executable_extensions; do
10911  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10912    ac_cv_prog_BDEPS_FTP="$ac_prog"
10913    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10914    break 2
10915  fi
10916done
10917  done
10918IFS=$as_save_IFS
10919
10920fi
10921fi
10922BDEPS_FTP=$ac_cv_prog_BDEPS_FTP
10923if test -n "$BDEPS_FTP"; then
10924  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_FTP" >&5
10925$as_echo "$BDEPS_FTP" >&6; }
10926else
10927  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10928$as_echo "no" >&6; }
10929fi
10930
10931
10932  test -n "$BDEPS_FTP" && break
10933done
10934
10935
10936
10937###############################################################################
10938#
10939# Determine OpenJDK variants, options and version numbers.
10940#
10941###############################################################################
10942
10943# We need build & target for this.
10944
10945
10946  ###############################################################################
10947  #
10948  # Should we build a JDK/JVM with headful support (ie a graphical ui)?
10949  # We always build headless support.
10950  #
10951  { $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
10952$as_echo_n "checking headful support... " >&6; }
10953  # Check whether --enable-headful was given.
10954if test "${enable_headful+set}" = set; then :
10955  enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
10956else
10957  SUPPORT_HEADFUL=yes
10958fi
10959
10960
10961  SUPPORT_HEADLESS=yes
10962  BUILD_HEADLESS="BUILD_HEADLESS:=true"
10963
10964  if test "x$SUPPORT_HEADFUL" = xyes; then
10965    # We are building both headful and headless.
10966    headful_msg="include support for both headful and headless"
10967  fi
10968
10969  if test "x$SUPPORT_HEADFUL" = xno; then
10970    # Thus we are building headless only.
10971    BUILD_HEADLESS="BUILD_HEADLESS:=true"
10972    headful_msg="headless only"
10973  fi
10974
10975  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
10976$as_echo "$headful_msg" >&6; }
10977
10978
10979
10980
10981
10982  # Control wether Hotspot runs Queens test after build.
10983  # Check whether --enable-hotspot-test-in-build was given.
10984if test "${enable_hotspot_test_in_build+set}" = set; then :
10985  enableval=$enable_hotspot_test_in_build;
10986else
10987  enable_hotspot_test_in_build=no
10988fi
10989
10990  if test "x$enable_hotspot_test_in_build" = "xyes"; then
10991    TEST_IN_BUILD=true
10992  else
10993    TEST_IN_BUILD=false
10994  fi
10995
10996
10997  ###############################################################################
10998  #
10999  # Choose cacerts source file
11000  #
11001
11002# Check whether --with-cacerts-file was given.
11003if test "${with_cacerts_file+set}" = set; then :
11004  withval=$with_cacerts_file;
11005fi
11006
11007  if test "x$with_cacerts_file" != x; then
11008    CACERTS_FILE=$with_cacerts_file
11009  else
11010    CACERTS_FILE=${SRC_ROOT}/jdk/src/share/lib/security/cacerts
11011  fi
11012
11013
11014  ###############################################################################
11015  #
11016  # Enable or disable unlimited crypto
11017  #
11018  # Check whether --enable-unlimited-crypto was given.
11019if test "${enable_unlimited_crypto+set}" = set; then :
11020  enableval=$enable_unlimited_crypto;
11021else
11022  enable_unlimited_crypto=no
11023fi
11024
11025  if test "x$enable_unlimited_crypto" = "xyes"; then
11026    UNLIMITED_CRYPTO=true
11027  else
11028    UNLIMITED_CRYPTO=false
11029  fi
11030
11031
11032  ###############################################################################
11033  #
11034  # Enable or disable the elliptic curve crypto implementation
11035  #
11036
11037
11038  ###############################################################################
11039  #
11040  # Compress jars
11041  #
11042  COMPRESS_JARS=false
11043
11044
11045
11046
11047  # Source the version numbers
11048  . $AUTOCONF_DIR/version-numbers
11049
11050  # Get the settings from parameters
11051
11052# Check whether --with-milestone was given.
11053if test "${with_milestone+set}" = set; then :
11054  withval=$with_milestone;
11055fi
11056
11057  if test "x$with_milestone" = xyes; then
11058    as_fn_error $? "Milestone must have a value" "$LINENO" 5
11059  elif test "x$with_milestone" != x; then
11060    MILESTONE="$with_milestone"
11061  fi
11062  if test "x$MILESTONE" = x; then
11063    MILESTONE=internal
11064  fi
11065
11066
11067# Check whether --with-update-version was given.
11068if test "${with_update_version+set}" = set; then :
11069  withval=$with_update_version;
11070fi
11071
11072  if test "x$with_update_version" = xyes; then
11073    as_fn_error $? "Update version must have a value" "$LINENO" 5
11074  elif test "x$with_update_version" != x; then
11075    JDK_UPDATE_VERSION="$with_update_version"
11076  fi
11077
11078
11079# Check whether --with-user-release-suffix was given.
11080if test "${with_user_release_suffix+set}" = set; then :
11081  withval=$with_user_release_suffix;
11082fi
11083
11084  if test "x$with_user_release_suffix" = xyes; then
11085    as_fn_error $? "Release suffix must have a value" "$LINENO" 5
11086  elif test "x$with_user_release_suffix" != x; then
11087    USER_RELEASE_SUFFIX="$with_user_release_suffix"
11088  fi
11089
11090
11091# Check whether --with-build-number was given.
11092if test "${with_build_number+set}" = set; then :
11093  withval=$with_build_number;
11094fi
11095
11096  if test "x$with_build_number" = xyes; then
11097    as_fn_error $? "Build number must have a value" "$LINENO" 5
11098  elif test "x$with_build_number" != x; then
11099    JDK_BUILD_NUMBER="$with_build_number"
11100  fi
11101  # Define default USER_RELEASE_SUFFIX if BUILD_NUMBER and USER_RELEASE_SUFFIX are not set
11102  if test "x$JDK_BUILD_NUMBER" = x; then
11103    JDK_BUILD_NUMBER=b00
11104    if test "x$USER_RELEASE_SUFFIX" = x; then
11105      BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
11106      # Avoid [:alnum:] since it depends on the locale.
11107      CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvqxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'`
11108      USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11109    fi
11110  fi
11111
11112  # Now set the JDK version, milestone, build number etc.
11113
11114
11115
11116
11117
11118
11119
11120
11121
11122
11123
11124
11125
11126
11127
11128  COPYRIGHT_YEAR=`date +'%Y'`
11129
11130
11131  if test "x$JDK_UPDATE_VERSION" != x; then
11132    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
11133  else
11134    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
11135  fi
11136
11137
11138  COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
11139
11140
11141
11142###############################################################################
11143#
11144# Setup BootJDK, used to bootstrap the build.
11145#
11146###############################################################################
11147
11148
11149  BOOT_JDK_FOUND=no
11150
11151# Check whether --with-boot-jdk was given.
11152if test "${with_boot_jdk+set}" = set; then :
11153  withval=$with_boot_jdk;
11154fi
11155
11156
11157  # We look for the Boot JDK through various means, going from more certain to
11158  # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
11159  # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
11160  # must check if this is indeed valid; otherwise we'll continue looking.
11161
11162  # Test: Is bootjdk explicitely set by command line arguments?
11163
11164  if test "x$BOOT_JDK_FOUND" = xno; then
11165    # Now execute the test
11166
11167  if test "x$with_boot_jdk" != x; then
11168    BOOT_JDK=$with_boot_jdk
11169    BOOT_JDK_FOUND=maybe
11170    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
11171$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
11172  fi
11173
11174
11175    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11176    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11177      # Do we have a bin/java?
11178      if test ! -x "$BOOT_JDK/bin/java"; then
11179        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11180$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11181        BOOT_JDK_FOUND=no
11182      else
11183        # Do we have a bin/javac?
11184        if test ! -x "$BOOT_JDK/bin/javac"; then
11185          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11186$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11187          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11188$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11189          BOOT_JDK_FOUND=no
11190        else
11191          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11192          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11193            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11194$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11195            BOOT_JDK_FOUND=no
11196          else
11197            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11198            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11199
11200            # Extra M4 quote needed to protect [] in grep expression.
11201            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11202            if test "x$FOUND_VERSION_78" = x; then
11203              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11204$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11205              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11206$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11207              BOOT_JDK_FOUND=no
11208            else
11209              # We're done! :-)
11210              BOOT_JDK_FOUND=yes
11211
11212  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11213
11214  # Input might be given as Windows format, start by converting to
11215  # unix format.
11216  path="$BOOT_JDK"
11217  new_path=`$CYGPATH -u "$path"`
11218
11219  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11220  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11221  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11222  # "foo.exe" is OK but "foo" is an error.
11223  #
11224  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11225  # It is also a way to make sure we got the proper file name for the real test later on.
11226  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11227  if test "x$test_shortpath" = x; then
11228    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11229$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11230    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11231  fi
11232
11233  # Call helper function which possibly converts this using DOS-style short mode.
11234  # If so, the updated path is stored in $new_path.
11235
11236  input_path="$new_path"
11237  # Check if we need to convert this using DOS-style short mode. If the path
11238  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11239  # take no chances and rewrite it.
11240  # Note: m4 eats our [], so we need to use [ and ] instead.
11241  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11242  if test "x$has_forbidden_chars" != x; then
11243    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11244    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11245    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11246    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11247      # Going to short mode and back again did indeed matter. Since short mode is
11248      # case insensitive, let's make it lowercase to improve readability.
11249      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11250      # Now convert it back to Unix-stile (cygpath)
11251      input_path=`$CYGPATH -u "$shortmode_path"`
11252      new_path="$input_path"
11253    fi
11254  fi
11255
11256  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11257  if test "x$test_cygdrive_prefix" = x; then
11258    # As a simple fix, exclude /usr/bin since it's not a real path.
11259    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11260      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11261      # a path prefixed by /cygdrive for fixpath to work.
11262      new_path="$CYGWIN_ROOT_PATH$input_path"
11263    fi
11264  fi
11265
11266
11267  if test "x$path" != "x$new_path"; then
11268    BOOT_JDK="$new_path"
11269    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11270$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11271  fi
11272
11273  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11274
11275  path="$BOOT_JDK"
11276  has_colon=`$ECHO $path | $GREP ^.:`
11277  new_path="$path"
11278  if test "x$has_colon" = x; then
11279    # Not in mixed or Windows style, start by that.
11280    new_path=`cmd //c echo $path`
11281  fi
11282
11283
11284  input_path="$new_path"
11285  # Check if we need to convert this using DOS-style short mode. If the path
11286  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11287  # take no chances and rewrite it.
11288  # Note: m4 eats our [], so we need to use [ and ] instead.
11289  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11290  if test "x$has_forbidden_chars" != x; then
11291    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11292    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11293  fi
11294
11295
11296  windows_path="$new_path"
11297  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11298    unix_path=`$CYGPATH -u "$windows_path"`
11299    new_path="$unix_path"
11300  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11301    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11302    new_path="$unix_path"
11303  fi
11304
11305  if test "x$path" != "x$new_path"; then
11306    BOOT_JDK="$new_path"
11307    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11308$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11309  fi
11310
11311  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11312  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11313
11314  else
11315    # We're on a posix platform. Hooray! :)
11316    path="$BOOT_JDK"
11317    has_space=`$ECHO "$path" | $GREP " "`
11318    if test "x$has_space" != x; then
11319      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11320$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11321      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11322    fi
11323
11324    # Use eval to expand a potential ~
11325    eval path="$path"
11326    if test ! -f "$path" && test ! -d "$path"; then
11327      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11328    fi
11329
11330    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
11331  fi
11332
11333              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11334$as_echo_n "checking for Boot JDK... " >&6; }
11335              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11336$as_echo "$BOOT_JDK" >&6; }
11337              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11338$as_echo_n "checking Boot JDK version... " >&6; }
11339              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11340              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11341$as_echo "$BOOT_JDK_VERSION" >&6; }
11342            fi # end check jdk version
11343          fi # end check rt.jar
11344        fi # end check javac
11345      fi # end check java
11346    fi # end check boot jdk found
11347  fi
11348
11349  if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
11350    # Having specified an argument which is incorrect will produce an instant failure;
11351    # we should not go on looking
11352    as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
11353  fi
11354
11355  # Test: Is bootjdk available from builddeps?
11356
11357  if test "x$BOOT_JDK_FOUND" = xno; then
11358    # Now execute the test
11359
11360
11361
11362  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
11363    # Source the builddeps file again, to make sure it uses the latest variables!
11364    . $builddepsfile
11365    # Look for a target and build machine specific resource!
11366    eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
11367    if test "x$resource" = x; then
11368      # Ok, lets instead look for a target specific resource
11369      eval resource=\${builddep_bootjdk_TARGET_${rewritten_target_var}}
11370    fi
11371    if test "x$resource" = x; then
11372      # Ok, lets instead look for a build specific resource
11373      eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}}
11374    fi
11375    if test "x$resource" = x; then
11376      # Ok, lets instead look for a generic resource
11377      # (The bootjdk comes from M4 and not the shell, thus no need for eval here.)
11378      resource=${builddep_bootjdk}
11379    fi
11380    if test "x$resource" != x; then
11381      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for bootjdk" >&5
11382$as_echo "$as_me: Using builddeps $resource for bootjdk" >&6;}
11383      # If the resource in the builddeps.conf file is an existing directory,
11384      # for example /java/linux/cups
11385      if test -d ${resource}; then
11386        depdir=${resource}
11387      else
11388
11389  # bootjdk is for example mymodule
11390  # $resource is for example libs/general/libmymod_1_2_3.zip
11391  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
11392  # $with_builddeps_dir is for example /localhome/builddeps
11393  # depdir is the name of the variable into which we store the depdir, eg MYMOD
11394  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
11395  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
11396  filename=`basename $resource`
11397  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
11398  filebase=${filename%%.*}
11399  extension=${filename#*.}
11400  installdir=$with_builddeps_dir/$filebase
11401  if test ! -f $installdir/$filename.unpacked; then
11402    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&5
11403$as_echo "$as_me: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&6;}
11404    if test ! -d $installdir; then
11405      mkdir -p $installdir
11406    fi
11407    if test ! -d $installdir; then
11408      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
11409    fi
11410    tmpfile=`mktemp $installdir/bootjdk.XXXXXXXXX`
11411    touch $tmpfile
11412    if test ! -f $tmpfile; then
11413      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
11414    fi
11415
11416  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
11417  # $tmpfile is the local file name for the downloaded file.
11418  VALID_TOOL=no
11419  if test "x$BDEPS_FTP" = xwget; then
11420    VALID_TOOL=yes
11421    wget -O $tmpfile $with_builddeps_server/$resource
11422  fi
11423  if test "x$BDEPS_FTP" = xlftp; then
11424    VALID_TOOL=yes
11425    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
11426  fi
11427  if test "x$BDEPS_FTP" = xftp; then
11428    VALID_TOOL=yes
11429    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
11430    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
11431    FTPUSERPWD=${FTPSERVER%%@*}
11432    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
11433      FTPUSER=${userpwd%%:*}
11434      FTPPWD=${userpwd#*@}
11435      FTPSERVER=${FTPSERVER#*@}
11436    else
11437      FTPUSER=ftp
11438      FTPPWD=ftp
11439    fi
11440    # the "pass" command does not work on some
11441    # ftp clients (read ftp.exe) but if it works,
11442    # passive mode is better!
11443    ( \
11444        echo "user $FTPUSER $FTPPWD"        ; \
11445        echo "pass"                         ; \
11446        echo "bin"                          ; \
11447        echo "get $FTPPATH $tmpfile"              ; \
11448    ) | ftp -in $FTPSERVER
11449  fi
11450  if test "x$VALID_TOOL" != xyes; then
11451    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
11452  fi
11453
11454    mv $tmpfile $installdir/$filename
11455    if test ! -s $installdir/$filename; then
11456      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
11457    fi
11458    case "$extension" in
11459      zip)  echo "Unzipping $installdir/$filename..."
11460        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
11461        ;;
11462      tar.gz) echo "Untaring $installdir/$filename..."
11463        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
11464        ;;
11465      tgz) echo "Untaring $installdir/$filename..."
11466        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
11467        ;;
11468      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
11469        ;;
11470    esac
11471  fi
11472  if test -f $installdir/$filename.unpacked; then
11473    depdir=$installdir
11474  fi
11475
11476      fi
11477      # Source the builddeps file again, because in the previous command, the depdir
11478      # was updated to point at the current build dependency install directory.
11479      . $builddepsfile
11480      # Now extract variables from the builddeps.conf files.
11481      theroot=${builddep_bootjdk_ROOT}
11482      thecflags=${builddep_bootjdk_CFLAGS}
11483      thelibs=${builddep_bootjdk_LIBS}
11484      if test "x$depdir" = x; then
11485        as_fn_error $? "Could not download build dependency bootjdk" "$LINENO" 5
11486      fi
11487      BOOT_JDK=$depdir
11488      if test "x$theroot" != x; then
11489        BOOT_JDK="$theroot"
11490      fi
11491      if test "x$thecflags" != x; then
11492        BOOT_JDK_CFLAGS="$thecflags"
11493      fi
11494      if test "x$thelibs" != x; then
11495        BOOT_JDK_LIBS="$thelibs"
11496      fi
11497      BOOT_JDK_FOUND=maybe
11498      else BOOT_JDK_FOUND=no
11499
11500    fi
11501    else BOOT_JDK_FOUND=no
11502
11503  fi
11504
11505
11506
11507    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11508    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11509      # Do we have a bin/java?
11510      if test ! -x "$BOOT_JDK/bin/java"; then
11511        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11512$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11513        BOOT_JDK_FOUND=no
11514      else
11515        # Do we have a bin/javac?
11516        if test ! -x "$BOOT_JDK/bin/javac"; then
11517          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11518$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11519          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11520$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11521          BOOT_JDK_FOUND=no
11522        else
11523          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11524          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11525            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11526$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11527            BOOT_JDK_FOUND=no
11528          else
11529            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11530            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11531
11532            # Extra M4 quote needed to protect [] in grep expression.
11533            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11534            if test "x$FOUND_VERSION_78" = x; then
11535              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11536$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11537              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11538$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11539              BOOT_JDK_FOUND=no
11540            else
11541              # We're done! :-)
11542              BOOT_JDK_FOUND=yes
11543
11544  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11545
11546  # Input might be given as Windows format, start by converting to
11547  # unix format.
11548  path="$BOOT_JDK"
11549  new_path=`$CYGPATH -u "$path"`
11550
11551  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11552  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11553  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11554  # "foo.exe" is OK but "foo" is an error.
11555  #
11556  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11557  # It is also a way to make sure we got the proper file name for the real test later on.
11558  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11559  if test "x$test_shortpath" = x; then
11560    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11561$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11562    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11563  fi
11564
11565  # Call helper function which possibly converts this using DOS-style short mode.
11566  # If so, the updated path is stored in $new_path.
11567
11568  input_path="$new_path"
11569  # Check if we need to convert this using DOS-style short mode. If the path
11570  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11571  # take no chances and rewrite it.
11572  # Note: m4 eats our [], so we need to use [ and ] instead.
11573  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11574  if test "x$has_forbidden_chars" != x; then
11575    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11576    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11577    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11578    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11579      # Going to short mode and back again did indeed matter. Since short mode is
11580      # case insensitive, let's make it lowercase to improve readability.
11581      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11582      # Now convert it back to Unix-stile (cygpath)
11583      input_path=`$CYGPATH -u "$shortmode_path"`
11584      new_path="$input_path"
11585    fi
11586  fi
11587
11588  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11589  if test "x$test_cygdrive_prefix" = x; then
11590    # As a simple fix, exclude /usr/bin since it's not a real path.
11591    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11592      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11593      # a path prefixed by /cygdrive for fixpath to work.
11594      new_path="$CYGWIN_ROOT_PATH$input_path"
11595    fi
11596  fi
11597
11598
11599  if test "x$path" != "x$new_path"; then
11600    BOOT_JDK="$new_path"
11601    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11602$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11603  fi
11604
11605  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11606
11607  path="$BOOT_JDK"
11608  has_colon=`$ECHO $path | $GREP ^.:`
11609  new_path="$path"
11610  if test "x$has_colon" = x; then
11611    # Not in mixed or Windows style, start by that.
11612    new_path=`cmd //c echo $path`
11613  fi
11614
11615
11616  input_path="$new_path"
11617  # Check if we need to convert this using DOS-style short mode. If the path
11618  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11619  # take no chances and rewrite it.
11620  # Note: m4 eats our [], so we need to use [ and ] instead.
11621  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11622  if test "x$has_forbidden_chars" != x; then
11623    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11624    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11625  fi
11626
11627
11628  windows_path="$new_path"
11629  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11630    unix_path=`$CYGPATH -u "$windows_path"`
11631    new_path="$unix_path"
11632  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11633    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11634    new_path="$unix_path"
11635  fi
11636
11637  if test "x$path" != "x$new_path"; then
11638    BOOT_JDK="$new_path"
11639    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11640$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11641  fi
11642
11643  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11644  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11645
11646  else
11647    # We're on a posix platform. Hooray! :)
11648    path="$BOOT_JDK"
11649    has_space=`$ECHO "$path" | $GREP " "`
11650    if test "x$has_space" != x; then
11651      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11652$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11653      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11654    fi
11655
11656    # Use eval to expand a potential ~
11657    eval path="$path"
11658    if test ! -f "$path" && test ! -d "$path"; then
11659      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11660    fi
11661
11662    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
11663  fi
11664
11665              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11666$as_echo_n "checking for Boot JDK... " >&6; }
11667              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11668$as_echo "$BOOT_JDK" >&6; }
11669              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11670$as_echo_n "checking Boot JDK version... " >&6; }
11671              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11672              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11673$as_echo "$BOOT_JDK_VERSION" >&6; }
11674            fi # end check jdk version
11675          fi # end check rt.jar
11676        fi # end check javac
11677      fi # end check java
11678    fi # end check boot jdk found
11679  fi
11680
11681
11682  # Test: Is $JAVA_HOME set?
11683
11684  if test "x$BOOT_JDK_FOUND" = xno; then
11685    # Now execute the test
11686
11687  if test "x$JAVA_HOME" != x; then
11688    JAVA_HOME_PROCESSED="$JAVA_HOME"
11689
11690  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11691
11692  # Input might be given as Windows format, start by converting to
11693  # unix format.
11694  path="$JAVA_HOME_PROCESSED"
11695  new_path=`$CYGPATH -u "$path"`
11696
11697  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11698  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11699  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11700  # "foo.exe" is OK but "foo" is an error.
11701  #
11702  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11703  # It is also a way to make sure we got the proper file name for the real test later on.
11704  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11705  if test "x$test_shortpath" = x; then
11706    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
11707$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
11708    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
11709  fi
11710
11711  # Call helper function which possibly converts this using DOS-style short mode.
11712  # If so, the updated path is stored in $new_path.
11713
11714  input_path="$new_path"
11715  # Check if we need to convert this using DOS-style short mode. If the path
11716  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11717  # take no chances and rewrite it.
11718  # Note: m4 eats our [], so we need to use [ and ] instead.
11719  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11720  if test "x$has_forbidden_chars" != x; then
11721    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11722    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11723    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11724    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11725      # Going to short mode and back again did indeed matter. Since short mode is
11726      # case insensitive, let's make it lowercase to improve readability.
11727      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11728      # Now convert it back to Unix-stile (cygpath)
11729      input_path=`$CYGPATH -u "$shortmode_path"`
11730      new_path="$input_path"
11731    fi
11732  fi
11733
11734  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11735  if test "x$test_cygdrive_prefix" = x; then
11736    # As a simple fix, exclude /usr/bin since it's not a real path.
11737    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11738      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11739      # a path prefixed by /cygdrive for fixpath to work.
11740      new_path="$CYGWIN_ROOT_PATH$input_path"
11741    fi
11742  fi
11743
11744
11745  if test "x$path" != "x$new_path"; then
11746    JAVA_HOME_PROCESSED="$new_path"
11747    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
11748$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
11749  fi
11750
11751  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11752
11753  path="$JAVA_HOME_PROCESSED"
11754  has_colon=`$ECHO $path | $GREP ^.:`
11755  new_path="$path"
11756  if test "x$has_colon" = x; then
11757    # Not in mixed or Windows style, start by that.
11758    new_path=`cmd //c echo $path`
11759  fi
11760
11761
11762  input_path="$new_path"
11763  # Check if we need to convert this using DOS-style short mode. If the path
11764  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11765  # take no chances and rewrite it.
11766  # Note: m4 eats our [], so we need to use [ and ] instead.
11767  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11768  if test "x$has_forbidden_chars" != x; then
11769    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11770    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11771  fi
11772
11773
11774  windows_path="$new_path"
11775  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11776    unix_path=`$CYGPATH -u "$windows_path"`
11777    new_path="$unix_path"
11778  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11779    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11780    new_path="$unix_path"
11781  fi
11782
11783  if test "x$path" != "x$new_path"; then
11784    JAVA_HOME_PROCESSED="$new_path"
11785    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
11786$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
11787  fi
11788
11789  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11790  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11791
11792  else
11793    # We're on a posix platform. Hooray! :)
11794    path="$JAVA_HOME_PROCESSED"
11795    has_space=`$ECHO "$path" | $GREP " "`
11796    if test "x$has_space" != x; then
11797      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
11798$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
11799      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11800    fi
11801
11802    # Use eval to expand a potential ~
11803    eval path="$path"
11804    if test ! -f "$path" && test ! -d "$path"; then
11805      as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
11806    fi
11807
11808    JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
11809  fi
11810
11811    if test ! -d "$JAVA_HOME_PROCESSED"; then
11812      { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
11813$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
11814    else
11815      # Aha, the user has set a JAVA_HOME
11816      # let us use that as the Boot JDK.
11817      BOOT_JDK="$JAVA_HOME_PROCESSED"
11818      BOOT_JDK_FOUND=maybe
11819      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
11820$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
11821    fi
11822  fi
11823
11824
11825    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11826    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11827      # Do we have a bin/java?
11828      if test ! -x "$BOOT_JDK/bin/java"; then
11829        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11830$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11831        BOOT_JDK_FOUND=no
11832      else
11833        # Do we have a bin/javac?
11834        if test ! -x "$BOOT_JDK/bin/javac"; then
11835          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11836$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11837          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11838$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11839          BOOT_JDK_FOUND=no
11840        else
11841          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11842          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11843            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11844$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11845            BOOT_JDK_FOUND=no
11846          else
11847            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11848            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11849
11850            # Extra M4 quote needed to protect [] in grep expression.
11851            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11852            if test "x$FOUND_VERSION_78" = x; then
11853              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11854$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11855              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11856$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11857              BOOT_JDK_FOUND=no
11858            else
11859              # We're done! :-)
11860              BOOT_JDK_FOUND=yes
11861
11862  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11863
11864  # Input might be given as Windows format, start by converting to
11865  # unix format.
11866  path="$BOOT_JDK"
11867  new_path=`$CYGPATH -u "$path"`
11868
11869  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11870  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11871  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11872  # "foo.exe" is OK but "foo" is an error.
11873  #
11874  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11875  # It is also a way to make sure we got the proper file name for the real test later on.
11876  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11877  if test "x$test_shortpath" = x; then
11878    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11879$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11880    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11881  fi
11882
11883  # Call helper function which possibly converts this using DOS-style short mode.
11884  # If so, the updated path is stored in $new_path.
11885
11886  input_path="$new_path"
11887  # Check if we need to convert this using DOS-style short mode. If the path
11888  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11889  # take no chances and rewrite it.
11890  # Note: m4 eats our [], so we need to use [ and ] instead.
11891  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11892  if test "x$has_forbidden_chars" != x; then
11893    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11894    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11895    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11896    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11897      # Going to short mode and back again did indeed matter. Since short mode is
11898      # case insensitive, let's make it lowercase to improve readability.
11899      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11900      # Now convert it back to Unix-stile (cygpath)
11901      input_path=`$CYGPATH -u "$shortmode_path"`
11902      new_path="$input_path"
11903    fi
11904  fi
11905
11906  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11907  if test "x$test_cygdrive_prefix" = x; then
11908    # As a simple fix, exclude /usr/bin since it's not a real path.
11909    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11910      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11911      # a path prefixed by /cygdrive for fixpath to work.
11912      new_path="$CYGWIN_ROOT_PATH$input_path"
11913    fi
11914  fi
11915
11916
11917  if test "x$path" != "x$new_path"; then
11918    BOOT_JDK="$new_path"
11919    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11920$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11921  fi
11922
11923  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11924
11925  path="$BOOT_JDK"
11926  has_colon=`$ECHO $path | $GREP ^.:`
11927  new_path="$path"
11928  if test "x$has_colon" = x; then
11929    # Not in mixed or Windows style, start by that.
11930    new_path=`cmd //c echo $path`
11931  fi
11932
11933
11934  input_path="$new_path"
11935  # Check if we need to convert this using DOS-style short mode. If the path
11936  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11937  # take no chances and rewrite it.
11938  # Note: m4 eats our [], so we need to use [ and ] instead.
11939  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11940  if test "x$has_forbidden_chars" != x; then
11941    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11942    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11943  fi
11944
11945
11946  windows_path="$new_path"
11947  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11948    unix_path=`$CYGPATH -u "$windows_path"`
11949    new_path="$unix_path"
11950  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11951    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11952    new_path="$unix_path"
11953  fi
11954
11955  if test "x$path" != "x$new_path"; then
11956    BOOT_JDK="$new_path"
11957    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11958$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11959  fi
11960
11961  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11962  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11963
11964  else
11965    # We're on a posix platform. Hooray! :)
11966    path="$BOOT_JDK"
11967    has_space=`$ECHO "$path" | $GREP " "`
11968    if test "x$has_space" != x; then
11969      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11970$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11971      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11972    fi
11973
11974    # Use eval to expand a potential ~
11975    eval path="$path"
11976    if test ! -f "$path" && test ! -d "$path"; then
11977      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11978    fi
11979
11980    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
11981  fi
11982
11983              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11984$as_echo_n "checking for Boot JDK... " >&6; }
11985              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11986$as_echo "$BOOT_JDK" >&6; }
11987              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11988$as_echo_n "checking Boot JDK version... " >&6; }
11989              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11990              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11991$as_echo "$BOOT_JDK_VERSION" >&6; }
11992            fi # end check jdk version
11993          fi # end check rt.jar
11994        fi # end check javac
11995      fi # end check java
11996    fi # end check boot jdk found
11997  fi
11998
11999
12000  # Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
12001
12002  if test "x$BOOT_JDK_FOUND" = xno; then
12003    # Now execute the test
12004
12005  if test -x /usr/libexec/java_home; then
12006    BOOT_JDK=`/usr/libexec/java_home`
12007    BOOT_JDK_FOUND=maybe
12008    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home" >&5
12009$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home" >&6;}
12010  fi
12011
12012
12013    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12014    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12015      # Do we have a bin/java?
12016      if test ! -x "$BOOT_JDK/bin/java"; then
12017        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12018$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12019        BOOT_JDK_FOUND=no
12020      else
12021        # Do we have a bin/javac?
12022        if test ! -x "$BOOT_JDK/bin/javac"; then
12023          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12024$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12025          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12026$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12027          BOOT_JDK_FOUND=no
12028        else
12029          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12030          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12031            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12032$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12033            BOOT_JDK_FOUND=no
12034          else
12035            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12036            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12037
12038            # Extra M4 quote needed to protect [] in grep expression.
12039            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12040            if test "x$FOUND_VERSION_78" = x; then
12041              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12042$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12043              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12044$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12045              BOOT_JDK_FOUND=no
12046            else
12047              # We're done! :-)
12048              BOOT_JDK_FOUND=yes
12049
12050  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12051
12052  # Input might be given as Windows format, start by converting to
12053  # unix format.
12054  path="$BOOT_JDK"
12055  new_path=`$CYGPATH -u "$path"`
12056
12057  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12058  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12059  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12060  # "foo.exe" is OK but "foo" is an error.
12061  #
12062  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12063  # It is also a way to make sure we got the proper file name for the real test later on.
12064  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12065  if test "x$test_shortpath" = x; then
12066    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12067$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12068    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12069  fi
12070
12071  # Call helper function which possibly converts this using DOS-style short mode.
12072  # If so, the updated path is stored in $new_path.
12073
12074  input_path="$new_path"
12075  # Check if we need to convert this using DOS-style short mode. If the path
12076  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12077  # take no chances and rewrite it.
12078  # Note: m4 eats our [], so we need to use [ and ] instead.
12079  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12080  if test "x$has_forbidden_chars" != x; then
12081    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12082    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12083    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12084    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12085      # Going to short mode and back again did indeed matter. Since short mode is
12086      # case insensitive, let's make it lowercase to improve readability.
12087      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12088      # Now convert it back to Unix-stile (cygpath)
12089      input_path=`$CYGPATH -u "$shortmode_path"`
12090      new_path="$input_path"
12091    fi
12092  fi
12093
12094  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12095  if test "x$test_cygdrive_prefix" = x; then
12096    # As a simple fix, exclude /usr/bin since it's not a real path.
12097    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12098      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12099      # a path prefixed by /cygdrive for fixpath to work.
12100      new_path="$CYGWIN_ROOT_PATH$input_path"
12101    fi
12102  fi
12103
12104
12105  if test "x$path" != "x$new_path"; then
12106    BOOT_JDK="$new_path"
12107    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12108$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12109  fi
12110
12111  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12112
12113  path="$BOOT_JDK"
12114  has_colon=`$ECHO $path | $GREP ^.:`
12115  new_path="$path"
12116  if test "x$has_colon" = x; then
12117    # Not in mixed or Windows style, start by that.
12118    new_path=`cmd //c echo $path`
12119  fi
12120
12121
12122  input_path="$new_path"
12123  # Check if we need to convert this using DOS-style short mode. If the path
12124  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12125  # take no chances and rewrite it.
12126  # Note: m4 eats our [], so we need to use [ and ] instead.
12127  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12128  if test "x$has_forbidden_chars" != x; then
12129    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12130    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12131  fi
12132
12133
12134  windows_path="$new_path"
12135  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12136    unix_path=`$CYGPATH -u "$windows_path"`
12137    new_path="$unix_path"
12138  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12139    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12140    new_path="$unix_path"
12141  fi
12142
12143  if test "x$path" != "x$new_path"; then
12144    BOOT_JDK="$new_path"
12145    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12146$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12147  fi
12148
12149  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12150  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12151
12152  else
12153    # We're on a posix platform. Hooray! :)
12154    path="$BOOT_JDK"
12155    has_space=`$ECHO "$path" | $GREP " "`
12156    if test "x$has_space" != x; then
12157      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12158$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12159      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12160    fi
12161
12162    # Use eval to expand a potential ~
12163    eval path="$path"
12164    if test ! -f "$path" && test ! -d "$path"; then
12165      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12166    fi
12167
12168    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
12169  fi
12170
12171              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12172$as_echo_n "checking for Boot JDK... " >&6; }
12173              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12174$as_echo "$BOOT_JDK" >&6; }
12175              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12176$as_echo_n "checking Boot JDK version... " >&6; }
12177              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12178              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12179$as_echo "$BOOT_JDK_VERSION" >&6; }
12180            fi # end check jdk version
12181          fi # end check rt.jar
12182        fi # end check javac
12183      fi # end check java
12184    fi # end check boot jdk found
12185  fi
12186
12187
12188  # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
12189
12190  if test "x$BOOT_JDK_FOUND" = xno; then
12191    # Now execute the test
12192
12193  # Extract the first word of "javac", so it can be a program name with args.
12194set dummy javac; ac_word=$2
12195{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12196$as_echo_n "checking for $ac_word... " >&6; }
12197if ${ac_cv_path_JAVAC_CHECK+:} false; then :
12198  $as_echo_n "(cached) " >&6
12199else
12200  case $JAVAC_CHECK in
12201  [\\/]* | ?:[\\/]*)
12202  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
12203  ;;
12204  *)
12205  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12206for as_dir in $PATH
12207do
12208  IFS=$as_save_IFS
12209  test -z "$as_dir" && as_dir=.
12210    for ac_exec_ext in '' $ac_executable_extensions; do
12211  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12212    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
12213    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12214    break 2
12215  fi
12216done
12217  done
12218IFS=$as_save_IFS
12219
12220  ;;
12221esac
12222fi
12223JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
12224if test -n "$JAVAC_CHECK"; then
12225  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
12226$as_echo "$JAVAC_CHECK" >&6; }
12227else
12228  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12229$as_echo "no" >&6; }
12230fi
12231
12232
12233  # Extract the first word of "java", so it can be a program name with args.
12234set dummy java; ac_word=$2
12235{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12236$as_echo_n "checking for $ac_word... " >&6; }
12237if ${ac_cv_path_JAVA_CHECK+:} false; then :
12238  $as_echo_n "(cached) " >&6
12239else
12240  case $JAVA_CHECK in
12241  [\\/]* | ?:[\\/]*)
12242  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
12243  ;;
12244  *)
12245  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12246for as_dir in $PATH
12247do
12248  IFS=$as_save_IFS
12249  test -z "$as_dir" && as_dir=.
12250    for ac_exec_ext in '' $ac_executable_extensions; do
12251  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12252    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
12253    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12254    break 2
12255  fi
12256done
12257  done
12258IFS=$as_save_IFS
12259
12260  ;;
12261esac
12262fi
12263JAVA_CHECK=$ac_cv_path_JAVA_CHECK
12264if test -n "$JAVA_CHECK"; then
12265  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
12266$as_echo "$JAVA_CHECK" >&6; }
12267else
12268  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12269$as_echo "no" >&6; }
12270fi
12271
12272
12273  BINARY="$JAVAC_CHECK"
12274  if test "x$JAVAC_CHECK" = x; then
12275    BINARY="$JAVA_CHECK"
12276  fi
12277  if test "x$BINARY" != x; then
12278    # So there is a java(c) binary, it might be part of a JDK.
12279    # Lets find the JDK/JRE directory by following symbolic links.
12280    # Linux/GNU systems often have links from /usr/bin/java to
12281    # /etc/alternatives/java to the real JDK binary.
12282
12283  if test "x$OPENJDK_BUILD_OS" != xwindows; then
12284    # Follow a chain of symbolic links. Use readlink
12285    # where it exists, else fall back to horribly
12286    # complicated shell code.
12287    if test "x$READLINK_TESTED" != yes; then
12288      # On MacOSX there is a readlink tool with a different
12289      # purpose than the GNU readlink tool. Check the found readlink.
12290      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
12291      if test "x$ISGNU" = x; then
12292        # A readlink that we do not know how to use.
12293        # Are there other non-GNU readlinks out there?
12294        READLINK_TESTED=yes
12295        READLINK=
12296      fi
12297    fi
12298
12299    if test "x$READLINK" != x; then
12300      BINARY=`$READLINK -f $BINARY`
12301    else
12302      # Save the current directory for restoring afterwards
12303      STARTDIR=$PWD
12304      COUNTER=0
12305      sym_link_dir=`$DIRNAME $BINARY`
12306      sym_link_file=`$BASENAME $BINARY`
12307      cd $sym_link_dir
12308      # Use -P flag to resolve symlinks in directories.
12309      cd `$THEPWDCMD -P`
12310      sym_link_dir=`$THEPWDCMD -P`
12311      # Resolve file symlinks
12312      while test $COUNTER -lt 20; do
12313        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
12314        if test "x$ISLINK" == x; then
12315          # This is not a symbolic link! We are done!
12316          break
12317        fi
12318        # Again resolve directory symlinks since the target of the just found
12319        # link could be in a different directory
12320        cd `$DIRNAME $ISLINK`
12321        sym_link_dir=`$THEPWDCMD -P`
12322        sym_link_file=`$BASENAME $ISLINK`
12323        let COUNTER=COUNTER+1
12324      done
12325      cd $STARTDIR
12326      BINARY=$sym_link_dir/$sym_link_file
12327    fi
12328  fi
12329
12330    BOOT_JDK=`dirname "$BINARY"`
12331    BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
12332    if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
12333      # Looks like we found ourselves an JDK
12334      BOOT_JDK_FOUND=maybe
12335      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
12336$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
12337    fi
12338  fi
12339
12340
12341    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12342    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12343      # Do we have a bin/java?
12344      if test ! -x "$BOOT_JDK/bin/java"; then
12345        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12346$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12347        BOOT_JDK_FOUND=no
12348      else
12349        # Do we have a bin/javac?
12350        if test ! -x "$BOOT_JDK/bin/javac"; then
12351          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12352$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12353          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12354$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12355          BOOT_JDK_FOUND=no
12356        else
12357          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12358          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12359            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12360$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12361            BOOT_JDK_FOUND=no
12362          else
12363            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12364            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12365
12366            # Extra M4 quote needed to protect [] in grep expression.
12367            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12368            if test "x$FOUND_VERSION_78" = x; then
12369              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12370$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12371              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12372$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12373              BOOT_JDK_FOUND=no
12374            else
12375              # We're done! :-)
12376              BOOT_JDK_FOUND=yes
12377
12378  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12379
12380  # Input might be given as Windows format, start by converting to
12381  # unix format.
12382  path="$BOOT_JDK"
12383  new_path=`$CYGPATH -u "$path"`
12384
12385  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12386  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12387  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12388  # "foo.exe" is OK but "foo" is an error.
12389  #
12390  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12391  # It is also a way to make sure we got the proper file name for the real test later on.
12392  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12393  if test "x$test_shortpath" = x; then
12394    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12395$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12396    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12397  fi
12398
12399  # Call helper function which possibly converts this using DOS-style short mode.
12400  # If so, the updated path is stored in $new_path.
12401
12402  input_path="$new_path"
12403  # Check if we need to convert this using DOS-style short mode. If the path
12404  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12405  # take no chances and rewrite it.
12406  # Note: m4 eats our [], so we need to use [ and ] instead.
12407  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12408  if test "x$has_forbidden_chars" != x; then
12409    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12410    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12411    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12412    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12413      # Going to short mode and back again did indeed matter. Since short mode is
12414      # case insensitive, let's make it lowercase to improve readability.
12415      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12416      # Now convert it back to Unix-stile (cygpath)
12417      input_path=`$CYGPATH -u "$shortmode_path"`
12418      new_path="$input_path"
12419    fi
12420  fi
12421
12422  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12423  if test "x$test_cygdrive_prefix" = x; then
12424    # As a simple fix, exclude /usr/bin since it's not a real path.
12425    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12426      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12427      # a path prefixed by /cygdrive for fixpath to work.
12428      new_path="$CYGWIN_ROOT_PATH$input_path"
12429    fi
12430  fi
12431
12432
12433  if test "x$path" != "x$new_path"; then
12434    BOOT_JDK="$new_path"
12435    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12436$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12437  fi
12438
12439  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12440
12441  path="$BOOT_JDK"
12442  has_colon=`$ECHO $path | $GREP ^.:`
12443  new_path="$path"
12444  if test "x$has_colon" = x; then
12445    # Not in mixed or Windows style, start by that.
12446    new_path=`cmd //c echo $path`
12447  fi
12448
12449
12450  input_path="$new_path"
12451  # Check if we need to convert this using DOS-style short mode. If the path
12452  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12453  # take no chances and rewrite it.
12454  # Note: m4 eats our [], so we need to use [ and ] instead.
12455  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12456  if test "x$has_forbidden_chars" != x; then
12457    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12458    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12459  fi
12460
12461
12462  windows_path="$new_path"
12463  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12464    unix_path=`$CYGPATH -u "$windows_path"`
12465    new_path="$unix_path"
12466  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12467    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12468    new_path="$unix_path"
12469  fi
12470
12471  if test "x$path" != "x$new_path"; then
12472    BOOT_JDK="$new_path"
12473    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12474$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12475  fi
12476
12477  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12478  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12479
12480  else
12481    # We're on a posix platform. Hooray! :)
12482    path="$BOOT_JDK"
12483    has_space=`$ECHO "$path" | $GREP " "`
12484    if test "x$has_space" != x; then
12485      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12486$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12487      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12488    fi
12489
12490    # Use eval to expand a potential ~
12491    eval path="$path"
12492    if test ! -f "$path" && test ! -d "$path"; then
12493      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12494    fi
12495
12496    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
12497  fi
12498
12499              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12500$as_echo_n "checking for Boot JDK... " >&6; }
12501              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12502$as_echo "$BOOT_JDK" >&6; }
12503              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12504$as_echo_n "checking Boot JDK version... " >&6; }
12505              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12506              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12507$as_echo "$BOOT_JDK_VERSION" >&6; }
12508            fi # end check jdk version
12509          fi # end check rt.jar
12510        fi # end check javac
12511      fi # end check java
12512    fi # end check boot jdk found
12513  fi
12514
12515
12516  # Test: Is there a JDK installed in default, well-known locations?
12517
12518  if test "x$BOOT_JDK_FOUND" = xno; then
12519    # Now execute the test
12520
12521  if test "x$OPENJDK_TARGET_OS" = xwindows; then
12522
12523  if test "x$BOOT_JDK_FOUND" = xno; then
12524    # Now execute the test
12525
12526  if test "x$ProgramW6432" != x; then
12527    VIRTUAL_DIR="$ProgramW6432/Java"
12528
12529  windows_path="$VIRTUAL_DIR"
12530  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12531    unix_path=`$CYGPATH -u "$windows_path"`
12532    VIRTUAL_DIR="$unix_path"
12533  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12534    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12535    VIRTUAL_DIR="$unix_path"
12536  fi
12537
12538
12539  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
12540  BOOT_JDK_SUFFIX=""
12541  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
12542  if test "x$ALL_JDKS_FOUND" != x; then
12543    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
12544
12545  if test "x$BOOT_JDK_FOUND" = xno; then
12546    # Now execute the test
12547
12548        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
12549        if test -d "$BOOT_JDK"; then
12550          BOOT_JDK_FOUND=maybe
12551          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
12552$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
12553        fi
12554
12555
12556    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12557    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12558      # Do we have a bin/java?
12559      if test ! -x "$BOOT_JDK/bin/java"; then
12560        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12561$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12562        BOOT_JDK_FOUND=no
12563      else
12564        # Do we have a bin/javac?
12565        if test ! -x "$BOOT_JDK/bin/javac"; then
12566          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12567$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12568          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12569$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12570          BOOT_JDK_FOUND=no
12571        else
12572          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12573          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12574            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12575$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12576            BOOT_JDK_FOUND=no
12577          else
12578            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12579            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12580
12581            # Extra M4 quote needed to protect [] in grep expression.
12582            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12583            if test "x$FOUND_VERSION_78" = x; then
12584              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12585$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12586              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12587$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12588              BOOT_JDK_FOUND=no
12589            else
12590              # We're done! :-)
12591              BOOT_JDK_FOUND=yes
12592
12593  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12594
12595  # Input might be given as Windows format, start by converting to
12596  # unix format.
12597  path="$BOOT_JDK"
12598  new_path=`$CYGPATH -u "$path"`
12599
12600  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12601  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12602  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12603  # "foo.exe" is OK but "foo" is an error.
12604  #
12605  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12606  # It is also a way to make sure we got the proper file name for the real test later on.
12607  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12608  if test "x$test_shortpath" = x; then
12609    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12610$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12611    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12612  fi
12613
12614  # Call helper function which possibly converts this using DOS-style short mode.
12615  # If so, the updated path is stored in $new_path.
12616
12617  input_path="$new_path"
12618  # Check if we need to convert this using DOS-style short mode. If the path
12619  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12620  # take no chances and rewrite it.
12621  # Note: m4 eats our [], so we need to use [ and ] instead.
12622  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12623  if test "x$has_forbidden_chars" != x; then
12624    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12625    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12626    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12627    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12628      # Going to short mode and back again did indeed matter. Since short mode is
12629      # case insensitive, let's make it lowercase to improve readability.
12630      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12631      # Now convert it back to Unix-stile (cygpath)
12632      input_path=`$CYGPATH -u "$shortmode_path"`
12633      new_path="$input_path"
12634    fi
12635  fi
12636
12637  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12638  if test "x$test_cygdrive_prefix" = x; then
12639    # As a simple fix, exclude /usr/bin since it's not a real path.
12640    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12641      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12642      # a path prefixed by /cygdrive for fixpath to work.
12643      new_path="$CYGWIN_ROOT_PATH$input_path"
12644    fi
12645  fi
12646
12647
12648  if test "x$path" != "x$new_path"; then
12649    BOOT_JDK="$new_path"
12650    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12651$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12652  fi
12653
12654  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12655
12656  path="$BOOT_JDK"
12657  has_colon=`$ECHO $path | $GREP ^.:`
12658  new_path="$path"
12659  if test "x$has_colon" = x; then
12660    # Not in mixed or Windows style, start by that.
12661    new_path=`cmd //c echo $path`
12662  fi
12663
12664
12665  input_path="$new_path"
12666  # Check if we need to convert this using DOS-style short mode. If the path
12667  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12668  # take no chances and rewrite it.
12669  # Note: m4 eats our [], so we need to use [ and ] instead.
12670  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12671  if test "x$has_forbidden_chars" != x; then
12672    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12673    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12674  fi
12675
12676
12677  windows_path="$new_path"
12678  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12679    unix_path=`$CYGPATH -u "$windows_path"`
12680    new_path="$unix_path"
12681  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12682    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12683    new_path="$unix_path"
12684  fi
12685
12686  if test "x$path" != "x$new_path"; then
12687    BOOT_JDK="$new_path"
12688    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12689$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12690  fi
12691
12692  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12693  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12694
12695  else
12696    # We're on a posix platform. Hooray! :)
12697    path="$BOOT_JDK"
12698    has_space=`$ECHO "$path" | $GREP " "`
12699    if test "x$has_space" != x; then
12700      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12701$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12702      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12703    fi
12704
12705    # Use eval to expand a potential ~
12706    eval path="$path"
12707    if test ! -f "$path" && test ! -d "$path"; then
12708      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12709    fi
12710
12711    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
12712  fi
12713
12714              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12715$as_echo_n "checking for Boot JDK... " >&6; }
12716              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12717$as_echo "$BOOT_JDK" >&6; }
12718              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12719$as_echo_n "checking Boot JDK version... " >&6; }
12720              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12721              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12722$as_echo "$BOOT_JDK_VERSION" >&6; }
12723            fi # end check jdk version
12724          fi # end check rt.jar
12725        fi # end check javac
12726      fi # end check java
12727    fi # end check boot jdk found
12728  fi
12729
12730    done
12731  fi
12732
12733  fi
12734
12735
12736    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12737    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12738      # Do we have a bin/java?
12739      if test ! -x "$BOOT_JDK/bin/java"; then
12740        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12741$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12742        BOOT_JDK_FOUND=no
12743      else
12744        # Do we have a bin/javac?
12745        if test ! -x "$BOOT_JDK/bin/javac"; then
12746          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12747$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12748          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12749$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12750          BOOT_JDK_FOUND=no
12751        else
12752          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12753          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12754            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12755$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12756            BOOT_JDK_FOUND=no
12757          else
12758            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12759            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12760
12761            # Extra M4 quote needed to protect [] in grep expression.
12762            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12763            if test "x$FOUND_VERSION_78" = x; then
12764              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12765$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12766              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12767$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12768              BOOT_JDK_FOUND=no
12769            else
12770              # We're done! :-)
12771              BOOT_JDK_FOUND=yes
12772
12773  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12774
12775  # Input might be given as Windows format, start by converting to
12776  # unix format.
12777  path="$BOOT_JDK"
12778  new_path=`$CYGPATH -u "$path"`
12779
12780  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12781  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12782  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12783  # "foo.exe" is OK but "foo" is an error.
12784  #
12785  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12786  # It is also a way to make sure we got the proper file name for the real test later on.
12787  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12788  if test "x$test_shortpath" = x; then
12789    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12790$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12791    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12792  fi
12793
12794  # Call helper function which possibly converts this using DOS-style short mode.
12795  # If so, the updated path is stored in $new_path.
12796
12797  input_path="$new_path"
12798  # Check if we need to convert this using DOS-style short mode. If the path
12799  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12800  # take no chances and rewrite it.
12801  # Note: m4 eats our [], so we need to use [ and ] instead.
12802  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12803  if test "x$has_forbidden_chars" != x; then
12804    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12805    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12806    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12807    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12808      # Going to short mode and back again did indeed matter. Since short mode is
12809      # case insensitive, let's make it lowercase to improve readability.
12810      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12811      # Now convert it back to Unix-stile (cygpath)
12812      input_path=`$CYGPATH -u "$shortmode_path"`
12813      new_path="$input_path"
12814    fi
12815  fi
12816
12817  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12818  if test "x$test_cygdrive_prefix" = x; then
12819    # As a simple fix, exclude /usr/bin since it's not a real path.
12820    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12821      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12822      # a path prefixed by /cygdrive for fixpath to work.
12823      new_path="$CYGWIN_ROOT_PATH$input_path"
12824    fi
12825  fi
12826
12827
12828  if test "x$path" != "x$new_path"; then
12829    BOOT_JDK="$new_path"
12830    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12831$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12832  fi
12833
12834  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12835
12836  path="$BOOT_JDK"
12837  has_colon=`$ECHO $path | $GREP ^.:`
12838  new_path="$path"
12839  if test "x$has_colon" = x; then
12840    # Not in mixed or Windows style, start by that.
12841    new_path=`cmd //c echo $path`
12842  fi
12843
12844
12845  input_path="$new_path"
12846  # Check if we need to convert this using DOS-style short mode. If the path
12847  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12848  # take no chances and rewrite it.
12849  # Note: m4 eats our [], so we need to use [ and ] instead.
12850  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12851  if test "x$has_forbidden_chars" != x; then
12852    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12853    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12854  fi
12855
12856
12857  windows_path="$new_path"
12858  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12859    unix_path=`$CYGPATH -u "$windows_path"`
12860    new_path="$unix_path"
12861  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12862    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12863    new_path="$unix_path"
12864  fi
12865
12866  if test "x$path" != "x$new_path"; then
12867    BOOT_JDK="$new_path"
12868    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12869$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12870  fi
12871
12872  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12873  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12874
12875  else
12876    # We're on a posix platform. Hooray! :)
12877    path="$BOOT_JDK"
12878    has_space=`$ECHO "$path" | $GREP " "`
12879    if test "x$has_space" != x; then
12880      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12881$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12882      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12883    fi
12884
12885    # Use eval to expand a potential ~
12886    eval path="$path"
12887    if test ! -f "$path" && test ! -d "$path"; then
12888      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12889    fi
12890
12891    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
12892  fi
12893
12894              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12895$as_echo_n "checking for Boot JDK... " >&6; }
12896              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12897$as_echo "$BOOT_JDK" >&6; }
12898              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12899$as_echo_n "checking Boot JDK version... " >&6; }
12900              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12901              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12902$as_echo "$BOOT_JDK_VERSION" >&6; }
12903            fi # end check jdk version
12904          fi # end check rt.jar
12905        fi # end check javac
12906      fi # end check java
12907    fi # end check boot jdk found
12908  fi
12909
12910
12911  if test "x$BOOT_JDK_FOUND" = xno; then
12912    # Now execute the test
12913
12914  if test "x$PROGRAMW6432" != x; then
12915    VIRTUAL_DIR="$PROGRAMW6432/Java"
12916
12917  windows_path="$VIRTUAL_DIR"
12918  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12919    unix_path=`$CYGPATH -u "$windows_path"`
12920    VIRTUAL_DIR="$unix_path"
12921  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12922    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12923    VIRTUAL_DIR="$unix_path"
12924  fi
12925
12926
12927  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
12928  BOOT_JDK_SUFFIX=""
12929  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
12930  if test "x$ALL_JDKS_FOUND" != x; then
12931    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
12932
12933  if test "x$BOOT_JDK_FOUND" = xno; then
12934    # Now execute the test
12935
12936        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
12937        if test -d "$BOOT_JDK"; then
12938          BOOT_JDK_FOUND=maybe
12939          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
12940$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
12941        fi
12942
12943
12944    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12945    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12946      # Do we have a bin/java?
12947      if test ! -x "$BOOT_JDK/bin/java"; then
12948        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12949$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12950        BOOT_JDK_FOUND=no
12951      else
12952        # Do we have a bin/javac?
12953        if test ! -x "$BOOT_JDK/bin/javac"; then
12954          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12955$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12956          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12957$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12958          BOOT_JDK_FOUND=no
12959        else
12960          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12961          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12962            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12963$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12964            BOOT_JDK_FOUND=no
12965          else
12966            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12967            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12968
12969            # Extra M4 quote needed to protect [] in grep expression.
12970            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12971            if test "x$FOUND_VERSION_78" = x; then
12972              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12973$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12974              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12975$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12976              BOOT_JDK_FOUND=no
12977            else
12978              # We're done! :-)
12979              BOOT_JDK_FOUND=yes
12980
12981  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12982
12983  # Input might be given as Windows format, start by converting to
12984  # unix format.
12985  path="$BOOT_JDK"
12986  new_path=`$CYGPATH -u "$path"`
12987
12988  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12989  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12990  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12991  # "foo.exe" is OK but "foo" is an error.
12992  #
12993  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12994  # It is also a way to make sure we got the proper file name for the real test later on.
12995  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12996  if test "x$test_shortpath" = x; then
12997    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12998$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12999    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13000  fi
13001
13002  # Call helper function which possibly converts this using DOS-style short mode.
13003  # If so, the updated path is stored in $new_path.
13004
13005  input_path="$new_path"
13006  # Check if we need to convert this using DOS-style short mode. If the path
13007  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13008  # take no chances and rewrite it.
13009  # Note: m4 eats our [], so we need to use [ and ] instead.
13010  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13011  if test "x$has_forbidden_chars" != x; then
13012    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13013    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13014    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13015    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13016      # Going to short mode and back again did indeed matter. Since short mode is
13017      # case insensitive, let's make it lowercase to improve readability.
13018      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13019      # Now convert it back to Unix-stile (cygpath)
13020      input_path=`$CYGPATH -u "$shortmode_path"`
13021      new_path="$input_path"
13022    fi
13023  fi
13024
13025  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13026  if test "x$test_cygdrive_prefix" = x; then
13027    # As a simple fix, exclude /usr/bin since it's not a real path.
13028    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13029      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13030      # a path prefixed by /cygdrive for fixpath to work.
13031      new_path="$CYGWIN_ROOT_PATH$input_path"
13032    fi
13033  fi
13034
13035
13036  if test "x$path" != "x$new_path"; then
13037    BOOT_JDK="$new_path"
13038    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13039$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13040  fi
13041
13042  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13043
13044  path="$BOOT_JDK"
13045  has_colon=`$ECHO $path | $GREP ^.:`
13046  new_path="$path"
13047  if test "x$has_colon" = x; then
13048    # Not in mixed or Windows style, start by that.
13049    new_path=`cmd //c echo $path`
13050  fi
13051
13052
13053  input_path="$new_path"
13054  # Check if we need to convert this using DOS-style short mode. If the path
13055  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13056  # take no chances and rewrite it.
13057  # Note: m4 eats our [], so we need to use [ and ] instead.
13058  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13059  if test "x$has_forbidden_chars" != x; then
13060    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13061    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13062  fi
13063
13064
13065  windows_path="$new_path"
13066  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13067    unix_path=`$CYGPATH -u "$windows_path"`
13068    new_path="$unix_path"
13069  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13070    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13071    new_path="$unix_path"
13072  fi
13073
13074  if test "x$path" != "x$new_path"; then
13075    BOOT_JDK="$new_path"
13076    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13077$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13078  fi
13079
13080  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13081  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13082
13083  else
13084    # We're on a posix platform. Hooray! :)
13085    path="$BOOT_JDK"
13086    has_space=`$ECHO "$path" | $GREP " "`
13087    if test "x$has_space" != x; then
13088      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13089$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13090      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13091    fi
13092
13093    # Use eval to expand a potential ~
13094    eval path="$path"
13095    if test ! -f "$path" && test ! -d "$path"; then
13096      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13097    fi
13098
13099    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13100  fi
13101
13102              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13103$as_echo_n "checking for Boot JDK... " >&6; }
13104              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13105$as_echo "$BOOT_JDK" >&6; }
13106              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13107$as_echo_n "checking Boot JDK version... " >&6; }
13108              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13109              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13110$as_echo "$BOOT_JDK_VERSION" >&6; }
13111            fi # end check jdk version
13112          fi # end check rt.jar
13113        fi # end check javac
13114      fi # end check java
13115    fi # end check boot jdk found
13116  fi
13117
13118    done
13119  fi
13120
13121  fi
13122
13123
13124    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13125    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13126      # Do we have a bin/java?
13127      if test ! -x "$BOOT_JDK/bin/java"; then
13128        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13129$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13130        BOOT_JDK_FOUND=no
13131      else
13132        # Do we have a bin/javac?
13133        if test ! -x "$BOOT_JDK/bin/javac"; then
13134          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13135$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13136          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13137$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13138          BOOT_JDK_FOUND=no
13139        else
13140          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13141          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13142            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13143$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13144            BOOT_JDK_FOUND=no
13145          else
13146            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13147            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13148
13149            # Extra M4 quote needed to protect [] in grep expression.
13150            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13151            if test "x$FOUND_VERSION_78" = x; then
13152              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13153$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13154              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13155$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13156              BOOT_JDK_FOUND=no
13157            else
13158              # We're done! :-)
13159              BOOT_JDK_FOUND=yes
13160
13161  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13162
13163  # Input might be given as Windows format, start by converting to
13164  # unix format.
13165  path="$BOOT_JDK"
13166  new_path=`$CYGPATH -u "$path"`
13167
13168  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13169  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13170  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13171  # "foo.exe" is OK but "foo" is an error.
13172  #
13173  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13174  # It is also a way to make sure we got the proper file name for the real test later on.
13175  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13176  if test "x$test_shortpath" = x; then
13177    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13178$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13179    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13180  fi
13181
13182  # Call helper function which possibly converts this using DOS-style short mode.
13183  # If so, the updated path is stored in $new_path.
13184
13185  input_path="$new_path"
13186  # Check if we need to convert this using DOS-style short mode. If the path
13187  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13188  # take no chances and rewrite it.
13189  # Note: m4 eats our [], so we need to use [ and ] instead.
13190  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13191  if test "x$has_forbidden_chars" != x; then
13192    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13193    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13194    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13195    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13196      # Going to short mode and back again did indeed matter. Since short mode is
13197      # case insensitive, let's make it lowercase to improve readability.
13198      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13199      # Now convert it back to Unix-stile (cygpath)
13200      input_path=`$CYGPATH -u "$shortmode_path"`
13201      new_path="$input_path"
13202    fi
13203  fi
13204
13205  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13206  if test "x$test_cygdrive_prefix" = x; then
13207    # As a simple fix, exclude /usr/bin since it's not a real path.
13208    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13209      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13210      # a path prefixed by /cygdrive for fixpath to work.
13211      new_path="$CYGWIN_ROOT_PATH$input_path"
13212    fi
13213  fi
13214
13215
13216  if test "x$path" != "x$new_path"; then
13217    BOOT_JDK="$new_path"
13218    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13219$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13220  fi
13221
13222  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13223
13224  path="$BOOT_JDK"
13225  has_colon=`$ECHO $path | $GREP ^.:`
13226  new_path="$path"
13227  if test "x$has_colon" = x; then
13228    # Not in mixed or Windows style, start by that.
13229    new_path=`cmd //c echo $path`
13230  fi
13231
13232
13233  input_path="$new_path"
13234  # Check if we need to convert this using DOS-style short mode. If the path
13235  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13236  # take no chances and rewrite it.
13237  # Note: m4 eats our [], so we need to use [ and ] instead.
13238  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13239  if test "x$has_forbidden_chars" != x; then
13240    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13241    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13242  fi
13243
13244
13245  windows_path="$new_path"
13246  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13247    unix_path=`$CYGPATH -u "$windows_path"`
13248    new_path="$unix_path"
13249  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13250    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13251    new_path="$unix_path"
13252  fi
13253
13254  if test "x$path" != "x$new_path"; then
13255    BOOT_JDK="$new_path"
13256    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13257$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13258  fi
13259
13260  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13261  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13262
13263  else
13264    # We're on a posix platform. Hooray! :)
13265    path="$BOOT_JDK"
13266    has_space=`$ECHO "$path" | $GREP " "`
13267    if test "x$has_space" != x; then
13268      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13269$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13270      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13271    fi
13272
13273    # Use eval to expand a potential ~
13274    eval path="$path"
13275    if test ! -f "$path" && test ! -d "$path"; then
13276      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13277    fi
13278
13279    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13280  fi
13281
13282              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13283$as_echo_n "checking for Boot JDK... " >&6; }
13284              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13285$as_echo "$BOOT_JDK" >&6; }
13286              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13287$as_echo_n "checking Boot JDK version... " >&6; }
13288              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13289              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13290$as_echo "$BOOT_JDK_VERSION" >&6; }
13291            fi # end check jdk version
13292          fi # end check rt.jar
13293        fi # end check javac
13294      fi # end check java
13295    fi # end check boot jdk found
13296  fi
13297
13298
13299  if test "x$BOOT_JDK_FOUND" = xno; then
13300    # Now execute the test
13301
13302  if test "x$PROGRAMFILES" != x; then
13303    VIRTUAL_DIR="$PROGRAMFILES/Java"
13304
13305  windows_path="$VIRTUAL_DIR"
13306  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13307    unix_path=`$CYGPATH -u "$windows_path"`
13308    VIRTUAL_DIR="$unix_path"
13309  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13310    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13311    VIRTUAL_DIR="$unix_path"
13312  fi
13313
13314
13315  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
13316  BOOT_JDK_SUFFIX=""
13317  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13318  if test "x$ALL_JDKS_FOUND" != x; then
13319    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13320
13321  if test "x$BOOT_JDK_FOUND" = xno; then
13322    # Now execute the test
13323
13324        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13325        if test -d "$BOOT_JDK"; then
13326          BOOT_JDK_FOUND=maybe
13327          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13328$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13329        fi
13330
13331
13332    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13333    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13334      # Do we have a bin/java?
13335      if test ! -x "$BOOT_JDK/bin/java"; then
13336        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13337$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13338        BOOT_JDK_FOUND=no
13339      else
13340        # Do we have a bin/javac?
13341        if test ! -x "$BOOT_JDK/bin/javac"; then
13342          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13343$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13344          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13345$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13346          BOOT_JDK_FOUND=no
13347        else
13348          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13349          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13350            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13351$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13352            BOOT_JDK_FOUND=no
13353          else
13354            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13355            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13356
13357            # Extra M4 quote needed to protect [] in grep expression.
13358            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13359            if test "x$FOUND_VERSION_78" = x; then
13360              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13361$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13362              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13363$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13364              BOOT_JDK_FOUND=no
13365            else
13366              # We're done! :-)
13367              BOOT_JDK_FOUND=yes
13368
13369  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13370
13371  # Input might be given as Windows format, start by converting to
13372  # unix format.
13373  path="$BOOT_JDK"
13374  new_path=`$CYGPATH -u "$path"`
13375
13376  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13377  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13378  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13379  # "foo.exe" is OK but "foo" is an error.
13380  #
13381  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13382  # It is also a way to make sure we got the proper file name for the real test later on.
13383  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13384  if test "x$test_shortpath" = x; then
13385    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13386$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13387    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13388  fi
13389
13390  # Call helper function which possibly converts this using DOS-style short mode.
13391  # If so, the updated path is stored in $new_path.
13392
13393  input_path="$new_path"
13394  # Check if we need to convert this using DOS-style short mode. If the path
13395  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13396  # take no chances and rewrite it.
13397  # Note: m4 eats our [], so we need to use [ and ] instead.
13398  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13399  if test "x$has_forbidden_chars" != x; then
13400    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13401    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13402    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13403    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13404      # Going to short mode and back again did indeed matter. Since short mode is
13405      # case insensitive, let's make it lowercase to improve readability.
13406      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13407      # Now convert it back to Unix-stile (cygpath)
13408      input_path=`$CYGPATH -u "$shortmode_path"`
13409      new_path="$input_path"
13410    fi
13411  fi
13412
13413  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13414  if test "x$test_cygdrive_prefix" = x; then
13415    # As a simple fix, exclude /usr/bin since it's not a real path.
13416    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13417      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13418      # a path prefixed by /cygdrive for fixpath to work.
13419      new_path="$CYGWIN_ROOT_PATH$input_path"
13420    fi
13421  fi
13422
13423
13424  if test "x$path" != "x$new_path"; then
13425    BOOT_JDK="$new_path"
13426    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13427$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13428  fi
13429
13430  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13431
13432  path="$BOOT_JDK"
13433  has_colon=`$ECHO $path | $GREP ^.:`
13434  new_path="$path"
13435  if test "x$has_colon" = x; then
13436    # Not in mixed or Windows style, start by that.
13437    new_path=`cmd //c echo $path`
13438  fi
13439
13440
13441  input_path="$new_path"
13442  # Check if we need to convert this using DOS-style short mode. If the path
13443  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13444  # take no chances and rewrite it.
13445  # Note: m4 eats our [], so we need to use [ and ] instead.
13446  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13447  if test "x$has_forbidden_chars" != x; then
13448    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13449    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13450  fi
13451
13452
13453  windows_path="$new_path"
13454  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13455    unix_path=`$CYGPATH -u "$windows_path"`
13456    new_path="$unix_path"
13457  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13458    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13459    new_path="$unix_path"
13460  fi
13461
13462  if test "x$path" != "x$new_path"; then
13463    BOOT_JDK="$new_path"
13464    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13465$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13466  fi
13467
13468  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13469  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13470
13471  else
13472    # We're on a posix platform. Hooray! :)
13473    path="$BOOT_JDK"
13474    has_space=`$ECHO "$path" | $GREP " "`
13475    if test "x$has_space" != x; then
13476      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13477$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13478      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13479    fi
13480
13481    # Use eval to expand a potential ~
13482    eval path="$path"
13483    if test ! -f "$path" && test ! -d "$path"; then
13484      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13485    fi
13486
13487    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13488  fi
13489
13490              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13491$as_echo_n "checking for Boot JDK... " >&6; }
13492              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13493$as_echo "$BOOT_JDK" >&6; }
13494              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13495$as_echo_n "checking Boot JDK version... " >&6; }
13496              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13497              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13498$as_echo "$BOOT_JDK_VERSION" >&6; }
13499            fi # end check jdk version
13500          fi # end check rt.jar
13501        fi # end check javac
13502      fi # end check java
13503    fi # end check boot jdk found
13504  fi
13505
13506    done
13507  fi
13508
13509  fi
13510
13511
13512    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13513    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13514      # Do we have a bin/java?
13515      if test ! -x "$BOOT_JDK/bin/java"; then
13516        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13517$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13518        BOOT_JDK_FOUND=no
13519      else
13520        # Do we have a bin/javac?
13521        if test ! -x "$BOOT_JDK/bin/javac"; then
13522          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13523$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13524          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13525$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13526          BOOT_JDK_FOUND=no
13527        else
13528          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13529          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13530            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13531$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13532            BOOT_JDK_FOUND=no
13533          else
13534            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13535            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13536
13537            # Extra M4 quote needed to protect [] in grep expression.
13538            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13539            if test "x$FOUND_VERSION_78" = x; then
13540              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13541$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13542              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13543$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13544              BOOT_JDK_FOUND=no
13545            else
13546              # We're done! :-)
13547              BOOT_JDK_FOUND=yes
13548
13549  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13550
13551  # Input might be given as Windows format, start by converting to
13552  # unix format.
13553  path="$BOOT_JDK"
13554  new_path=`$CYGPATH -u "$path"`
13555
13556  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13557  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13558  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13559  # "foo.exe" is OK but "foo" is an error.
13560  #
13561  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13562  # It is also a way to make sure we got the proper file name for the real test later on.
13563  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13564  if test "x$test_shortpath" = x; then
13565    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13566$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13567    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13568  fi
13569
13570  # Call helper function which possibly converts this using DOS-style short mode.
13571  # If so, the updated path is stored in $new_path.
13572
13573  input_path="$new_path"
13574  # Check if we need to convert this using DOS-style short mode. If the path
13575  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13576  # take no chances and rewrite it.
13577  # Note: m4 eats our [], so we need to use [ and ] instead.
13578  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13579  if test "x$has_forbidden_chars" != x; then
13580    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13581    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13582    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13583    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13584      # Going to short mode and back again did indeed matter. Since short mode is
13585      # case insensitive, let's make it lowercase to improve readability.
13586      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13587      # Now convert it back to Unix-stile (cygpath)
13588      input_path=`$CYGPATH -u "$shortmode_path"`
13589      new_path="$input_path"
13590    fi
13591  fi
13592
13593  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13594  if test "x$test_cygdrive_prefix" = x; then
13595    # As a simple fix, exclude /usr/bin since it's not a real path.
13596    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13597      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13598      # a path prefixed by /cygdrive for fixpath to work.
13599      new_path="$CYGWIN_ROOT_PATH$input_path"
13600    fi
13601  fi
13602
13603
13604  if test "x$path" != "x$new_path"; then
13605    BOOT_JDK="$new_path"
13606    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13607$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13608  fi
13609
13610  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13611
13612  path="$BOOT_JDK"
13613  has_colon=`$ECHO $path | $GREP ^.:`
13614  new_path="$path"
13615  if test "x$has_colon" = x; then
13616    # Not in mixed or Windows style, start by that.
13617    new_path=`cmd //c echo $path`
13618  fi
13619
13620
13621  input_path="$new_path"
13622  # Check if we need to convert this using DOS-style short mode. If the path
13623  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13624  # take no chances and rewrite it.
13625  # Note: m4 eats our [], so we need to use [ and ] instead.
13626  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13627  if test "x$has_forbidden_chars" != x; then
13628    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13629    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13630  fi
13631
13632
13633  windows_path="$new_path"
13634  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13635    unix_path=`$CYGPATH -u "$windows_path"`
13636    new_path="$unix_path"
13637  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13638    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13639    new_path="$unix_path"
13640  fi
13641
13642  if test "x$path" != "x$new_path"; then
13643    BOOT_JDK="$new_path"
13644    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13645$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13646  fi
13647
13648  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13649  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13650
13651  else
13652    # We're on a posix platform. Hooray! :)
13653    path="$BOOT_JDK"
13654    has_space=`$ECHO "$path" | $GREP " "`
13655    if test "x$has_space" != x; then
13656      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13657$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13658      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13659    fi
13660
13661    # Use eval to expand a potential ~
13662    eval path="$path"
13663    if test ! -f "$path" && test ! -d "$path"; then
13664      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13665    fi
13666
13667    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13668  fi
13669
13670              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13671$as_echo_n "checking for Boot JDK... " >&6; }
13672              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13673$as_echo "$BOOT_JDK" >&6; }
13674              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13675$as_echo_n "checking Boot JDK version... " >&6; }
13676              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13677              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13678$as_echo "$BOOT_JDK_VERSION" >&6; }
13679            fi # end check jdk version
13680          fi # end check rt.jar
13681        fi # end check javac
13682      fi # end check java
13683    fi # end check boot jdk found
13684  fi
13685
13686
13687  if test "x$BOOT_JDK_FOUND" = xno; then
13688    # Now execute the test
13689
13690  if test "x$ProgramFiles" != x; then
13691    VIRTUAL_DIR="$ProgramFiles/Java"
13692
13693  windows_path="$VIRTUAL_DIR"
13694  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13695    unix_path=`$CYGPATH -u "$windows_path"`
13696    VIRTUAL_DIR="$unix_path"
13697  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13698    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13699    VIRTUAL_DIR="$unix_path"
13700  fi
13701
13702
13703  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
13704  BOOT_JDK_SUFFIX=""
13705  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13706  if test "x$ALL_JDKS_FOUND" != x; then
13707    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13708
13709  if test "x$BOOT_JDK_FOUND" = xno; then
13710    # Now execute the test
13711
13712        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13713        if test -d "$BOOT_JDK"; then
13714          BOOT_JDK_FOUND=maybe
13715          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13716$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13717        fi
13718
13719
13720    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13721    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13722      # Do we have a bin/java?
13723      if test ! -x "$BOOT_JDK/bin/java"; then
13724        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13725$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13726        BOOT_JDK_FOUND=no
13727      else
13728        # Do we have a bin/javac?
13729        if test ! -x "$BOOT_JDK/bin/javac"; then
13730          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13731$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13732          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13733$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13734          BOOT_JDK_FOUND=no
13735        else
13736          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13737          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13738            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13739$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13740            BOOT_JDK_FOUND=no
13741          else
13742            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13743            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13744
13745            # Extra M4 quote needed to protect [] in grep expression.
13746            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13747            if test "x$FOUND_VERSION_78" = x; then
13748              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13749$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13750              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13751$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13752              BOOT_JDK_FOUND=no
13753            else
13754              # We're done! :-)
13755              BOOT_JDK_FOUND=yes
13756
13757  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13758
13759  # Input might be given as Windows format, start by converting to
13760  # unix format.
13761  path="$BOOT_JDK"
13762  new_path=`$CYGPATH -u "$path"`
13763
13764  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13765  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13766  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13767  # "foo.exe" is OK but "foo" is an error.
13768  #
13769  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13770  # It is also a way to make sure we got the proper file name for the real test later on.
13771  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13772  if test "x$test_shortpath" = x; then
13773    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13774$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13775    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13776  fi
13777
13778  # Call helper function which possibly converts this using DOS-style short mode.
13779  # If so, the updated path is stored in $new_path.
13780
13781  input_path="$new_path"
13782  # Check if we need to convert this using DOS-style short mode. If the path
13783  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13784  # take no chances and rewrite it.
13785  # Note: m4 eats our [], so we need to use [ and ] instead.
13786  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13787  if test "x$has_forbidden_chars" != x; then
13788    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13789    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13790    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13791    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13792      # Going to short mode and back again did indeed matter. Since short mode is
13793      # case insensitive, let's make it lowercase to improve readability.
13794      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13795      # Now convert it back to Unix-stile (cygpath)
13796      input_path=`$CYGPATH -u "$shortmode_path"`
13797      new_path="$input_path"
13798    fi
13799  fi
13800
13801  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13802  if test "x$test_cygdrive_prefix" = x; then
13803    # As a simple fix, exclude /usr/bin since it's not a real path.
13804    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13805      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13806      # a path prefixed by /cygdrive for fixpath to work.
13807      new_path="$CYGWIN_ROOT_PATH$input_path"
13808    fi
13809  fi
13810
13811
13812  if test "x$path" != "x$new_path"; then
13813    BOOT_JDK="$new_path"
13814    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13815$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13816  fi
13817
13818  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13819
13820  path="$BOOT_JDK"
13821  has_colon=`$ECHO $path | $GREP ^.:`
13822  new_path="$path"
13823  if test "x$has_colon" = x; then
13824    # Not in mixed or Windows style, start by that.
13825    new_path=`cmd //c echo $path`
13826  fi
13827
13828
13829  input_path="$new_path"
13830  # Check if we need to convert this using DOS-style short mode. If the path
13831  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13832  # take no chances and rewrite it.
13833  # Note: m4 eats our [], so we need to use [ and ] instead.
13834  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13835  if test "x$has_forbidden_chars" != x; then
13836    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13837    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13838  fi
13839
13840
13841  windows_path="$new_path"
13842  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13843    unix_path=`$CYGPATH -u "$windows_path"`
13844    new_path="$unix_path"
13845  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13846    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13847    new_path="$unix_path"
13848  fi
13849
13850  if test "x$path" != "x$new_path"; then
13851    BOOT_JDK="$new_path"
13852    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13853$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13854  fi
13855
13856  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13857  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13858
13859  else
13860    # We're on a posix platform. Hooray! :)
13861    path="$BOOT_JDK"
13862    has_space=`$ECHO "$path" | $GREP " "`
13863    if test "x$has_space" != x; then
13864      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13865$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13866      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13867    fi
13868
13869    # Use eval to expand a potential ~
13870    eval path="$path"
13871    if test ! -f "$path" && test ! -d "$path"; then
13872      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13873    fi
13874
13875    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13876  fi
13877
13878              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13879$as_echo_n "checking for Boot JDK... " >&6; }
13880              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13881$as_echo "$BOOT_JDK" >&6; }
13882              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13883$as_echo_n "checking Boot JDK version... " >&6; }
13884              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13885              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13886$as_echo "$BOOT_JDK_VERSION" >&6; }
13887            fi # end check jdk version
13888          fi # end check rt.jar
13889        fi # end check javac
13890      fi # end check java
13891    fi # end check boot jdk found
13892  fi
13893
13894    done
13895  fi
13896
13897  fi
13898
13899
13900    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13901    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13902      # Do we have a bin/java?
13903      if test ! -x "$BOOT_JDK/bin/java"; then
13904        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13905$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13906        BOOT_JDK_FOUND=no
13907      else
13908        # Do we have a bin/javac?
13909        if test ! -x "$BOOT_JDK/bin/javac"; then
13910          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13911$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13912          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13913$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13914          BOOT_JDK_FOUND=no
13915        else
13916          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13917          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13918            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13919$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13920            BOOT_JDK_FOUND=no
13921          else
13922            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13923            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13924
13925            # Extra M4 quote needed to protect [] in grep expression.
13926            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13927            if test "x$FOUND_VERSION_78" = x; then
13928              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13929$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13930              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13931$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13932              BOOT_JDK_FOUND=no
13933            else
13934              # We're done! :-)
13935              BOOT_JDK_FOUND=yes
13936
13937  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13938
13939  # Input might be given as Windows format, start by converting to
13940  # unix format.
13941  path="$BOOT_JDK"
13942  new_path=`$CYGPATH -u "$path"`
13943
13944  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13945  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13946  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13947  # "foo.exe" is OK but "foo" is an error.
13948  #
13949  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13950  # It is also a way to make sure we got the proper file name for the real test later on.
13951  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13952  if test "x$test_shortpath" = x; then
13953    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13954$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13955    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13956  fi
13957
13958  # Call helper function which possibly converts this using DOS-style short mode.
13959  # If so, the updated path is stored in $new_path.
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    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13970    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13971    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13972      # Going to short mode and back again did indeed matter. Since short mode is
13973      # case insensitive, let's make it lowercase to improve readability.
13974      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13975      # Now convert it back to Unix-stile (cygpath)
13976      input_path=`$CYGPATH -u "$shortmode_path"`
13977      new_path="$input_path"
13978    fi
13979  fi
13980
13981  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13982  if test "x$test_cygdrive_prefix" = x; then
13983    # As a simple fix, exclude /usr/bin since it's not a real path.
13984    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13985      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13986      # a path prefixed by /cygdrive for fixpath to work.
13987      new_path="$CYGWIN_ROOT_PATH$input_path"
13988    fi
13989  fi
13990
13991
13992  if test "x$path" != "x$new_path"; then
13993    BOOT_JDK="$new_path"
13994    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13995$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13996  fi
13997
13998  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13999
14000  path="$BOOT_JDK"
14001  has_colon=`$ECHO $path | $GREP ^.:`
14002  new_path="$path"
14003  if test "x$has_colon" = x; then
14004    # Not in mixed or Windows style, start by that.
14005    new_path=`cmd //c echo $path`
14006  fi
14007
14008
14009  input_path="$new_path"
14010  # Check if we need to convert this using DOS-style short mode. If the path
14011  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14012  # take no chances and rewrite it.
14013  # Note: m4 eats our [], so we need to use [ and ] instead.
14014  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14015  if test "x$has_forbidden_chars" != x; then
14016    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14017    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14018  fi
14019
14020
14021  windows_path="$new_path"
14022  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14023    unix_path=`$CYGPATH -u "$windows_path"`
14024    new_path="$unix_path"
14025  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14026    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14027    new_path="$unix_path"
14028  fi
14029
14030  if test "x$path" != "x$new_path"; then
14031    BOOT_JDK="$new_path"
14032    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14033$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14034  fi
14035
14036  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14037  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14038
14039  else
14040    # We're on a posix platform. Hooray! :)
14041    path="$BOOT_JDK"
14042    has_space=`$ECHO "$path" | $GREP " "`
14043    if test "x$has_space" != x; then
14044      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14045$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14046      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14047    fi
14048
14049    # Use eval to expand a potential ~
14050    eval path="$path"
14051    if test ! -f "$path" && test ! -d "$path"; then
14052      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14053    fi
14054
14055    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14056  fi
14057
14058              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14059$as_echo_n "checking for Boot JDK... " >&6; }
14060              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14061$as_echo "$BOOT_JDK" >&6; }
14062              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14063$as_echo_n "checking Boot JDK version... " >&6; }
14064              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14065              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14066$as_echo "$BOOT_JDK_VERSION" >&6; }
14067            fi # end check jdk version
14068          fi # end check rt.jar
14069        fi # end check javac
14070      fi # end check java
14071    fi # end check boot jdk found
14072  fi
14073
14074
14075  if test "x$BOOT_JDK_FOUND" = xno; then
14076    # Now execute the test
14077
14078  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
14079  BOOT_JDK_SUFFIX=""
14080  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14081  if test "x$ALL_JDKS_FOUND" != x; then
14082    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14083
14084  if test "x$BOOT_JDK_FOUND" = xno; then
14085    # Now execute the test
14086
14087        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14088        if test -d "$BOOT_JDK"; then
14089          BOOT_JDK_FOUND=maybe
14090          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14091$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14092        fi
14093
14094
14095    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14096    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14097      # Do we have a bin/java?
14098      if test ! -x "$BOOT_JDK/bin/java"; then
14099        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14100$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14101        BOOT_JDK_FOUND=no
14102      else
14103        # Do we have a bin/javac?
14104        if test ! -x "$BOOT_JDK/bin/javac"; then
14105          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14106$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14107          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14108$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14109          BOOT_JDK_FOUND=no
14110        else
14111          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14112          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14113            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14114$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14115            BOOT_JDK_FOUND=no
14116          else
14117            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14118            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14119
14120            # Extra M4 quote needed to protect [] in grep expression.
14121            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14122            if test "x$FOUND_VERSION_78" = x; then
14123              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14124$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14125              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14126$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14127              BOOT_JDK_FOUND=no
14128            else
14129              # We're done! :-)
14130              BOOT_JDK_FOUND=yes
14131
14132  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14133
14134  # Input might be given as Windows format, start by converting to
14135  # unix format.
14136  path="$BOOT_JDK"
14137  new_path=`$CYGPATH -u "$path"`
14138
14139  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14140  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14141  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14142  # "foo.exe" is OK but "foo" is an error.
14143  #
14144  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14145  # It is also a way to make sure we got the proper file name for the real test later on.
14146  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14147  if test "x$test_shortpath" = x; then
14148    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14149$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14150    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14151  fi
14152
14153  # Call helper function which possibly converts this using DOS-style short mode.
14154  # If so, the updated path is stored in $new_path.
14155
14156  input_path="$new_path"
14157  # Check if we need to convert this using DOS-style short mode. If the path
14158  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14159  # take no chances and rewrite it.
14160  # Note: m4 eats our [], so we need to use [ and ] instead.
14161  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14162  if test "x$has_forbidden_chars" != x; then
14163    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14164    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14165    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14166    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14167      # Going to short mode and back again did indeed matter. Since short mode is
14168      # case insensitive, let's make it lowercase to improve readability.
14169      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14170      # Now convert it back to Unix-stile (cygpath)
14171      input_path=`$CYGPATH -u "$shortmode_path"`
14172      new_path="$input_path"
14173    fi
14174  fi
14175
14176  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14177  if test "x$test_cygdrive_prefix" = x; then
14178    # As a simple fix, exclude /usr/bin since it's not a real path.
14179    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14180      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14181      # a path prefixed by /cygdrive for fixpath to work.
14182      new_path="$CYGWIN_ROOT_PATH$input_path"
14183    fi
14184  fi
14185
14186
14187  if test "x$path" != "x$new_path"; then
14188    BOOT_JDK="$new_path"
14189    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14190$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14191  fi
14192
14193  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14194
14195  path="$BOOT_JDK"
14196  has_colon=`$ECHO $path | $GREP ^.:`
14197  new_path="$path"
14198  if test "x$has_colon" = x; then
14199    # Not in mixed or Windows style, start by that.
14200    new_path=`cmd //c echo $path`
14201  fi
14202
14203
14204  input_path="$new_path"
14205  # Check if we need to convert this using DOS-style short mode. If the path
14206  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14207  # take no chances and rewrite it.
14208  # Note: m4 eats our [], so we need to use [ and ] instead.
14209  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14210  if test "x$has_forbidden_chars" != x; then
14211    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14212    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14213  fi
14214
14215
14216  windows_path="$new_path"
14217  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14218    unix_path=`$CYGPATH -u "$windows_path"`
14219    new_path="$unix_path"
14220  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14221    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14222    new_path="$unix_path"
14223  fi
14224
14225  if test "x$path" != "x$new_path"; then
14226    BOOT_JDK="$new_path"
14227    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14228$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14229  fi
14230
14231  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14232  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14233
14234  else
14235    # We're on a posix platform. Hooray! :)
14236    path="$BOOT_JDK"
14237    has_space=`$ECHO "$path" | $GREP " "`
14238    if test "x$has_space" != x; then
14239      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14240$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14241      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14242    fi
14243
14244    # Use eval to expand a potential ~
14245    eval path="$path"
14246    if test ! -f "$path" && test ! -d "$path"; then
14247      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14248    fi
14249
14250    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14251  fi
14252
14253              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14254$as_echo_n "checking for Boot JDK... " >&6; }
14255              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14256$as_echo "$BOOT_JDK" >&6; }
14257              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14258$as_echo_n "checking Boot JDK version... " >&6; }
14259              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14260              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14261$as_echo "$BOOT_JDK_VERSION" >&6; }
14262            fi # end check jdk version
14263          fi # end check rt.jar
14264        fi # end check javac
14265      fi # end check java
14266    fi # end check boot jdk found
14267  fi
14268
14269    done
14270  fi
14271
14272
14273    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14274    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14275      # Do we have a bin/java?
14276      if test ! -x "$BOOT_JDK/bin/java"; then
14277        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14278$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14279        BOOT_JDK_FOUND=no
14280      else
14281        # Do we have a bin/javac?
14282        if test ! -x "$BOOT_JDK/bin/javac"; then
14283          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14284$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14285          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14286$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14287          BOOT_JDK_FOUND=no
14288        else
14289          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14290          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14291            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14292$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14293            BOOT_JDK_FOUND=no
14294          else
14295            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14296            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14297
14298            # Extra M4 quote needed to protect [] in grep expression.
14299            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14300            if test "x$FOUND_VERSION_78" = x; then
14301              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14302$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14303              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14304$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14305              BOOT_JDK_FOUND=no
14306            else
14307              # We're done! :-)
14308              BOOT_JDK_FOUND=yes
14309
14310  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14311
14312  # Input might be given as Windows format, start by converting to
14313  # unix format.
14314  path="$BOOT_JDK"
14315  new_path=`$CYGPATH -u "$path"`
14316
14317  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14318  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14319  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14320  # "foo.exe" is OK but "foo" is an error.
14321  #
14322  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14323  # It is also a way to make sure we got the proper file name for the real test later on.
14324  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14325  if test "x$test_shortpath" = x; then
14326    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14327$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14328    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14329  fi
14330
14331  # Call helper function which possibly converts this using DOS-style short mode.
14332  # If so, the updated path is stored in $new_path.
14333
14334  input_path="$new_path"
14335  # Check if we need to convert this using DOS-style short mode. If the path
14336  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14337  # take no chances and rewrite it.
14338  # Note: m4 eats our [], so we need to use [ and ] instead.
14339  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14340  if test "x$has_forbidden_chars" != x; then
14341    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14342    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14343    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14344    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14345      # Going to short mode and back again did indeed matter. Since short mode is
14346      # case insensitive, let's make it lowercase to improve readability.
14347      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14348      # Now convert it back to Unix-stile (cygpath)
14349      input_path=`$CYGPATH -u "$shortmode_path"`
14350      new_path="$input_path"
14351    fi
14352  fi
14353
14354  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14355  if test "x$test_cygdrive_prefix" = x; then
14356    # As a simple fix, exclude /usr/bin since it's not a real path.
14357    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14358      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14359      # a path prefixed by /cygdrive for fixpath to work.
14360      new_path="$CYGWIN_ROOT_PATH$input_path"
14361    fi
14362  fi
14363
14364
14365  if test "x$path" != "x$new_path"; then
14366    BOOT_JDK="$new_path"
14367    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14368$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14369  fi
14370
14371  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14372
14373  path="$BOOT_JDK"
14374  has_colon=`$ECHO $path | $GREP ^.:`
14375  new_path="$path"
14376  if test "x$has_colon" = x; then
14377    # Not in mixed or Windows style, start by that.
14378    new_path=`cmd //c echo $path`
14379  fi
14380
14381
14382  input_path="$new_path"
14383  # Check if we need to convert this using DOS-style short mode. If the path
14384  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14385  # take no chances and rewrite it.
14386  # Note: m4 eats our [], so we need to use [ and ] instead.
14387  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14388  if test "x$has_forbidden_chars" != x; then
14389    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14390    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14391  fi
14392
14393
14394  windows_path="$new_path"
14395  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14396    unix_path=`$CYGPATH -u "$windows_path"`
14397    new_path="$unix_path"
14398  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14399    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14400    new_path="$unix_path"
14401  fi
14402
14403  if test "x$path" != "x$new_path"; then
14404    BOOT_JDK="$new_path"
14405    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14406$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14407  fi
14408
14409  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14410  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14411
14412  else
14413    # We're on a posix platform. Hooray! :)
14414    path="$BOOT_JDK"
14415    has_space=`$ECHO "$path" | $GREP " "`
14416    if test "x$has_space" != x; then
14417      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14418$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14419      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14420    fi
14421
14422    # Use eval to expand a potential ~
14423    eval path="$path"
14424    if test ! -f "$path" && test ! -d "$path"; then
14425      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14426    fi
14427
14428    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14429  fi
14430
14431              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14432$as_echo_n "checking for Boot JDK... " >&6; }
14433              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14434$as_echo "$BOOT_JDK" >&6; }
14435              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14436$as_echo_n "checking Boot JDK version... " >&6; }
14437              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14438              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14439$as_echo "$BOOT_JDK_VERSION" >&6; }
14440            fi # end check jdk version
14441          fi # end check rt.jar
14442        fi # end check javac
14443      fi # end check java
14444    fi # end check boot jdk found
14445  fi
14446
14447  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
14448
14449  if test "x$BOOT_JDK_FOUND" = xno; then
14450    # Now execute the test
14451
14452  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
14453  BOOT_JDK_SUFFIX="/Contents/Home"
14454  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14455  if test "x$ALL_JDKS_FOUND" != x; then
14456    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14457
14458  if test "x$BOOT_JDK_FOUND" = xno; then
14459    # Now execute the test
14460
14461        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14462        if test -d "$BOOT_JDK"; then
14463          BOOT_JDK_FOUND=maybe
14464          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14465$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14466        fi
14467
14468
14469    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14470    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14471      # Do we have a bin/java?
14472      if test ! -x "$BOOT_JDK/bin/java"; then
14473        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14474$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14475        BOOT_JDK_FOUND=no
14476      else
14477        # Do we have a bin/javac?
14478        if test ! -x "$BOOT_JDK/bin/javac"; then
14479          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14480$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14481          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14482$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14483          BOOT_JDK_FOUND=no
14484        else
14485          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14486          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14487            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14488$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14489            BOOT_JDK_FOUND=no
14490          else
14491            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14492            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14493
14494            # Extra M4 quote needed to protect [] in grep expression.
14495            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14496            if test "x$FOUND_VERSION_78" = x; then
14497              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14498$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14499              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14500$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14501              BOOT_JDK_FOUND=no
14502            else
14503              # We're done! :-)
14504              BOOT_JDK_FOUND=yes
14505
14506  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14507
14508  # Input might be given as Windows format, start by converting to
14509  # unix format.
14510  path="$BOOT_JDK"
14511  new_path=`$CYGPATH -u "$path"`
14512
14513  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14514  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14515  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14516  # "foo.exe" is OK but "foo" is an error.
14517  #
14518  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14519  # It is also a way to make sure we got the proper file name for the real test later on.
14520  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14521  if test "x$test_shortpath" = x; then
14522    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14523$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14524    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14525  fi
14526
14527  # Call helper function which possibly converts this using DOS-style short mode.
14528  # If so, the updated path is stored in $new_path.
14529
14530  input_path="$new_path"
14531  # Check if we need to convert this using DOS-style short mode. If the path
14532  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14533  # take no chances and rewrite it.
14534  # Note: m4 eats our [], so we need to use [ and ] instead.
14535  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14536  if test "x$has_forbidden_chars" != x; then
14537    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14538    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14539    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14540    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14541      # Going to short mode and back again did indeed matter. Since short mode is
14542      # case insensitive, let's make it lowercase to improve readability.
14543      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14544      # Now convert it back to Unix-stile (cygpath)
14545      input_path=`$CYGPATH -u "$shortmode_path"`
14546      new_path="$input_path"
14547    fi
14548  fi
14549
14550  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14551  if test "x$test_cygdrive_prefix" = x; then
14552    # As a simple fix, exclude /usr/bin since it's not a real path.
14553    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14554      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14555      # a path prefixed by /cygdrive for fixpath to work.
14556      new_path="$CYGWIN_ROOT_PATH$input_path"
14557    fi
14558  fi
14559
14560
14561  if test "x$path" != "x$new_path"; then
14562    BOOT_JDK="$new_path"
14563    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14564$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14565  fi
14566
14567  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14568
14569  path="$BOOT_JDK"
14570  has_colon=`$ECHO $path | $GREP ^.:`
14571  new_path="$path"
14572  if test "x$has_colon" = x; then
14573    # Not in mixed or Windows style, start by that.
14574    new_path=`cmd //c echo $path`
14575  fi
14576
14577
14578  input_path="$new_path"
14579  # Check if we need to convert this using DOS-style short mode. If the path
14580  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14581  # take no chances and rewrite it.
14582  # Note: m4 eats our [], so we need to use [ and ] instead.
14583  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14584  if test "x$has_forbidden_chars" != x; then
14585    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14586    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14587  fi
14588
14589
14590  windows_path="$new_path"
14591  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14592    unix_path=`$CYGPATH -u "$windows_path"`
14593    new_path="$unix_path"
14594  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14595    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14596    new_path="$unix_path"
14597  fi
14598
14599  if test "x$path" != "x$new_path"; then
14600    BOOT_JDK="$new_path"
14601    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14602$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14603  fi
14604
14605  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14606  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14607
14608  else
14609    # We're on a posix platform. Hooray! :)
14610    path="$BOOT_JDK"
14611    has_space=`$ECHO "$path" | $GREP " "`
14612    if test "x$has_space" != x; then
14613      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14614$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14615      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14616    fi
14617
14618    # Use eval to expand a potential ~
14619    eval path="$path"
14620    if test ! -f "$path" && test ! -d "$path"; then
14621      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14622    fi
14623
14624    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14625  fi
14626
14627              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14628$as_echo_n "checking for Boot JDK... " >&6; }
14629              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14630$as_echo "$BOOT_JDK" >&6; }
14631              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14632$as_echo_n "checking Boot JDK version... " >&6; }
14633              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14634              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14635$as_echo "$BOOT_JDK_VERSION" >&6; }
14636            fi # end check jdk version
14637          fi # end check rt.jar
14638        fi # end check javac
14639      fi # end check java
14640    fi # end check boot jdk found
14641  fi
14642
14643    done
14644  fi
14645
14646
14647    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14648    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14649      # Do we have a bin/java?
14650      if test ! -x "$BOOT_JDK/bin/java"; then
14651        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14652$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14653        BOOT_JDK_FOUND=no
14654      else
14655        # Do we have a bin/javac?
14656        if test ! -x "$BOOT_JDK/bin/javac"; then
14657          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14658$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14659          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14660$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14661          BOOT_JDK_FOUND=no
14662        else
14663          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14664          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14665            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14666$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14667            BOOT_JDK_FOUND=no
14668          else
14669            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14670            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14671
14672            # Extra M4 quote needed to protect [] in grep expression.
14673            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14674            if test "x$FOUND_VERSION_78" = x; then
14675              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14676$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14677              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14678$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14679              BOOT_JDK_FOUND=no
14680            else
14681              # We're done! :-)
14682              BOOT_JDK_FOUND=yes
14683
14684  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14685
14686  # Input might be given as Windows format, start by converting to
14687  # unix format.
14688  path="$BOOT_JDK"
14689  new_path=`$CYGPATH -u "$path"`
14690
14691  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14692  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14693  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14694  # "foo.exe" is OK but "foo" is an error.
14695  #
14696  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14697  # It is also a way to make sure we got the proper file name for the real test later on.
14698  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14699  if test "x$test_shortpath" = x; then
14700    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14701$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14702    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14703  fi
14704
14705  # Call helper function which possibly converts this using DOS-style short mode.
14706  # If so, the updated path is stored in $new_path.
14707
14708  input_path="$new_path"
14709  # Check if we need to convert this using DOS-style short mode. If the path
14710  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14711  # take no chances and rewrite it.
14712  # Note: m4 eats our [], so we need to use [ and ] instead.
14713  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14714  if test "x$has_forbidden_chars" != x; then
14715    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14716    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14717    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14718    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14719      # Going to short mode and back again did indeed matter. Since short mode is
14720      # case insensitive, let's make it lowercase to improve readability.
14721      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14722      # Now convert it back to Unix-stile (cygpath)
14723      input_path=`$CYGPATH -u "$shortmode_path"`
14724      new_path="$input_path"
14725    fi
14726  fi
14727
14728  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14729  if test "x$test_cygdrive_prefix" = x; then
14730    # As a simple fix, exclude /usr/bin since it's not a real path.
14731    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14732      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14733      # a path prefixed by /cygdrive for fixpath to work.
14734      new_path="$CYGWIN_ROOT_PATH$input_path"
14735    fi
14736  fi
14737
14738
14739  if test "x$path" != "x$new_path"; then
14740    BOOT_JDK="$new_path"
14741    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14742$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14743  fi
14744
14745  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14746
14747  path="$BOOT_JDK"
14748  has_colon=`$ECHO $path | $GREP ^.:`
14749  new_path="$path"
14750  if test "x$has_colon" = x; then
14751    # Not in mixed or Windows style, start by that.
14752    new_path=`cmd //c echo $path`
14753  fi
14754
14755
14756  input_path="$new_path"
14757  # Check if we need to convert this using DOS-style short mode. If the path
14758  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14759  # take no chances and rewrite it.
14760  # Note: m4 eats our [], so we need to use [ and ] instead.
14761  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14762  if test "x$has_forbidden_chars" != x; then
14763    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14764    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14765  fi
14766
14767
14768  windows_path="$new_path"
14769  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14770    unix_path=`$CYGPATH -u "$windows_path"`
14771    new_path="$unix_path"
14772  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14773    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14774    new_path="$unix_path"
14775  fi
14776
14777  if test "x$path" != "x$new_path"; then
14778    BOOT_JDK="$new_path"
14779    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14780$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14781  fi
14782
14783  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14784  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14785
14786  else
14787    # We're on a posix platform. Hooray! :)
14788    path="$BOOT_JDK"
14789    has_space=`$ECHO "$path" | $GREP " "`
14790    if test "x$has_space" != x; then
14791      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14792$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14793      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14794    fi
14795
14796    # Use eval to expand a potential ~
14797    eval path="$path"
14798    if test ! -f "$path" && test ! -d "$path"; then
14799      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14800    fi
14801
14802    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14803  fi
14804
14805              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14806$as_echo_n "checking for Boot JDK... " >&6; }
14807              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14808$as_echo "$BOOT_JDK" >&6; }
14809              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14810$as_echo_n "checking Boot JDK version... " >&6; }
14811              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14812              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14813$as_echo "$BOOT_JDK_VERSION" >&6; }
14814            fi # end check jdk version
14815          fi # end check rt.jar
14816        fi # end check javac
14817      fi # end check java
14818    fi # end check boot jdk found
14819  fi
14820
14821
14822  if test "x$BOOT_JDK_FOUND" = xno; then
14823    # Now execute the test
14824
14825  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
14826  BOOT_JDK_SUFFIX="/Contents/Home"
14827  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14828  if test "x$ALL_JDKS_FOUND" != x; then
14829    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14830
14831  if test "x$BOOT_JDK_FOUND" = xno; then
14832    # Now execute the test
14833
14834        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14835        if test -d "$BOOT_JDK"; then
14836          BOOT_JDK_FOUND=maybe
14837          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14838$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14839        fi
14840
14841
14842    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14843    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14844      # Do we have a bin/java?
14845      if test ! -x "$BOOT_JDK/bin/java"; then
14846        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14847$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14848        BOOT_JDK_FOUND=no
14849      else
14850        # Do we have a bin/javac?
14851        if test ! -x "$BOOT_JDK/bin/javac"; then
14852          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14853$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14854          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14855$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14856          BOOT_JDK_FOUND=no
14857        else
14858          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14859          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14860            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14861$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14862            BOOT_JDK_FOUND=no
14863          else
14864            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14865            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14866
14867            # Extra M4 quote needed to protect [] in grep expression.
14868            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14869            if test "x$FOUND_VERSION_78" = x; then
14870              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14871$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14872              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14873$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14874              BOOT_JDK_FOUND=no
14875            else
14876              # We're done! :-)
14877              BOOT_JDK_FOUND=yes
14878
14879  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14880
14881  # Input might be given as Windows format, start by converting to
14882  # unix format.
14883  path="$BOOT_JDK"
14884  new_path=`$CYGPATH -u "$path"`
14885
14886  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14887  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14888  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14889  # "foo.exe" is OK but "foo" is an error.
14890  #
14891  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14892  # It is also a way to make sure we got the proper file name for the real test later on.
14893  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14894  if test "x$test_shortpath" = x; then
14895    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14896$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14897    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14898  fi
14899
14900  # Call helper function which possibly converts this using DOS-style short mode.
14901  # If so, the updated path is stored in $new_path.
14902
14903  input_path="$new_path"
14904  # Check if we need to convert this using DOS-style short mode. If the path
14905  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14906  # take no chances and rewrite it.
14907  # Note: m4 eats our [], so we need to use [ and ] instead.
14908  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14909  if test "x$has_forbidden_chars" != x; then
14910    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14911    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14912    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14913    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14914      # Going to short mode and back again did indeed matter. Since short mode is
14915      # case insensitive, let's make it lowercase to improve readability.
14916      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14917      # Now convert it back to Unix-stile (cygpath)
14918      input_path=`$CYGPATH -u "$shortmode_path"`
14919      new_path="$input_path"
14920    fi
14921  fi
14922
14923  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14924  if test "x$test_cygdrive_prefix" = x; then
14925    # As a simple fix, exclude /usr/bin since it's not a real path.
14926    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14927      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14928      # a path prefixed by /cygdrive for fixpath to work.
14929      new_path="$CYGWIN_ROOT_PATH$input_path"
14930    fi
14931  fi
14932
14933
14934  if test "x$path" != "x$new_path"; then
14935    BOOT_JDK="$new_path"
14936    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14937$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14938  fi
14939
14940  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14941
14942  path="$BOOT_JDK"
14943  has_colon=`$ECHO $path | $GREP ^.:`
14944  new_path="$path"
14945  if test "x$has_colon" = x; then
14946    # Not in mixed or Windows style, start by that.
14947    new_path=`cmd //c echo $path`
14948  fi
14949
14950
14951  input_path="$new_path"
14952  # Check if we need to convert this using DOS-style short mode. If the path
14953  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14954  # take no chances and rewrite it.
14955  # Note: m4 eats our [], so we need to use [ and ] instead.
14956  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14957  if test "x$has_forbidden_chars" != x; then
14958    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14959    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14960  fi
14961
14962
14963  windows_path="$new_path"
14964  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14965    unix_path=`$CYGPATH -u "$windows_path"`
14966    new_path="$unix_path"
14967  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14968    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14969    new_path="$unix_path"
14970  fi
14971
14972  if test "x$path" != "x$new_path"; then
14973    BOOT_JDK="$new_path"
14974    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14975$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14976  fi
14977
14978  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14979  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14980
14981  else
14982    # We're on a posix platform. Hooray! :)
14983    path="$BOOT_JDK"
14984    has_space=`$ECHO "$path" | $GREP " "`
14985    if test "x$has_space" != x; then
14986      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14987$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14988      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14989    fi
14990
14991    # Use eval to expand a potential ~
14992    eval path="$path"
14993    if test ! -f "$path" && test ! -d "$path"; then
14994      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14995    fi
14996
14997    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14998  fi
14999
15000              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15001$as_echo_n "checking for Boot JDK... " >&6; }
15002              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15003$as_echo "$BOOT_JDK" >&6; }
15004              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15005$as_echo_n "checking Boot JDK version... " >&6; }
15006              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15007              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15008$as_echo "$BOOT_JDK_VERSION" >&6; }
15009            fi # end check jdk version
15010          fi # end check rt.jar
15011        fi # end check javac
15012      fi # end check java
15013    fi # end check boot jdk found
15014  fi
15015
15016    done
15017  fi
15018
15019
15020    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15021    if test "x$BOOT_JDK_FOUND" = xmaybe; then
15022      # Do we have a bin/java?
15023      if test ! -x "$BOOT_JDK/bin/java"; then
15024        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15025$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15026        BOOT_JDK_FOUND=no
15027      else
15028        # Do we have a bin/javac?
15029        if test ! -x "$BOOT_JDK/bin/javac"; then
15030          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15031$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15032          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15033$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15034          BOOT_JDK_FOUND=no
15035        else
15036          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15037          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15038            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15039$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15040            BOOT_JDK_FOUND=no
15041          else
15042            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15043            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15044
15045            # Extra M4 quote needed to protect [] in grep expression.
15046            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15047            if test "x$FOUND_VERSION_78" = x; then
15048              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15049$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15050              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15051$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15052              BOOT_JDK_FOUND=no
15053            else
15054              # We're done! :-)
15055              BOOT_JDK_FOUND=yes
15056
15057  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15058
15059  # Input might be given as Windows format, start by converting to
15060  # unix format.
15061  path="$BOOT_JDK"
15062  new_path=`$CYGPATH -u "$path"`
15063
15064  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15065  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15066  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15067  # "foo.exe" is OK but "foo" is an error.
15068  #
15069  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15070  # It is also a way to make sure we got the proper file name for the real test later on.
15071  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15072  if test "x$test_shortpath" = x; then
15073    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15074$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15075    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15076  fi
15077
15078  # Call helper function which possibly converts this using DOS-style short mode.
15079  # If so, the updated path is stored in $new_path.
15080
15081  input_path="$new_path"
15082  # Check if we need to convert this using DOS-style short mode. If the path
15083  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15084  # take no chances and rewrite it.
15085  # Note: m4 eats our [], so we need to use [ and ] instead.
15086  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15087  if test "x$has_forbidden_chars" != x; then
15088    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15089    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15090    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15091    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15092      # Going to short mode and back again did indeed matter. Since short mode is
15093      # case insensitive, let's make it lowercase to improve readability.
15094      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15095      # Now convert it back to Unix-stile (cygpath)
15096      input_path=`$CYGPATH -u "$shortmode_path"`
15097      new_path="$input_path"
15098    fi
15099  fi
15100
15101  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15102  if test "x$test_cygdrive_prefix" = x; then
15103    # As a simple fix, exclude /usr/bin since it's not a real path.
15104    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15105      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15106      # a path prefixed by /cygdrive for fixpath to work.
15107      new_path="$CYGWIN_ROOT_PATH$input_path"
15108    fi
15109  fi
15110
15111
15112  if test "x$path" != "x$new_path"; then
15113    BOOT_JDK="$new_path"
15114    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15115$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15116  fi
15117
15118  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15119
15120  path="$BOOT_JDK"
15121  has_colon=`$ECHO $path | $GREP ^.:`
15122  new_path="$path"
15123  if test "x$has_colon" = x; then
15124    # Not in mixed or Windows style, start by that.
15125    new_path=`cmd //c echo $path`
15126  fi
15127
15128
15129  input_path="$new_path"
15130  # Check if we need to convert this using DOS-style short mode. If the path
15131  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15132  # take no chances and rewrite it.
15133  # Note: m4 eats our [], so we need to use [ and ] instead.
15134  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15135  if test "x$has_forbidden_chars" != x; then
15136    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15137    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15138  fi
15139
15140
15141  windows_path="$new_path"
15142  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15143    unix_path=`$CYGPATH -u "$windows_path"`
15144    new_path="$unix_path"
15145  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15146    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15147    new_path="$unix_path"
15148  fi
15149
15150  if test "x$path" != "x$new_path"; then
15151    BOOT_JDK="$new_path"
15152    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15153$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15154  fi
15155
15156  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15157  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15158
15159  else
15160    # We're on a posix platform. Hooray! :)
15161    path="$BOOT_JDK"
15162    has_space=`$ECHO "$path" | $GREP " "`
15163    if test "x$has_space" != x; then
15164      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15165$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15166      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15167    fi
15168
15169    # Use eval to expand a potential ~
15170    eval path="$path"
15171    if test ! -f "$path" && test ! -d "$path"; then
15172      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15173    fi
15174
15175    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
15176  fi
15177
15178              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15179$as_echo_n "checking for Boot JDK... " >&6; }
15180              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15181$as_echo "$BOOT_JDK" >&6; }
15182              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15183$as_echo_n "checking Boot JDK version... " >&6; }
15184              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15185              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15186$as_echo "$BOOT_JDK_VERSION" >&6; }
15187            fi # end check jdk version
15188          fi # end check rt.jar
15189        fi # end check javac
15190      fi # end check java
15191    fi # end check boot jdk found
15192  fi
15193
15194  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
15195
15196  if test "x$BOOT_JDK_FOUND" = xno; then
15197    # Now execute the test
15198
15199  BOOT_JDK_PREFIX="/usr/lib/jvm"
15200  BOOT_JDK_SUFFIX=""
15201  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
15202  if test "x$ALL_JDKS_FOUND" != x; then
15203    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
15204
15205  if test "x$BOOT_JDK_FOUND" = xno; then
15206    # Now execute the test
15207
15208        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
15209        if test -d "$BOOT_JDK"; then
15210          BOOT_JDK_FOUND=maybe
15211          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
15212$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
15213        fi
15214
15215
15216    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15217    if test "x$BOOT_JDK_FOUND" = xmaybe; then
15218      # Do we have a bin/java?
15219      if test ! -x "$BOOT_JDK/bin/java"; then
15220        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15221$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15222        BOOT_JDK_FOUND=no
15223      else
15224        # Do we have a bin/javac?
15225        if test ! -x "$BOOT_JDK/bin/javac"; then
15226          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15227$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15228          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15229$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15230          BOOT_JDK_FOUND=no
15231        else
15232          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15233          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15234            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15235$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15236            BOOT_JDK_FOUND=no
15237          else
15238            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15239            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15240
15241            # Extra M4 quote needed to protect [] in grep expression.
15242            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15243            if test "x$FOUND_VERSION_78" = x; then
15244              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15245$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15246              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15247$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15248              BOOT_JDK_FOUND=no
15249            else
15250              # We're done! :-)
15251              BOOT_JDK_FOUND=yes
15252
15253  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15254
15255  # Input might be given as Windows format, start by converting to
15256  # unix format.
15257  path="$BOOT_JDK"
15258  new_path=`$CYGPATH -u "$path"`
15259
15260  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15261  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15262  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15263  # "foo.exe" is OK but "foo" is an error.
15264  #
15265  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15266  # It is also a way to make sure we got the proper file name for the real test later on.
15267  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15268  if test "x$test_shortpath" = x; then
15269    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15270$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15271    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15272  fi
15273
15274  # Call helper function which possibly converts this using DOS-style short mode.
15275  # If so, the updated path is stored in $new_path.
15276
15277  input_path="$new_path"
15278  # Check if we need to convert this using DOS-style short mode. If the path
15279  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15280  # take no chances and rewrite it.
15281  # Note: m4 eats our [], so we need to use [ and ] instead.
15282  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15283  if test "x$has_forbidden_chars" != x; then
15284    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15285    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15286    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15287    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15288      # Going to short mode and back again did indeed matter. Since short mode is
15289      # case insensitive, let's make it lowercase to improve readability.
15290      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15291      # Now convert it back to Unix-stile (cygpath)
15292      input_path=`$CYGPATH -u "$shortmode_path"`
15293      new_path="$input_path"
15294    fi
15295  fi
15296
15297  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15298  if test "x$test_cygdrive_prefix" = x; then
15299    # As a simple fix, exclude /usr/bin since it's not a real path.
15300    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15301      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15302      # a path prefixed by /cygdrive for fixpath to work.
15303      new_path="$CYGWIN_ROOT_PATH$input_path"
15304    fi
15305  fi
15306
15307
15308  if test "x$path" != "x$new_path"; then
15309    BOOT_JDK="$new_path"
15310    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15311$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15312  fi
15313
15314  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15315
15316  path="$BOOT_JDK"
15317  has_colon=`$ECHO $path | $GREP ^.:`
15318  new_path="$path"
15319  if test "x$has_colon" = x; then
15320    # Not in mixed or Windows style, start by that.
15321    new_path=`cmd //c echo $path`
15322  fi
15323
15324
15325  input_path="$new_path"
15326  # Check if we need to convert this using DOS-style short mode. If the path
15327  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15328  # take no chances and rewrite it.
15329  # Note: m4 eats our [], so we need to use [ and ] instead.
15330  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15331  if test "x$has_forbidden_chars" != x; then
15332    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15333    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15334  fi
15335
15336
15337  windows_path="$new_path"
15338  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15339    unix_path=`$CYGPATH -u "$windows_path"`
15340    new_path="$unix_path"
15341  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15342    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15343    new_path="$unix_path"
15344  fi
15345
15346  if test "x$path" != "x$new_path"; then
15347    BOOT_JDK="$new_path"
15348    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15349$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15350  fi
15351
15352  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15353  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15354
15355  else
15356    # We're on a posix platform. Hooray! :)
15357    path="$BOOT_JDK"
15358    has_space=`$ECHO "$path" | $GREP " "`
15359    if test "x$has_space" != x; then
15360      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15361$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15362      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15363    fi
15364
15365    # Use eval to expand a potential ~
15366    eval path="$path"
15367    if test ! -f "$path" && test ! -d "$path"; then
15368      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15369    fi
15370
15371    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
15372  fi
15373
15374              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15375$as_echo_n "checking for Boot JDK... " >&6; }
15376              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15377$as_echo "$BOOT_JDK" >&6; }
15378              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15379$as_echo_n "checking Boot JDK version... " >&6; }
15380              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15381              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15382$as_echo "$BOOT_JDK_VERSION" >&6; }
15383            fi # end check jdk version
15384          fi # end check rt.jar
15385        fi # end check javac
15386      fi # end check java
15387    fi # end check boot jdk found
15388  fi
15389
15390    done
15391  fi
15392
15393
15394    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15395    if test "x$BOOT_JDK_FOUND" = xmaybe; then
15396      # Do we have a bin/java?
15397      if test ! -x "$BOOT_JDK/bin/java"; then
15398        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15399$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15400        BOOT_JDK_FOUND=no
15401      else
15402        # Do we have a bin/javac?
15403        if test ! -x "$BOOT_JDK/bin/javac"; then
15404          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15405$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15406          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15407$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15408          BOOT_JDK_FOUND=no
15409        else
15410          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15411          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15412            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15413$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15414            BOOT_JDK_FOUND=no
15415          else
15416            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15417            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15418
15419            # Extra M4 quote needed to protect [] in grep expression.
15420            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15421            if test "x$FOUND_VERSION_78" = x; then
15422              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15423$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15424              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15425$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15426              BOOT_JDK_FOUND=no
15427            else
15428              # We're done! :-)
15429              BOOT_JDK_FOUND=yes
15430
15431  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15432
15433  # Input might be given as Windows format, start by converting to
15434  # unix format.
15435  path="$BOOT_JDK"
15436  new_path=`$CYGPATH -u "$path"`
15437
15438  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15439  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15440  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15441  # "foo.exe" is OK but "foo" is an error.
15442  #
15443  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15444  # It is also a way to make sure we got the proper file name for the real test later on.
15445  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15446  if test "x$test_shortpath" = x; then
15447    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15448$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15449    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15450  fi
15451
15452  # Call helper function which possibly converts this using DOS-style short mode.
15453  # If so, the updated path is stored in $new_path.
15454
15455  input_path="$new_path"
15456  # Check if we need to convert this using DOS-style short mode. If the path
15457  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15458  # take no chances and rewrite it.
15459  # Note: m4 eats our [], so we need to use [ and ] instead.
15460  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15461  if test "x$has_forbidden_chars" != x; then
15462    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15463    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15464    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15465    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15466      # Going to short mode and back again did indeed matter. Since short mode is
15467      # case insensitive, let's make it lowercase to improve readability.
15468      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15469      # Now convert it back to Unix-stile (cygpath)
15470      input_path=`$CYGPATH -u "$shortmode_path"`
15471      new_path="$input_path"
15472    fi
15473  fi
15474
15475  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15476  if test "x$test_cygdrive_prefix" = x; then
15477    # As a simple fix, exclude /usr/bin since it's not a real path.
15478    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15479      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15480      # a path prefixed by /cygdrive for fixpath to work.
15481      new_path="$CYGWIN_ROOT_PATH$input_path"
15482    fi
15483  fi
15484
15485
15486  if test "x$path" != "x$new_path"; then
15487    BOOT_JDK="$new_path"
15488    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15489$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15490  fi
15491
15492  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15493
15494  path="$BOOT_JDK"
15495  has_colon=`$ECHO $path | $GREP ^.:`
15496  new_path="$path"
15497  if test "x$has_colon" = x; then
15498    # Not in mixed or Windows style, start by that.
15499    new_path=`cmd //c echo $path`
15500  fi
15501
15502
15503  input_path="$new_path"
15504  # Check if we need to convert this using DOS-style short mode. If the path
15505  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15506  # take no chances and rewrite it.
15507  # Note: m4 eats our [], so we need to use [ and ] instead.
15508  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15509  if test "x$has_forbidden_chars" != x; then
15510    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15511    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15512  fi
15513
15514
15515  windows_path="$new_path"
15516  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15517    unix_path=`$CYGPATH -u "$windows_path"`
15518    new_path="$unix_path"
15519  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15520    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15521    new_path="$unix_path"
15522  fi
15523
15524  if test "x$path" != "x$new_path"; then
15525    BOOT_JDK="$new_path"
15526    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15527$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15528  fi
15529
15530  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15531  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15532
15533  else
15534    # We're on a posix platform. Hooray! :)
15535    path="$BOOT_JDK"
15536    has_space=`$ECHO "$path" | $GREP " "`
15537    if test "x$has_space" != x; then
15538      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15539$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15540      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15541    fi
15542
15543    # Use eval to expand a potential ~
15544    eval path="$path"
15545    if test ! -f "$path" && test ! -d "$path"; then
15546      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15547    fi
15548
15549    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
15550  fi
15551
15552              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15553$as_echo_n "checking for Boot JDK... " >&6; }
15554              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15555$as_echo "$BOOT_JDK" >&6; }
15556              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15557$as_echo_n "checking Boot JDK version... " >&6; }
15558              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15559              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15560$as_echo "$BOOT_JDK_VERSION" >&6; }
15561            fi # end check jdk version
15562          fi # end check rt.jar
15563        fi # end check javac
15564      fi # end check java
15565    fi # end check boot jdk found
15566  fi
15567
15568  fi
15569
15570
15571    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15572    if test "x$BOOT_JDK_FOUND" = xmaybe; then
15573      # Do we have a bin/java?
15574      if test ! -x "$BOOT_JDK/bin/java"; then
15575        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15576$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15577        BOOT_JDK_FOUND=no
15578      else
15579        # Do we have a bin/javac?
15580        if test ! -x "$BOOT_JDK/bin/javac"; then
15581          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15582$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15583          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15584$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15585          BOOT_JDK_FOUND=no
15586        else
15587          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15588          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15589            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15590$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15591            BOOT_JDK_FOUND=no
15592          else
15593            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15594            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15595
15596            # Extra M4 quote needed to protect [] in grep expression.
15597            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15598            if test "x$FOUND_VERSION_78" = x; then
15599              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15600$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15601              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15602$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15603              BOOT_JDK_FOUND=no
15604            else
15605              # We're done! :-)
15606              BOOT_JDK_FOUND=yes
15607
15608  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15609
15610  # Input might be given as Windows format, start by converting to
15611  # unix format.
15612  path="$BOOT_JDK"
15613  new_path=`$CYGPATH -u "$path"`
15614
15615  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15616  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15617  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15618  # "foo.exe" is OK but "foo" is an error.
15619  #
15620  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15621  # It is also a way to make sure we got the proper file name for the real test later on.
15622  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15623  if test "x$test_shortpath" = x; then
15624    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15625$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15626    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15627  fi
15628
15629  # Call helper function which possibly converts this using DOS-style short mode.
15630  # If so, the updated path is stored in $new_path.
15631
15632  input_path="$new_path"
15633  # Check if we need to convert this using DOS-style short mode. If the path
15634  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15635  # take no chances and rewrite it.
15636  # Note: m4 eats our [], so we need to use [ and ] instead.
15637  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15638  if test "x$has_forbidden_chars" != x; then
15639    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15640    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15641    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15642    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15643      # Going to short mode and back again did indeed matter. Since short mode is
15644      # case insensitive, let's make it lowercase to improve readability.
15645      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15646      # Now convert it back to Unix-stile (cygpath)
15647      input_path=`$CYGPATH -u "$shortmode_path"`
15648      new_path="$input_path"
15649    fi
15650  fi
15651
15652  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15653  if test "x$test_cygdrive_prefix" = x; then
15654    # As a simple fix, exclude /usr/bin since it's not a real path.
15655    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15656      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15657      # a path prefixed by /cygdrive for fixpath to work.
15658      new_path="$CYGWIN_ROOT_PATH$input_path"
15659    fi
15660  fi
15661
15662
15663  if test "x$path" != "x$new_path"; then
15664    BOOT_JDK="$new_path"
15665    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15666$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15667  fi
15668
15669  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15670
15671  path="$BOOT_JDK"
15672  has_colon=`$ECHO $path | $GREP ^.:`
15673  new_path="$path"
15674  if test "x$has_colon" = x; then
15675    # Not in mixed or Windows style, start by that.
15676    new_path=`cmd //c echo $path`
15677  fi
15678
15679
15680  input_path="$new_path"
15681  # Check if we need to convert this using DOS-style short mode. If the path
15682  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15683  # take no chances and rewrite it.
15684  # Note: m4 eats our [], so we need to use [ and ] instead.
15685  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15686  if test "x$has_forbidden_chars" != x; then
15687    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15688    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15689  fi
15690
15691
15692  windows_path="$new_path"
15693  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15694    unix_path=`$CYGPATH -u "$windows_path"`
15695    new_path="$unix_path"
15696  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15697    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15698    new_path="$unix_path"
15699  fi
15700
15701  if test "x$path" != "x$new_path"; then
15702    BOOT_JDK="$new_path"
15703    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15704$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15705  fi
15706
15707  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15708  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15709
15710  else
15711    # We're on a posix platform. Hooray! :)
15712    path="$BOOT_JDK"
15713    has_space=`$ECHO "$path" | $GREP " "`
15714    if test "x$has_space" != x; then
15715      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15716$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15717      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15718    fi
15719
15720    # Use eval to expand a potential ~
15721    eval path="$path"
15722    if test ! -f "$path" && test ! -d "$path"; then
15723      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15724    fi
15725
15726    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
15727  fi
15728
15729              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15730$as_echo_n "checking for Boot JDK... " >&6; }
15731              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15732$as_echo "$BOOT_JDK" >&6; }
15733              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15734$as_echo_n "checking Boot JDK version... " >&6; }
15735              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15736              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15737$as_echo "$BOOT_JDK_VERSION" >&6; }
15738            fi # end check jdk version
15739          fi # end check rt.jar
15740        fi # end check javac
15741      fi # end check java
15742    fi # end check boot jdk found
15743  fi
15744
15745
15746  # If we haven't found anything yet, we've truly lost. Give up.
15747  if test "x$BOOT_JDK_FOUND" = xno; then
15748
15749  # Print a helpful message on how to acquire the necessary build dependency.
15750  # openjdk is the help tag: freetyp2, cups, pulse, alsa etc
15751  MISSING_DEPENDENCY=openjdk
15752
15753  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15754    cygwin_help $MISSING_DEPENDENCY
15755  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15756    msys_help $MISSING_DEPENDENCY
15757  else
15758    PKGHANDLER_COMMAND=
15759
15760    case $PKGHANDLER in
15761      apt-get)
15762        apt_help     $MISSING_DEPENDENCY ;;
15763      yum)
15764        yum_help     $MISSING_DEPENDENCY ;;
15765      port)
15766        port_help    $MISSING_DEPENDENCY ;;
15767      pkgutil)
15768        pkgutil_help $MISSING_DEPENDENCY ;;
15769      pkgadd)
15770        pkgadd_help  $MISSING_DEPENDENCY ;;
15771      * )
15772        break ;;
15773    esac
15774
15775    if test "x$PKGHANDLER_COMMAND" != x; then
15776      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
15777    fi
15778  fi
15779
15780    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
15781$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
15782    { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
15783$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15784    as_fn_error $? "Cannot continue" "$LINENO" 5
15785  fi
15786
15787  # Setup proper paths for what we found
15788  BOOT_RTJAR="$BOOT_JDK/jre/lib/rt.jar"
15789  if test ! -f "$BOOT_RTJAR"; then
15790    # On MacOSX it is called classes.jar
15791    BOOT_RTJAR="$BOOT_JDK/../Classes/classes.jar"
15792    if test -f "$BOOT_RTJAR"; then
15793      # Remove the ..
15794      BOOT_RTJAR="`cd ${BOOT_RTJAR%/*} && pwd`/${BOOT_RTJAR##*/}"
15795    fi
15796  fi
15797  BOOT_TOOLSJAR="$BOOT_JDK/lib/tools.jar"
15798  BOOT_JDK="$BOOT_JDK"
15799
15800
15801
15802
15803  # Setup tools from the Boot JDK.
15804
15805  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
15806$as_echo_n "checking for java in Boot JDK... " >&6; }
15807  JAVA=$BOOT_JDK/bin/java
15808  if test ! -x $JAVA; then
15809    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15810$as_echo "not found" >&6; }
15811    { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15812$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15813    as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
15814  fi
15815  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15816$as_echo "ok" >&6; }
15817
15818
15819  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
15820$as_echo_n "checking for javac in Boot JDK... " >&6; }
15821  JAVAC=$BOOT_JDK/bin/javac
15822  if test ! -x $JAVAC; then
15823    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15824$as_echo "not found" >&6; }
15825    { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15826$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15827    as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
15828  fi
15829  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15830$as_echo "ok" >&6; }
15831
15832
15833  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
15834$as_echo_n "checking for javah in Boot JDK... " >&6; }
15835  JAVAH=$BOOT_JDK/bin/javah
15836  if test ! -x $JAVAH; then
15837    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15838$as_echo "not found" >&6; }
15839    { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15840$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15841    as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
15842  fi
15843  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15844$as_echo "ok" >&6; }
15845
15846
15847  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javap in Boot JDK" >&5
15848$as_echo_n "checking for javap in Boot JDK... " >&6; }
15849  JAVAP=$BOOT_JDK/bin/javap
15850  if test ! -x $JAVAP; then
15851    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15852$as_echo "not found" >&6; }
15853    { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15854$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15855    as_fn_error $? "Could not find javap in the Boot JDK" "$LINENO" 5
15856  fi
15857  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15858$as_echo "ok" >&6; }
15859
15860
15861  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
15862$as_echo_n "checking for jar in Boot JDK... " >&6; }
15863  JAR=$BOOT_JDK/bin/jar
15864  if test ! -x $JAR; then
15865    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15866$as_echo "not found" >&6; }
15867    { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15868$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15869    as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
15870  fi
15871  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15872$as_echo "ok" >&6; }
15873
15874
15875  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rmic in Boot JDK" >&5
15876$as_echo_n "checking for rmic in Boot JDK... " >&6; }
15877  RMIC=$BOOT_JDK/bin/rmic
15878  if test ! -x $RMIC; then
15879    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15880$as_echo "not found" >&6; }
15881    { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15882$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15883    as_fn_error $? "Could not find rmic in the Boot JDK" "$LINENO" 5
15884  fi
15885  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15886$as_echo "ok" >&6; }
15887
15888
15889  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5
15890$as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
15891  NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
15892  if test ! -x $NATIVE2ASCII; then
15893    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15894$as_echo "not found" >&6; }
15895    { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15896$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15897    as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5
15898  fi
15899  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15900$as_echo "ok" >&6; }
15901
15902
15903  # Finally, set some other options...
15904
15905  # When compiling code to be executed by the Boot JDK, force jdk7 compatibility.
15906  BOOT_JDK_SOURCETARGET="-source 7 -target 7"
15907
15908
15909
15910
15911  ##############################################################################
15912  #
15913  # Specify options for anything that is run with the Boot JDK.
15914  #
15915
15916# Check whether --with-boot-jdk-jvmargs was given.
15917if test "${with_boot_jdk_jvmargs+set}" = set; then :
15918  withval=$with_boot_jdk_jvmargs;
15919fi
15920
15921
15922  if test "x$with_boot_jdk_jvmargs" = x; then
15923    # Not all JVM:s accept the same arguments on the command line.
15924    # OpenJDK specific increase in thread stack for JDK build,
15925    # well more specifically, when running javac.
15926    if test "x$BUILD_NUM_BITS" = x32; then
15927      STACK_SIZE=768
15928    else
15929      # Running Javac on a JVM on a 64-bit machine, the stack takes more space
15930      # since 64-bit pointers are pushed on the stach. Apparently, we need
15931      # to increase the stack space when javacing the JDK....
15932      STACK_SIZE=1536
15933    fi
15934
15935    # Minimum amount of heap memory.
15936
15937  $ECHO "Check if jvm arg is ok: -Xms64M" >&5
15938  $ECHO "Command: $JAVA -Xms64M -version" >&5
15939  OUTPUT=`$JAVA -Xms64M -version 2>&1`
15940  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
15941  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
15942  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15943    boot_jdk_jvmargs="$boot_jdk_jvmargs -Xms64M"
15944    JVM_ARG_OK=true
15945  else
15946    $ECHO "Arg failed:" >&5
15947    $ECHO "$OUTPUT" >&5
15948    JVM_ARG_OK=false
15949  fi
15950
15951    if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
15952      # Why does macosx need more heap? Its the huge JDK batch.
15953
15954  $ECHO "Check if jvm arg is ok: -Xmx1600M" >&5
15955  $ECHO "Command: $JAVA -Xmx1600M -version" >&5
15956  OUTPUT=`$JAVA -Xmx1600M -version 2>&1`
15957  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
15958  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
15959  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15960    boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1600M"
15961    JVM_ARG_OK=true
15962  else
15963    $ECHO "Arg failed:" >&5
15964    $ECHO "$OUTPUT" >&5
15965    JVM_ARG_OK=false
15966  fi
15967
15968    else
15969
15970  $ECHO "Check if jvm arg is ok: -Xmx1100M" >&5
15971  $ECHO "Command: $JAVA -Xmx1100M -version" >&5
15972  OUTPUT=`$JAVA -Xmx1100M -version 2>&1`
15973  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
15974  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
15975  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15976    boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1100M"
15977    JVM_ARG_OK=true
15978  else
15979    $ECHO "Arg failed:" >&5
15980    $ECHO "$OUTPUT" >&5
15981    JVM_ARG_OK=false
15982  fi
15983
15984    fi
15985    # When is adding -client something that speeds up the JVM?
15986    # ADD_JVM_ARG_IF_OK([-client],boot_jdk_jvmargs,[$JAVA])
15987
15988  $ECHO "Check if jvm arg is ok: -XX:PermSize=32m" >&5
15989  $ECHO "Command: $JAVA -XX:PermSize=32m -version" >&5
15990  OUTPUT=`$JAVA -XX:PermSize=32m -version 2>&1`
15991  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
15992  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
15993  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15994    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:PermSize=32m"
15995    JVM_ARG_OK=true
15996  else
15997    $ECHO "Arg failed:" >&5
15998    $ECHO "$OUTPUT" >&5
15999    JVM_ARG_OK=false
16000  fi
16001
16002
16003  $ECHO "Check if jvm arg is ok: -XX:MaxPermSize=160m" >&5
16004  $ECHO "Command: $JAVA -XX:MaxPermSize=160m -version" >&5
16005  OUTPUT=`$JAVA -XX:MaxPermSize=160m -version 2>&1`
16006  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
16007  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
16008  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
16009    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:MaxPermSize=160m"
16010    JVM_ARG_OK=true
16011  else
16012    $ECHO "Arg failed:" >&5
16013    $ECHO "$OUTPUT" >&5
16014    JVM_ARG_OK=false
16015  fi
16016
16017
16018  $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
16019  $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
16020  OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
16021  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
16022  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
16023  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
16024    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:ThreadStackSize=$STACK_SIZE"
16025    JVM_ARG_OK=true
16026  else
16027    $ECHO "Arg failed:" >&5
16028    $ECHO "$OUTPUT" >&5
16029    JVM_ARG_OK=false
16030  fi
16031
16032    # Disable special log output when a debug build is used as Boot JDK...
16033
16034  $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
16035  $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
16036  OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
16037  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
16038  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
16039  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
16040    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
16041    JVM_ARG_OK=true
16042  else
16043    $ECHO "Arg failed:" >&5
16044    $ECHO "$OUTPUT" >&5
16045    JVM_ARG_OK=false
16046  fi
16047
16048  fi
16049
16050  BOOT_JDK_JVMARGS=$boot_jdk_jvmargs
16051
16052
16053
16054###############################################################################
16055#
16056# Configure the sources to use. We can add or override individual directories.
16057#
16058###############################################################################
16059
16060
16061  # Where are the sources. Any of these can be overridden
16062  # using --with-override-corba and the likes.
16063  LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
16064  CORBA_TOPDIR="$SRC_ROOT/corba"
16065  JAXP_TOPDIR="$SRC_ROOT/jaxp"
16066  JAXWS_TOPDIR="$SRC_ROOT/jaxws"
16067  HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
16068  NASHORN_TOPDIR="$SRC_ROOT/nashorn"
16069  JDK_TOPDIR="$SRC_ROOT/jdk"
16070
16071
16072
16073
16074
16075
16076
16077
16078
16079
16080  ###############################################################################
16081  #
16082  # Pickup additional source for a component from outside of the source root
16083  # or override source for a component.
16084  #
16085
16086# Check whether --with-add-source-root was given.
16087if test "${with_add_source_root+set}" = set; then :
16088  withval=$with_add_source_root;
16089fi
16090
16091
16092
16093# Check whether --with-override-source-root was given.
16094if test "${with_override_source_root+set}" = set; then :
16095  withval=$with_override_source_root;
16096fi
16097
16098
16099
16100# Check whether --with-adds-and-overrides was given.
16101if test "${with_adds_and_overrides+set}" = set; then :
16102  withval=$with_adds_and_overrides;
16103fi
16104
16105
16106  if test "x$with_adds_and_overrides" != x; then
16107    with_add_source_root="$with_adds_and_overrides/adds"
16108    with_override_source_root="$with_adds_and_overrides/overrides"
16109  fi
16110
16111  if test "x$with_add_source_root" != x; then
16112    if ! test -d $with_add_source_root; then
16113      as_fn_error $? "Trying to use a non-existant add-source-root $with_add_source_root" "$LINENO" 5
16114    fi
16115    CURDIR="$PWD"
16116    cd "$with_add_source_root"
16117    ADD_SRC_ROOT="`pwd`"
16118    cd "$CURDIR"
16119    # Verify that the addon source root does not have any root makefiles.
16120    # If it does, then it is usually an error, prevent this.
16121    if test -f $with_add_source_root/langtools/makefiles/Makefile || \
16122      test -f $with_add_source_root/langtools/make/Makefile; then
16123      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
16124    fi
16125    if test -f $with_add_source_root/corba/makefiles/Makefile || \
16126      test -f $with_add_source_root/corba/make/Makefile; then
16127      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
16128    fi
16129    if test -f $with_add_source_root/jaxp/makefiles/Makefile || \
16130      test -f $with_add_source_root/jaxp/make/Makefile; then
16131      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
16132    fi
16133    if test -f $with_add_source_root/jaxws/makefiles/Makefile || \
16134      test -f $with_add_source_root/jaxws/make/Makefile; then
16135      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
16136    fi
16137    if test -f $with_add_source_root/hotspot/makefiles/Makefile || \
16138      test -f $with_add_source_root/hotspot/make/Makefile; then
16139      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
16140    fi
16141    if test -f $with_add_source_root/nashorn/makefiles/Makefile || \
16142      test -f $with_add_source_root/nashorn/make/Makefile; then
16143      as_fn_error $? "Your add source root seems to contain a full nashorn repo! An add source root should only contain additional sources." "$LINENO" 5
16144    fi
16145    if test -f $with_add_source_root/jdk/makefiles/Makefile || \
16146      test -f $with_add_source_root/jdk/make/Makefile; then
16147      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
16148    fi
16149  fi
16150
16151
16152  if test "x$with_override_source_root" != x; then
16153    if ! test -d $with_override_source_root; then
16154      as_fn_error $? "Trying to use a non-existant override-source-root $with_override_source_root" "$LINENO" 5
16155    fi
16156    CURDIR="$PWD"
16157    cd "$with_override_source_root"
16158    OVERRIDE_SRC_ROOT="`pwd`"
16159    cd "$CURDIR"
16160    if test -f $with_override_source_root/langtools/makefiles/Makefile || \
16161      test -f $with_override_source_root/langtools/make/Makefile; then
16162      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
16163    fi
16164    if test -f $with_override_source_root/corba/makefiles/Makefile || \
16165      test -f $with_override_source_root/corba/make/Makefile; then
16166      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
16167    fi
16168    if test -f $with_override_source_root/jaxp/makefiles/Makefile || \
16169      test -f $with_override_source_root/jaxp/make/Makefile; then
16170      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
16171    fi
16172    if test -f $with_override_source_root/jaxws/makefiles/Makefile || \
16173      test -f $with_override_source_root/jaxws/make/Makefile; then
16174      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
16175    fi
16176    if test -f $with_override_source_root/hotspot/makefiles/Makefile || \
16177      test -f $with_override_source_root/hotspot/make/Makefile; then
16178      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
16179    fi
16180    if test -f $with_override_source_root/nashorn/makefiles/Makefile || \
16181      test -f $with_override_source_root/nashorn/make/Makefile; then
16182      as_fn_error $? "Your override source root seems to contain a full nashorn repo! An override source root should only contain sources that override." "$LINENO" 5
16183    fi
16184    if test -f $with_override_source_root/jdk/makefiles/Makefile || \
16185      test -f $with_override_source_root/jdk/make/Makefile; then
16186      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
16187    fi
16188  fi
16189
16190
16191  ###############################################################################
16192  #
16193  # Override a repo completely, this is used for example when you have 3 small
16194  # development sandboxes of the langtools sources and want to avoid having 3 full
16195  # OpenJDK sources checked out on disk.
16196  #
16197  # Assuming that the 3 langtools sandboxes are located here:
16198  # /home/fredrik/sandbox1/langtools
16199  # /home/fredrik/sandbox2/langtools
16200  # /home/fredrik/sandbox3/langtools
16201  #
16202  # From the source root you create build subdirs manually:
16203  #     mkdir -p build1 build2 build3
16204  # in each build directory run:
16205  #     (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make)
16206  #     (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make)
16207  #     (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make)
16208  #
16209
16210
16211# Check whether --with-override-langtools was given.
16212if test "${with_override_langtools+set}" = set; then :
16213  withval=$with_override_langtools;
16214fi
16215
16216
16217
16218# Check whether --with-override-corba was given.
16219if test "${with_override_corba+set}" = set; then :
16220  withval=$with_override_corba;
16221fi
16222
16223
16224
16225# Check whether --with-override-jaxp was given.
16226if test "${with_override_jaxp+set}" = set; then :
16227  withval=$with_override_jaxp;
16228fi
16229
16230
16231
16232# Check whether --with-override-jaxws was given.
16233if test "${with_override_jaxws+set}" = set; then :
16234  withval=$with_override_jaxws;
16235fi
16236
16237
16238
16239# Check whether --with-override-hotspot was given.
16240if test "${with_override_hotspot+set}" = set; then :
16241  withval=$with_override_hotspot;
16242fi
16243
16244
16245
16246# Check whether --with-override-nashorn was given.
16247if test "${with_override_nashorn+set}" = set; then :
16248  withval=$with_override_nashorn;
16249fi
16250
16251
16252
16253# Check whether --with-override-jdk was given.
16254if test "${with_override_jdk+set}" = set; then :
16255  withval=$with_override_jdk;
16256fi
16257
16258
16259  if test "x$with_override_langtools" != x; then
16260    CURDIR="$PWD"
16261    cd "$with_override_langtools"
16262    LANGTOOLS_TOPDIR="`pwd`"
16263    cd "$CURDIR"
16264    if ! test -f $LANGTOOLS_TOPDIR/makefiles/Makefile; then
16265      as_fn_error $? "You have to override langtools with a full langtools repo!" "$LINENO" 5
16266    fi
16267    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if langtools should be overridden" >&5
16268$as_echo_n "checking if langtools should be overridden... " >&6; }
16269    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $LANGTOOLS_TOPDIR" >&5
16270$as_echo "yes with $LANGTOOLS_TOPDIR" >&6; }
16271  fi
16272  if test "x$with_override_corba" != x; then
16273    CURDIR="$PWD"
16274    cd "$with_override_corba"
16275    CORBA_TOPDIR="`pwd`"
16276    cd "$CURDIR"
16277    if ! test -f $CORBA_TOPDIR/makefiles/Makefile; then
16278      as_fn_error $? "You have to override corba with a full corba repo!" "$LINENO" 5
16279    fi
16280    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if corba should be overridden" >&5
16281$as_echo_n "checking if corba should be overridden... " >&6; }
16282    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $CORBA_TOPDIR" >&5
16283$as_echo "yes with $CORBA_TOPDIR" >&6; }
16284  fi
16285  if test "x$with_override_jaxp" != x; then
16286    CURDIR="$PWD"
16287    cd "$with_override_jaxp"
16288    JAXP_TOPDIR="`pwd`"
16289    cd "$CURDIR"
16290    if ! test -f $JAXP_TOPDIR/makefiles/Makefile; then
16291      as_fn_error $? "You have to override jaxp with a full jaxp repo!" "$LINENO" 5
16292    fi
16293    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxp should be overridden" >&5
16294$as_echo_n "checking if jaxp should be overridden... " >&6; }
16295    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXP_TOPDIR" >&5
16296$as_echo "yes with $JAXP_TOPDIR" >&6; }
16297  fi
16298  if test "x$with_override_jaxws" != x; then
16299    CURDIR="$PWD"
16300    cd "$with_override_jaxws"
16301    JAXWS_TOPDIR="`pwd`"
16302    cd "$CURDIR"
16303    if ! test -f $JAXWS_TOPDIR/makefiles/Makefile; then
16304      as_fn_error $? "You have to override jaxws with a full jaxws repo!" "$LINENO" 5
16305    fi
16306    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxws should be overridden" >&5
16307$as_echo_n "checking if jaxws should be overridden... " >&6; }
16308    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXWS_TOPDIR" >&5
16309$as_echo "yes with $JAXWS_TOPDIR" >&6; }
16310  fi
16311  if test "x$with_override_hotspot" != x; then
16312    CURDIR="$PWD"
16313    cd "$with_override_hotspot"
16314    HOTSPOT_TOPDIR="`pwd`"
16315    cd "$CURDIR"
16316    if ! test -f $HOTSPOT_TOPDIR/make/Makefile && \
16317        ! test -f $HOTSPOT_TOPDIR/makefiles/Makefile; then
16318      as_fn_error $? "You have to override hotspot with a full hotspot repo!" "$LINENO" 5
16319    fi
16320    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be overridden" >&5
16321$as_echo_n "checking if hotspot should be overridden... " >&6; }
16322    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $HOTSPOT_TOPDIR" >&5
16323$as_echo "yes with $HOTSPOT_TOPDIR" >&6; }
16324  fi
16325  if test "x$with_override_nashorn" != x; then
16326    CURDIR="$PWD"
16327    cd "$with_override_nashorn"
16328    NASHORN_TOPDIR="`pwd`"
16329    cd "$CURDIR"
16330    if ! test -f $NASHORN_TOPDIR/makefiles/Makefile; then
16331      as_fn_error $? "You have to override nashorn with a full nashorn repo!" "$LINENO" 5
16332    fi
16333    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if nashorn should be overridden" >&5
16334$as_echo_n "checking if nashorn should be overridden... " >&6; }
16335    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $NASHORN_TOPDIR" >&5
16336$as_echo "yes with $NASHORN_TOPDIR" >&6; }
16337  fi
16338  if test "x$with_override_jdk" != x; then
16339    CURDIR="$PWD"
16340    cd "$with_override_jdk"
16341    JDK_TOPDIR="`pwd`"
16342    cd "$CURDIR"
16343    if ! test -f $JDK_TOPDIR/makefiles/Makefile; then
16344      as_fn_error $? "You have to override JDK with a full JDK repo!" "$LINENO" 5
16345    fi
16346    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if JDK should be overridden" >&5
16347$as_echo_n "checking if JDK should be overridden... " >&6; }
16348    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JDK_TOPDIR" >&5
16349$as_echo "yes with $JDK_TOPDIR" >&6; }
16350  fi
16351
16352
16353  BUILD_OUTPUT="$OUTPUT_ROOT"
16354
16355
16356  HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
16357  BUILD_HOTSPOT=true
16358
16359
16360
16361# Check whether --with-import-hotspot was given.
16362if test "${with_import_hotspot+set}" = set; then :
16363  withval=$with_import_hotspot;
16364fi
16365
16366  if test "x$with_import_hotspot" != x; then
16367    CURDIR="$PWD"
16368    cd "$with_import_hotspot"
16369    HOTSPOT_DIST="`pwd`"
16370    cd "$CURDIR"
16371    if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
16372      as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
16373    fi
16374    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
16375$as_echo_n "checking if hotspot should be imported... " >&6; }
16376    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
16377$as_echo "yes from $HOTSPOT_DIST" >&6; }
16378    BUILD_HOTSPOT=false
16379  fi
16380
16381  JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
16382
16383
16384###############################################################################
16385#
16386# Setup the toolchain (compilers etc), i.e. the tools that need to be
16387# cross-compilation aware.
16388#
16389###############################################################################
16390
16391
16392  ###############################################################################
16393  #
16394  # Configure the development tool paths and potential sysroot.
16395  #
16396  ac_ext=cpp
16397ac_cpp='$CXXCPP $CPPFLAGS'
16398ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16399ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16400ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16401
16402
16403  # The option used to specify the target .o,.a or .so file.
16404  # When compiling, how to specify the to be created object file.
16405  CC_OUT_OPTION='-o$(SPACE)'
16406  # When linking, how to specify the to be created executable.
16407  EXE_OUT_OPTION='-o$(SPACE)'
16408  # When linking, how to specify the to be created dynamically linkable library.
16409  LD_OUT_OPTION='-o$(SPACE)'
16410  # When archiving, how to specify the to be create static archive for object files.
16411  AR_OUT_OPTION='rcs$(SPACE)'
16412
16413
16414
16415
16416
16417# Locate the actual tools
16418
16419
16420# Check whether --with-jtreg was given.
16421if test "${with_jtreg+set}" = set; then :
16422  withval=$with_jtreg;
16423else
16424  with_jtreg=no
16425fi
16426
16427
16428  if test "x$with_jtreg" = xno; then
16429    # jtreg disabled
16430    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
16431$as_echo_n "checking for jtreg... " >&6; }
16432    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16433$as_echo "no" >&6; }
16434  else
16435    if test "x$with_jtreg" != xyes; then
16436      # with path specified.
16437      JT_HOME="$with_jtreg"
16438    fi
16439
16440    if test "x$JT_HOME" != x; then
16441      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
16442$as_echo_n "checking for jtreg... " >&6; }
16443
16444      # use JT_HOME enviroment var.
16445
16446  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16447
16448  # Input might be given as Windows format, start by converting to
16449  # unix format.
16450  path="$JT_HOME"
16451  new_path=`$CYGPATH -u "$path"`
16452
16453  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16454  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16455  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16456  # "foo.exe" is OK but "foo" is an error.
16457  #
16458  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16459  # It is also a way to make sure we got the proper file name for the real test later on.
16460  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16461  if test "x$test_shortpath" = x; then
16462    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
16463$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
16464    as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
16465  fi
16466
16467  # Call helper function which possibly converts this using DOS-style short mode.
16468  # If so, the updated path is stored in $new_path.
16469
16470  input_path="$new_path"
16471  # Check if we need to convert this using DOS-style short mode. If the path
16472  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16473  # take no chances and rewrite it.
16474  # Note: m4 eats our [], so we need to use [ and ] instead.
16475  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16476  if test "x$has_forbidden_chars" != x; then
16477    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16478    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16479    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16480    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16481      # Going to short mode and back again did indeed matter. Since short mode is
16482      # case insensitive, let's make it lowercase to improve readability.
16483      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16484      # Now convert it back to Unix-stile (cygpath)
16485      input_path=`$CYGPATH -u "$shortmode_path"`
16486      new_path="$input_path"
16487    fi
16488  fi
16489
16490  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16491  if test "x$test_cygdrive_prefix" = x; then
16492    # As a simple fix, exclude /usr/bin since it's not a real path.
16493    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16494      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16495      # a path prefixed by /cygdrive for fixpath to work.
16496      new_path="$CYGWIN_ROOT_PATH$input_path"
16497    fi
16498  fi
16499
16500
16501  if test "x$path" != "x$new_path"; then
16502    JT_HOME="$new_path"
16503    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
16504$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
16505  fi
16506
16507  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16508
16509  path="$JT_HOME"
16510  has_colon=`$ECHO $path | $GREP ^.:`
16511  new_path="$path"
16512  if test "x$has_colon" = x; then
16513    # Not in mixed or Windows style, start by that.
16514    new_path=`cmd //c echo $path`
16515  fi
16516
16517
16518  input_path="$new_path"
16519  # Check if we need to convert this using DOS-style short mode. If the path
16520  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16521  # take no chances and rewrite it.
16522  # Note: m4 eats our [], so we need to use [ and ] instead.
16523  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16524  if test "x$has_forbidden_chars" != x; then
16525    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16526    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16527  fi
16528
16529
16530  windows_path="$new_path"
16531  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16532    unix_path=`$CYGPATH -u "$windows_path"`
16533    new_path="$unix_path"
16534  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16535    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16536    new_path="$unix_path"
16537  fi
16538
16539  if test "x$path" != "x$new_path"; then
16540    JT_HOME="$new_path"
16541    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
16542$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
16543  fi
16544
16545  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16546  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16547
16548  else
16549    # We're on a posix platform. Hooray! :)
16550    path="$JT_HOME"
16551    has_space=`$ECHO "$path" | $GREP " "`
16552    if test "x$has_space" != x; then
16553      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
16554$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
16555      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16556    fi
16557
16558    # Use eval to expand a potential ~
16559    eval path="$path"
16560    if test ! -f "$path" && test ! -d "$path"; then
16561      as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
16562    fi
16563
16564    JT_HOME="`cd "$path"; $THEPWDCMD -L`"
16565  fi
16566
16567
16568      # jtreg win32 script works for everybody
16569      JTREGEXE="$JT_HOME/win32/bin/jtreg"
16570
16571      if test ! -f "$JTREGEXE"; then
16572        as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
16573      fi
16574
16575      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
16576$as_echo "$JTREGEXE" >&6; }
16577    else
16578      # try to find jtreg on path
16579
16580  for ac_prog in jtreg
16581do
16582  # Extract the first word of "$ac_prog", so it can be a program name with args.
16583set dummy $ac_prog; ac_word=$2
16584{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16585$as_echo_n "checking for $ac_word... " >&6; }
16586if ${ac_cv_path_JTREGEXE+:} false; then :
16587  $as_echo_n "(cached) " >&6
16588else
16589  case $JTREGEXE in
16590  [\\/]* | ?:[\\/]*)
16591  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
16592  ;;
16593  *)
16594  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16595for as_dir in $PATH
16596do
16597  IFS=$as_save_IFS
16598  test -z "$as_dir" && as_dir=.
16599    for ac_exec_ext in '' $ac_executable_extensions; do
16600  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16601    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
16602    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16603    break 2
16604  fi
16605done
16606  done
16607IFS=$as_save_IFS
16608
16609  ;;
16610esac
16611fi
16612JTREGEXE=$ac_cv_path_JTREGEXE
16613if test -n "$JTREGEXE"; then
16614  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
16615$as_echo "$JTREGEXE" >&6; }
16616else
16617  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16618$as_echo "no" >&6; }
16619fi
16620
16621
16622  test -n "$JTREGEXE" && break
16623done
16624
16625
16626  if test "x$JTREGEXE" = x; then
16627    if test "xjtreg" = x; then
16628      PROG_NAME=jtregexe
16629    else
16630      PROG_NAME=jtreg
16631    fi
16632    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
16633$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
16634    as_fn_error $? "Cannot continue" "$LINENO" 5
16635  fi
16636
16637
16638      JT_HOME="`$DIRNAME $JTREGEXE`"
16639    fi
16640  fi
16641
16642
16643
16644
16645
16646  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
16647
16648  # Store path to cygwin link.exe to help excluding it when searching for
16649  # VS linker. This must be done before changing the PATH when looking for VS.
16650  # Extract the first word of "link", so it can be a program name with args.
16651set dummy link; ac_word=$2
16652{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16653$as_echo_n "checking for $ac_word... " >&6; }
16654if ${ac_cv_path_CYGWIN_LINK+:} false; then :
16655  $as_echo_n "(cached) " >&6
16656else
16657  case $CYGWIN_LINK in
16658  [\\/]* | ?:[\\/]*)
16659  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
16660  ;;
16661  *)
16662  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16663for as_dir in $PATH
16664do
16665  IFS=$as_save_IFS
16666  test -z "$as_dir" && as_dir=.
16667    for ac_exec_ext in '' $ac_executable_extensions; do
16668  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16669    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
16670    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16671    break 2
16672  fi
16673done
16674  done
16675IFS=$as_save_IFS
16676
16677  ;;
16678esac
16679fi
16680CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
16681if test -n "$CYGWIN_LINK"; then
16682  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
16683$as_echo "$CYGWIN_LINK" >&6; }
16684else
16685  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16686$as_echo "no" >&6; }
16687fi
16688
16689
16690  if test "x$CYGWIN_LINK" != x; then
16691    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
16692$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
16693    "$CYGWIN_LINK" --version > /dev/null
16694    if test $? -eq 0 ; then
16695      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16696$as_echo "yes" >&6; }
16697    else
16698      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16699$as_echo "no" >&6; }
16700      # This might be the VS linker. Don't exclude it later on.
16701      CYGWIN_LINK=""
16702    fi
16703  fi
16704
16705  # First-hand choice is to locate and run the vsvars bat file.
16706
16707  if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16708    VCVARSFILE="vc/bin/vcvars32.bat"
16709  else
16710    VCVARSFILE="vc/bin/amd64/vcvars64.bat"
16711  fi
16712
16713  VS_ENV_CMD=""
16714  VS_ENV_ARGS=""
16715  if test "x$with_toolsdir" != x; then
16716
16717  if test "x$VS_ENV_CMD" = x; then
16718    VS100BASE="$with_toolsdir/../.."
16719    METHOD="--with-tools-dir"
16720
16721  windows_path="$VS100BASE"
16722  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16723    unix_path=`$CYGPATH -u "$windows_path"`
16724    VS100BASE="$unix_path"
16725  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16726    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16727    VS100BASE="$unix_path"
16728  fi
16729
16730    if test -d "$VS100BASE"; then
16731      if test -f "$VS100BASE/$VCVARSFILE"; then
16732        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16733$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16734        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16735      else
16736        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16737$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16738        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16739$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16740      fi
16741    fi
16742  fi
16743
16744  fi
16745
16746  if test "x$with_toolsdir" != x && test "x$VS_ENV_CMD" = x; then
16747    # Having specified an argument which is incorrect will produce an instant failure;
16748    # we should not go on looking
16749    { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&5
16750$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&6;}
16751    { $as_echo "$as_me:${as_lineno-$LINENO}: Please point to the VC/bin directory within the Visual Studio installation" >&5
16752$as_echo "$as_me: Please point to the VC/bin directory within the Visual Studio installation" >&6;}
16753    as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
16754  fi
16755
16756  if test "x$VS100COMNTOOLS" != x; then
16757
16758  if test "x$VS_ENV_CMD" = x; then
16759    VS100BASE="$VS100COMNTOOLS/../.."
16760    METHOD="VS100COMNTOOLS variable"
16761
16762  windows_path="$VS100BASE"
16763  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16764    unix_path=`$CYGPATH -u "$windows_path"`
16765    VS100BASE="$unix_path"
16766  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16767    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16768    VS100BASE="$unix_path"
16769  fi
16770
16771    if test -d "$VS100BASE"; then
16772      if test -f "$VS100BASE/$VCVARSFILE"; then
16773        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16774$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16775        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16776      else
16777        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16778$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16779        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16780$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16781      fi
16782    fi
16783  fi
16784
16785  fi
16786  if test "x$PROGRAMFILES" != x; then
16787
16788  if test "x$VS_ENV_CMD" = x; then
16789    VS100BASE="$PROGRAMFILES/Microsoft Visual Studio 10.0"
16790    METHOD="well-known name"
16791
16792  windows_path="$VS100BASE"
16793  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16794    unix_path=`$CYGPATH -u "$windows_path"`
16795    VS100BASE="$unix_path"
16796  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16797    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16798    VS100BASE="$unix_path"
16799  fi
16800
16801    if test -d "$VS100BASE"; then
16802      if test -f "$VS100BASE/$VCVARSFILE"; then
16803        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16804$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16805        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16806      else
16807        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16808$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16809        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16810$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16811      fi
16812    fi
16813  fi
16814
16815  fi
16816
16817  if test "x$VS_ENV_CMD" = x; then
16818    VS100BASE="C:/Program Files/Microsoft Visual Studio 10.0"
16819    METHOD="well-known name"
16820
16821  windows_path="$VS100BASE"
16822  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16823    unix_path=`$CYGPATH -u "$windows_path"`
16824    VS100BASE="$unix_path"
16825  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16826    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16827    VS100BASE="$unix_path"
16828  fi
16829
16830    if test -d "$VS100BASE"; then
16831      if test -f "$VS100BASE/$VCVARSFILE"; then
16832        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16833$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16834        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16835      else
16836        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16837$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16838        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16839$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16840      fi
16841    fi
16842  fi
16843
16844
16845  if test "x$VS_ENV_CMD" = x; then
16846    VS100BASE="C:/Program Files (x86)/Microsoft Visual Studio 10.0"
16847    METHOD="well-known name"
16848
16849  windows_path="$VS100BASE"
16850  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16851    unix_path=`$CYGPATH -u "$windows_path"`
16852    VS100BASE="$unix_path"
16853  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16854    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16855    VS100BASE="$unix_path"
16856  fi
16857
16858    if test -d "$VS100BASE"; then
16859      if test -f "$VS100BASE/$VCVARSFILE"; then
16860        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16861$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16862        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16863      else
16864        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16865$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16866        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16867$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16868      fi
16869    fi
16870  fi
16871
16872
16873  if test "x$ProgramW6432" != x; then
16874
16875  if test "x$VS_ENV_CMD" = x; then
16876    WIN_SDK_BASE="$ProgramW6432/Microsoft SDKs/Windows/v7.1/Bin"
16877    METHOD="well-known name"
16878
16879  windows_path="$WIN_SDK_BASE"
16880  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16881    unix_path=`$CYGPATH -u "$windows_path"`
16882    WIN_SDK_BASE="$unix_path"
16883  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16884    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16885    WIN_SDK_BASE="$unix_path"
16886  fi
16887
16888    if test -d "$WIN_SDK_BASE"; then
16889      # There have been cases of partial or broken SDK installations. A missing
16890      # lib dir is not going to work.
16891      if test ! -d "$WIN_SDK_BASE/../lib"; then
16892        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16893$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16894        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16895$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16896      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16897        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16898$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16899        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16900        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16901          VS_ENV_ARGS="/x86"
16902        else
16903          VS_ENV_ARGS="/x64"
16904        fi
16905      else
16906        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16907$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16908        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16909$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16910      fi
16911    fi
16912  fi
16913
16914  fi
16915  if test "x$PROGRAMW6432" != x; then
16916
16917  if test "x$VS_ENV_CMD" = x; then
16918    WIN_SDK_BASE="$PROGRAMW6432/Microsoft SDKs/Windows/v7.1/Bin"
16919    METHOD="well-known name"
16920
16921  windows_path="$WIN_SDK_BASE"
16922  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16923    unix_path=`$CYGPATH -u "$windows_path"`
16924    WIN_SDK_BASE="$unix_path"
16925  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16926    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16927    WIN_SDK_BASE="$unix_path"
16928  fi
16929
16930    if test -d "$WIN_SDK_BASE"; then
16931      # There have been cases of partial or broken SDK installations. A missing
16932      # lib dir is not going to work.
16933      if test ! -d "$WIN_SDK_BASE/../lib"; then
16934        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16935$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16936        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16937$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16938      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16939        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16940$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16941        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16942        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16943          VS_ENV_ARGS="/x86"
16944        else
16945          VS_ENV_ARGS="/x64"
16946        fi
16947      else
16948        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16949$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16950        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16951$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16952      fi
16953    fi
16954  fi
16955
16956  fi
16957  if test "x$PROGRAMFILES" != x; then
16958
16959  if test "x$VS_ENV_CMD" = x; then
16960    WIN_SDK_BASE="$PROGRAMFILES/Microsoft SDKs/Windows/v7.1/Bin"
16961    METHOD="well-known name"
16962
16963  windows_path="$WIN_SDK_BASE"
16964  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16965    unix_path=`$CYGPATH -u "$windows_path"`
16966    WIN_SDK_BASE="$unix_path"
16967  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16968    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16969    WIN_SDK_BASE="$unix_path"
16970  fi
16971
16972    if test -d "$WIN_SDK_BASE"; then
16973      # There have been cases of partial or broken SDK installations. A missing
16974      # lib dir is not going to work.
16975      if test ! -d "$WIN_SDK_BASE/../lib"; then
16976        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16977$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16978        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16979$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16980      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16981        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16982$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16983        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16984        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16985          VS_ENV_ARGS="/x86"
16986        else
16987          VS_ENV_ARGS="/x64"
16988        fi
16989      else
16990        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16991$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16992        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16993$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16994      fi
16995    fi
16996  fi
16997
16998  fi
16999
17000  if test "x$VS_ENV_CMD" = x; then
17001    WIN_SDK_BASE="C:/Program Files/Microsoft SDKs/Windows/v7.1/Bin"
17002    METHOD="well-known name"
17003
17004  windows_path="$WIN_SDK_BASE"
17005  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17006    unix_path=`$CYGPATH -u "$windows_path"`
17007    WIN_SDK_BASE="$unix_path"
17008  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17009    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17010    WIN_SDK_BASE="$unix_path"
17011  fi
17012
17013    if test -d "$WIN_SDK_BASE"; then
17014      # There have been cases of partial or broken SDK installations. A missing
17015      # lib dir is not going to work.
17016      if test ! -d "$WIN_SDK_BASE/../lib"; then
17017        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17018$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17019        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
17020$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
17021      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
17022        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17023$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17024        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
17025        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17026          VS_ENV_ARGS="/x86"
17027        else
17028          VS_ENV_ARGS="/x64"
17029        fi
17030      else
17031        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17032$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17033        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
17034$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
17035      fi
17036    fi
17037  fi
17038
17039
17040  if test "x$VS_ENV_CMD" = x; then
17041    WIN_SDK_BASE="C:/Program Files (x86)/Microsoft SDKs/Windows/v7.1/Bin"
17042    METHOD="well-known name"
17043
17044  windows_path="$WIN_SDK_BASE"
17045  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17046    unix_path=`$CYGPATH -u "$windows_path"`
17047    WIN_SDK_BASE="$unix_path"
17048  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17049    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17050    WIN_SDK_BASE="$unix_path"
17051  fi
17052
17053    if test -d "$WIN_SDK_BASE"; then
17054      # There have been cases of partial or broken SDK installations. A missing
17055      # lib dir is not going to work.
17056      if test ! -d "$WIN_SDK_BASE/../lib"; then
17057        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17058$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17059        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
17060$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
17061      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
17062        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17063$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17064        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
17065        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17066          VS_ENV_ARGS="/x86"
17067        else
17068          VS_ENV_ARGS="/x64"
17069        fi
17070      else
17071        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17072$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17073        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
17074$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
17075      fi
17076    fi
17077  fi
17078
17079
17080  if test "x$VS_ENV_CMD" != x; then
17081    # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
17082
17083  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17084
17085  # First separate the path from the arguments. This will split at the first
17086  # space.
17087  complete="$VS_ENV_CMD"
17088  path="${complete%% *}"
17089  tmp="$complete EOL"
17090  arguments="${tmp#* }"
17091
17092  # Input might be given as Windows format, start by converting to
17093  # unix format.
17094  new_path=`$CYGPATH -u "$path"`
17095
17096  # Now try to locate executable using which
17097  new_path=`$WHICH "$new_path" 2> /dev/null`
17098  # bat and cmd files are not always considered executable in cygwin causing which
17099  # to not find them
17100  if test "x$new_path" = x \
17101      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17102      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17103    new_path=`$CYGPATH -u "$path"`
17104  fi
17105  if test "x$new_path" = x; then
17106    # Oops. Which didn't find the executable.
17107    # The splitting of arguments from the executable at a space might have been incorrect,
17108    # since paths with space are more likely in Windows. Give it another try with the whole
17109    # argument.
17110    path="$complete"
17111    arguments="EOL"
17112    new_path=`$CYGPATH -u "$path"`
17113    new_path=`$WHICH "$new_path" 2> /dev/null`
17114    # bat and cmd files are not always considered executable in cygwin causing which
17115    # to not find them
17116    if test "x$new_path" = x \
17117        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17118        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17119      new_path=`$CYGPATH -u "$path"`
17120    fi
17121    if test "x$new_path" = x; then
17122      # It's still not found. Now this is an unrecoverable error.
17123      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
17124$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
17125      has_space=`$ECHO "$complete" | $GREP " "`
17126      if test "x$has_space" != x; then
17127        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17128$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17129      fi
17130      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
17131    fi
17132  fi
17133
17134  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17135  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17136  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17137  # "foo.exe" is OK but "foo" is an error.
17138  #
17139  # This test is therefore slightly more accurate than "test -f" to check for file presence.
17140  # It is also a way to make sure we got the proper file name for the real test later on.
17141  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17142  if test "x$test_shortpath" = x; then
17143    # Short path failed, file does not exist as specified.
17144    # Try adding .exe or .cmd
17145    if test -f "${new_path}.exe"; then
17146      input_to_shortpath="${new_path}.exe"
17147    elif test -f "${new_path}.cmd"; then
17148      input_to_shortpath="${new_path}.cmd"
17149    else
17150      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
17151$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
17152      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17153$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17154      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
17155    fi
17156  else
17157    input_to_shortpath="$new_path"
17158  fi
17159
17160  # Call helper function which possibly converts this using DOS-style short mode.
17161  # If so, the updated path is stored in $new_path.
17162  new_path="$input_to_shortpath"
17163
17164  input_path="$input_to_shortpath"
17165  # Check if we need to convert this using DOS-style short mode. If the path
17166  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17167  # take no chances and rewrite it.
17168  # Note: m4 eats our [], so we need to use [ and ] instead.
17169  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17170  if test "x$has_forbidden_chars" != x; then
17171    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17172    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17173    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17174    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17175      # Going to short mode and back again did indeed matter. Since short mode is
17176      # case insensitive, let's make it lowercase to improve readability.
17177      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17178      # Now convert it back to Unix-stile (cygpath)
17179      input_path=`$CYGPATH -u "$shortmode_path"`
17180      new_path="$input_path"
17181    fi
17182  fi
17183
17184  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17185  if test "x$test_cygdrive_prefix" = x; then
17186    # As a simple fix, exclude /usr/bin since it's not a real path.
17187    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17188      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17189      # a path prefixed by /cygdrive for fixpath to work.
17190      new_path="$CYGWIN_ROOT_PATH$input_path"
17191    fi
17192  fi
17193
17194  # remove trailing .exe if any
17195  new_path="${new_path/%.exe/}"
17196
17197  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17198
17199  # First separate the path from the arguments. This will split at the first
17200  # space.
17201  complete="$VS_ENV_CMD"
17202  path="${complete%% *}"
17203  tmp="$complete EOL"
17204  arguments="${tmp#* }"
17205
17206  # Input might be given as Windows format, start by converting to
17207  # unix format.
17208  new_path="$path"
17209
17210  windows_path="$new_path"
17211  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17212    unix_path=`$CYGPATH -u "$windows_path"`
17213    new_path="$unix_path"
17214  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17215    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17216    new_path="$unix_path"
17217  fi
17218
17219
17220  # Now try to locate executable using which
17221  new_path=`$WHICH "$new_path" 2> /dev/null`
17222
17223  if test "x$new_path" = x; then
17224    # Oops. Which didn't find the executable.
17225    # The splitting of arguments from the executable at a space might have been incorrect,
17226    # since paths with space are more likely in Windows. Give it another try with the whole
17227    # argument.
17228    path="$complete"
17229    arguments="EOL"
17230    new_path="$path"
17231
17232  windows_path="$new_path"
17233  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17234    unix_path=`$CYGPATH -u "$windows_path"`
17235    new_path="$unix_path"
17236  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17237    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17238    new_path="$unix_path"
17239  fi
17240
17241
17242    new_path=`$WHICH "$new_path" 2> /dev/null`
17243
17244    if test "x$new_path" = x; then
17245      # It's still not found. Now this is an unrecoverable error.
17246      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
17247$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
17248      has_space=`$ECHO "$complete" | $GREP " "`
17249      if test "x$has_space" != x; then
17250        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17251$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17252      fi
17253      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
17254    fi
17255  fi
17256
17257  # Now new_path has a complete unix path to the binary
17258  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17259    # Keep paths in /bin as-is, but remove trailing .exe if any
17260    new_path="${new_path/%.exe/}"
17261    # Do not save /bin paths to all_fixpath_prefixes!
17262  else
17263    # Not in mixed or Windows style, start by that.
17264    new_path=`cmd //c echo $new_path`
17265
17266  input_path="$new_path"
17267  # Check if we need to convert this using DOS-style short mode. If the path
17268  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17269  # take no chances and rewrite it.
17270  # Note: m4 eats our [], so we need to use [ and ] instead.
17271  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17272  if test "x$has_forbidden_chars" != x; then
17273    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17274    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17275  fi
17276
17277    # Output is in $new_path
17278
17279  windows_path="$new_path"
17280  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17281    unix_path=`$CYGPATH -u "$windows_path"`
17282    new_path="$unix_path"
17283  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17284    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17285    new_path="$unix_path"
17286  fi
17287
17288    # remove trailing .exe if any
17289    new_path="${new_path/%.exe/}"
17290
17291    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17292    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17293  fi
17294
17295  else
17296    # We're on a posix platform. Hooray! :)
17297    # First separate the path from the arguments. This will split at the first
17298    # space.
17299    complete="$VS_ENV_CMD"
17300    path="${complete%% *}"
17301    tmp="$complete EOL"
17302    arguments="${tmp#* }"
17303
17304    # Cannot rely on the command "which" here since it doesn't always work.
17305    is_absolute_path=`$ECHO "$path" | $GREP ^/`
17306    if test -z "$is_absolute_path"; then
17307      # Path to executable is not absolute. Find it.
17308      IFS_save="$IFS"
17309      IFS=:
17310      for p in $PATH; do
17311        if test -f "$p/$path" && test -x "$p/$path"; then
17312          new_path="$p/$path"
17313          break
17314        fi
17315      done
17316      IFS="$IFS_save"
17317    else
17318      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&5
17319$as_echo "$as_me: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&6;}
17320      new_path="$path"
17321    fi
17322
17323    if test "x$new_path" = x; then
17324      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
17325$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
17326      has_space=`$ECHO "$complete" | $GREP " "`
17327      if test "x$has_space" != x; then
17328        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17329$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17330      fi
17331      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
17332    fi
17333  fi
17334
17335  # Now join together the path and the arguments once again
17336  if test "x$arguments" != xEOL; then
17337    new_complete="$new_path ${arguments% *}"
17338  else
17339    new_complete="$new_path"
17340  fi
17341
17342  if test "x$complete" != "x$new_complete"; then
17343    VS_ENV_CMD="$new_complete"
17344    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
17345$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
17346  fi
17347
17348
17349    # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
17350    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
17351$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
17352    cd $OUTPUT_ROOT
17353    # FIXME: The code betweeen ---- was inlined from a separate script and is not properly adapted
17354    # to autoconf standards.
17355
17356    #----
17357
17358    # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment)
17359    # but calculate the difference in Cygwin environment before/after running it and then
17360    # apply the diff.
17361
17362    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
17363      _vs10varsall=`cygpath -a -m -s "$VS_ENV_CMD"`
17364      _dosvs10varsall=`cygpath -a -w -s $_vs10varsall`
17365      _dosbash=`cygpath -a -w -s \`which bash\`.*`
17366    else
17367      _dosvs10varsall=`cmd //c echo $VS_ENV_CMD`
17368      _dosbash=`cmd //c echo \`which bash\``
17369    fi
17370
17371    # generate the set of exported vars before/after the vs10 setup
17372    $ECHO "@echo off"                                           >  localdevenvtmp.bat
17373    $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export0" >> localdevenvtmp.bat
17374    $ECHO "call $_dosvs10varsall $VS_ENV_ARGS"                  >> localdevenvtmp.bat
17375    $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export1" >> localdevenvtmp.bat
17376
17377    # Now execute the newly created bat file.
17378    # The | cat is to stop SetEnv.Cmd to mess with system colors on msys
17379    cmd /c localdevenvtmp.bat | cat
17380
17381    # apply the diff (less some non-vs10 vars named by "!")
17382    $SORT localdevenvtmp.export0 | $GREP -v "!" > localdevenvtmp.export0.sort
17383    $SORT localdevenvtmp.export1 | $GREP -v "!" > localdevenvtmp.export1.sort
17384    $COMM -1 -3 localdevenvtmp.export0.sort localdevenvtmp.export1.sort > localdevenv.sh
17385
17386    # cleanup
17387    $RM localdevenvtmp*
17388    #----
17389    cd $CURDIR
17390    if test ! -s $OUTPUT_ROOT/localdevenv.sh; then
17391      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17392$as_echo "no" >&6; }
17393      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
17394$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
17395      { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
17396$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
17397      { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
17398$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
17399      as_fn_error $? "Cannot continue" "$LINENO" 5
17400    fi
17401
17402    # Now set all paths and other env variables. This will allow the rest of
17403    # the configure script to find and run the compiler in the proper way.
17404    { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
17405$as_echo "$as_me: Setting extracted environment variables" >&6;}
17406    . $OUTPUT_ROOT/localdevenv.sh
17407  else
17408    # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
17409    { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
17410$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
17411  fi
17412
17413  # At this point, we should have corrent variables in the environment, or we can't continue.
17414  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
17415$as_echo_n "checking for Visual Studio variables... " >&6; }
17416
17417  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x || test "x$WINDOWSSDKDIR" != x; then
17418    if test "x$INCLUDE" = x || test "x$LIB" = x; then
17419      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
17420$as_echo "present but broken" >&6; }
17421      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
17422    else
17423      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
17424$as_echo "ok" >&6; }
17425      # Remove any trailing \ from INCLUDE and LIB to avoid trouble in spec.gmk.
17426      VS_INCLUDE=`$ECHO "$INCLUDE" | $SED 's/\\\\$//'`
17427      VS_LIB=`$ECHO "$LIB" | $SED 's/\\\\$//'`
17428      # Remove any paths containing # (typically F#) as that messes up make
17429      PATH=`$ECHO "$PATH" | $SED 's/[^:#]*#[^:]*://g'`
17430      VS_PATH="$PATH"
17431
17432
17433
17434    fi
17435  else
17436    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17437$as_echo "not found" >&6; }
17438
17439    if test "x$VS_ENV_CMD" = x; then
17440      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
17441$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
17442      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
17443$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
17444    else
17445      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
17446$as_echo "$as_me: Running the extraction script failed." >&6;}
17447    fi
17448    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
17449$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
17450    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
17451$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
17452    as_fn_error $? "Cannot continue" "$LINENO" 5
17453  fi
17454
17455
17456
17457# Check whether --with-msvcr-dll was given.
17458if test "${with_msvcr_dll+set}" = set; then :
17459  withval=$with_msvcr_dll;
17460fi
17461
17462
17463  if test "x$with_msvcr_dll" != x; then
17464    # If given explicitely by user, do not probe. If not present, fail directly.
17465
17466  POSSIBLE_MSVCR_DLL="$with_msvcr_dll"
17467  METHOD="--with-msvcr-dll"
17468  if test -e "$POSSIBLE_MSVCR_DLL"; then
17469    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
17470$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
17471
17472    # Need to check if the found msvcr is correct architecture
17473    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
17474$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
17475    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
17476    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17477      CORRECT_MSVCR_ARCH=386
17478    else
17479      CORRECT_MSVCR_ARCH=x86-64
17480    fi
17481    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
17482      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
17483$as_echo "ok" >&6; }
17484      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17485      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
17486$as_echo_n "checking for msvcr100.dll... " >&6; }
17487      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
17488$as_echo "$MSVCR_DLL" >&6; }
17489    else
17490      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
17491$as_echo "incorrect, ignoring" >&6; }
17492      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
17493$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
17494    fi
17495  fi
17496
17497    if test "x$MSVCR_DLL" = x; then
17498      as_fn_error $? "Could not find a proper msvcr100.dll as specified by --with-msvcr-dll" "$LINENO" 5
17499    fi
17500  fi
17501
17502  if test "x$MSVCR_DLL" = x; then
17503    # Probe: Using well-known location from Visual Studio 10.0
17504    if test "x$VCINSTALLDIR" != x; then
17505      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
17506
17507  windows_path="$CYGWIN_VC_INSTALL_DIR"
17508  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17509    unix_path=`$CYGPATH -u "$windows_path"`
17510    CYGWIN_VC_INSTALL_DIR="$unix_path"
17511  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17512    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17513    CYGWIN_VC_INSTALL_DIR="$unix_path"
17514  fi
17515
17516      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
17517        POSSIBLE_MSVCR_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC100.CRT/msvcr100.dll"
17518      else
17519        POSSIBLE_MSVCR_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC100.CRT/msvcr100.dll"
17520      fi
17521
17522  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17523  METHOD="well-known location in VCINSTALLDIR"
17524  if test -e "$POSSIBLE_MSVCR_DLL"; then
17525    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
17526$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
17527
17528    # Need to check if the found msvcr is correct architecture
17529    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
17530$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
17531    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
17532    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17533      CORRECT_MSVCR_ARCH=386
17534    else
17535      CORRECT_MSVCR_ARCH=x86-64
17536    fi
17537    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
17538      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
17539$as_echo "ok" >&6; }
17540      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17541      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
17542$as_echo_n "checking for msvcr100.dll... " >&6; }
17543      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
17544$as_echo "$MSVCR_DLL" >&6; }
17545    else
17546      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
17547$as_echo "incorrect, ignoring" >&6; }
17548      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
17549$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
17550    fi
17551  fi
17552
17553    fi
17554  fi
17555
17556  if test "x$MSVCR_DLL" = x; then
17557    # Probe: Check in the Boot JDK directory.
17558    POSSIBLE_MSVCR_DLL="$BOOT_JDK/bin/msvcr100.dll"
17559
17560  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17561  METHOD="well-known location in Boot JDK"
17562  if test -e "$POSSIBLE_MSVCR_DLL"; then
17563    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
17564$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
17565
17566    # Need to check if the found msvcr is correct architecture
17567    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
17568$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
17569    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
17570    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17571      CORRECT_MSVCR_ARCH=386
17572    else
17573      CORRECT_MSVCR_ARCH=x86-64
17574    fi
17575    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
17576      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
17577$as_echo "ok" >&6; }
17578      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17579      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
17580$as_echo_n "checking for msvcr100.dll... " >&6; }
17581      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
17582$as_echo "$MSVCR_DLL" >&6; }
17583    else
17584      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
17585$as_echo "incorrect, ignoring" >&6; }
17586      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
17587$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
17588    fi
17589  fi
17590
17591  fi
17592
17593  if test "x$MSVCR_DLL" = x; then
17594    # Probe: Look in the Windows system32 directory
17595    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
17596
17597  windows_path="$CYGWIN_SYSTEMROOT"
17598  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17599    unix_path=`$CYGPATH -u "$windows_path"`
17600    CYGWIN_SYSTEMROOT="$unix_path"
17601  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17602    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17603    CYGWIN_SYSTEMROOT="$unix_path"
17604  fi
17605
17606    POSSIBLE_MSVCR_DLL="$CYGWIN_SYSTEMROOT/system32/msvcr100.dll"
17607
17608  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17609  METHOD="well-known location in SYSTEMROOT"
17610  if test -e "$POSSIBLE_MSVCR_DLL"; then
17611    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
17612$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
17613
17614    # Need to check if the found msvcr is correct architecture
17615    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
17616$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
17617    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
17618    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17619      CORRECT_MSVCR_ARCH=386
17620    else
17621      CORRECT_MSVCR_ARCH=x86-64
17622    fi
17623    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
17624      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
17625$as_echo "ok" >&6; }
17626      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17627      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
17628$as_echo_n "checking for msvcr100.dll... " >&6; }
17629      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
17630$as_echo "$MSVCR_DLL" >&6; }
17631    else
17632      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
17633$as_echo "incorrect, ignoring" >&6; }
17634      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
17635$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
17636    fi
17637  fi
17638
17639  fi
17640
17641  if test "x$MSVCR_DLL" = x; then
17642    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
17643    if test "x$VS100COMNTOOLS" != x; then
17644      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
17645
17646  windows_path="$CYGWIN_VS_TOOLS_DIR"
17647  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17648    unix_path=`$CYGPATH -u "$windows_path"`
17649    CYGWIN_VS_TOOLS_DIR="$unix_path"
17650  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17651    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17652    CYGWIN_VS_TOOLS_DIR="$unix_path"
17653  fi
17654
17655      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
17656        POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name msvcr100.dll | $GREP -i /x64/ | $HEAD --lines 1`
17657      else
17658        POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name msvcr100.dll | $GREP -i /x86/ | $HEAD --lines 1`
17659      fi
17660
17661  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17662  METHOD="search of VS100COMNTOOLS"
17663  if test -e "$POSSIBLE_MSVCR_DLL"; then
17664    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
17665$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
17666
17667    # Need to check if the found msvcr is correct architecture
17668    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
17669$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
17670    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
17671    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17672      CORRECT_MSVCR_ARCH=386
17673    else
17674      CORRECT_MSVCR_ARCH=x86-64
17675    fi
17676    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
17677      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
17678$as_echo "ok" >&6; }
17679      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17680      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
17681$as_echo_n "checking for msvcr100.dll... " >&6; }
17682      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
17683$as_echo "$MSVCR_DLL" >&6; }
17684    else
17685      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
17686$as_echo "incorrect, ignoring" >&6; }
17687      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
17688$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
17689    fi
17690  fi
17691
17692    fi
17693  fi
17694
17695  if test "x$MSVCR_DLL" = x; then
17696    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
17697    # (This was the original behaviour; kept since it might turn up something)
17698    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
17699      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
17700        POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $GREP x64 | $HEAD --lines 1`
17701      else
17702        POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
17703        if test "x$POSSIBLE_MSVCR_DLL" = x; then
17704          # We're grasping at straws now...
17705          POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $HEAD --lines 1`
17706        fi
17707      fi
17708
17709
17710  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17711  METHOD="search of VCINSTALLDIR"
17712  if test -e "$POSSIBLE_MSVCR_DLL"; then
17713    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
17714$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
17715
17716    # Need to check if the found msvcr is correct architecture
17717    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
17718$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
17719    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
17720    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17721      CORRECT_MSVCR_ARCH=386
17722    else
17723      CORRECT_MSVCR_ARCH=x86-64
17724    fi
17725    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
17726      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
17727$as_echo "ok" >&6; }
17728      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17729      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
17730$as_echo_n "checking for msvcr100.dll... " >&6; }
17731      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
17732$as_echo "$MSVCR_DLL" >&6; }
17733    else
17734      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
17735$as_echo "incorrect, ignoring" >&6; }
17736      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
17737$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
17738    fi
17739  fi
17740
17741    fi
17742  fi
17743
17744  if test "x$MSVCR_DLL" = x; then
17745    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
17746$as_echo_n "checking for msvcr100.dll... " >&6; }
17747    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17748$as_echo "no" >&6; }
17749    as_fn_error $? "Could not find msvcr100.dll. Please specify using --with-msvcr-dll." "$LINENO" 5
17750  fi
17751
17752
17753  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17754
17755  # Input might be given as Windows format, start by converting to
17756  # unix format.
17757  path="$MSVCR_DLL"
17758  new_path=`$CYGPATH -u "$path"`
17759
17760  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17761  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17762  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17763  # "foo.exe" is OK but "foo" is an error.
17764  #
17765  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17766  # It is also a way to make sure we got the proper file name for the real test later on.
17767  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17768  if test "x$test_shortpath" = x; then
17769    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
17770$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
17771    as_fn_error $? "Cannot locate the the path of MSVCR_DLL" "$LINENO" 5
17772  fi
17773
17774  # Call helper function which possibly converts this using DOS-style short mode.
17775  # If so, the updated path is stored in $new_path.
17776
17777  input_path="$new_path"
17778  # Check if we need to convert this using DOS-style short mode. If the path
17779  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17780  # take no chances and rewrite it.
17781  # Note: m4 eats our [], so we need to use [ and ] instead.
17782  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17783  if test "x$has_forbidden_chars" != x; then
17784    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17785    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17786    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17787    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17788      # Going to short mode and back again did indeed matter. Since short mode is
17789      # case insensitive, let's make it lowercase to improve readability.
17790      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17791      # Now convert it back to Unix-stile (cygpath)
17792      input_path=`$CYGPATH -u "$shortmode_path"`
17793      new_path="$input_path"
17794    fi
17795  fi
17796
17797  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17798  if test "x$test_cygdrive_prefix" = x; then
17799    # As a simple fix, exclude /usr/bin since it's not a real path.
17800    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17801      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17802      # a path prefixed by /cygdrive for fixpath to work.
17803      new_path="$CYGWIN_ROOT_PATH$input_path"
17804    fi
17805  fi
17806
17807
17808  if test "x$path" != "x$new_path"; then
17809    MSVCR_DLL="$new_path"
17810    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
17811$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
17812  fi
17813
17814  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17815
17816  path="$MSVCR_DLL"
17817  has_colon=`$ECHO $path | $GREP ^.:`
17818  new_path="$path"
17819  if test "x$has_colon" = x; then
17820    # Not in mixed or Windows style, start by that.
17821    new_path=`cmd //c echo $path`
17822  fi
17823
17824
17825  input_path="$new_path"
17826  # Check if we need to convert this using DOS-style short mode. If the path
17827  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17828  # take no chances and rewrite it.
17829  # Note: m4 eats our [], so we need to use [ and ] instead.
17830  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17831  if test "x$has_forbidden_chars" != x; then
17832    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17833    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17834  fi
17835
17836
17837  windows_path="$new_path"
17838  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17839    unix_path=`$CYGPATH -u "$windows_path"`
17840    new_path="$unix_path"
17841  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17842    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17843    new_path="$unix_path"
17844  fi
17845
17846  if test "x$path" != "x$new_path"; then
17847    MSVCR_DLL="$new_path"
17848    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
17849$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
17850  fi
17851
17852  # Save the first 10 bytes of this path to the storage, so fixpath can work.
17853  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17854
17855  else
17856    # We're on a posix platform. Hooray! :)
17857    path="$MSVCR_DLL"
17858    has_space=`$ECHO "$path" | $GREP " "`
17859    if test "x$has_space" != x; then
17860      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
17861$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
17862      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17863    fi
17864
17865    # Use eval to expand a potential ~
17866    eval path="$path"
17867    if test ! -f "$path" && test ! -d "$path"; then
17868      as_fn_error $? "The path of MSVCR_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
17869    fi
17870
17871    MSVCR_DLL="`cd "$path"; $THEPWDCMD -L`"
17872  fi
17873
17874
17875
17876
17877# Check whether --with-dxsdk was given.
17878if test "${with_dxsdk+set}" = set; then :
17879  withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
17880$as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
17881fi
17882
17883
17884
17885
17886# Check whether --with-dxsdk-lib was given.
17887if test "${with_dxsdk_lib+set}" = set; then :
17888  withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
17889$as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
17890fi
17891
17892
17893
17894
17895# Check whether --with-dxsdk-include was given.
17896if test "${with_dxsdk_include+set}" = set; then :
17897  withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
17898$as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
17899fi
17900
17901
17902  fi
17903
17904
17905
17906  # If --build AND --host is set, then the configure script will find any
17907  # cross compilation tools in the PATH. Cross compilation tools
17908  # follows the cross compilation standard where they are prefixed with ${host}.
17909  # For example the binary i686-sun-solaris2.10-gcc
17910  # will cross compile for i686-sun-solaris2.10
17911  # If neither of build and host is not set, then build=host and the
17912  # default compiler found in the path will be used.
17913  # Setting only --host, does not seem to be really supported.
17914  # Please set both --build and --host if you want to cross compile.
17915
17916  if test "x$COMPILE_TYPE" = "xcross"; then
17917    # Now we to find a C/C++ compiler that can build executables for the build
17918    # platform. We can't use the AC_PROG_CC macro, since it can only be used
17919    # once. Also, we need to do this before adding a tools dir to the path,
17920    # otherwise we might pick up cross-compilers which don't use standard naming.
17921    # Otherwise, we'll set the BUILD_tools to the native tools, but that'll have
17922    # to wait until they are properly discovered.
17923    for ac_prog in cl cc gcc
17924do
17925  # Extract the first word of "$ac_prog", so it can be a program name with args.
17926set dummy $ac_prog; ac_word=$2
17927{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17928$as_echo_n "checking for $ac_word... " >&6; }
17929if ${ac_cv_path_BUILD_CC+:} false; then :
17930  $as_echo_n "(cached) " >&6
17931else
17932  case $BUILD_CC in
17933  [\\/]* | ?:[\\/]*)
17934  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
17935  ;;
17936  *)
17937  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17938for as_dir in $PATH
17939do
17940  IFS=$as_save_IFS
17941  test -z "$as_dir" && as_dir=.
17942    for ac_exec_ext in '' $ac_executable_extensions; do
17943  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17944    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
17945    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17946    break 2
17947  fi
17948done
17949  done
17950IFS=$as_save_IFS
17951
17952  ;;
17953esac
17954fi
17955BUILD_CC=$ac_cv_path_BUILD_CC
17956if test -n "$BUILD_CC"; then
17957  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
17958$as_echo "$BUILD_CC" >&6; }
17959else
17960  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17961$as_echo "no" >&6; }
17962fi
17963
17964
17965  test -n "$BUILD_CC" && break
17966done
17967
17968
17969  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17970
17971  # First separate the path from the arguments. This will split at the first
17972  # space.
17973  complete="$BUILD_CC"
17974  path="${complete%% *}"
17975  tmp="$complete EOL"
17976  arguments="${tmp#* }"
17977
17978  # Input might be given as Windows format, start by converting to
17979  # unix format.
17980  new_path=`$CYGPATH -u "$path"`
17981
17982  # Now try to locate executable using which
17983  new_path=`$WHICH "$new_path" 2> /dev/null`
17984  # bat and cmd files are not always considered executable in cygwin causing which
17985  # to not find them
17986  if test "x$new_path" = x \
17987      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17988      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17989    new_path=`$CYGPATH -u "$path"`
17990  fi
17991  if test "x$new_path" = x; then
17992    # Oops. Which didn't find the executable.
17993    # The splitting of arguments from the executable at a space might have been incorrect,
17994    # since paths with space are more likely in Windows. Give it another try with the whole
17995    # argument.
17996    path="$complete"
17997    arguments="EOL"
17998    new_path=`$CYGPATH -u "$path"`
17999    new_path=`$WHICH "$new_path" 2> /dev/null`
18000    # bat and cmd files are not always considered executable in cygwin causing which
18001    # to not find them
18002    if test "x$new_path" = x \
18003        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18004        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18005      new_path=`$CYGPATH -u "$path"`
18006    fi
18007    if test "x$new_path" = x; then
18008      # It's still not found. Now this is an unrecoverable error.
18009      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
18010$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
18011      has_space=`$ECHO "$complete" | $GREP " "`
18012      if test "x$has_space" != x; then
18013        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18014$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18015      fi
18016      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
18017    fi
18018  fi
18019
18020  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18021  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18022  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18023  # "foo.exe" is OK but "foo" is an error.
18024  #
18025  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18026  # It is also a way to make sure we got the proper file name for the real test later on.
18027  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18028  if test "x$test_shortpath" = x; then
18029    # Short path failed, file does not exist as specified.
18030    # Try adding .exe or .cmd
18031    if test -f "${new_path}.exe"; then
18032      input_to_shortpath="${new_path}.exe"
18033    elif test -f "${new_path}.cmd"; then
18034      input_to_shortpath="${new_path}.cmd"
18035    else
18036      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
18037$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
18038      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18039$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18040      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
18041    fi
18042  else
18043    input_to_shortpath="$new_path"
18044  fi
18045
18046  # Call helper function which possibly converts this using DOS-style short mode.
18047  # If so, the updated path is stored in $new_path.
18048  new_path="$input_to_shortpath"
18049
18050  input_path="$input_to_shortpath"
18051  # Check if we need to convert this using DOS-style short mode. If the path
18052  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18053  # take no chances and rewrite it.
18054  # Note: m4 eats our [], so we need to use [ and ] instead.
18055  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18056  if test "x$has_forbidden_chars" != x; then
18057    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18058    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18059    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18060    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18061      # Going to short mode and back again did indeed matter. Since short mode is
18062      # case insensitive, let's make it lowercase to improve readability.
18063      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18064      # Now convert it back to Unix-stile (cygpath)
18065      input_path=`$CYGPATH -u "$shortmode_path"`
18066      new_path="$input_path"
18067    fi
18068  fi
18069
18070  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18071  if test "x$test_cygdrive_prefix" = x; then
18072    # As a simple fix, exclude /usr/bin since it's not a real path.
18073    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18074      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18075      # a path prefixed by /cygdrive for fixpath to work.
18076      new_path="$CYGWIN_ROOT_PATH$input_path"
18077    fi
18078  fi
18079
18080  # remove trailing .exe if any
18081  new_path="${new_path/%.exe/}"
18082
18083  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18084
18085  # First separate the path from the arguments. This will split at the first
18086  # space.
18087  complete="$BUILD_CC"
18088  path="${complete%% *}"
18089  tmp="$complete EOL"
18090  arguments="${tmp#* }"
18091
18092  # Input might be given as Windows format, start by converting to
18093  # unix format.
18094  new_path="$path"
18095
18096  windows_path="$new_path"
18097  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18098    unix_path=`$CYGPATH -u "$windows_path"`
18099    new_path="$unix_path"
18100  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18101    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18102    new_path="$unix_path"
18103  fi
18104
18105
18106  # Now try to locate executable using which
18107  new_path=`$WHICH "$new_path" 2> /dev/null`
18108
18109  if test "x$new_path" = x; then
18110    # Oops. Which didn't find the executable.
18111    # The splitting of arguments from the executable at a space might have been incorrect,
18112    # since paths with space are more likely in Windows. Give it another try with the whole
18113    # argument.
18114    path="$complete"
18115    arguments="EOL"
18116    new_path="$path"
18117
18118  windows_path="$new_path"
18119  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18120    unix_path=`$CYGPATH -u "$windows_path"`
18121    new_path="$unix_path"
18122  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18123    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18124    new_path="$unix_path"
18125  fi
18126
18127
18128    new_path=`$WHICH "$new_path" 2> /dev/null`
18129
18130    if test "x$new_path" = x; then
18131      # It's still not found. Now this is an unrecoverable error.
18132      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
18133$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
18134      has_space=`$ECHO "$complete" | $GREP " "`
18135      if test "x$has_space" != x; then
18136        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18137$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18138      fi
18139      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
18140    fi
18141  fi
18142
18143  # Now new_path has a complete unix path to the binary
18144  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18145    # Keep paths in /bin as-is, but remove trailing .exe if any
18146    new_path="${new_path/%.exe/}"
18147    # Do not save /bin paths to all_fixpath_prefixes!
18148  else
18149    # Not in mixed or Windows style, start by that.
18150    new_path=`cmd //c echo $new_path`
18151
18152  input_path="$new_path"
18153  # Check if we need to convert this using DOS-style short mode. If the path
18154  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18155  # take no chances and rewrite it.
18156  # Note: m4 eats our [], so we need to use [ and ] instead.
18157  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18158  if test "x$has_forbidden_chars" != x; then
18159    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18160    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18161  fi
18162
18163    # Output is in $new_path
18164
18165  windows_path="$new_path"
18166  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18167    unix_path=`$CYGPATH -u "$windows_path"`
18168    new_path="$unix_path"
18169  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18170    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18171    new_path="$unix_path"
18172  fi
18173
18174    # remove trailing .exe if any
18175    new_path="${new_path/%.exe/}"
18176
18177    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18178    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18179  fi
18180
18181  else
18182    # We're on a posix platform. Hooray! :)
18183    # First separate the path from the arguments. This will split at the first
18184    # space.
18185    complete="$BUILD_CC"
18186    path="${complete%% *}"
18187    tmp="$complete EOL"
18188    arguments="${tmp#* }"
18189
18190    # Cannot rely on the command "which" here since it doesn't always work.
18191    is_absolute_path=`$ECHO "$path" | $GREP ^/`
18192    if test -z "$is_absolute_path"; then
18193      # Path to executable is not absolute. Find it.
18194      IFS_save="$IFS"
18195      IFS=:
18196      for p in $PATH; do
18197        if test -f "$p/$path" && test -x "$p/$path"; then
18198          new_path="$p/$path"
18199          break
18200        fi
18201      done
18202      IFS="$IFS_save"
18203    else
18204      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CC (as $path) failed, using $path directly." >&5
18205$as_echo "$as_me: Resolving BUILD_CC (as $path) failed, using $path directly." >&6;}
18206      new_path="$path"
18207    fi
18208
18209    if test "x$new_path" = x; then
18210      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
18211$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
18212      has_space=`$ECHO "$complete" | $GREP " "`
18213      if test "x$has_space" != x; then
18214        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18215$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18216      fi
18217      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
18218    fi
18219  fi
18220
18221  # Now join together the path and the arguments once again
18222  if test "x$arguments" != xEOL; then
18223    new_complete="$new_path ${arguments% *}"
18224  else
18225    new_complete="$new_path"
18226  fi
18227
18228  if test "x$complete" != "x$new_complete"; then
18229    BUILD_CC="$new_complete"
18230    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
18231$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
18232  fi
18233
18234    for ac_prog in cl CC g++
18235do
18236  # Extract the first word of "$ac_prog", so it can be a program name with args.
18237set dummy $ac_prog; ac_word=$2
18238{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18239$as_echo_n "checking for $ac_word... " >&6; }
18240if ${ac_cv_path_BUILD_CXX+:} false; then :
18241  $as_echo_n "(cached) " >&6
18242else
18243  case $BUILD_CXX in
18244  [\\/]* | ?:[\\/]*)
18245  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
18246  ;;
18247  *)
18248  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18249for as_dir in $PATH
18250do
18251  IFS=$as_save_IFS
18252  test -z "$as_dir" && as_dir=.
18253    for ac_exec_ext in '' $ac_executable_extensions; do
18254  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18255    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
18256    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18257    break 2
18258  fi
18259done
18260  done
18261IFS=$as_save_IFS
18262
18263  ;;
18264esac
18265fi
18266BUILD_CXX=$ac_cv_path_BUILD_CXX
18267if test -n "$BUILD_CXX"; then
18268  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
18269$as_echo "$BUILD_CXX" >&6; }
18270else
18271  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18272$as_echo "no" >&6; }
18273fi
18274
18275
18276  test -n "$BUILD_CXX" && break
18277done
18278
18279
18280  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18281
18282  # First separate the path from the arguments. This will split at the first
18283  # space.
18284  complete="$BUILD_CXX"
18285  path="${complete%% *}"
18286  tmp="$complete EOL"
18287  arguments="${tmp#* }"
18288
18289  # Input might be given as Windows format, start by converting to
18290  # unix format.
18291  new_path=`$CYGPATH -u "$path"`
18292
18293  # Now try to locate executable using which
18294  new_path=`$WHICH "$new_path" 2> /dev/null`
18295  # bat and cmd files are not always considered executable in cygwin causing which
18296  # to not find them
18297  if test "x$new_path" = x \
18298      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18299      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18300    new_path=`$CYGPATH -u "$path"`
18301  fi
18302  if test "x$new_path" = x; then
18303    # Oops. Which didn't find the executable.
18304    # The splitting of arguments from the executable at a space might have been incorrect,
18305    # since paths with space are more likely in Windows. Give it another try with the whole
18306    # argument.
18307    path="$complete"
18308    arguments="EOL"
18309    new_path=`$CYGPATH -u "$path"`
18310    new_path=`$WHICH "$new_path" 2> /dev/null`
18311    # bat and cmd files are not always considered executable in cygwin causing which
18312    # to not find them
18313    if test "x$new_path" = x \
18314        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18315        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18316      new_path=`$CYGPATH -u "$path"`
18317    fi
18318    if test "x$new_path" = x; then
18319      # It's still not found. Now this is an unrecoverable error.
18320      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
18321$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
18322      has_space=`$ECHO "$complete" | $GREP " "`
18323      if test "x$has_space" != x; then
18324        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18325$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18326      fi
18327      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18328    fi
18329  fi
18330
18331  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18332  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18333  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18334  # "foo.exe" is OK but "foo" is an error.
18335  #
18336  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18337  # It is also a way to make sure we got the proper file name for the real test later on.
18338  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18339  if test "x$test_shortpath" = x; then
18340    # Short path failed, file does not exist as specified.
18341    # Try adding .exe or .cmd
18342    if test -f "${new_path}.exe"; then
18343      input_to_shortpath="${new_path}.exe"
18344    elif test -f "${new_path}.cmd"; then
18345      input_to_shortpath="${new_path}.cmd"
18346    else
18347      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
18348$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
18349      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18350$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18351      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18352    fi
18353  else
18354    input_to_shortpath="$new_path"
18355  fi
18356
18357  # Call helper function which possibly converts this using DOS-style short mode.
18358  # If so, the updated path is stored in $new_path.
18359  new_path="$input_to_shortpath"
18360
18361  input_path="$input_to_shortpath"
18362  # Check if we need to convert this using DOS-style short mode. If the path
18363  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18364  # take no chances and rewrite it.
18365  # Note: m4 eats our [], so we need to use [ and ] instead.
18366  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18367  if test "x$has_forbidden_chars" != x; then
18368    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18369    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18370    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18371    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18372      # Going to short mode and back again did indeed matter. Since short mode is
18373      # case insensitive, let's make it lowercase to improve readability.
18374      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18375      # Now convert it back to Unix-stile (cygpath)
18376      input_path=`$CYGPATH -u "$shortmode_path"`
18377      new_path="$input_path"
18378    fi
18379  fi
18380
18381  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18382  if test "x$test_cygdrive_prefix" = x; then
18383    # As a simple fix, exclude /usr/bin since it's not a real path.
18384    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18385      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18386      # a path prefixed by /cygdrive for fixpath to work.
18387      new_path="$CYGWIN_ROOT_PATH$input_path"
18388    fi
18389  fi
18390
18391  # remove trailing .exe if any
18392  new_path="${new_path/%.exe/}"
18393
18394  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18395
18396  # First separate the path from the arguments. This will split at the first
18397  # space.
18398  complete="$BUILD_CXX"
18399  path="${complete%% *}"
18400  tmp="$complete EOL"
18401  arguments="${tmp#* }"
18402
18403  # Input might be given as Windows format, start by converting to
18404  # unix format.
18405  new_path="$path"
18406
18407  windows_path="$new_path"
18408  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18409    unix_path=`$CYGPATH -u "$windows_path"`
18410    new_path="$unix_path"
18411  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18412    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18413    new_path="$unix_path"
18414  fi
18415
18416
18417  # Now try to locate executable using which
18418  new_path=`$WHICH "$new_path" 2> /dev/null`
18419
18420  if test "x$new_path" = x; then
18421    # Oops. Which didn't find the executable.
18422    # The splitting of arguments from the executable at a space might have been incorrect,
18423    # since paths with space are more likely in Windows. Give it another try with the whole
18424    # argument.
18425    path="$complete"
18426    arguments="EOL"
18427    new_path="$path"
18428
18429  windows_path="$new_path"
18430  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18431    unix_path=`$CYGPATH -u "$windows_path"`
18432    new_path="$unix_path"
18433  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18434    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18435    new_path="$unix_path"
18436  fi
18437
18438
18439    new_path=`$WHICH "$new_path" 2> /dev/null`
18440
18441    if test "x$new_path" = x; then
18442      # It's still not found. Now this is an unrecoverable error.
18443      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
18444$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
18445      has_space=`$ECHO "$complete" | $GREP " "`
18446      if test "x$has_space" != x; then
18447        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18448$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18449      fi
18450      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18451    fi
18452  fi
18453
18454  # Now new_path has a complete unix path to the binary
18455  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18456    # Keep paths in /bin as-is, but remove trailing .exe if any
18457    new_path="${new_path/%.exe/}"
18458    # Do not save /bin paths to all_fixpath_prefixes!
18459  else
18460    # Not in mixed or Windows style, start by that.
18461    new_path=`cmd //c echo $new_path`
18462
18463  input_path="$new_path"
18464  # Check if we need to convert this using DOS-style short mode. If the path
18465  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18466  # take no chances and rewrite it.
18467  # Note: m4 eats our [], so we need to use [ and ] instead.
18468  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18469  if test "x$has_forbidden_chars" != x; then
18470    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18471    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18472  fi
18473
18474    # Output is in $new_path
18475
18476  windows_path="$new_path"
18477  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18478    unix_path=`$CYGPATH -u "$windows_path"`
18479    new_path="$unix_path"
18480  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18481    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18482    new_path="$unix_path"
18483  fi
18484
18485    # remove trailing .exe if any
18486    new_path="${new_path/%.exe/}"
18487
18488    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18489    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18490  fi
18491
18492  else
18493    # We're on a posix platform. Hooray! :)
18494    # First separate the path from the arguments. This will split at the first
18495    # space.
18496    complete="$BUILD_CXX"
18497    path="${complete%% *}"
18498    tmp="$complete EOL"
18499    arguments="${tmp#* }"
18500
18501    # Cannot rely on the command "which" here since it doesn't always work.
18502    is_absolute_path=`$ECHO "$path" | $GREP ^/`
18503    if test -z "$is_absolute_path"; then
18504      # Path to executable is not absolute. Find it.
18505      IFS_save="$IFS"
18506      IFS=:
18507      for p in $PATH; do
18508        if test -f "$p/$path" && test -x "$p/$path"; then
18509          new_path="$p/$path"
18510          break
18511        fi
18512      done
18513      IFS="$IFS_save"
18514    else
18515      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CXX (as $path) failed, using $path directly." >&5
18516$as_echo "$as_me: Resolving BUILD_CXX (as $path) failed, using $path directly." >&6;}
18517      new_path="$path"
18518    fi
18519
18520    if test "x$new_path" = x; then
18521      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
18522$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
18523      has_space=`$ECHO "$complete" | $GREP " "`
18524      if test "x$has_space" != x; then
18525        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18526$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18527      fi
18528      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18529    fi
18530  fi
18531
18532  # Now join together the path and the arguments once again
18533  if test "x$arguments" != xEOL; then
18534    new_complete="$new_path ${arguments% *}"
18535  else
18536    new_complete="$new_path"
18537  fi
18538
18539  if test "x$complete" != "x$new_complete"; then
18540    BUILD_CXX="$new_complete"
18541    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
18542$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
18543  fi
18544
18545    # Extract the first word of "ld", so it can be a program name with args.
18546set dummy ld; ac_word=$2
18547{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18548$as_echo_n "checking for $ac_word... " >&6; }
18549if ${ac_cv_path_BUILD_LD+:} false; then :
18550  $as_echo_n "(cached) " >&6
18551else
18552  case $BUILD_LD in
18553  [\\/]* | ?:[\\/]*)
18554  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
18555  ;;
18556  *)
18557  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18558for as_dir in $PATH
18559do
18560  IFS=$as_save_IFS
18561  test -z "$as_dir" && as_dir=.
18562    for ac_exec_ext in '' $ac_executable_extensions; do
18563  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18564    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
18565    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18566    break 2
18567  fi
18568done
18569  done
18570IFS=$as_save_IFS
18571
18572  ;;
18573esac
18574fi
18575BUILD_LD=$ac_cv_path_BUILD_LD
18576if test -n "$BUILD_LD"; then
18577  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
18578$as_echo "$BUILD_LD" >&6; }
18579else
18580  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18581$as_echo "no" >&6; }
18582fi
18583
18584
18585
18586  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18587
18588  # First separate the path from the arguments. This will split at the first
18589  # space.
18590  complete="$BUILD_LD"
18591  path="${complete%% *}"
18592  tmp="$complete EOL"
18593  arguments="${tmp#* }"
18594
18595  # Input might be given as Windows format, start by converting to
18596  # unix format.
18597  new_path=`$CYGPATH -u "$path"`
18598
18599  # Now try to locate executable using which
18600  new_path=`$WHICH "$new_path" 2> /dev/null`
18601  # bat and cmd files are not always considered executable in cygwin causing which
18602  # to not find them
18603  if test "x$new_path" = x \
18604      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18605      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18606    new_path=`$CYGPATH -u "$path"`
18607  fi
18608  if test "x$new_path" = x; then
18609    # Oops. Which didn't find the executable.
18610    # The splitting of arguments from the executable at a space might have been incorrect,
18611    # since paths with space are more likely in Windows. Give it another try with the whole
18612    # argument.
18613    path="$complete"
18614    arguments="EOL"
18615    new_path=`$CYGPATH -u "$path"`
18616    new_path=`$WHICH "$new_path" 2> /dev/null`
18617    # bat and cmd files are not always considered executable in cygwin causing which
18618    # to not find them
18619    if test "x$new_path" = x \
18620        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18621        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18622      new_path=`$CYGPATH -u "$path"`
18623    fi
18624    if test "x$new_path" = x; then
18625      # It's still not found. Now this is an unrecoverable error.
18626      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
18627$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
18628      has_space=`$ECHO "$complete" | $GREP " "`
18629      if test "x$has_space" != x; then
18630        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18631$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18632      fi
18633      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18634    fi
18635  fi
18636
18637  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18638  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18639  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18640  # "foo.exe" is OK but "foo" is an error.
18641  #
18642  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18643  # It is also a way to make sure we got the proper file name for the real test later on.
18644  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18645  if test "x$test_shortpath" = x; then
18646    # Short path failed, file does not exist as specified.
18647    # Try adding .exe or .cmd
18648    if test -f "${new_path}.exe"; then
18649      input_to_shortpath="${new_path}.exe"
18650    elif test -f "${new_path}.cmd"; then
18651      input_to_shortpath="${new_path}.cmd"
18652    else
18653      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&5
18654$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&6;}
18655      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18656$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18657      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18658    fi
18659  else
18660    input_to_shortpath="$new_path"
18661  fi
18662
18663  # Call helper function which possibly converts this using DOS-style short mode.
18664  # If so, the updated path is stored in $new_path.
18665  new_path="$input_to_shortpath"
18666
18667  input_path="$input_to_shortpath"
18668  # Check if we need to convert this using DOS-style short mode. If the path
18669  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18670  # take no chances and rewrite it.
18671  # Note: m4 eats our [], so we need to use [ and ] instead.
18672  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18673  if test "x$has_forbidden_chars" != x; then
18674    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18675    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18676    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18677    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18678      # Going to short mode and back again did indeed matter. Since short mode is
18679      # case insensitive, let's make it lowercase to improve readability.
18680      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18681      # Now convert it back to Unix-stile (cygpath)
18682      input_path=`$CYGPATH -u "$shortmode_path"`
18683      new_path="$input_path"
18684    fi
18685  fi
18686
18687  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18688  if test "x$test_cygdrive_prefix" = x; then
18689    # As a simple fix, exclude /usr/bin since it's not a real path.
18690    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18691      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18692      # a path prefixed by /cygdrive for fixpath to work.
18693      new_path="$CYGWIN_ROOT_PATH$input_path"
18694    fi
18695  fi
18696
18697  # remove trailing .exe if any
18698  new_path="${new_path/%.exe/}"
18699
18700  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18701
18702  # First separate the path from the arguments. This will split at the first
18703  # space.
18704  complete="$BUILD_LD"
18705  path="${complete%% *}"
18706  tmp="$complete EOL"
18707  arguments="${tmp#* }"
18708
18709  # Input might be given as Windows format, start by converting to
18710  # unix format.
18711  new_path="$path"
18712
18713  windows_path="$new_path"
18714  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18715    unix_path=`$CYGPATH -u "$windows_path"`
18716    new_path="$unix_path"
18717  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18718    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18719    new_path="$unix_path"
18720  fi
18721
18722
18723  # Now try to locate executable using which
18724  new_path=`$WHICH "$new_path" 2> /dev/null`
18725
18726  if test "x$new_path" = x; then
18727    # Oops. Which didn't find the executable.
18728    # The splitting of arguments from the executable at a space might have been incorrect,
18729    # since paths with space are more likely in Windows. Give it another try with the whole
18730    # argument.
18731    path="$complete"
18732    arguments="EOL"
18733    new_path="$path"
18734
18735  windows_path="$new_path"
18736  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18737    unix_path=`$CYGPATH -u "$windows_path"`
18738    new_path="$unix_path"
18739  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18740    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18741    new_path="$unix_path"
18742  fi
18743
18744
18745    new_path=`$WHICH "$new_path" 2> /dev/null`
18746
18747    if test "x$new_path" = x; then
18748      # It's still not found. Now this is an unrecoverable error.
18749      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
18750$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
18751      has_space=`$ECHO "$complete" | $GREP " "`
18752      if test "x$has_space" != x; then
18753        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18754$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18755      fi
18756      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18757    fi
18758  fi
18759
18760  # Now new_path has a complete unix path to the binary
18761  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18762    # Keep paths in /bin as-is, but remove trailing .exe if any
18763    new_path="${new_path/%.exe/}"
18764    # Do not save /bin paths to all_fixpath_prefixes!
18765  else
18766    # Not in mixed or Windows style, start by that.
18767    new_path=`cmd //c echo $new_path`
18768
18769  input_path="$new_path"
18770  # Check if we need to convert this using DOS-style short mode. If the path
18771  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18772  # take no chances and rewrite it.
18773  # Note: m4 eats our [], so we need to use [ and ] instead.
18774  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18775  if test "x$has_forbidden_chars" != x; then
18776    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18777    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18778  fi
18779
18780    # Output is in $new_path
18781
18782  windows_path="$new_path"
18783  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18784    unix_path=`$CYGPATH -u "$windows_path"`
18785    new_path="$unix_path"
18786  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18787    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18788    new_path="$unix_path"
18789  fi
18790
18791    # remove trailing .exe if any
18792    new_path="${new_path/%.exe/}"
18793
18794    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18795    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18796  fi
18797
18798  else
18799    # We're on a posix platform. Hooray! :)
18800    # First separate the path from the arguments. This will split at the first
18801    # space.
18802    complete="$BUILD_LD"
18803    path="${complete%% *}"
18804    tmp="$complete EOL"
18805    arguments="${tmp#* }"
18806
18807    # Cannot rely on the command "which" here since it doesn't always work.
18808    is_absolute_path=`$ECHO "$path" | $GREP ^/`
18809    if test -z "$is_absolute_path"; then
18810      # Path to executable is not absolute. Find it.
18811      IFS_save="$IFS"
18812      IFS=:
18813      for p in $PATH; do
18814        if test -f "$p/$path" && test -x "$p/$path"; then
18815          new_path="$p/$path"
18816          break
18817        fi
18818      done
18819      IFS="$IFS_save"
18820    else
18821      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_LD (as $path) failed, using $path directly." >&5
18822$as_echo "$as_me: Resolving BUILD_LD (as $path) failed, using $path directly." >&6;}
18823      new_path="$path"
18824    fi
18825
18826    if test "x$new_path" = x; then
18827      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
18828$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
18829      has_space=`$ECHO "$complete" | $GREP " "`
18830      if test "x$has_space" != x; then
18831        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18832$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18833      fi
18834      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18835    fi
18836  fi
18837
18838  # Now join together the path and the arguments once again
18839  if test "x$arguments" != xEOL; then
18840    new_complete="$new_path ${arguments% *}"
18841  else
18842    new_complete="$new_path"
18843  fi
18844
18845  if test "x$complete" != "x$new_complete"; then
18846    BUILD_LD="$new_complete"
18847    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_LD to \"$new_complete\"" >&5
18848$as_echo "$as_me: Rewriting BUILD_LD to \"$new_complete\"" >&6;}
18849  fi
18850
18851  fi
18852
18853
18854
18855
18856  # If a devkit is found on the builddeps server, then prepend its path to the
18857  # PATH variable. If there are cross compilers available in the devkit, these
18858  # will be found by AC_PROG_CC et al.
18859  DEVKIT=
18860
18861
18862  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
18863    # Source the builddeps file again, to make sure it uses the latest variables!
18864    . $builddepsfile
18865    # Look for a target and build machine specific resource!
18866    eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
18867    if test "x$resource" = x; then
18868      # Ok, lets instead look for a target specific resource
18869      eval resource=\${builddep_devkit_TARGET_${rewritten_target_var}}
18870    fi
18871    if test "x$resource" = x; then
18872      # Ok, lets instead look for a build specific resource
18873      eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}}
18874    fi
18875    if test "x$resource" = x; then
18876      # Ok, lets instead look for a generic resource
18877      # (The devkit comes from M4 and not the shell, thus no need for eval here.)
18878      resource=${builddep_devkit}
18879    fi
18880    if test "x$resource" != x; then
18881      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for devkit" >&5
18882$as_echo "$as_me: Using builddeps $resource for devkit" >&6;}
18883      # If the resource in the builddeps.conf file is an existing directory,
18884      # for example /java/linux/cups
18885      if test -d ${resource}; then
18886        depdir=${resource}
18887      else
18888
18889  # devkit is for example mymodule
18890  # $resource is for example libs/general/libmymod_1_2_3.zip
18891  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
18892  # $with_builddeps_dir is for example /localhome/builddeps
18893  # depdir is the name of the variable into which we store the depdir, eg MYMOD
18894  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
18895  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
18896  filename=`basename $resource`
18897  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
18898  filebase=${filename%%.*}
18899  extension=${filename#*.}
18900  installdir=$with_builddeps_dir/$filebase
18901  if test ! -f $installdir/$filename.unpacked; then
18902    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&5
18903$as_echo "$as_me: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&6;}
18904    if test ! -d $installdir; then
18905      mkdir -p $installdir
18906    fi
18907    if test ! -d $installdir; then
18908      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
18909    fi
18910    tmpfile=`mktemp $installdir/devkit.XXXXXXXXX`
18911    touch $tmpfile
18912    if test ! -f $tmpfile; then
18913      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
18914    fi
18915
18916  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
18917  # $tmpfile is the local file name for the downloaded file.
18918  VALID_TOOL=no
18919  if test "x$BDEPS_FTP" = xwget; then
18920    VALID_TOOL=yes
18921    wget -O $tmpfile $with_builddeps_server/$resource
18922  fi
18923  if test "x$BDEPS_FTP" = xlftp; then
18924    VALID_TOOL=yes
18925    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
18926  fi
18927  if test "x$BDEPS_FTP" = xftp; then
18928    VALID_TOOL=yes
18929    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
18930    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
18931    FTPUSERPWD=${FTPSERVER%%@*}
18932    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
18933      FTPUSER=${userpwd%%:*}
18934      FTPPWD=${userpwd#*@}
18935      FTPSERVER=${FTPSERVER#*@}
18936    else
18937      FTPUSER=ftp
18938      FTPPWD=ftp
18939    fi
18940    # the "pass" command does not work on some
18941    # ftp clients (read ftp.exe) but if it works,
18942    # passive mode is better!
18943    ( \
18944        echo "user $FTPUSER $FTPPWD"        ; \
18945        echo "pass"                         ; \
18946        echo "bin"                          ; \
18947        echo "get $FTPPATH $tmpfile"              ; \
18948    ) | ftp -in $FTPSERVER
18949  fi
18950  if test "x$VALID_TOOL" != xyes; then
18951    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
18952  fi
18953
18954    mv $tmpfile $installdir/$filename
18955    if test ! -s $installdir/$filename; then
18956      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
18957    fi
18958    case "$extension" in
18959      zip)  echo "Unzipping $installdir/$filename..."
18960        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
18961        ;;
18962      tar.gz) echo "Untaring $installdir/$filename..."
18963        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
18964        ;;
18965      tgz) echo "Untaring $installdir/$filename..."
18966        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
18967        ;;
18968      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
18969        ;;
18970    esac
18971  fi
18972  if test -f $installdir/$filename.unpacked; then
18973    depdir=$installdir
18974  fi
18975
18976      fi
18977      # Source the builddeps file again, because in the previous command, the depdir
18978      # was updated to point at the current build dependency install directory.
18979      . $builddepsfile
18980      # Now extract variables from the builddeps.conf files.
18981      theroot=${builddep_devkit_ROOT}
18982      thecflags=${builddep_devkit_CFLAGS}
18983      thelibs=${builddep_devkit_LIBS}
18984      if test "x$depdir" = x; then
18985        as_fn_error $? "Could not download build dependency devkit" "$LINENO" 5
18986      fi
18987      DEVKIT=$depdir
18988      if test "x$theroot" != x; then
18989        DEVKIT="$theroot"
18990      fi
18991      if test "x$thecflags" != x; then
18992        DEVKIT_CFLAGS="$thecflags"
18993      fi
18994      if test "x$thelibs" != x; then
18995        DEVKIT_LIBS="$thelibs"
18996      fi
18997
18998        # Found devkit
18999        PATH="$DEVKIT/bin:$PATH"
19000        SYS_ROOT="$DEVKIT/${rewritten_target}/sys-root"
19001        if test "x$x_includes" = "xNONE"; then
19002          x_includes="$SYS_ROOT/usr/include/X11"
19003        fi
19004        if test "x$x_libraries" = "xNONE"; then
19005          x_libraries="$SYS_ROOT/usr/lib"
19006        fi
19007
19008
19009    fi
19010
19011  fi
19012
19013
19014  # Store the CFLAGS etal passed to the configure script.
19015  ORG_CFLAGS="$CFLAGS"
19016  ORG_CXXFLAGS="$CXXFLAGS"
19017  ORG_OBJCFLAGS="$OBJCFLAGS"
19018
19019  # autoconf magic only relies on PATH, so update it if tools dir is specified
19020  OLD_PATH="$PATH"
19021  if test "x$TOOLS_DIR" != x; then
19022    PATH=$TOOLS_DIR:$PATH
19023  fi
19024
19025
19026  ### Locate C compiler (CC)
19027
19028  # On windows, only cl.exe is supported.
19029  # On Solaris, cc is preferred to gcc.
19030  # Elsewhere, gcc is preferred to cc.
19031
19032  if test "x$CC" != x; then
19033    COMPILER_CHECK_LIST="$CC"
19034  elif test "x$OPENJDK_TARGET_OS" = "xwindows"; then
19035    COMPILER_CHECK_LIST="cl"
19036  elif test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
19037    COMPILER_CHECK_LIST="cc gcc"
19038  else
19039    COMPILER_CHECK_LIST="gcc cc"
19040  fi
19041
19042
19043  COMPILER_NAME=C
19044
19045  CC=
19046  # If TOOLS_DIR is set, check for all compiler names in there first
19047  # before checking the rest of the PATH.
19048  if test -n "$TOOLS_DIR"; then
19049    PATH_save="$PATH"
19050    PATH="$TOOLS_DIR"
19051    for ac_prog in $COMPILER_CHECK_LIST
19052do
19053  # Extract the first word of "$ac_prog", so it can be a program name with args.
19054set dummy $ac_prog; ac_word=$2
19055{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19056$as_echo_n "checking for $ac_word... " >&6; }
19057if ${ac_cv_path_TOOLS_DIR_CC+:} false; then :
19058  $as_echo_n "(cached) " >&6
19059else
19060  case $TOOLS_DIR_CC in
19061  [\\/]* | ?:[\\/]*)
19062  ac_cv_path_TOOLS_DIR_CC="$TOOLS_DIR_CC" # Let the user override the test with a path.
19063  ;;
19064  *)
19065  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19066for as_dir in $PATH
19067do
19068  IFS=$as_save_IFS
19069  test -z "$as_dir" && as_dir=.
19070    for ac_exec_ext in '' $ac_executable_extensions; do
19071  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19072    ac_cv_path_TOOLS_DIR_CC="$as_dir/$ac_word$ac_exec_ext"
19073    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19074    break 2
19075  fi
19076done
19077  done
19078IFS=$as_save_IFS
19079
19080  ;;
19081esac
19082fi
19083TOOLS_DIR_CC=$ac_cv_path_TOOLS_DIR_CC
19084if test -n "$TOOLS_DIR_CC"; then
19085  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CC" >&5
19086$as_echo "$TOOLS_DIR_CC" >&6; }
19087else
19088  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19089$as_echo "no" >&6; }
19090fi
19091
19092
19093  test -n "$TOOLS_DIR_CC" && break
19094done
19095
19096    CC=$TOOLS_DIR_CC
19097    PATH="$PATH_save"
19098  fi
19099
19100  # AC_PATH_PROGS can't be run multiple times with the same variable,
19101  # so create a new name for this run.
19102  if test "x$CC" = x; then
19103    for ac_prog in $COMPILER_CHECK_LIST
19104do
19105  # Extract the first word of "$ac_prog", so it can be a program name with args.
19106set dummy $ac_prog; ac_word=$2
19107{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19108$as_echo_n "checking for $ac_word... " >&6; }
19109if ${ac_cv_path_POTENTIAL_CC+:} false; then :
19110  $as_echo_n "(cached) " >&6
19111else
19112  case $POTENTIAL_CC in
19113  [\\/]* | ?:[\\/]*)
19114  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
19115  ;;
19116  *)
19117  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19118for as_dir in $PATH
19119do
19120  IFS=$as_save_IFS
19121  test -z "$as_dir" && as_dir=.
19122    for ac_exec_ext in '' $ac_executable_extensions; do
19123  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19124    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
19125    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19126    break 2
19127  fi
19128done
19129  done
19130IFS=$as_save_IFS
19131
19132  ;;
19133esac
19134fi
19135POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
19136if test -n "$POTENTIAL_CC"; then
19137  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
19138$as_echo "$POTENTIAL_CC" >&6; }
19139else
19140  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19141$as_echo "no" >&6; }
19142fi
19143
19144
19145  test -n "$POTENTIAL_CC" && break
19146done
19147
19148    CC=$POTENTIAL_CC
19149  fi
19150
19151  if test "x$CC" = x; then
19152
19153  # Print a helpful message on how to acquire the necessary build dependency.
19154  # devkit is the help tag: freetyp2, cups, pulse, alsa etc
19155  MISSING_DEPENDENCY=devkit
19156
19157  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19158    cygwin_help $MISSING_DEPENDENCY
19159  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19160    msys_help $MISSING_DEPENDENCY
19161  else
19162    PKGHANDLER_COMMAND=
19163
19164    case $PKGHANDLER in
19165      apt-get)
19166        apt_help     $MISSING_DEPENDENCY ;;
19167      yum)
19168        yum_help     $MISSING_DEPENDENCY ;;
19169      port)
19170        port_help    $MISSING_DEPENDENCY ;;
19171      pkgutil)
19172        pkgutil_help $MISSING_DEPENDENCY ;;
19173      pkgadd)
19174        pkgadd_help  $MISSING_DEPENDENCY ;;
19175      * )
19176        break ;;
19177    esac
19178
19179    if test "x$PKGHANDLER_COMMAND" != x; then
19180      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
19181    fi
19182  fi
19183
19184    as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
19185  fi
19186
19187  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19188
19189  # First separate the path from the arguments. This will split at the first
19190  # space.
19191  complete="$CC"
19192  path="${complete%% *}"
19193  tmp="$complete EOL"
19194  arguments="${tmp#* }"
19195
19196  # Input might be given as Windows format, start by converting to
19197  # unix format.
19198  new_path=`$CYGPATH -u "$path"`
19199
19200  # Now try to locate executable using which
19201  new_path=`$WHICH "$new_path" 2> /dev/null`
19202  # bat and cmd files are not always considered executable in cygwin causing which
19203  # to not find them
19204  if test "x$new_path" = x \
19205      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19206      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19207    new_path=`$CYGPATH -u "$path"`
19208  fi
19209  if test "x$new_path" = x; then
19210    # Oops. Which didn't find the executable.
19211    # The splitting of arguments from the executable at a space might have been incorrect,
19212    # since paths with space are more likely in Windows. Give it another try with the whole
19213    # argument.
19214    path="$complete"
19215    arguments="EOL"
19216    new_path=`$CYGPATH -u "$path"`
19217    new_path=`$WHICH "$new_path" 2> /dev/null`
19218    # bat and cmd files are not always considered executable in cygwin causing which
19219    # to not find them
19220    if test "x$new_path" = x \
19221        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19222        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19223      new_path=`$CYGPATH -u "$path"`
19224    fi
19225    if test "x$new_path" = x; then
19226      # It's still not found. Now this is an unrecoverable error.
19227      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
19228$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
19229      has_space=`$ECHO "$complete" | $GREP " "`
19230      if test "x$has_space" != x; then
19231        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19232$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19233      fi
19234      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
19235    fi
19236  fi
19237
19238  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19239  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19240  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19241  # "foo.exe" is OK but "foo" is an error.
19242  #
19243  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19244  # It is also a way to make sure we got the proper file name for the real test later on.
19245  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19246  if test "x$test_shortpath" = x; then
19247    # Short path failed, file does not exist as specified.
19248    # Try adding .exe or .cmd
19249    if test -f "${new_path}.exe"; then
19250      input_to_shortpath="${new_path}.exe"
19251    elif test -f "${new_path}.cmd"; then
19252      input_to_shortpath="${new_path}.cmd"
19253    else
19254      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
19255$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
19256      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19257$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19258      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
19259    fi
19260  else
19261    input_to_shortpath="$new_path"
19262  fi
19263
19264  # Call helper function which possibly converts this using DOS-style short mode.
19265  # If so, the updated path is stored in $new_path.
19266  new_path="$input_to_shortpath"
19267
19268  input_path="$input_to_shortpath"
19269  # Check if we need to convert this using DOS-style short mode. If the path
19270  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19271  # take no chances and rewrite it.
19272  # Note: m4 eats our [], so we need to use [ and ] instead.
19273  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19274  if test "x$has_forbidden_chars" != x; then
19275    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19276    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19277    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19278    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19279      # Going to short mode and back again did indeed matter. Since short mode is
19280      # case insensitive, let's make it lowercase to improve readability.
19281      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19282      # Now convert it back to Unix-stile (cygpath)
19283      input_path=`$CYGPATH -u "$shortmode_path"`
19284      new_path="$input_path"
19285    fi
19286  fi
19287
19288  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19289  if test "x$test_cygdrive_prefix" = x; then
19290    # As a simple fix, exclude /usr/bin since it's not a real path.
19291    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19292      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19293      # a path prefixed by /cygdrive for fixpath to work.
19294      new_path="$CYGWIN_ROOT_PATH$input_path"
19295    fi
19296  fi
19297
19298  # remove trailing .exe if any
19299  new_path="${new_path/%.exe/}"
19300
19301  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19302
19303  # First separate the path from the arguments. This will split at the first
19304  # space.
19305  complete="$CC"
19306  path="${complete%% *}"
19307  tmp="$complete EOL"
19308  arguments="${tmp#* }"
19309
19310  # Input might be given as Windows format, start by converting to
19311  # unix format.
19312  new_path="$path"
19313
19314  windows_path="$new_path"
19315  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19316    unix_path=`$CYGPATH -u "$windows_path"`
19317    new_path="$unix_path"
19318  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19319    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19320    new_path="$unix_path"
19321  fi
19322
19323
19324  # Now try to locate executable using which
19325  new_path=`$WHICH "$new_path" 2> /dev/null`
19326
19327  if test "x$new_path" = x; then
19328    # Oops. Which didn't find the executable.
19329    # The splitting of arguments from the executable at a space might have been incorrect,
19330    # since paths with space are more likely in Windows. Give it another try with the whole
19331    # argument.
19332    path="$complete"
19333    arguments="EOL"
19334    new_path="$path"
19335
19336  windows_path="$new_path"
19337  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19338    unix_path=`$CYGPATH -u "$windows_path"`
19339    new_path="$unix_path"
19340  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19341    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19342    new_path="$unix_path"
19343  fi
19344
19345
19346    new_path=`$WHICH "$new_path" 2> /dev/null`
19347
19348    if test "x$new_path" = x; then
19349      # It's still not found. Now this is an unrecoverable error.
19350      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
19351$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
19352      has_space=`$ECHO "$complete" | $GREP " "`
19353      if test "x$has_space" != x; then
19354        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19355$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19356      fi
19357      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
19358    fi
19359  fi
19360
19361  # Now new_path has a complete unix path to the binary
19362  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19363    # Keep paths in /bin as-is, but remove trailing .exe if any
19364    new_path="${new_path/%.exe/}"
19365    # Do not save /bin paths to all_fixpath_prefixes!
19366  else
19367    # Not in mixed or Windows style, start by that.
19368    new_path=`cmd //c echo $new_path`
19369
19370  input_path="$new_path"
19371  # Check if we need to convert this using DOS-style short mode. If the path
19372  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19373  # take no chances and rewrite it.
19374  # Note: m4 eats our [], so we need to use [ and ] instead.
19375  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19376  if test "x$has_forbidden_chars" != x; then
19377    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19378    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19379  fi
19380
19381    # Output is in $new_path
19382
19383  windows_path="$new_path"
19384  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19385    unix_path=`$CYGPATH -u "$windows_path"`
19386    new_path="$unix_path"
19387  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19388    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19389    new_path="$unix_path"
19390  fi
19391
19392    # remove trailing .exe if any
19393    new_path="${new_path/%.exe/}"
19394
19395    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19396    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19397  fi
19398
19399  else
19400    # We're on a posix platform. Hooray! :)
19401    # First separate the path from the arguments. This will split at the first
19402    # space.
19403    complete="$CC"
19404    path="${complete%% *}"
19405    tmp="$complete EOL"
19406    arguments="${tmp#* }"
19407
19408    # Cannot rely on the command "which" here since it doesn't always work.
19409    is_absolute_path=`$ECHO "$path" | $GREP ^/`
19410    if test -z "$is_absolute_path"; then
19411      # Path to executable is not absolute. Find it.
19412      IFS_save="$IFS"
19413      IFS=:
19414      for p in $PATH; do
19415        if test -f "$p/$path" && test -x "$p/$path"; then
19416          new_path="$p/$path"
19417          break
19418        fi
19419      done
19420      IFS="$IFS_save"
19421    else
19422      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CC (as $path) failed, using $path directly." >&5
19423$as_echo "$as_me: Resolving CC (as $path) failed, using $path directly." >&6;}
19424      new_path="$path"
19425    fi
19426
19427    if test "x$new_path" = x; then
19428      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
19429$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
19430      has_space=`$ECHO "$complete" | $GREP " "`
19431      if test "x$has_space" != x; then
19432        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19433$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19434      fi
19435      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
19436    fi
19437  fi
19438
19439  # Now join together the path and the arguments once again
19440  if test "x$arguments" != xEOL; then
19441    new_complete="$new_path ${arguments% *}"
19442  else
19443    new_complete="$new_path"
19444  fi
19445
19446  if test "x$complete" != "x$new_complete"; then
19447    CC="$new_complete"
19448    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
19449$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
19450  fi
19451
19452  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
19453$as_echo_n "checking resolved symbolic links for CC... " >&6; }
19454  TEST_COMPILER="$CC"
19455
19456  if test "x$OPENJDK_BUILD_OS" != xwindows; then
19457    # Follow a chain of symbolic links. Use readlink
19458    # where it exists, else fall back to horribly
19459    # complicated shell code.
19460    if test "x$READLINK_TESTED" != yes; then
19461      # On MacOSX there is a readlink tool with a different
19462      # purpose than the GNU readlink tool. Check the found readlink.
19463      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
19464      if test "x$ISGNU" = x; then
19465        # A readlink that we do not know how to use.
19466        # Are there other non-GNU readlinks out there?
19467        READLINK_TESTED=yes
19468        READLINK=
19469      fi
19470    fi
19471
19472    if test "x$READLINK" != x; then
19473      TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
19474    else
19475      # Save the current directory for restoring afterwards
19476      STARTDIR=$PWD
19477      COUNTER=0
19478      sym_link_dir=`$DIRNAME $TEST_COMPILER`
19479      sym_link_file=`$BASENAME $TEST_COMPILER`
19480      cd $sym_link_dir
19481      # Use -P flag to resolve symlinks in directories.
19482      cd `$THEPWDCMD -P`
19483      sym_link_dir=`$THEPWDCMD -P`
19484      # Resolve file symlinks
19485      while test $COUNTER -lt 20; do
19486        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
19487        if test "x$ISLINK" == x; then
19488          # This is not a symbolic link! We are done!
19489          break
19490        fi
19491        # Again resolve directory symlinks since the target of the just found
19492        # link could be in a different directory
19493        cd `$DIRNAME $ISLINK`
19494        sym_link_dir=`$THEPWDCMD -P`
19495        sym_link_file=`$BASENAME $ISLINK`
19496        let COUNTER=COUNTER+1
19497      done
19498      cd $STARTDIR
19499      TEST_COMPILER=$sym_link_dir/$sym_link_file
19500    fi
19501  fi
19502
19503  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
19504$as_echo "$TEST_COMPILER" >&6; }
19505  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
19506$as_echo_n "checking if CC is disguised ccache... " >&6; }
19507
19508  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
19509  if test "x$COMPILER_BASENAME" = "xccache"; then
19510    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
19511$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
19512    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
19513    # We want to control ccache invocation ourselves, so ignore this cc and try
19514    # searching again.
19515
19516    # Remove the path to the fake ccache cc from the PATH
19517    RETRY_COMPILER_SAVED_PATH="$PATH"
19518    COMPILER_DIRNAME=`$DIRNAME $CC`
19519    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
19520
19521    # Try again looking for our compiler
19522    if test -n "$ac_tool_prefix"; then
19523  for ac_prog in $COMPILER_CHECK_LIST
19524  do
19525    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
19526set dummy $ac_tool_prefix$ac_prog; ac_word=$2
19527{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19528$as_echo_n "checking for $ac_word... " >&6; }
19529if ${ac_cv_prog_PROPER_COMPILER_CC+:} false; then :
19530  $as_echo_n "(cached) " >&6
19531else
19532  if test -n "$PROPER_COMPILER_CC"; then
19533  ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
19534else
19535as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19536for as_dir in $PATH
19537do
19538  IFS=$as_save_IFS
19539  test -z "$as_dir" && as_dir=.
19540    for ac_exec_ext in '' $ac_executable_extensions; do
19541  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19542    ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
19543    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19544    break 2
19545  fi
19546done
19547  done
19548IFS=$as_save_IFS
19549
19550fi
19551fi
19552PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
19553if test -n "$PROPER_COMPILER_CC"; then
19554  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
19555$as_echo "$PROPER_COMPILER_CC" >&6; }
19556else
19557  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19558$as_echo "no" >&6; }
19559fi
19560
19561
19562    test -n "$PROPER_COMPILER_CC" && break
19563  done
19564fi
19565if test -z "$PROPER_COMPILER_CC"; then
19566  ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
19567  for ac_prog in $COMPILER_CHECK_LIST
19568do
19569  # Extract the first word of "$ac_prog", so it can be a program name with args.
19570set dummy $ac_prog; ac_word=$2
19571{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19572$as_echo_n "checking for $ac_word... " >&6; }
19573if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+:} false; then :
19574  $as_echo_n "(cached) " >&6
19575else
19576  if test -n "$ac_ct_PROPER_COMPILER_CC"; then
19577  ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
19578else
19579as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19580for as_dir in $PATH
19581do
19582  IFS=$as_save_IFS
19583  test -z "$as_dir" && as_dir=.
19584    for ac_exec_ext in '' $ac_executable_extensions; do
19585  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19586    ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
19587    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19588    break 2
19589  fi
19590done
19591  done
19592IFS=$as_save_IFS
19593
19594fi
19595fi
19596ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
19597if test -n "$ac_ct_PROPER_COMPILER_CC"; then
19598  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
19599$as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
19600else
19601  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19602$as_echo "no" >&6; }
19603fi
19604
19605
19606  test -n "$ac_ct_PROPER_COMPILER_CC" && break
19607done
19608
19609  if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
19610    PROPER_COMPILER_CC=""
19611  else
19612    case $cross_compiling:$ac_tool_warned in
19613yes:)
19614{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19615$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19616ac_tool_warned=yes ;;
19617esac
19618    PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
19619  fi
19620fi
19621
19622
19623  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19624
19625  # First separate the path from the arguments. This will split at the first
19626  # space.
19627  complete="$PROPER_COMPILER_CC"
19628  path="${complete%% *}"
19629  tmp="$complete EOL"
19630  arguments="${tmp#* }"
19631
19632  # Input might be given as Windows format, start by converting to
19633  # unix format.
19634  new_path=`$CYGPATH -u "$path"`
19635
19636  # Now try to locate executable using which
19637  new_path=`$WHICH "$new_path" 2> /dev/null`
19638  # bat and cmd files are not always considered executable in cygwin causing which
19639  # to not find them
19640  if test "x$new_path" = x \
19641      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19642      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19643    new_path=`$CYGPATH -u "$path"`
19644  fi
19645  if test "x$new_path" = x; then
19646    # Oops. Which didn't find the executable.
19647    # The splitting of arguments from the executable at a space might have been incorrect,
19648    # since paths with space are more likely in Windows. Give it another try with the whole
19649    # argument.
19650    path="$complete"
19651    arguments="EOL"
19652    new_path=`$CYGPATH -u "$path"`
19653    new_path=`$WHICH "$new_path" 2> /dev/null`
19654    # bat and cmd files are not always considered executable in cygwin causing which
19655    # to not find them
19656    if test "x$new_path" = x \
19657        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19658        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19659      new_path=`$CYGPATH -u "$path"`
19660    fi
19661    if test "x$new_path" = x; then
19662      # It's still not found. Now this is an unrecoverable error.
19663      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
19664$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
19665      has_space=`$ECHO "$complete" | $GREP " "`
19666      if test "x$has_space" != x; then
19667        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19668$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19669      fi
19670      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19671    fi
19672  fi
19673
19674  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19675  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19676  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19677  # "foo.exe" is OK but "foo" is an error.
19678  #
19679  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19680  # It is also a way to make sure we got the proper file name for the real test later on.
19681  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19682  if test "x$test_shortpath" = x; then
19683    # Short path failed, file does not exist as specified.
19684    # Try adding .exe or .cmd
19685    if test -f "${new_path}.exe"; then
19686      input_to_shortpath="${new_path}.exe"
19687    elif test -f "${new_path}.cmd"; then
19688      input_to_shortpath="${new_path}.cmd"
19689    else
19690      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
19691$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
19692      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19693$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19694      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19695    fi
19696  else
19697    input_to_shortpath="$new_path"
19698  fi
19699
19700  # Call helper function which possibly converts this using DOS-style short mode.
19701  # If so, the updated path is stored in $new_path.
19702  new_path="$input_to_shortpath"
19703
19704  input_path="$input_to_shortpath"
19705  # Check if we need to convert this using DOS-style short mode. If the path
19706  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19707  # take no chances and rewrite it.
19708  # Note: m4 eats our [], so we need to use [ and ] instead.
19709  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19710  if test "x$has_forbidden_chars" != x; then
19711    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19712    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19713    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19714    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19715      # Going to short mode and back again did indeed matter. Since short mode is
19716      # case insensitive, let's make it lowercase to improve readability.
19717      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19718      # Now convert it back to Unix-stile (cygpath)
19719      input_path=`$CYGPATH -u "$shortmode_path"`
19720      new_path="$input_path"
19721    fi
19722  fi
19723
19724  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19725  if test "x$test_cygdrive_prefix" = x; then
19726    # As a simple fix, exclude /usr/bin since it's not a real path.
19727    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19728      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19729      # a path prefixed by /cygdrive for fixpath to work.
19730      new_path="$CYGWIN_ROOT_PATH$input_path"
19731    fi
19732  fi
19733
19734  # remove trailing .exe if any
19735  new_path="${new_path/%.exe/}"
19736
19737  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19738
19739  # First separate the path from the arguments. This will split at the first
19740  # space.
19741  complete="$PROPER_COMPILER_CC"
19742  path="${complete%% *}"
19743  tmp="$complete EOL"
19744  arguments="${tmp#* }"
19745
19746  # Input might be given as Windows format, start by converting to
19747  # unix format.
19748  new_path="$path"
19749
19750  windows_path="$new_path"
19751  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19752    unix_path=`$CYGPATH -u "$windows_path"`
19753    new_path="$unix_path"
19754  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19755    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19756    new_path="$unix_path"
19757  fi
19758
19759
19760  # Now try to locate executable using which
19761  new_path=`$WHICH "$new_path" 2> /dev/null`
19762
19763  if test "x$new_path" = x; then
19764    # Oops. Which didn't find the executable.
19765    # The splitting of arguments from the executable at a space might have been incorrect,
19766    # since paths with space are more likely in Windows. Give it another try with the whole
19767    # argument.
19768    path="$complete"
19769    arguments="EOL"
19770    new_path="$path"
19771
19772  windows_path="$new_path"
19773  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19774    unix_path=`$CYGPATH -u "$windows_path"`
19775    new_path="$unix_path"
19776  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19777    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19778    new_path="$unix_path"
19779  fi
19780
19781
19782    new_path=`$WHICH "$new_path" 2> /dev/null`
19783
19784    if test "x$new_path" = x; then
19785      # It's still not found. Now this is an unrecoverable error.
19786      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
19787$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
19788      has_space=`$ECHO "$complete" | $GREP " "`
19789      if test "x$has_space" != x; then
19790        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19791$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19792      fi
19793      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19794    fi
19795  fi
19796
19797  # Now new_path has a complete unix path to the binary
19798  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19799    # Keep paths in /bin as-is, but remove trailing .exe if any
19800    new_path="${new_path/%.exe/}"
19801    # Do not save /bin paths to all_fixpath_prefixes!
19802  else
19803    # Not in mixed or Windows style, start by that.
19804    new_path=`cmd //c echo $new_path`
19805
19806  input_path="$new_path"
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    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19815  fi
19816
19817    # Output is in $new_path
19818
19819  windows_path="$new_path"
19820  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19821    unix_path=`$CYGPATH -u "$windows_path"`
19822    new_path="$unix_path"
19823  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19824    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19825    new_path="$unix_path"
19826  fi
19827
19828    # remove trailing .exe if any
19829    new_path="${new_path/%.exe/}"
19830
19831    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19832    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19833  fi
19834
19835  else
19836    # We're on a posix platform. Hooray! :)
19837    # First separate the path from the arguments. This will split at the first
19838    # space.
19839    complete="$PROPER_COMPILER_CC"
19840    path="${complete%% *}"
19841    tmp="$complete EOL"
19842    arguments="${tmp#* }"
19843
19844    # Cannot rely on the command "which" here since it doesn't always work.
19845    is_absolute_path=`$ECHO "$path" | $GREP ^/`
19846    if test -z "$is_absolute_path"; then
19847      # Path to executable is not absolute. Find it.
19848      IFS_save="$IFS"
19849      IFS=:
19850      for p in $PATH; do
19851        if test -f "$p/$path" && test -x "$p/$path"; then
19852          new_path="$p/$path"
19853          break
19854        fi
19855      done
19856      IFS="$IFS_save"
19857    else
19858      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&5
19859$as_echo "$as_me: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&6;}
19860      new_path="$path"
19861    fi
19862
19863    if test "x$new_path" = x; then
19864      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
19865$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
19866      has_space=`$ECHO "$complete" | $GREP " "`
19867      if test "x$has_space" != x; then
19868        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19869$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19870      fi
19871      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19872    fi
19873  fi
19874
19875  # Now join together the path and the arguments once again
19876  if test "x$arguments" != xEOL; then
19877    new_complete="$new_path ${arguments% *}"
19878  else
19879    new_complete="$new_path"
19880  fi
19881
19882  if test "x$complete" != "x$new_complete"; then
19883    PROPER_COMPILER_CC="$new_complete"
19884    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
19885$as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
19886  fi
19887
19888    PATH="$RETRY_COMPILER_SAVED_PATH"
19889
19890    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
19891$as_echo_n "checking for resolved symbolic links for CC... " >&6; }
19892
19893  if test "x$OPENJDK_BUILD_OS" != xwindows; then
19894    # Follow a chain of symbolic links. Use readlink
19895    # where it exists, else fall back to horribly
19896    # complicated shell code.
19897    if test "x$READLINK_TESTED" != yes; then
19898      # On MacOSX there is a readlink tool with a different
19899      # purpose than the GNU readlink tool. Check the found readlink.
19900      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
19901      if test "x$ISGNU" = x; then
19902        # A readlink that we do not know how to use.
19903        # Are there other non-GNU readlinks out there?
19904        READLINK_TESTED=yes
19905        READLINK=
19906      fi
19907    fi
19908
19909    if test "x$READLINK" != x; then
19910      PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
19911    else
19912      # Save the current directory for restoring afterwards
19913      STARTDIR=$PWD
19914      COUNTER=0
19915      sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
19916      sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
19917      cd $sym_link_dir
19918      # Use -P flag to resolve symlinks in directories.
19919      cd `$THEPWDCMD -P`
19920      sym_link_dir=`$THEPWDCMD -P`
19921      # Resolve file symlinks
19922      while test $COUNTER -lt 20; do
19923        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
19924        if test "x$ISLINK" == x; then
19925          # This is not a symbolic link! We are done!
19926          break
19927        fi
19928        # Again resolve directory symlinks since the target of the just found
19929        # link could be in a different directory
19930        cd `$DIRNAME $ISLINK`
19931        sym_link_dir=`$THEPWDCMD -P`
19932        sym_link_file=`$BASENAME $ISLINK`
19933        let COUNTER=COUNTER+1
19934      done
19935      cd $STARTDIR
19936      PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
19937    fi
19938  fi
19939
19940    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
19941$as_echo "$PROPER_COMPILER_CC" >&6; }
19942    CC="$PROPER_COMPILER_CC"
19943  else
19944    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
19945$as_echo "no, keeping CC" >&6; }
19946    CC="$TEST_COMPILER"
19947  fi
19948
19949  COMPILER=$CC
19950  COMPILER_NAME=$COMPILER_NAME
19951
19952  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
19953    # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
19954    COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
19955    $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
19956    if test $? -ne 0; then
19957      GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
19958
19959      { $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
19960$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
19961      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
19962$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
19963      as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
19964    else
19965      COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
19966      COMPILER_VENDOR="Sun Studio"
19967    fi
19968  elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
19969    # First line typically looks something like:
19970    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
19971    COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
19972    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
19973    COMPILER_VENDOR="Microsoft CL.EXE"
19974    COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
19975    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
19976      if test "x$COMPILER_CPU_TEST" != "x80x86"; then
19977        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
19978      fi
19979    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
19980      if test "x$COMPILER_CPU_TEST" != "xx64"; then
19981        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
19982      fi
19983    fi
19984  else
19985    COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
19986    # Check that this is likely to be GCC.
19987    $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
19988    if test $? -ne 0; then
19989      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
19990$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
19991      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
19992$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
19993      as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
19994    fi
19995
19996    # First line typically looks something like:
19997    # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
19998    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
19999    COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
20000  fi
20001  # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
20002  CC_VERSION="$COMPILER_VERSION"
20003  # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
20004  CC_VENDOR="$COMPILER_VENDOR"
20005
20006  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
20007$as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
20008
20009
20010  # Now that we have resolved CC ourself, let autoconf have its go at it
20011  ac_ext=c
20012ac_cpp='$CPP $CPPFLAGS'
20013ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20014ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20015ac_compiler_gnu=$ac_cv_c_compiler_gnu
20016if test -n "$ac_tool_prefix"; then
20017  for ac_prog in $CC
20018  do
20019    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
20020set dummy $ac_tool_prefix$ac_prog; ac_word=$2
20021{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20022$as_echo_n "checking for $ac_word... " >&6; }
20023if ${ac_cv_prog_CC+:} false; then :
20024  $as_echo_n "(cached) " >&6
20025else
20026  if test -n "$CC"; then
20027  ac_cv_prog_CC="$CC" # Let the user override the test.
20028else
20029as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20030for as_dir in $PATH
20031do
20032  IFS=$as_save_IFS
20033  test -z "$as_dir" && as_dir=.
20034    for ac_exec_ext in '' $ac_executable_extensions; do
20035  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20036    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
20037    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20038    break 2
20039  fi
20040done
20041  done
20042IFS=$as_save_IFS
20043
20044fi
20045fi
20046CC=$ac_cv_prog_CC
20047if test -n "$CC"; then
20048  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
20049$as_echo "$CC" >&6; }
20050else
20051  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20052$as_echo "no" >&6; }
20053fi
20054
20055
20056    test -n "$CC" && break
20057  done
20058fi
20059if test -z "$CC"; then
20060  ac_ct_CC=$CC
20061  for ac_prog in $CC
20062do
20063  # Extract the first word of "$ac_prog", so it can be a program name with args.
20064set dummy $ac_prog; ac_word=$2
20065{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20066$as_echo_n "checking for $ac_word... " >&6; }
20067if ${ac_cv_prog_ac_ct_CC+:} false; then :
20068  $as_echo_n "(cached) " >&6
20069else
20070  if test -n "$ac_ct_CC"; then
20071  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
20072else
20073as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20074for as_dir in $PATH
20075do
20076  IFS=$as_save_IFS
20077  test -z "$as_dir" && as_dir=.
20078    for ac_exec_ext in '' $ac_executable_extensions; do
20079  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20080    ac_cv_prog_ac_ct_CC="$ac_prog"
20081    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20082    break 2
20083  fi
20084done
20085  done
20086IFS=$as_save_IFS
20087
20088fi
20089fi
20090ac_ct_CC=$ac_cv_prog_ac_ct_CC
20091if test -n "$ac_ct_CC"; then
20092  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
20093$as_echo "$ac_ct_CC" >&6; }
20094else
20095  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20096$as_echo "no" >&6; }
20097fi
20098
20099
20100  test -n "$ac_ct_CC" && break
20101done
20102
20103  if test "x$ac_ct_CC" = x; then
20104    CC=""
20105  else
20106    case $cross_compiling:$ac_tool_warned in
20107yes:)
20108{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
20109$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
20110ac_tool_warned=yes ;;
20111esac
20112    CC=$ac_ct_CC
20113  fi
20114fi
20115
20116
20117test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20118$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20119as_fn_error $? "no acceptable C compiler found in \$PATH
20120See \`config.log' for more details" "$LINENO" 5; }
20121
20122# Provide some information about the compiler.
20123$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
20124set X $ac_compile
20125ac_compiler=$2
20126for ac_option in --version -v -V -qversion; do
20127  { { ac_try="$ac_compiler $ac_option >&5"
20128case "(($ac_try" in
20129  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20130  *) ac_try_echo=$ac_try;;
20131esac
20132eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20133$as_echo "$ac_try_echo"; } >&5
20134  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
20135  ac_status=$?
20136  if test -s conftest.err; then
20137    sed '10a\
20138... rest of stderr output deleted ...
20139         10q' conftest.err >conftest.er1
20140    cat conftest.er1 >&5
20141  fi
20142  rm -f conftest.er1 conftest.err
20143  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20144  test $ac_status = 0; }
20145done
20146
20147cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20148/* end confdefs.h.  */
20149
20150int
20151main ()
20152{
20153
20154  ;
20155  return 0;
20156}
20157_ACEOF
20158ac_clean_files_save=$ac_clean_files
20159ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
20160# Try to create an executable without -o first, disregard a.out.
20161# It will help us diagnose broken compilers, and finding out an intuition
20162# of exeext.
20163{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
20164$as_echo_n "checking whether the C compiler works... " >&6; }
20165ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
20166
20167# The possible output files:
20168ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
20169
20170ac_rmfiles=
20171for ac_file in $ac_files
20172do
20173  case $ac_file in
20174    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
20175    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
20176  esac
20177done
20178rm -f $ac_rmfiles
20179
20180if { { ac_try="$ac_link_default"
20181case "(($ac_try" in
20182  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20183  *) ac_try_echo=$ac_try;;
20184esac
20185eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20186$as_echo "$ac_try_echo"; } >&5
20187  (eval "$ac_link_default") 2>&5
20188  ac_status=$?
20189  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20190  test $ac_status = 0; }; then :
20191  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
20192# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
20193# in a Makefile.  We should not override ac_cv_exeext if it was cached,
20194# so that the user can short-circuit this test for compilers unknown to
20195# Autoconf.
20196for ac_file in $ac_files ''
20197do
20198  test -f "$ac_file" || continue
20199  case $ac_file in
20200    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
20201	;;
20202    [ab].out )
20203	# We found the default executable, but exeext='' is most
20204	# certainly right.
20205	break;;
20206    *.* )
20207	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
20208	then :; else
20209	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
20210	fi
20211	# We set ac_cv_exeext here because the later test for it is not
20212	# safe: cross compilers may not add the suffix if given an `-o'
20213	# argument, so we may need to know it at that point already.
20214	# Even if this section looks crufty: it has the advantage of
20215	# actually working.
20216	break;;
20217    * )
20218	break;;
20219  esac
20220done
20221test "$ac_cv_exeext" = no && ac_cv_exeext=
20222
20223else
20224  ac_file=''
20225fi
20226if test -z "$ac_file"; then :
20227  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20228$as_echo "no" >&6; }
20229$as_echo "$as_me: failed program was:" >&5
20230sed 's/^/| /' conftest.$ac_ext >&5
20231
20232{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20233$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20234as_fn_error 77 "C compiler cannot create executables
20235See \`config.log' for more details" "$LINENO" 5; }
20236else
20237  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20238$as_echo "yes" >&6; }
20239fi
20240{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
20241$as_echo_n "checking for C compiler default output file name... " >&6; }
20242{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
20243$as_echo "$ac_file" >&6; }
20244ac_exeext=$ac_cv_exeext
20245
20246rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
20247ac_clean_files=$ac_clean_files_save
20248{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
20249$as_echo_n "checking for suffix of executables... " >&6; }
20250if { { ac_try="$ac_link"
20251case "(($ac_try" in
20252  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20253  *) ac_try_echo=$ac_try;;
20254esac
20255eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20256$as_echo "$ac_try_echo"; } >&5
20257  (eval "$ac_link") 2>&5
20258  ac_status=$?
20259  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20260  test $ac_status = 0; }; then :
20261  # If both `conftest.exe' and `conftest' are `present' (well, observable)
20262# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
20263# work properly (i.e., refer to `conftest.exe'), while it won't with
20264# `rm'.
20265for ac_file in conftest.exe conftest conftest.*; do
20266  test -f "$ac_file" || continue
20267  case $ac_file in
20268    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
20269    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
20270	  break;;
20271    * ) break;;
20272  esac
20273done
20274else
20275  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20276$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20277as_fn_error $? "cannot compute suffix of executables: cannot compile and link
20278See \`config.log' for more details" "$LINENO" 5; }
20279fi
20280rm -f conftest conftest$ac_cv_exeext
20281{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
20282$as_echo "$ac_cv_exeext" >&6; }
20283
20284rm -f conftest.$ac_ext
20285EXEEXT=$ac_cv_exeext
20286ac_exeext=$EXEEXT
20287cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20288/* end confdefs.h.  */
20289#include <stdio.h>
20290int
20291main ()
20292{
20293FILE *f = fopen ("conftest.out", "w");
20294 return ferror (f) || fclose (f) != 0;
20295
20296  ;
20297  return 0;
20298}
20299_ACEOF
20300ac_clean_files="$ac_clean_files conftest.out"
20301# Check that the compiler produces executables we can run.  If not, either
20302# the compiler is broken, or we cross compile.
20303{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
20304$as_echo_n "checking whether we are cross compiling... " >&6; }
20305if test "$cross_compiling" != yes; then
20306  { { ac_try="$ac_link"
20307case "(($ac_try" in
20308  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20309  *) ac_try_echo=$ac_try;;
20310esac
20311eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20312$as_echo "$ac_try_echo"; } >&5
20313  (eval "$ac_link") 2>&5
20314  ac_status=$?
20315  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20316  test $ac_status = 0; }
20317  if { ac_try='./conftest$ac_cv_exeext'
20318  { { case "(($ac_try" in
20319  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20320  *) ac_try_echo=$ac_try;;
20321esac
20322eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20323$as_echo "$ac_try_echo"; } >&5
20324  (eval "$ac_try") 2>&5
20325  ac_status=$?
20326  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20327  test $ac_status = 0; }; }; then
20328    cross_compiling=no
20329  else
20330    if test "$cross_compiling" = maybe; then
20331	cross_compiling=yes
20332    else
20333	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20334$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20335as_fn_error $? "cannot run C compiled programs.
20336If you meant to cross compile, use \`--host'.
20337See \`config.log' for more details" "$LINENO" 5; }
20338    fi
20339  fi
20340fi
20341{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
20342$as_echo "$cross_compiling" >&6; }
20343
20344rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
20345ac_clean_files=$ac_clean_files_save
20346{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
20347$as_echo_n "checking for suffix of object files... " >&6; }
20348if ${ac_cv_objext+:} false; then :
20349  $as_echo_n "(cached) " >&6
20350else
20351  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20352/* end confdefs.h.  */
20353
20354int
20355main ()
20356{
20357
20358  ;
20359  return 0;
20360}
20361_ACEOF
20362rm -f conftest.o conftest.obj
20363if { { ac_try="$ac_compile"
20364case "(($ac_try" in
20365  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20366  *) ac_try_echo=$ac_try;;
20367esac
20368eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20369$as_echo "$ac_try_echo"; } >&5
20370  (eval "$ac_compile") 2>&5
20371  ac_status=$?
20372  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20373  test $ac_status = 0; }; then :
20374  for ac_file in conftest.o conftest.obj conftest.*; do
20375  test -f "$ac_file" || continue;
20376  case $ac_file in
20377    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
20378    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
20379       break;;
20380  esac
20381done
20382else
20383  $as_echo "$as_me: failed program was:" >&5
20384sed 's/^/| /' conftest.$ac_ext >&5
20385
20386{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20387$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20388as_fn_error $? "cannot compute suffix of object files: cannot compile
20389See \`config.log' for more details" "$LINENO" 5; }
20390fi
20391rm -f conftest.$ac_cv_objext conftest.$ac_ext
20392fi
20393{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
20394$as_echo "$ac_cv_objext" >&6; }
20395OBJEXT=$ac_cv_objext
20396ac_objext=$OBJEXT
20397{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
20398$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
20399if ${ac_cv_c_compiler_gnu+:} false; then :
20400  $as_echo_n "(cached) " >&6
20401else
20402  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20403/* end confdefs.h.  */
20404
20405int
20406main ()
20407{
20408#ifndef __GNUC__
20409       choke me
20410#endif
20411
20412  ;
20413  return 0;
20414}
20415_ACEOF
20416if ac_fn_c_try_compile "$LINENO"; then :
20417  ac_compiler_gnu=yes
20418else
20419  ac_compiler_gnu=no
20420fi
20421rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20422ac_cv_c_compiler_gnu=$ac_compiler_gnu
20423
20424fi
20425{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
20426$as_echo "$ac_cv_c_compiler_gnu" >&6; }
20427if test $ac_compiler_gnu = yes; then
20428  GCC=yes
20429else
20430  GCC=
20431fi
20432ac_test_CFLAGS=${CFLAGS+set}
20433ac_save_CFLAGS=$CFLAGS
20434{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
20435$as_echo_n "checking whether $CC accepts -g... " >&6; }
20436if ${ac_cv_prog_cc_g+:} false; then :
20437  $as_echo_n "(cached) " >&6
20438else
20439  ac_save_c_werror_flag=$ac_c_werror_flag
20440   ac_c_werror_flag=yes
20441   ac_cv_prog_cc_g=no
20442   CFLAGS="-g"
20443   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20444/* end confdefs.h.  */
20445
20446int
20447main ()
20448{
20449
20450  ;
20451  return 0;
20452}
20453_ACEOF
20454if ac_fn_c_try_compile "$LINENO"; then :
20455  ac_cv_prog_cc_g=yes
20456else
20457  CFLAGS=""
20458      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20459/* end confdefs.h.  */
20460
20461int
20462main ()
20463{
20464
20465  ;
20466  return 0;
20467}
20468_ACEOF
20469if ac_fn_c_try_compile "$LINENO"; then :
20470
20471else
20472  ac_c_werror_flag=$ac_save_c_werror_flag
20473	 CFLAGS="-g"
20474	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20475/* end confdefs.h.  */
20476
20477int
20478main ()
20479{
20480
20481  ;
20482  return 0;
20483}
20484_ACEOF
20485if ac_fn_c_try_compile "$LINENO"; then :
20486  ac_cv_prog_cc_g=yes
20487fi
20488rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20489fi
20490rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20491fi
20492rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20493   ac_c_werror_flag=$ac_save_c_werror_flag
20494fi
20495{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
20496$as_echo "$ac_cv_prog_cc_g" >&6; }
20497if test "$ac_test_CFLAGS" = set; then
20498  CFLAGS=$ac_save_CFLAGS
20499elif test $ac_cv_prog_cc_g = yes; then
20500  if test "$GCC" = yes; then
20501    CFLAGS="-g -O2"
20502  else
20503    CFLAGS="-g"
20504  fi
20505else
20506  if test "$GCC" = yes; then
20507    CFLAGS="-O2"
20508  else
20509    CFLAGS=
20510  fi
20511fi
20512{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
20513$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
20514if ${ac_cv_prog_cc_c89+:} false; then :
20515  $as_echo_n "(cached) " >&6
20516else
20517  ac_cv_prog_cc_c89=no
20518ac_save_CC=$CC
20519cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20520/* end confdefs.h.  */
20521#include <stdarg.h>
20522#include <stdio.h>
20523struct stat;
20524/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
20525struct buf { int x; };
20526FILE * (*rcsopen) (struct buf *, struct stat *, int);
20527static char *e (p, i)
20528     char **p;
20529     int i;
20530{
20531  return p[i];
20532}
20533static char *f (char * (*g) (char **, int), char **p, ...)
20534{
20535  char *s;
20536  va_list v;
20537  va_start (v,p);
20538  s = g (p, va_arg (v,int));
20539  va_end (v);
20540  return s;
20541}
20542
20543/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
20544   function prototypes and stuff, but not '\xHH' hex character constants.
20545   These don't provoke an error unfortunately, instead are silently treated
20546   as 'x'.  The following induces an error, until -std is added to get
20547   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
20548   array size at least.  It's necessary to write '\x00'==0 to get something
20549   that's true only with -std.  */
20550int osf4_cc_array ['\x00' == 0 ? 1 : -1];
20551
20552/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
20553   inside strings and character constants.  */
20554#define FOO(x) 'x'
20555int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
20556
20557int test (int i, double x);
20558struct s1 {int (*f) (int a);};
20559struct s2 {int (*f) (double a);};
20560int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
20561int argc;
20562char **argv;
20563int
20564main ()
20565{
20566return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
20567  ;
20568  return 0;
20569}
20570_ACEOF
20571for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
20572	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
20573do
20574  CC="$ac_save_CC $ac_arg"
20575  if ac_fn_c_try_compile "$LINENO"; then :
20576  ac_cv_prog_cc_c89=$ac_arg
20577fi
20578rm -f core conftest.err conftest.$ac_objext
20579  test "x$ac_cv_prog_cc_c89" != "xno" && break
20580done
20581rm -f conftest.$ac_ext
20582CC=$ac_save_CC
20583
20584fi
20585# AC_CACHE_VAL
20586case "x$ac_cv_prog_cc_c89" in
20587  x)
20588    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
20589$as_echo "none needed" >&6; } ;;
20590  xno)
20591    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
20592$as_echo "unsupported" >&6; } ;;
20593  *)
20594    CC="$CC $ac_cv_prog_cc_c89"
20595    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
20596$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
20597esac
20598if test "x$ac_cv_prog_cc_c89" != xno; then :
20599
20600fi
20601
20602ac_ext=cpp
20603ac_cpp='$CXXCPP $CPPFLAGS'
20604ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20605ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20606ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20607
20608
20609  ### Locate C++ compiler (CXX)
20610
20611  if test "x$CXX" != x; then
20612    COMPILER_CHECK_LIST="$CXX"
20613  elif test "x$OPENJDK_TARGET_OS" = "xwindows"; then
20614    COMPILER_CHECK_LIST="cl"
20615  elif test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
20616    COMPILER_CHECK_LIST="CC g++"
20617  else
20618    COMPILER_CHECK_LIST="g++ CC"
20619  fi
20620
20621
20622  COMPILER_NAME=C++
20623
20624  CXX=
20625  # If TOOLS_DIR is set, check for all compiler names in there first
20626  # before checking the rest of the PATH.
20627  if test -n "$TOOLS_DIR"; then
20628    PATH_save="$PATH"
20629    PATH="$TOOLS_DIR"
20630    for ac_prog in $COMPILER_CHECK_LIST
20631do
20632  # Extract the first word of "$ac_prog", so it can be a program name with args.
20633set dummy $ac_prog; ac_word=$2
20634{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20635$as_echo_n "checking for $ac_word... " >&6; }
20636if ${ac_cv_path_TOOLS_DIR_CXX+:} false; then :
20637  $as_echo_n "(cached) " >&6
20638else
20639  case $TOOLS_DIR_CXX in
20640  [\\/]* | ?:[\\/]*)
20641  ac_cv_path_TOOLS_DIR_CXX="$TOOLS_DIR_CXX" # Let the user override the test with a path.
20642  ;;
20643  *)
20644  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20645for as_dir in $PATH
20646do
20647  IFS=$as_save_IFS
20648  test -z "$as_dir" && as_dir=.
20649    for ac_exec_ext in '' $ac_executable_extensions; do
20650  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20651    ac_cv_path_TOOLS_DIR_CXX="$as_dir/$ac_word$ac_exec_ext"
20652    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20653    break 2
20654  fi
20655done
20656  done
20657IFS=$as_save_IFS
20658
20659  ;;
20660esac
20661fi
20662TOOLS_DIR_CXX=$ac_cv_path_TOOLS_DIR_CXX
20663if test -n "$TOOLS_DIR_CXX"; then
20664  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CXX" >&5
20665$as_echo "$TOOLS_DIR_CXX" >&6; }
20666else
20667  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20668$as_echo "no" >&6; }
20669fi
20670
20671
20672  test -n "$TOOLS_DIR_CXX" && break
20673done
20674
20675    CXX=$TOOLS_DIR_CXX
20676    PATH="$PATH_save"
20677  fi
20678
20679  # AC_PATH_PROGS can't be run multiple times with the same variable,
20680  # so create a new name for this run.
20681  if test "x$CXX" = x; then
20682    for ac_prog in $COMPILER_CHECK_LIST
20683do
20684  # Extract the first word of "$ac_prog", so it can be a program name with args.
20685set dummy $ac_prog; ac_word=$2
20686{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20687$as_echo_n "checking for $ac_word... " >&6; }
20688if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
20689  $as_echo_n "(cached) " >&6
20690else
20691  case $POTENTIAL_CXX in
20692  [\\/]* | ?:[\\/]*)
20693  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
20694  ;;
20695  *)
20696  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20697for as_dir in $PATH
20698do
20699  IFS=$as_save_IFS
20700  test -z "$as_dir" && as_dir=.
20701    for ac_exec_ext in '' $ac_executable_extensions; do
20702  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20703    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
20704    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20705    break 2
20706  fi
20707done
20708  done
20709IFS=$as_save_IFS
20710
20711  ;;
20712esac
20713fi
20714POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
20715if test -n "$POTENTIAL_CXX"; then
20716  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
20717$as_echo "$POTENTIAL_CXX" >&6; }
20718else
20719  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20720$as_echo "no" >&6; }
20721fi
20722
20723
20724  test -n "$POTENTIAL_CXX" && break
20725done
20726
20727    CXX=$POTENTIAL_CXX
20728  fi
20729
20730  if test "x$CXX" = x; then
20731
20732  # Print a helpful message on how to acquire the necessary build dependency.
20733  # devkit is the help tag: freetyp2, cups, pulse, alsa etc
20734  MISSING_DEPENDENCY=devkit
20735
20736  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20737    cygwin_help $MISSING_DEPENDENCY
20738  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20739    msys_help $MISSING_DEPENDENCY
20740  else
20741    PKGHANDLER_COMMAND=
20742
20743    case $PKGHANDLER in
20744      apt-get)
20745        apt_help     $MISSING_DEPENDENCY ;;
20746      yum)
20747        yum_help     $MISSING_DEPENDENCY ;;
20748      port)
20749        port_help    $MISSING_DEPENDENCY ;;
20750      pkgutil)
20751        pkgutil_help $MISSING_DEPENDENCY ;;
20752      pkgadd)
20753        pkgadd_help  $MISSING_DEPENDENCY ;;
20754      * )
20755        break ;;
20756    esac
20757
20758    if test "x$PKGHANDLER_COMMAND" != x; then
20759      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
20760    fi
20761  fi
20762
20763    as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
20764  fi
20765
20766  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20767
20768  # First separate the path from the arguments. This will split at the first
20769  # space.
20770  complete="$CXX"
20771  path="${complete%% *}"
20772  tmp="$complete EOL"
20773  arguments="${tmp#* }"
20774
20775  # Input might be given as Windows format, start by converting to
20776  # unix format.
20777  new_path=`$CYGPATH -u "$path"`
20778
20779  # Now try to locate executable using which
20780  new_path=`$WHICH "$new_path" 2> /dev/null`
20781  # bat and cmd files are not always considered executable in cygwin causing which
20782  # to not find them
20783  if test "x$new_path" = x \
20784      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20785      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20786    new_path=`$CYGPATH -u "$path"`
20787  fi
20788  if test "x$new_path" = x; then
20789    # Oops. Which didn't find the executable.
20790    # The splitting of arguments from the executable at a space might have been incorrect,
20791    # since paths with space are more likely in Windows. Give it another try with the whole
20792    # argument.
20793    path="$complete"
20794    arguments="EOL"
20795    new_path=`$CYGPATH -u "$path"`
20796    new_path=`$WHICH "$new_path" 2> /dev/null`
20797    # bat and cmd files are not always considered executable in cygwin causing which
20798    # to not find them
20799    if test "x$new_path" = x \
20800        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20801        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20802      new_path=`$CYGPATH -u "$path"`
20803    fi
20804    if test "x$new_path" = x; then
20805      # It's still not found. Now this is an unrecoverable error.
20806      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
20807$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
20808      has_space=`$ECHO "$complete" | $GREP " "`
20809      if test "x$has_space" != x; then
20810        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20811$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20812      fi
20813      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20814    fi
20815  fi
20816
20817  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20818  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20819  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20820  # "foo.exe" is OK but "foo" is an error.
20821  #
20822  # This test is therefore slightly more accurate than "test -f" to check for file presence.
20823  # It is also a way to make sure we got the proper file name for the real test later on.
20824  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20825  if test "x$test_shortpath" = x; then
20826    # Short path failed, file does not exist as specified.
20827    # Try adding .exe or .cmd
20828    if test -f "${new_path}.exe"; then
20829      input_to_shortpath="${new_path}.exe"
20830    elif test -f "${new_path}.cmd"; then
20831      input_to_shortpath="${new_path}.cmd"
20832    else
20833      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
20834$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
20835      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20836$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20837      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20838    fi
20839  else
20840    input_to_shortpath="$new_path"
20841  fi
20842
20843  # Call helper function which possibly converts this using DOS-style short mode.
20844  # If so, the updated path is stored in $new_path.
20845  new_path="$input_to_shortpath"
20846
20847  input_path="$input_to_shortpath"
20848  # Check if we need to convert this using DOS-style short mode. If the path
20849  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20850  # take no chances and rewrite it.
20851  # Note: m4 eats our [], so we need to use [ and ] instead.
20852  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20853  if test "x$has_forbidden_chars" != x; then
20854    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20855    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20856    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20857    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20858      # Going to short mode and back again did indeed matter. Since short mode is
20859      # case insensitive, let's make it lowercase to improve readability.
20860      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20861      # Now convert it back to Unix-stile (cygpath)
20862      input_path=`$CYGPATH -u "$shortmode_path"`
20863      new_path="$input_path"
20864    fi
20865  fi
20866
20867  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20868  if test "x$test_cygdrive_prefix" = x; then
20869    # As a simple fix, exclude /usr/bin since it's not a real path.
20870    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20871      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20872      # a path prefixed by /cygdrive for fixpath to work.
20873      new_path="$CYGWIN_ROOT_PATH$input_path"
20874    fi
20875  fi
20876
20877  # remove trailing .exe if any
20878  new_path="${new_path/%.exe/}"
20879
20880  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20881
20882  # First separate the path from the arguments. This will split at the first
20883  # space.
20884  complete="$CXX"
20885  path="${complete%% *}"
20886  tmp="$complete EOL"
20887  arguments="${tmp#* }"
20888
20889  # Input might be given as Windows format, start by converting to
20890  # unix format.
20891  new_path="$path"
20892
20893  windows_path="$new_path"
20894  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20895    unix_path=`$CYGPATH -u "$windows_path"`
20896    new_path="$unix_path"
20897  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20898    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20899    new_path="$unix_path"
20900  fi
20901
20902
20903  # Now try to locate executable using which
20904  new_path=`$WHICH "$new_path" 2> /dev/null`
20905
20906  if test "x$new_path" = x; then
20907    # Oops. Which didn't find the executable.
20908    # The splitting of arguments from the executable at a space might have been incorrect,
20909    # since paths with space are more likely in Windows. Give it another try with the whole
20910    # argument.
20911    path="$complete"
20912    arguments="EOL"
20913    new_path="$path"
20914
20915  windows_path="$new_path"
20916  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20917    unix_path=`$CYGPATH -u "$windows_path"`
20918    new_path="$unix_path"
20919  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20920    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20921    new_path="$unix_path"
20922  fi
20923
20924
20925    new_path=`$WHICH "$new_path" 2> /dev/null`
20926
20927    if test "x$new_path" = x; then
20928      # It's still not found. Now this is an unrecoverable error.
20929      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
20930$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
20931      has_space=`$ECHO "$complete" | $GREP " "`
20932      if test "x$has_space" != x; then
20933        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20934$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20935      fi
20936      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20937    fi
20938  fi
20939
20940  # Now new_path has a complete unix path to the binary
20941  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20942    # Keep paths in /bin as-is, but remove trailing .exe if any
20943    new_path="${new_path/%.exe/}"
20944    # Do not save /bin paths to all_fixpath_prefixes!
20945  else
20946    # Not in mixed or Windows style, start by that.
20947    new_path=`cmd //c echo $new_path`
20948
20949  input_path="$new_path"
20950  # Check if we need to convert this using DOS-style short mode. If the path
20951  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20952  # take no chances and rewrite it.
20953  # Note: m4 eats our [], so we need to use [ and ] instead.
20954  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20955  if test "x$has_forbidden_chars" != x; then
20956    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20957    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20958  fi
20959
20960    # Output is in $new_path
20961
20962  windows_path="$new_path"
20963  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20964    unix_path=`$CYGPATH -u "$windows_path"`
20965    new_path="$unix_path"
20966  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20967    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20968    new_path="$unix_path"
20969  fi
20970
20971    # remove trailing .exe if any
20972    new_path="${new_path/%.exe/}"
20973
20974    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20975    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20976  fi
20977
20978  else
20979    # We're on a posix platform. Hooray! :)
20980    # First separate the path from the arguments. This will split at the first
20981    # space.
20982    complete="$CXX"
20983    path="${complete%% *}"
20984    tmp="$complete EOL"
20985    arguments="${tmp#* }"
20986
20987    # Cannot rely on the command "which" here since it doesn't always work.
20988    is_absolute_path=`$ECHO "$path" | $GREP ^/`
20989    if test -z "$is_absolute_path"; then
20990      # Path to executable is not absolute. Find it.
20991      IFS_save="$IFS"
20992      IFS=:
20993      for p in $PATH; do
20994        if test -f "$p/$path" && test -x "$p/$path"; then
20995          new_path="$p/$path"
20996          break
20997        fi
20998      done
20999      IFS="$IFS_save"
21000    else
21001      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXX (as $path) failed, using $path directly." >&5
21002$as_echo "$as_me: Resolving CXX (as $path) failed, using $path directly." >&6;}
21003      new_path="$path"
21004    fi
21005
21006    if test "x$new_path" = x; then
21007      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
21008$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
21009      has_space=`$ECHO "$complete" | $GREP " "`
21010      if test "x$has_space" != x; then
21011        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21012$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21013      fi
21014      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
21015    fi
21016  fi
21017
21018  # Now join together the path and the arguments once again
21019  if test "x$arguments" != xEOL; then
21020    new_complete="$new_path ${arguments% *}"
21021  else
21022    new_complete="$new_path"
21023  fi
21024
21025  if test "x$complete" != "x$new_complete"; then
21026    CXX="$new_complete"
21027    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
21028$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
21029  fi
21030
21031  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
21032$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
21033  TEST_COMPILER="$CXX"
21034
21035  if test "x$OPENJDK_BUILD_OS" != xwindows; then
21036    # Follow a chain of symbolic links. Use readlink
21037    # where it exists, else fall back to horribly
21038    # complicated shell code.
21039    if test "x$READLINK_TESTED" != yes; then
21040      # On MacOSX there is a readlink tool with a different
21041      # purpose than the GNU readlink tool. Check the found readlink.
21042      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
21043      if test "x$ISGNU" = x; then
21044        # A readlink that we do not know how to use.
21045        # Are there other non-GNU readlinks out there?
21046        READLINK_TESTED=yes
21047        READLINK=
21048      fi
21049    fi
21050
21051    if test "x$READLINK" != x; then
21052      TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
21053    else
21054      # Save the current directory for restoring afterwards
21055      STARTDIR=$PWD
21056      COUNTER=0
21057      sym_link_dir=`$DIRNAME $TEST_COMPILER`
21058      sym_link_file=`$BASENAME $TEST_COMPILER`
21059      cd $sym_link_dir
21060      # Use -P flag to resolve symlinks in directories.
21061      cd `$THEPWDCMD -P`
21062      sym_link_dir=`$THEPWDCMD -P`
21063      # Resolve file symlinks
21064      while test $COUNTER -lt 20; do
21065        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
21066        if test "x$ISLINK" == x; then
21067          # This is not a symbolic link! We are done!
21068          break
21069        fi
21070        # Again resolve directory symlinks since the target of the just found
21071        # link could be in a different directory
21072        cd `$DIRNAME $ISLINK`
21073        sym_link_dir=`$THEPWDCMD -P`
21074        sym_link_file=`$BASENAME $ISLINK`
21075        let COUNTER=COUNTER+1
21076      done
21077      cd $STARTDIR
21078      TEST_COMPILER=$sym_link_dir/$sym_link_file
21079    fi
21080  fi
21081
21082  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
21083$as_echo "$TEST_COMPILER" >&6; }
21084  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
21085$as_echo_n "checking if CXX is disguised ccache... " >&6; }
21086
21087  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
21088  if test "x$COMPILER_BASENAME" = "xccache"; then
21089    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
21090$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
21091    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
21092    # We want to control ccache invocation ourselves, so ignore this cc and try
21093    # searching again.
21094
21095    # Remove the path to the fake ccache cc from the PATH
21096    RETRY_COMPILER_SAVED_PATH="$PATH"
21097    COMPILER_DIRNAME=`$DIRNAME $CXX`
21098    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
21099
21100    # Try again looking for our compiler
21101    if test -n "$ac_tool_prefix"; then
21102  for ac_prog in $COMPILER_CHECK_LIST
21103  do
21104    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
21105set dummy $ac_tool_prefix$ac_prog; ac_word=$2
21106{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21107$as_echo_n "checking for $ac_word... " >&6; }
21108if ${ac_cv_prog_PROPER_COMPILER_CXX+:} false; then :
21109  $as_echo_n "(cached) " >&6
21110else
21111  if test -n "$PROPER_COMPILER_CXX"; then
21112  ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
21113else
21114as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21115for as_dir in $PATH
21116do
21117  IFS=$as_save_IFS
21118  test -z "$as_dir" && as_dir=.
21119    for ac_exec_ext in '' $ac_executable_extensions; do
21120  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21121    ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
21122    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21123    break 2
21124  fi
21125done
21126  done
21127IFS=$as_save_IFS
21128
21129fi
21130fi
21131PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
21132if test -n "$PROPER_COMPILER_CXX"; then
21133  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
21134$as_echo "$PROPER_COMPILER_CXX" >&6; }
21135else
21136  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21137$as_echo "no" >&6; }
21138fi
21139
21140
21141    test -n "$PROPER_COMPILER_CXX" && break
21142  done
21143fi
21144if test -z "$PROPER_COMPILER_CXX"; then
21145  ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
21146  for ac_prog in $COMPILER_CHECK_LIST
21147do
21148  # Extract the first word of "$ac_prog", so it can be a program name with args.
21149set dummy $ac_prog; ac_word=$2
21150{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21151$as_echo_n "checking for $ac_word... " >&6; }
21152if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+:} false; then :
21153  $as_echo_n "(cached) " >&6
21154else
21155  if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
21156  ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
21157else
21158as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21159for as_dir in $PATH
21160do
21161  IFS=$as_save_IFS
21162  test -z "$as_dir" && as_dir=.
21163    for ac_exec_ext in '' $ac_executable_extensions; do
21164  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21165    ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
21166    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21167    break 2
21168  fi
21169done
21170  done
21171IFS=$as_save_IFS
21172
21173fi
21174fi
21175ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
21176if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
21177  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
21178$as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
21179else
21180  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21181$as_echo "no" >&6; }
21182fi
21183
21184
21185  test -n "$ac_ct_PROPER_COMPILER_CXX" && break
21186done
21187
21188  if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
21189    PROPER_COMPILER_CXX=""
21190  else
21191    case $cross_compiling:$ac_tool_warned in
21192yes:)
21193{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
21194$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
21195ac_tool_warned=yes ;;
21196esac
21197    PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
21198  fi
21199fi
21200
21201
21202  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21203
21204  # First separate the path from the arguments. This will split at the first
21205  # space.
21206  complete="$PROPER_COMPILER_CXX"
21207  path="${complete%% *}"
21208  tmp="$complete EOL"
21209  arguments="${tmp#* }"
21210
21211  # Input might be given as Windows format, start by converting to
21212  # unix format.
21213  new_path=`$CYGPATH -u "$path"`
21214
21215  # Now try to locate executable using which
21216  new_path=`$WHICH "$new_path" 2> /dev/null`
21217  # bat and cmd files are not always considered executable in cygwin causing which
21218  # to not find them
21219  if test "x$new_path" = x \
21220      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21221      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21222    new_path=`$CYGPATH -u "$path"`
21223  fi
21224  if test "x$new_path" = x; then
21225    # Oops. Which didn't find the executable.
21226    # The splitting of arguments from the executable at a space might have been incorrect,
21227    # since paths with space are more likely in Windows. Give it another try with the whole
21228    # argument.
21229    path="$complete"
21230    arguments="EOL"
21231    new_path=`$CYGPATH -u "$path"`
21232    new_path=`$WHICH "$new_path" 2> /dev/null`
21233    # bat and cmd files are not always considered executable in cygwin causing which
21234    # to not find them
21235    if test "x$new_path" = x \
21236        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21237        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21238      new_path=`$CYGPATH -u "$path"`
21239    fi
21240    if test "x$new_path" = x; then
21241      # It's still not found. Now this is an unrecoverable error.
21242      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
21243$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
21244      has_space=`$ECHO "$complete" | $GREP " "`
21245      if test "x$has_space" != x; then
21246        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21247$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21248      fi
21249      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21250    fi
21251  fi
21252
21253  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21254  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21255  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21256  # "foo.exe" is OK but "foo" is an error.
21257  #
21258  # This test is therefore slightly more accurate than "test -f" to check for file presence.
21259  # It is also a way to make sure we got the proper file name for the real test later on.
21260  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21261  if test "x$test_shortpath" = x; then
21262    # Short path failed, file does not exist as specified.
21263    # Try adding .exe or .cmd
21264    if test -f "${new_path}.exe"; then
21265      input_to_shortpath="${new_path}.exe"
21266    elif test -f "${new_path}.cmd"; then
21267      input_to_shortpath="${new_path}.cmd"
21268    else
21269      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
21270$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
21271      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21272$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21273      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21274    fi
21275  else
21276    input_to_shortpath="$new_path"
21277  fi
21278
21279  # Call helper function which possibly converts this using DOS-style short mode.
21280  # If so, the updated path is stored in $new_path.
21281  new_path="$input_to_shortpath"
21282
21283  input_path="$input_to_shortpath"
21284  # Check if we need to convert this using DOS-style short mode. If the path
21285  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21286  # take no chances and rewrite it.
21287  # Note: m4 eats our [], so we need to use [ and ] instead.
21288  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21289  if test "x$has_forbidden_chars" != x; then
21290    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21291    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21292    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21293    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21294      # Going to short mode and back again did indeed matter. Since short mode is
21295      # case insensitive, let's make it lowercase to improve readability.
21296      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21297      # Now convert it back to Unix-stile (cygpath)
21298      input_path=`$CYGPATH -u "$shortmode_path"`
21299      new_path="$input_path"
21300    fi
21301  fi
21302
21303  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21304  if test "x$test_cygdrive_prefix" = x; then
21305    # As a simple fix, exclude /usr/bin since it's not a real path.
21306    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21307      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21308      # a path prefixed by /cygdrive for fixpath to work.
21309      new_path="$CYGWIN_ROOT_PATH$input_path"
21310    fi
21311  fi
21312
21313  # remove trailing .exe if any
21314  new_path="${new_path/%.exe/}"
21315
21316  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21317
21318  # First separate the path from the arguments. This will split at the first
21319  # space.
21320  complete="$PROPER_COMPILER_CXX"
21321  path="${complete%% *}"
21322  tmp="$complete EOL"
21323  arguments="${tmp#* }"
21324
21325  # Input might be given as Windows format, start by converting to
21326  # unix format.
21327  new_path="$path"
21328
21329  windows_path="$new_path"
21330  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21331    unix_path=`$CYGPATH -u "$windows_path"`
21332    new_path="$unix_path"
21333  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21334    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21335    new_path="$unix_path"
21336  fi
21337
21338
21339  # Now try to locate executable using which
21340  new_path=`$WHICH "$new_path" 2> /dev/null`
21341
21342  if test "x$new_path" = x; then
21343    # Oops. Which didn't find the executable.
21344    # The splitting of arguments from the executable at a space might have been incorrect,
21345    # since paths with space are more likely in Windows. Give it another try with the whole
21346    # argument.
21347    path="$complete"
21348    arguments="EOL"
21349    new_path="$path"
21350
21351  windows_path="$new_path"
21352  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21353    unix_path=`$CYGPATH -u "$windows_path"`
21354    new_path="$unix_path"
21355  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21356    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21357    new_path="$unix_path"
21358  fi
21359
21360
21361    new_path=`$WHICH "$new_path" 2> /dev/null`
21362
21363    if test "x$new_path" = x; then
21364      # It's still not found. Now this is an unrecoverable error.
21365      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
21366$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
21367      has_space=`$ECHO "$complete" | $GREP " "`
21368      if test "x$has_space" != x; then
21369        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21370$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21371      fi
21372      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21373    fi
21374  fi
21375
21376  # Now new_path has a complete unix path to the binary
21377  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21378    # Keep paths in /bin as-is, but remove trailing .exe if any
21379    new_path="${new_path/%.exe/}"
21380    # Do not save /bin paths to all_fixpath_prefixes!
21381  else
21382    # Not in mixed or Windows style, start by that.
21383    new_path=`cmd //c echo $new_path`
21384
21385  input_path="$new_path"
21386  # Check if we need to convert this using DOS-style short mode. If the path
21387  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21388  # take no chances and rewrite it.
21389  # Note: m4 eats our [], so we need to use [ and ] instead.
21390  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21391  if test "x$has_forbidden_chars" != x; then
21392    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21393    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21394  fi
21395
21396    # Output is in $new_path
21397
21398  windows_path="$new_path"
21399  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21400    unix_path=`$CYGPATH -u "$windows_path"`
21401    new_path="$unix_path"
21402  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21403    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21404    new_path="$unix_path"
21405  fi
21406
21407    # remove trailing .exe if any
21408    new_path="${new_path/%.exe/}"
21409
21410    # Save the first 10 bytes of this path to the storage, so fixpath can work.
21411    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21412  fi
21413
21414  else
21415    # We're on a posix platform. Hooray! :)
21416    # First separate the path from the arguments. This will split at the first
21417    # space.
21418    complete="$PROPER_COMPILER_CXX"
21419    path="${complete%% *}"
21420    tmp="$complete EOL"
21421    arguments="${tmp#* }"
21422
21423    # Cannot rely on the command "which" here since it doesn't always work.
21424    is_absolute_path=`$ECHO "$path" | $GREP ^/`
21425    if test -z "$is_absolute_path"; then
21426      # Path to executable is not absolute. Find it.
21427      IFS_save="$IFS"
21428      IFS=:
21429      for p in $PATH; do
21430        if test -f "$p/$path" && test -x "$p/$path"; then
21431          new_path="$p/$path"
21432          break
21433        fi
21434      done
21435      IFS="$IFS_save"
21436    else
21437      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&5
21438$as_echo "$as_me: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&6;}
21439      new_path="$path"
21440    fi
21441
21442    if test "x$new_path" = x; then
21443      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
21444$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
21445      has_space=`$ECHO "$complete" | $GREP " "`
21446      if test "x$has_space" != x; then
21447        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21448$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21449      fi
21450      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21451    fi
21452  fi
21453
21454  # Now join together the path and the arguments once again
21455  if test "x$arguments" != xEOL; then
21456    new_complete="$new_path ${arguments% *}"
21457  else
21458    new_complete="$new_path"
21459  fi
21460
21461  if test "x$complete" != "x$new_complete"; then
21462    PROPER_COMPILER_CXX="$new_complete"
21463    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
21464$as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
21465  fi
21466
21467    PATH="$RETRY_COMPILER_SAVED_PATH"
21468
21469    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
21470$as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
21471
21472  if test "x$OPENJDK_BUILD_OS" != xwindows; then
21473    # Follow a chain of symbolic links. Use readlink
21474    # where it exists, else fall back to horribly
21475    # complicated shell code.
21476    if test "x$READLINK_TESTED" != yes; then
21477      # On MacOSX there is a readlink tool with a different
21478      # purpose than the GNU readlink tool. Check the found readlink.
21479      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
21480      if test "x$ISGNU" = x; then
21481        # A readlink that we do not know how to use.
21482        # Are there other non-GNU readlinks out there?
21483        READLINK_TESTED=yes
21484        READLINK=
21485      fi
21486    fi
21487
21488    if test "x$READLINK" != x; then
21489      PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
21490    else
21491      # Save the current directory for restoring afterwards
21492      STARTDIR=$PWD
21493      COUNTER=0
21494      sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
21495      sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
21496      cd $sym_link_dir
21497      # Use -P flag to resolve symlinks in directories.
21498      cd `$THEPWDCMD -P`
21499      sym_link_dir=`$THEPWDCMD -P`
21500      # Resolve file symlinks
21501      while test $COUNTER -lt 20; do
21502        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
21503        if test "x$ISLINK" == x; then
21504          # This is not a symbolic link! We are done!
21505          break
21506        fi
21507        # Again resolve directory symlinks since the target of the just found
21508        # link could be in a different directory
21509        cd `$DIRNAME $ISLINK`
21510        sym_link_dir=`$THEPWDCMD -P`
21511        sym_link_file=`$BASENAME $ISLINK`
21512        let COUNTER=COUNTER+1
21513      done
21514      cd $STARTDIR
21515      PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
21516    fi
21517  fi
21518
21519    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
21520$as_echo "$PROPER_COMPILER_CXX" >&6; }
21521    CXX="$PROPER_COMPILER_CXX"
21522  else
21523    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
21524$as_echo "no, keeping CXX" >&6; }
21525    CXX="$TEST_COMPILER"
21526  fi
21527
21528  COMPILER=$CXX
21529  COMPILER_NAME=$COMPILER_NAME
21530
21531  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
21532    # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
21533    COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
21534    $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
21535    if test $? -ne 0; then
21536      GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
21537
21538      { $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
21539$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
21540      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
21541$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
21542      as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
21543    else
21544      COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
21545      COMPILER_VENDOR="Sun Studio"
21546    fi
21547  elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
21548    # First line typically looks something like:
21549    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
21550    COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
21551    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
21552    COMPILER_VENDOR="Microsoft CL.EXE"
21553    COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
21554    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
21555      if test "x$COMPILER_CPU_TEST" != "x80x86"; then
21556        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
21557      fi
21558    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
21559      if test "x$COMPILER_CPU_TEST" != "xx64"; then
21560        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
21561      fi
21562    fi
21563  else
21564    COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
21565    # Check that this is likely to be GCC.
21566    $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
21567    if test $? -ne 0; then
21568      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
21569$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
21570      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
21571$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
21572      as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
21573    fi
21574
21575    # First line typically looks something like:
21576    # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
21577    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
21578    COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
21579  fi
21580  # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
21581  CXX_VERSION="$COMPILER_VERSION"
21582  # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
21583  CXX_VENDOR="$COMPILER_VENDOR"
21584
21585  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
21586$as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
21587
21588
21589  # Now that we have resolved CXX ourself, let autoconf have its go at it
21590  ac_ext=cpp
21591ac_cpp='$CXXCPP $CPPFLAGS'
21592ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21593ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21594ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21595if test -z "$CXX"; then
21596  if test -n "$CCC"; then
21597    CXX=$CCC
21598  else
21599    if test -n "$ac_tool_prefix"; then
21600  for ac_prog in $CXX
21601  do
21602    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
21603set dummy $ac_tool_prefix$ac_prog; ac_word=$2
21604{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21605$as_echo_n "checking for $ac_word... " >&6; }
21606if ${ac_cv_prog_CXX+:} false; then :
21607  $as_echo_n "(cached) " >&6
21608else
21609  if test -n "$CXX"; then
21610  ac_cv_prog_CXX="$CXX" # Let the user override the test.
21611else
21612as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21613for as_dir in $PATH
21614do
21615  IFS=$as_save_IFS
21616  test -z "$as_dir" && as_dir=.
21617    for ac_exec_ext in '' $ac_executable_extensions; do
21618  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21619    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
21620    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21621    break 2
21622  fi
21623done
21624  done
21625IFS=$as_save_IFS
21626
21627fi
21628fi
21629CXX=$ac_cv_prog_CXX
21630if test -n "$CXX"; then
21631  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
21632$as_echo "$CXX" >&6; }
21633else
21634  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21635$as_echo "no" >&6; }
21636fi
21637
21638
21639    test -n "$CXX" && break
21640  done
21641fi
21642if test -z "$CXX"; then
21643  ac_ct_CXX=$CXX
21644  for ac_prog in $CXX
21645do
21646  # Extract the first word of "$ac_prog", so it can be a program name with args.
21647set dummy $ac_prog; ac_word=$2
21648{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21649$as_echo_n "checking for $ac_word... " >&6; }
21650if ${ac_cv_prog_ac_ct_CXX+:} false; then :
21651  $as_echo_n "(cached) " >&6
21652else
21653  if test -n "$ac_ct_CXX"; then
21654  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
21655else
21656as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21657for as_dir in $PATH
21658do
21659  IFS=$as_save_IFS
21660  test -z "$as_dir" && as_dir=.
21661    for ac_exec_ext in '' $ac_executable_extensions; do
21662  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21663    ac_cv_prog_ac_ct_CXX="$ac_prog"
21664    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21665    break 2
21666  fi
21667done
21668  done
21669IFS=$as_save_IFS
21670
21671fi
21672fi
21673ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
21674if test -n "$ac_ct_CXX"; then
21675  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
21676$as_echo "$ac_ct_CXX" >&6; }
21677else
21678  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21679$as_echo "no" >&6; }
21680fi
21681
21682
21683  test -n "$ac_ct_CXX" && break
21684done
21685
21686  if test "x$ac_ct_CXX" = x; then
21687    CXX="g++"
21688  else
21689    case $cross_compiling:$ac_tool_warned in
21690yes:)
21691{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
21692$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
21693ac_tool_warned=yes ;;
21694esac
21695    CXX=$ac_ct_CXX
21696  fi
21697fi
21698
21699  fi
21700fi
21701# Provide some information about the compiler.
21702$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
21703set X $ac_compile
21704ac_compiler=$2
21705for ac_option in --version -v -V -qversion; do
21706  { { ac_try="$ac_compiler $ac_option >&5"
21707case "(($ac_try" in
21708  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21709  *) ac_try_echo=$ac_try;;
21710esac
21711eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
21712$as_echo "$ac_try_echo"; } >&5
21713  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
21714  ac_status=$?
21715  if test -s conftest.err; then
21716    sed '10a\
21717... rest of stderr output deleted ...
21718         10q' conftest.err >conftest.er1
21719    cat conftest.er1 >&5
21720  fi
21721  rm -f conftest.er1 conftest.err
21722  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21723  test $ac_status = 0; }
21724done
21725
21726{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
21727$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
21728if ${ac_cv_cxx_compiler_gnu+:} false; then :
21729  $as_echo_n "(cached) " >&6
21730else
21731  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21732/* end confdefs.h.  */
21733
21734int
21735main ()
21736{
21737#ifndef __GNUC__
21738       choke me
21739#endif
21740
21741  ;
21742  return 0;
21743}
21744_ACEOF
21745if ac_fn_cxx_try_compile "$LINENO"; then :
21746  ac_compiler_gnu=yes
21747else
21748  ac_compiler_gnu=no
21749fi
21750rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21751ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
21752
21753fi
21754{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
21755$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
21756if test $ac_compiler_gnu = yes; then
21757  GXX=yes
21758else
21759  GXX=
21760fi
21761ac_test_CXXFLAGS=${CXXFLAGS+set}
21762ac_save_CXXFLAGS=$CXXFLAGS
21763{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
21764$as_echo_n "checking whether $CXX accepts -g... " >&6; }
21765if ${ac_cv_prog_cxx_g+:} false; then :
21766  $as_echo_n "(cached) " >&6
21767else
21768  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
21769   ac_cxx_werror_flag=yes
21770   ac_cv_prog_cxx_g=no
21771   CXXFLAGS="-g"
21772   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21773/* end confdefs.h.  */
21774
21775int
21776main ()
21777{
21778
21779  ;
21780  return 0;
21781}
21782_ACEOF
21783if ac_fn_cxx_try_compile "$LINENO"; then :
21784  ac_cv_prog_cxx_g=yes
21785else
21786  CXXFLAGS=""
21787      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21788/* end confdefs.h.  */
21789
21790int
21791main ()
21792{
21793
21794  ;
21795  return 0;
21796}
21797_ACEOF
21798if ac_fn_cxx_try_compile "$LINENO"; then :
21799
21800else
21801  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
21802	 CXXFLAGS="-g"
21803	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21804/* end confdefs.h.  */
21805
21806int
21807main ()
21808{
21809
21810  ;
21811  return 0;
21812}
21813_ACEOF
21814if ac_fn_cxx_try_compile "$LINENO"; then :
21815  ac_cv_prog_cxx_g=yes
21816fi
21817rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21818fi
21819rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21820fi
21821rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21822   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
21823fi
21824{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
21825$as_echo "$ac_cv_prog_cxx_g" >&6; }
21826if test "$ac_test_CXXFLAGS" = set; then
21827  CXXFLAGS=$ac_save_CXXFLAGS
21828elif test $ac_cv_prog_cxx_g = yes; then
21829  if test "$GXX" = yes; then
21830    CXXFLAGS="-g -O2"
21831  else
21832    CXXFLAGS="-g"
21833  fi
21834else
21835  if test "$GXX" = yes; then
21836    CXXFLAGS="-O2"
21837  else
21838    CXXFLAGS=
21839  fi
21840fi
21841ac_ext=cpp
21842ac_cpp='$CXXCPP $CPPFLAGS'
21843ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21844ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21845ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21846
21847
21848  ### Locate other tools
21849
21850  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
21851    ac_ext=m
21852ac_cpp='$OBJCPP $CPPFLAGS'
21853ac_compile='$OBJC -c $OBJCFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21854ac_link='$OBJC -o conftest$ac_exeext $OBJCFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21855ac_compiler_gnu=$ac_cv_objc_compiler_gnu
21856if test -n "$ac_tool_prefix"; then
21857  for ac_prog in gcc objcc objc cc CC
21858  do
21859    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
21860set dummy $ac_tool_prefix$ac_prog; ac_word=$2
21861{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21862$as_echo_n "checking for $ac_word... " >&6; }
21863if ${ac_cv_prog_OBJC+:} false; then :
21864  $as_echo_n "(cached) " >&6
21865else
21866  if test -n "$OBJC"; then
21867  ac_cv_prog_OBJC="$OBJC" # Let the user override the test.
21868else
21869as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21870for as_dir in $PATH
21871do
21872  IFS=$as_save_IFS
21873  test -z "$as_dir" && as_dir=.
21874    for ac_exec_ext in '' $ac_executable_extensions; do
21875  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21876    ac_cv_prog_OBJC="$ac_tool_prefix$ac_prog"
21877    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21878    break 2
21879  fi
21880done
21881  done
21882IFS=$as_save_IFS
21883
21884fi
21885fi
21886OBJC=$ac_cv_prog_OBJC
21887if test -n "$OBJC"; then
21888  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJC" >&5
21889$as_echo "$OBJC" >&6; }
21890else
21891  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21892$as_echo "no" >&6; }
21893fi
21894
21895
21896    test -n "$OBJC" && break
21897  done
21898fi
21899if test -z "$OBJC"; then
21900  ac_ct_OBJC=$OBJC
21901  for ac_prog in gcc objcc objc cc CC
21902do
21903  # Extract the first word of "$ac_prog", so it can be a program name with args.
21904set dummy $ac_prog; ac_word=$2
21905{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21906$as_echo_n "checking for $ac_word... " >&6; }
21907if ${ac_cv_prog_ac_ct_OBJC+:} false; then :
21908  $as_echo_n "(cached) " >&6
21909else
21910  if test -n "$ac_ct_OBJC"; then
21911  ac_cv_prog_ac_ct_OBJC="$ac_ct_OBJC" # Let the user override the test.
21912else
21913as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21914for as_dir in $PATH
21915do
21916  IFS=$as_save_IFS
21917  test -z "$as_dir" && as_dir=.
21918    for ac_exec_ext in '' $ac_executable_extensions; do
21919  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21920    ac_cv_prog_ac_ct_OBJC="$ac_prog"
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
21928fi
21929fi
21930ac_ct_OBJC=$ac_cv_prog_ac_ct_OBJC
21931if test -n "$ac_ct_OBJC"; then
21932  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJC" >&5
21933$as_echo "$ac_ct_OBJC" >&6; }
21934else
21935  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21936$as_echo "no" >&6; }
21937fi
21938
21939
21940  test -n "$ac_ct_OBJC" && break
21941done
21942
21943  if test "x$ac_ct_OBJC" = x; then
21944    OBJC="gcc"
21945  else
21946    case $cross_compiling:$ac_tool_warned in
21947yes:)
21948{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
21949$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
21950ac_tool_warned=yes ;;
21951esac
21952    OBJC=$ac_ct_OBJC
21953  fi
21954fi
21955
21956# Provide some information about the compiler.
21957$as_echo "$as_me:${as_lineno-$LINENO}: checking for Objective C compiler version" >&5
21958set X $ac_compile
21959ac_compiler=$2
21960for ac_option in --version -v -V -qversion; do
21961  { { ac_try="$ac_compiler $ac_option >&5"
21962case "(($ac_try" in
21963  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21964  *) ac_try_echo=$ac_try;;
21965esac
21966eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
21967$as_echo "$ac_try_echo"; } >&5
21968  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
21969  ac_status=$?
21970  if test -s conftest.err; then
21971    sed '10a\
21972... rest of stderr output deleted ...
21973         10q' conftest.err >conftest.er1
21974    cat conftest.er1 >&5
21975  fi
21976  rm -f conftest.er1 conftest.err
21977  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21978  test $ac_status = 0; }
21979done
21980
21981{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Objective C compiler" >&5
21982$as_echo_n "checking whether we are using the GNU Objective C compiler... " >&6; }
21983if ${ac_cv_objc_compiler_gnu+:} false; then :
21984  $as_echo_n "(cached) " >&6
21985else
21986  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21987/* end confdefs.h.  */
21988
21989int
21990main ()
21991{
21992#ifndef __GNUC__
21993       choke me
21994#endif
21995
21996  ;
21997  return 0;
21998}
21999_ACEOF
22000if ac_fn_objc_try_compile "$LINENO"; then :
22001  ac_compiler_gnu=yes
22002else
22003  ac_compiler_gnu=no
22004fi
22005rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22006ac_cv_objc_compiler_gnu=$ac_compiler_gnu
22007
22008fi
22009{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objc_compiler_gnu" >&5
22010$as_echo "$ac_cv_objc_compiler_gnu" >&6; }
22011if test $ac_compiler_gnu = yes; then
22012  GOBJC=yes
22013else
22014  GOBJC=
22015fi
22016ac_test_OBJCFLAGS=${OBJCFLAGS+set}
22017ac_save_OBJCFLAGS=$OBJCFLAGS
22018{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $OBJC accepts -g" >&5
22019$as_echo_n "checking whether $OBJC accepts -g... " >&6; }
22020if ${ac_cv_prog_objc_g+:} false; then :
22021  $as_echo_n "(cached) " >&6
22022else
22023  ac_save_objc_werror_flag=$ac_objc_werror_flag
22024   ac_objc_werror_flag=yes
22025   ac_cv_prog_objc_g=no
22026   OBJCFLAGS="-g"
22027   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22028/* end confdefs.h.  */
22029
22030int
22031main ()
22032{
22033
22034  ;
22035  return 0;
22036}
22037_ACEOF
22038if ac_fn_objc_try_compile "$LINENO"; then :
22039  ac_cv_prog_objc_g=yes
22040else
22041  OBJCFLAGS=""
22042      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22043/* end confdefs.h.  */
22044
22045int
22046main ()
22047{
22048
22049  ;
22050  return 0;
22051}
22052_ACEOF
22053if ac_fn_objc_try_compile "$LINENO"; then :
22054
22055else
22056  ac_objc_werror_flag=$ac_save_objc_werror_flag
22057	 OBJCFLAGS="-g"
22058	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22059/* end confdefs.h.  */
22060
22061int
22062main ()
22063{
22064
22065  ;
22066  return 0;
22067}
22068_ACEOF
22069if ac_fn_objc_try_compile "$LINENO"; then :
22070  ac_cv_prog_objc_g=yes
22071fi
22072rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22073fi
22074rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22075fi
22076rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22077   ac_objc_werror_flag=$ac_save_objc_werror_flag
22078fi
22079{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_objc_g" >&5
22080$as_echo "$ac_cv_prog_objc_g" >&6; }
22081if test "$ac_test_OBJCFLAGS" = set; then
22082  OBJCFLAGS=$ac_save_OBJCFLAGS
22083elif test $ac_cv_prog_objc_g = yes; then
22084  if test "$GOBJC" = yes; then
22085    OBJCFLAGS="-g -O2"
22086  else
22087    OBJCFLAGS="-g"
22088  fi
22089else
22090  if test "$GOBJC" = yes; then
22091    OBJCFLAGS="-O2"
22092  else
22093    OBJCFLAGS=
22094  fi
22095fi
22096ac_ext=cpp
22097ac_cpp='$CXXCPP $CPPFLAGS'
22098ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
22099ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
22100ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
22101
22102
22103  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22104
22105  # First separate the path from the arguments. This will split at the first
22106  # space.
22107  complete="$OBJC"
22108  path="${complete%% *}"
22109  tmp="$complete EOL"
22110  arguments="${tmp#* }"
22111
22112  # Input might be given as Windows format, start by converting to
22113  # unix format.
22114  new_path=`$CYGPATH -u "$path"`
22115
22116  # Now try to locate executable using which
22117  new_path=`$WHICH "$new_path" 2> /dev/null`
22118  # bat and cmd files are not always considered executable in cygwin causing which
22119  # to not find them
22120  if test "x$new_path" = x \
22121      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22122      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22123    new_path=`$CYGPATH -u "$path"`
22124  fi
22125  if test "x$new_path" = x; then
22126    # Oops. Which didn't find the executable.
22127    # The splitting of arguments from the executable at a space might have been incorrect,
22128    # since paths with space are more likely in Windows. Give it another try with the whole
22129    # argument.
22130    path="$complete"
22131    arguments="EOL"
22132    new_path=`$CYGPATH -u "$path"`
22133    new_path=`$WHICH "$new_path" 2> /dev/null`
22134    # bat and cmd files are not always considered executable in cygwin causing which
22135    # to not find them
22136    if test "x$new_path" = x \
22137        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22138        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22139      new_path=`$CYGPATH -u "$path"`
22140    fi
22141    if test "x$new_path" = x; then
22142      # It's still not found. Now this is an unrecoverable error.
22143      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
22144$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
22145      has_space=`$ECHO "$complete" | $GREP " "`
22146      if test "x$has_space" != x; then
22147        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22148$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22149      fi
22150      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
22151    fi
22152  fi
22153
22154  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22155  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22156  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22157  # "foo.exe" is OK but "foo" is an error.
22158  #
22159  # This test is therefore slightly more accurate than "test -f" to check for file presence.
22160  # It is also a way to make sure we got the proper file name for the real test later on.
22161  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22162  if test "x$test_shortpath" = x; then
22163    # Short path failed, file does not exist as specified.
22164    # Try adding .exe or .cmd
22165    if test -f "${new_path}.exe"; then
22166      input_to_shortpath="${new_path}.exe"
22167    elif test -f "${new_path}.cmd"; then
22168      input_to_shortpath="${new_path}.cmd"
22169    else
22170      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$new_path\", is invalid." >&5
22171$as_echo "$as_me: The path of OBJC, which resolves as \"$new_path\", is invalid." >&6;}
22172      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22173$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22174      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
22175    fi
22176  else
22177    input_to_shortpath="$new_path"
22178  fi
22179
22180  # Call helper function which possibly converts this using DOS-style short mode.
22181  # If so, the updated path is stored in $new_path.
22182  new_path="$input_to_shortpath"
22183
22184  input_path="$input_to_shortpath"
22185  # Check if we need to convert this using DOS-style short mode. If the path
22186  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22187  # take no chances and rewrite it.
22188  # Note: m4 eats our [], so we need to use [ and ] instead.
22189  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22190  if test "x$has_forbidden_chars" != x; then
22191    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22192    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22193    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22194    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22195      # Going to short mode and back again did indeed matter. Since short mode is
22196      # case insensitive, let's make it lowercase to improve readability.
22197      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22198      # Now convert it back to Unix-stile (cygpath)
22199      input_path=`$CYGPATH -u "$shortmode_path"`
22200      new_path="$input_path"
22201    fi
22202  fi
22203
22204  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22205  if test "x$test_cygdrive_prefix" = x; then
22206    # As a simple fix, exclude /usr/bin since it's not a real path.
22207    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22208      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22209      # a path prefixed by /cygdrive for fixpath to work.
22210      new_path="$CYGWIN_ROOT_PATH$input_path"
22211    fi
22212  fi
22213
22214  # remove trailing .exe if any
22215  new_path="${new_path/%.exe/}"
22216
22217  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22218
22219  # First separate the path from the arguments. This will split at the first
22220  # space.
22221  complete="$OBJC"
22222  path="${complete%% *}"
22223  tmp="$complete EOL"
22224  arguments="${tmp#* }"
22225
22226  # Input might be given as Windows format, start by converting to
22227  # unix format.
22228  new_path="$path"
22229
22230  windows_path="$new_path"
22231  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22232    unix_path=`$CYGPATH -u "$windows_path"`
22233    new_path="$unix_path"
22234  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22235    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22236    new_path="$unix_path"
22237  fi
22238
22239
22240  # Now try to locate executable using which
22241  new_path=`$WHICH "$new_path" 2> /dev/null`
22242
22243  if test "x$new_path" = x; then
22244    # Oops. Which didn't find the executable.
22245    # The splitting of arguments from the executable at a space might have been incorrect,
22246    # since paths with space are more likely in Windows. Give it another try with the whole
22247    # argument.
22248    path="$complete"
22249    arguments="EOL"
22250    new_path="$path"
22251
22252  windows_path="$new_path"
22253  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22254    unix_path=`$CYGPATH -u "$windows_path"`
22255    new_path="$unix_path"
22256  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22257    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22258    new_path="$unix_path"
22259  fi
22260
22261
22262    new_path=`$WHICH "$new_path" 2> /dev/null`
22263
22264    if test "x$new_path" = x; then
22265      # It's still not found. Now this is an unrecoverable error.
22266      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
22267$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
22268      has_space=`$ECHO "$complete" | $GREP " "`
22269      if test "x$has_space" != x; then
22270        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22271$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22272      fi
22273      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
22274    fi
22275  fi
22276
22277  # Now new_path has a complete unix path to the binary
22278  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22279    # Keep paths in /bin as-is, but remove trailing .exe if any
22280    new_path="${new_path/%.exe/}"
22281    # Do not save /bin paths to all_fixpath_prefixes!
22282  else
22283    # Not in mixed or Windows style, start by that.
22284    new_path=`cmd //c echo $new_path`
22285
22286  input_path="$new_path"
22287  # Check if we need to convert this using DOS-style short mode. If the path
22288  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22289  # take no chances and rewrite it.
22290  # Note: m4 eats our [], so we need to use [ and ] instead.
22291  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22292  if test "x$has_forbidden_chars" != x; then
22293    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22294    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22295  fi
22296
22297    # Output is in $new_path
22298
22299  windows_path="$new_path"
22300  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22301    unix_path=`$CYGPATH -u "$windows_path"`
22302    new_path="$unix_path"
22303  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22304    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22305    new_path="$unix_path"
22306  fi
22307
22308    # remove trailing .exe if any
22309    new_path="${new_path/%.exe/}"
22310
22311    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22312    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22313  fi
22314
22315  else
22316    # We're on a posix platform. Hooray! :)
22317    # First separate the path from the arguments. This will split at the first
22318    # space.
22319    complete="$OBJC"
22320    path="${complete%% *}"
22321    tmp="$complete EOL"
22322    arguments="${tmp#* }"
22323
22324    # Cannot rely on the command "which" here since it doesn't always work.
22325    is_absolute_path=`$ECHO "$path" | $GREP ^/`
22326    if test -z "$is_absolute_path"; then
22327      # Path to executable is not absolute. Find it.
22328      IFS_save="$IFS"
22329      IFS=:
22330      for p in $PATH; do
22331        if test -f "$p/$path" && test -x "$p/$path"; then
22332          new_path="$p/$path"
22333          break
22334        fi
22335      done
22336      IFS="$IFS_save"
22337    else
22338      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJC (as $path) failed, using $path directly." >&5
22339$as_echo "$as_me: Resolving OBJC (as $path) failed, using $path directly." >&6;}
22340      new_path="$path"
22341    fi
22342
22343    if test "x$new_path" = x; then
22344      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
22345$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
22346      has_space=`$ECHO "$complete" | $GREP " "`
22347      if test "x$has_space" != x; then
22348        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22349$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22350      fi
22351      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
22352    fi
22353  fi
22354
22355  # Now join together the path and the arguments once again
22356  if test "x$arguments" != xEOL; then
22357    new_complete="$new_path ${arguments% *}"
22358  else
22359    new_complete="$new_path"
22360  fi
22361
22362  if test "x$complete" != "x$new_complete"; then
22363    OBJC="$new_complete"
22364    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJC to \"$new_complete\"" >&5
22365$as_echo "$as_me: Rewriting OBJC to \"$new_complete\"" >&6;}
22366  fi
22367
22368  else
22369    OBJC=
22370  fi
22371
22372  # Restore the flags to the user specified values.
22373  # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
22374  CFLAGS="$ORG_CFLAGS"
22375  CXXFLAGS="$ORG_CXXFLAGS"
22376  OBJCFLAGS="$ORG_OBJCFLAGS"
22377
22378  LD="$CC"
22379  LDEXE="$CC"
22380  LDCXX="$CXX"
22381  LDEXECXX="$CXX"
22382
22383  # LDEXE is the linker to use, when creating executables.
22384
22385  # Linking C++ libraries.
22386
22387  # Linking C++ executables.
22388
22389
22390  if test "x$OPENJDK_TARGET_OS" != xwindows; then
22391    if test -n "$ac_tool_prefix"; then
22392  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
22393set dummy ${ac_tool_prefix}ar; ac_word=$2
22394{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22395$as_echo_n "checking for $ac_word... " >&6; }
22396if ${ac_cv_prog_AR+:} false; then :
22397  $as_echo_n "(cached) " >&6
22398else
22399  if test -n "$AR"; then
22400  ac_cv_prog_AR="$AR" # Let the user override the test.
22401else
22402as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22403for as_dir in $PATH
22404do
22405  IFS=$as_save_IFS
22406  test -z "$as_dir" && as_dir=.
22407    for ac_exec_ext in '' $ac_executable_extensions; do
22408  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22409    ac_cv_prog_AR="${ac_tool_prefix}ar"
22410    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22411    break 2
22412  fi
22413done
22414  done
22415IFS=$as_save_IFS
22416
22417fi
22418fi
22419AR=$ac_cv_prog_AR
22420if test -n "$AR"; then
22421  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
22422$as_echo "$AR" >&6; }
22423else
22424  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22425$as_echo "no" >&6; }
22426fi
22427
22428
22429fi
22430if test -z "$ac_cv_prog_AR"; then
22431  ac_ct_AR=$AR
22432  # Extract the first word of "ar", so it can be a program name with args.
22433set dummy ar; ac_word=$2
22434{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22435$as_echo_n "checking for $ac_word... " >&6; }
22436if ${ac_cv_prog_ac_ct_AR+:} false; then :
22437  $as_echo_n "(cached) " >&6
22438else
22439  if test -n "$ac_ct_AR"; then
22440  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
22441else
22442as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22443for as_dir in $PATH
22444do
22445  IFS=$as_save_IFS
22446  test -z "$as_dir" && as_dir=.
22447    for ac_exec_ext in '' $ac_executable_extensions; do
22448  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22449    ac_cv_prog_ac_ct_AR="ar"
22450    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22451    break 2
22452  fi
22453done
22454  done
22455IFS=$as_save_IFS
22456
22457fi
22458fi
22459ac_ct_AR=$ac_cv_prog_ac_ct_AR
22460if test -n "$ac_ct_AR"; then
22461  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
22462$as_echo "$ac_ct_AR" >&6; }
22463else
22464  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22465$as_echo "no" >&6; }
22466fi
22467
22468  if test "x$ac_ct_AR" = x; then
22469    AR=""
22470  else
22471    case $cross_compiling:$ac_tool_warned in
22472yes:)
22473{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
22474$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
22475ac_tool_warned=yes ;;
22476esac
22477    AR=$ac_ct_AR
22478  fi
22479else
22480  AR="$ac_cv_prog_AR"
22481fi
22482
22483
22484  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22485
22486  # First separate the path from the arguments. This will split at the first
22487  # space.
22488  complete="$AR"
22489  path="${complete%% *}"
22490  tmp="$complete EOL"
22491  arguments="${tmp#* }"
22492
22493  # Input might be given as Windows format, start by converting to
22494  # unix format.
22495  new_path=`$CYGPATH -u "$path"`
22496
22497  # Now try to locate executable using which
22498  new_path=`$WHICH "$new_path" 2> /dev/null`
22499  # bat and cmd files are not always considered executable in cygwin causing which
22500  # to not find them
22501  if test "x$new_path" = x \
22502      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22503      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22504    new_path=`$CYGPATH -u "$path"`
22505  fi
22506  if test "x$new_path" = x; then
22507    # Oops. Which didn't find the executable.
22508    # The splitting of arguments from the executable at a space might have been incorrect,
22509    # since paths with space are more likely in Windows. Give it another try with the whole
22510    # argument.
22511    path="$complete"
22512    arguments="EOL"
22513    new_path=`$CYGPATH -u "$path"`
22514    new_path=`$WHICH "$new_path" 2> /dev/null`
22515    # bat and cmd files are not always considered executable in cygwin causing which
22516    # to not find them
22517    if test "x$new_path" = x \
22518        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22519        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22520      new_path=`$CYGPATH -u "$path"`
22521    fi
22522    if test "x$new_path" = x; then
22523      # It's still not found. Now this is an unrecoverable error.
22524      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
22525$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
22526      has_space=`$ECHO "$complete" | $GREP " "`
22527      if test "x$has_space" != x; then
22528        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22529$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22530      fi
22531      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22532    fi
22533  fi
22534
22535  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22536  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22537  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22538  # "foo.exe" is OK but "foo" is an error.
22539  #
22540  # This test is therefore slightly more accurate than "test -f" to check for file presence.
22541  # It is also a way to make sure we got the proper file name for the real test later on.
22542  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22543  if test "x$test_shortpath" = x; then
22544    # Short path failed, file does not exist as specified.
22545    # Try adding .exe or .cmd
22546    if test -f "${new_path}.exe"; then
22547      input_to_shortpath="${new_path}.exe"
22548    elif test -f "${new_path}.cmd"; then
22549      input_to_shortpath="${new_path}.cmd"
22550    else
22551      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
22552$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
22553      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22554$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22555      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22556    fi
22557  else
22558    input_to_shortpath="$new_path"
22559  fi
22560
22561  # Call helper function which possibly converts this using DOS-style short mode.
22562  # If so, the updated path is stored in $new_path.
22563  new_path="$input_to_shortpath"
22564
22565  input_path="$input_to_shortpath"
22566  # Check if we need to convert this using DOS-style short mode. If the path
22567  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22568  # take no chances and rewrite it.
22569  # Note: m4 eats our [], so we need to use [ and ] instead.
22570  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22571  if test "x$has_forbidden_chars" != x; then
22572    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22573    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22574    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22575    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22576      # Going to short mode and back again did indeed matter. Since short mode is
22577      # case insensitive, let's make it lowercase to improve readability.
22578      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22579      # Now convert it back to Unix-stile (cygpath)
22580      input_path=`$CYGPATH -u "$shortmode_path"`
22581      new_path="$input_path"
22582    fi
22583  fi
22584
22585  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22586  if test "x$test_cygdrive_prefix" = x; then
22587    # As a simple fix, exclude /usr/bin since it's not a real path.
22588    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22589      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22590      # a path prefixed by /cygdrive for fixpath to work.
22591      new_path="$CYGWIN_ROOT_PATH$input_path"
22592    fi
22593  fi
22594
22595  # remove trailing .exe if any
22596  new_path="${new_path/%.exe/}"
22597
22598  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22599
22600  # First separate the path from the arguments. This will split at the first
22601  # space.
22602  complete="$AR"
22603  path="${complete%% *}"
22604  tmp="$complete EOL"
22605  arguments="${tmp#* }"
22606
22607  # Input might be given as Windows format, start by converting to
22608  # unix format.
22609  new_path="$path"
22610
22611  windows_path="$new_path"
22612  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22613    unix_path=`$CYGPATH -u "$windows_path"`
22614    new_path="$unix_path"
22615  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22616    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22617    new_path="$unix_path"
22618  fi
22619
22620
22621  # Now try to locate executable using which
22622  new_path=`$WHICH "$new_path" 2> /dev/null`
22623
22624  if test "x$new_path" = x; then
22625    # Oops. Which didn't find the executable.
22626    # The splitting of arguments from the executable at a space might have been incorrect,
22627    # since paths with space are more likely in Windows. Give it another try with the whole
22628    # argument.
22629    path="$complete"
22630    arguments="EOL"
22631    new_path="$path"
22632
22633  windows_path="$new_path"
22634  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22635    unix_path=`$CYGPATH -u "$windows_path"`
22636    new_path="$unix_path"
22637  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22638    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22639    new_path="$unix_path"
22640  fi
22641
22642
22643    new_path=`$WHICH "$new_path" 2> /dev/null`
22644
22645    if test "x$new_path" = x; then
22646      # It's still not found. Now this is an unrecoverable error.
22647      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
22648$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
22649      has_space=`$ECHO "$complete" | $GREP " "`
22650      if test "x$has_space" != x; then
22651        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22652$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22653      fi
22654      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22655    fi
22656  fi
22657
22658  # Now new_path has a complete unix path to the binary
22659  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22660    # Keep paths in /bin as-is, but remove trailing .exe if any
22661    new_path="${new_path/%.exe/}"
22662    # Do not save /bin paths to all_fixpath_prefixes!
22663  else
22664    # Not in mixed or Windows style, start by that.
22665    new_path=`cmd //c echo $new_path`
22666
22667  input_path="$new_path"
22668  # Check if we need to convert this using DOS-style short mode. If the path
22669  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22670  # take no chances and rewrite it.
22671  # Note: m4 eats our [], so we need to use [ and ] instead.
22672  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22673  if test "x$has_forbidden_chars" != x; then
22674    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22675    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22676  fi
22677
22678    # Output is in $new_path
22679
22680  windows_path="$new_path"
22681  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22682    unix_path=`$CYGPATH -u "$windows_path"`
22683    new_path="$unix_path"
22684  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22685    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22686    new_path="$unix_path"
22687  fi
22688
22689    # remove trailing .exe if any
22690    new_path="${new_path/%.exe/}"
22691
22692    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22693    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22694  fi
22695
22696  else
22697    # We're on a posix platform. Hooray! :)
22698    # First separate the path from the arguments. This will split at the first
22699    # space.
22700    complete="$AR"
22701    path="${complete%% *}"
22702    tmp="$complete EOL"
22703    arguments="${tmp#* }"
22704
22705    # Cannot rely on the command "which" here since it doesn't always work.
22706    is_absolute_path=`$ECHO "$path" | $GREP ^/`
22707    if test -z "$is_absolute_path"; then
22708      # Path to executable is not absolute. Find it.
22709      IFS_save="$IFS"
22710      IFS=:
22711      for p in $PATH; do
22712        if test -f "$p/$path" && test -x "$p/$path"; then
22713          new_path="$p/$path"
22714          break
22715        fi
22716      done
22717      IFS="$IFS_save"
22718    else
22719      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AR (as $path) failed, using $path directly." >&5
22720$as_echo "$as_me: Resolving AR (as $path) failed, using $path directly." >&6;}
22721      new_path="$path"
22722    fi
22723
22724    if test "x$new_path" = x; then
22725      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
22726$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
22727      has_space=`$ECHO "$complete" | $GREP " "`
22728      if test "x$has_space" != x; then
22729        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22730$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22731      fi
22732      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22733    fi
22734  fi
22735
22736  # Now join together the path and the arguments once again
22737  if test "x$arguments" != xEOL; then
22738    new_complete="$new_path ${arguments% *}"
22739  else
22740    new_complete="$new_path"
22741  fi
22742
22743  if test "x$complete" != "x$new_complete"; then
22744    AR="$new_complete"
22745    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
22746$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
22747  fi
22748
22749  fi
22750  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
22751    ARFLAGS="-r"
22752  else
22753    ARFLAGS=""
22754  fi
22755
22756
22757  # For hotspot, we need these in Windows mixed path; other platforms keep them the same
22758  HOTSPOT_CXX="$CXX"
22759  HOTSPOT_LD="$LD"
22760
22761
22762
22763  COMPILER_NAME=gcc
22764  COMPILER_TYPE=CC
22765  if test "x$OPENJDK_TARGET_OS" = xwindows; then :
22766
22767    # For now, assume that we are always compiling using cl.exe.
22768    CC_OUT_OPTION=-Fo
22769    EXE_OUT_OPTION=-out:
22770    LD_OUT_OPTION=-out:
22771    AR_OUT_OPTION=-out:
22772    # On Windows, reject /usr/bin/link (as determined in CYGWIN_LINK), which is a cygwin
22773    # program for something completely different.
22774    # Extract the first word of "link", so it can be a program name with args.
22775set dummy link; ac_word=$2
22776{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22777$as_echo_n "checking for $ac_word... " >&6; }
22778if ${ac_cv_prog_WINLD+:} false; then :
22779  $as_echo_n "(cached) " >&6
22780else
22781  if test -n "$WINLD"; then
22782  ac_cv_prog_WINLD="$WINLD" # Let the user override the test.
22783else
22784  ac_prog_rejected=no
22785as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22786for as_dir in $PATH
22787do
22788  IFS=$as_save_IFS
22789  test -z "$as_dir" && as_dir=.
22790    for ac_exec_ext in '' $ac_executable_extensions; do
22791  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22792    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
22793       ac_prog_rejected=yes
22794       continue
22795     fi
22796    ac_cv_prog_WINLD="link"
22797    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22798    break 2
22799  fi
22800done
22801  done
22802IFS=$as_save_IFS
22803
22804if test $ac_prog_rejected = yes; then
22805  # We found a bogon in the path, so make sure we never use it.
22806  set dummy $ac_cv_prog_WINLD
22807  shift
22808  if test $# != 0; then
22809    # We chose a different compiler from the bogus one.
22810    # However, it has the same basename, so the bogon will be chosen
22811    # first if we set WINLD to just the basename; use the full file name.
22812    shift
22813    ac_cv_prog_WINLD="$as_dir/$ac_word${1+' '}$@"
22814  fi
22815fi
22816fi
22817fi
22818WINLD=$ac_cv_prog_WINLD
22819if test -n "$WINLD"; then
22820  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINLD" >&5
22821$as_echo "$WINLD" >&6; }
22822else
22823  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22824$as_echo "no" >&6; }
22825fi
22826
22827
22828    # Since we must ignore the first found link, WINLD will contain
22829    # the full path to the link.exe program.
22830
22831  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22832
22833  # First separate the path from the arguments. This will split at the first
22834  # space.
22835  complete="$WINLD"
22836  path="${complete%% *}"
22837  tmp="$complete EOL"
22838  arguments="${tmp#* }"
22839
22840  # Input might be given as Windows format, start by converting to
22841  # unix format.
22842  new_path=`$CYGPATH -u "$path"`
22843
22844  # Now try to locate executable using which
22845  new_path=`$WHICH "$new_path" 2> /dev/null`
22846  # bat and cmd files are not always considered executable in cygwin causing which
22847  # to not find them
22848  if test "x$new_path" = x \
22849      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22850      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22851    new_path=`$CYGPATH -u "$path"`
22852  fi
22853  if test "x$new_path" = x; then
22854    # Oops. Which didn't find the executable.
22855    # The splitting of arguments from the executable at a space might have been incorrect,
22856    # since paths with space are more likely in Windows. Give it another try with the whole
22857    # argument.
22858    path="$complete"
22859    arguments="EOL"
22860    new_path=`$CYGPATH -u "$path"`
22861    new_path=`$WHICH "$new_path" 2> /dev/null`
22862    # bat and cmd files are not always considered executable in cygwin causing which
22863    # to not find them
22864    if test "x$new_path" = x \
22865        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22866        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22867      new_path=`$CYGPATH -u "$path"`
22868    fi
22869    if test "x$new_path" = x; then
22870      # It's still not found. Now this is an unrecoverable error.
22871      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
22872$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
22873      has_space=`$ECHO "$complete" | $GREP " "`
22874      if test "x$has_space" != x; then
22875        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22876$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22877      fi
22878      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22879    fi
22880  fi
22881
22882  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22883  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22884  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22885  # "foo.exe" is OK but "foo" is an error.
22886  #
22887  # This test is therefore slightly more accurate than "test -f" to check for file presence.
22888  # It is also a way to make sure we got the proper file name for the real test later on.
22889  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22890  if test "x$test_shortpath" = x; then
22891    # Short path failed, file does not exist as specified.
22892    # Try adding .exe or .cmd
22893    if test -f "${new_path}.exe"; then
22894      input_to_shortpath="${new_path}.exe"
22895    elif test -f "${new_path}.cmd"; then
22896      input_to_shortpath="${new_path}.cmd"
22897    else
22898      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$new_path\", is invalid." >&5
22899$as_echo "$as_me: The path of WINLD, which resolves as \"$new_path\", is invalid." >&6;}
22900      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22901$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22902      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22903    fi
22904  else
22905    input_to_shortpath="$new_path"
22906  fi
22907
22908  # Call helper function which possibly converts this using DOS-style short mode.
22909  # If so, the updated path is stored in $new_path.
22910  new_path="$input_to_shortpath"
22911
22912  input_path="$input_to_shortpath"
22913  # Check if we need to convert this using DOS-style short mode. If the path
22914  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22915  # take no chances and rewrite it.
22916  # Note: m4 eats our [], so we need to use [ and ] instead.
22917  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22918  if test "x$has_forbidden_chars" != x; then
22919    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22920    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22921    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22922    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22923      # Going to short mode and back again did indeed matter. Since short mode is
22924      # case insensitive, let's make it lowercase to improve readability.
22925      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22926      # Now convert it back to Unix-stile (cygpath)
22927      input_path=`$CYGPATH -u "$shortmode_path"`
22928      new_path="$input_path"
22929    fi
22930  fi
22931
22932  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22933  if test "x$test_cygdrive_prefix" = x; then
22934    # As a simple fix, exclude /usr/bin since it's not a real path.
22935    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22936      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22937      # a path prefixed by /cygdrive for fixpath to work.
22938      new_path="$CYGWIN_ROOT_PATH$input_path"
22939    fi
22940  fi
22941
22942  # remove trailing .exe if any
22943  new_path="${new_path/%.exe/}"
22944
22945  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22946
22947  # First separate the path from the arguments. This will split at the first
22948  # space.
22949  complete="$WINLD"
22950  path="${complete%% *}"
22951  tmp="$complete EOL"
22952  arguments="${tmp#* }"
22953
22954  # Input might be given as Windows format, start by converting to
22955  # unix format.
22956  new_path="$path"
22957
22958  windows_path="$new_path"
22959  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22960    unix_path=`$CYGPATH -u "$windows_path"`
22961    new_path="$unix_path"
22962  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22963    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22964    new_path="$unix_path"
22965  fi
22966
22967
22968  # Now try to locate executable using which
22969  new_path=`$WHICH "$new_path" 2> /dev/null`
22970
22971  if test "x$new_path" = x; then
22972    # Oops. Which didn't find the executable.
22973    # The splitting of arguments from the executable at a space might have been incorrect,
22974    # since paths with space are more likely in Windows. Give it another try with the whole
22975    # argument.
22976    path="$complete"
22977    arguments="EOL"
22978    new_path="$path"
22979
22980  windows_path="$new_path"
22981  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22982    unix_path=`$CYGPATH -u "$windows_path"`
22983    new_path="$unix_path"
22984  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22985    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22986    new_path="$unix_path"
22987  fi
22988
22989
22990    new_path=`$WHICH "$new_path" 2> /dev/null`
22991
22992    if test "x$new_path" = x; then
22993      # It's still not found. Now this is an unrecoverable error.
22994      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
22995$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
22996      has_space=`$ECHO "$complete" | $GREP " "`
22997      if test "x$has_space" != x; then
22998        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22999$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23000      fi
23001      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
23002    fi
23003  fi
23004
23005  # Now new_path has a complete unix path to the binary
23006  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23007    # Keep paths in /bin as-is, but remove trailing .exe if any
23008    new_path="${new_path/%.exe/}"
23009    # Do not save /bin paths to all_fixpath_prefixes!
23010  else
23011    # Not in mixed or Windows style, start by that.
23012    new_path=`cmd //c echo $new_path`
23013
23014  input_path="$new_path"
23015  # Check if we need to convert this using DOS-style short mode. If the path
23016  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23017  # take no chances and rewrite it.
23018  # Note: m4 eats our [], so we need to use [ and ] instead.
23019  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23020  if test "x$has_forbidden_chars" != x; then
23021    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23022    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23023  fi
23024
23025    # Output is in $new_path
23026
23027  windows_path="$new_path"
23028  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23029    unix_path=`$CYGPATH -u "$windows_path"`
23030    new_path="$unix_path"
23031  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23032    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23033    new_path="$unix_path"
23034  fi
23035
23036    # remove trailing .exe if any
23037    new_path="${new_path/%.exe/}"
23038
23039    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23040    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23041  fi
23042
23043  else
23044    # We're on a posix platform. Hooray! :)
23045    # First separate the path from the arguments. This will split at the first
23046    # space.
23047    complete="$WINLD"
23048    path="${complete%% *}"
23049    tmp="$complete EOL"
23050    arguments="${tmp#* }"
23051
23052    # Cannot rely on the command "which" here since it doesn't always work.
23053    is_absolute_path=`$ECHO "$path" | $GREP ^/`
23054    if test -z "$is_absolute_path"; then
23055      # Path to executable is not absolute. Find it.
23056      IFS_save="$IFS"
23057      IFS=:
23058      for p in $PATH; do
23059        if test -f "$p/$path" && test -x "$p/$path"; then
23060          new_path="$p/$path"
23061          break
23062        fi
23063      done
23064      IFS="$IFS_save"
23065    else
23066      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINLD (as $path) failed, using $path directly." >&5
23067$as_echo "$as_me: Resolving WINLD (as $path) failed, using $path directly." >&6;}
23068      new_path="$path"
23069    fi
23070
23071    if test "x$new_path" = x; then
23072      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
23073$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
23074      has_space=`$ECHO "$complete" | $GREP " "`
23075      if test "x$has_space" != x; then
23076        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23077$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23078      fi
23079      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
23080    fi
23081  fi
23082
23083  # Now join together the path and the arguments once again
23084  if test "x$arguments" != xEOL; then
23085    new_complete="$new_path ${arguments% *}"
23086  else
23087    new_complete="$new_path"
23088  fi
23089
23090  if test "x$complete" != "x$new_complete"; then
23091    WINLD="$new_complete"
23092    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINLD to \"$new_complete\"" >&5
23093$as_echo "$as_me: Rewriting WINLD to \"$new_complete\"" >&6;}
23094  fi
23095
23096    printf "Windows linker was found at $WINLD\n"
23097    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
23098$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
23099    "$WINLD" --version > /dev/null
23100    if test $? -eq 0 ; then
23101      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23102$as_echo "no" >&6; }
23103      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
23104    else
23105      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23106$as_echo "yes" >&6; }
23107    fi
23108    LD="$WINLD"
23109    LDEXE="$WINLD"
23110    LDCXX="$WINLD"
23111    LDEXECXX="$WINLD"
23112
23113    # Extract the first word of "mt", so it can be a program name with args.
23114set dummy mt; ac_word=$2
23115{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23116$as_echo_n "checking for $ac_word... " >&6; }
23117if ${ac_cv_prog_MT+:} false; then :
23118  $as_echo_n "(cached) " >&6
23119else
23120  if test -n "$MT"; then
23121  ac_cv_prog_MT="$MT" # Let the user override the test.
23122else
23123  ac_prog_rejected=no
23124as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23125for as_dir in $PATH
23126do
23127  IFS=$as_save_IFS
23128  test -z "$as_dir" && as_dir=.
23129    for ac_exec_ext in '' $ac_executable_extensions; do
23130  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23131    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
23132       ac_prog_rejected=yes
23133       continue
23134     fi
23135    ac_cv_prog_MT="mt"
23136    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23137    break 2
23138  fi
23139done
23140  done
23141IFS=$as_save_IFS
23142
23143if test $ac_prog_rejected = yes; then
23144  # We found a bogon in the path, so make sure we never use it.
23145  set dummy $ac_cv_prog_MT
23146  shift
23147  if test $# != 0; then
23148    # We chose a different compiler from the bogus one.
23149    # However, it has the same basename, so the bogon will be chosen
23150    # first if we set MT to just the basename; use the full file name.
23151    shift
23152    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
23153  fi
23154fi
23155fi
23156fi
23157MT=$ac_cv_prog_MT
23158if test -n "$MT"; then
23159  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
23160$as_echo "$MT" >&6; }
23161else
23162  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23163$as_echo "no" >&6; }
23164fi
23165
23166
23167
23168  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23169
23170  # First separate the path from the arguments. This will split at the first
23171  # space.
23172  complete="$MT"
23173  path="${complete%% *}"
23174  tmp="$complete EOL"
23175  arguments="${tmp#* }"
23176
23177  # Input might be given as Windows format, start by converting to
23178  # unix format.
23179  new_path=`$CYGPATH -u "$path"`
23180
23181  # Now try to locate executable using which
23182  new_path=`$WHICH "$new_path" 2> /dev/null`
23183  # bat and cmd files are not always considered executable in cygwin causing which
23184  # to not find them
23185  if test "x$new_path" = x \
23186      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23187      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23188    new_path=`$CYGPATH -u "$path"`
23189  fi
23190  if test "x$new_path" = x; then
23191    # Oops. Which didn't find the executable.
23192    # The splitting of arguments from the executable at a space might have been incorrect,
23193    # since paths with space are more likely in Windows. Give it another try with the whole
23194    # argument.
23195    path="$complete"
23196    arguments="EOL"
23197    new_path=`$CYGPATH -u "$path"`
23198    new_path=`$WHICH "$new_path" 2> /dev/null`
23199    # bat and cmd files are not always considered executable in cygwin causing which
23200    # to not find them
23201    if test "x$new_path" = x \
23202        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23203        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23204      new_path=`$CYGPATH -u "$path"`
23205    fi
23206    if test "x$new_path" = x; then
23207      # It's still not found. Now this is an unrecoverable error.
23208      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
23209$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
23210      has_space=`$ECHO "$complete" | $GREP " "`
23211      if test "x$has_space" != x; then
23212        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23213$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23214      fi
23215      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
23216    fi
23217  fi
23218
23219  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23220  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23221  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23222  # "foo.exe" is OK but "foo" is an error.
23223  #
23224  # This test is therefore slightly more accurate than "test -f" to check for file presence.
23225  # It is also a way to make sure we got the proper file name for the real test later on.
23226  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23227  if test "x$test_shortpath" = x; then
23228    # Short path failed, file does not exist as specified.
23229    # Try adding .exe or .cmd
23230    if test -f "${new_path}.exe"; then
23231      input_to_shortpath="${new_path}.exe"
23232    elif test -f "${new_path}.cmd"; then
23233      input_to_shortpath="${new_path}.cmd"
23234    else
23235      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
23236$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
23237      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23238$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23239      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
23240    fi
23241  else
23242    input_to_shortpath="$new_path"
23243  fi
23244
23245  # Call helper function which possibly converts this using DOS-style short mode.
23246  # If so, the updated path is stored in $new_path.
23247  new_path="$input_to_shortpath"
23248
23249  input_path="$input_to_shortpath"
23250  # Check if we need to convert this using DOS-style short mode. If the path
23251  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23252  # take no chances and rewrite it.
23253  # Note: m4 eats our [], so we need to use [ and ] instead.
23254  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23255  if test "x$has_forbidden_chars" != x; then
23256    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23257    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23258    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23259    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23260      # Going to short mode and back again did indeed matter. Since short mode is
23261      # case insensitive, let's make it lowercase to improve readability.
23262      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23263      # Now convert it back to Unix-stile (cygpath)
23264      input_path=`$CYGPATH -u "$shortmode_path"`
23265      new_path="$input_path"
23266    fi
23267  fi
23268
23269  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23270  if test "x$test_cygdrive_prefix" = x; then
23271    # As a simple fix, exclude /usr/bin since it's not a real path.
23272    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23273      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23274      # a path prefixed by /cygdrive for fixpath to work.
23275      new_path="$CYGWIN_ROOT_PATH$input_path"
23276    fi
23277  fi
23278
23279  # remove trailing .exe if any
23280  new_path="${new_path/%.exe/}"
23281
23282  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23283
23284  # First separate the path from the arguments. This will split at the first
23285  # space.
23286  complete="$MT"
23287  path="${complete%% *}"
23288  tmp="$complete EOL"
23289  arguments="${tmp#* }"
23290
23291  # Input might be given as Windows format, start by converting to
23292  # unix format.
23293  new_path="$path"
23294
23295  windows_path="$new_path"
23296  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23297    unix_path=`$CYGPATH -u "$windows_path"`
23298    new_path="$unix_path"
23299  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23300    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23301    new_path="$unix_path"
23302  fi
23303
23304
23305  # Now try to locate executable using which
23306  new_path=`$WHICH "$new_path" 2> /dev/null`
23307
23308  if test "x$new_path" = x; then
23309    # Oops. Which didn't find the executable.
23310    # The splitting of arguments from the executable at a space might have been incorrect,
23311    # since paths with space are more likely in Windows. Give it another try with the whole
23312    # argument.
23313    path="$complete"
23314    arguments="EOL"
23315    new_path="$path"
23316
23317  windows_path="$new_path"
23318  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23319    unix_path=`$CYGPATH -u "$windows_path"`
23320    new_path="$unix_path"
23321  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23322    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23323    new_path="$unix_path"
23324  fi
23325
23326
23327    new_path=`$WHICH "$new_path" 2> /dev/null`
23328
23329    if test "x$new_path" = x; then
23330      # It's still not found. Now this is an unrecoverable error.
23331      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
23332$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
23333      has_space=`$ECHO "$complete" | $GREP " "`
23334      if test "x$has_space" != x; then
23335        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23336$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23337      fi
23338      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
23339    fi
23340  fi
23341
23342  # Now new_path has a complete unix path to the binary
23343  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23344    # Keep paths in /bin as-is, but remove trailing .exe if any
23345    new_path="${new_path/%.exe/}"
23346    # Do not save /bin paths to all_fixpath_prefixes!
23347  else
23348    # Not in mixed or Windows style, start by that.
23349    new_path=`cmd //c echo $new_path`
23350
23351  input_path="$new_path"
23352  # Check if we need to convert this using DOS-style short mode. If the path
23353  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23354  # take no chances and rewrite it.
23355  # Note: m4 eats our [], so we need to use [ and ] instead.
23356  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23357  if test "x$has_forbidden_chars" != x; then
23358    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23359    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23360  fi
23361
23362    # Output is in $new_path
23363
23364  windows_path="$new_path"
23365  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23366    unix_path=`$CYGPATH -u "$windows_path"`
23367    new_path="$unix_path"
23368  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23369    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23370    new_path="$unix_path"
23371  fi
23372
23373    # remove trailing .exe if any
23374    new_path="${new_path/%.exe/}"
23375
23376    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23377    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23378  fi
23379
23380  else
23381    # We're on a posix platform. Hooray! :)
23382    # First separate the path from the arguments. This will split at the first
23383    # space.
23384    complete="$MT"
23385    path="${complete%% *}"
23386    tmp="$complete EOL"
23387    arguments="${tmp#* }"
23388
23389    # Cannot rely on the command "which" here since it doesn't always work.
23390    is_absolute_path=`$ECHO "$path" | $GREP ^/`
23391    if test -z "$is_absolute_path"; then
23392      # Path to executable is not absolute. Find it.
23393      IFS_save="$IFS"
23394      IFS=:
23395      for p in $PATH; do
23396        if test -f "$p/$path" && test -x "$p/$path"; then
23397          new_path="$p/$path"
23398          break
23399        fi
23400      done
23401      IFS="$IFS_save"
23402    else
23403      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MT (as $path) failed, using $path directly." >&5
23404$as_echo "$as_me: Resolving MT (as $path) failed, using $path directly." >&6;}
23405      new_path="$path"
23406    fi
23407
23408    if test "x$new_path" = x; then
23409      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
23410$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
23411      has_space=`$ECHO "$complete" | $GREP " "`
23412      if test "x$has_space" != x; then
23413        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23414$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23415      fi
23416      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
23417    fi
23418  fi
23419
23420  # Now join together the path and the arguments once again
23421  if test "x$arguments" != xEOL; then
23422    new_complete="$new_path ${arguments% *}"
23423  else
23424    new_complete="$new_path"
23425  fi
23426
23427  if test "x$complete" != "x$new_complete"; then
23428    MT="$new_complete"
23429    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
23430$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
23431  fi
23432
23433    # The resource compiler
23434    # Extract the first word of "rc", so it can be a program name with args.
23435set dummy rc; ac_word=$2
23436{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23437$as_echo_n "checking for $ac_word... " >&6; }
23438if ${ac_cv_prog_RC+:} false; then :
23439  $as_echo_n "(cached) " >&6
23440else
23441  if test -n "$RC"; then
23442  ac_cv_prog_RC="$RC" # Let the user override the test.
23443else
23444  ac_prog_rejected=no
23445as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23446for as_dir in $PATH
23447do
23448  IFS=$as_save_IFS
23449  test -z "$as_dir" && as_dir=.
23450    for ac_exec_ext in '' $ac_executable_extensions; do
23451  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23452    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
23453       ac_prog_rejected=yes
23454       continue
23455     fi
23456    ac_cv_prog_RC="rc"
23457    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23458    break 2
23459  fi
23460done
23461  done
23462IFS=$as_save_IFS
23463
23464if test $ac_prog_rejected = yes; then
23465  # We found a bogon in the path, so make sure we never use it.
23466  set dummy $ac_cv_prog_RC
23467  shift
23468  if test $# != 0; then
23469    # We chose a different compiler from the bogus one.
23470    # However, it has the same basename, so the bogon will be chosen
23471    # first if we set RC to just the basename; use the full file name.
23472    shift
23473    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
23474  fi
23475fi
23476fi
23477fi
23478RC=$ac_cv_prog_RC
23479if test -n "$RC"; then
23480  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
23481$as_echo "$RC" >&6; }
23482else
23483  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23484$as_echo "no" >&6; }
23485fi
23486
23487
23488
23489  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23490
23491  # First separate the path from the arguments. This will split at the first
23492  # space.
23493  complete="$RC"
23494  path="${complete%% *}"
23495  tmp="$complete EOL"
23496  arguments="${tmp#* }"
23497
23498  # Input might be given as Windows format, start by converting to
23499  # unix format.
23500  new_path=`$CYGPATH -u "$path"`
23501
23502  # Now try to locate executable using which
23503  new_path=`$WHICH "$new_path" 2> /dev/null`
23504  # bat and cmd files are not always considered executable in cygwin causing which
23505  # to not find them
23506  if test "x$new_path" = x \
23507      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23508      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23509    new_path=`$CYGPATH -u "$path"`
23510  fi
23511  if test "x$new_path" = x; then
23512    # Oops. Which didn't find the executable.
23513    # The splitting of arguments from the executable at a space might have been incorrect,
23514    # since paths with space are more likely in Windows. Give it another try with the whole
23515    # argument.
23516    path="$complete"
23517    arguments="EOL"
23518    new_path=`$CYGPATH -u "$path"`
23519    new_path=`$WHICH "$new_path" 2> /dev/null`
23520    # bat and cmd files are not always considered executable in cygwin causing which
23521    # to not find them
23522    if test "x$new_path" = x \
23523        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23524        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23525      new_path=`$CYGPATH -u "$path"`
23526    fi
23527    if test "x$new_path" = x; then
23528      # It's still not found. Now this is an unrecoverable error.
23529      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
23530$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
23531      has_space=`$ECHO "$complete" | $GREP " "`
23532      if test "x$has_space" != x; then
23533        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23534$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23535      fi
23536      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23537    fi
23538  fi
23539
23540  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23541  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23542  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23543  # "foo.exe" is OK but "foo" is an error.
23544  #
23545  # This test is therefore slightly more accurate than "test -f" to check for file presence.
23546  # It is also a way to make sure we got the proper file name for the real test later on.
23547  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23548  if test "x$test_shortpath" = x; then
23549    # Short path failed, file does not exist as specified.
23550    # Try adding .exe or .cmd
23551    if test -f "${new_path}.exe"; then
23552      input_to_shortpath="${new_path}.exe"
23553    elif test -f "${new_path}.cmd"; then
23554      input_to_shortpath="${new_path}.cmd"
23555    else
23556      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
23557$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
23558      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23559$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23560      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23561    fi
23562  else
23563    input_to_shortpath="$new_path"
23564  fi
23565
23566  # Call helper function which possibly converts this using DOS-style short mode.
23567  # If so, the updated path is stored in $new_path.
23568  new_path="$input_to_shortpath"
23569
23570  input_path="$input_to_shortpath"
23571  # Check if we need to convert this using DOS-style short mode. If the path
23572  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23573  # take no chances and rewrite it.
23574  # Note: m4 eats our [], so we need to use [ and ] instead.
23575  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23576  if test "x$has_forbidden_chars" != x; then
23577    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23578    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23579    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23580    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23581      # Going to short mode and back again did indeed matter. Since short mode is
23582      # case insensitive, let's make it lowercase to improve readability.
23583      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23584      # Now convert it back to Unix-stile (cygpath)
23585      input_path=`$CYGPATH -u "$shortmode_path"`
23586      new_path="$input_path"
23587    fi
23588  fi
23589
23590  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23591  if test "x$test_cygdrive_prefix" = x; then
23592    # As a simple fix, exclude /usr/bin since it's not a real path.
23593    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23594      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23595      # a path prefixed by /cygdrive for fixpath to work.
23596      new_path="$CYGWIN_ROOT_PATH$input_path"
23597    fi
23598  fi
23599
23600  # remove trailing .exe if any
23601  new_path="${new_path/%.exe/}"
23602
23603  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23604
23605  # First separate the path from the arguments. This will split at the first
23606  # space.
23607  complete="$RC"
23608  path="${complete%% *}"
23609  tmp="$complete EOL"
23610  arguments="${tmp#* }"
23611
23612  # Input might be given as Windows format, start by converting to
23613  # unix format.
23614  new_path="$path"
23615
23616  windows_path="$new_path"
23617  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23618    unix_path=`$CYGPATH -u "$windows_path"`
23619    new_path="$unix_path"
23620  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23621    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23622    new_path="$unix_path"
23623  fi
23624
23625
23626  # Now try to locate executable using which
23627  new_path=`$WHICH "$new_path" 2> /dev/null`
23628
23629  if test "x$new_path" = x; then
23630    # Oops. Which didn't find the executable.
23631    # The splitting of arguments from the executable at a space might have been incorrect,
23632    # since paths with space are more likely in Windows. Give it another try with the whole
23633    # argument.
23634    path="$complete"
23635    arguments="EOL"
23636    new_path="$path"
23637
23638  windows_path="$new_path"
23639  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23640    unix_path=`$CYGPATH -u "$windows_path"`
23641    new_path="$unix_path"
23642  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23643    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23644    new_path="$unix_path"
23645  fi
23646
23647
23648    new_path=`$WHICH "$new_path" 2> /dev/null`
23649
23650    if test "x$new_path" = x; then
23651      # It's still not found. Now this is an unrecoverable error.
23652      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
23653$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
23654      has_space=`$ECHO "$complete" | $GREP " "`
23655      if test "x$has_space" != x; then
23656        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23657$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23658      fi
23659      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23660    fi
23661  fi
23662
23663  # Now new_path has a complete unix path to the binary
23664  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23665    # Keep paths in /bin as-is, but remove trailing .exe if any
23666    new_path="${new_path/%.exe/}"
23667    # Do not save /bin paths to all_fixpath_prefixes!
23668  else
23669    # Not in mixed or Windows style, start by that.
23670    new_path=`cmd //c echo $new_path`
23671
23672  input_path="$new_path"
23673  # Check if we need to convert this using DOS-style short mode. If the path
23674  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23675  # take no chances and rewrite it.
23676  # Note: m4 eats our [], so we need to use [ and ] instead.
23677  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23678  if test "x$has_forbidden_chars" != x; then
23679    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23680    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23681  fi
23682
23683    # Output is in $new_path
23684
23685  windows_path="$new_path"
23686  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23687    unix_path=`$CYGPATH -u "$windows_path"`
23688    new_path="$unix_path"
23689  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23690    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23691    new_path="$unix_path"
23692  fi
23693
23694    # remove trailing .exe if any
23695    new_path="${new_path/%.exe/}"
23696
23697    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23698    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23699  fi
23700
23701  else
23702    # We're on a posix platform. Hooray! :)
23703    # First separate the path from the arguments. This will split at the first
23704    # space.
23705    complete="$RC"
23706    path="${complete%% *}"
23707    tmp="$complete EOL"
23708    arguments="${tmp#* }"
23709
23710    # Cannot rely on the command "which" here since it doesn't always work.
23711    is_absolute_path=`$ECHO "$path" | $GREP ^/`
23712    if test -z "$is_absolute_path"; then
23713      # Path to executable is not absolute. Find it.
23714      IFS_save="$IFS"
23715      IFS=:
23716      for p in $PATH; do
23717        if test -f "$p/$path" && test -x "$p/$path"; then
23718          new_path="$p/$path"
23719          break
23720        fi
23721      done
23722      IFS="$IFS_save"
23723    else
23724      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving RC (as $path) failed, using $path directly." >&5
23725$as_echo "$as_me: Resolving RC (as $path) failed, using $path directly." >&6;}
23726      new_path="$path"
23727    fi
23728
23729    if test "x$new_path" = x; then
23730      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
23731$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
23732      has_space=`$ECHO "$complete" | $GREP " "`
23733      if test "x$has_space" != x; then
23734        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23735$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23736      fi
23737      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23738    fi
23739  fi
23740
23741  # Now join together the path and the arguments once again
23742  if test "x$arguments" != xEOL; then
23743    new_complete="$new_path ${arguments% *}"
23744  else
23745    new_complete="$new_path"
23746  fi
23747
23748  if test "x$complete" != "x$new_complete"; then
23749    RC="$new_complete"
23750    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
23751$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
23752  fi
23753
23754
23755    # For hotspot, we need these in Windows mixed path,
23756    # so rewrite them all. Need added .exe suffix.
23757    HOTSPOT_CXX="$CXX.exe"
23758    HOTSPOT_LD="$LD.exe"
23759    HOTSPOT_MT="$MT.exe"
23760    HOTSPOT_RC="$RC.exe"
23761
23762  unix_path="$HOTSPOT_CXX"
23763  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23764    windows_path=`$CYGPATH -m "$unix_path"`
23765    HOTSPOT_CXX="$windows_path"
23766  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23767    windows_path=`cmd //c echo $unix_path`
23768    HOTSPOT_CXX="$windows_path"
23769  fi
23770
23771
23772  unix_path="$HOTSPOT_LD"
23773  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23774    windows_path=`$CYGPATH -m "$unix_path"`
23775    HOTSPOT_LD="$windows_path"
23776  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23777    windows_path=`cmd //c echo $unix_path`
23778    HOTSPOT_LD="$windows_path"
23779  fi
23780
23781
23782  unix_path="$HOTSPOT_MT"
23783  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23784    windows_path=`$CYGPATH -m "$unix_path"`
23785    HOTSPOT_MT="$windows_path"
23786  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23787    windows_path=`cmd //c echo $unix_path`
23788    HOTSPOT_MT="$windows_path"
23789  fi
23790
23791
23792  unix_path="$HOTSPOT_RC"
23793  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23794    windows_path=`$CYGPATH -m "$unix_path"`
23795    HOTSPOT_RC="$windows_path"
23796  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23797    windows_path=`cmd //c echo $unix_path`
23798    HOTSPOT_RC="$windows_path"
23799  fi
23800
23801
23802
23803
23804    RC_FLAGS="-nologo -l 0x409 -r"
23805    if test "x$VARIANT" = xOPT; then :
23806
23807    RC_FLAGS="$RC_FLAGS -d NDEBUG"
23808
23809fi
23810
23811  # The version variables used to create RC_FLAGS may be overridden
23812  # in a custom configure script, or possibly the command line.
23813  # Let those variables be expanded at make time in spec.gmk.
23814  # The \$ are escaped to the shell, and the $(...) variables
23815  # are evaluated by make.
23816  RC_FLAGS="$RC_FLAGS \
23817      -d \"JDK_BUILD_ID=\$(FULL_VERSION)\" \
23818      -d \"JDK_COMPANY=\$(COMPANY_NAME)\" \
23819      -d \"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
23820      -d \"JDK_VER=\$(JDK_MINOR_VERSION).\$(JDK_MICRO_VERSION).\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0).\$(COOKED_BUILD_NUMBER)\" \
23821      -d \"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
23822      -d \"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(JDK_MINOR_VERSION) \$(JDK_UPDATE_META_TAG)\" \
23823      -d \"JDK_FVER=\$(JDK_MINOR_VERSION),\$(JDK_MICRO_VERSION),\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0),\$(COOKED_BUILD_NUMBER)\""
23824
23825  # lib.exe is used to create static libraries.
23826  # Extract the first word of "lib", so it can be a program name with args.
23827set dummy lib; ac_word=$2
23828{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23829$as_echo_n "checking for $ac_word... " >&6; }
23830if ${ac_cv_prog_WINAR+:} false; then :
23831  $as_echo_n "(cached) " >&6
23832else
23833  if test -n "$WINAR"; then
23834  ac_cv_prog_WINAR="$WINAR" # Let the user override the test.
23835else
23836as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23837for as_dir in $PATH
23838do
23839  IFS=$as_save_IFS
23840  test -z "$as_dir" && as_dir=.
23841    for ac_exec_ext in '' $ac_executable_extensions; do
23842  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23843    ac_cv_prog_WINAR="lib"
23844    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23845    break 2
23846  fi
23847done
23848  done
23849IFS=$as_save_IFS
23850
23851fi
23852fi
23853WINAR=$ac_cv_prog_WINAR
23854if test -n "$WINAR"; then
23855  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINAR" >&5
23856$as_echo "$WINAR" >&6; }
23857else
23858  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23859$as_echo "no" >&6; }
23860fi
23861
23862
23863
23864  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23865
23866  # First separate the path from the arguments. This will split at the first
23867  # space.
23868  complete="$WINAR"
23869  path="${complete%% *}"
23870  tmp="$complete EOL"
23871  arguments="${tmp#* }"
23872
23873  # Input might be given as Windows format, start by converting to
23874  # unix format.
23875  new_path=`$CYGPATH -u "$path"`
23876
23877  # Now try to locate executable using which
23878  new_path=`$WHICH "$new_path" 2> /dev/null`
23879  # bat and cmd files are not always considered executable in cygwin causing which
23880  # to not find them
23881  if test "x$new_path" = x \
23882      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23883      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23884    new_path=`$CYGPATH -u "$path"`
23885  fi
23886  if test "x$new_path" = x; then
23887    # Oops. Which didn't find the executable.
23888    # The splitting of arguments from the executable at a space might have been incorrect,
23889    # since paths with space are more likely in Windows. Give it another try with the whole
23890    # argument.
23891    path="$complete"
23892    arguments="EOL"
23893    new_path=`$CYGPATH -u "$path"`
23894    new_path=`$WHICH "$new_path" 2> /dev/null`
23895    # bat and cmd files are not always considered executable in cygwin causing which
23896    # to not find them
23897    if test "x$new_path" = x \
23898        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23899        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23900      new_path=`$CYGPATH -u "$path"`
23901    fi
23902    if test "x$new_path" = x; then
23903      # It's still not found. Now this is an unrecoverable error.
23904      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
23905$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
23906      has_space=`$ECHO "$complete" | $GREP " "`
23907      if test "x$has_space" != x; then
23908        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23909$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23910      fi
23911      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
23912    fi
23913  fi
23914
23915  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23916  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23917  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23918  # "foo.exe" is OK but "foo" is an error.
23919  #
23920  # This test is therefore slightly more accurate than "test -f" to check for file presence.
23921  # It is also a way to make sure we got the proper file name for the real test later on.
23922  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23923  if test "x$test_shortpath" = x; then
23924    # Short path failed, file does not exist as specified.
23925    # Try adding .exe or .cmd
23926    if test -f "${new_path}.exe"; then
23927      input_to_shortpath="${new_path}.exe"
23928    elif test -f "${new_path}.cmd"; then
23929      input_to_shortpath="${new_path}.cmd"
23930    else
23931      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$new_path\", is invalid." >&5
23932$as_echo "$as_me: The path of WINAR, which resolves as \"$new_path\", is invalid." >&6;}
23933      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23934$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23935      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
23936    fi
23937  else
23938    input_to_shortpath="$new_path"
23939  fi
23940
23941  # Call helper function which possibly converts this using DOS-style short mode.
23942  # If so, the updated path is stored in $new_path.
23943  new_path="$input_to_shortpath"
23944
23945  input_path="$input_to_shortpath"
23946  # Check if we need to convert this using DOS-style short mode. If the path
23947  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23948  # take no chances and rewrite it.
23949  # Note: m4 eats our [], so we need to use [ and ] instead.
23950  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23951  if test "x$has_forbidden_chars" != x; then
23952    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23953    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23954    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23955    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23956      # Going to short mode and back again did indeed matter. Since short mode is
23957      # case insensitive, let's make it lowercase to improve readability.
23958      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23959      # Now convert it back to Unix-stile (cygpath)
23960      input_path=`$CYGPATH -u "$shortmode_path"`
23961      new_path="$input_path"
23962    fi
23963  fi
23964
23965  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23966  if test "x$test_cygdrive_prefix" = x; then
23967    # As a simple fix, exclude /usr/bin since it's not a real path.
23968    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23969      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23970      # a path prefixed by /cygdrive for fixpath to work.
23971      new_path="$CYGWIN_ROOT_PATH$input_path"
23972    fi
23973  fi
23974
23975  # remove trailing .exe if any
23976  new_path="${new_path/%.exe/}"
23977
23978  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23979
23980  # First separate the path from the arguments. This will split at the first
23981  # space.
23982  complete="$WINAR"
23983  path="${complete%% *}"
23984  tmp="$complete EOL"
23985  arguments="${tmp#* }"
23986
23987  # Input might be given as Windows format, start by converting to
23988  # unix format.
23989  new_path="$path"
23990
23991  windows_path="$new_path"
23992  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23993    unix_path=`$CYGPATH -u "$windows_path"`
23994    new_path="$unix_path"
23995  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23996    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23997    new_path="$unix_path"
23998  fi
23999
24000
24001  # Now try to locate executable using which
24002  new_path=`$WHICH "$new_path" 2> /dev/null`
24003
24004  if test "x$new_path" = x; then
24005    # Oops. Which didn't find the executable.
24006    # The splitting of arguments from the executable at a space might have been incorrect,
24007    # since paths with space are more likely in Windows. Give it another try with the whole
24008    # argument.
24009    path="$complete"
24010    arguments="EOL"
24011    new_path="$path"
24012
24013  windows_path="$new_path"
24014  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24015    unix_path=`$CYGPATH -u "$windows_path"`
24016    new_path="$unix_path"
24017  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24018    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24019    new_path="$unix_path"
24020  fi
24021
24022
24023    new_path=`$WHICH "$new_path" 2> /dev/null`
24024
24025    if test "x$new_path" = x; then
24026      # It's still not found. Now this is an unrecoverable error.
24027      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
24028$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
24029      has_space=`$ECHO "$complete" | $GREP " "`
24030      if test "x$has_space" != x; then
24031        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24032$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24033      fi
24034      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
24035    fi
24036  fi
24037
24038  # Now new_path has a complete unix path to the binary
24039  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24040    # Keep paths in /bin as-is, but remove trailing .exe if any
24041    new_path="${new_path/%.exe/}"
24042    # Do not save /bin paths to all_fixpath_prefixes!
24043  else
24044    # Not in mixed or Windows style, start by that.
24045    new_path=`cmd //c echo $new_path`
24046
24047  input_path="$new_path"
24048  # Check if we need to convert this using DOS-style short mode. If the path
24049  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24050  # take no chances and rewrite it.
24051  # Note: m4 eats our [], so we need to use [ and ] instead.
24052  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24053  if test "x$has_forbidden_chars" != x; then
24054    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24055    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24056  fi
24057
24058    # Output is in $new_path
24059
24060  windows_path="$new_path"
24061  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24062    unix_path=`$CYGPATH -u "$windows_path"`
24063    new_path="$unix_path"
24064  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24065    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24066    new_path="$unix_path"
24067  fi
24068
24069    # remove trailing .exe if any
24070    new_path="${new_path/%.exe/}"
24071
24072    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24073    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24074  fi
24075
24076  else
24077    # We're on a posix platform. Hooray! :)
24078    # First separate the path from the arguments. This will split at the first
24079    # space.
24080    complete="$WINAR"
24081    path="${complete%% *}"
24082    tmp="$complete EOL"
24083    arguments="${tmp#* }"
24084
24085    # Cannot rely on the command "which" here since it doesn't always work.
24086    is_absolute_path=`$ECHO "$path" | $GREP ^/`
24087    if test -z "$is_absolute_path"; then
24088      # Path to executable is not absolute. Find it.
24089      IFS_save="$IFS"
24090      IFS=:
24091      for p in $PATH; do
24092        if test -f "$p/$path" && test -x "$p/$path"; then
24093          new_path="$p/$path"
24094          break
24095        fi
24096      done
24097      IFS="$IFS_save"
24098    else
24099      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINAR (as $path) failed, using $path directly." >&5
24100$as_echo "$as_me: Resolving WINAR (as $path) failed, using $path directly." >&6;}
24101      new_path="$path"
24102    fi
24103
24104    if test "x$new_path" = x; then
24105      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
24106$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
24107      has_space=`$ECHO "$complete" | $GREP " "`
24108      if test "x$has_space" != x; then
24109        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24110$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24111      fi
24112      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
24113    fi
24114  fi
24115
24116  # Now join together the path and the arguments once again
24117  if test "x$arguments" != xEOL; then
24118    new_complete="$new_path ${arguments% *}"
24119  else
24120    new_complete="$new_path"
24121  fi
24122
24123  if test "x$complete" != "x$new_complete"; then
24124    WINAR="$new_complete"
24125    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINAR to \"$new_complete\"" >&5
24126$as_echo "$as_me: Rewriting WINAR to \"$new_complete\"" >&6;}
24127  fi
24128
24129  AR="$WINAR"
24130  ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
24131
24132  # Extract the first word of "dumpbin", so it can be a program name with args.
24133set dummy dumpbin; ac_word=$2
24134{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24135$as_echo_n "checking for $ac_word... " >&6; }
24136if ${ac_cv_prog_DUMPBIN+:} false; then :
24137  $as_echo_n "(cached) " >&6
24138else
24139  if test -n "$DUMPBIN"; then
24140  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
24141else
24142as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24143for as_dir in $PATH
24144do
24145  IFS=$as_save_IFS
24146  test -z "$as_dir" && as_dir=.
24147    for ac_exec_ext in '' $ac_executable_extensions; do
24148  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24149    ac_cv_prog_DUMPBIN="dumpbin"
24150    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24151    break 2
24152  fi
24153done
24154  done
24155IFS=$as_save_IFS
24156
24157fi
24158fi
24159DUMPBIN=$ac_cv_prog_DUMPBIN
24160if test -n "$DUMPBIN"; then
24161  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
24162$as_echo "$DUMPBIN" >&6; }
24163else
24164  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24165$as_echo "no" >&6; }
24166fi
24167
24168
24169
24170  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24171
24172  # First separate the path from the arguments. This will split at the first
24173  # space.
24174  complete="$DUMPBIN"
24175  path="${complete%% *}"
24176  tmp="$complete EOL"
24177  arguments="${tmp#* }"
24178
24179  # Input might be given as Windows format, start by converting to
24180  # unix format.
24181  new_path=`$CYGPATH -u "$path"`
24182
24183  # Now try to locate executable using which
24184  new_path=`$WHICH "$new_path" 2> /dev/null`
24185  # bat and cmd files are not always considered executable in cygwin causing which
24186  # to not find them
24187  if test "x$new_path" = x \
24188      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24189      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24190    new_path=`$CYGPATH -u "$path"`
24191  fi
24192  if test "x$new_path" = x; then
24193    # Oops. Which didn't find the executable.
24194    # The splitting of arguments from the executable at a space might have been incorrect,
24195    # since paths with space are more likely in Windows. Give it another try with the whole
24196    # argument.
24197    path="$complete"
24198    arguments="EOL"
24199    new_path=`$CYGPATH -u "$path"`
24200    new_path=`$WHICH "$new_path" 2> /dev/null`
24201    # bat and cmd files are not always considered executable in cygwin causing which
24202    # to not find them
24203    if test "x$new_path" = x \
24204        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24205        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24206      new_path=`$CYGPATH -u "$path"`
24207    fi
24208    if test "x$new_path" = x; then
24209      # It's still not found. Now this is an unrecoverable error.
24210      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
24211$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
24212      has_space=`$ECHO "$complete" | $GREP " "`
24213      if test "x$has_space" != x; then
24214        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24215$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24216      fi
24217      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
24218    fi
24219  fi
24220
24221  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24222  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24223  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24224  # "foo.exe" is OK but "foo" is an error.
24225  #
24226  # This test is therefore slightly more accurate than "test -f" to check for file presence.
24227  # It is also a way to make sure we got the proper file name for the real test later on.
24228  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24229  if test "x$test_shortpath" = x; then
24230    # Short path failed, file does not exist as specified.
24231    # Try adding .exe or .cmd
24232    if test -f "${new_path}.exe"; then
24233      input_to_shortpath="${new_path}.exe"
24234    elif test -f "${new_path}.cmd"; then
24235      input_to_shortpath="${new_path}.cmd"
24236    else
24237      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
24238$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
24239      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24240$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24241      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
24242    fi
24243  else
24244    input_to_shortpath="$new_path"
24245  fi
24246
24247  # Call helper function which possibly converts this using DOS-style short mode.
24248  # If so, the updated path is stored in $new_path.
24249  new_path="$input_to_shortpath"
24250
24251  input_path="$input_to_shortpath"
24252  # Check if we need to convert this using DOS-style short mode. If the path
24253  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24254  # take no chances and rewrite it.
24255  # Note: m4 eats our [], so we need to use [ and ] instead.
24256  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24257  if test "x$has_forbidden_chars" != x; then
24258    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24259    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24260    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24261    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24262      # Going to short mode and back again did indeed matter. Since short mode is
24263      # case insensitive, let's make it lowercase to improve readability.
24264      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24265      # Now convert it back to Unix-stile (cygpath)
24266      input_path=`$CYGPATH -u "$shortmode_path"`
24267      new_path="$input_path"
24268    fi
24269  fi
24270
24271  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24272  if test "x$test_cygdrive_prefix" = x; then
24273    # As a simple fix, exclude /usr/bin since it's not a real path.
24274    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24275      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24276      # a path prefixed by /cygdrive for fixpath to work.
24277      new_path="$CYGWIN_ROOT_PATH$input_path"
24278    fi
24279  fi
24280
24281  # remove trailing .exe if any
24282  new_path="${new_path/%.exe/}"
24283
24284  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24285
24286  # First separate the path from the arguments. This will split at the first
24287  # space.
24288  complete="$DUMPBIN"
24289  path="${complete%% *}"
24290  tmp="$complete EOL"
24291  arguments="${tmp#* }"
24292
24293  # Input might be given as Windows format, start by converting to
24294  # unix format.
24295  new_path="$path"
24296
24297  windows_path="$new_path"
24298  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24299    unix_path=`$CYGPATH -u "$windows_path"`
24300    new_path="$unix_path"
24301  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24302    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24303    new_path="$unix_path"
24304  fi
24305
24306
24307  # Now try to locate executable using which
24308  new_path=`$WHICH "$new_path" 2> /dev/null`
24309
24310  if test "x$new_path" = x; then
24311    # Oops. Which didn't find the executable.
24312    # The splitting of arguments from the executable at a space might have been incorrect,
24313    # since paths with space are more likely in Windows. Give it another try with the whole
24314    # argument.
24315    path="$complete"
24316    arguments="EOL"
24317    new_path="$path"
24318
24319  windows_path="$new_path"
24320  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24321    unix_path=`$CYGPATH -u "$windows_path"`
24322    new_path="$unix_path"
24323  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24324    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24325    new_path="$unix_path"
24326  fi
24327
24328
24329    new_path=`$WHICH "$new_path" 2> /dev/null`
24330
24331    if test "x$new_path" = x; then
24332      # It's still not found. Now this is an unrecoverable error.
24333      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
24334$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
24335      has_space=`$ECHO "$complete" | $GREP " "`
24336      if test "x$has_space" != x; then
24337        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24338$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24339      fi
24340      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
24341    fi
24342  fi
24343
24344  # Now new_path has a complete unix path to the binary
24345  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24346    # Keep paths in /bin as-is, but remove trailing .exe if any
24347    new_path="${new_path/%.exe/}"
24348    # Do not save /bin paths to all_fixpath_prefixes!
24349  else
24350    # Not in mixed or Windows style, start by that.
24351    new_path=`cmd //c echo $new_path`
24352
24353  input_path="$new_path"
24354  # Check if we need to convert this using DOS-style short mode. If the path
24355  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24356  # take no chances and rewrite it.
24357  # Note: m4 eats our [], so we need to use [ and ] instead.
24358  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24359  if test "x$has_forbidden_chars" != x; then
24360    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24361    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24362  fi
24363
24364    # Output is in $new_path
24365
24366  windows_path="$new_path"
24367  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24368    unix_path=`$CYGPATH -u "$windows_path"`
24369    new_path="$unix_path"
24370  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24371    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24372    new_path="$unix_path"
24373  fi
24374
24375    # remove trailing .exe if any
24376    new_path="${new_path/%.exe/}"
24377
24378    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24379    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24380  fi
24381
24382  else
24383    # We're on a posix platform. Hooray! :)
24384    # First separate the path from the arguments. This will split at the first
24385    # space.
24386    complete="$DUMPBIN"
24387    path="${complete%% *}"
24388    tmp="$complete EOL"
24389    arguments="${tmp#* }"
24390
24391    # Cannot rely on the command "which" here since it doesn't always work.
24392    is_absolute_path=`$ECHO "$path" | $GREP ^/`
24393    if test -z "$is_absolute_path"; then
24394      # Path to executable is not absolute. Find it.
24395      IFS_save="$IFS"
24396      IFS=:
24397      for p in $PATH; do
24398        if test -f "$p/$path" && test -x "$p/$path"; then
24399          new_path="$p/$path"
24400          break
24401        fi
24402      done
24403      IFS="$IFS_save"
24404    else
24405      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving DUMPBIN (as $path) failed, using $path directly." >&5
24406$as_echo "$as_me: Resolving DUMPBIN (as $path) failed, using $path directly." >&6;}
24407      new_path="$path"
24408    fi
24409
24410    if test "x$new_path" = x; then
24411      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
24412$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
24413      has_space=`$ECHO "$complete" | $GREP " "`
24414      if test "x$has_space" != x; then
24415        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24416$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24417      fi
24418      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
24419    fi
24420  fi
24421
24422  # Now join together the path and the arguments once again
24423  if test "x$arguments" != xEOL; then
24424    new_complete="$new_path ${arguments% *}"
24425  else
24426    new_complete="$new_path"
24427  fi
24428
24429  if test "x$complete" != "x$new_complete"; then
24430    DUMPBIN="$new_complete"
24431    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
24432$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
24433  fi
24434
24435
24436      COMPILER_TYPE=CL
24437      CCXXFLAGS="$CCXXFLAGS -nologo"
24438
24439fi
24440
24441
24442
24443  ac_ext=c
24444ac_cpp='$CPP $CPPFLAGS'
24445ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24446ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24447ac_compiler_gnu=$ac_cv_c_compiler_gnu
24448{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
24449$as_echo_n "checking how to run the C preprocessor... " >&6; }
24450# On Suns, sometimes $CPP names a directory.
24451if test -n "$CPP" && test -d "$CPP"; then
24452  CPP=
24453fi
24454if test -z "$CPP"; then
24455  if ${ac_cv_prog_CPP+:} false; then :
24456  $as_echo_n "(cached) " >&6
24457else
24458      # Double quotes because CPP needs to be expanded
24459    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
24460    do
24461      ac_preproc_ok=false
24462for ac_c_preproc_warn_flag in '' yes
24463do
24464  # Use a header file that comes with gcc, so configuring glibc
24465  # with a fresh cross-compiler works.
24466  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24467  # <limits.h> exists even on freestanding compilers.
24468  # On the NeXT, cc -E runs the code through the compiler's parser,
24469  # not just through cpp. "Syntax error" is here to catch this case.
24470  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24471/* end confdefs.h.  */
24472#ifdef __STDC__
24473# include <limits.h>
24474#else
24475# include <assert.h>
24476#endif
24477		     Syntax error
24478_ACEOF
24479if ac_fn_c_try_cpp "$LINENO"; then :
24480
24481else
24482  # Broken: fails on valid input.
24483continue
24484fi
24485rm -f conftest.err conftest.i conftest.$ac_ext
24486
24487  # OK, works on sane cases.  Now check whether nonexistent headers
24488  # can be detected and how.
24489  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24490/* end confdefs.h.  */
24491#include <ac_nonexistent.h>
24492_ACEOF
24493if ac_fn_c_try_cpp "$LINENO"; then :
24494  # Broken: success on invalid input.
24495continue
24496else
24497  # Passes both tests.
24498ac_preproc_ok=:
24499break
24500fi
24501rm -f conftest.err conftest.i conftest.$ac_ext
24502
24503done
24504# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24505rm -f conftest.i conftest.err conftest.$ac_ext
24506if $ac_preproc_ok; then :
24507  break
24508fi
24509
24510    done
24511    ac_cv_prog_CPP=$CPP
24512
24513fi
24514  CPP=$ac_cv_prog_CPP
24515else
24516  ac_cv_prog_CPP=$CPP
24517fi
24518{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
24519$as_echo "$CPP" >&6; }
24520ac_preproc_ok=false
24521for ac_c_preproc_warn_flag in '' yes
24522do
24523  # Use a header file that comes with gcc, so configuring glibc
24524  # with a fresh cross-compiler works.
24525  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24526  # <limits.h> exists even on freestanding compilers.
24527  # On the NeXT, cc -E runs the code through the compiler's parser,
24528  # not just through cpp. "Syntax error" is here to catch this case.
24529  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24530/* end confdefs.h.  */
24531#ifdef __STDC__
24532# include <limits.h>
24533#else
24534# include <assert.h>
24535#endif
24536		     Syntax error
24537_ACEOF
24538if ac_fn_c_try_cpp "$LINENO"; then :
24539
24540else
24541  # Broken: fails on valid input.
24542continue
24543fi
24544rm -f conftest.err conftest.i conftest.$ac_ext
24545
24546  # OK, works on sane cases.  Now check whether nonexistent headers
24547  # can be detected and how.
24548  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24549/* end confdefs.h.  */
24550#include <ac_nonexistent.h>
24551_ACEOF
24552if ac_fn_c_try_cpp "$LINENO"; then :
24553  # Broken: success on invalid input.
24554continue
24555else
24556  # Passes both tests.
24557ac_preproc_ok=:
24558break
24559fi
24560rm -f conftest.err conftest.i conftest.$ac_ext
24561
24562done
24563# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24564rm -f conftest.i conftest.err conftest.$ac_ext
24565if $ac_preproc_ok; then :
24566
24567else
24568  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
24569$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
24570as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
24571See \`config.log' for more details" "$LINENO" 5; }
24572fi
24573
24574ac_ext=cpp
24575ac_cpp='$CXXCPP $CPPFLAGS'
24576ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24577ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24578ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24579
24580
24581  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24582
24583  # First separate the path from the arguments. This will split at the first
24584  # space.
24585  complete="$CPP"
24586  path="${complete%% *}"
24587  tmp="$complete EOL"
24588  arguments="${tmp#* }"
24589
24590  # Input might be given as Windows format, start by converting to
24591  # unix format.
24592  new_path=`$CYGPATH -u "$path"`
24593
24594  # Now try to locate executable using which
24595  new_path=`$WHICH "$new_path" 2> /dev/null`
24596  # bat and cmd files are not always considered executable in cygwin causing which
24597  # to not find them
24598  if test "x$new_path" = x \
24599      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24600      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24601    new_path=`$CYGPATH -u "$path"`
24602  fi
24603  if test "x$new_path" = x; then
24604    # Oops. Which didn't find the executable.
24605    # The splitting of arguments from the executable at a space might have been incorrect,
24606    # since paths with space are more likely in Windows. Give it another try with the whole
24607    # argument.
24608    path="$complete"
24609    arguments="EOL"
24610    new_path=`$CYGPATH -u "$path"`
24611    new_path=`$WHICH "$new_path" 2> /dev/null`
24612    # bat and cmd files are not always considered executable in cygwin causing which
24613    # to not find them
24614    if test "x$new_path" = x \
24615        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24616        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24617      new_path=`$CYGPATH -u "$path"`
24618    fi
24619    if test "x$new_path" = x; then
24620      # It's still not found. Now this is an unrecoverable error.
24621      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
24622$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
24623      has_space=`$ECHO "$complete" | $GREP " "`
24624      if test "x$has_space" != x; then
24625        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24626$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24627      fi
24628      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24629    fi
24630  fi
24631
24632  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24633  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24634  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24635  # "foo.exe" is OK but "foo" is an error.
24636  #
24637  # This test is therefore slightly more accurate than "test -f" to check for file presence.
24638  # It is also a way to make sure we got the proper file name for the real test later on.
24639  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24640  if test "x$test_shortpath" = x; then
24641    # Short path failed, file does not exist as specified.
24642    # Try adding .exe or .cmd
24643    if test -f "${new_path}.exe"; then
24644      input_to_shortpath="${new_path}.exe"
24645    elif test -f "${new_path}.cmd"; then
24646      input_to_shortpath="${new_path}.cmd"
24647    else
24648      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
24649$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
24650      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24651$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24652      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24653    fi
24654  else
24655    input_to_shortpath="$new_path"
24656  fi
24657
24658  # Call helper function which possibly converts this using DOS-style short mode.
24659  # If so, the updated path is stored in $new_path.
24660  new_path="$input_to_shortpath"
24661
24662  input_path="$input_to_shortpath"
24663  # Check if we need to convert this using DOS-style short mode. If the path
24664  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24665  # take no chances and rewrite it.
24666  # Note: m4 eats our [], so we need to use [ and ] instead.
24667  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24668  if test "x$has_forbidden_chars" != x; then
24669    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24670    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24671    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24672    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24673      # Going to short mode and back again did indeed matter. Since short mode is
24674      # case insensitive, let's make it lowercase to improve readability.
24675      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24676      # Now convert it back to Unix-stile (cygpath)
24677      input_path=`$CYGPATH -u "$shortmode_path"`
24678      new_path="$input_path"
24679    fi
24680  fi
24681
24682  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24683  if test "x$test_cygdrive_prefix" = x; then
24684    # As a simple fix, exclude /usr/bin since it's not a real path.
24685    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24686      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24687      # a path prefixed by /cygdrive for fixpath to work.
24688      new_path="$CYGWIN_ROOT_PATH$input_path"
24689    fi
24690  fi
24691
24692  # remove trailing .exe if any
24693  new_path="${new_path/%.exe/}"
24694
24695  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24696
24697  # First separate the path from the arguments. This will split at the first
24698  # space.
24699  complete="$CPP"
24700  path="${complete%% *}"
24701  tmp="$complete EOL"
24702  arguments="${tmp#* }"
24703
24704  # Input might be given as Windows format, start by converting to
24705  # unix format.
24706  new_path="$path"
24707
24708  windows_path="$new_path"
24709  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24710    unix_path=`$CYGPATH -u "$windows_path"`
24711    new_path="$unix_path"
24712  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24713    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24714    new_path="$unix_path"
24715  fi
24716
24717
24718  # Now try to locate executable using which
24719  new_path=`$WHICH "$new_path" 2> /dev/null`
24720
24721  if test "x$new_path" = x; then
24722    # Oops. Which didn't find the executable.
24723    # The splitting of arguments from the executable at a space might have been incorrect,
24724    # since paths with space are more likely in Windows. Give it another try with the whole
24725    # argument.
24726    path="$complete"
24727    arguments="EOL"
24728    new_path="$path"
24729
24730  windows_path="$new_path"
24731  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24732    unix_path=`$CYGPATH -u "$windows_path"`
24733    new_path="$unix_path"
24734  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24735    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24736    new_path="$unix_path"
24737  fi
24738
24739
24740    new_path=`$WHICH "$new_path" 2> /dev/null`
24741
24742    if test "x$new_path" = x; then
24743      # It's still not found. Now this is an unrecoverable error.
24744      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
24745$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
24746      has_space=`$ECHO "$complete" | $GREP " "`
24747      if test "x$has_space" != x; then
24748        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24749$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24750      fi
24751      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24752    fi
24753  fi
24754
24755  # Now new_path has a complete unix path to the binary
24756  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24757    # Keep paths in /bin as-is, but remove trailing .exe if any
24758    new_path="${new_path/%.exe/}"
24759    # Do not save /bin paths to all_fixpath_prefixes!
24760  else
24761    # Not in mixed or Windows style, start by that.
24762    new_path=`cmd //c echo $new_path`
24763
24764  input_path="$new_path"
24765  # Check if we need to convert this using DOS-style short mode. If the path
24766  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24767  # take no chances and rewrite it.
24768  # Note: m4 eats our [], so we need to use [ and ] instead.
24769  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24770  if test "x$has_forbidden_chars" != x; then
24771    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24772    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24773  fi
24774
24775    # Output is in $new_path
24776
24777  windows_path="$new_path"
24778  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24779    unix_path=`$CYGPATH -u "$windows_path"`
24780    new_path="$unix_path"
24781  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24782    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24783    new_path="$unix_path"
24784  fi
24785
24786    # remove trailing .exe if any
24787    new_path="${new_path/%.exe/}"
24788
24789    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24790    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24791  fi
24792
24793  else
24794    # We're on a posix platform. Hooray! :)
24795    # First separate the path from the arguments. This will split at the first
24796    # space.
24797    complete="$CPP"
24798    path="${complete%% *}"
24799    tmp="$complete EOL"
24800    arguments="${tmp#* }"
24801
24802    # Cannot rely on the command "which" here since it doesn't always work.
24803    is_absolute_path=`$ECHO "$path" | $GREP ^/`
24804    if test -z "$is_absolute_path"; then
24805      # Path to executable is not absolute. Find it.
24806      IFS_save="$IFS"
24807      IFS=:
24808      for p in $PATH; do
24809        if test -f "$p/$path" && test -x "$p/$path"; then
24810          new_path="$p/$path"
24811          break
24812        fi
24813      done
24814      IFS="$IFS_save"
24815    else
24816      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CPP (as $path) failed, using $path directly." >&5
24817$as_echo "$as_me: Resolving CPP (as $path) failed, using $path directly." >&6;}
24818      new_path="$path"
24819    fi
24820
24821    if test "x$new_path" = x; then
24822      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
24823$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
24824      has_space=`$ECHO "$complete" | $GREP " "`
24825      if test "x$has_space" != x; then
24826        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24827$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24828      fi
24829      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24830    fi
24831  fi
24832
24833  # Now join together the path and the arguments once again
24834  if test "x$arguments" != xEOL; then
24835    new_complete="$new_path ${arguments% *}"
24836  else
24837    new_complete="$new_path"
24838  fi
24839
24840  if test "x$complete" != "x$new_complete"; then
24841    CPP="$new_complete"
24842    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
24843$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
24844  fi
24845
24846
24847  ac_ext=cpp
24848ac_cpp='$CXXCPP $CPPFLAGS'
24849ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24850ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24851ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24852{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
24853$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
24854if test -z "$CXXCPP"; then
24855  if ${ac_cv_prog_CXXCPP+:} false; then :
24856  $as_echo_n "(cached) " >&6
24857else
24858      # Double quotes because CXXCPP needs to be expanded
24859    for CXXCPP in "$CXX -E" "/lib/cpp"
24860    do
24861      ac_preproc_ok=false
24862for ac_cxx_preproc_warn_flag in '' yes
24863do
24864  # Use a header file that comes with gcc, so configuring glibc
24865  # with a fresh cross-compiler works.
24866  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24867  # <limits.h> exists even on freestanding compilers.
24868  # On the NeXT, cc -E runs the code through the compiler's parser,
24869  # not just through cpp. "Syntax error" is here to catch this case.
24870  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24871/* end confdefs.h.  */
24872#ifdef __STDC__
24873# include <limits.h>
24874#else
24875# include <assert.h>
24876#endif
24877		     Syntax error
24878_ACEOF
24879if ac_fn_cxx_try_cpp "$LINENO"; then :
24880
24881else
24882  # Broken: fails on valid input.
24883continue
24884fi
24885rm -f conftest.err conftest.i conftest.$ac_ext
24886
24887  # OK, works on sane cases.  Now check whether nonexistent headers
24888  # can be detected and how.
24889  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24890/* end confdefs.h.  */
24891#include <ac_nonexistent.h>
24892_ACEOF
24893if ac_fn_cxx_try_cpp "$LINENO"; then :
24894  # Broken: success on invalid input.
24895continue
24896else
24897  # Passes both tests.
24898ac_preproc_ok=:
24899break
24900fi
24901rm -f conftest.err conftest.i conftest.$ac_ext
24902
24903done
24904# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24905rm -f conftest.i conftest.err conftest.$ac_ext
24906if $ac_preproc_ok; then :
24907  break
24908fi
24909
24910    done
24911    ac_cv_prog_CXXCPP=$CXXCPP
24912
24913fi
24914  CXXCPP=$ac_cv_prog_CXXCPP
24915else
24916  ac_cv_prog_CXXCPP=$CXXCPP
24917fi
24918{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
24919$as_echo "$CXXCPP" >&6; }
24920ac_preproc_ok=false
24921for ac_cxx_preproc_warn_flag in '' yes
24922do
24923  # Use a header file that comes with gcc, so configuring glibc
24924  # with a fresh cross-compiler works.
24925  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24926  # <limits.h> exists even on freestanding compilers.
24927  # On the NeXT, cc -E runs the code through the compiler's parser,
24928  # not just through cpp. "Syntax error" is here to catch this case.
24929  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24930/* end confdefs.h.  */
24931#ifdef __STDC__
24932# include <limits.h>
24933#else
24934# include <assert.h>
24935#endif
24936		     Syntax error
24937_ACEOF
24938if ac_fn_cxx_try_cpp "$LINENO"; then :
24939
24940else
24941  # Broken: fails on valid input.
24942continue
24943fi
24944rm -f conftest.err conftest.i conftest.$ac_ext
24945
24946  # OK, works on sane cases.  Now check whether nonexistent headers
24947  # can be detected and how.
24948  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24949/* end confdefs.h.  */
24950#include <ac_nonexistent.h>
24951_ACEOF
24952if ac_fn_cxx_try_cpp "$LINENO"; then :
24953  # Broken: success on invalid input.
24954continue
24955else
24956  # Passes both tests.
24957ac_preproc_ok=:
24958break
24959fi
24960rm -f conftest.err conftest.i conftest.$ac_ext
24961
24962done
24963# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24964rm -f conftest.i conftest.err conftest.$ac_ext
24965if $ac_preproc_ok; then :
24966
24967else
24968  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
24969$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
24970as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
24971See \`config.log' for more details" "$LINENO" 5; }
24972fi
24973
24974ac_ext=cpp
24975ac_cpp='$CXXCPP $CPPFLAGS'
24976ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24977ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24978ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24979
24980
24981  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24982
24983  # First separate the path from the arguments. This will split at the first
24984  # space.
24985  complete="$CXXCPP"
24986  path="${complete%% *}"
24987  tmp="$complete EOL"
24988  arguments="${tmp#* }"
24989
24990  # Input might be given as Windows format, start by converting to
24991  # unix format.
24992  new_path=`$CYGPATH -u "$path"`
24993
24994  # Now try to locate executable using which
24995  new_path=`$WHICH "$new_path" 2> /dev/null`
24996  # bat and cmd files are not always considered executable in cygwin causing which
24997  # to not find them
24998  if test "x$new_path" = x \
24999      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25000      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25001    new_path=`$CYGPATH -u "$path"`
25002  fi
25003  if test "x$new_path" = x; then
25004    # Oops. Which didn't find the executable.
25005    # The splitting of arguments from the executable at a space might have been incorrect,
25006    # since paths with space are more likely in Windows. Give it another try with the whole
25007    # argument.
25008    path="$complete"
25009    arguments="EOL"
25010    new_path=`$CYGPATH -u "$path"`
25011    new_path=`$WHICH "$new_path" 2> /dev/null`
25012    # bat and cmd files are not always considered executable in cygwin causing which
25013    # to not find them
25014    if test "x$new_path" = x \
25015        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25016        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25017      new_path=`$CYGPATH -u "$path"`
25018    fi
25019    if test "x$new_path" = x; then
25020      # It's still not found. Now this is an unrecoverable error.
25021      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
25022$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
25023      has_space=`$ECHO "$complete" | $GREP " "`
25024      if test "x$has_space" != x; then
25025        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25026$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25027      fi
25028      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
25029    fi
25030  fi
25031
25032  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25033  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25034  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25035  # "foo.exe" is OK but "foo" is an error.
25036  #
25037  # This test is therefore slightly more accurate than "test -f" to check for file presence.
25038  # It is also a way to make sure we got the proper file name for the real test later on.
25039  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25040  if test "x$test_shortpath" = x; then
25041    # Short path failed, file does not exist as specified.
25042    # Try adding .exe or .cmd
25043    if test -f "${new_path}.exe"; then
25044      input_to_shortpath="${new_path}.exe"
25045    elif test -f "${new_path}.cmd"; then
25046      input_to_shortpath="${new_path}.cmd"
25047    else
25048      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
25049$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
25050      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25051$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25052      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
25053    fi
25054  else
25055    input_to_shortpath="$new_path"
25056  fi
25057
25058  # Call helper function which possibly converts this using DOS-style short mode.
25059  # If so, the updated path is stored in $new_path.
25060  new_path="$input_to_shortpath"
25061
25062  input_path="$input_to_shortpath"
25063  # Check if we need to convert this using DOS-style short mode. If the path
25064  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25065  # take no chances and rewrite it.
25066  # Note: m4 eats our [], so we need to use [ and ] instead.
25067  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25068  if test "x$has_forbidden_chars" != x; then
25069    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25070    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25071    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25072    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25073      # Going to short mode and back again did indeed matter. Since short mode is
25074      # case insensitive, let's make it lowercase to improve readability.
25075      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25076      # Now convert it back to Unix-stile (cygpath)
25077      input_path=`$CYGPATH -u "$shortmode_path"`
25078      new_path="$input_path"
25079    fi
25080  fi
25081
25082  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25083  if test "x$test_cygdrive_prefix" = x; then
25084    # As a simple fix, exclude /usr/bin since it's not a real path.
25085    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25086      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25087      # a path prefixed by /cygdrive for fixpath to work.
25088      new_path="$CYGWIN_ROOT_PATH$input_path"
25089    fi
25090  fi
25091
25092  # remove trailing .exe if any
25093  new_path="${new_path/%.exe/}"
25094
25095  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25096
25097  # First separate the path from the arguments. This will split at the first
25098  # space.
25099  complete="$CXXCPP"
25100  path="${complete%% *}"
25101  tmp="$complete EOL"
25102  arguments="${tmp#* }"
25103
25104  # Input might be given as Windows format, start by converting to
25105  # unix format.
25106  new_path="$path"
25107
25108  windows_path="$new_path"
25109  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25110    unix_path=`$CYGPATH -u "$windows_path"`
25111    new_path="$unix_path"
25112  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25113    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25114    new_path="$unix_path"
25115  fi
25116
25117
25118  # Now try to locate executable using which
25119  new_path=`$WHICH "$new_path" 2> /dev/null`
25120
25121  if test "x$new_path" = x; then
25122    # Oops. Which didn't find the executable.
25123    # The splitting of arguments from the executable at a space might have been incorrect,
25124    # since paths with space are more likely in Windows. Give it another try with the whole
25125    # argument.
25126    path="$complete"
25127    arguments="EOL"
25128    new_path="$path"
25129
25130  windows_path="$new_path"
25131  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25132    unix_path=`$CYGPATH -u "$windows_path"`
25133    new_path="$unix_path"
25134  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25135    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25136    new_path="$unix_path"
25137  fi
25138
25139
25140    new_path=`$WHICH "$new_path" 2> /dev/null`
25141
25142    if test "x$new_path" = x; then
25143      # It's still not found. Now this is an unrecoverable error.
25144      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
25145$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
25146      has_space=`$ECHO "$complete" | $GREP " "`
25147      if test "x$has_space" != x; then
25148        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25149$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25150      fi
25151      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
25152    fi
25153  fi
25154
25155  # Now new_path has a complete unix path to the binary
25156  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25157    # Keep paths in /bin as-is, but remove trailing .exe if any
25158    new_path="${new_path/%.exe/}"
25159    # Do not save /bin paths to all_fixpath_prefixes!
25160  else
25161    # Not in mixed or Windows style, start by that.
25162    new_path=`cmd //c echo $new_path`
25163
25164  input_path="$new_path"
25165  # Check if we need to convert this using DOS-style short mode. If the path
25166  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25167  # take no chances and rewrite it.
25168  # Note: m4 eats our [], so we need to use [ and ] instead.
25169  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25170  if test "x$has_forbidden_chars" != x; then
25171    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25172    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25173  fi
25174
25175    # Output is in $new_path
25176
25177  windows_path="$new_path"
25178  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25179    unix_path=`$CYGPATH -u "$windows_path"`
25180    new_path="$unix_path"
25181  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25182    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25183    new_path="$unix_path"
25184  fi
25185
25186    # remove trailing .exe if any
25187    new_path="${new_path/%.exe/}"
25188
25189    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25190    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25191  fi
25192
25193  else
25194    # We're on a posix platform. Hooray! :)
25195    # First separate the path from the arguments. This will split at the first
25196    # space.
25197    complete="$CXXCPP"
25198    path="${complete%% *}"
25199    tmp="$complete EOL"
25200    arguments="${tmp#* }"
25201
25202    # Cannot rely on the command "which" here since it doesn't always work.
25203    is_absolute_path=`$ECHO "$path" | $GREP ^/`
25204    if test -z "$is_absolute_path"; then
25205      # Path to executable is not absolute. Find it.
25206      IFS_save="$IFS"
25207      IFS=:
25208      for p in $PATH; do
25209        if test -f "$p/$path" && test -x "$p/$path"; then
25210          new_path="$p/$path"
25211          break
25212        fi
25213      done
25214      IFS="$IFS_save"
25215    else
25216      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXXCPP (as $path) failed, using $path directly." >&5
25217$as_echo "$as_me: Resolving CXXCPP (as $path) failed, using $path directly." >&6;}
25218      new_path="$path"
25219    fi
25220
25221    if test "x$new_path" = x; then
25222      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
25223$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
25224      has_space=`$ECHO "$complete" | $GREP " "`
25225      if test "x$has_space" != x; then
25226        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25227$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25228      fi
25229      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
25230    fi
25231  fi
25232
25233  # Now join together the path and the arguments once again
25234  if test "x$arguments" != xEOL; then
25235    new_complete="$new_path ${arguments% *}"
25236  else
25237    new_complete="$new_path"
25238  fi
25239
25240  if test "x$complete" != "x$new_complete"; then
25241    CXXCPP="$new_complete"
25242    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
25243$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
25244  fi
25245
25246
25247  if test "x$COMPILE_TYPE" != "xcross"; then
25248    # If we are not cross compiling, use the same compilers for
25249    # building the build platform executables. The cross-compilation
25250    # case needed to be done earlier, but this can only be done after
25251    # the native tools have been localized.
25252    BUILD_CC="$CC"
25253    BUILD_CXX="$CXX"
25254    BUILD_LD="$LD"
25255  fi
25256
25257  # for solaris we really need solaris tools, and not gnu equivalent
25258  #   these seems to normally reside in /usr/ccs/bin so add that to path before
25259  #   starting to probe
25260  #
25261  #   NOTE: I add this /usr/ccs/bin after TOOLS but before OLD_PATH
25262  #         so that it can be overriden --with-tools-dir
25263  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
25264    PATH="${TOOLS_DIR}:/usr/ccs/bin:${OLD_PATH}"
25265  fi
25266
25267  # Find the right assembler.
25268  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
25269    # Extract the first word of "as", so it can be a program name with args.
25270set dummy as; ac_word=$2
25271{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25272$as_echo_n "checking for $ac_word... " >&6; }
25273if ${ac_cv_path_AS+:} false; then :
25274  $as_echo_n "(cached) " >&6
25275else
25276  case $AS in
25277  [\\/]* | ?:[\\/]*)
25278  ac_cv_path_AS="$AS" # Let the user override the test with a path.
25279  ;;
25280  *)
25281  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25282for as_dir in $PATH
25283do
25284  IFS=$as_save_IFS
25285  test -z "$as_dir" && as_dir=.
25286    for ac_exec_ext in '' $ac_executable_extensions; do
25287  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25288    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
25289    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25290    break 2
25291  fi
25292done
25293  done
25294IFS=$as_save_IFS
25295
25296  ;;
25297esac
25298fi
25299AS=$ac_cv_path_AS
25300if test -n "$AS"; then
25301  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
25302$as_echo "$AS" >&6; }
25303else
25304  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25305$as_echo "no" >&6; }
25306fi
25307
25308
25309
25310  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25311
25312  # First separate the path from the arguments. This will split at the first
25313  # space.
25314  complete="$AS"
25315  path="${complete%% *}"
25316  tmp="$complete EOL"
25317  arguments="${tmp#* }"
25318
25319  # Input might be given as Windows format, start by converting to
25320  # unix format.
25321  new_path=`$CYGPATH -u "$path"`
25322
25323  # Now try to locate executable using which
25324  new_path=`$WHICH "$new_path" 2> /dev/null`
25325  # bat and cmd files are not always considered executable in cygwin causing which
25326  # to not find them
25327  if test "x$new_path" = x \
25328      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25329      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25330    new_path=`$CYGPATH -u "$path"`
25331  fi
25332  if test "x$new_path" = x; then
25333    # Oops. Which didn't find the executable.
25334    # The splitting of arguments from the executable at a space might have been incorrect,
25335    # since paths with space are more likely in Windows. Give it another try with the whole
25336    # argument.
25337    path="$complete"
25338    arguments="EOL"
25339    new_path=`$CYGPATH -u "$path"`
25340    new_path=`$WHICH "$new_path" 2> /dev/null`
25341    # bat and cmd files are not always considered executable in cygwin causing which
25342    # to not find them
25343    if test "x$new_path" = x \
25344        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25345        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25346      new_path=`$CYGPATH -u "$path"`
25347    fi
25348    if test "x$new_path" = x; then
25349      # It's still not found. Now this is an unrecoverable error.
25350      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
25351$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
25352      has_space=`$ECHO "$complete" | $GREP " "`
25353      if test "x$has_space" != x; then
25354        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25355$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25356      fi
25357      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25358    fi
25359  fi
25360
25361  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25362  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25363  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25364  # "foo.exe" is OK but "foo" is an error.
25365  #
25366  # This test is therefore slightly more accurate than "test -f" to check for file presence.
25367  # It is also a way to make sure we got the proper file name for the real test later on.
25368  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25369  if test "x$test_shortpath" = x; then
25370    # Short path failed, file does not exist as specified.
25371    # Try adding .exe or .cmd
25372    if test -f "${new_path}.exe"; then
25373      input_to_shortpath="${new_path}.exe"
25374    elif test -f "${new_path}.cmd"; then
25375      input_to_shortpath="${new_path}.cmd"
25376    else
25377      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
25378$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
25379      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25380$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25381      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25382    fi
25383  else
25384    input_to_shortpath="$new_path"
25385  fi
25386
25387  # Call helper function which possibly converts this using DOS-style short mode.
25388  # If so, the updated path is stored in $new_path.
25389  new_path="$input_to_shortpath"
25390
25391  input_path="$input_to_shortpath"
25392  # Check if we need to convert this using DOS-style short mode. If the path
25393  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25394  # take no chances and rewrite it.
25395  # Note: m4 eats our [], so we need to use [ and ] instead.
25396  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25397  if test "x$has_forbidden_chars" != x; then
25398    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25399    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25400    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25401    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25402      # Going to short mode and back again did indeed matter. Since short mode is
25403      # case insensitive, let's make it lowercase to improve readability.
25404      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25405      # Now convert it back to Unix-stile (cygpath)
25406      input_path=`$CYGPATH -u "$shortmode_path"`
25407      new_path="$input_path"
25408    fi
25409  fi
25410
25411  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25412  if test "x$test_cygdrive_prefix" = x; then
25413    # As a simple fix, exclude /usr/bin since it's not a real path.
25414    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25415      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25416      # a path prefixed by /cygdrive for fixpath to work.
25417      new_path="$CYGWIN_ROOT_PATH$input_path"
25418    fi
25419  fi
25420
25421  # remove trailing .exe if any
25422  new_path="${new_path/%.exe/}"
25423
25424  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25425
25426  # First separate the path from the arguments. This will split at the first
25427  # space.
25428  complete="$AS"
25429  path="${complete%% *}"
25430  tmp="$complete EOL"
25431  arguments="${tmp#* }"
25432
25433  # Input might be given as Windows format, start by converting to
25434  # unix format.
25435  new_path="$path"
25436
25437  windows_path="$new_path"
25438  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25439    unix_path=`$CYGPATH -u "$windows_path"`
25440    new_path="$unix_path"
25441  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25442    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25443    new_path="$unix_path"
25444  fi
25445
25446
25447  # Now try to locate executable using which
25448  new_path=`$WHICH "$new_path" 2> /dev/null`
25449
25450  if test "x$new_path" = x; then
25451    # Oops. Which didn't find the executable.
25452    # The splitting of arguments from the executable at a space might have been incorrect,
25453    # since paths with space are more likely in Windows. Give it another try with the whole
25454    # argument.
25455    path="$complete"
25456    arguments="EOL"
25457    new_path="$path"
25458
25459  windows_path="$new_path"
25460  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25461    unix_path=`$CYGPATH -u "$windows_path"`
25462    new_path="$unix_path"
25463  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25464    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25465    new_path="$unix_path"
25466  fi
25467
25468
25469    new_path=`$WHICH "$new_path" 2> /dev/null`
25470
25471    if test "x$new_path" = x; then
25472      # It's still not found. Now this is an unrecoverable error.
25473      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
25474$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
25475      has_space=`$ECHO "$complete" | $GREP " "`
25476      if test "x$has_space" != x; then
25477        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25478$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25479      fi
25480      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25481    fi
25482  fi
25483
25484  # Now new_path has a complete unix path to the binary
25485  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25486    # Keep paths in /bin as-is, but remove trailing .exe if any
25487    new_path="${new_path/%.exe/}"
25488    # Do not save /bin paths to all_fixpath_prefixes!
25489  else
25490    # Not in mixed or Windows style, start by that.
25491    new_path=`cmd //c echo $new_path`
25492
25493  input_path="$new_path"
25494  # Check if we need to convert this using DOS-style short mode. If the path
25495  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25496  # take no chances and rewrite it.
25497  # Note: m4 eats our [], so we need to use [ and ] instead.
25498  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25499  if test "x$has_forbidden_chars" != x; then
25500    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25501    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25502  fi
25503
25504    # Output is in $new_path
25505
25506  windows_path="$new_path"
25507  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25508    unix_path=`$CYGPATH -u "$windows_path"`
25509    new_path="$unix_path"
25510  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25511    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25512    new_path="$unix_path"
25513  fi
25514
25515    # remove trailing .exe if any
25516    new_path="${new_path/%.exe/}"
25517
25518    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25519    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25520  fi
25521
25522  else
25523    # We're on a posix platform. Hooray! :)
25524    # First separate the path from the arguments. This will split at the first
25525    # space.
25526    complete="$AS"
25527    path="${complete%% *}"
25528    tmp="$complete EOL"
25529    arguments="${tmp#* }"
25530
25531    # Cannot rely on the command "which" here since it doesn't always work.
25532    is_absolute_path=`$ECHO "$path" | $GREP ^/`
25533    if test -z "$is_absolute_path"; then
25534      # Path to executable is not absolute. Find it.
25535      IFS_save="$IFS"
25536      IFS=:
25537      for p in $PATH; do
25538        if test -f "$p/$path" && test -x "$p/$path"; then
25539          new_path="$p/$path"
25540          break
25541        fi
25542      done
25543      IFS="$IFS_save"
25544    else
25545      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AS (as $path) failed, using $path directly." >&5
25546$as_echo "$as_me: Resolving AS (as $path) failed, using $path directly." >&6;}
25547      new_path="$path"
25548    fi
25549
25550    if test "x$new_path" = x; then
25551      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
25552$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
25553      has_space=`$ECHO "$complete" | $GREP " "`
25554      if test "x$has_space" != x; then
25555        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25556$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25557      fi
25558      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25559    fi
25560  fi
25561
25562  # Now join together the path and the arguments once again
25563  if test "x$arguments" != xEOL; then
25564    new_complete="$new_path ${arguments% *}"
25565  else
25566    new_complete="$new_path"
25567  fi
25568
25569  if test "x$complete" != "x$new_complete"; then
25570    AS="$new_complete"
25571    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
25572$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
25573  fi
25574
25575  else
25576    AS="$CC -c"
25577  fi
25578
25579
25580  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
25581    # Extract the first word of "nm", so it can be a program name with args.
25582set dummy nm; ac_word=$2
25583{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25584$as_echo_n "checking for $ac_word... " >&6; }
25585if ${ac_cv_path_NM+:} false; then :
25586  $as_echo_n "(cached) " >&6
25587else
25588  case $NM in
25589  [\\/]* | ?:[\\/]*)
25590  ac_cv_path_NM="$NM" # Let the user override the test with a path.
25591  ;;
25592  *)
25593  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25594for as_dir in $PATH
25595do
25596  IFS=$as_save_IFS
25597  test -z "$as_dir" && as_dir=.
25598    for ac_exec_ext in '' $ac_executable_extensions; do
25599  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25600    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
25601    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25602    break 2
25603  fi
25604done
25605  done
25606IFS=$as_save_IFS
25607
25608  ;;
25609esac
25610fi
25611NM=$ac_cv_path_NM
25612if test -n "$NM"; then
25613  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
25614$as_echo "$NM" >&6; }
25615else
25616  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25617$as_echo "no" >&6; }
25618fi
25619
25620
25621
25622  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25623
25624  # First separate the path from the arguments. This will split at the first
25625  # space.
25626  complete="$NM"
25627  path="${complete%% *}"
25628  tmp="$complete EOL"
25629  arguments="${tmp#* }"
25630
25631  # Input might be given as Windows format, start by converting to
25632  # unix format.
25633  new_path=`$CYGPATH -u "$path"`
25634
25635  # Now try to locate executable using which
25636  new_path=`$WHICH "$new_path" 2> /dev/null`
25637  # bat and cmd files are not always considered executable in cygwin causing which
25638  # to not find them
25639  if test "x$new_path" = x \
25640      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25641      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25642    new_path=`$CYGPATH -u "$path"`
25643  fi
25644  if test "x$new_path" = x; then
25645    # Oops. Which didn't find the executable.
25646    # The splitting of arguments from the executable at a space might have been incorrect,
25647    # since paths with space are more likely in Windows. Give it another try with the whole
25648    # argument.
25649    path="$complete"
25650    arguments="EOL"
25651    new_path=`$CYGPATH -u "$path"`
25652    new_path=`$WHICH "$new_path" 2> /dev/null`
25653    # bat and cmd files are not always considered executable in cygwin causing which
25654    # to not find them
25655    if test "x$new_path" = x \
25656        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25657        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25658      new_path=`$CYGPATH -u "$path"`
25659    fi
25660    if test "x$new_path" = x; then
25661      # It's still not found. Now this is an unrecoverable error.
25662      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25663$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25664      has_space=`$ECHO "$complete" | $GREP " "`
25665      if test "x$has_space" != x; then
25666        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25667$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25668      fi
25669      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25670    fi
25671  fi
25672
25673  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25674  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25675  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25676  # "foo.exe" is OK but "foo" is an error.
25677  #
25678  # This test is therefore slightly more accurate than "test -f" to check for file presence.
25679  # It is also a way to make sure we got the proper file name for the real test later on.
25680  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25681  if test "x$test_shortpath" = x; then
25682    # Short path failed, file does not exist as specified.
25683    # Try adding .exe or .cmd
25684    if test -f "${new_path}.exe"; then
25685      input_to_shortpath="${new_path}.exe"
25686    elif test -f "${new_path}.cmd"; then
25687      input_to_shortpath="${new_path}.cmd"
25688    else
25689      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
25690$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
25691      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25692$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25693      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25694    fi
25695  else
25696    input_to_shortpath="$new_path"
25697  fi
25698
25699  # Call helper function which possibly converts this using DOS-style short mode.
25700  # If so, the updated path is stored in $new_path.
25701  new_path="$input_to_shortpath"
25702
25703  input_path="$input_to_shortpath"
25704  # Check if we need to convert this using DOS-style short mode. If the path
25705  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25706  # take no chances and rewrite it.
25707  # Note: m4 eats our [], so we need to use [ and ] instead.
25708  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25709  if test "x$has_forbidden_chars" != x; then
25710    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25711    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25712    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25713    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25714      # Going to short mode and back again did indeed matter. Since short mode is
25715      # case insensitive, let's make it lowercase to improve readability.
25716      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25717      # Now convert it back to Unix-stile (cygpath)
25718      input_path=`$CYGPATH -u "$shortmode_path"`
25719      new_path="$input_path"
25720    fi
25721  fi
25722
25723  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25724  if test "x$test_cygdrive_prefix" = x; then
25725    # As a simple fix, exclude /usr/bin since it's not a real path.
25726    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25727      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25728      # a path prefixed by /cygdrive for fixpath to work.
25729      new_path="$CYGWIN_ROOT_PATH$input_path"
25730    fi
25731  fi
25732
25733  # remove trailing .exe if any
25734  new_path="${new_path/%.exe/}"
25735
25736  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25737
25738  # First separate the path from the arguments. This will split at the first
25739  # space.
25740  complete="$NM"
25741  path="${complete%% *}"
25742  tmp="$complete EOL"
25743  arguments="${tmp#* }"
25744
25745  # Input might be given as Windows format, start by converting to
25746  # unix format.
25747  new_path="$path"
25748
25749  windows_path="$new_path"
25750  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25751    unix_path=`$CYGPATH -u "$windows_path"`
25752    new_path="$unix_path"
25753  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25754    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25755    new_path="$unix_path"
25756  fi
25757
25758
25759  # Now try to locate executable using which
25760  new_path=`$WHICH "$new_path" 2> /dev/null`
25761
25762  if test "x$new_path" = x; then
25763    # Oops. Which didn't find the executable.
25764    # The splitting of arguments from the executable at a space might have been incorrect,
25765    # since paths with space are more likely in Windows. Give it another try with the whole
25766    # argument.
25767    path="$complete"
25768    arguments="EOL"
25769    new_path="$path"
25770
25771  windows_path="$new_path"
25772  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25773    unix_path=`$CYGPATH -u "$windows_path"`
25774    new_path="$unix_path"
25775  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25776    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25777    new_path="$unix_path"
25778  fi
25779
25780
25781    new_path=`$WHICH "$new_path" 2> /dev/null`
25782
25783    if test "x$new_path" = x; then
25784      # It's still not found. Now this is an unrecoverable error.
25785      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25786$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25787      has_space=`$ECHO "$complete" | $GREP " "`
25788      if test "x$has_space" != x; then
25789        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25790$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25791      fi
25792      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25793    fi
25794  fi
25795
25796  # Now new_path has a complete unix path to the binary
25797  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25798    # Keep paths in /bin as-is, but remove trailing .exe if any
25799    new_path="${new_path/%.exe/}"
25800    # Do not save /bin paths to all_fixpath_prefixes!
25801  else
25802    # Not in mixed or Windows style, start by that.
25803    new_path=`cmd //c echo $new_path`
25804
25805  input_path="$new_path"
25806  # Check if we need to convert this using DOS-style short mode. If the path
25807  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25808  # take no chances and rewrite it.
25809  # Note: m4 eats our [], so we need to use [ and ] instead.
25810  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25811  if test "x$has_forbidden_chars" != x; then
25812    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25813    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25814  fi
25815
25816    # Output is in $new_path
25817
25818  windows_path="$new_path"
25819  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25820    unix_path=`$CYGPATH -u "$windows_path"`
25821    new_path="$unix_path"
25822  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25823    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25824    new_path="$unix_path"
25825  fi
25826
25827    # remove trailing .exe if any
25828    new_path="${new_path/%.exe/}"
25829
25830    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25831    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25832  fi
25833
25834  else
25835    # We're on a posix platform. Hooray! :)
25836    # First separate the path from the arguments. This will split at the first
25837    # space.
25838    complete="$NM"
25839    path="${complete%% *}"
25840    tmp="$complete EOL"
25841    arguments="${tmp#* }"
25842
25843    # Cannot rely on the command "which" here since it doesn't always work.
25844    is_absolute_path=`$ECHO "$path" | $GREP ^/`
25845    if test -z "$is_absolute_path"; then
25846      # Path to executable is not absolute. Find it.
25847      IFS_save="$IFS"
25848      IFS=:
25849      for p in $PATH; do
25850        if test -f "$p/$path" && test -x "$p/$path"; then
25851          new_path="$p/$path"
25852          break
25853        fi
25854      done
25855      IFS="$IFS_save"
25856    else
25857      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) failed, using $path directly." >&5
25858$as_echo "$as_me: Resolving NM (as $path) failed, using $path directly." >&6;}
25859      new_path="$path"
25860    fi
25861
25862    if test "x$new_path" = x; then
25863      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25864$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25865      has_space=`$ECHO "$complete" | $GREP " "`
25866      if test "x$has_space" != x; then
25867        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25868$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25869      fi
25870      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25871    fi
25872  fi
25873
25874  # Now join together the path and the arguments once again
25875  if test "x$arguments" != xEOL; then
25876    new_complete="$new_path ${arguments% *}"
25877  else
25878    new_complete="$new_path"
25879  fi
25880
25881  if test "x$complete" != "x$new_complete"; then
25882    NM="$new_complete"
25883    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
25884$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
25885  fi
25886
25887    # Extract the first word of "gnm", so it can be a program name with args.
25888set dummy gnm; ac_word=$2
25889{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25890$as_echo_n "checking for $ac_word... " >&6; }
25891if ${ac_cv_path_GNM+:} false; then :
25892  $as_echo_n "(cached) " >&6
25893else
25894  case $GNM in
25895  [\\/]* | ?:[\\/]*)
25896  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
25897  ;;
25898  *)
25899  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25900for as_dir in $PATH
25901do
25902  IFS=$as_save_IFS
25903  test -z "$as_dir" && as_dir=.
25904    for ac_exec_ext in '' $ac_executable_extensions; do
25905  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25906    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
25907    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25908    break 2
25909  fi
25910done
25911  done
25912IFS=$as_save_IFS
25913
25914  ;;
25915esac
25916fi
25917GNM=$ac_cv_path_GNM
25918if test -n "$GNM"; then
25919  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
25920$as_echo "$GNM" >&6; }
25921else
25922  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25923$as_echo "no" >&6; }
25924fi
25925
25926
25927
25928  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25929
25930  # First separate the path from the arguments. This will split at the first
25931  # space.
25932  complete="$GNM"
25933  path="${complete%% *}"
25934  tmp="$complete EOL"
25935  arguments="${tmp#* }"
25936
25937  # Input might be given as Windows format, start by converting to
25938  # unix format.
25939  new_path=`$CYGPATH -u "$path"`
25940
25941  # Now try to locate executable using which
25942  new_path=`$WHICH "$new_path" 2> /dev/null`
25943  # bat and cmd files are not always considered executable in cygwin causing which
25944  # to not find them
25945  if test "x$new_path" = x \
25946      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25947      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25948    new_path=`$CYGPATH -u "$path"`
25949  fi
25950  if test "x$new_path" = x; then
25951    # Oops. Which didn't find the executable.
25952    # The splitting of arguments from the executable at a space might have been incorrect,
25953    # since paths with space are more likely in Windows. Give it another try with the whole
25954    # argument.
25955    path="$complete"
25956    arguments="EOL"
25957    new_path=`$CYGPATH -u "$path"`
25958    new_path=`$WHICH "$new_path" 2> /dev/null`
25959    # bat and cmd files are not always considered executable in cygwin causing which
25960    # to not find them
25961    if test "x$new_path" = x \
25962        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25963        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25964      new_path=`$CYGPATH -u "$path"`
25965    fi
25966    if test "x$new_path" = x; then
25967      # It's still not found. Now this is an unrecoverable error.
25968      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
25969$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
25970      has_space=`$ECHO "$complete" | $GREP " "`
25971      if test "x$has_space" != x; then
25972        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25973$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25974      fi
25975      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
25976    fi
25977  fi
25978
25979  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25980  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25981  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25982  # "foo.exe" is OK but "foo" is an error.
25983  #
25984  # This test is therefore slightly more accurate than "test -f" to check for file presence.
25985  # It is also a way to make sure we got the proper file name for the real test later on.
25986  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25987  if test "x$test_shortpath" = x; then
25988    # Short path failed, file does not exist as specified.
25989    # Try adding .exe or .cmd
25990    if test -f "${new_path}.exe"; then
25991      input_to_shortpath="${new_path}.exe"
25992    elif test -f "${new_path}.cmd"; then
25993      input_to_shortpath="${new_path}.cmd"
25994    else
25995      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
25996$as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
25997      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25998$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25999      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
26000    fi
26001  else
26002    input_to_shortpath="$new_path"
26003  fi
26004
26005  # Call helper function which possibly converts this using DOS-style short mode.
26006  # If so, the updated path is stored in $new_path.
26007  new_path="$input_to_shortpath"
26008
26009  input_path="$input_to_shortpath"
26010  # Check if we need to convert this using DOS-style short mode. If the path
26011  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26012  # take no chances and rewrite it.
26013  # Note: m4 eats our [], so we need to use [ and ] instead.
26014  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26015  if test "x$has_forbidden_chars" != x; then
26016    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26017    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26018    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26019    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26020      # Going to short mode and back again did indeed matter. Since short mode is
26021      # case insensitive, let's make it lowercase to improve readability.
26022      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26023      # Now convert it back to Unix-stile (cygpath)
26024      input_path=`$CYGPATH -u "$shortmode_path"`
26025      new_path="$input_path"
26026    fi
26027  fi
26028
26029  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26030  if test "x$test_cygdrive_prefix" = x; then
26031    # As a simple fix, exclude /usr/bin since it's not a real path.
26032    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26033      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26034      # a path prefixed by /cygdrive for fixpath to work.
26035      new_path="$CYGWIN_ROOT_PATH$input_path"
26036    fi
26037  fi
26038
26039  # remove trailing .exe if any
26040  new_path="${new_path/%.exe/}"
26041
26042  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26043
26044  # First separate the path from the arguments. This will split at the first
26045  # space.
26046  complete="$GNM"
26047  path="${complete%% *}"
26048  tmp="$complete EOL"
26049  arguments="${tmp#* }"
26050
26051  # Input might be given as Windows format, start by converting to
26052  # unix format.
26053  new_path="$path"
26054
26055  windows_path="$new_path"
26056  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26057    unix_path=`$CYGPATH -u "$windows_path"`
26058    new_path="$unix_path"
26059  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26060    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26061    new_path="$unix_path"
26062  fi
26063
26064
26065  # Now try to locate executable using which
26066  new_path=`$WHICH "$new_path" 2> /dev/null`
26067
26068  if test "x$new_path" = x; then
26069    # Oops. Which didn't find the executable.
26070    # The splitting of arguments from the executable at a space might have been incorrect,
26071    # since paths with space are more likely in Windows. Give it another try with the whole
26072    # argument.
26073    path="$complete"
26074    arguments="EOL"
26075    new_path="$path"
26076
26077  windows_path="$new_path"
26078  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26079    unix_path=`$CYGPATH -u "$windows_path"`
26080    new_path="$unix_path"
26081  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26082    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26083    new_path="$unix_path"
26084  fi
26085
26086
26087    new_path=`$WHICH "$new_path" 2> /dev/null`
26088
26089    if test "x$new_path" = x; then
26090      # It's still not found. Now this is an unrecoverable error.
26091      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
26092$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
26093      has_space=`$ECHO "$complete" | $GREP " "`
26094      if test "x$has_space" != x; then
26095        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26096$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26097      fi
26098      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
26099    fi
26100  fi
26101
26102  # Now new_path has a complete unix path to the binary
26103  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26104    # Keep paths in /bin as-is, but remove trailing .exe if any
26105    new_path="${new_path/%.exe/}"
26106    # Do not save /bin paths to all_fixpath_prefixes!
26107  else
26108    # Not in mixed or Windows style, start by that.
26109    new_path=`cmd //c echo $new_path`
26110
26111  input_path="$new_path"
26112  # Check if we need to convert this using DOS-style short mode. If the path
26113  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26114  # take no chances and rewrite it.
26115  # Note: m4 eats our [], so we need to use [ and ] instead.
26116  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26117  if test "x$has_forbidden_chars" != x; then
26118    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26119    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26120  fi
26121
26122    # Output is in $new_path
26123
26124  windows_path="$new_path"
26125  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26126    unix_path=`$CYGPATH -u "$windows_path"`
26127    new_path="$unix_path"
26128  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26129    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26130    new_path="$unix_path"
26131  fi
26132
26133    # remove trailing .exe if any
26134    new_path="${new_path/%.exe/}"
26135
26136    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26137    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26138  fi
26139
26140  else
26141    # We're on a posix platform. Hooray! :)
26142    # First separate the path from the arguments. This will split at the first
26143    # space.
26144    complete="$GNM"
26145    path="${complete%% *}"
26146    tmp="$complete EOL"
26147    arguments="${tmp#* }"
26148
26149    # Cannot rely on the command "which" here since it doesn't always work.
26150    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26151    if test -z "$is_absolute_path"; then
26152      # Path to executable is not absolute. Find it.
26153      IFS_save="$IFS"
26154      IFS=:
26155      for p in $PATH; do
26156        if test -f "$p/$path" && test -x "$p/$path"; then
26157          new_path="$p/$path"
26158          break
26159        fi
26160      done
26161      IFS="$IFS_save"
26162    else
26163      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving GNM (as $path) failed, using $path directly." >&5
26164$as_echo "$as_me: Resolving GNM (as $path) failed, using $path directly." >&6;}
26165      new_path="$path"
26166    fi
26167
26168    if test "x$new_path" = x; then
26169      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
26170$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
26171      has_space=`$ECHO "$complete" | $GREP " "`
26172      if test "x$has_space" != x; then
26173        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26174$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26175      fi
26176      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
26177    fi
26178  fi
26179
26180  # Now join together the path and the arguments once again
26181  if test "x$arguments" != xEOL; then
26182    new_complete="$new_path ${arguments% *}"
26183  else
26184    new_complete="$new_path"
26185  fi
26186
26187  if test "x$complete" != "x$new_complete"; then
26188    GNM="$new_complete"
26189    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
26190$as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
26191  fi
26192
26193    # Extract the first word of "strip", so it can be a program name with args.
26194set dummy strip; ac_word=$2
26195{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26196$as_echo_n "checking for $ac_word... " >&6; }
26197if ${ac_cv_path_STRIP+:} false; then :
26198  $as_echo_n "(cached) " >&6
26199else
26200  case $STRIP in
26201  [\\/]* | ?:[\\/]*)
26202  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
26203  ;;
26204  *)
26205  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26206for as_dir in $PATH
26207do
26208  IFS=$as_save_IFS
26209  test -z "$as_dir" && as_dir=.
26210    for ac_exec_ext in '' $ac_executable_extensions; do
26211  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26212    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
26213    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26214    break 2
26215  fi
26216done
26217  done
26218IFS=$as_save_IFS
26219
26220  ;;
26221esac
26222fi
26223STRIP=$ac_cv_path_STRIP
26224if test -n "$STRIP"; then
26225  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
26226$as_echo "$STRIP" >&6; }
26227else
26228  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26229$as_echo "no" >&6; }
26230fi
26231
26232
26233
26234  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26235
26236  # First separate the path from the arguments. This will split at the first
26237  # space.
26238  complete="$STRIP"
26239  path="${complete%% *}"
26240  tmp="$complete EOL"
26241  arguments="${tmp#* }"
26242
26243  # Input might be given as Windows format, start by converting to
26244  # unix format.
26245  new_path=`$CYGPATH -u "$path"`
26246
26247  # Now try to locate executable using which
26248  new_path=`$WHICH "$new_path" 2> /dev/null`
26249  # bat and cmd files are not always considered executable in cygwin causing which
26250  # to not find them
26251  if test "x$new_path" = x \
26252      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26253      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26254    new_path=`$CYGPATH -u "$path"`
26255  fi
26256  if test "x$new_path" = x; then
26257    # Oops. Which didn't find the executable.
26258    # The splitting of arguments from the executable at a space might have been incorrect,
26259    # since paths with space are more likely in Windows. Give it another try with the whole
26260    # argument.
26261    path="$complete"
26262    arguments="EOL"
26263    new_path=`$CYGPATH -u "$path"`
26264    new_path=`$WHICH "$new_path" 2> /dev/null`
26265    # bat and cmd files are not always considered executable in cygwin causing which
26266    # to not find them
26267    if test "x$new_path" = x \
26268        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26269        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26270      new_path=`$CYGPATH -u "$path"`
26271    fi
26272    if test "x$new_path" = x; then
26273      # It's still not found. Now this is an unrecoverable error.
26274      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26275$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26276      has_space=`$ECHO "$complete" | $GREP " "`
26277      if test "x$has_space" != x; then
26278        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26279$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26280      fi
26281      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26282    fi
26283  fi
26284
26285  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26286  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26287  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26288  # "foo.exe" is OK but "foo" is an error.
26289  #
26290  # This test is therefore slightly more accurate than "test -f" to check for file presence.
26291  # It is also a way to make sure we got the proper file name for the real test later on.
26292  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26293  if test "x$test_shortpath" = x; then
26294    # Short path failed, file does not exist as specified.
26295    # Try adding .exe or .cmd
26296    if test -f "${new_path}.exe"; then
26297      input_to_shortpath="${new_path}.exe"
26298    elif test -f "${new_path}.cmd"; then
26299      input_to_shortpath="${new_path}.cmd"
26300    else
26301      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
26302$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
26303      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26304$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26305      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26306    fi
26307  else
26308    input_to_shortpath="$new_path"
26309  fi
26310
26311  # Call helper function which possibly converts this using DOS-style short mode.
26312  # If so, the updated path is stored in $new_path.
26313  new_path="$input_to_shortpath"
26314
26315  input_path="$input_to_shortpath"
26316  # Check if we need to convert this using DOS-style short mode. If the path
26317  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26318  # take no chances and rewrite it.
26319  # Note: m4 eats our [], so we need to use [ and ] instead.
26320  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26321  if test "x$has_forbidden_chars" != x; then
26322    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26323    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26324    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26325    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26326      # Going to short mode and back again did indeed matter. Since short mode is
26327      # case insensitive, let's make it lowercase to improve readability.
26328      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26329      # Now convert it back to Unix-stile (cygpath)
26330      input_path=`$CYGPATH -u "$shortmode_path"`
26331      new_path="$input_path"
26332    fi
26333  fi
26334
26335  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26336  if test "x$test_cygdrive_prefix" = x; then
26337    # As a simple fix, exclude /usr/bin since it's not a real path.
26338    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26339      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26340      # a path prefixed by /cygdrive for fixpath to work.
26341      new_path="$CYGWIN_ROOT_PATH$input_path"
26342    fi
26343  fi
26344
26345  # remove trailing .exe if any
26346  new_path="${new_path/%.exe/}"
26347
26348  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26349
26350  # First separate the path from the arguments. This will split at the first
26351  # space.
26352  complete="$STRIP"
26353  path="${complete%% *}"
26354  tmp="$complete EOL"
26355  arguments="${tmp#* }"
26356
26357  # Input might be given as Windows format, start by converting to
26358  # unix format.
26359  new_path="$path"
26360
26361  windows_path="$new_path"
26362  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26363    unix_path=`$CYGPATH -u "$windows_path"`
26364    new_path="$unix_path"
26365  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26366    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26367    new_path="$unix_path"
26368  fi
26369
26370
26371  # Now try to locate executable using which
26372  new_path=`$WHICH "$new_path" 2> /dev/null`
26373
26374  if test "x$new_path" = x; then
26375    # Oops. Which didn't find the executable.
26376    # The splitting of arguments from the executable at a space might have been incorrect,
26377    # since paths with space are more likely in Windows. Give it another try with the whole
26378    # argument.
26379    path="$complete"
26380    arguments="EOL"
26381    new_path="$path"
26382
26383  windows_path="$new_path"
26384  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26385    unix_path=`$CYGPATH -u "$windows_path"`
26386    new_path="$unix_path"
26387  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26388    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26389    new_path="$unix_path"
26390  fi
26391
26392
26393    new_path=`$WHICH "$new_path" 2> /dev/null`
26394
26395    if test "x$new_path" = x; then
26396      # It's still not found. Now this is an unrecoverable error.
26397      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26398$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26399      has_space=`$ECHO "$complete" | $GREP " "`
26400      if test "x$has_space" != x; then
26401        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26402$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26403      fi
26404      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26405    fi
26406  fi
26407
26408  # Now new_path has a complete unix path to the binary
26409  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26410    # Keep paths in /bin as-is, but remove trailing .exe if any
26411    new_path="${new_path/%.exe/}"
26412    # Do not save /bin paths to all_fixpath_prefixes!
26413  else
26414    # Not in mixed or Windows style, start by that.
26415    new_path=`cmd //c echo $new_path`
26416
26417  input_path="$new_path"
26418  # Check if we need to convert this using DOS-style short mode. If the path
26419  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26420  # take no chances and rewrite it.
26421  # Note: m4 eats our [], so we need to use [ and ] instead.
26422  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26423  if test "x$has_forbidden_chars" != x; then
26424    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26425    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26426  fi
26427
26428    # Output is in $new_path
26429
26430  windows_path="$new_path"
26431  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26432    unix_path=`$CYGPATH -u "$windows_path"`
26433    new_path="$unix_path"
26434  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26435    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26436    new_path="$unix_path"
26437  fi
26438
26439    # remove trailing .exe if any
26440    new_path="${new_path/%.exe/}"
26441
26442    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26443    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26444  fi
26445
26446  else
26447    # We're on a posix platform. Hooray! :)
26448    # First separate the path from the arguments. This will split at the first
26449    # space.
26450    complete="$STRIP"
26451    path="${complete%% *}"
26452    tmp="$complete EOL"
26453    arguments="${tmp#* }"
26454
26455    # Cannot rely on the command "which" here since it doesn't always work.
26456    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26457    if test -z "$is_absolute_path"; then
26458      # Path to executable is not absolute. Find it.
26459      IFS_save="$IFS"
26460      IFS=:
26461      for p in $PATH; do
26462        if test -f "$p/$path" && test -x "$p/$path"; then
26463          new_path="$p/$path"
26464          break
26465        fi
26466      done
26467      IFS="$IFS_save"
26468    else
26469      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) failed, using $path directly." >&5
26470$as_echo "$as_me: Resolving STRIP (as $path) failed, using $path directly." >&6;}
26471      new_path="$path"
26472    fi
26473
26474    if test "x$new_path" = x; then
26475      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26476$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26477      has_space=`$ECHO "$complete" | $GREP " "`
26478      if test "x$has_space" != x; then
26479        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26480$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26481      fi
26482      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26483    fi
26484  fi
26485
26486  # Now join together the path and the arguments once again
26487  if test "x$arguments" != xEOL; then
26488    new_complete="$new_path ${arguments% *}"
26489  else
26490    new_complete="$new_path"
26491  fi
26492
26493  if test "x$complete" != "x$new_complete"; then
26494    STRIP="$new_complete"
26495    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
26496$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
26497  fi
26498
26499    # Extract the first word of "mcs", so it can be a program name with args.
26500set dummy mcs; ac_word=$2
26501{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26502$as_echo_n "checking for $ac_word... " >&6; }
26503if ${ac_cv_path_MCS+:} false; then :
26504  $as_echo_n "(cached) " >&6
26505else
26506  case $MCS in
26507  [\\/]* | ?:[\\/]*)
26508  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
26509  ;;
26510  *)
26511  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26512for as_dir in $PATH
26513do
26514  IFS=$as_save_IFS
26515  test -z "$as_dir" && as_dir=.
26516    for ac_exec_ext in '' $ac_executable_extensions; do
26517  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26518    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
26519    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26520    break 2
26521  fi
26522done
26523  done
26524IFS=$as_save_IFS
26525
26526  ;;
26527esac
26528fi
26529MCS=$ac_cv_path_MCS
26530if test -n "$MCS"; then
26531  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
26532$as_echo "$MCS" >&6; }
26533else
26534  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26535$as_echo "no" >&6; }
26536fi
26537
26538
26539
26540  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26541
26542  # First separate the path from the arguments. This will split at the first
26543  # space.
26544  complete="$MCS"
26545  path="${complete%% *}"
26546  tmp="$complete EOL"
26547  arguments="${tmp#* }"
26548
26549  # Input might be given as Windows format, start by converting to
26550  # unix format.
26551  new_path=`$CYGPATH -u "$path"`
26552
26553  # Now try to locate executable using which
26554  new_path=`$WHICH "$new_path" 2> /dev/null`
26555  # bat and cmd files are not always considered executable in cygwin causing which
26556  # to not find them
26557  if test "x$new_path" = x \
26558      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26559      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26560    new_path=`$CYGPATH -u "$path"`
26561  fi
26562  if test "x$new_path" = x; then
26563    # Oops. Which didn't find the executable.
26564    # The splitting of arguments from the executable at a space might have been incorrect,
26565    # since paths with space are more likely in Windows. Give it another try with the whole
26566    # argument.
26567    path="$complete"
26568    arguments="EOL"
26569    new_path=`$CYGPATH -u "$path"`
26570    new_path=`$WHICH "$new_path" 2> /dev/null`
26571    # bat and cmd files are not always considered executable in cygwin causing which
26572    # to not find them
26573    if test "x$new_path" = x \
26574        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26575        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26576      new_path=`$CYGPATH -u "$path"`
26577    fi
26578    if test "x$new_path" = x; then
26579      # It's still not found. Now this is an unrecoverable error.
26580      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
26581$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
26582      has_space=`$ECHO "$complete" | $GREP " "`
26583      if test "x$has_space" != x; then
26584        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26585$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26586      fi
26587      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
26588    fi
26589  fi
26590
26591  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26592  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26593  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26594  # "foo.exe" is OK but "foo" is an error.
26595  #
26596  # This test is therefore slightly more accurate than "test -f" to check for file presence.
26597  # It is also a way to make sure we got the proper file name for the real test later on.
26598  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26599  if test "x$test_shortpath" = x; then
26600    # Short path failed, file does not exist as specified.
26601    # Try adding .exe or .cmd
26602    if test -f "${new_path}.exe"; then
26603      input_to_shortpath="${new_path}.exe"
26604    elif test -f "${new_path}.cmd"; then
26605      input_to_shortpath="${new_path}.cmd"
26606    else
26607      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$new_path\", is invalid." >&5
26608$as_echo "$as_me: The path of MCS, which resolves as \"$new_path\", is invalid." >&6;}
26609      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26610$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26611      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
26612    fi
26613  else
26614    input_to_shortpath="$new_path"
26615  fi
26616
26617  # Call helper function which possibly converts this using DOS-style short mode.
26618  # If so, the updated path is stored in $new_path.
26619  new_path="$input_to_shortpath"
26620
26621  input_path="$input_to_shortpath"
26622  # Check if we need to convert this using DOS-style short mode. If the path
26623  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26624  # take no chances and rewrite it.
26625  # Note: m4 eats our [], so we need to use [ and ] instead.
26626  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26627  if test "x$has_forbidden_chars" != x; then
26628    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26629    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26630    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26631    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26632      # Going to short mode and back again did indeed matter. Since short mode is
26633      # case insensitive, let's make it lowercase to improve readability.
26634      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26635      # Now convert it back to Unix-stile (cygpath)
26636      input_path=`$CYGPATH -u "$shortmode_path"`
26637      new_path="$input_path"
26638    fi
26639  fi
26640
26641  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26642  if test "x$test_cygdrive_prefix" = x; then
26643    # As a simple fix, exclude /usr/bin since it's not a real path.
26644    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26645      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26646      # a path prefixed by /cygdrive for fixpath to work.
26647      new_path="$CYGWIN_ROOT_PATH$input_path"
26648    fi
26649  fi
26650
26651  # remove trailing .exe if any
26652  new_path="${new_path/%.exe/}"
26653
26654  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26655
26656  # First separate the path from the arguments. This will split at the first
26657  # space.
26658  complete="$MCS"
26659  path="${complete%% *}"
26660  tmp="$complete EOL"
26661  arguments="${tmp#* }"
26662
26663  # Input might be given as Windows format, start by converting to
26664  # unix format.
26665  new_path="$path"
26666
26667  windows_path="$new_path"
26668  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26669    unix_path=`$CYGPATH -u "$windows_path"`
26670    new_path="$unix_path"
26671  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26672    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26673    new_path="$unix_path"
26674  fi
26675
26676
26677  # Now try to locate executable using which
26678  new_path=`$WHICH "$new_path" 2> /dev/null`
26679
26680  if test "x$new_path" = x; then
26681    # Oops. Which didn't find the executable.
26682    # The splitting of arguments from the executable at a space might have been incorrect,
26683    # since paths with space are more likely in Windows. Give it another try with the whole
26684    # argument.
26685    path="$complete"
26686    arguments="EOL"
26687    new_path="$path"
26688
26689  windows_path="$new_path"
26690  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26691    unix_path=`$CYGPATH -u "$windows_path"`
26692    new_path="$unix_path"
26693  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26694    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26695    new_path="$unix_path"
26696  fi
26697
26698
26699    new_path=`$WHICH "$new_path" 2> /dev/null`
26700
26701    if test "x$new_path" = x; then
26702      # It's still not found. Now this is an unrecoverable error.
26703      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
26704$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
26705      has_space=`$ECHO "$complete" | $GREP " "`
26706      if test "x$has_space" != x; then
26707        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26708$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26709      fi
26710      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
26711    fi
26712  fi
26713
26714  # Now new_path has a complete unix path to the binary
26715  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26716    # Keep paths in /bin as-is, but remove trailing .exe if any
26717    new_path="${new_path/%.exe/}"
26718    # Do not save /bin paths to all_fixpath_prefixes!
26719  else
26720    # Not in mixed or Windows style, start by that.
26721    new_path=`cmd //c echo $new_path`
26722
26723  input_path="$new_path"
26724  # Check if we need to convert this using DOS-style short mode. If the path
26725  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26726  # take no chances and rewrite it.
26727  # Note: m4 eats our [], so we need to use [ and ] instead.
26728  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26729  if test "x$has_forbidden_chars" != x; then
26730    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26731    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26732  fi
26733
26734    # Output is in $new_path
26735
26736  windows_path="$new_path"
26737  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26738    unix_path=`$CYGPATH -u "$windows_path"`
26739    new_path="$unix_path"
26740  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26741    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26742    new_path="$unix_path"
26743  fi
26744
26745    # remove trailing .exe if any
26746    new_path="${new_path/%.exe/}"
26747
26748    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26749    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26750  fi
26751
26752  else
26753    # We're on a posix platform. Hooray! :)
26754    # First separate the path from the arguments. This will split at the first
26755    # space.
26756    complete="$MCS"
26757    path="${complete%% *}"
26758    tmp="$complete EOL"
26759    arguments="${tmp#* }"
26760
26761    # Cannot rely on the command "which" here since it doesn't always work.
26762    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26763    if test -z "$is_absolute_path"; then
26764      # Path to executable is not absolute. Find it.
26765      IFS_save="$IFS"
26766      IFS=:
26767      for p in $PATH; do
26768        if test -f "$p/$path" && test -x "$p/$path"; then
26769          new_path="$p/$path"
26770          break
26771        fi
26772      done
26773      IFS="$IFS_save"
26774    else
26775      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MCS (as $path) failed, using $path directly." >&5
26776$as_echo "$as_me: Resolving MCS (as $path) failed, using $path directly." >&6;}
26777      new_path="$path"
26778    fi
26779
26780    if test "x$new_path" = x; then
26781      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
26782$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
26783      has_space=`$ECHO "$complete" | $GREP " "`
26784      if test "x$has_space" != x; then
26785        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26786$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26787      fi
26788      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
26789    fi
26790  fi
26791
26792  # Now join together the path and the arguments once again
26793  if test "x$arguments" != xEOL; then
26794    new_complete="$new_path ${arguments% *}"
26795  else
26796    new_complete="$new_path"
26797  fi
26798
26799  if test "x$complete" != "x$new_complete"; then
26800    MCS="$new_complete"
26801    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MCS to \"$new_complete\"" >&5
26802$as_echo "$as_me: Rewriting MCS to \"$new_complete\"" >&6;}
26803  fi
26804
26805  elif test "x$OPENJDK_TARGET_OS" != xwindows; then
26806    if test -n "$ac_tool_prefix"; then
26807  # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
26808set dummy ${ac_tool_prefix}nm; ac_word=$2
26809{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26810$as_echo_n "checking for $ac_word... " >&6; }
26811if ${ac_cv_prog_NM+:} false; then :
26812  $as_echo_n "(cached) " >&6
26813else
26814  if test -n "$NM"; then
26815  ac_cv_prog_NM="$NM" # Let the user override the test.
26816else
26817as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26818for as_dir in $PATH
26819do
26820  IFS=$as_save_IFS
26821  test -z "$as_dir" && as_dir=.
26822    for ac_exec_ext in '' $ac_executable_extensions; do
26823  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26824    ac_cv_prog_NM="${ac_tool_prefix}nm"
26825    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26826    break 2
26827  fi
26828done
26829  done
26830IFS=$as_save_IFS
26831
26832fi
26833fi
26834NM=$ac_cv_prog_NM
26835if test -n "$NM"; then
26836  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
26837$as_echo "$NM" >&6; }
26838else
26839  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26840$as_echo "no" >&6; }
26841fi
26842
26843
26844fi
26845if test -z "$ac_cv_prog_NM"; then
26846  ac_ct_NM=$NM
26847  # Extract the first word of "nm", so it can be a program name with args.
26848set dummy nm; ac_word=$2
26849{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26850$as_echo_n "checking for $ac_word... " >&6; }
26851if ${ac_cv_prog_ac_ct_NM+:} false; then :
26852  $as_echo_n "(cached) " >&6
26853else
26854  if test -n "$ac_ct_NM"; then
26855  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
26856else
26857as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26858for as_dir in $PATH
26859do
26860  IFS=$as_save_IFS
26861  test -z "$as_dir" && as_dir=.
26862    for ac_exec_ext in '' $ac_executable_extensions; do
26863  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26864    ac_cv_prog_ac_ct_NM="nm"
26865    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26866    break 2
26867  fi
26868done
26869  done
26870IFS=$as_save_IFS
26871
26872fi
26873fi
26874ac_ct_NM=$ac_cv_prog_ac_ct_NM
26875if test -n "$ac_ct_NM"; then
26876  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
26877$as_echo "$ac_ct_NM" >&6; }
26878else
26879  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26880$as_echo "no" >&6; }
26881fi
26882
26883  if test "x$ac_ct_NM" = x; then
26884    NM=""
26885  else
26886    case $cross_compiling:$ac_tool_warned in
26887yes:)
26888{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
26889$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
26890ac_tool_warned=yes ;;
26891esac
26892    NM=$ac_ct_NM
26893  fi
26894else
26895  NM="$ac_cv_prog_NM"
26896fi
26897
26898
26899  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26900
26901  # First separate the path from the arguments. This will split at the first
26902  # space.
26903  complete="$NM"
26904  path="${complete%% *}"
26905  tmp="$complete EOL"
26906  arguments="${tmp#* }"
26907
26908  # Input might be given as Windows format, start by converting to
26909  # unix format.
26910  new_path=`$CYGPATH -u "$path"`
26911
26912  # Now try to locate executable using which
26913  new_path=`$WHICH "$new_path" 2> /dev/null`
26914  # bat and cmd files are not always considered executable in cygwin causing which
26915  # to not find them
26916  if test "x$new_path" = x \
26917      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26918      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26919    new_path=`$CYGPATH -u "$path"`
26920  fi
26921  if test "x$new_path" = x; then
26922    # Oops. Which didn't find the executable.
26923    # The splitting of arguments from the executable at a space might have been incorrect,
26924    # since paths with space are more likely in Windows. Give it another try with the whole
26925    # argument.
26926    path="$complete"
26927    arguments="EOL"
26928    new_path=`$CYGPATH -u "$path"`
26929    new_path=`$WHICH "$new_path" 2> /dev/null`
26930    # bat and cmd files are not always considered executable in cygwin causing which
26931    # to not find them
26932    if test "x$new_path" = x \
26933        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26934        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26935      new_path=`$CYGPATH -u "$path"`
26936    fi
26937    if test "x$new_path" = x; then
26938      # It's still not found. Now this is an unrecoverable error.
26939      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
26940$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
26941      has_space=`$ECHO "$complete" | $GREP " "`
26942      if test "x$has_space" != x; then
26943        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26944$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26945      fi
26946      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
26947    fi
26948  fi
26949
26950  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26951  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26952  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26953  # "foo.exe" is OK but "foo" is an error.
26954  #
26955  # This test is therefore slightly more accurate than "test -f" to check for file presence.
26956  # It is also a way to make sure we got the proper file name for the real test later on.
26957  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26958  if test "x$test_shortpath" = x; then
26959    # Short path failed, file does not exist as specified.
26960    # Try adding .exe or .cmd
26961    if test -f "${new_path}.exe"; then
26962      input_to_shortpath="${new_path}.exe"
26963    elif test -f "${new_path}.cmd"; then
26964      input_to_shortpath="${new_path}.cmd"
26965    else
26966      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
26967$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
26968      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26969$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26970      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
26971    fi
26972  else
26973    input_to_shortpath="$new_path"
26974  fi
26975
26976  # Call helper function which possibly converts this using DOS-style short mode.
26977  # If so, the updated path is stored in $new_path.
26978  new_path="$input_to_shortpath"
26979
26980  input_path="$input_to_shortpath"
26981  # Check if we need to convert this using DOS-style short mode. If the path
26982  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26983  # take no chances and rewrite it.
26984  # Note: m4 eats our [], so we need to use [ and ] instead.
26985  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26986  if test "x$has_forbidden_chars" != x; then
26987    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26988    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26989    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26990    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26991      # Going to short mode and back again did indeed matter. Since short mode is
26992      # case insensitive, let's make it lowercase to improve readability.
26993      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26994      # Now convert it back to Unix-stile (cygpath)
26995      input_path=`$CYGPATH -u "$shortmode_path"`
26996      new_path="$input_path"
26997    fi
26998  fi
26999
27000  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27001  if test "x$test_cygdrive_prefix" = x; then
27002    # As a simple fix, exclude /usr/bin since it's not a real path.
27003    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27004      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27005      # a path prefixed by /cygdrive for fixpath to work.
27006      new_path="$CYGWIN_ROOT_PATH$input_path"
27007    fi
27008  fi
27009
27010  # remove trailing .exe if any
27011  new_path="${new_path/%.exe/}"
27012
27013  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27014
27015  # First separate the path from the arguments. This will split at the first
27016  # space.
27017  complete="$NM"
27018  path="${complete%% *}"
27019  tmp="$complete EOL"
27020  arguments="${tmp#* }"
27021
27022  # Input might be given as Windows format, start by converting to
27023  # unix format.
27024  new_path="$path"
27025
27026  windows_path="$new_path"
27027  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27028    unix_path=`$CYGPATH -u "$windows_path"`
27029    new_path="$unix_path"
27030  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27031    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27032    new_path="$unix_path"
27033  fi
27034
27035
27036  # Now try to locate executable using which
27037  new_path=`$WHICH "$new_path" 2> /dev/null`
27038
27039  if test "x$new_path" = x; then
27040    # Oops. Which didn't find the executable.
27041    # The splitting of arguments from the executable at a space might have been incorrect,
27042    # since paths with space are more likely in Windows. Give it another try with the whole
27043    # argument.
27044    path="$complete"
27045    arguments="EOL"
27046    new_path="$path"
27047
27048  windows_path="$new_path"
27049  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27050    unix_path=`$CYGPATH -u "$windows_path"`
27051    new_path="$unix_path"
27052  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27053    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27054    new_path="$unix_path"
27055  fi
27056
27057
27058    new_path=`$WHICH "$new_path" 2> /dev/null`
27059
27060    if test "x$new_path" = x; then
27061      # It's still not found. Now this is an unrecoverable error.
27062      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
27063$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
27064      has_space=`$ECHO "$complete" | $GREP " "`
27065      if test "x$has_space" != x; then
27066        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27067$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27068      fi
27069      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
27070    fi
27071  fi
27072
27073  # Now new_path has a complete unix path to the binary
27074  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27075    # Keep paths in /bin as-is, but remove trailing .exe if any
27076    new_path="${new_path/%.exe/}"
27077    # Do not save /bin paths to all_fixpath_prefixes!
27078  else
27079    # Not in mixed or Windows style, start by that.
27080    new_path=`cmd //c echo $new_path`
27081
27082  input_path="$new_path"
27083  # Check if we need to convert this using DOS-style short mode. If the path
27084  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27085  # take no chances and rewrite it.
27086  # Note: m4 eats our [], so we need to use [ and ] instead.
27087  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27088  if test "x$has_forbidden_chars" != x; then
27089    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27090    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27091  fi
27092
27093    # Output is in $new_path
27094
27095  windows_path="$new_path"
27096  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27097    unix_path=`$CYGPATH -u "$windows_path"`
27098    new_path="$unix_path"
27099  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27100    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27101    new_path="$unix_path"
27102  fi
27103
27104    # remove trailing .exe if any
27105    new_path="${new_path/%.exe/}"
27106
27107    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27108    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27109  fi
27110
27111  else
27112    # We're on a posix platform. Hooray! :)
27113    # First separate the path from the arguments. This will split at the first
27114    # space.
27115    complete="$NM"
27116    path="${complete%% *}"
27117    tmp="$complete EOL"
27118    arguments="${tmp#* }"
27119
27120    # Cannot rely on the command "which" here since it doesn't always work.
27121    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27122    if test -z "$is_absolute_path"; then
27123      # Path to executable is not absolute. Find it.
27124      IFS_save="$IFS"
27125      IFS=:
27126      for p in $PATH; do
27127        if test -f "$p/$path" && test -x "$p/$path"; then
27128          new_path="$p/$path"
27129          break
27130        fi
27131      done
27132      IFS="$IFS_save"
27133    else
27134      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) failed, using $path directly." >&5
27135$as_echo "$as_me: Resolving NM (as $path) failed, using $path directly." >&6;}
27136      new_path="$path"
27137    fi
27138
27139    if test "x$new_path" = x; then
27140      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
27141$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
27142      has_space=`$ECHO "$complete" | $GREP " "`
27143      if test "x$has_space" != x; then
27144        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27145$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27146      fi
27147      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
27148    fi
27149  fi
27150
27151  # Now join together the path and the arguments once again
27152  if test "x$arguments" != xEOL; then
27153    new_complete="$new_path ${arguments% *}"
27154  else
27155    new_complete="$new_path"
27156  fi
27157
27158  if test "x$complete" != "x$new_complete"; then
27159    NM="$new_complete"
27160    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
27161$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
27162  fi
27163
27164    GNM="$NM"
27165
27166    if test -n "$ac_tool_prefix"; then
27167  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
27168set dummy ${ac_tool_prefix}strip; ac_word=$2
27169{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27170$as_echo_n "checking for $ac_word... " >&6; }
27171if ${ac_cv_prog_STRIP+:} false; then :
27172  $as_echo_n "(cached) " >&6
27173else
27174  if test -n "$STRIP"; then
27175  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
27176else
27177as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27178for as_dir in $PATH
27179do
27180  IFS=$as_save_IFS
27181  test -z "$as_dir" && as_dir=.
27182    for ac_exec_ext in '' $ac_executable_extensions; do
27183  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27184    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
27185    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27186    break 2
27187  fi
27188done
27189  done
27190IFS=$as_save_IFS
27191
27192fi
27193fi
27194STRIP=$ac_cv_prog_STRIP
27195if test -n "$STRIP"; then
27196  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
27197$as_echo "$STRIP" >&6; }
27198else
27199  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27200$as_echo "no" >&6; }
27201fi
27202
27203
27204fi
27205if test -z "$ac_cv_prog_STRIP"; then
27206  ac_ct_STRIP=$STRIP
27207  # Extract the first word of "strip", so it can be a program name with args.
27208set dummy strip; ac_word=$2
27209{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27210$as_echo_n "checking for $ac_word... " >&6; }
27211if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
27212  $as_echo_n "(cached) " >&6
27213else
27214  if test -n "$ac_ct_STRIP"; then
27215  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
27216else
27217as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27218for as_dir in $PATH
27219do
27220  IFS=$as_save_IFS
27221  test -z "$as_dir" && as_dir=.
27222    for ac_exec_ext in '' $ac_executable_extensions; do
27223  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27224    ac_cv_prog_ac_ct_STRIP="strip"
27225    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27226    break 2
27227  fi
27228done
27229  done
27230IFS=$as_save_IFS
27231
27232fi
27233fi
27234ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
27235if test -n "$ac_ct_STRIP"; then
27236  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
27237$as_echo "$ac_ct_STRIP" >&6; }
27238else
27239  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27240$as_echo "no" >&6; }
27241fi
27242
27243  if test "x$ac_ct_STRIP" = x; then
27244    STRIP=""
27245  else
27246    case $cross_compiling:$ac_tool_warned in
27247yes:)
27248{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
27249$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
27250ac_tool_warned=yes ;;
27251esac
27252    STRIP=$ac_ct_STRIP
27253  fi
27254else
27255  STRIP="$ac_cv_prog_STRIP"
27256fi
27257
27258
27259  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27260
27261  # First separate the path from the arguments. This will split at the first
27262  # space.
27263  complete="$STRIP"
27264  path="${complete%% *}"
27265  tmp="$complete EOL"
27266  arguments="${tmp#* }"
27267
27268  # Input might be given as Windows format, start by converting to
27269  # unix format.
27270  new_path=`$CYGPATH -u "$path"`
27271
27272  # Now try to locate executable using which
27273  new_path=`$WHICH "$new_path" 2> /dev/null`
27274  # bat and cmd files are not always considered executable in cygwin causing which
27275  # to not find them
27276  if test "x$new_path" = x \
27277      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27278      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27279    new_path=`$CYGPATH -u "$path"`
27280  fi
27281  if test "x$new_path" = x; then
27282    # Oops. Which didn't find the executable.
27283    # The splitting of arguments from the executable at a space might have been incorrect,
27284    # since paths with space are more likely in Windows. Give it another try with the whole
27285    # argument.
27286    path="$complete"
27287    arguments="EOL"
27288    new_path=`$CYGPATH -u "$path"`
27289    new_path=`$WHICH "$new_path" 2> /dev/null`
27290    # bat and cmd files are not always considered executable in cygwin causing which
27291    # to not find them
27292    if test "x$new_path" = x \
27293        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27294        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27295      new_path=`$CYGPATH -u "$path"`
27296    fi
27297    if test "x$new_path" = x; then
27298      # It's still not found. Now this is an unrecoverable error.
27299      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
27300$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
27301      has_space=`$ECHO "$complete" | $GREP " "`
27302      if test "x$has_space" != x; then
27303        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27304$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27305      fi
27306      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
27307    fi
27308  fi
27309
27310  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27311  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27312  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27313  # "foo.exe" is OK but "foo" is an error.
27314  #
27315  # This test is therefore slightly more accurate than "test -f" to check for file presence.
27316  # It is also a way to make sure we got the proper file name for the real test later on.
27317  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27318  if test "x$test_shortpath" = x; then
27319    # Short path failed, file does not exist as specified.
27320    # Try adding .exe or .cmd
27321    if test -f "${new_path}.exe"; then
27322      input_to_shortpath="${new_path}.exe"
27323    elif test -f "${new_path}.cmd"; then
27324      input_to_shortpath="${new_path}.cmd"
27325    else
27326      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
27327$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
27328      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27329$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27330      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
27331    fi
27332  else
27333    input_to_shortpath="$new_path"
27334  fi
27335
27336  # Call helper function which possibly converts this using DOS-style short mode.
27337  # If so, the updated path is stored in $new_path.
27338  new_path="$input_to_shortpath"
27339
27340  input_path="$input_to_shortpath"
27341  # Check if we need to convert this using DOS-style short mode. If the path
27342  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27343  # take no chances and rewrite it.
27344  # Note: m4 eats our [], so we need to use [ and ] instead.
27345  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27346  if test "x$has_forbidden_chars" != x; then
27347    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27348    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27349    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27350    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27351      # Going to short mode and back again did indeed matter. Since short mode is
27352      # case insensitive, let's make it lowercase to improve readability.
27353      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27354      # Now convert it back to Unix-stile (cygpath)
27355      input_path=`$CYGPATH -u "$shortmode_path"`
27356      new_path="$input_path"
27357    fi
27358  fi
27359
27360  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27361  if test "x$test_cygdrive_prefix" = x; then
27362    # As a simple fix, exclude /usr/bin since it's not a real path.
27363    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27364      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27365      # a path prefixed by /cygdrive for fixpath to work.
27366      new_path="$CYGWIN_ROOT_PATH$input_path"
27367    fi
27368  fi
27369
27370  # remove trailing .exe if any
27371  new_path="${new_path/%.exe/}"
27372
27373  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27374
27375  # First separate the path from the arguments. This will split at the first
27376  # space.
27377  complete="$STRIP"
27378  path="${complete%% *}"
27379  tmp="$complete EOL"
27380  arguments="${tmp#* }"
27381
27382  # Input might be given as Windows format, start by converting to
27383  # unix format.
27384  new_path="$path"
27385
27386  windows_path="$new_path"
27387  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27388    unix_path=`$CYGPATH -u "$windows_path"`
27389    new_path="$unix_path"
27390  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27391    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27392    new_path="$unix_path"
27393  fi
27394
27395
27396  # Now try to locate executable using which
27397  new_path=`$WHICH "$new_path" 2> /dev/null`
27398
27399  if test "x$new_path" = x; then
27400    # Oops. Which didn't find the executable.
27401    # The splitting of arguments from the executable at a space might have been incorrect,
27402    # since paths with space are more likely in Windows. Give it another try with the whole
27403    # argument.
27404    path="$complete"
27405    arguments="EOL"
27406    new_path="$path"
27407
27408  windows_path="$new_path"
27409  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27410    unix_path=`$CYGPATH -u "$windows_path"`
27411    new_path="$unix_path"
27412  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27413    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27414    new_path="$unix_path"
27415  fi
27416
27417
27418    new_path=`$WHICH "$new_path" 2> /dev/null`
27419
27420    if test "x$new_path" = x; then
27421      # It's still not found. Now this is an unrecoverable error.
27422      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
27423$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
27424      has_space=`$ECHO "$complete" | $GREP " "`
27425      if test "x$has_space" != x; then
27426        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27427$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27428      fi
27429      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
27430    fi
27431  fi
27432
27433  # Now new_path has a complete unix path to the binary
27434  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27435    # Keep paths in /bin as-is, but remove trailing .exe if any
27436    new_path="${new_path/%.exe/}"
27437    # Do not save /bin paths to all_fixpath_prefixes!
27438  else
27439    # Not in mixed or Windows style, start by that.
27440    new_path=`cmd //c echo $new_path`
27441
27442  input_path="$new_path"
27443  # Check if we need to convert this using DOS-style short mode. If the path
27444  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27445  # take no chances and rewrite it.
27446  # Note: m4 eats our [], so we need to use [ and ] instead.
27447  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27448  if test "x$has_forbidden_chars" != x; then
27449    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27450    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27451  fi
27452
27453    # Output is in $new_path
27454
27455  windows_path="$new_path"
27456  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27457    unix_path=`$CYGPATH -u "$windows_path"`
27458    new_path="$unix_path"
27459  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27460    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27461    new_path="$unix_path"
27462  fi
27463
27464    # remove trailing .exe if any
27465    new_path="${new_path/%.exe/}"
27466
27467    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27468    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27469  fi
27470
27471  else
27472    # We're on a posix platform. Hooray! :)
27473    # First separate the path from the arguments. This will split at the first
27474    # space.
27475    complete="$STRIP"
27476    path="${complete%% *}"
27477    tmp="$complete EOL"
27478    arguments="${tmp#* }"
27479
27480    # Cannot rely on the command "which" here since it doesn't always work.
27481    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27482    if test -z "$is_absolute_path"; then
27483      # Path to executable is not absolute. Find it.
27484      IFS_save="$IFS"
27485      IFS=:
27486      for p in $PATH; do
27487        if test -f "$p/$path" && test -x "$p/$path"; then
27488          new_path="$p/$path"
27489          break
27490        fi
27491      done
27492      IFS="$IFS_save"
27493    else
27494      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) failed, using $path directly." >&5
27495$as_echo "$as_me: Resolving STRIP (as $path) failed, using $path directly." >&6;}
27496      new_path="$path"
27497    fi
27498
27499    if test "x$new_path" = x; then
27500      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
27501$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
27502      has_space=`$ECHO "$complete" | $GREP " "`
27503      if test "x$has_space" != x; then
27504        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27505$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27506      fi
27507      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
27508    fi
27509  fi
27510
27511  # Now join together the path and the arguments once again
27512  if test "x$arguments" != xEOL; then
27513    new_complete="$new_path ${arguments% *}"
27514  else
27515    new_complete="$new_path"
27516  fi
27517
27518  if test "x$complete" != "x$new_complete"; then
27519    STRIP="$new_complete"
27520    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
27521$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
27522  fi
27523
27524  fi
27525
27526  # objcopy is used for moving debug symbols to separate files when
27527  # full debug symbols are enabled.
27528  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
27529    if test -n "$ac_tool_prefix"; then
27530  for ac_prog in gobjcopy objcopy
27531  do
27532    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
27533set dummy $ac_tool_prefix$ac_prog; ac_word=$2
27534{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27535$as_echo_n "checking for $ac_word... " >&6; }
27536if ${ac_cv_prog_OBJCOPY+:} false; then :
27537  $as_echo_n "(cached) " >&6
27538else
27539  if test -n "$OBJCOPY"; then
27540  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
27541else
27542as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27543for as_dir in $PATH
27544do
27545  IFS=$as_save_IFS
27546  test -z "$as_dir" && as_dir=.
27547    for ac_exec_ext in '' $ac_executable_extensions; do
27548  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27549    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
27550    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27551    break 2
27552  fi
27553done
27554  done
27555IFS=$as_save_IFS
27556
27557fi
27558fi
27559OBJCOPY=$ac_cv_prog_OBJCOPY
27560if test -n "$OBJCOPY"; then
27561  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
27562$as_echo "$OBJCOPY" >&6; }
27563else
27564  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27565$as_echo "no" >&6; }
27566fi
27567
27568
27569    test -n "$OBJCOPY" && break
27570  done
27571fi
27572if test -z "$OBJCOPY"; then
27573  ac_ct_OBJCOPY=$OBJCOPY
27574  for ac_prog in gobjcopy objcopy
27575do
27576  # Extract the first word of "$ac_prog", so it can be a program name with args.
27577set dummy $ac_prog; ac_word=$2
27578{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27579$as_echo_n "checking for $ac_word... " >&6; }
27580if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
27581  $as_echo_n "(cached) " >&6
27582else
27583  if test -n "$ac_ct_OBJCOPY"; then
27584  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
27585else
27586as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27587for as_dir in $PATH
27588do
27589  IFS=$as_save_IFS
27590  test -z "$as_dir" && as_dir=.
27591    for ac_exec_ext in '' $ac_executable_extensions; do
27592  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27593    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
27594    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27595    break 2
27596  fi
27597done
27598  done
27599IFS=$as_save_IFS
27600
27601fi
27602fi
27603ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
27604if test -n "$ac_ct_OBJCOPY"; then
27605  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
27606$as_echo "$ac_ct_OBJCOPY" >&6; }
27607else
27608  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27609$as_echo "no" >&6; }
27610fi
27611
27612
27613  test -n "$ac_ct_OBJCOPY" && break
27614done
27615
27616  if test "x$ac_ct_OBJCOPY" = x; then
27617    OBJCOPY=""
27618  else
27619    case $cross_compiling:$ac_tool_warned in
27620yes:)
27621{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
27622$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
27623ac_tool_warned=yes ;;
27624esac
27625    OBJCOPY=$ac_ct_OBJCOPY
27626  fi
27627fi
27628
27629    # Only call fixup if objcopy was found.
27630    if test -n "$OBJCOPY"; then
27631
27632  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27633
27634  # First separate the path from the arguments. This will split at the first
27635  # space.
27636  complete="$OBJCOPY"
27637  path="${complete%% *}"
27638  tmp="$complete EOL"
27639  arguments="${tmp#* }"
27640
27641  # Input might be given as Windows format, start by converting to
27642  # unix format.
27643  new_path=`$CYGPATH -u "$path"`
27644
27645  # Now try to locate executable using which
27646  new_path=`$WHICH "$new_path" 2> /dev/null`
27647  # bat and cmd files are not always considered executable in cygwin causing which
27648  # to not find them
27649  if test "x$new_path" = x \
27650      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27651      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27652    new_path=`$CYGPATH -u "$path"`
27653  fi
27654  if test "x$new_path" = x; then
27655    # Oops. Which didn't find the executable.
27656    # The splitting of arguments from the executable at a space might have been incorrect,
27657    # since paths with space are more likely in Windows. Give it another try with the whole
27658    # argument.
27659    path="$complete"
27660    arguments="EOL"
27661    new_path=`$CYGPATH -u "$path"`
27662    new_path=`$WHICH "$new_path" 2> /dev/null`
27663    # bat and cmd files are not always considered executable in cygwin causing which
27664    # to not find them
27665    if test "x$new_path" = x \
27666        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27667        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27668      new_path=`$CYGPATH -u "$path"`
27669    fi
27670    if test "x$new_path" = x; then
27671      # It's still not found. Now this is an unrecoverable error.
27672      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
27673$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
27674      has_space=`$ECHO "$complete" | $GREP " "`
27675      if test "x$has_space" != x; then
27676        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27677$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27678      fi
27679      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
27680    fi
27681  fi
27682
27683  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27684  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27685  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27686  # "foo.exe" is OK but "foo" is an error.
27687  #
27688  # This test is therefore slightly more accurate than "test -f" to check for file presence.
27689  # It is also a way to make sure we got the proper file name for the real test later on.
27690  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27691  if test "x$test_shortpath" = x; then
27692    # Short path failed, file does not exist as specified.
27693    # Try adding .exe or .cmd
27694    if test -f "${new_path}.exe"; then
27695      input_to_shortpath="${new_path}.exe"
27696    elif test -f "${new_path}.cmd"; then
27697      input_to_shortpath="${new_path}.cmd"
27698    else
27699      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
27700$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
27701      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27702$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27703      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
27704    fi
27705  else
27706    input_to_shortpath="$new_path"
27707  fi
27708
27709  # Call helper function which possibly converts this using DOS-style short mode.
27710  # If so, the updated path is stored in $new_path.
27711  new_path="$input_to_shortpath"
27712
27713  input_path="$input_to_shortpath"
27714  # Check if we need to convert this using DOS-style short mode. If the path
27715  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27716  # take no chances and rewrite it.
27717  # Note: m4 eats our [], so we need to use [ and ] instead.
27718  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27719  if test "x$has_forbidden_chars" != x; then
27720    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27721    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27722    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27723    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27724      # Going to short mode and back again did indeed matter. Since short mode is
27725      # case insensitive, let's make it lowercase to improve readability.
27726      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27727      # Now convert it back to Unix-stile (cygpath)
27728      input_path=`$CYGPATH -u "$shortmode_path"`
27729      new_path="$input_path"
27730    fi
27731  fi
27732
27733  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27734  if test "x$test_cygdrive_prefix" = x; then
27735    # As a simple fix, exclude /usr/bin since it's not a real path.
27736    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27737      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27738      # a path prefixed by /cygdrive for fixpath to work.
27739      new_path="$CYGWIN_ROOT_PATH$input_path"
27740    fi
27741  fi
27742
27743  # remove trailing .exe if any
27744  new_path="${new_path/%.exe/}"
27745
27746  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27747
27748  # First separate the path from the arguments. This will split at the first
27749  # space.
27750  complete="$OBJCOPY"
27751  path="${complete%% *}"
27752  tmp="$complete EOL"
27753  arguments="${tmp#* }"
27754
27755  # Input might be given as Windows format, start by converting to
27756  # unix format.
27757  new_path="$path"
27758
27759  windows_path="$new_path"
27760  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27761    unix_path=`$CYGPATH -u "$windows_path"`
27762    new_path="$unix_path"
27763  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27764    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27765    new_path="$unix_path"
27766  fi
27767
27768
27769  # Now try to locate executable using which
27770  new_path=`$WHICH "$new_path" 2> /dev/null`
27771
27772  if test "x$new_path" = x; then
27773    # Oops. Which didn't find the executable.
27774    # The splitting of arguments from the executable at a space might have been incorrect,
27775    # since paths with space are more likely in Windows. Give it another try with the whole
27776    # argument.
27777    path="$complete"
27778    arguments="EOL"
27779    new_path="$path"
27780
27781  windows_path="$new_path"
27782  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27783    unix_path=`$CYGPATH -u "$windows_path"`
27784    new_path="$unix_path"
27785  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27786    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27787    new_path="$unix_path"
27788  fi
27789
27790
27791    new_path=`$WHICH "$new_path" 2> /dev/null`
27792
27793    if test "x$new_path" = x; then
27794      # It's still not found. Now this is an unrecoverable error.
27795      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
27796$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
27797      has_space=`$ECHO "$complete" | $GREP " "`
27798      if test "x$has_space" != x; then
27799        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27800$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27801      fi
27802      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
27803    fi
27804  fi
27805
27806  # Now new_path has a complete unix path to the binary
27807  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27808    # Keep paths in /bin as-is, but remove trailing .exe if any
27809    new_path="${new_path/%.exe/}"
27810    # Do not save /bin paths to all_fixpath_prefixes!
27811  else
27812    # Not in mixed or Windows style, start by that.
27813    new_path=`cmd //c echo $new_path`
27814
27815  input_path="$new_path"
27816  # Check if we need to convert this using DOS-style short mode. If the path
27817  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27818  # take no chances and rewrite it.
27819  # Note: m4 eats our [], so we need to use [ and ] instead.
27820  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27821  if test "x$has_forbidden_chars" != x; then
27822    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27823    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27824  fi
27825
27826    # Output is in $new_path
27827
27828  windows_path="$new_path"
27829  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27830    unix_path=`$CYGPATH -u "$windows_path"`
27831    new_path="$unix_path"
27832  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27833    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27834    new_path="$unix_path"
27835  fi
27836
27837    # remove trailing .exe if any
27838    new_path="${new_path/%.exe/}"
27839
27840    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27841    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27842  fi
27843
27844  else
27845    # We're on a posix platform. Hooray! :)
27846    # First separate the path from the arguments. This will split at the first
27847    # space.
27848    complete="$OBJCOPY"
27849    path="${complete%% *}"
27850    tmp="$complete EOL"
27851    arguments="${tmp#* }"
27852
27853    # Cannot rely on the command "which" here since it doesn't always work.
27854    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27855    if test -z "$is_absolute_path"; then
27856      # Path to executable is not absolute. Find it.
27857      IFS_save="$IFS"
27858      IFS=:
27859      for p in $PATH; do
27860        if test -f "$p/$path" && test -x "$p/$path"; then
27861          new_path="$p/$path"
27862          break
27863        fi
27864      done
27865      IFS="$IFS_save"
27866    else
27867      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJCOPY (as $path) failed, using $path directly." >&5
27868$as_echo "$as_me: Resolving OBJCOPY (as $path) failed, using $path directly." >&6;}
27869      new_path="$path"
27870    fi
27871
27872    if test "x$new_path" = x; then
27873      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
27874$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
27875      has_space=`$ECHO "$complete" | $GREP " "`
27876      if test "x$has_space" != x; then
27877        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27878$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27879      fi
27880      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
27881    fi
27882  fi
27883
27884  # Now join together the path and the arguments once again
27885  if test "x$arguments" != xEOL; then
27886    new_complete="$new_path ${arguments% *}"
27887  else
27888    new_complete="$new_path"
27889  fi
27890
27891  if test "x$complete" != "x$new_complete"; then
27892    OBJCOPY="$new_complete"
27893    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
27894$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
27895  fi
27896
27897    fi
27898  fi
27899
27900  if test -n "$ac_tool_prefix"; then
27901  for ac_prog in gobjdump objdump
27902  do
27903    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
27904set dummy $ac_tool_prefix$ac_prog; ac_word=$2
27905{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27906$as_echo_n "checking for $ac_word... " >&6; }
27907if ${ac_cv_prog_OBJDUMP+:} false; then :
27908  $as_echo_n "(cached) " >&6
27909else
27910  if test -n "$OBJDUMP"; then
27911  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
27912else
27913as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27914for as_dir in $PATH
27915do
27916  IFS=$as_save_IFS
27917  test -z "$as_dir" && as_dir=.
27918    for ac_exec_ext in '' $ac_executable_extensions; do
27919  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27920    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
27921    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27922    break 2
27923  fi
27924done
27925  done
27926IFS=$as_save_IFS
27927
27928fi
27929fi
27930OBJDUMP=$ac_cv_prog_OBJDUMP
27931if test -n "$OBJDUMP"; then
27932  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
27933$as_echo "$OBJDUMP" >&6; }
27934else
27935  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27936$as_echo "no" >&6; }
27937fi
27938
27939
27940    test -n "$OBJDUMP" && break
27941  done
27942fi
27943if test -z "$OBJDUMP"; then
27944  ac_ct_OBJDUMP=$OBJDUMP
27945  for ac_prog in gobjdump objdump
27946do
27947  # Extract the first word of "$ac_prog", so it can be a program name with args.
27948set dummy $ac_prog; ac_word=$2
27949{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27950$as_echo_n "checking for $ac_word... " >&6; }
27951if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
27952  $as_echo_n "(cached) " >&6
27953else
27954  if test -n "$ac_ct_OBJDUMP"; then
27955  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
27956else
27957as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27958for as_dir in $PATH
27959do
27960  IFS=$as_save_IFS
27961  test -z "$as_dir" && as_dir=.
27962    for ac_exec_ext in '' $ac_executable_extensions; do
27963  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27964    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
27965    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27966    break 2
27967  fi
27968done
27969  done
27970IFS=$as_save_IFS
27971
27972fi
27973fi
27974ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
27975if test -n "$ac_ct_OBJDUMP"; then
27976  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
27977$as_echo "$ac_ct_OBJDUMP" >&6; }
27978else
27979  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27980$as_echo "no" >&6; }
27981fi
27982
27983
27984  test -n "$ac_ct_OBJDUMP" && break
27985done
27986
27987  if test "x$ac_ct_OBJDUMP" = x; then
27988    OBJDUMP=""
27989  else
27990    case $cross_compiling:$ac_tool_warned in
27991yes:)
27992{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
27993$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
27994ac_tool_warned=yes ;;
27995esac
27996    OBJDUMP=$ac_ct_OBJDUMP
27997  fi
27998fi
27999
28000  if test "x$OBJDUMP" != x; then
28001    # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE bails if argument is missing.
28002
28003  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28004
28005  # First separate the path from the arguments. This will split at the first
28006  # space.
28007  complete="$OBJDUMP"
28008  path="${complete%% *}"
28009  tmp="$complete EOL"
28010  arguments="${tmp#* }"
28011
28012  # Input might be given as Windows format, start by converting to
28013  # unix format.
28014  new_path=`$CYGPATH -u "$path"`
28015
28016  # Now try to locate executable using which
28017  new_path=`$WHICH "$new_path" 2> /dev/null`
28018  # bat and cmd files are not always considered executable in cygwin causing which
28019  # to not find them
28020  if test "x$new_path" = x \
28021      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28022      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28023    new_path=`$CYGPATH -u "$path"`
28024  fi
28025  if test "x$new_path" = x; then
28026    # Oops. Which didn't find the executable.
28027    # The splitting of arguments from the executable at a space might have been incorrect,
28028    # since paths with space are more likely in Windows. Give it another try with the whole
28029    # argument.
28030    path="$complete"
28031    arguments="EOL"
28032    new_path=`$CYGPATH -u "$path"`
28033    new_path=`$WHICH "$new_path" 2> /dev/null`
28034    # bat and cmd files are not always considered executable in cygwin causing which
28035    # to not find them
28036    if test "x$new_path" = x \
28037        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28038        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28039      new_path=`$CYGPATH -u "$path"`
28040    fi
28041    if test "x$new_path" = x; then
28042      # It's still not found. Now this is an unrecoverable error.
28043      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
28044$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
28045      has_space=`$ECHO "$complete" | $GREP " "`
28046      if test "x$has_space" != x; then
28047        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28048$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28049      fi
28050      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
28051    fi
28052  fi
28053
28054  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28055  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28056  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28057  # "foo.exe" is OK but "foo" is an error.
28058  #
28059  # This test is therefore slightly more accurate than "test -f" to check for file presence.
28060  # It is also a way to make sure we got the proper file name for the real test later on.
28061  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28062  if test "x$test_shortpath" = x; then
28063    # Short path failed, file does not exist as specified.
28064    # Try adding .exe or .cmd
28065    if test -f "${new_path}.exe"; then
28066      input_to_shortpath="${new_path}.exe"
28067    elif test -f "${new_path}.cmd"; then
28068      input_to_shortpath="${new_path}.cmd"
28069    else
28070      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
28071$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
28072      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
28073$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
28074      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
28075    fi
28076  else
28077    input_to_shortpath="$new_path"
28078  fi
28079
28080  # Call helper function which possibly converts this using DOS-style short mode.
28081  # If so, the updated path is stored in $new_path.
28082  new_path="$input_to_shortpath"
28083
28084  input_path="$input_to_shortpath"
28085  # Check if we need to convert this using DOS-style short mode. If the path
28086  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28087  # take no chances and rewrite it.
28088  # Note: m4 eats our [], so we need to use [ and ] instead.
28089  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28090  if test "x$has_forbidden_chars" != x; then
28091    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28092    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28093    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28094    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28095      # Going to short mode and back again did indeed matter. Since short mode is
28096      # case insensitive, let's make it lowercase to improve readability.
28097      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28098      # Now convert it back to Unix-stile (cygpath)
28099      input_path=`$CYGPATH -u "$shortmode_path"`
28100      new_path="$input_path"
28101    fi
28102  fi
28103
28104  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28105  if test "x$test_cygdrive_prefix" = x; then
28106    # As a simple fix, exclude /usr/bin since it's not a real path.
28107    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28108      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28109      # a path prefixed by /cygdrive for fixpath to work.
28110      new_path="$CYGWIN_ROOT_PATH$input_path"
28111    fi
28112  fi
28113
28114  # remove trailing .exe if any
28115  new_path="${new_path/%.exe/}"
28116
28117  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28118
28119  # First separate the path from the arguments. This will split at the first
28120  # space.
28121  complete="$OBJDUMP"
28122  path="${complete%% *}"
28123  tmp="$complete EOL"
28124  arguments="${tmp#* }"
28125
28126  # Input might be given as Windows format, start by converting to
28127  # unix format.
28128  new_path="$path"
28129
28130  windows_path="$new_path"
28131  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28132    unix_path=`$CYGPATH -u "$windows_path"`
28133    new_path="$unix_path"
28134  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28135    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28136    new_path="$unix_path"
28137  fi
28138
28139
28140  # Now try to locate executable using which
28141  new_path=`$WHICH "$new_path" 2> /dev/null`
28142
28143  if test "x$new_path" = x; then
28144    # Oops. Which didn't find the executable.
28145    # The splitting of arguments from the executable at a space might have been incorrect,
28146    # since paths with space are more likely in Windows. Give it another try with the whole
28147    # argument.
28148    path="$complete"
28149    arguments="EOL"
28150    new_path="$path"
28151
28152  windows_path="$new_path"
28153  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28154    unix_path=`$CYGPATH -u "$windows_path"`
28155    new_path="$unix_path"
28156  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28157    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28158    new_path="$unix_path"
28159  fi
28160
28161
28162    new_path=`$WHICH "$new_path" 2> /dev/null`
28163
28164    if test "x$new_path" = x; then
28165      # It's still not found. Now this is an unrecoverable error.
28166      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
28167$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
28168      has_space=`$ECHO "$complete" | $GREP " "`
28169      if test "x$has_space" != x; then
28170        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28171$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28172      fi
28173      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
28174    fi
28175  fi
28176
28177  # Now new_path has a complete unix path to the binary
28178  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28179    # Keep paths in /bin as-is, but remove trailing .exe if any
28180    new_path="${new_path/%.exe/}"
28181    # Do not save /bin paths to all_fixpath_prefixes!
28182  else
28183    # Not in mixed or Windows style, start by that.
28184    new_path=`cmd //c echo $new_path`
28185
28186  input_path="$new_path"
28187  # Check if we need to convert this using DOS-style short mode. If the path
28188  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28189  # take no chances and rewrite it.
28190  # Note: m4 eats our [], so we need to use [ and ] instead.
28191  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28192  if test "x$has_forbidden_chars" != x; then
28193    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28194    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28195  fi
28196
28197    # Output is in $new_path
28198
28199  windows_path="$new_path"
28200  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28201    unix_path=`$CYGPATH -u "$windows_path"`
28202    new_path="$unix_path"
28203  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28204    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28205    new_path="$unix_path"
28206  fi
28207
28208    # remove trailing .exe if any
28209    new_path="${new_path/%.exe/}"
28210
28211    # Save the first 10 bytes of this path to the storage, so fixpath can work.
28212    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28213  fi
28214
28215  else
28216    # We're on a posix platform. Hooray! :)
28217    # First separate the path from the arguments. This will split at the first
28218    # space.
28219    complete="$OBJDUMP"
28220    path="${complete%% *}"
28221    tmp="$complete EOL"
28222    arguments="${tmp#* }"
28223
28224    # Cannot rely on the command "which" here since it doesn't always work.
28225    is_absolute_path=`$ECHO "$path" | $GREP ^/`
28226    if test -z "$is_absolute_path"; then
28227      # Path to executable is not absolute. Find it.
28228      IFS_save="$IFS"
28229      IFS=:
28230      for p in $PATH; do
28231        if test -f "$p/$path" && test -x "$p/$path"; then
28232          new_path="$p/$path"
28233          break
28234        fi
28235      done
28236      IFS="$IFS_save"
28237    else
28238      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJDUMP (as $path) failed, using $path directly." >&5
28239$as_echo "$as_me: Resolving OBJDUMP (as $path) failed, using $path directly." >&6;}
28240      new_path="$path"
28241    fi
28242
28243    if test "x$new_path" = x; then
28244      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
28245$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
28246      has_space=`$ECHO "$complete" | $GREP " "`
28247      if test "x$has_space" != x; then
28248        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28249$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28250      fi
28251      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
28252    fi
28253  fi
28254
28255  # Now join together the path and the arguments once again
28256  if test "x$arguments" != xEOL; then
28257    new_complete="$new_path ${arguments% *}"
28258  else
28259    new_complete="$new_path"
28260  fi
28261
28262  if test "x$complete" != "x$new_complete"; then
28263    OBJDUMP="$new_complete"
28264    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
28265$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
28266  fi
28267
28268  fi
28269
28270  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
28271    # Extract the first word of "lipo", so it can be a program name with args.
28272set dummy lipo; ac_word=$2
28273{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28274$as_echo_n "checking for $ac_word... " >&6; }
28275if ${ac_cv_path_LIPO+:} false; then :
28276  $as_echo_n "(cached) " >&6
28277else
28278  case $LIPO in
28279  [\\/]* | ?:[\\/]*)
28280  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
28281  ;;
28282  *)
28283  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28284for as_dir in $PATH
28285do
28286  IFS=$as_save_IFS
28287  test -z "$as_dir" && as_dir=.
28288    for ac_exec_ext in '' $ac_executable_extensions; do
28289  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28290    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
28291    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28292    break 2
28293  fi
28294done
28295  done
28296IFS=$as_save_IFS
28297
28298  ;;
28299esac
28300fi
28301LIPO=$ac_cv_path_LIPO
28302if test -n "$LIPO"; then
28303  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
28304$as_echo "$LIPO" >&6; }
28305else
28306  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28307$as_echo "no" >&6; }
28308fi
28309
28310
28311
28312  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28313
28314  # First separate the path from the arguments. This will split at the first
28315  # space.
28316  complete="$LIPO"
28317  path="${complete%% *}"
28318  tmp="$complete EOL"
28319  arguments="${tmp#* }"
28320
28321  # Input might be given as Windows format, start by converting to
28322  # unix format.
28323  new_path=`$CYGPATH -u "$path"`
28324
28325  # Now try to locate executable using which
28326  new_path=`$WHICH "$new_path" 2> /dev/null`
28327  # bat and cmd files are not always considered executable in cygwin causing which
28328  # to not find them
28329  if test "x$new_path" = x \
28330      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28331      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28332    new_path=`$CYGPATH -u "$path"`
28333  fi
28334  if test "x$new_path" = x; then
28335    # Oops. Which didn't find the executable.
28336    # The splitting of arguments from the executable at a space might have been incorrect,
28337    # since paths with space are more likely in Windows. Give it another try with the whole
28338    # argument.
28339    path="$complete"
28340    arguments="EOL"
28341    new_path=`$CYGPATH -u "$path"`
28342    new_path=`$WHICH "$new_path" 2> /dev/null`
28343    # bat and cmd files are not always considered executable in cygwin causing which
28344    # to not find them
28345    if test "x$new_path" = x \
28346        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28347        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28348      new_path=`$CYGPATH -u "$path"`
28349    fi
28350    if test "x$new_path" = x; then
28351      # It's still not found. Now this is an unrecoverable error.
28352      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
28353$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
28354      has_space=`$ECHO "$complete" | $GREP " "`
28355      if test "x$has_space" != x; then
28356        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28357$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28358      fi
28359      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
28360    fi
28361  fi
28362
28363  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28364  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28365  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28366  # "foo.exe" is OK but "foo" is an error.
28367  #
28368  # This test is therefore slightly more accurate than "test -f" to check for file presence.
28369  # It is also a way to make sure we got the proper file name for the real test later on.
28370  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28371  if test "x$test_shortpath" = x; then
28372    # Short path failed, file does not exist as specified.
28373    # Try adding .exe or .cmd
28374    if test -f "${new_path}.exe"; then
28375      input_to_shortpath="${new_path}.exe"
28376    elif test -f "${new_path}.cmd"; then
28377      input_to_shortpath="${new_path}.cmd"
28378    else
28379      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
28380$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
28381      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
28382$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
28383      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
28384    fi
28385  else
28386    input_to_shortpath="$new_path"
28387  fi
28388
28389  # Call helper function which possibly converts this using DOS-style short mode.
28390  # If so, the updated path is stored in $new_path.
28391  new_path="$input_to_shortpath"
28392
28393  input_path="$input_to_shortpath"
28394  # Check if we need to convert this using DOS-style short mode. If the path
28395  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28396  # take no chances and rewrite it.
28397  # Note: m4 eats our [], so we need to use [ and ] instead.
28398  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28399  if test "x$has_forbidden_chars" != x; then
28400    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28401    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28402    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28403    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28404      # Going to short mode and back again did indeed matter. Since short mode is
28405      # case insensitive, let's make it lowercase to improve readability.
28406      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28407      # Now convert it back to Unix-stile (cygpath)
28408      input_path=`$CYGPATH -u "$shortmode_path"`
28409      new_path="$input_path"
28410    fi
28411  fi
28412
28413  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28414  if test "x$test_cygdrive_prefix" = x; then
28415    # As a simple fix, exclude /usr/bin since it's not a real path.
28416    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28417      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28418      # a path prefixed by /cygdrive for fixpath to work.
28419      new_path="$CYGWIN_ROOT_PATH$input_path"
28420    fi
28421  fi
28422
28423  # remove trailing .exe if any
28424  new_path="${new_path/%.exe/}"
28425
28426  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28427
28428  # First separate the path from the arguments. This will split at the first
28429  # space.
28430  complete="$LIPO"
28431  path="${complete%% *}"
28432  tmp="$complete EOL"
28433  arguments="${tmp#* }"
28434
28435  # Input might be given as Windows format, start by converting to
28436  # unix format.
28437  new_path="$path"
28438
28439  windows_path="$new_path"
28440  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28441    unix_path=`$CYGPATH -u "$windows_path"`
28442    new_path="$unix_path"
28443  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28444    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28445    new_path="$unix_path"
28446  fi
28447
28448
28449  # Now try to locate executable using which
28450  new_path=`$WHICH "$new_path" 2> /dev/null`
28451
28452  if test "x$new_path" = x; then
28453    # Oops. Which didn't find the executable.
28454    # The splitting of arguments from the executable at a space might have been incorrect,
28455    # since paths with space are more likely in Windows. Give it another try with the whole
28456    # argument.
28457    path="$complete"
28458    arguments="EOL"
28459    new_path="$path"
28460
28461  windows_path="$new_path"
28462  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28463    unix_path=`$CYGPATH -u "$windows_path"`
28464    new_path="$unix_path"
28465  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28466    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28467    new_path="$unix_path"
28468  fi
28469
28470
28471    new_path=`$WHICH "$new_path" 2> /dev/null`
28472
28473    if test "x$new_path" = x; then
28474      # It's still not found. Now this is an unrecoverable error.
28475      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
28476$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
28477      has_space=`$ECHO "$complete" | $GREP " "`
28478      if test "x$has_space" != x; then
28479        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28480$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28481      fi
28482      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
28483    fi
28484  fi
28485
28486  # Now new_path has a complete unix path to the binary
28487  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28488    # Keep paths in /bin as-is, but remove trailing .exe if any
28489    new_path="${new_path/%.exe/}"
28490    # Do not save /bin paths to all_fixpath_prefixes!
28491  else
28492    # Not in mixed or Windows style, start by that.
28493    new_path=`cmd //c echo $new_path`
28494
28495  input_path="$new_path"
28496  # Check if we need to convert this using DOS-style short mode. If the path
28497  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28498  # take no chances and rewrite it.
28499  # Note: m4 eats our [], so we need to use [ and ] instead.
28500  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28501  if test "x$has_forbidden_chars" != x; then
28502    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28503    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28504  fi
28505
28506    # Output is in $new_path
28507
28508  windows_path="$new_path"
28509  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28510    unix_path=`$CYGPATH -u "$windows_path"`
28511    new_path="$unix_path"
28512  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28513    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28514    new_path="$unix_path"
28515  fi
28516
28517    # remove trailing .exe if any
28518    new_path="${new_path/%.exe/}"
28519
28520    # Save the first 10 bytes of this path to the storage, so fixpath can work.
28521    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28522  fi
28523
28524  else
28525    # We're on a posix platform. Hooray! :)
28526    # First separate the path from the arguments. This will split at the first
28527    # space.
28528    complete="$LIPO"
28529    path="${complete%% *}"
28530    tmp="$complete EOL"
28531    arguments="${tmp#* }"
28532
28533    # Cannot rely on the command "which" here since it doesn't always work.
28534    is_absolute_path=`$ECHO "$path" | $GREP ^/`
28535    if test -z "$is_absolute_path"; then
28536      # Path to executable is not absolute. Find it.
28537      IFS_save="$IFS"
28538      IFS=:
28539      for p in $PATH; do
28540        if test -f "$p/$path" && test -x "$p/$path"; then
28541          new_path="$p/$path"
28542          break
28543        fi
28544      done
28545      IFS="$IFS_save"
28546    else
28547      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving LIPO (as $path) failed, using $path directly." >&5
28548$as_echo "$as_me: Resolving LIPO (as $path) failed, using $path directly." >&6;}
28549      new_path="$path"
28550    fi
28551
28552    if test "x$new_path" = x; then
28553      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
28554$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
28555      has_space=`$ECHO "$complete" | $GREP " "`
28556      if test "x$has_space" != x; then
28557        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28558$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28559      fi
28560      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
28561    fi
28562  fi
28563
28564  # Now join together the path and the arguments once again
28565  if test "x$arguments" != xEOL; then
28566    new_complete="$new_path ${arguments% *}"
28567  else
28568    new_complete="$new_path"
28569  fi
28570
28571  if test "x$complete" != "x$new_complete"; then
28572    LIPO="$new_complete"
28573    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
28574$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
28575  fi
28576
28577  fi
28578
28579
28580
28581  # Restore old path without tools dir
28582  PATH="$OLD_PATH"
28583
28584
28585# FIXME: Currently we must test this after paths but before flags. Fix!
28586
28587# And we can test some aspects on the target using configure macros.
28588
28589
28590{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
28591$as_echo_n "checking for ANSI C header files... " >&6; }
28592if ${ac_cv_header_stdc+:} false; then :
28593  $as_echo_n "(cached) " >&6
28594else
28595  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28596/* end confdefs.h.  */
28597#include <stdlib.h>
28598#include <stdarg.h>
28599#include <string.h>
28600#include <float.h>
28601
28602int
28603main ()
28604{
28605
28606  ;
28607  return 0;
28608}
28609_ACEOF
28610if ac_fn_cxx_try_compile "$LINENO"; then :
28611  ac_cv_header_stdc=yes
28612else
28613  ac_cv_header_stdc=no
28614fi
28615rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28616
28617if test $ac_cv_header_stdc = yes; then
28618  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
28619  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28620/* end confdefs.h.  */
28621#include <string.h>
28622
28623_ACEOF
28624if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28625  $EGREP "memchr" >/dev/null 2>&1; then :
28626
28627else
28628  ac_cv_header_stdc=no
28629fi
28630rm -f conftest*
28631
28632fi
28633
28634if test $ac_cv_header_stdc = yes; then
28635  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
28636  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28637/* end confdefs.h.  */
28638#include <stdlib.h>
28639
28640_ACEOF
28641if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28642  $EGREP "free" >/dev/null 2>&1; then :
28643
28644else
28645  ac_cv_header_stdc=no
28646fi
28647rm -f conftest*
28648
28649fi
28650
28651if test $ac_cv_header_stdc = yes; then
28652  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
28653  if test "$cross_compiling" = yes; then :
28654  :
28655else
28656  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28657/* end confdefs.h.  */
28658#include <ctype.h>
28659#include <stdlib.h>
28660#if ((' ' & 0x0FF) == 0x020)
28661# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
28662# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
28663#else
28664# define ISLOWER(c) \
28665		   (('a' <= (c) && (c) <= 'i') \
28666		     || ('j' <= (c) && (c) <= 'r') \
28667		     || ('s' <= (c) && (c) <= 'z'))
28668# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
28669#endif
28670
28671#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
28672int
28673main ()
28674{
28675  int i;
28676  for (i = 0; i < 256; i++)
28677    if (XOR (islower (i), ISLOWER (i))
28678	|| toupper (i) != TOUPPER (i))
28679      return 2;
28680  return 0;
28681}
28682_ACEOF
28683if ac_fn_cxx_try_run "$LINENO"; then :
28684
28685else
28686  ac_cv_header_stdc=no
28687fi
28688rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28689  conftest.$ac_objext conftest.beam conftest.$ac_ext
28690fi
28691
28692fi
28693fi
28694{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
28695$as_echo "$ac_cv_header_stdc" >&6; }
28696if test $ac_cv_header_stdc = yes; then
28697
28698$as_echo "#define STDC_HEADERS 1" >>confdefs.h
28699
28700fi
28701
28702# On IRIX 5.3, sys/types and inttypes.h are conflicting.
28703for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
28704		  inttypes.h stdint.h unistd.h
28705do :
28706  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
28707ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
28708"
28709if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
28710  cat >>confdefs.h <<_ACEOF
28711#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
28712_ACEOF
28713
28714fi
28715
28716done
28717
28718
28719
28720  ###############################################################################
28721  #
28722  # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
28723  # (The JVM can use 32 or 64 bit Java pointers but that decision
28724  # is made at runtime.)
28725  #
28726
28727  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28728    # Always specify -m flags on Solaris
28729
28730  # When we add flags to the "official" CFLAGS etc, we need to
28731  # keep track of these additions in ADDED_CFLAGS etc. These
28732  # will later be checked to make sure only controlled additions
28733  # have been made to CFLAGS etc.
28734  ADDED_CFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28735  ADDED_CXXFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28736  ADDED_LDFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28737
28738  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
28739  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
28740  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
28741
28742  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
28743  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
28744  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
28745
28746  elif test "x$COMPILE_TYPE" = xreduced; then
28747    if test "x$OPENJDK_TARGET_OS" != xwindows; then
28748      # Specify -m if running reduced on other Posix platforms
28749
28750  # When we add flags to the "official" CFLAGS etc, we need to
28751  # keep track of these additions in ADDED_CFLAGS etc. These
28752  # will later be checked to make sure only controlled additions
28753  # have been made to CFLAGS etc.
28754  ADDED_CFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28755  ADDED_CXXFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28756  ADDED_LDFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28757
28758  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
28759  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
28760  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
28761
28762  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
28763  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
28764  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
28765
28766    fi
28767  fi
28768
28769  # Make compilation sanity check
28770  for ac_header in stdio.h
28771do :
28772  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
28773if test "x$ac_cv_header_stdio_h" = xyes; then :
28774  cat >>confdefs.h <<_ACEOF
28775#define HAVE_STDIO_H 1
28776_ACEOF
28777
28778else
28779
28780    { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
28781$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
28782    if test "x$COMPILE_TYPE" = xreduced; then
28783      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed." >&5
28784$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed." >&6;}
28785    elif test "x$COMPILE_TYPE" = xcross; then
28786      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
28787$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
28788    fi
28789    as_fn_error $? "Cannot continue." "$LINENO" 5
28790
28791fi
28792
28793done
28794
28795
28796  # The cast to long int works around a bug in the HP C Compiler
28797# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
28798# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
28799# This bug is HP SR number 8606223364.
28800{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
28801$as_echo_n "checking size of int *... " >&6; }
28802if ${ac_cv_sizeof_int_p+:} false; then :
28803  $as_echo_n "(cached) " >&6
28804else
28805  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
28806
28807else
28808  if test "$ac_cv_type_int_p" = yes; then
28809     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
28810$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
28811as_fn_error 77 "cannot compute sizeof (int *)
28812See \`config.log' for more details" "$LINENO" 5; }
28813   else
28814     ac_cv_sizeof_int_p=0
28815   fi
28816fi
28817
28818fi
28819{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
28820$as_echo "$ac_cv_sizeof_int_p" >&6; }
28821
28822
28823
28824cat >>confdefs.h <<_ACEOF
28825#define SIZEOF_INT_P $ac_cv_sizeof_int_p
28826_ACEOF
28827
28828
28829
28830  if test "x$SIZEOF_INT_P" != "x$ac_cv_sizeof_int_p"; then
28831    # Workaround autoconf bug, see http://lists.gnu.org/archive/html/autoconf/2010-07/msg00004.html
28832    SIZEOF_INT_P="$ac_cv_sizeof_int_p"
28833  fi
28834
28835  if test "x$SIZEOF_INT_P" = x; then
28836    # The test failed, lets stick to the assumed value.
28837    { $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
28838$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
28839  else
28840    TESTED_TARGET_CPU_BITS=`expr 8 \* $SIZEOF_INT_P`
28841
28842    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
28843      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
28844    fi
28845  fi
28846
28847  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
28848$as_echo_n "checking for target address size... " >&6; }
28849  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
28850$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
28851
28852
28853  ###############################################################################
28854  #
28855  # Is the target little of big endian?
28856  #
28857   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
28858$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
28859if ${ac_cv_c_bigendian+:} false; then :
28860  $as_echo_n "(cached) " >&6
28861else
28862  ac_cv_c_bigendian=unknown
28863    # See if we're dealing with a universal compiler.
28864    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28865/* end confdefs.h.  */
28866#ifndef __APPLE_CC__
28867	       not a universal capable compiler
28868	     #endif
28869	     typedef int dummy;
28870
28871_ACEOF
28872if ac_fn_cxx_try_compile "$LINENO"; then :
28873
28874	# Check for potential -arch flags.  It is not universal unless
28875	# there are at least two -arch flags with different values.
28876	ac_arch=
28877	ac_prev=
28878	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
28879	 if test -n "$ac_prev"; then
28880	   case $ac_word in
28881	     i?86 | x86_64 | ppc | ppc64)
28882	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
28883		 ac_arch=$ac_word
28884	       else
28885		 ac_cv_c_bigendian=universal
28886		 break
28887	       fi
28888	       ;;
28889	   esac
28890	   ac_prev=
28891	 elif test "x$ac_word" = "x-arch"; then
28892	   ac_prev=arch
28893	 fi
28894       done
28895fi
28896rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28897    if test $ac_cv_c_bigendian = unknown; then
28898      # See if sys/param.h defines the BYTE_ORDER macro.
28899      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28900/* end confdefs.h.  */
28901#include <sys/types.h>
28902	     #include <sys/param.h>
28903
28904int
28905main ()
28906{
28907#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
28908		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
28909		     && LITTLE_ENDIAN)
28910	      bogus endian macros
28911	     #endif
28912
28913  ;
28914  return 0;
28915}
28916_ACEOF
28917if ac_fn_cxx_try_compile "$LINENO"; then :
28918  # It does; now see whether it defined to BIG_ENDIAN or not.
28919	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28920/* end confdefs.h.  */
28921#include <sys/types.h>
28922		#include <sys/param.h>
28923
28924int
28925main ()
28926{
28927#if BYTE_ORDER != BIG_ENDIAN
28928		 not big endian
28929		#endif
28930
28931  ;
28932  return 0;
28933}
28934_ACEOF
28935if ac_fn_cxx_try_compile "$LINENO"; then :
28936  ac_cv_c_bigendian=yes
28937else
28938  ac_cv_c_bigendian=no
28939fi
28940rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28941fi
28942rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28943    fi
28944    if test $ac_cv_c_bigendian = unknown; then
28945      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
28946      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28947/* end confdefs.h.  */
28948#include <limits.h>
28949
28950int
28951main ()
28952{
28953#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
28954	      bogus endian macros
28955	     #endif
28956
28957  ;
28958  return 0;
28959}
28960_ACEOF
28961if ac_fn_cxx_try_compile "$LINENO"; then :
28962  # It does; now see whether it defined to _BIG_ENDIAN or not.
28963	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28964/* end confdefs.h.  */
28965#include <limits.h>
28966
28967int
28968main ()
28969{
28970#ifndef _BIG_ENDIAN
28971		 not big endian
28972		#endif
28973
28974  ;
28975  return 0;
28976}
28977_ACEOF
28978if ac_fn_cxx_try_compile "$LINENO"; then :
28979  ac_cv_c_bigendian=yes
28980else
28981  ac_cv_c_bigendian=no
28982fi
28983rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28984fi
28985rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28986    fi
28987    if test $ac_cv_c_bigendian = unknown; then
28988      # Compile a test program.
28989      if test "$cross_compiling" = yes; then :
28990  # Try to guess by grepping values from an object file.
28991	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28992/* end confdefs.h.  */
28993short int ascii_mm[] =
28994		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
28995		short int ascii_ii[] =
28996		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
28997		int use_ascii (int i) {
28998		  return ascii_mm[i] + ascii_ii[i];
28999		}
29000		short int ebcdic_ii[] =
29001		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
29002		short int ebcdic_mm[] =
29003		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
29004		int use_ebcdic (int i) {
29005		  return ebcdic_mm[i] + ebcdic_ii[i];
29006		}
29007		extern int foo;
29008
29009int
29010main ()
29011{
29012return use_ascii (foo) == use_ebcdic (foo);
29013  ;
29014  return 0;
29015}
29016_ACEOF
29017if ac_fn_cxx_try_compile "$LINENO"; then :
29018  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
29019	      ac_cv_c_bigendian=yes
29020	    fi
29021	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
29022	      if test "$ac_cv_c_bigendian" = unknown; then
29023		ac_cv_c_bigendian=no
29024	      else
29025		# finding both strings is unlikely to happen, but who knows?
29026		ac_cv_c_bigendian=unknown
29027	      fi
29028	    fi
29029fi
29030rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29031else
29032  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29033/* end confdefs.h.  */
29034$ac_includes_default
29035int
29036main ()
29037{
29038
29039	     /* Are we little or big endian?  From Harbison&Steele.  */
29040	     union
29041	     {
29042	       long int l;
29043	       char c[sizeof (long int)];
29044	     } u;
29045	     u.l = 1;
29046	     return u.c[sizeof (long int) - 1] == 1;
29047
29048  ;
29049  return 0;
29050}
29051_ACEOF
29052if ac_fn_cxx_try_run "$LINENO"; then :
29053  ac_cv_c_bigendian=no
29054else
29055  ac_cv_c_bigendian=yes
29056fi
29057rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29058  conftest.$ac_objext conftest.beam conftest.$ac_ext
29059fi
29060
29061    fi
29062fi
29063{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
29064$as_echo "$ac_cv_c_bigendian" >&6; }
29065 case $ac_cv_c_bigendian in #(
29066   yes)
29067     ENDIAN="big";; #(
29068   no)
29069     ENDIAN="little" ;; #(
29070   universal)
29071     ENDIAN="universal_endianness"
29072     ;; #(
29073   *)
29074     ENDIAN="unknown" ;;
29075 esac
29076
29077
29078  if test "x$ENDIAN" = xuniversal_endianness; then
29079    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
29080  fi
29081  if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
29082    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
29083  fi
29084
29085
29086# Configure flags for the tools
29087
29088
29089  ###############################################################################
29090  #
29091  # How to compile shared libraries.
29092  #
29093
29094  if test "x$GCC" = xyes; then
29095    COMPILER_NAME=gcc
29096    PICFLAG="-fPIC"
29097    LIBRARY_PREFIX=lib
29098    SHARED_LIBRARY='lib$1.so'
29099    STATIC_LIBRARY='lib$1.a'
29100    SHARED_LIBRARY_FLAGS="-shared"
29101    SHARED_LIBRARY_SUFFIX='.so'
29102    STATIC_LIBRARY_SUFFIX='.a'
29103    OBJ_SUFFIX='.o'
29104    EXE_SUFFIX=''
29105    SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
29106    SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
29107    C_FLAG_REORDER=''
29108    CXX_FLAG_REORDER=''
29109    SET_SHARED_LIBRARY_ORIGIN='-Xlinker -z -Xlinker origin -Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
29110    SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
29111    LD="$CC"
29112    LDEXE="$CC"
29113    LDCXX="$CXX"
29114    LDEXECXX="$CXX"
29115    POST_STRIP_CMD="$STRIP -g"
29116
29117    # Linking is different on MacOSX
29118    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29119      # Might change in the future to clang.
29120      COMPILER_NAME=gcc
29121      SHARED_LIBRARY='lib$1.dylib'
29122      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
29123      SHARED_LIBRARY_SUFFIX='.dylib'
29124      EXE_SUFFIX=''
29125      SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
29126      SET_SHARED_LIBRARY_MAPFILE=''
29127      SET_SHARED_LIBRARY_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
29128      SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
29129      POST_STRIP_CMD="$STRIP -S"
29130    fi
29131  else
29132    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29133      # If it is not gcc, then assume it is the Oracle Solaris Studio Compiler
29134      COMPILER_NAME=ossc
29135      PICFLAG="-KPIC"
29136      LIBRARY_PREFIX=lib
29137      SHARED_LIBRARY='lib$1.so'
29138      STATIC_LIBRARY='lib$1.a'
29139      SHARED_LIBRARY_FLAGS="-G"
29140      SHARED_LIBRARY_SUFFIX='.so'
29141      STATIC_LIBRARY_SUFFIX='.a'
29142      OBJ_SUFFIX='.o'
29143      EXE_SUFFIX=''
29144      SET_SHARED_LIBRARY_NAME=''
29145      SET_SHARED_LIBRARY_MAPFILE='-M$1'
29146      C_FLAG_REORDER='-xF'
29147      CXX_FLAG_REORDER='-xF'
29148      SET_SHARED_LIBRARY_ORIGIN='-R\$$$$ORIGIN$1'
29149      SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
29150      CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
29151      CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
29152      CFLAGS_JDKLIB_EXTRA='-xstrconst'
29153      POST_STRIP_CMD="$STRIP -x"
29154      POST_MCS_CMD="$MCS -d -a \"JDK $FULL_VERSION\""
29155    fi
29156    if test "x$OPENJDK_TARGET_OS" = xwindows; then
29157      # If it is not gcc, then assume it is the MS Visual Studio compiler
29158      COMPILER_NAME=cl
29159      PICFLAG=""
29160      LIBRARY_PREFIX=
29161      SHARED_LIBRARY='$1.dll'
29162      STATIC_LIBRARY='$1.lib'
29163      SHARED_LIBRARY_FLAGS="-LD"
29164      SHARED_LIBRARY_SUFFIX='.dll'
29165      STATIC_LIBRARY_SUFFIX='.lib'
29166      OBJ_SUFFIX='.obj'
29167      EXE_SUFFIX='.exe'
29168      SET_SHARED_LIBRARY_NAME=''
29169      SET_SHARED_LIBRARY_MAPFILE=''
29170      SET_SHARED_LIBRARY_ORIGIN=''
29171      SET_EXECUTABLE_ORIGIN=''
29172    fi
29173  fi
29174
29175
29176
29177
29178
29179
29180
29181
29182
29183
29184
29185
29186
29187
29188
29189
29190
29191
29192
29193  # The (cross) compiler is now configured, we can now test capabilities
29194  # of the target platform.
29195
29196
29197
29198  ###############################################################################
29199  #
29200  # Setup the opt flags for different compilers
29201  # and different operating systems.
29202  #
29203
29204  #
29205  # NOTE: check for -mstackrealign needs to be below potential addition of -m32
29206  #
29207  if test "x$OPENJDK_TARGET_CPU_BITS" = x32 && test "x$OPENJDK_TARGET_OS" = xmacosx; then
29208    # On 32-bit MacOSX the OS requires C-entry points to be 16 byte aligned.
29209    # While waiting for a better solution, the current workaround is to use -mstackrealign.
29210    CFLAGS="$CFLAGS -mstackrealign"
29211    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if 32-bit compiler supports -mstackrealign" >&5
29212$as_echo_n "checking if 32-bit compiler supports -mstackrealign... " >&6; }
29213    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29214/* end confdefs.h.  */
29215int main() { return 0; }
29216_ACEOF
29217if ac_fn_cxx_try_link "$LINENO"; then :
29218
29219          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
29220$as_echo "yes" >&6; }
29221
29222else
29223
29224          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29225$as_echo "no" >&6; }
29226          as_fn_error $? "The selected compiler $CXX does not support -mstackrealign! Try to put another compiler in the path." "$LINENO" 5
29227
29228
29229fi
29230rm -f core conftest.err conftest.$ac_objext \
29231    conftest$ac_exeext conftest.$ac_ext
29232  fi
29233
29234  C_FLAG_DEPS="-MMD -MF"
29235  CXX_FLAG_DEPS="-MMD -MF"
29236
29237  case $COMPILER_TYPE in
29238    CC )
29239      case $COMPILER_NAME in
29240        gcc )
29241          case $OPENJDK_TARGET_OS in
29242            macosx )
29243              # On MacOSX we optimize for size, something
29244              # we should do for all platforms?
29245              C_O_FLAG_HI="-Os"
29246              C_O_FLAG_NORM="-Os"
29247              C_O_FLAG_NONE=""
29248              ;;
29249            *)
29250              C_O_FLAG_HI="-O3"
29251              C_O_FLAG_NORM="-O2"
29252              C_O_FLAG_NONE="-O0"
29253              ;;
29254          esac
29255          CXX_O_FLAG_HI="$C_O_FLAG_HI"
29256          CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
29257          CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
29258          CFLAGS_DEBUG_SYMBOLS="-g"
29259          CXXFLAGS_DEBUG_SYMBOLS="-g"
29260          if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
29261            CFLAGS_DEBUG_SYMBOLS="-g1"
29262            CXXFLAGS_DEBUG_SYMBOLS="-g1"
29263          fi
29264          ;;
29265        ossc )
29266          #
29267          # Forte has different names for this with their C++ compiler...
29268          #
29269          C_FLAG_DEPS="-xMMD -xMF"
29270          CXX_FLAG_DEPS="-xMMD -xMF"
29271
29272          # Extra options used with HIGHEST
29273          #
29274          # WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
29275          #          done with care, there are some assumptions below that need to
29276          #          be understood about the use of pointers, and IEEE behavior.
29277          #
29278          # Use non-standard floating point mode (not IEEE 754)
29279          CC_HIGHEST="$CC_HIGHEST -fns"
29280          # Do some simplification of floating point arithmetic (not IEEE 754)
29281          CC_HIGHEST="$CC_HIGHEST -fsimple"
29282          # Use single precision floating point with 'float'
29283          CC_HIGHEST="$CC_HIGHEST -fsingle"
29284          # Assume memory references via basic pointer types do not alias
29285          #   (Source with excessing pointer casting and data access with mixed
29286          #    pointer types are not recommended)
29287          CC_HIGHEST="$CC_HIGHEST -xalias_level=basic"
29288          # Use intrinsic or inline versions for math/std functions
29289          #   (If you expect perfect errno behavior, do not use this)
29290          CC_HIGHEST="$CC_HIGHEST -xbuiltin=%all"
29291          # Loop data dependency optimizations (need -xO3 or higher)
29292          CC_HIGHEST="$CC_HIGHEST -xdepend"
29293          # Pointer parameters to functions do not overlap
29294          #   (Similar to -xalias_level=basic usage, but less obvious sometimes.
29295          #    If you pass in multiple pointers to the same data, do not use this)
29296          CC_HIGHEST="$CC_HIGHEST -xrestrict"
29297          # Inline some library routines
29298          #   (If you expect perfect errno behavior, do not use this)
29299          CC_HIGHEST="$CC_HIGHEST -xlibmil"
29300          # Use optimized math routines
29301          #   (If you expect perfect errno behavior, do not use this)
29302          #  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
29303          #CC_HIGHEST="$CC_HIGHEST -xlibmopt"
29304
29305          if test "x$OPENJDK_TARGET_CPU" = xsparc; then
29306            CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
29307            CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
29308          fi
29309
29310          case $OPENJDK_TARGET_CPU_ARCH in
29311            x86)
29312              C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xregs=no%frameptr"
29313              C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
29314              C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
29315              C_O_FLAG_NONE="-xregs=no%frameptr"
29316              CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
29317              CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
29318              CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
29319              CXX_O_FLAG_NONE="-xregs=no%frameptr"
29320              if test "x$OPENJDK_TARGET_CPU" = xx86; then
29321                C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
29322                CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
29323              fi
29324              ;;
29325            sparc)
29326              CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
29327              CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
29328              C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
29329              C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
29330              C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
29331              C_O_FLAG_NONE=""
29332              CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
29333              CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
29334              CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
29335              CXX_O_FLAG_NONE=""
29336              ;;
29337          esac
29338
29339          CFLAGS_DEBUG_SYMBOLS="-g -xs"
29340          CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
29341      esac
29342      ;;
29343    CL )
29344      C_O_FLAG_HIGHEST="-O2"
29345      C_O_FLAG_HI="-O1"
29346      C_O_FLAG_NORM="-O1"
29347      C_O_FLAG_NONE="-Od"
29348      CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
29349      CXX_O_FLAG_HI="$C_O_FLAG_HI"
29350      CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
29351      CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
29352      ;;
29353  esac
29354
29355  if test -z "$C_O_FLAG_HIGHEST"; then
29356    C_O_FLAG_HIGHEST="$C_O_FLAG_HI"
29357  fi
29358
29359  if test -z "$CXX_O_FLAG_HIGHEST"; then
29360    CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HI"
29361  fi
29362
29363
29364
29365
29366
29367
29368
29369
29370
29371
29372
29373
29374
29375
29376  if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
29377    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
29378$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
29379  fi
29380
29381  if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
29382    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
29383$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
29384  fi
29385
29386  if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
29387    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
29388$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
29389  fi
29390
29391
29392# Check whether --with-extra-cflags was given.
29393if test "${with_extra_cflags+set}" = set; then :
29394  withval=$with_extra_cflags;
29395fi
29396
29397
29398
29399# Check whether --with-extra-cxxflags was given.
29400if test "${with_extra_cxxflags+set}" = set; then :
29401  withval=$with_extra_cxxflags;
29402fi
29403
29404
29405
29406# Check whether --with-extra-ldflags was given.
29407if test "${with_extra_ldflags+set}" = set; then :
29408  withval=$with_extra_ldflags;
29409fi
29410
29411
29412  CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags"
29413  CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags"
29414  LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags"
29415
29416  # Hotspot needs these set in their legacy form
29417  LEGACY_EXTRA_CFLAGS=$with_extra_cflags
29418  LEGACY_EXTRA_CXXFLAGS=$with_extra_cxxflags
29419  LEGACY_EXTRA_LDFLAGS=$with_extra_ldflags
29420
29421
29422
29423
29424
29425  ###############################################################################
29426  #
29427  # Now setup the CFLAGS and LDFLAGS for the JDK build.
29428  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
29429  #
29430  case $COMPILER_NAME in
29431    gcc )
29432      CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -W -Wall -Wno-unused -Wno-parentheses \
29433      -pipe \
29434      -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
29435      case $OPENJDK_TARGET_CPU_ARCH in
29436        arm )
29437          # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
29438          CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
29439          ;;
29440        ppc )
29441          # on ppc we don't prevent gcc to omit frame pointer nor strict-aliasing
29442          ;;
29443        * )
29444          CCXXFLAGS_JDK="$CCXXFLAGS_JDK -fno-omit-frame-pointer"
29445          CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
29446          ;;
29447      esac
29448      ;;
29449    ossc )
29450      CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
29451      case $OPENJDK_TARGET_CPU_ARCH in
29452        x86 )
29453          CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
29454          CFLAGS_JDK="$CFLAGS_JDK -erroff=E_BAD_PRAGMA_PACK_VALUE"
29455          ;;
29456      esac
29457
29458      CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
29459      CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
29460
29461      LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
29462      LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
29463      ;;
29464    cl )
29465      CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
29466      -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB -DWIN32_LEAN_AND_MEAN \
29467      -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
29468      -DWIN32 -DIAL"
29469      case $OPENJDK_TARGET_CPU in
29470        x86 )
29471          CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_X86_ -Dx86"
29472          ;;
29473        x86_64 )
29474          CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_AMD64_ -Damd64"
29475          ;;
29476      esac
29477      ;;
29478  esac
29479
29480  ###############################################################################
29481
29482  # Adjust flags according to debug level.
29483  case $DEBUG_LEVEL in
29484    fastdebug )
29485      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS"
29486      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS"
29487      C_O_FLAG_HI="$C_O_FLAG_NORM"
29488      C_O_FLAG_NORM="$C_O_FLAG_NORM"
29489      CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
29490      CXX_O_FLAG_NORM="$CXX_O_FLAG_NORM"
29491      JAVAC_FLAGS="$JAVAC_FLAGS -g"
29492      ;;
29493    slowdebug )
29494      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS"
29495      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS"
29496      C_O_FLAG_HI="$C_O_FLAG_NONE"
29497      C_O_FLAG_NORM="$C_O_FLAG_NONE"
29498      CXX_O_FLAG_HI="$CXX_O_FLAG_NONE"
29499      CXX_O_FLAG_NORM="$CXX_O_FLAG_NONE"
29500      JAVAC_FLAGS="$JAVAC_FLAGS -g"
29501      ;;
29502  esac
29503
29504  CCXXFLAGS_JDK="$CCXXFLAGS_JDK $ADD_LP64"
29505
29506  # The package path is used only on macosx?
29507  PACKAGE_PATH=/opt/local
29508
29509
29510  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
29511    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
29512    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
29513    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
29514    #   Note: -Dmacro         is the same as    #define macro 1
29515    #         -Dmacro=        is the same as    #define macro
29516    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29517      CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
29518    else
29519      CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
29520    fi
29521  else
29522    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_BIG_ENDIAN"
29523  fi
29524  if test "x$OPENJDK_TARGET_OS" = xlinux; then
29525    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DLINUX"
29526  fi
29527  if test "x$OPENJDK_TARGET_OS" = xwindows; then
29528    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DWINDOWS"
29529  fi
29530  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29531    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DSOLARIS"
29532  fi
29533  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29534    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMACOSX -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
29535    # Setting these parameters makes it an error to link to macosx APIs that are
29536    # newer than the given OS version and makes the linked binaries compatible even
29537    # if built on a newer version of the OS.
29538    # The expected format is X.Y.Z
29539    MACOSX_VERSION_MIN=10.7.0
29540
29541    # The macro takes the version with no dots, ex: 1070
29542    # Let the flags variables get resolved in make for easier override on make
29543    # command line.
29544    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
29545    LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
29546  fi
29547  if test "x$OPENJDK_TARGET_OS" = xbsd; then
29548    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DBSD -D_ALLBSD_SOURCE"
29549  fi
29550  if test "x$DEBUG_LEVEL" = xrelease; then
29551    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DNDEBUG"
29552  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29553    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DTRIMMED"
29554  fi
29555  else
29556    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DDEBUG"
29557  fi
29558
29559  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
29560  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DRELEASE='\"$RELEASE\"'"
29561
29562  CCXXFLAGS_JDK="$CCXXFLAGS_JDK \
29563      -I${JDK_OUTPUTDIR}/include \
29564      -I${JDK_OUTPUTDIR}/include/$OPENJDK_TARGET_OS \
29565      -I${JDK_TOPDIR}/src/share/javavm/export \
29566      -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/javavm/export \
29567      -I${JDK_TOPDIR}/src/share/native/common \
29568      -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/native/common"
29569
29570  # The shared libraries are compiled using the picflag.
29571  CFLAGS_JDKLIB="$CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
29572  CXXFLAGS_JDKLIB="$CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA "
29573
29574  # Executable flags
29575  CFLAGS_JDKEXE="$CCXXFLAGS_JDK $CFLAGS_JDK"
29576  CXXFLAGS_JDKEXE="$CCXXFLAGS_JDK $CXXFLAGS_JDK"
29577
29578  # Now this is odd. The JDK native libraries have to link against libjvm.so
29579  # On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
29580  # Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
29581  # is identical for client and server? Yes. Which is picked at runtime (client or server)?
29582  # Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
29583  # libraries will link to whatever is in memory. Yuck.
29584  #
29585  # Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
29586  if test "x$COMPILER_NAME" = xcl; then
29587    LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
29588    if test "x$OPENJDK_TARGET_CPU" = xx86; then
29589      LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
29590    fi
29591    # TODO: make -debug optional "--disable-full-debug-symbols"
29592    LDFLAGS_JDK="$LDFLAGS_JDK -debug"
29593    LDFLAGS_JDKLIB="${LDFLAGS_JDK} -dll -libpath:${JDK_OUTPUTDIR}/lib"
29594    LDFLAGS_JDKLIB_SUFFIX=""
29595    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
29596      LDFLAGS_STACK_SIZE=1048576
29597    else
29598      LDFLAGS_STACK_SIZE=327680
29599    fi
29600    LDFLAGS_JDKEXE="${LDFLAGS_JDK} /STACK:$LDFLAGS_STACK_SIZE"
29601  else
29602    if test "x$COMPILER_NAME" = xgcc; then
29603      # If this is a --hash-style=gnu system, use --hash-style=both, why?
29604      HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
29605      if test -n "$HAS_GNU_HASH"; then
29606        LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both "
29607      fi
29608      if test "x$OPENJDK_TARGET_OS" = xlinux; then
29609        # And since we now know that the linker is gnu, then add -z defs, to forbid
29610        # undefined symbols in object files.
29611        LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs"
29612        if test "x$DEBUG_LEVEL" = "xrelease"; then
29613          # When building release libraries, tell the linker optimize them.
29614          # Should this be supplied to the OSS linker as well?
29615          LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
29616        fi
29617      fi
29618    fi
29619    LDFLAGS_JDKLIB="${LDFLAGS_JDK} $SHARED_LIBRARY_FLAGS \
29620        -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}"
29621
29622    # On some platforms (mac) the linker warns about non existing -L dirs.
29623    # Add server first if available. Linking aginst client does not always produce the same results.
29624    # Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
29625    # Default to server for other variants.
29626    if test "x$JVM_VARIANT_SERVER" = xtrue; then
29627      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
29628    elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
29629      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/client"
29630    elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
29631      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
29632    else
29633      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
29634    fi
29635
29636    LDFLAGS_JDKLIB_SUFFIX="-ljava -ljvm"
29637    if test "x$COMPILER_NAME" = xossc; then
29638      LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc"
29639    fi
29640
29641    LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
29642    if test "x$OPENJDK_TARGET_OS" = xlinux; then
29643      LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
29644    fi
29645  fi
29646
29647
29648
29649
29650
29651
29652
29653
29654
29655
29656
29657
29658
29659
29660
29661  # Some Zero and Shark settings.
29662  # ZERO_ARCHFLAG tells the compiler which mode to build for
29663  case "${OPENJDK_TARGET_CPU}" in
29664    s390)
29665      ZERO_ARCHFLAG="-m31"
29666      ;;
29667    *)
29668      ZERO_ARCHFLAG="-m${OPENJDK_TARGET_CPU_BITS}"
29669  esac
29670
29671  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$ZERO_ARCHFLAG\"" >&5
29672$as_echo_n "checking if compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
29673  supports=yes
29674
29675  saved_cflags="$CFLAGS"
29676  CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
29677  ac_ext=c
29678ac_cpp='$CPP $CPPFLAGS'
29679ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29680ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29681ac_compiler_gnu=$ac_cv_c_compiler_gnu
29682
29683  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29684/* end confdefs.h.  */
29685int i;
29686_ACEOF
29687if ac_fn_c_try_compile "$LINENO"; then :
29688
29689else
29690  supports=no
29691fi
29692rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29693  ac_ext=cpp
29694ac_cpp='$CXXCPP $CPPFLAGS'
29695ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29696ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29697ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29698
29699  CFLAGS="$saved_cflags"
29700
29701  saved_cxxflags="$CXXFLAGS"
29702  CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
29703  ac_ext=cpp
29704ac_cpp='$CXXCPP $CPPFLAGS'
29705ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29706ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29707ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29708
29709  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29710/* end confdefs.h.  */
29711int i;
29712_ACEOF
29713if ac_fn_cxx_try_compile "$LINENO"; then :
29714
29715else
29716  supports=no
29717fi
29718rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29719  ac_ext=cpp
29720ac_cpp='$CXXCPP $CPPFLAGS'
29721ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29722ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29723ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29724
29725  CXXFLAGS="$saved_cxxflags"
29726
29727  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
29728$as_echo "$supports" >&6; }
29729  if test "x$supports" = "xyes" ; then
29730    :
29731  else
29732    ZERO_ARCHFLAG=""
29733  fi
29734
29735
29736
29737  # Check that the compiler supports -mX flags
29738  # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
29739
29740  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"-m${OPENJDK_TARGET_CPU_BITS}\"" >&5
29741$as_echo_n "checking if compiler supports \"-m${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
29742  supports=yes
29743
29744  saved_cflags="$CFLAGS"
29745  CFLAGS="$CFLAGS -m${OPENJDK_TARGET_CPU_BITS}"
29746  ac_ext=c
29747ac_cpp='$CPP $CPPFLAGS'
29748ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29749ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29750ac_compiler_gnu=$ac_cv_c_compiler_gnu
29751
29752  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29753/* end confdefs.h.  */
29754int i;
29755_ACEOF
29756if ac_fn_c_try_compile "$LINENO"; then :
29757
29758else
29759  supports=no
29760fi
29761rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29762  ac_ext=cpp
29763ac_cpp='$CXXCPP $CPPFLAGS'
29764ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29765ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29766ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29767
29768  CFLAGS="$saved_cflags"
29769
29770  saved_cxxflags="$CXXFLAGS"
29771  CXXFLAGS="$CXXFLAG -m${OPENJDK_TARGET_CPU_BITS}"
29772  ac_ext=cpp
29773ac_cpp='$CXXCPP $CPPFLAGS'
29774ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29775ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29776ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29777
29778  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29779/* end confdefs.h.  */
29780int i;
29781_ACEOF
29782if ac_fn_cxx_try_compile "$LINENO"; then :
29783
29784else
29785  supports=no
29786fi
29787rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29788  ac_ext=cpp
29789ac_cpp='$CXXCPP $CPPFLAGS'
29790ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29791ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29792ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29793
29794  CXXFLAGS="$saved_cxxflags"
29795
29796  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
29797$as_echo "$supports" >&6; }
29798  if test "x$supports" = "xyes" ; then
29799    COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
29800  else
29801    COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
29802  fi
29803
29804
29805
29806
29807# Setup debug symbols (need objcopy from the toolchain for that)
29808
29809  #
29810  # ENABLE_DEBUG_SYMBOLS
29811  # This must be done after the toolchain is setup, since we're looking at objcopy.
29812  #
29813  # Check whether --enable-debug-symbols was given.
29814if test "${enable_debug_symbols+set}" = set; then :
29815  enableval=$enable_debug_symbols;
29816fi
29817
29818
29819  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should generate debug symbols" >&5
29820$as_echo_n "checking if we should generate debug symbols... " >&6; }
29821
29822  if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then
29823    # explicit enabling of enable-debug-symbols and can't find objcopy
29824    #   this is an error
29825    as_fn_error $? "Unable to find objcopy, cannot enable debug-symbols" "$LINENO" 5
29826  fi
29827
29828  if test "x$enable_debug_symbols" = "xyes"; then
29829    ENABLE_DEBUG_SYMBOLS=true
29830  elif test "x$enable_debug_symbols" = "xno"; then
29831    ENABLE_DEBUG_SYMBOLS=false
29832  else
29833    # default on macosx is false
29834    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29835      ENABLE_DEBUG_SYMBOLS=false
29836      # Default is on if objcopy is found, otherwise off
29837    elif test "x$OBJCOPY" != x || test "x$OPENJDK_TARGET_OS" = xwindows; then
29838      ENABLE_DEBUG_SYMBOLS=true
29839    else
29840      ENABLE_DEBUG_SYMBOLS=false
29841    fi
29842  fi
29843
29844  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_DEBUG_SYMBOLS" >&5
29845$as_echo "$ENABLE_DEBUG_SYMBOLS" >&6; }
29846
29847  #
29848  # ZIP_DEBUGINFO_FILES
29849  #
29850  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should zip debug-info files" >&5
29851$as_echo_n "checking if we should zip debug-info files... " >&6; }
29852  # Check whether --enable-zip-debug-info was given.
29853if test "${enable_zip_debug_info+set}" = set; then :
29854  enableval=$enable_zip_debug_info; enable_zip_debug_info="${enableval}"
29855else
29856  enable_zip_debug_info="yes"
29857fi
29858
29859  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_zip_debug_info}" >&5
29860$as_echo "${enable_zip_debug_info}" >&6; }
29861
29862  if test "x${enable_zip_debug_info}" = "xno"; then
29863    ZIP_DEBUGINFO_FILES=false
29864  else
29865    ZIP_DEBUGINFO_FILES=true
29866  fi
29867
29868
29869
29870
29871
29872
29873
29874###############################################################################
29875#
29876# Check dependencies for external and internal libraries.
29877#
29878###############################################################################
29879
29880
29881
29882  ###############################################################################
29883  #
29884  # OS specific settings that we never will need to probe.
29885  #
29886  if test "x$OPENJDK_TARGET_OS" = xlinux; then
29887    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Linux?" >&5
29888$as_echo_n "checking what is not needed on Linux?... " >&6; }
29889    PULSE_NOT_NEEDED=yes
29890    { $as_echo "$as_me:${as_lineno-$LINENO}: result: pulse" >&5
29891$as_echo "pulse" >&6; }
29892  fi
29893
29894  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29895    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Solaris?" >&5
29896$as_echo_n "checking what is not needed on Solaris?... " >&6; }
29897    ALSA_NOT_NEEDED=yes
29898    PULSE_NOT_NEEDED=yes
29899    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
29900$as_echo "alsa pulse" >&6; }
29901  fi
29902
29903  if test "x$OPENJDK_TARGET_OS" = xwindows; then
29904    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Windows?" >&5
29905$as_echo_n "checking what is not needed on Windows?... " >&6; }
29906    CUPS_NOT_NEEDED=yes
29907    ALSA_NOT_NEEDED=yes
29908    PULSE_NOT_NEEDED=yes
29909    X11_NOT_NEEDED=yes
29910    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa cups pulse x11" >&5
29911$as_echo "alsa cups pulse x11" >&6; }
29912  fi
29913
29914  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29915    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on MacOSX?" >&5
29916$as_echo_n "checking what is not needed on MacOSX?... " >&6; }
29917    ALSA_NOT_NEEDED=yes
29918    PULSE_NOT_NEEDED=yes
29919    X11_NOT_NEEDED=yes
29920    FREETYPE2_NOT_NEEDED=yes
29921    # If the java runtime framework is disabled, then we need X11.
29922    # This will be adjusted below.
29923    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse x11" >&5
29924$as_echo "alsa pulse x11" >&6; }
29925  fi
29926
29927  if test "x$OPENJDK_TARGET_OS" = xbsd; then
29928    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on bsd?" >&5
29929$as_echo_n "checking what is not needed on bsd?... " >&6; }
29930    ALSA_NOT_NEEDED=yes
29931    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa" >&5
29932$as_echo "alsa" >&6; }
29933  fi
29934
29935  if test "x$OPENJDK" = "xfalse"; then
29936    FREETYPE2_NOT_NEEDED=yes
29937  fi
29938
29939  if test "x$SUPPORT_HEADFUL" = xno; then
29940    X11_NOT_NEEDED=yes
29941  fi
29942
29943  ###############################################################################
29944  #
29945  # Check for MacOSX support for OpenJDK. If this exists, try to build a JVM
29946  # that uses this API.
29947  #
29948  # Check whether --enable-macosx-runtime-support was given.
29949if test "${enable_macosx_runtime_support+set}" = set; then :
29950  enableval=$enable_macosx_runtime_support; MACOSX_RUNTIME_SUPPORT="${enableval}"
29951else
29952  MACOSX_RUNTIME_SUPPORT="no"
29953fi
29954
29955
29956  USE_MACOSX_RUNTIME_SUPPORT=no
29957  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for explicit Java runtime support in the OS" >&5
29958$as_echo_n "checking for explicit Java runtime support in the OS... " >&6; }
29959  if test -f /System/Library/Frameworks/JavaVM.framework/Frameworks/JavaRuntimeSupport.framework/Headers/JavaRuntimeSupport.h; then
29960    if test "x$MACOSX_RUNTIME_SUPPORT" != xno; then
29961      MACOSX_RUNTIME_SUPPORT=yes
29962      USE_MACOSX_RUNTIME_SUPPORT=yes
29963      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, does not need alsa freetype2 pulse and X11" >&5
29964$as_echo "yes, does not need alsa freetype2 pulse and X11" >&6; }
29965    else
29966      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, but explicitly disabled." >&5
29967$as_echo "yes, but explicitly disabled." >&6; }
29968    fi
29969  else
29970    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29971$as_echo "no" >&6; }
29972  fi
29973
29974  if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$USE_MACOSX_RUNTIME_SUPPORT" = xno; then
29975    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on an X11 build on MacOSX?" >&5
29976$as_echo_n "checking what is not needed on an X11 build on MacOSX?... " >&6; }
29977    X11_NOT_NEEDED=
29978    FREETYPE2_NOT_NEEDED=
29979    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
29980$as_echo "alsa pulse" >&6; }
29981  fi
29982
29983
29984
29985  ###############################################################################
29986  #
29987  # Check for X Windows
29988  #
29989
29990  # Check if the user has specified sysroot, but not --x-includes or --x-libraries.
29991  # Make a simple check for the libraries at the sysroot, and setup --x-includes and
29992  # --x-libraries for the sysroot, if that seems to be correct.
29993  if test "x$SYS_ROOT" != "x/"; then
29994    if test "x$x_includes" = xNONE; then
29995      if test -f "$SYS_ROOT/usr/X11R6/include/X11/Xlib.h"; then
29996        x_includes="$SYS_ROOT/usr/X11R6/include"
29997      elif test -f "$SYS_ROOT/usr/include/X11/Xlib.h"; then
29998        x_includes="$SYS_ROOT/usr/include"
29999      fi
30000    fi
30001    if test "x$x_libraries" = xNONE; then
30002      if test -f "$SYS_ROOT/usr/X11R6/lib/libX11.so"; then
30003        x_libraries="$SYS_ROOT/usr/X11R6/lib"
30004      elif test "$SYS_ROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
30005        x_libraries="$SYS_ROOT/usr/lib64"
30006      elif test -f "$SYS_ROOT/usr/lib/libX11.so"; then
30007        x_libraries="$SYS_ROOT/usr/lib"
30008      fi
30009    fi
30010  fi
30011
30012  # Now let autoconf do it's magic
30013  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
30014$as_echo_n "checking for X... " >&6; }
30015
30016
30017# Check whether --with-x was given.
30018if test "${with_x+set}" = set; then :
30019  withval=$with_x;
30020fi
30021
30022# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
30023if test "x$with_x" = xno; then
30024  # The user explicitly disabled X.
30025  have_x=disabled
30026else
30027  case $x_includes,$x_libraries in #(
30028    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
30029    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
30030  $as_echo_n "(cached) " >&6
30031else
30032  # One or both of the vars are not set, and there is no cached value.
30033ac_x_includes=no ac_x_libraries=no
30034rm -f -r conftest.dir
30035if mkdir conftest.dir; then
30036  cd conftest.dir
30037  cat >Imakefile <<'_ACEOF'
30038incroot:
30039	@echo incroot='${INCROOT}'
30040usrlibdir:
30041	@echo usrlibdir='${USRLIBDIR}'
30042libdir:
30043	@echo libdir='${LIBDIR}'
30044_ACEOF
30045  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
30046    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
30047    for ac_var in incroot usrlibdir libdir; do
30048      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
30049    done
30050    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
30051    for ac_extension in a so sl dylib la dll; do
30052      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
30053	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
30054	ac_im_usrlibdir=$ac_im_libdir; break
30055      fi
30056    done
30057    # Screen out bogus values from the imake configuration.  They are
30058    # bogus both because they are the default anyway, and because
30059    # using them would break gcc on systems where it needs fixed includes.
30060    case $ac_im_incroot in
30061	/usr/include) ac_x_includes= ;;
30062	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
30063    esac
30064    case $ac_im_usrlibdir in
30065	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
30066	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
30067    esac
30068  fi
30069  cd ..
30070  rm -f -r conftest.dir
30071fi
30072
30073# Standard set of common directories for X headers.
30074# Check X11 before X11Rn because it is often a symlink to the current release.
30075ac_x_header_dirs='
30076/usr/X11/include
30077/usr/X11R7/include
30078/usr/X11R6/include
30079/usr/X11R5/include
30080/usr/X11R4/include
30081
30082/usr/include/X11
30083/usr/include/X11R7
30084/usr/include/X11R6
30085/usr/include/X11R5
30086/usr/include/X11R4
30087
30088/usr/local/X11/include
30089/usr/local/X11R7/include
30090/usr/local/X11R6/include
30091/usr/local/X11R5/include
30092/usr/local/X11R4/include
30093
30094/usr/local/include/X11
30095/usr/local/include/X11R7
30096/usr/local/include/X11R6
30097/usr/local/include/X11R5
30098/usr/local/include/X11R4
30099
30100/usr/X386/include
30101/usr/x386/include
30102/usr/XFree86/include/X11
30103
30104/usr/include
30105/usr/local/include
30106/usr/unsupported/include
30107/usr/athena/include
30108/usr/local/x11r5/include
30109/usr/lpp/Xamples/include
30110
30111/usr/openwin/include
30112/usr/openwin/share/include'
30113
30114if test "$ac_x_includes" = no; then
30115  # Guess where to find include files, by looking for Xlib.h.
30116  # First, try using that file with no special directory specified.
30117  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30118/* end confdefs.h.  */
30119#include <X11/Xlib.h>
30120_ACEOF
30121if ac_fn_cxx_try_cpp "$LINENO"; then :
30122  # We can compile using X headers with no special include directory.
30123ac_x_includes=
30124else
30125  for ac_dir in $ac_x_header_dirs; do
30126  if test -r "$ac_dir/X11/Xlib.h"; then
30127    ac_x_includes=$ac_dir
30128    break
30129  fi
30130done
30131fi
30132rm -f conftest.err conftest.i conftest.$ac_ext
30133fi # $ac_x_includes = no
30134
30135if test "$ac_x_libraries" = no; then
30136  # Check for the libraries.
30137  # See if we find them without any special options.
30138  # Don't add to $LIBS permanently.
30139  ac_save_LIBS=$LIBS
30140  LIBS="-lX11 $LIBS"
30141  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30142/* end confdefs.h.  */
30143#include <X11/Xlib.h>
30144int
30145main ()
30146{
30147XrmInitialize ()
30148  ;
30149  return 0;
30150}
30151_ACEOF
30152if ac_fn_cxx_try_link "$LINENO"; then :
30153  LIBS=$ac_save_LIBS
30154# We can link X programs with no special library path.
30155ac_x_libraries=
30156else
30157  LIBS=$ac_save_LIBS
30158for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
30159do
30160  # Don't even attempt the hair of trying to link an X program!
30161  for ac_extension in a so sl dylib la dll; do
30162    if test -r "$ac_dir/libX11.$ac_extension"; then
30163      ac_x_libraries=$ac_dir
30164      break 2
30165    fi
30166  done
30167done
30168fi
30169rm -f core conftest.err conftest.$ac_objext \
30170    conftest$ac_exeext conftest.$ac_ext
30171fi # $ac_x_libraries = no
30172
30173case $ac_x_includes,$ac_x_libraries in #(
30174  no,* | *,no | *\'*)
30175    # Didn't find X, or a directory has "'" in its name.
30176    ac_cv_have_x="have_x=no";; #(
30177  *)
30178    # Record where we found X for the cache.
30179    ac_cv_have_x="have_x=yes\
30180	ac_x_includes='$ac_x_includes'\
30181	ac_x_libraries='$ac_x_libraries'"
30182esac
30183fi
30184;; #(
30185    *) have_x=yes;;
30186  esac
30187  eval "$ac_cv_have_x"
30188fi # $with_x != no
30189
30190if test "$have_x" != yes; then
30191  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
30192$as_echo "$have_x" >&6; }
30193  no_x=yes
30194else
30195  # If each of the values was on the command line, it overrides each guess.
30196  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
30197  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
30198  # Update the cache value to reflect the command line values.
30199  ac_cv_have_x="have_x=yes\
30200	ac_x_includes='$x_includes'\
30201	ac_x_libraries='$x_libraries'"
30202  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
30203$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
30204fi
30205
30206  if test "$no_x" = yes; then
30207  # Not all programs may use this symbol, but it does not hurt to define it.
30208
30209$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
30210
30211  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
30212else
30213  if test -n "$x_includes"; then
30214    X_CFLAGS="$X_CFLAGS -I$x_includes"
30215  fi
30216
30217  # It would also be nice to do this for all -L options, not just this one.
30218  if test -n "$x_libraries"; then
30219    X_LIBS="$X_LIBS -L$x_libraries"
30220    # For Solaris; some versions of Sun CC require a space after -R and
30221    # others require no space.  Words are not sufficient . . . .
30222    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
30223$as_echo_n "checking whether -R must be followed by a space... " >&6; }
30224    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
30225    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
30226    ac_cxx_werror_flag=yes
30227    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30228/* end confdefs.h.  */
30229
30230int
30231main ()
30232{
30233
30234  ;
30235  return 0;
30236}
30237_ACEOF
30238if ac_fn_cxx_try_link "$LINENO"; then :
30239  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30240$as_echo "no" >&6; }
30241       X_LIBS="$X_LIBS -R$x_libraries"
30242else
30243  LIBS="$ac_xsave_LIBS -R $x_libraries"
30244       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30245/* end confdefs.h.  */
30246
30247int
30248main ()
30249{
30250
30251  ;
30252  return 0;
30253}
30254_ACEOF
30255if ac_fn_cxx_try_link "$LINENO"; then :
30256  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30257$as_echo "yes" >&6; }
30258	  X_LIBS="$X_LIBS -R $x_libraries"
30259else
30260  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
30261$as_echo "neither works" >&6; }
30262fi
30263rm -f core conftest.err conftest.$ac_objext \
30264    conftest$ac_exeext conftest.$ac_ext
30265fi
30266rm -f core conftest.err conftest.$ac_objext \
30267    conftest$ac_exeext conftest.$ac_ext
30268    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
30269    LIBS=$ac_xsave_LIBS
30270  fi
30271
30272  # Check for system-dependent libraries X programs must link with.
30273  # Do this before checking for the system-independent R6 libraries
30274  # (-lICE), since we may need -lsocket or whatever for X linking.
30275
30276  if test "$ISC" = yes; then
30277    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
30278  else
30279    # Martyn Johnson says this is needed for Ultrix, if the X
30280    # libraries were built with DECnet support.  And Karl Berry says
30281    # the Alpha needs dnet_stub (dnet does not exist).
30282    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
30283    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30284/* end confdefs.h.  */
30285
30286/* Override any GCC internal prototype to avoid an error.
30287   Use char because int might match the return type of a GCC
30288   builtin and then its argument prototype would still apply.  */
30289#ifdef __cplusplus
30290extern "C"
30291#endif
30292char XOpenDisplay ();
30293int
30294main ()
30295{
30296return XOpenDisplay ();
30297  ;
30298  return 0;
30299}
30300_ACEOF
30301if ac_fn_cxx_try_link "$LINENO"; then :
30302
30303else
30304  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
30305$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
30306if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
30307  $as_echo_n "(cached) " >&6
30308else
30309  ac_check_lib_save_LIBS=$LIBS
30310LIBS="-ldnet  $LIBS"
30311cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30312/* end confdefs.h.  */
30313
30314/* Override any GCC internal prototype to avoid an error.
30315   Use char because int might match the return type of a GCC
30316   builtin and then its argument prototype would still apply.  */
30317#ifdef __cplusplus
30318extern "C"
30319#endif
30320char dnet_ntoa ();
30321int
30322main ()
30323{
30324return dnet_ntoa ();
30325  ;
30326  return 0;
30327}
30328_ACEOF
30329if ac_fn_cxx_try_link "$LINENO"; then :
30330  ac_cv_lib_dnet_dnet_ntoa=yes
30331else
30332  ac_cv_lib_dnet_dnet_ntoa=no
30333fi
30334rm -f core conftest.err conftest.$ac_objext \
30335    conftest$ac_exeext conftest.$ac_ext
30336LIBS=$ac_check_lib_save_LIBS
30337fi
30338{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
30339$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
30340if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
30341  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
30342fi
30343
30344    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
30345      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
30346$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
30347if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
30348  $as_echo_n "(cached) " >&6
30349else
30350  ac_check_lib_save_LIBS=$LIBS
30351LIBS="-ldnet_stub  $LIBS"
30352cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30353/* end confdefs.h.  */
30354
30355/* Override any GCC internal prototype to avoid an error.
30356   Use char because int might match the return type of a GCC
30357   builtin and then its argument prototype would still apply.  */
30358#ifdef __cplusplus
30359extern "C"
30360#endif
30361char dnet_ntoa ();
30362int
30363main ()
30364{
30365return dnet_ntoa ();
30366  ;
30367  return 0;
30368}
30369_ACEOF
30370if ac_fn_cxx_try_link "$LINENO"; then :
30371  ac_cv_lib_dnet_stub_dnet_ntoa=yes
30372else
30373  ac_cv_lib_dnet_stub_dnet_ntoa=no
30374fi
30375rm -f core conftest.err conftest.$ac_objext \
30376    conftest$ac_exeext conftest.$ac_ext
30377LIBS=$ac_check_lib_save_LIBS
30378fi
30379{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
30380$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
30381if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
30382  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
30383fi
30384
30385    fi
30386fi
30387rm -f core conftest.err conftest.$ac_objext \
30388    conftest$ac_exeext conftest.$ac_ext
30389    LIBS="$ac_xsave_LIBS"
30390
30391    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
30392    # to get the SysV transport functions.
30393    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
30394    # needs -lnsl.
30395    # The nsl library prevents programs from opening the X display
30396    # on Irix 5.2, according to T.E. Dickey.
30397    # The functions gethostbyname, getservbyname, and inet_addr are
30398    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
30399    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
30400if test "x$ac_cv_func_gethostbyname" = xyes; then :
30401
30402fi
30403
30404    if test $ac_cv_func_gethostbyname = no; then
30405      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
30406$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
30407if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
30408  $as_echo_n "(cached) " >&6
30409else
30410  ac_check_lib_save_LIBS=$LIBS
30411LIBS="-lnsl  $LIBS"
30412cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30413/* end confdefs.h.  */
30414
30415/* Override any GCC internal prototype to avoid an error.
30416   Use char because int might match the return type of a GCC
30417   builtin and then its argument prototype would still apply.  */
30418#ifdef __cplusplus
30419extern "C"
30420#endif
30421char gethostbyname ();
30422int
30423main ()
30424{
30425return gethostbyname ();
30426  ;
30427  return 0;
30428}
30429_ACEOF
30430if ac_fn_cxx_try_link "$LINENO"; then :
30431  ac_cv_lib_nsl_gethostbyname=yes
30432else
30433  ac_cv_lib_nsl_gethostbyname=no
30434fi
30435rm -f core conftest.err conftest.$ac_objext \
30436    conftest$ac_exeext conftest.$ac_ext
30437LIBS=$ac_check_lib_save_LIBS
30438fi
30439{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
30440$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
30441if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
30442  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
30443fi
30444
30445      if test $ac_cv_lib_nsl_gethostbyname = no; then
30446	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
30447$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
30448if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
30449  $as_echo_n "(cached) " >&6
30450else
30451  ac_check_lib_save_LIBS=$LIBS
30452LIBS="-lbsd  $LIBS"
30453cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30454/* end confdefs.h.  */
30455
30456/* Override any GCC internal prototype to avoid an error.
30457   Use char because int might match the return type of a GCC
30458   builtin and then its argument prototype would still apply.  */
30459#ifdef __cplusplus
30460extern "C"
30461#endif
30462char gethostbyname ();
30463int
30464main ()
30465{
30466return gethostbyname ();
30467  ;
30468  return 0;
30469}
30470_ACEOF
30471if ac_fn_cxx_try_link "$LINENO"; then :
30472  ac_cv_lib_bsd_gethostbyname=yes
30473else
30474  ac_cv_lib_bsd_gethostbyname=no
30475fi
30476rm -f core conftest.err conftest.$ac_objext \
30477    conftest$ac_exeext conftest.$ac_ext
30478LIBS=$ac_check_lib_save_LIBS
30479fi
30480{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
30481$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
30482if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
30483  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
30484fi
30485
30486      fi
30487    fi
30488
30489    # lieder@skyler.mavd.honeywell.com says without -lsocket,
30490    # socket/setsockopt and other routines are undefined under SCO ODT
30491    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
30492    # on later versions), says Simon Leinen: it contains gethostby*
30493    # variants that don't use the name server (or something).  -lsocket
30494    # must be given before -lnsl if both are needed.  We assume that
30495    # if connect needs -lnsl, so does gethostbyname.
30496    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
30497if test "x$ac_cv_func_connect" = xyes; then :
30498
30499fi
30500
30501    if test $ac_cv_func_connect = no; then
30502      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
30503$as_echo_n "checking for connect in -lsocket... " >&6; }
30504if ${ac_cv_lib_socket_connect+:} false; then :
30505  $as_echo_n "(cached) " >&6
30506else
30507  ac_check_lib_save_LIBS=$LIBS
30508LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
30509cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30510/* end confdefs.h.  */
30511
30512/* Override any GCC internal prototype to avoid an error.
30513   Use char because int might match the return type of a GCC
30514   builtin and then its argument prototype would still apply.  */
30515#ifdef __cplusplus
30516extern "C"
30517#endif
30518char connect ();
30519int
30520main ()
30521{
30522return connect ();
30523  ;
30524  return 0;
30525}
30526_ACEOF
30527if ac_fn_cxx_try_link "$LINENO"; then :
30528  ac_cv_lib_socket_connect=yes
30529else
30530  ac_cv_lib_socket_connect=no
30531fi
30532rm -f core conftest.err conftest.$ac_objext \
30533    conftest$ac_exeext conftest.$ac_ext
30534LIBS=$ac_check_lib_save_LIBS
30535fi
30536{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
30537$as_echo "$ac_cv_lib_socket_connect" >&6; }
30538if test "x$ac_cv_lib_socket_connect" = xyes; then :
30539  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
30540fi
30541
30542    fi
30543
30544    # Guillermo Gomez says -lposix is necessary on A/UX.
30545    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
30546if test "x$ac_cv_func_remove" = xyes; then :
30547
30548fi
30549
30550    if test $ac_cv_func_remove = no; then
30551      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
30552$as_echo_n "checking for remove in -lposix... " >&6; }
30553if ${ac_cv_lib_posix_remove+:} false; then :
30554  $as_echo_n "(cached) " >&6
30555else
30556  ac_check_lib_save_LIBS=$LIBS
30557LIBS="-lposix  $LIBS"
30558cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30559/* end confdefs.h.  */
30560
30561/* Override any GCC internal prototype to avoid an error.
30562   Use char because int might match the return type of a GCC
30563   builtin and then its argument prototype would still apply.  */
30564#ifdef __cplusplus
30565extern "C"
30566#endif
30567char remove ();
30568int
30569main ()
30570{
30571return remove ();
30572  ;
30573  return 0;
30574}
30575_ACEOF
30576if ac_fn_cxx_try_link "$LINENO"; then :
30577  ac_cv_lib_posix_remove=yes
30578else
30579  ac_cv_lib_posix_remove=no
30580fi
30581rm -f core conftest.err conftest.$ac_objext \
30582    conftest$ac_exeext conftest.$ac_ext
30583LIBS=$ac_check_lib_save_LIBS
30584fi
30585{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
30586$as_echo "$ac_cv_lib_posix_remove" >&6; }
30587if test "x$ac_cv_lib_posix_remove" = xyes; then :
30588  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
30589fi
30590
30591    fi
30592
30593    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
30594    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
30595if test "x$ac_cv_func_shmat" = xyes; then :
30596
30597fi
30598
30599    if test $ac_cv_func_shmat = no; then
30600      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
30601$as_echo_n "checking for shmat in -lipc... " >&6; }
30602if ${ac_cv_lib_ipc_shmat+:} false; then :
30603  $as_echo_n "(cached) " >&6
30604else
30605  ac_check_lib_save_LIBS=$LIBS
30606LIBS="-lipc  $LIBS"
30607cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30608/* end confdefs.h.  */
30609
30610/* Override any GCC internal prototype to avoid an error.
30611   Use char because int might match the return type of a GCC
30612   builtin and then its argument prototype would still apply.  */
30613#ifdef __cplusplus
30614extern "C"
30615#endif
30616char shmat ();
30617int
30618main ()
30619{
30620return shmat ();
30621  ;
30622  return 0;
30623}
30624_ACEOF
30625if ac_fn_cxx_try_link "$LINENO"; then :
30626  ac_cv_lib_ipc_shmat=yes
30627else
30628  ac_cv_lib_ipc_shmat=no
30629fi
30630rm -f core conftest.err conftest.$ac_objext \
30631    conftest$ac_exeext conftest.$ac_ext
30632LIBS=$ac_check_lib_save_LIBS
30633fi
30634{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
30635$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
30636if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
30637  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
30638fi
30639
30640    fi
30641  fi
30642
30643  # Check for libraries that X11R6 Xt/Xaw programs need.
30644  ac_save_LDFLAGS=$LDFLAGS
30645  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
30646  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
30647  # check for ICE first), but we must link in the order -lSM -lICE or
30648  # we get undefined symbols.  So assume we have SM if we have ICE.
30649  # These have to be linked with before -lX11, unlike the other
30650  # libraries we check for below, so use a different variable.
30651  # John Interrante, Karl Berry
30652  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
30653$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
30654if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
30655  $as_echo_n "(cached) " >&6
30656else
30657  ac_check_lib_save_LIBS=$LIBS
30658LIBS="-lICE $X_EXTRA_LIBS $LIBS"
30659cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30660/* end confdefs.h.  */
30661
30662/* Override any GCC internal prototype to avoid an error.
30663   Use char because int might match the return type of a GCC
30664   builtin and then its argument prototype would still apply.  */
30665#ifdef __cplusplus
30666extern "C"
30667#endif
30668char IceConnectionNumber ();
30669int
30670main ()
30671{
30672return IceConnectionNumber ();
30673  ;
30674  return 0;
30675}
30676_ACEOF
30677if ac_fn_cxx_try_link "$LINENO"; then :
30678  ac_cv_lib_ICE_IceConnectionNumber=yes
30679else
30680  ac_cv_lib_ICE_IceConnectionNumber=no
30681fi
30682rm -f core conftest.err conftest.$ac_objext \
30683    conftest$ac_exeext conftest.$ac_ext
30684LIBS=$ac_check_lib_save_LIBS
30685fi
30686{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
30687$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
30688if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
30689  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
30690fi
30691
30692  LDFLAGS=$ac_save_LDFLAGS
30693
30694fi
30695
30696
30697  # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
30698  # this doesn't make sense so we remove it.
30699  if test "x$COMPILE_TYPE" = xcross; then
30700    X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
30701  fi
30702
30703  if test "x$no_x" = xyes && test "x$X11_NOT_NEEDED" != xyes; then
30704
30705  # Print a helpful message on how to acquire the necessary build dependency.
30706  # x11 is the help tag: freetyp2, cups, pulse, alsa etc
30707  MISSING_DEPENDENCY=x11
30708
30709  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30710    cygwin_help $MISSING_DEPENDENCY
30711  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30712    msys_help $MISSING_DEPENDENCY
30713  else
30714    PKGHANDLER_COMMAND=
30715
30716    case $PKGHANDLER in
30717      apt-get)
30718        apt_help     $MISSING_DEPENDENCY ;;
30719      yum)
30720        yum_help     $MISSING_DEPENDENCY ;;
30721      port)
30722        port_help    $MISSING_DEPENDENCY ;;
30723      pkgutil)
30724        pkgutil_help $MISSING_DEPENDENCY ;;
30725      pkgadd)
30726        pkgadd_help  $MISSING_DEPENDENCY ;;
30727      * )
30728        break ;;
30729    esac
30730
30731    if test "x$PKGHANDLER_COMMAND" != x; then
30732      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30733    fi
30734  fi
30735
30736    as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
30737  fi
30738
30739  # Some of the old makefiles require a setting of OPENWIN_HOME
30740  # Since the X11R6 directory has disappeared on later Linuxes,
30741  # we need to probe for it.
30742  if test "x$OPENJDK_TARGET_OS" = xlinux; then
30743    if test -d "$SYS_ROOT/usr/X11R6"; then
30744      OPENWIN_HOME="$SYS_ROOT/usr/X11R6"
30745    elif test -d "$SYS_ROOT/usr/include/X11"; then
30746      OPENWIN_HOME="$SYS_ROOT/usr"
30747    fi
30748  fi
30749  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
30750    OPENWIN_HOME="/usr/openwin"
30751  fi
30752
30753
30754
30755  #
30756  # Weird Sol10 something check...TODO change to try compile
30757  #
30758  if test "x${OPENJDK_TARGET_OS}" = xsolaris; then
30759    if test "`uname -r`" = "5.10"; then
30760      if test "`${EGREP} -c XLinearGradient ${OPENWIN_HOME}/share/include/X11/extensions/Xrender.h`" = "0"; then
30761        X_CFLAGS="${X_CFLAGS} -DSOLARIS10_NO_XRENDER_STRUCTS"
30762      fi
30763    fi
30764  fi
30765
30766  ac_ext=c
30767ac_cpp='$CPP $CPPFLAGS'
30768ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30769ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30770ac_compiler_gnu=$ac_cv_c_compiler_gnu
30771
30772  OLD_CFLAGS="$CFLAGS"
30773  CFLAGS="$CFLAGS $X_CFLAGS"
30774
30775  # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
30776  for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
30777do :
30778  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
30779ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
30780        # include <X11/Xlib.h>
30781        # include <X11/Xutil.h>
30782
30783
30784"
30785if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
30786  cat >>confdefs.h <<_ACEOF
30787#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
30788_ACEOF
30789 X11_A_OK=yes
30790else
30791  X11_A_OK=no; break
30792fi
30793
30794done
30795
30796
30797  CFLAGS="$OLD_CFLAGS"
30798  ac_ext=cpp
30799ac_cpp='$CXXCPP $CPPFLAGS'
30800ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30801ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30802ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30803
30804
30805  if test "x$X11_A_OK" = xno && test "x$X11_NOT_NEEDED" != xyes; then
30806
30807  # Print a helpful message on how to acquire the necessary build dependency.
30808  # x11 is the help tag: freetyp2, cups, pulse, alsa etc
30809  MISSING_DEPENDENCY=x11
30810
30811  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30812    cygwin_help $MISSING_DEPENDENCY
30813  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30814    msys_help $MISSING_DEPENDENCY
30815  else
30816    PKGHANDLER_COMMAND=
30817
30818    case $PKGHANDLER in
30819      apt-get)
30820        apt_help     $MISSING_DEPENDENCY ;;
30821      yum)
30822        yum_help     $MISSING_DEPENDENCY ;;
30823      port)
30824        port_help    $MISSING_DEPENDENCY ;;
30825      pkgutil)
30826        pkgutil_help $MISSING_DEPENDENCY ;;
30827      pkgadd)
30828        pkgadd_help  $MISSING_DEPENDENCY ;;
30829      * )
30830        break ;;
30831    esac
30832
30833    if test "x$PKGHANDLER_COMMAND" != x; then
30834      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30835    fi
30836  fi
30837
30838    as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
30839  fi
30840
30841
30842
30843
30844
30845
30846  ###############################################################################
30847  #
30848  # The common unix printing system cups is used to print from java.
30849  #
30850
30851# Check whether --with-cups was given.
30852if test "${with_cups+set}" = set; then :
30853  withval=$with_cups;
30854fi
30855
30856
30857# Check whether --with-cups-include was given.
30858if test "${with_cups_include+set}" = set; then :
30859  withval=$with_cups_include;
30860fi
30861
30862
30863  if test "x$CUPS_NOT_NEEDED" = xyes; then
30864    if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then
30865      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups is ignored" >&5
30866$as_echo "$as_me: WARNING: cups not used, so --with-cups is ignored" >&2;}
30867    fi
30868    CUPS_CFLAGS=
30869  else
30870    CUPS_FOUND=no
30871
30872    if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
30873      as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
30874    fi
30875
30876    if test "x${with_cups}" != x; then
30877      CUPS_CFLAGS="-I${with_cups}/include"
30878      CUPS_FOUND=yes
30879    fi
30880    if test "x${with_cups_include}" != x; then
30881      CUPS_CFLAGS="-I${with_cups_include}"
30882      CUPS_FOUND=yes
30883    fi
30884    if test "x$CUPS_FOUND" = xno; then
30885
30886
30887  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
30888    # Source the builddeps file again, to make sure it uses the latest variables!
30889    . $builddepsfile
30890    # Look for a target and build machine specific resource!
30891    eval resource=\${builddep_cups_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
30892    if test "x$resource" = x; then
30893      # Ok, lets instead look for a target specific resource
30894      eval resource=\${builddep_cups_TARGET_${rewritten_target_var}}
30895    fi
30896    if test "x$resource" = x; then
30897      # Ok, lets instead look for a build specific resource
30898      eval resource=\${builddep_cups_BUILD_${rewritten_build_var}}
30899    fi
30900    if test "x$resource" = x; then
30901      # Ok, lets instead look for a generic resource
30902      # (The cups comes from M4 and not the shell, thus no need for eval here.)
30903      resource=${builddep_cups}
30904    fi
30905    if test "x$resource" != x; then
30906      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for cups" >&5
30907$as_echo "$as_me: Using builddeps $resource for cups" >&6;}
30908      # If the resource in the builddeps.conf file is an existing directory,
30909      # for example /java/linux/cups
30910      if test -d ${resource}; then
30911        depdir=${resource}
30912      else
30913
30914  # cups is for example mymodule
30915  # $resource is for example libs/general/libmymod_1_2_3.zip
30916  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
30917  # $with_builddeps_dir is for example /localhome/builddeps
30918  # depdir is the name of the variable into which we store the depdir, eg MYMOD
30919  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
30920  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
30921  filename=`basename $resource`
30922  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
30923  filebase=${filename%%.*}
30924  extension=${filename#*.}
30925  installdir=$with_builddeps_dir/$filebase
30926  if test ! -f $installdir/$filename.unpacked; then
30927    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&5
30928$as_echo "$as_me: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&6;}
30929    if test ! -d $installdir; then
30930      mkdir -p $installdir
30931    fi
30932    if test ! -d $installdir; then
30933      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
30934    fi
30935    tmpfile=`mktemp $installdir/cups.XXXXXXXXX`
30936    touch $tmpfile
30937    if test ! -f $tmpfile; then
30938      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
30939    fi
30940
30941  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
30942  # $tmpfile is the local file name for the downloaded file.
30943  VALID_TOOL=no
30944  if test "x$BDEPS_FTP" = xwget; then
30945    VALID_TOOL=yes
30946    wget -O $tmpfile $with_builddeps_server/$resource
30947  fi
30948  if test "x$BDEPS_FTP" = xlftp; then
30949    VALID_TOOL=yes
30950    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
30951  fi
30952  if test "x$BDEPS_FTP" = xftp; then
30953    VALID_TOOL=yes
30954    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
30955    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
30956    FTPUSERPWD=${FTPSERVER%%@*}
30957    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
30958      FTPUSER=${userpwd%%:*}
30959      FTPPWD=${userpwd#*@}
30960      FTPSERVER=${FTPSERVER#*@}
30961    else
30962      FTPUSER=ftp
30963      FTPPWD=ftp
30964    fi
30965    # the "pass" command does not work on some
30966    # ftp clients (read ftp.exe) but if it works,
30967    # passive mode is better!
30968    ( \
30969        echo "user $FTPUSER $FTPPWD"        ; \
30970        echo "pass"                         ; \
30971        echo "bin"                          ; \
30972        echo "get $FTPPATH $tmpfile"              ; \
30973    ) | ftp -in $FTPSERVER
30974  fi
30975  if test "x$VALID_TOOL" != xyes; then
30976    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
30977  fi
30978
30979    mv $tmpfile $installdir/$filename
30980    if test ! -s $installdir/$filename; then
30981      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
30982    fi
30983    case "$extension" in
30984      zip)  echo "Unzipping $installdir/$filename..."
30985        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
30986        ;;
30987      tar.gz) echo "Untaring $installdir/$filename..."
30988        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
30989        ;;
30990      tgz) echo "Untaring $installdir/$filename..."
30991        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
30992        ;;
30993      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
30994        ;;
30995    esac
30996  fi
30997  if test -f $installdir/$filename.unpacked; then
30998    depdir=$installdir
30999  fi
31000
31001      fi
31002      # Source the builddeps file again, because in the previous command, the depdir
31003      # was updated to point at the current build dependency install directory.
31004      . $builddepsfile
31005      # Now extract variables from the builddeps.conf files.
31006      theroot=${builddep_cups_ROOT}
31007      thecflags=${builddep_cups_CFLAGS}
31008      thelibs=${builddep_cups_LIBS}
31009      if test "x$depdir" = x; then
31010        as_fn_error $? "Could not download build dependency cups" "$LINENO" 5
31011      fi
31012      CUPS=$depdir
31013      if test "x$theroot" != x; then
31014        CUPS="$theroot"
31015      fi
31016      if test "x$thecflags" != x; then
31017        CUPS_CFLAGS="$thecflags"
31018      fi
31019      if test "x$thelibs" != x; then
31020        CUPS_LIBS="$thelibs"
31021      fi
31022      CUPS_FOUND=yes
31023
31024    fi
31025
31026  fi
31027
31028    fi
31029    if test "x$CUPS_FOUND" = xno; then
31030      # Are the cups headers installed in the default /usr/include location?
31031      for ac_header in cups/cups.h cups/ppd.h
31032do :
31033  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
31034ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
31035if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
31036  cat >>confdefs.h <<_ACEOF
31037#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
31038_ACEOF
31039
31040            CUPS_FOUND=yes
31041            CUPS_CFLAGS=
31042            DEFAULT_CUPS=yes
31043
31044
31045fi
31046
31047done
31048
31049    fi
31050    if test "x$CUPS_FOUND" = xno; then
31051      # Getting nervous now? Lets poke around for standard Solaris third-party
31052      # package installation locations.
31053      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
31054$as_echo_n "checking for cups headers... " >&6; }
31055      if test -s /opt/sfw/cups/include/cups/cups.h; then
31056        # An SFW package seems to be installed!
31057        CUPS_FOUND=yes
31058        CUPS_CFLAGS="-I/opt/sfw/cups/include"
31059      elif test -s /opt/csw/include/cups/cups.h; then
31060        # A CSW package seems to be installed!
31061        CUPS_FOUND=yes
31062        CUPS_CFLAGS="-I/opt/csw/include"
31063      fi
31064      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
31065$as_echo "$CUPS_FOUND" >&6; }
31066    fi
31067    if test "x$CUPS_FOUND" = xno; then
31068
31069  # Print a helpful message on how to acquire the necessary build dependency.
31070  # cups is the help tag: freetyp2, cups, pulse, alsa etc
31071  MISSING_DEPENDENCY=cups
31072
31073  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31074    cygwin_help $MISSING_DEPENDENCY
31075  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31076    msys_help $MISSING_DEPENDENCY
31077  else
31078    PKGHANDLER_COMMAND=
31079
31080    case $PKGHANDLER in
31081      apt-get)
31082        apt_help     $MISSING_DEPENDENCY ;;
31083      yum)
31084        yum_help     $MISSING_DEPENDENCY ;;
31085      port)
31086        port_help    $MISSING_DEPENDENCY ;;
31087      pkgutil)
31088        pkgutil_help $MISSING_DEPENDENCY ;;
31089      pkgadd)
31090        pkgadd_help  $MISSING_DEPENDENCY ;;
31091      * )
31092        break ;;
31093    esac
31094
31095    if test "x$PKGHANDLER_COMMAND" != x; then
31096      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
31097    fi
31098  fi
31099
31100      as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
31101    fi
31102  fi
31103
31104
31105
31106
31107
31108
31109  ###############################################################################
31110  #
31111  # The ubiquitous freetype2 library is used to render fonts.
31112  #
31113
31114# Check whether --with-freetype was given.
31115if test "${with_freetype+set}" = set; then :
31116  withval=$with_freetype;
31117fi
31118
31119
31120  # If we are using the OS installed system lib for freetype, then we do not need to copy it to the build tree
31121  USING_SYSTEM_FT_LIB=false
31122
31123  if test "x$FREETYPE2_NOT_NEEDED" = xyes; then
31124    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
31125      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype is ignored" >&5
31126$as_echo "$as_me: WARNING: freetype not used, so --with-freetype is ignored" >&2;}
31127    fi
31128    FREETYPE2_CFLAGS=
31129    FREETYPE2_LIBS=
31130    FREETYPE2_LIB_PATH=
31131  else
31132    FREETYPE2_FOUND=no
31133
31134    if test "x$with_freetype" != x; then
31135
31136  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31137
31138  # Input might be given as Windows format, start by converting to
31139  # unix format.
31140  path="$with_freetype"
31141  new_path=`$CYGPATH -u "$path"`
31142
31143  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31144  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31145  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31146  # "foo.exe" is OK but "foo" is an error.
31147  #
31148  # This test is therefore slightly more accurate than "test -f" to check for file precense.
31149  # It is also a way to make sure we got the proper file name for the real test later on.
31150  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31151  if test "x$test_shortpath" = x; then
31152    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_freetype, which resolves as \"$path\", is invalid." >&5
31153$as_echo "$as_me: The path of with_freetype, which resolves as \"$path\", is invalid." >&6;}
31154    as_fn_error $? "Cannot locate the the path of with_freetype" "$LINENO" 5
31155  fi
31156
31157  # Call helper function which possibly converts this using DOS-style short mode.
31158  # If so, the updated path is stored in $new_path.
31159
31160  input_path="$new_path"
31161  # Check if we need to convert this using DOS-style short mode. If the path
31162  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31163  # take no chances and rewrite it.
31164  # Note: m4 eats our [], so we need to use [ and ] instead.
31165  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31166  if test "x$has_forbidden_chars" != x; then
31167    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31168    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31169    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31170    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31171      # Going to short mode and back again did indeed matter. Since short mode is
31172      # case insensitive, let's make it lowercase to improve readability.
31173      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31174      # Now convert it back to Unix-stile (cygpath)
31175      input_path=`$CYGPATH -u "$shortmode_path"`
31176      new_path="$input_path"
31177    fi
31178  fi
31179
31180  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31181  if test "x$test_cygdrive_prefix" = x; then
31182    # As a simple fix, exclude /usr/bin since it's not a real path.
31183    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31184      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31185      # a path prefixed by /cygdrive for fixpath to work.
31186      new_path="$CYGWIN_ROOT_PATH$input_path"
31187    fi
31188  fi
31189
31190
31191  if test "x$path" != "x$new_path"; then
31192    with_freetype="$new_path"
31193    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_freetype to \"$new_path\"" >&5
31194$as_echo "$as_me: Rewriting with_freetype to \"$new_path\"" >&6;}
31195  fi
31196
31197  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31198
31199  path="$with_freetype"
31200  has_colon=`$ECHO $path | $GREP ^.:`
31201  new_path="$path"
31202  if test "x$has_colon" = x; then
31203    # Not in mixed or Windows style, start by that.
31204    new_path=`cmd //c echo $path`
31205  fi
31206
31207
31208  input_path="$new_path"
31209  # Check if we need to convert this using DOS-style short mode. If the path
31210  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31211  # take no chances and rewrite it.
31212  # Note: m4 eats our [], so we need to use [ and ] instead.
31213  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31214  if test "x$has_forbidden_chars" != x; then
31215    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31216    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31217  fi
31218
31219
31220  windows_path="$new_path"
31221  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31222    unix_path=`$CYGPATH -u "$windows_path"`
31223    new_path="$unix_path"
31224  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31225    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31226    new_path="$unix_path"
31227  fi
31228
31229  if test "x$path" != "x$new_path"; then
31230    with_freetype="$new_path"
31231    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_freetype to \"$new_path\"" >&5
31232$as_echo "$as_me: Rewriting with_freetype to \"$new_path\"" >&6;}
31233  fi
31234
31235  # Save the first 10 bytes of this path to the storage, so fixpath can work.
31236  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31237
31238  else
31239    # We're on a posix platform. Hooray! :)
31240    path="$with_freetype"
31241    has_space=`$ECHO "$path" | $GREP " "`
31242    if test "x$has_space" != x; then
31243      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_freetype, which resolves as \"$path\", is invalid." >&5
31244$as_echo "$as_me: The path of with_freetype, which resolves as \"$path\", is invalid." >&6;}
31245      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31246    fi
31247
31248    # Use eval to expand a potential ~
31249    eval path="$path"
31250    if test ! -f "$path" && test ! -d "$path"; then
31251      as_fn_error $? "The path of with_freetype, which resolves as \"$path\", is not found." "$LINENO" 5
31252    fi
31253
31254    with_freetype="`cd "$path"; $THEPWDCMD -L`"
31255  fi
31256
31257      FREETYPE2_LIBS="-L$with_freetype/lib -lfreetype"
31258      FREETYPE2_LIB_PATH="$with_freetype/lib"
31259      if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -d "$with_freetype/lib/amd64"; then
31260        FREETYPE2_LIBS="-L$with_freetype/lib/amd64 -lfreetype"
31261        FREETYPE2_LIB_PATH="$with_freetype/lib/amd64"
31262      fi
31263      if test "x$OPENJDK_TARGET_OS" = xwindows; then
31264        FREETYPE2_LIBS="$with_freetype/lib/freetype.lib"
31265      fi
31266      FREETYPE2_CFLAGS="-I$with_freetype/include"
31267      if test -s $with_freetype/include/ft2build.h && test -d $with_freetype/include/freetype2/freetype; then
31268        FREETYPE2_CFLAGS="-I$with_freetype/include/freetype2 -I$with_freetype/include"
31269      fi
31270      FREETYPE2_FOUND=yes
31271      if test "x$FREETYPE2_FOUND" = xyes; then
31272        # Verify that the directories exist
31273        if ! test -d "$with_freetype/lib" || ! test -d "$with_freetype/include"; then
31274          as_fn_error $? "Could not find the expected directories $with_freetype/lib and $with_freetype/include" "$LINENO" 5
31275        fi
31276        # List the contents of the lib.
31277        FREETYPELIB=`ls $with_freetype/lib/libfreetype.so $with_freetype/lib/freetype.dll 2> /dev/null`
31278        if test "x$FREETYPELIB" = x; then
31279          as_fn_error $? "Could not find libfreetype.so nor freetype.dll in $with_freetype/lib" "$LINENO" 5
31280        fi
31281        # Check one h-file
31282        if ! test -s "$with_freetype/include/ft2build.h"; then
31283          as_fn_error $? "Could not find $with_freetype/include/ft2build.h" "$LINENO" 5
31284        fi
31285      fi
31286    fi
31287    if test "x$FREETYPE2_FOUND" = xno; then
31288
31289
31290  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
31291    # Source the builddeps file again, to make sure it uses the latest variables!
31292    . $builddepsfile
31293    # Look for a target and build machine specific resource!
31294    eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
31295    if test "x$resource" = x; then
31296      # Ok, lets instead look for a target specific resource
31297      eval resource=\${builddep_freetype2_TARGET_${rewritten_target_var}}
31298    fi
31299    if test "x$resource" = x; then
31300      # Ok, lets instead look for a build specific resource
31301      eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}}
31302    fi
31303    if test "x$resource" = x; then
31304      # Ok, lets instead look for a generic resource
31305      # (The freetype2 comes from M4 and not the shell, thus no need for eval here.)
31306      resource=${builddep_freetype2}
31307    fi
31308    if test "x$resource" != x; then
31309      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for freetype2" >&5
31310$as_echo "$as_me: Using builddeps $resource for freetype2" >&6;}
31311      # If the resource in the builddeps.conf file is an existing directory,
31312      # for example /java/linux/cups
31313      if test -d ${resource}; then
31314        depdir=${resource}
31315      else
31316
31317  # freetype2 is for example mymodule
31318  # $resource is for example libs/general/libmymod_1_2_3.zip
31319  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
31320  # $with_builddeps_dir is for example /localhome/builddeps
31321  # depdir is the name of the variable into which we store the depdir, eg MYMOD
31322  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
31323  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
31324  filename=`basename $resource`
31325  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
31326  filebase=${filename%%.*}
31327  extension=${filename#*.}
31328  installdir=$with_builddeps_dir/$filebase
31329  if test ! -f $installdir/$filename.unpacked; then
31330    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&5
31331$as_echo "$as_me: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&6;}
31332    if test ! -d $installdir; then
31333      mkdir -p $installdir
31334    fi
31335    if test ! -d $installdir; then
31336      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
31337    fi
31338    tmpfile=`mktemp $installdir/freetype2.XXXXXXXXX`
31339    touch $tmpfile
31340    if test ! -f $tmpfile; then
31341      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
31342    fi
31343
31344  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
31345  # $tmpfile is the local file name for the downloaded file.
31346  VALID_TOOL=no
31347  if test "x$BDEPS_FTP" = xwget; then
31348    VALID_TOOL=yes
31349    wget -O $tmpfile $with_builddeps_server/$resource
31350  fi
31351  if test "x$BDEPS_FTP" = xlftp; then
31352    VALID_TOOL=yes
31353    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
31354  fi
31355  if test "x$BDEPS_FTP" = xftp; then
31356    VALID_TOOL=yes
31357    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
31358    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
31359    FTPUSERPWD=${FTPSERVER%%@*}
31360    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
31361      FTPUSER=${userpwd%%:*}
31362      FTPPWD=${userpwd#*@}
31363      FTPSERVER=${FTPSERVER#*@}
31364    else
31365      FTPUSER=ftp
31366      FTPPWD=ftp
31367    fi
31368    # the "pass" command does not work on some
31369    # ftp clients (read ftp.exe) but if it works,
31370    # passive mode is better!
31371    ( \
31372        echo "user $FTPUSER $FTPPWD"        ; \
31373        echo "pass"                         ; \
31374        echo "bin"                          ; \
31375        echo "get $FTPPATH $tmpfile"              ; \
31376    ) | ftp -in $FTPSERVER
31377  fi
31378  if test "x$VALID_TOOL" != xyes; then
31379    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
31380  fi
31381
31382    mv $tmpfile $installdir/$filename
31383    if test ! -s $installdir/$filename; then
31384      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
31385    fi
31386    case "$extension" in
31387      zip)  echo "Unzipping $installdir/$filename..."
31388        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
31389        ;;
31390      tar.gz) echo "Untaring $installdir/$filename..."
31391        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31392        ;;
31393      tgz) echo "Untaring $installdir/$filename..."
31394        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31395        ;;
31396      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
31397        ;;
31398    esac
31399  fi
31400  if test -f $installdir/$filename.unpacked; then
31401    depdir=$installdir
31402  fi
31403
31404      fi
31405      # Source the builddeps file again, because in the previous command, the depdir
31406      # was updated to point at the current build dependency install directory.
31407      . $builddepsfile
31408      # Now extract variables from the builddeps.conf files.
31409      theroot=${builddep_freetype2_ROOT}
31410      thecflags=${builddep_freetype2_CFLAGS}
31411      thelibs=${builddep_freetype2_LIBS}
31412      if test "x$depdir" = x; then
31413        as_fn_error $? "Could not download build dependency freetype2" "$LINENO" 5
31414      fi
31415      FREETYPE2=$depdir
31416      if test "x$theroot" != x; then
31417        FREETYPE2="$theroot"
31418      fi
31419      if test "x$thecflags" != x; then
31420        FREETYPE2_CFLAGS="$thecflags"
31421      fi
31422      if test "x$thelibs" != x; then
31423        FREETYPE2_LIBS="$thelibs"
31424      fi
31425      FREETYPE2_FOUND=yes
31426      else FREETYPE2_FOUND=no
31427
31428    fi
31429    else FREETYPE2_FOUND=no
31430
31431  fi
31432
31433      USING_SYSTEM_FT_LIB=true
31434    fi
31435    if test "x$FREETYPE2_FOUND" = xno && test "x$OPENJDK_TARGET_OS" = xwindows; then
31436      FREETYPELOCATION="$PROGRAMFILES/GnuWin32"
31437
31438  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31439
31440  # Input might be given as Windows format, start by converting to
31441  # unix format.
31442  path="$FREETYPELOCATION"
31443  new_path=`$CYGPATH -u "$path"`
31444
31445  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31446  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31447  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31448  # "foo.exe" is OK but "foo" is an error.
31449  #
31450  # This test is therefore slightly more accurate than "test -f" to check for file precense.
31451  # It is also a way to make sure we got the proper file name for the real test later on.
31452  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31453  if test "x$test_shortpath" = x; then
31454    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&5
31455$as_echo "$as_me: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&6;}
31456    as_fn_error $? "Cannot locate the the path of FREETYPELOCATION" "$LINENO" 5
31457  fi
31458
31459  # Call helper function which possibly converts this using DOS-style short mode.
31460  # If so, the updated path is stored in $new_path.
31461
31462  input_path="$new_path"
31463  # Check if we need to convert this using DOS-style short mode. If the path
31464  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31465  # take no chances and rewrite it.
31466  # Note: m4 eats our [], so we need to use [ and ] instead.
31467  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31468  if test "x$has_forbidden_chars" != x; then
31469    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31470    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31471    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31472    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31473      # Going to short mode and back again did indeed matter. Since short mode is
31474      # case insensitive, let's make it lowercase to improve readability.
31475      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31476      # Now convert it back to Unix-stile (cygpath)
31477      input_path=`$CYGPATH -u "$shortmode_path"`
31478      new_path="$input_path"
31479    fi
31480  fi
31481
31482  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31483  if test "x$test_cygdrive_prefix" = x; then
31484    # As a simple fix, exclude /usr/bin since it's not a real path.
31485    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31486      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31487      # a path prefixed by /cygdrive for fixpath to work.
31488      new_path="$CYGWIN_ROOT_PATH$input_path"
31489    fi
31490  fi
31491
31492
31493  if test "x$path" != "x$new_path"; then
31494    FREETYPELOCATION="$new_path"
31495    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPELOCATION to \"$new_path\"" >&5
31496$as_echo "$as_me: Rewriting FREETYPELOCATION to \"$new_path\"" >&6;}
31497  fi
31498
31499  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31500
31501  path="$FREETYPELOCATION"
31502  has_colon=`$ECHO $path | $GREP ^.:`
31503  new_path="$path"
31504  if test "x$has_colon" = x; then
31505    # Not in mixed or Windows style, start by that.
31506    new_path=`cmd //c echo $path`
31507  fi
31508
31509
31510  input_path="$new_path"
31511  # Check if we need to convert this using DOS-style short mode. If the path
31512  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31513  # take no chances and rewrite it.
31514  # Note: m4 eats our [], so we need to use [ and ] instead.
31515  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31516  if test "x$has_forbidden_chars" != x; then
31517    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31518    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31519  fi
31520
31521
31522  windows_path="$new_path"
31523  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31524    unix_path=`$CYGPATH -u "$windows_path"`
31525    new_path="$unix_path"
31526  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31527    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31528    new_path="$unix_path"
31529  fi
31530
31531  if test "x$path" != "x$new_path"; then
31532    FREETYPELOCATION="$new_path"
31533    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPELOCATION to \"$new_path\"" >&5
31534$as_echo "$as_me: Rewriting FREETYPELOCATION to \"$new_path\"" >&6;}
31535  fi
31536
31537  # Save the first 10 bytes of this path to the storage, so fixpath can work.
31538  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31539
31540  else
31541    # We're on a posix platform. Hooray! :)
31542    path="$FREETYPELOCATION"
31543    has_space=`$ECHO "$path" | $GREP " "`
31544    if test "x$has_space" != x; then
31545      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&5
31546$as_echo "$as_me: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&6;}
31547      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31548    fi
31549
31550    # Use eval to expand a potential ~
31551    eval path="$path"
31552    if test ! -f "$path" && test ! -d "$path"; then
31553      as_fn_error $? "The path of FREETYPELOCATION, which resolves as \"$path\", is not found." "$LINENO" 5
31554    fi
31555
31556    FREETYPELOCATION="`cd "$path"; $THEPWDCMD -L`"
31557  fi
31558
31559      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype in some standard windows locations" >&5
31560$as_echo_n "checking for freetype in some standard windows locations... " >&6; }
31561      if test -s "$FREETYPELOCATION/include/ft2build.h" && test -d "$FREETYPELOCATION/include/freetype2/freetype"; then
31562        FREETYPE2_CFLAGS="-I$FREETYPELOCATION/include/freetype2 -I$FREETYPELOCATION/include"
31563        FREETYPE2_LIBS="$FREETYPELOCATION/lib/freetype.lib"
31564        FREETYPE2_LIB_PATH="$FREETYPELOCATION/lib"
31565        if ! test -s "$FREETYPE2_LIBS"; then
31566          as_fn_error $? "Could not find $FREETYPE2_LIBS" "$LINENO" 5
31567        fi
31568        if ! test -s "$FREETYPE2_LIB_PATH/freetype.dll"; then
31569          as_fn_error $? "Could not find $FREETYPE2_LIB_PATH/freetype.dll" "$LINENO" 5
31570        fi
31571        USING_SYSTEM_FT_LIB=true
31572        FREETYPE2_FOUND=yes
31573      fi
31574      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE2_FOUND" >&5
31575$as_echo "$FREETYPE2_FOUND" >&6; }
31576    fi
31577    if test "x$FREETYPE2_FOUND" = xno; then
31578
31579pkg_failed=no
31580{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE2" >&5
31581$as_echo_n "checking for FREETYPE2... " >&6; }
31582
31583if test -n "$FREETYPE2_CFLAGS"; then
31584    pkg_cv_FREETYPE2_CFLAGS="$FREETYPE2_CFLAGS"
31585 elif test -n "$PKG_CONFIG"; then
31586    if test -n "$PKG_CONFIG" && \
31587    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
31588  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
31589  ac_status=$?
31590  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31591  test $ac_status = 0; }; then
31592  pkg_cv_FREETYPE2_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
31593else
31594  pkg_failed=yes
31595fi
31596 else
31597    pkg_failed=untried
31598fi
31599if test -n "$FREETYPE2_LIBS"; then
31600    pkg_cv_FREETYPE2_LIBS="$FREETYPE2_LIBS"
31601 elif test -n "$PKG_CONFIG"; then
31602    if test -n "$PKG_CONFIG" && \
31603    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
31604  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
31605  ac_status=$?
31606  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31607  test $ac_status = 0; }; then
31608  pkg_cv_FREETYPE2_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
31609else
31610  pkg_failed=yes
31611fi
31612 else
31613    pkg_failed=untried
31614fi
31615
31616
31617
31618if test $pkg_failed = yes; then
31619
31620if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
31621        _pkg_short_errors_supported=yes
31622else
31623        _pkg_short_errors_supported=no
31624fi
31625        if test $_pkg_short_errors_supported = yes; then
31626	        FREETYPE2_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
31627        else
31628	        FREETYPE2_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
31629        fi
31630	# Put the nasty error message in config.log where it belongs
31631	echo "$FREETYPE2_PKG_ERRORS" >&5
31632
31633	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31634$as_echo "no" >&6; }
31635                FREETYPE2_FOUND=no
31636elif test $pkg_failed = untried; then
31637	FREETYPE2_FOUND=no
31638else
31639	FREETYPE2_CFLAGS=$pkg_cv_FREETYPE2_CFLAGS
31640	FREETYPE2_LIBS=$pkg_cv_FREETYPE2_LIBS
31641        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31642$as_echo "yes" >&6; }
31643	FREETYPE2_FOUND=yes
31644fi
31645      # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
31646      FREETYPE2_LIBS=`$ECHO $FREETYPE2_LIBS | $SED 's/-lz//g'`
31647      USING_SYSTEM_FT_LIB=true
31648      # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
31649      if test "x$FREETYPE2_FOUND" = xyes && test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
31650        FREETYPE2_LIBS=`$ECHO $FREETYPE2_LIBS | $SED 's?/lib?/lib/amd64?g'`
31651      fi
31652    fi
31653    if test "x$FREETYPE2_FOUND" = xno; then
31654      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype in some standard locations" >&5
31655$as_echo_n "checking for freetype in some standard locations... " >&6; }
31656
31657      if test -s $SYS_ROOT/usr/X11/include/ft2build.h && test -d $SYS_ROOT/usr/X11/include/freetype2/freetype; then
31658        DEFAULT_FREETYPE_CFLAGS="-I$SYS_ROOT/usr/X11/include/freetype2 -I$SYS_ROOT/usr/X11/include"
31659        DEFAULT_FREETYPE_LIBS="-L$SYS_ROOT/usr/X11/lib -lfreetype"
31660      fi
31661      if test -s $SYS_ROOT/usr/include/ft2build.h && test -d $SYS_ROOT/usr/include/freetype2/freetype; then
31662        DEFAULT_FREETYPE_CFLAGS="-I$SYS_ROOT/usr/include/freetype2"
31663        DEFAULT_FREETYPE_LIBS="-lfreetype"
31664      fi
31665
31666      PREV_CXXCFLAGS="$CXXFLAGS"
31667      PREV_LDFLAGS="$LDFLAGS"
31668      CXXFLAGS="$CXXFLAGS $DEFAULT_FREETYPE_CFLAGS"
31669      LDFLAGS="$LDFLAGS $DEFAULT_FREETYPE_LIBS"
31670      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31671/* end confdefs.h.  */
31672
31673            #include<ft2build.h>
31674            #include FT_FREETYPE_H
31675            int main() { return 0; }
31676
31677_ACEOF
31678if ac_fn_cxx_try_link "$LINENO"; then :
31679
31680            # Yes, the default cflags and libs did the trick.
31681            FREETYPE2_FOUND=yes
31682            FREETYPE2_CFLAGS="$DEFAULT_FREETYPE_CFLAGS"
31683            FREETYPE2_LIBS="$DEFAULT_FREETYPE_LIBS"
31684
31685else
31686
31687            FREETYPE2_FOUND=no
31688
31689
31690fi
31691rm -f core conftest.err conftest.$ac_objext \
31692    conftest$ac_exeext conftest.$ac_ext
31693      CXXCFLAGS="$PREV_CXXFLAGS"
31694      LDFLAGS="$PREV_LDFLAGS"
31695      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE2_FOUND" >&5
31696$as_echo "$FREETYPE2_FOUND" >&6; }
31697      USING_SYSTEM_FT_LIB=true
31698    fi
31699    if test "x$FREETYPE2_FOUND" = xno; then
31700
31701  # Print a helpful message on how to acquire the necessary build dependency.
31702  # freetype2 is the help tag: freetyp2, cups, pulse, alsa etc
31703  MISSING_DEPENDENCY=freetype2
31704
31705  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31706    cygwin_help $MISSING_DEPENDENCY
31707  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31708    msys_help $MISSING_DEPENDENCY
31709  else
31710    PKGHANDLER_COMMAND=
31711
31712    case $PKGHANDLER in
31713      apt-get)
31714        apt_help     $MISSING_DEPENDENCY ;;
31715      yum)
31716        yum_help     $MISSING_DEPENDENCY ;;
31717      port)
31718        port_help    $MISSING_DEPENDENCY ;;
31719      pkgutil)
31720        pkgutil_help $MISSING_DEPENDENCY ;;
31721      pkgadd)
31722        pkgadd_help  $MISSING_DEPENDENCY ;;
31723      * )
31724        break ;;
31725    esac
31726
31727    if test "x$PKGHANDLER_COMMAND" != x; then
31728      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
31729    fi
31730  fi
31731
31732      as_fn_error $? "Could not find freetype2! $HELP_MSG " "$LINENO" 5
31733    fi
31734
31735    if test "x$OPENJDK_TARGET_OS" != xwindows; then
31736      # AC_CHECK_LIB does not support use of cl.exe
31737      PREV_LDFLAGS="$LDFLAGS"
31738      LDFLAGS="$FREETYPE2_LIBS"
31739      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FT_Init_FreeType in -lfreetype" >&5
31740$as_echo_n "checking for FT_Init_FreeType in -lfreetype... " >&6; }
31741if ${ac_cv_lib_freetype_FT_Init_FreeType+:} false; then :
31742  $as_echo_n "(cached) " >&6
31743else
31744  ac_check_lib_save_LIBS=$LIBS
31745LIBS="-lfreetype  $LIBS"
31746cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31747/* end confdefs.h.  */
31748
31749/* Override any GCC internal prototype to avoid an error.
31750   Use char because int might match the return type of a GCC
31751   builtin and then its argument prototype would still apply.  */
31752#ifdef __cplusplus
31753extern "C"
31754#endif
31755char FT_Init_FreeType ();
31756int
31757main ()
31758{
31759return FT_Init_FreeType ();
31760  ;
31761  return 0;
31762}
31763_ACEOF
31764if ac_fn_cxx_try_link "$LINENO"; then :
31765  ac_cv_lib_freetype_FT_Init_FreeType=yes
31766else
31767  ac_cv_lib_freetype_FT_Init_FreeType=no
31768fi
31769rm -f core conftest.err conftest.$ac_objext \
31770    conftest$ac_exeext conftest.$ac_ext
31771LIBS=$ac_check_lib_save_LIBS
31772fi
31773{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_freetype_FT_Init_FreeType" >&5
31774$as_echo "$ac_cv_lib_freetype_FT_Init_FreeType" >&6; }
31775if test "x$ac_cv_lib_freetype_FT_Init_FreeType" = xyes; then :
31776  FREETYPE2_FOUND=true
31777else
31778  as_fn_error $? "Could not find freetype2! $HELP_MSG " "$LINENO" 5
31779fi
31780
31781      LDFLAGS="$PREV_LDFLAGS"
31782    fi
31783  fi
31784
31785
31786
31787
31788
31789
31790
31791
31792  ###############################################################################
31793  #
31794  # Check for alsa headers and libraries. Used on Linux/GNU systems.
31795  #
31796
31797# Check whether --with-alsa was given.
31798if test "${with_alsa+set}" = set; then :
31799  withval=$with_alsa;
31800fi
31801
31802
31803# Check whether --with-alsa-include was given.
31804if test "${with_alsa_include+set}" = set; then :
31805  withval=$with_alsa_include;
31806fi
31807
31808
31809# Check whether --with-alsa-lib was given.
31810if test "${with_alsa_lib+set}" = set; then :
31811  withval=$with_alsa_lib;
31812fi
31813
31814
31815  if test "x$ALSA_NOT_NEEDED" = xyes; then
31816    if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then
31817      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa is ignored" >&5
31818$as_echo "$as_me: WARNING: alsa not used, so --with-alsa is ignored" >&2;}
31819    fi
31820    ALSA_CFLAGS=
31821    ALSA_LIBS=
31822  else
31823    ALSA_FOUND=no
31824
31825    if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
31826      as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
31827    fi
31828
31829    if test "x${with_alsa}" != x; then
31830      ALSA_LIBS="-L${with_alsa}/lib -lalsa"
31831      ALSA_CFLAGS="-I${with_alsa}/include"
31832      ALSA_FOUND=yes
31833    fi
31834    if test "x${with_alsa_include}" != x; then
31835      ALSA_CFLAGS="-I${with_alsa_include}"
31836      ALSA_FOUND=yes
31837    fi
31838    if test "x${with_alsa_lib}" != x; then
31839      ALSA_LIBS="-L${with_alsa_lib} -lalsa"
31840      ALSA_FOUND=yes
31841    fi
31842    if test "x$ALSA_FOUND" = xno; then
31843
31844
31845  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
31846    # Source the builddeps file again, to make sure it uses the latest variables!
31847    . $builddepsfile
31848    # Look for a target and build machine specific resource!
31849    eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
31850    if test "x$resource" = x; then
31851      # Ok, lets instead look for a target specific resource
31852      eval resource=\${builddep_alsa_TARGET_${rewritten_target_var}}
31853    fi
31854    if test "x$resource" = x; then
31855      # Ok, lets instead look for a build specific resource
31856      eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}}
31857    fi
31858    if test "x$resource" = x; then
31859      # Ok, lets instead look for a generic resource
31860      # (The alsa comes from M4 and not the shell, thus no need for eval here.)
31861      resource=${builddep_alsa}
31862    fi
31863    if test "x$resource" != x; then
31864      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for alsa" >&5
31865$as_echo "$as_me: Using builddeps $resource for alsa" >&6;}
31866      # If the resource in the builddeps.conf file is an existing directory,
31867      # for example /java/linux/cups
31868      if test -d ${resource}; then
31869        depdir=${resource}
31870      else
31871
31872  # alsa is for example mymodule
31873  # $resource is for example libs/general/libmymod_1_2_3.zip
31874  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
31875  # $with_builddeps_dir is for example /localhome/builddeps
31876  # depdir is the name of the variable into which we store the depdir, eg MYMOD
31877  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
31878  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
31879  filename=`basename $resource`
31880  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
31881  filebase=${filename%%.*}
31882  extension=${filename#*.}
31883  installdir=$with_builddeps_dir/$filebase
31884  if test ! -f $installdir/$filename.unpacked; then
31885    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&5
31886$as_echo "$as_me: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&6;}
31887    if test ! -d $installdir; then
31888      mkdir -p $installdir
31889    fi
31890    if test ! -d $installdir; then
31891      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
31892    fi
31893    tmpfile=`mktemp $installdir/alsa.XXXXXXXXX`
31894    touch $tmpfile
31895    if test ! -f $tmpfile; then
31896      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
31897    fi
31898
31899  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
31900  # $tmpfile is the local file name for the downloaded file.
31901  VALID_TOOL=no
31902  if test "x$BDEPS_FTP" = xwget; then
31903    VALID_TOOL=yes
31904    wget -O $tmpfile $with_builddeps_server/$resource
31905  fi
31906  if test "x$BDEPS_FTP" = xlftp; then
31907    VALID_TOOL=yes
31908    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
31909  fi
31910  if test "x$BDEPS_FTP" = xftp; then
31911    VALID_TOOL=yes
31912    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
31913    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
31914    FTPUSERPWD=${FTPSERVER%%@*}
31915    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
31916      FTPUSER=${userpwd%%:*}
31917      FTPPWD=${userpwd#*@}
31918      FTPSERVER=${FTPSERVER#*@}
31919    else
31920      FTPUSER=ftp
31921      FTPPWD=ftp
31922    fi
31923    # the "pass" command does not work on some
31924    # ftp clients (read ftp.exe) but if it works,
31925    # passive mode is better!
31926    ( \
31927        echo "user $FTPUSER $FTPPWD"        ; \
31928        echo "pass"                         ; \
31929        echo "bin"                          ; \
31930        echo "get $FTPPATH $tmpfile"              ; \
31931    ) | ftp -in $FTPSERVER
31932  fi
31933  if test "x$VALID_TOOL" != xyes; then
31934    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
31935  fi
31936
31937    mv $tmpfile $installdir/$filename
31938    if test ! -s $installdir/$filename; then
31939      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
31940    fi
31941    case "$extension" in
31942      zip)  echo "Unzipping $installdir/$filename..."
31943        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
31944        ;;
31945      tar.gz) echo "Untaring $installdir/$filename..."
31946        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31947        ;;
31948      tgz) echo "Untaring $installdir/$filename..."
31949        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31950        ;;
31951      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
31952        ;;
31953    esac
31954  fi
31955  if test -f $installdir/$filename.unpacked; then
31956    depdir=$installdir
31957  fi
31958
31959      fi
31960      # Source the builddeps file again, because in the previous command, the depdir
31961      # was updated to point at the current build dependency install directory.
31962      . $builddepsfile
31963      # Now extract variables from the builddeps.conf files.
31964      theroot=${builddep_alsa_ROOT}
31965      thecflags=${builddep_alsa_CFLAGS}
31966      thelibs=${builddep_alsa_LIBS}
31967      if test "x$depdir" = x; then
31968        as_fn_error $? "Could not download build dependency alsa" "$LINENO" 5
31969      fi
31970      ALSA=$depdir
31971      if test "x$theroot" != x; then
31972        ALSA="$theroot"
31973      fi
31974      if test "x$thecflags" != x; then
31975        ALSA_CFLAGS="$thecflags"
31976      fi
31977      if test "x$thelibs" != x; then
31978        ALSA_LIBS="$thelibs"
31979      fi
31980      ALSA_FOUND=yes
31981      else ALSA_FOUND=no
31982
31983    fi
31984    else ALSA_FOUND=no
31985
31986  fi
31987
31988    fi
31989    if test "x$ALSA_FOUND" = xno; then
31990
31991pkg_failed=no
31992{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
31993$as_echo_n "checking for ALSA... " >&6; }
31994
31995if test -n "$ALSA_CFLAGS"; then
31996    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
31997 elif test -n "$PKG_CONFIG"; then
31998    if test -n "$PKG_CONFIG" && \
31999    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
32000  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
32001  ac_status=$?
32002  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32003  test $ac_status = 0; }; then
32004  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
32005else
32006  pkg_failed=yes
32007fi
32008 else
32009    pkg_failed=untried
32010fi
32011if test -n "$ALSA_LIBS"; then
32012    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
32013 elif test -n "$PKG_CONFIG"; then
32014    if test -n "$PKG_CONFIG" && \
32015    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
32016  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
32017  ac_status=$?
32018  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32019  test $ac_status = 0; }; then
32020  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
32021else
32022  pkg_failed=yes
32023fi
32024 else
32025    pkg_failed=untried
32026fi
32027
32028
32029
32030if test $pkg_failed = yes; then
32031
32032if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
32033        _pkg_short_errors_supported=yes
32034else
32035        _pkg_short_errors_supported=no
32036fi
32037        if test $_pkg_short_errors_supported = yes; then
32038	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
32039        else
32040	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
32041        fi
32042	# Put the nasty error message in config.log where it belongs
32043	echo "$ALSA_PKG_ERRORS" >&5
32044
32045	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32046$as_echo "no" >&6; }
32047                ALSA_FOUND=no
32048elif test $pkg_failed = untried; then
32049	ALSA_FOUND=no
32050else
32051	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
32052	ALSA_LIBS=$pkg_cv_ALSA_LIBS
32053        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32054$as_echo "yes" >&6; }
32055	ALSA_FOUND=yes
32056fi
32057    fi
32058    if test "x$ALSA_FOUND" = xno; then
32059      for ac_header in alsa/asoundlib.h
32060do :
32061  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
32062if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
32063  cat >>confdefs.h <<_ACEOF
32064#define HAVE_ALSA_ASOUNDLIB_H 1
32065_ACEOF
32066
32067            ALSA_FOUND=yes
32068            ALSA_CFLAGS=-Iignoreme
32069            ALSA_LIBS=-lasound
32070            DEFAULT_ALSA=yes
32071
32072else
32073  ALSA_FOUND=no
32074fi
32075
32076done
32077
32078    fi
32079    if test "x$ALSA_FOUND" = xno; then
32080
32081  # Print a helpful message on how to acquire the necessary build dependency.
32082  # alsa is the help tag: freetyp2, cups, pulse, alsa etc
32083  MISSING_DEPENDENCY=alsa
32084
32085  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32086    cygwin_help $MISSING_DEPENDENCY
32087  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32088    msys_help $MISSING_DEPENDENCY
32089  else
32090    PKGHANDLER_COMMAND=
32091
32092    case $PKGHANDLER in
32093      apt-get)
32094        apt_help     $MISSING_DEPENDENCY ;;
32095      yum)
32096        yum_help     $MISSING_DEPENDENCY ;;
32097      port)
32098        port_help    $MISSING_DEPENDENCY ;;
32099      pkgutil)
32100        pkgutil_help $MISSING_DEPENDENCY ;;
32101      pkgadd)
32102        pkgadd_help  $MISSING_DEPENDENCY ;;
32103      * )
32104        break ;;
32105    esac
32106
32107    if test "x$PKGHANDLER_COMMAND" != x; then
32108      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
32109    fi
32110  fi
32111
32112      as_fn_error $? "Could not find alsa! $HELP_MSG " "$LINENO" 5
32113    fi
32114  fi
32115
32116
32117
32118
32119
32120
32121  ###############################################################################
32122  #
32123  # Check for the jpeg library
32124  #
32125
32126  USE_EXTERNAL_LIBJPEG=true
32127  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -ljpeg" >&5
32128$as_echo_n "checking for main in -ljpeg... " >&6; }
32129if ${ac_cv_lib_jpeg_main+:} false; then :
32130  $as_echo_n "(cached) " >&6
32131else
32132  ac_check_lib_save_LIBS=$LIBS
32133LIBS="-ljpeg  $LIBS"
32134cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32135/* end confdefs.h.  */
32136
32137
32138int
32139main ()
32140{
32141return main ();
32142  ;
32143  return 0;
32144}
32145_ACEOF
32146if ac_fn_cxx_try_link "$LINENO"; then :
32147  ac_cv_lib_jpeg_main=yes
32148else
32149  ac_cv_lib_jpeg_main=no
32150fi
32151rm -f core conftest.err conftest.$ac_objext \
32152    conftest$ac_exeext conftest.$ac_ext
32153LIBS=$ac_check_lib_save_LIBS
32154fi
32155{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_main" >&5
32156$as_echo "$ac_cv_lib_jpeg_main" >&6; }
32157if test "x$ac_cv_lib_jpeg_main" = xyes; then :
32158  cat >>confdefs.h <<_ACEOF
32159#define HAVE_LIBJPEG 1
32160_ACEOF
32161
32162  LIBS="-ljpeg $LIBS"
32163
32164else
32165   USE_EXTERNAL_LIBJPEG=false
32166      { $as_echo "$as_me:${as_lineno-$LINENO}: Will use jpeg decoder bundled with the OpenJDK source" >&5
32167$as_echo "$as_me: Will use jpeg decoder bundled with the OpenJDK source" >&6;}
32168
32169fi
32170
32171
32172
32173  ###############################################################################
32174  #
32175  # Check for the gif library
32176  #
32177
32178
32179# Check whether --with-giflib was given.
32180if test "${with_giflib+set}" = set; then :
32181  withval=$with_giflib;
32182fi
32183
32184
32185
32186  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
32187$as_echo_n "checking for which giflib to use... " >&6; }
32188
32189  # default is bundled
32190  DEFAULT_GIFLIB=bundled
32191
32192  #
32193  # if user didn't specify, use DEFAULT_GIFLIB
32194  #
32195  if test "x${with_giflib}" = "x"; then
32196    with_giflib=${DEFAULT_GIFLIB}
32197  fi
32198
32199  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
32200$as_echo "${with_giflib}" >&6; }
32201
32202  if test "x${with_giflib}" = "xbundled"; then
32203    USE_EXTERNAL_LIBGIF=false
32204  elif test "x${with_giflib}" = "xsystem"; then
32205    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
32206if test "x$ac_cv_header_gif_lib_h" = xyes; then :
32207
32208else
32209   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
32210fi
32211
32212
32213    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
32214$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
32215if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
32216  $as_echo_n "(cached) " >&6
32217else
32218  ac_check_lib_save_LIBS=$LIBS
32219LIBS="-lgif  $LIBS"
32220cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32221/* end confdefs.h.  */
32222
32223/* Override any GCC internal prototype to avoid an error.
32224   Use char because int might match the return type of a GCC
32225   builtin and then its argument prototype would still apply.  */
32226#ifdef __cplusplus
32227extern "C"
32228#endif
32229char DGifGetCode ();
32230int
32231main ()
32232{
32233return DGifGetCode ();
32234  ;
32235  return 0;
32236}
32237_ACEOF
32238if ac_fn_cxx_try_link "$LINENO"; then :
32239  ac_cv_lib_gif_DGifGetCode=yes
32240else
32241  ac_cv_lib_gif_DGifGetCode=no
32242fi
32243rm -f core conftest.err conftest.$ac_objext \
32244    conftest$ac_exeext conftest.$ac_ext
32245LIBS=$ac_check_lib_save_LIBS
32246fi
32247{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
32248$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
32249if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
32250  cat >>confdefs.h <<_ACEOF
32251#define HAVE_LIBGIF 1
32252_ACEOF
32253
32254  LIBS="-lgif $LIBS"
32255
32256else
32257   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
32258fi
32259
32260
32261    USE_EXTERNAL_LIBGIF=true
32262  else
32263    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
32264  fi
32265
32266
32267  ###############################################################################
32268  #
32269  # Check for the zlib library
32270  #
32271
32272
32273# Check whether --with-zlib was given.
32274if test "${with_zlib+set}" = set; then :
32275  withval=$with_zlib;
32276fi
32277
32278
32279  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
32280$as_echo_n "checking for compress in -lz... " >&6; }
32281if ${ac_cv_lib_z_compress+:} false; then :
32282  $as_echo_n "(cached) " >&6
32283else
32284  ac_check_lib_save_LIBS=$LIBS
32285LIBS="-lz  $LIBS"
32286cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32287/* end confdefs.h.  */
32288
32289/* Override any GCC internal prototype to avoid an error.
32290   Use char because int might match the return type of a GCC
32291   builtin and then its argument prototype would still apply.  */
32292#ifdef __cplusplus
32293extern "C"
32294#endif
32295char compress ();
32296int
32297main ()
32298{
32299return compress ();
32300  ;
32301  return 0;
32302}
32303_ACEOF
32304if ac_fn_cxx_try_link "$LINENO"; then :
32305  ac_cv_lib_z_compress=yes
32306else
32307  ac_cv_lib_z_compress=no
32308fi
32309rm -f core conftest.err conftest.$ac_objext \
32310    conftest$ac_exeext conftest.$ac_ext
32311LIBS=$ac_check_lib_save_LIBS
32312fi
32313{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
32314$as_echo "$ac_cv_lib_z_compress" >&6; }
32315if test "x$ac_cv_lib_z_compress" = xyes; then :
32316   ZLIB_FOUND=yes
32317else
32318   ZLIB_FOUND=no
32319fi
32320
32321
32322  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
32323$as_echo_n "checking for which zlib to use... " >&6; }
32324
32325  DEFAULT_ZLIB=bundled
32326  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
32327    #
32328    # On macosx default is system...on others default is
32329    #
32330    DEFAULT_ZLIB=system
32331  fi
32332
32333  if test "x${ZLIB_FOUND}" != "xyes"; then
32334    #
32335    # If we don't find any system...set default to bundled
32336    #
32337    DEFAULT_ZLIB=bundled
32338  fi
32339
32340  #
32341  # If user didn't specify, use DEFAULT_ZLIB
32342  #
32343  if test "x${with_zlib}" = "x"; then
32344    with_zlib=${DEFAULT_ZLIB}
32345  fi
32346
32347  if test "x${with_zlib}" = "xbundled"; then
32348    USE_EXTERNAL_LIBZ=false
32349    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
32350$as_echo "bundled" >&6; }
32351  elif test "x${with_zlib}" = "xsystem"; then
32352    if test "x${ZLIB_FOUND}" = "xyes"; then
32353      USE_EXTERNAL_LIBZ=true
32354      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
32355$as_echo "system" >&6; }
32356    else
32357      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
32358$as_echo "system not found" >&6; }
32359      as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
32360    fi
32361  else
32362    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
32363  fi
32364
32365
32366
32367  ###############################################################################
32368  LIBZIP_CAN_USE_MMAP=true
32369
32370
32371
32372  ###############################################################################
32373  #
32374  # Check if altzone exists in time.h
32375  #
32376
32377  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32378/* end confdefs.h.  */
32379#include <time.h>
32380int
32381main ()
32382{
32383return (int)altzone;
32384  ;
32385  return 0;
32386}
32387_ACEOF
32388if ac_fn_cxx_try_link "$LINENO"; then :
32389  has_altzone=yes
32390else
32391  has_altzone=no
32392fi
32393rm -f core conftest.err conftest.$ac_objext \
32394    conftest$ac_exeext conftest.$ac_ext
32395  if test "x$has_altzone" = xyes; then
32396
32397$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
32398
32399  fi
32400
32401  ###############################################################################
32402  #
32403  # Check the maths library
32404  #
32405
32406  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
32407$as_echo_n "checking for cos in -lm... " >&6; }
32408if ${ac_cv_lib_m_cos+:} false; then :
32409  $as_echo_n "(cached) " >&6
32410else
32411  ac_check_lib_save_LIBS=$LIBS
32412LIBS="-lm  $LIBS"
32413cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32414/* end confdefs.h.  */
32415
32416/* Override any GCC internal prototype to avoid an error.
32417   Use char because int might match the return type of a GCC
32418   builtin and then its argument prototype would still apply.  */
32419#ifdef __cplusplus
32420extern "C"
32421#endif
32422char cos ();
32423int
32424main ()
32425{
32426return cos ();
32427  ;
32428  return 0;
32429}
32430_ACEOF
32431if ac_fn_cxx_try_link "$LINENO"; then :
32432  ac_cv_lib_m_cos=yes
32433else
32434  ac_cv_lib_m_cos=no
32435fi
32436rm -f core conftest.err conftest.$ac_objext \
32437    conftest$ac_exeext conftest.$ac_ext
32438LIBS=$ac_check_lib_save_LIBS
32439fi
32440{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
32441$as_echo "$ac_cv_lib_m_cos" >&6; }
32442if test "x$ac_cv_lib_m_cos" = xyes; then :
32443  cat >>confdefs.h <<_ACEOF
32444#define HAVE_LIBM 1
32445_ACEOF
32446
32447  LIBS="-lm $LIBS"
32448
32449else
32450
32451        { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
32452$as_echo "$as_me: Maths library was not found" >&6;}
32453
32454
32455fi
32456
32457
32458
32459  ###############################################################################
32460  #
32461  # Check for libdl.so
32462
32463  save_LIBS="$LIBS"
32464  LIBS=""
32465  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
32466$as_echo_n "checking for dlopen in -ldl... " >&6; }
32467if ${ac_cv_lib_dl_dlopen+:} false; then :
32468  $as_echo_n "(cached) " >&6
32469else
32470  ac_check_lib_save_LIBS=$LIBS
32471LIBS="-ldl  $LIBS"
32472cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32473/* end confdefs.h.  */
32474
32475/* Override any GCC internal prototype to avoid an error.
32476   Use char because int might match the return type of a GCC
32477   builtin and then its argument prototype would still apply.  */
32478#ifdef __cplusplus
32479extern "C"
32480#endif
32481char dlopen ();
32482int
32483main ()
32484{
32485return dlopen ();
32486  ;
32487  return 0;
32488}
32489_ACEOF
32490if ac_fn_cxx_try_link "$LINENO"; then :
32491  ac_cv_lib_dl_dlopen=yes
32492else
32493  ac_cv_lib_dl_dlopen=no
32494fi
32495rm -f core conftest.err conftest.$ac_objext \
32496    conftest$ac_exeext conftest.$ac_ext
32497LIBS=$ac_check_lib_save_LIBS
32498fi
32499{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
32500$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
32501if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
32502  cat >>confdefs.h <<_ACEOF
32503#define HAVE_LIBDL 1
32504_ACEOF
32505
32506  LIBS="-ldl $LIBS"
32507
32508fi
32509
32510  LIBDL="$LIBS"
32511
32512  LIBS="$save_LIBS"
32513
32514
32515  ###############################################################################
32516  #
32517  # statically link libstdc++ before C++ ABI is stablized on Linux unless
32518  # dynamic build is configured on command line.
32519  #
32520
32521# Check whether --with-stdc++lib was given.
32522if test "${with_stdc__lib+set}" = set; then :
32523  withval=$with_stdc__lib;
32524        if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
32525                && test "x$with_stdc__lib" != xdefault; then
32526          as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
32527        fi
32528
32529else
32530  with_stdc__lib=default
32531
32532fi
32533
32534
32535  if test "x$OPENJDK_TARGET_OS" = xlinux; then
32536    # Test if -lstdc++ works.
32537    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
32538$as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
32539    ac_ext=cpp
32540ac_cpp='$CXXCPP $CPPFLAGS'
32541ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32542ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32543ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32544
32545    OLD_CXXFLAGS="$CXXFLAGS"
32546    CXXFLAGS="$CXXFLAGS -lstdc++"
32547    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32548/* end confdefs.h.  */
32549
32550int
32551main ()
32552{
32553return 0;
32554  ;
32555  return 0;
32556}
32557_ACEOF
32558if ac_fn_cxx_try_link "$LINENO"; then :
32559  has_dynamic_libstdcxx=yes
32560else
32561  has_dynamic_libstdcxx=no
32562fi
32563rm -f core conftest.err conftest.$ac_objext \
32564    conftest$ac_exeext conftest.$ac_ext
32565    CXXFLAGS="$OLD_CXXFLAGS"
32566    ac_ext=cpp
32567ac_cpp='$CXXCPP $CPPFLAGS'
32568ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32569ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32570ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32571
32572    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
32573$as_echo "$has_dynamic_libstdcxx" >&6; }
32574
32575    # Test if stdc++ can be linked statically.
32576    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
32577$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
32578    STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
32579    ac_ext=cpp
32580ac_cpp='$CXXCPP $CPPFLAGS'
32581ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32582ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32583ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32584
32585    OLD_LIBS="$LIBS"
32586    OLD_CXX="$CXX"
32587    LIBS="$STATIC_STDCXX_FLAGS"
32588    CXX="$CC"
32589    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32590/* end confdefs.h.  */
32591
32592int
32593main ()
32594{
32595return 0;
32596  ;
32597  return 0;
32598}
32599_ACEOF
32600if ac_fn_cxx_try_link "$LINENO"; then :
32601  has_static_libstdcxx=yes
32602else
32603  has_static_libstdcxx=no
32604fi
32605rm -f core conftest.err conftest.$ac_objext \
32606    conftest$ac_exeext conftest.$ac_ext
32607    LIBS="$OLD_LIBS"
32608    CXX="$OLD_CXX"
32609    ac_ext=cpp
32610ac_cpp='$CXXCPP $CPPFLAGS'
32611ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32612ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32613ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32614
32615    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
32616$as_echo "$has_static_libstdcxx" >&6; }
32617
32618    if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
32619      as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
32620    fi
32621
32622    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
32623      as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
32624    fi
32625
32626    if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
32627      as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
32628    fi
32629
32630    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
32631$as_echo_n "checking how to link with libstdc++... " >&6; }
32632    # If dynamic was requested, it's available since it would fail above otherwise.
32633    # If dynamic wasn't requested, go with static unless it isn't available.
32634    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
32635      LIBCXX="$LIBCXX -lstdc++"
32636      LDCXX="$CXX"
32637      STATIC_CXX_SETTING="STATIC_CXX=false"
32638      { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
32639$as_echo "dynamic" >&6; }
32640    else
32641      LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
32642      LDCXX="$CC"
32643      STATIC_CXX_SETTING="STATIC_CXX=true"
32644      { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
32645$as_echo "static" >&6; }
32646    fi
32647  fi
32648
32649
32650  if test "x$JVM_VARIANT_ZERO" = xtrue || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
32651    # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
32652
32653pkg_failed=no
32654{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
32655$as_echo_n "checking for LIBFFI... " >&6; }
32656
32657if test -n "$LIBFFI_CFLAGS"; then
32658    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
32659 elif test -n "$PKG_CONFIG"; then
32660    if test -n "$PKG_CONFIG" && \
32661    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
32662  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
32663  ac_status=$?
32664  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32665  test $ac_status = 0; }; then
32666  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
32667else
32668  pkg_failed=yes
32669fi
32670 else
32671    pkg_failed=untried
32672fi
32673if test -n "$LIBFFI_LIBS"; then
32674    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
32675 elif test -n "$PKG_CONFIG"; then
32676    if test -n "$PKG_CONFIG" && \
32677    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
32678  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
32679  ac_status=$?
32680  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32681  test $ac_status = 0; }; then
32682  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
32683else
32684  pkg_failed=yes
32685fi
32686 else
32687    pkg_failed=untried
32688fi
32689
32690
32691
32692if test $pkg_failed = yes; then
32693
32694if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
32695        _pkg_short_errors_supported=yes
32696else
32697        _pkg_short_errors_supported=no
32698fi
32699        if test $_pkg_short_errors_supported = yes; then
32700	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
32701        else
32702	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
32703        fi
32704	# Put the nasty error message in config.log where it belongs
32705	echo "$LIBFFI_PKG_ERRORS" >&5
32706
32707	as_fn_error $? "Package requirements (libffi) were not met:
32708
32709$LIBFFI_PKG_ERRORS
32710
32711Consider adjusting the PKG_CONFIG_PATH environment variable if you
32712installed software in a non-standard prefix.
32713
32714Alternatively, you may set the environment variables LIBFFI_CFLAGS
32715and LIBFFI_LIBS to avoid the need to call pkg-config.
32716See the pkg-config man page for more details.
32717" "$LINENO" 5
32718elif test $pkg_failed = untried; then
32719	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32720$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32721as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
32722is in your PATH or set the PKG_CONFIG environment variable to the full
32723path to pkg-config.
32724
32725Alternatively, you may set the environment variables LIBFFI_CFLAGS
32726and LIBFFI_LIBS to avoid the need to call pkg-config.
32727See the pkg-config man page for more details.
32728
32729To get pkg-config, see <http://pkg-config.freedesktop.org/>.
32730See \`config.log' for more details" "$LINENO" 5; }
32731else
32732	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
32733	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
32734        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32735$as_echo "yes" >&6; }
32736	:
32737fi
32738
32739  fi
32740
32741  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
32742    # Extract the first word of "llvm-config", so it can be a program name with args.
32743set dummy llvm-config; ac_word=$2
32744{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32745$as_echo_n "checking for $ac_word... " >&6; }
32746if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
32747  $as_echo_n "(cached) " >&6
32748else
32749  if test -n "$LLVM_CONFIG"; then
32750  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
32751else
32752as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32753for as_dir in $PATH
32754do
32755  IFS=$as_save_IFS
32756  test -z "$as_dir" && as_dir=.
32757    for ac_exec_ext in '' $ac_executable_extensions; do
32758  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32759    ac_cv_prog_LLVM_CONFIG="llvm-config"
32760    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32761    break 2
32762  fi
32763done
32764  done
32765IFS=$as_save_IFS
32766
32767fi
32768fi
32769LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
32770if test -n "$LLVM_CONFIG"; then
32771  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
32772$as_echo "$LLVM_CONFIG" >&6; }
32773else
32774  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32775$as_echo "no" >&6; }
32776fi
32777
32778
32779
32780    if test "x$LLVM_CONFIG" != xllvm-config; then
32781      as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
32782    fi
32783
32784    llvm_components="jit mcjit engine nativecodegen native"
32785    unset LLVM_CFLAGS
32786    for flag in $("$LLVM_CONFIG" --cxxflags); do
32787      if echo "${flag}" | grep -q '^-[ID]'; then
32788        if test "${flag}" != "-D_DEBUG" ; then
32789          if test "${LLVM_CFLAGS}" != "" ; then
32790            LLVM_CFLAGS="${LLVM_CFLAGS} "
32791          fi
32792          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
32793        fi
32794      fi
32795    done
32796    llvm_version=$("${LLVM_CONFIG}" --version | sed 's/\.//; s/svn.*//')
32797    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
32798
32799    unset LLVM_LDFLAGS
32800    for flag in $("${LLVM_CONFIG}" --ldflags); do
32801      if echo "${flag}" | grep -q '^-L'; then
32802        if test "${LLVM_LDFLAGS}" != ""; then
32803          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
32804        fi
32805        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
32806      fi
32807    done
32808
32809    unset LLVM_LIBS
32810    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
32811      if echo "${flag}" | grep -q '^-l'; then
32812        if test "${LLVM_LIBS}" != ""; then
32813          LLVM_LIBS="${LLVM_LIBS} "
32814        fi
32815        LLVM_LIBS="${LLVM_LIBS}${flag}"
32816      fi
32817    done
32818
32819
32820
32821
32822  fi
32823
32824  # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
32825  if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$LIBCXX" = x; then
32826    LIBCXX="/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
32827  fi
32828
32829  # TODO better (platform agnostic) test
32830  if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$GCC" = xyes; then
32831    LIBCXX="-lstdc++"
32832  fi
32833
32834
32835
32836
32837# After we have toolchain and the paths to all libraries (needed by msys), we can compile the fixpath helper
32838
32839  # When using cygwin or msys, we need a wrapper binary that renames
32840  # /cygdrive/c/ arguments into c:/ arguments and peeks into
32841  # @files and rewrites these too! This wrapper binary is
32842  # called fixpath.
32843  FIXPATH=
32844  if test "x$OPENJDK_BUILD_OS" = xwindows; then
32845    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
32846$as_echo_n "checking if fixpath can be created... " >&6; }
32847    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
32848    FIXPATH_BIN="$OUTPUT_ROOT/fixpath.exe"
32849    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
32850      FIXPATH_SRC=`$CYGPATH -m $FIXPATH_SRC`
32851      FIXPATH_BIN=`$CYGPATH -m $FIXPATH_BIN`
32852      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
32853      FIXPATH="$OUTPUT_ROOT/fixpath.exe -c"
32854    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
32855      FIXPATH_SRC=`cmd //c echo $FIXPATH_SRC`
32856      FIXPATH_BIN=`cmd //c echo $FIXPATH_BIN`
32857
32858      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
32859      # @ was chosen as separator to minimize risk of other tools messing around with it
32860      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" | tr ' ' '\n' | grep '^/./' | sort | uniq`
32861      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
32862
32863      FIXPATH="$OUTPUT_ROOT/fixpath -m$fixpath_argument_list"
32864    fi
32865    rm -f $OUTPUT_ROOT/fixpath*
32866    cd $OUTPUT_ROOT
32867    $CC $FIXPATH_SRC -Fe$FIXPATH_BIN > $OUTPUT_ROOT/fixpath1.log 2>&1
32868    cd $CURDIR
32869
32870    if test ! -x $OUTPUT_ROOT/fixpath.exe; then
32871      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32872$as_echo "no" >&6; }
32873      cat $OUTPUT_ROOT/fixpath1.log
32874      as_fn_error $? "Could not create $OUTPUT_ROOT/fixpath.exe" "$LINENO" 5
32875    fi
32876    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32877$as_echo "yes" >&6; }
32878    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
32879$as_echo_n "checking if fixpath.exe works... " >&6; }
32880    cd $OUTPUT_ROOT
32881    $FIXPATH $CC $SRC_ROOT/common/src/fixpath.c -Fe$OUTPUT_ROOT/fixpath2.exe > $OUTPUT_ROOT/fixpath2.log 2>&1
32882    cd $CURDIR
32883    if test ! -x $OUTPUT_ROOT/fixpath2.exe; then
32884      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32885$as_echo "no" >&6; }
32886      cat $OUTPUT_ROOT/fixpath2.log
32887      as_fn_error $? "fixpath did not work!" "$LINENO" 5
32888    fi
32889    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32890$as_echo "yes" >&6; }
32891    rm -f $OUTPUT_ROOT/fixpath?.??? $OUTPUT_ROOT/fixpath.obj
32892  fi
32893
32894
32895
32896
32897###############################################################################
32898#
32899# We need to do some final tweaking, when everything else is done.
32900#
32901###############################################################################
32902
32903
32904  HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
32905
32906
32907  # The name of the Service Agent jar.
32908  SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
32909  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
32910    SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
32911  fi
32912
32913
32914
32915    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
32916$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
32917
32918    if test -d "${SRC_ROOT}/jdk/src/share/native/sun/security/ec/impl"; then
32919      ENABLE_INTREE_EC=yes
32920      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32921$as_echo "yes" >&6; }
32922    else
32923      ENABLE_INTREE_EC=no
32924      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32925$as_echo "no" >&6; }
32926    fi
32927
32928
32929
32930
32931###############################################################################
32932#
32933# Configure parts of the build that only affect the build performance,
32934# not the result.
32935#
32936###############################################################################
32937
32938
32939  # How many cores do we have on this build system?
32940
32941# Check whether --with-num-cores was given.
32942if test "${with_num_cores+set}" = set; then :
32943  withval=$with_num_cores;
32944fi
32945
32946  if test "x$with_num_cores" = x; then
32947    # The number of cores were not specified, try to probe them.
32948
32949  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
32950$as_echo_n "checking for number of cores... " >&6; }
32951  NUM_CORES=1
32952  FOUND_CORES=no
32953
32954  if test -f /proc/cpuinfo; then
32955    # Looks like a Linux (or cygwin) system
32956    NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
32957    FOUND_CORES=yes
32958  elif test -x /usr/sbin/psrinfo; then
32959    # Looks like a Solaris system
32960    NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
32961    FOUND_CORES=yes
32962  elif test -x /usr/sbin/system_profiler; then
32963    # Looks like a MacOSX system
32964    NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print $5}'`
32965    FOUND_CORES=yes
32966  elif test -n "$NUMBER_OF_PROCESSORS"; then
32967    # On windows, look in the env
32968    NUM_CORES=$NUMBER_OF_PROCESSORS
32969    FOUND_CORES=yes
32970  fi
32971
32972  if test "x$FOUND_CORES" = xyes; then
32973    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
32974$as_echo "$NUM_CORES" >&6; }
32975  else
32976    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
32977$as_echo "could not detect number of cores, defaulting to 1" >&6; }
32978    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
32979$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
32980  fi
32981
32982  else
32983    NUM_CORES=$with_num_cores
32984  fi
32985
32986
32987
32988  # How much memory do we have on this build system?
32989
32990# Check whether --with-memory-size was given.
32991if test "${with_memory_size+set}" = set; then :
32992  withval=$with_memory_size;
32993fi
32994
32995  if test "x$with_memory_size" = x; then
32996    # The memory size was not specified, try to probe it.
32997
32998  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
32999$as_echo_n "checking for memory size... " >&6; }
33000  # Default to 1024 MB
33001  MEMORY_SIZE=1024
33002  FOUND_MEM=no
33003
33004  if test -f /proc/meminfo; then
33005    # Looks like a Linux (or cygwin) system
33006    MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
33007    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
33008    FOUND_MEM=yes
33009  elif test -x /usr/sbin/prtconf; then
33010    # Looks like a Solaris system
33011    MEMORY_SIZE=`/usr/sbin/prtconf | grep "Memory size" | awk '{ print $3 }'`
33012    FOUND_MEM=yes
33013  elif test -x /usr/sbin/system_profiler; then
33014    # Looks like a MacOSX system
33015    MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print $2}'`
33016    MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
33017    FOUND_MEM=yes
33018  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
33019    # Windows, but without cygwin
33020    MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
33021    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
33022    FOUND_MEM=yes
33023  fi
33024
33025  if test "x$FOUND_MEM" = xyes; then
33026    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
33027$as_echo "$MEMORY_SIZE MB" >&6; }
33028  else
33029    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to 1024 MB" >&5
33030$as_echo "could not detect memory size, defaulting to 1024 MB" >&6; }
33031    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
33032$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
33033  fi
33034
33035  else
33036    MEMORY_SIZE=$with_memory_size
33037  fi
33038
33039
33040
33041  # Provide a decent default number of parallel jobs for make depending on
33042  # number of cores, amount of memory and machine architecture.
33043
33044# Check whether --with-jobs was given.
33045if test "${with_jobs+set}" = set; then :
33046  withval=$with_jobs;
33047fi
33048
33049  if test "x$with_jobs" = x; then
33050    # Number of jobs was not specified, calculate.
33051    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
33052$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
33053    # Approximate memory in GB, rounding up a bit.
33054    memory_gb=`expr $MEMORY_SIZE / 1100`
33055    # Pick the lowest of memory in gb and number of cores.
33056    if test "$memory_gb" -lt "$NUM_CORES"; then
33057      JOBS="$memory_gb"
33058    else
33059      JOBS="$NUM_CORES"
33060      # On bigger machines, leave some room for other processes to run
33061      if test "$JOBS" -gt "4"; then
33062        JOBS=`expr $JOBS '*' 90 / 100`
33063      fi
33064    fi
33065    # Cap number of jobs to 16
33066    if test "$JOBS" -gt "16"; then
33067      JOBS=16
33068    fi
33069    if test "$JOBS" -eq "0"; then
33070      JOBS=1
33071    fi
33072    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
33073$as_echo "$JOBS" >&6; }
33074  else
33075    JOBS=$with_jobs
33076  fi
33077
33078
33079
33080# Setup smart javac (after cores and memory have been setup)
33081
33082
33083# Check whether --with-sjavac-server-java was given.
33084if test "${with_sjavac_server_java+set}" = set; then :
33085  withval=$with_sjavac_server_java;
33086fi
33087
33088
33089  if test "x$with_sjavac_server_java" != x; then
33090    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
33091    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
33092    if test "x$FOUND_VERSION" = x; then
33093      as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
33094    fi
33095  else
33096    SJAVAC_SERVER_JAVA=""
33097    # Hotspot specific options.
33098
33099  $ECHO "Check if jvm arg is ok: -verbosegc" >&5
33100  $ECHO "Command: $JAVA -verbosegc -version" >&5
33101  OUTPUT=`$JAVA -verbosegc -version 2>&1`
33102  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33103  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33104  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33105    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -verbosegc"
33106    JVM_ARG_OK=true
33107  else
33108    $ECHO "Arg failed:" >&5
33109    $ECHO "$OUTPUT" >&5
33110    JVM_ARG_OK=false
33111  fi
33112
33113    # JRockit specific options.
33114
33115  $ECHO "Check if jvm arg is ok: -Xverbose:gc" >&5
33116  $ECHO "Command: $JAVA -Xverbose:gc -version" >&5
33117  OUTPUT=`$JAVA -Xverbose:gc -version 2>&1`
33118  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33119  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33120  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33121    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xverbose:gc"
33122    JVM_ARG_OK=true
33123  else
33124    $ECHO "Arg failed:" >&5
33125    $ECHO "$OUTPUT" >&5
33126    JVM_ARG_OK=false
33127  fi
33128
33129    SJAVAC_SERVER_JAVA="$JAVA $SJAVAC_SERVER_JAVA"
33130  fi
33131
33132
33133  if test "$MEMORY_SIZE" -gt "2500"; then
33134
33135  $ECHO "Check if jvm arg is ok: -d64" >&5
33136  $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
33137  OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
33138  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33139  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33140  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33141    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
33142    JVM_ARG_OK=true
33143  else
33144    $ECHO "Arg failed:" >&5
33145    $ECHO "$OUTPUT" >&5
33146    JVM_ARG_OK=false
33147  fi
33148
33149    if test "$JVM_ARG_OK" = true; then
33150      JVM_64BIT=true
33151      JVM_ARG_OK=false
33152    fi
33153  fi
33154
33155  if test "$JVM_64BIT" = true; then
33156    if test "$MEMORY_SIZE" -gt "17000"; then
33157
33158  $ECHO "Check if jvm arg is ok: -Xms10G -Xmx10G" >&5
33159  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version" >&5
33160  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version 2>&1`
33161  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33162  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33163  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33164    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G"
33165    JVM_ARG_OK=true
33166  else
33167    $ECHO "Arg failed:" >&5
33168    $ECHO "$OUTPUT" >&5
33169    JVM_ARG_OK=false
33170  fi
33171
33172    fi
33173    if test "$MEMORY_SIZE" -gt "10000" && test "$JVM_ARG_OK" = false; then
33174
33175  $ECHO "Check if jvm arg is ok: -Xms6G -Xmx6G" >&5
33176  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version" >&5
33177  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version 2>&1`
33178  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33179  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33180  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33181    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G"
33182    JVM_ARG_OK=true
33183  else
33184    $ECHO "Arg failed:" >&5
33185    $ECHO "$OUTPUT" >&5
33186    JVM_ARG_OK=false
33187  fi
33188
33189    fi
33190    if test "$MEMORY_SIZE" -gt "5000" && test "$JVM_ARG_OK" = false; then
33191
33192  $ECHO "Check if jvm arg is ok: -Xms1G -Xmx3G" >&5
33193  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version" >&5
33194  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version 2>&1`
33195  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33196  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33197  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33198    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G"
33199    JVM_ARG_OK=true
33200  else
33201    $ECHO "Arg failed:" >&5
33202    $ECHO "$OUTPUT" >&5
33203    JVM_ARG_OK=false
33204  fi
33205
33206    fi
33207    if test "$MEMORY_SIZE" -gt "3800" && test "$JVM_ARG_OK" = false; then
33208
33209  $ECHO "Check if jvm arg is ok: -Xms1G -Xmx2500M" >&5
33210  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version" >&5
33211  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version 2>&1`
33212  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33213  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33214  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33215    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M"
33216    JVM_ARG_OK=true
33217  else
33218    $ECHO "Arg failed:" >&5
33219    $ECHO "$OUTPUT" >&5
33220    JVM_ARG_OK=false
33221  fi
33222
33223    fi
33224  fi
33225  if test "$MEMORY_SIZE" -gt "2500" && test "$JVM_ARG_OK" = false; then
33226
33227  $ECHO "Check if jvm arg is ok: -Xms1000M -Xmx1500M" >&5
33228  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M -version" >&5
33229  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M -version 2>&1`
33230  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33231  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33232  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33233    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M"
33234    JVM_ARG_OK=true
33235  else
33236    $ECHO "Arg failed:" >&5
33237    $ECHO "$OUTPUT" >&5
33238    JVM_ARG_OK=false
33239  fi
33240
33241  fi
33242  if test "$MEMORY_SIZE" -gt "1000" && test "$JVM_ARG_OK" = false; then
33243
33244  $ECHO "Check if jvm arg is ok: -Xms400M -Xmx1100M" >&5
33245  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version" >&5
33246  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version 2>&1`
33247  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33248  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33249  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33250    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M"
33251    JVM_ARG_OK=true
33252  else
33253    $ECHO "Arg failed:" >&5
33254    $ECHO "$OUTPUT" >&5
33255    JVM_ARG_OK=false
33256  fi
33257
33258  fi
33259  if test "$JVM_ARG_OK" = false; then
33260
33261  $ECHO "Check if jvm arg is ok: -Xms256M -Xmx512M" >&5
33262  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version" >&5
33263  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version 2>&1`
33264  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33265  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33266  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33267    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M"
33268    JVM_ARG_OK=true
33269  else
33270    $ECHO "Arg failed:" >&5
33271    $ECHO "$OUTPUT" >&5
33272    JVM_ARG_OK=false
33273  fi
33274
33275  fi
33276
33277  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
33278$as_echo_n "checking whether to use sjavac... " >&6; }
33279  # Check whether --enable-sjavac was given.
33280if test "${enable_sjavac+set}" = set; then :
33281  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
33282else
33283  ENABLE_SJAVAC='no'
33284fi
33285
33286  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
33287$as_echo "$ENABLE_SJAVAC" >&6; }
33288
33289
33290  if test "x$ENABLE_SJAVAC" = xyes; then
33291    SJAVAC_SERVER_DIR="$OUTPUT_ROOT/javacservers"
33292  else
33293    SJAVAC_SERVER_DIR=
33294  fi
33295
33296
33297
33298# Can the C/C++ compiler use precompiled headers?
33299
33300
33301  ###############################################################################
33302  #
33303  # Can the C/C++ compiler use precompiled headers?
33304  #
33305  # Check whether --enable-precompiled-headers was given.
33306if test "${enable_precompiled_headers+set}" = set; then :
33307  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
33308else
33309  ENABLE_PRECOMPH=yes
33310fi
33311
33312
33313  USE_PRECOMPILED_HEADER=1
33314  if test "x$ENABLE_PRECOMPH" = xno; then
33315    USE_PRECOMPILED_HEADER=0
33316  fi
33317
33318  if test "x$ENABLE_PRECOMPH" = xyes; then
33319    # Check that the compiler actually supports precomp headers.
33320    if test "x$GCC" = xyes; then
33321      { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
33322$as_echo_n "checking that precompiled headers work... " >&6; }
33323      echo "int alfa();" > conftest.h
33324      $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
33325      if test ! -f conftest.hpp.gch; then
33326        USE_PRECOMPILED_HEADER=0
33327        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33328$as_echo "no" >&6; }
33329      else
33330        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
33331$as_echo "yes" >&6; }
33332      fi
33333      rm -f conftest.h conftest.hpp.gch
33334    fi
33335  fi
33336
33337
33338
33339
33340# Setup use of ccache, if available
33341
33342  # Check whether --enable-ccache was given.
33343if test "${enable_ccache+set}" = set; then :
33344  enableval=$enable_ccache; ENABLE_CCACHE=${enable_ccache}
33345else
33346  ENABLE_CCACHE=yes
33347fi
33348
33349  if test "x$ENABLE_CCACHE" = xyes; then
33350    OLD_PATH="$PATH"
33351    if test "x$TOOLS_DIR" != x; then
33352      PATH=$TOOLS_DIR:$PATH
33353    fi
33354    # Extract the first word of "ccache", so it can be a program name with args.
33355set dummy ccache; ac_word=$2
33356{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33357$as_echo_n "checking for $ac_word... " >&6; }
33358if ${ac_cv_path_CCACHE+:} false; then :
33359  $as_echo_n "(cached) " >&6
33360else
33361  case $CCACHE in
33362  [\\/]* | ?:[\\/]*)
33363  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
33364  ;;
33365  *)
33366  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33367for as_dir in $PATH
33368do
33369  IFS=$as_save_IFS
33370  test -z "$as_dir" && as_dir=.
33371    for ac_exec_ext in '' $ac_executable_extensions; do
33372  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33373    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
33374    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33375    break 2
33376  fi
33377done
33378  done
33379IFS=$as_save_IFS
33380
33381  ;;
33382esac
33383fi
33384CCACHE=$ac_cv_path_CCACHE
33385if test -n "$CCACHE"; then
33386  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
33387$as_echo "$CCACHE" >&6; }
33388else
33389  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33390$as_echo "no" >&6; }
33391fi
33392
33393
33394    PATH="$OLD_PATH"
33395  else
33396    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ccache" >&5
33397$as_echo_n "checking for ccache... " >&6; }
33398    { $as_echo "$as_me:${as_lineno-$LINENO}: result: explicitly disabled" >&5
33399$as_echo "explicitly disabled" >&6; }
33400    CCACHE=
33401  fi
33402
33403
33404
33405# Check whether --with-ccache-dir was given.
33406if test "${with_ccache_dir+set}" = set; then :
33407  withval=$with_ccache_dir;
33408fi
33409
33410
33411  if test "x$with_ccache_dir" != x; then
33412    # When using a non home ccache directory, assume the use is to share ccache files
33413    # with other users. Thus change the umask.
33414    SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
33415  fi
33416  CCACHE_FOUND=""
33417  if test "x$CCACHE" != x; then
33418
33419  if test "x$CCACHE" != x; then
33420    CCACHE_FOUND="true"
33421    # Only use ccache if it is 3.1.4 or later, which supports
33422    # precompiled headers.
33423    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ccache supports precompiled headers" >&5
33424$as_echo_n "checking if ccache supports precompiled headers... " >&6; }
33425    HAS_GOOD_CCACHE=`($CCACHE --version | head -n 1 | grep -E 3.1.[456789]) 2> /dev/null`
33426    if test "x$HAS_GOOD_CCACHE" = x; then
33427      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccache" >&5
33428$as_echo "no, disabling ccache" >&6; }
33429      CCACHE=
33430    else
33431      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
33432$as_echo "yes" >&6; }
33433      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
33434$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
33435      PUSHED_FLAGS="$CXXFLAGS"
33436      CXXFLAGS="-fpch-preprocess $CXXFLAGS"
33437      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33438/* end confdefs.h.  */
33439
33440int
33441main ()
33442{
33443
33444  ;
33445  return 0;
33446}
33447_ACEOF
33448if ac_fn_cxx_try_compile "$LINENO"; then :
33449  CC_KNOWS_CCACHE_TRICK=yes
33450else
33451  CC_KNOWS_CCACHE_TRICK=no
33452fi
33453rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33454      CXXFLAGS="$PUSHED_FLAGS"
33455      if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
33456        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
33457$as_echo "yes" >&6; }
33458      else
33459        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccaching of precompiled headers" >&5
33460$as_echo "no, disabling ccaching of precompiled headers" >&6; }
33461        CCACHE=
33462      fi
33463    fi
33464  fi
33465
33466  if test "x$CCACHE" != x; then
33467    CCACHE_SLOPPINESS=time_macros
33468    CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS $CCACHE"
33469    CCACHE_FLAGS=-fpch-preprocess
33470
33471    if test "x$SET_CCACHE_DIR" != x; then
33472      mkdir -p $CCACHE_DIR > /dev/null 2>&1
33473      chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
33474    fi
33475  fi
33476
33477  fi
33478
33479
33480###############################################################################
33481#
33482# And now the finish...
33483#
33484###############################################################################
33485
33486# Check for some common pitfalls
33487
33488  if test x"$OPENJDK_BUILD_OS" = xwindows; then
33489    file_to_test="$SRC_ROOT/LICENSE"
33490    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
33491      as_fn_error $? "Bad file permissions on src files. This is usually caused by cloning the repositories with a non cygwin hg in a directory not created in cygwin." "$LINENO" 5
33492    fi
33493  fi
33494
33495
33496  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
33497$as_echo_n "checking if build directory is on local disk... " >&6; }
33498
33499  # df -l lists only local disks; if the given directory is not found then
33500  # a non-zero exit code is given
33501  if test "x$DF" = x; then
33502    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33503      # msys does not have df; use Windows "net use" instead.
33504      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
33505      if test "x$IS_NETWORK_DISK" = x; then
33506        OUTPUT_DIR_IS_LOCAL="yes"
33507      else
33508        OUTPUT_DIR_IS_LOCAL="no"
33509      fi
33510    else
33511      # No df here, say it's local
33512      OUTPUT_DIR_IS_LOCAL="yes"
33513    fi
33514  else
33515    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
33516      OUTPUT_DIR_IS_LOCAL="yes"
33517    else
33518      OUTPUT_DIR_IS_LOCAL="no"
33519    fi
33520  fi
33521
33522  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
33523$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
33524
33525
33526
33527  # Check if the user has any old-style ALT_ variables set.
33528  FOUND_ALT_VARIABLES=`env | grep ^ALT_`
33529
33530  # Before generating output files, test if they exist. If they do, this is a reconfigure.
33531  # Since we can't properly handle the dependencies for this, warn the user about the situation
33532  if test -e $OUTPUT_ROOT/spec.gmk; then
33533    IS_RECONFIGURE=yes
33534  else
33535    IS_RECONFIGURE=no
33536  fi
33537
33538  if test -e $SRC_ROOT/build/.hide-configure-performance-hints; then
33539    HIDE_PERFORMANCE_HINTS=yes
33540  else
33541    HIDE_PERFORMANCE_HINTS=no
33542    # Hide it the next time around...
33543    $TOUCH $SRC_ROOT/build/.hide-configure-performance-hints > /dev/null 2>&1
33544  fi
33545
33546
33547# At the end, call the custom hook. (Dummy macro if no custom sources available)
33548
33549
33550# We're messing a bit with internal autoconf variables to put the config.status
33551# in the output directory instead of the current directory.
33552CONFIG_STATUS="$OUTPUT_ROOT/config.status"
33553
33554# Create the actual output files. Now the main work of configure is done.
33555cat >confcache <<\_ACEOF
33556# This file is a shell script that caches the results of configure
33557# tests run on this system so they can be shared between configure
33558# scripts and configure runs, see configure's option --config-cache.
33559# It is not useful on other systems.  If it contains results you don't
33560# want to keep, you may remove or edit it.
33561#
33562# config.status only pays attention to the cache file if you give it
33563# the --recheck option to rerun configure.
33564#
33565# `ac_cv_env_foo' variables (set or unset) will be overridden when
33566# loading this file, other *unset* `ac_cv_foo' will be assigned the
33567# following values.
33568
33569_ACEOF
33570
33571# The following way of writing the cache mishandles newlines in values,
33572# but we know of no workaround that is simple, portable, and efficient.
33573# So, we kill variables containing newlines.
33574# Ultrix sh set writes to stderr and can't be redirected directly,
33575# and sets the high bit in the cache file unless we assign to the vars.
33576(
33577  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
33578    eval ac_val=\$$ac_var
33579    case $ac_val in #(
33580    *${as_nl}*)
33581      case $ac_var in #(
33582      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
33583$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
33584      esac
33585      case $ac_var in #(
33586      _ | IFS | as_nl) ;; #(
33587      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
33588      *) { eval $ac_var=; unset $ac_var;} ;;
33589      esac ;;
33590    esac
33591  done
33592
33593  (set) 2>&1 |
33594    case $as_nl`(ac_space=' '; set) 2>&1` in #(
33595    *${as_nl}ac_space=\ *)
33596      # `set' does not quote correctly, so add quotes: double-quote
33597      # substitution turns \\\\ into \\, and sed turns \\ into \.
33598      sed -n \
33599	"s/'/'\\\\''/g;
33600	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
33601      ;; #(
33602    *)
33603      # `set' quotes correctly as required by POSIX, so do not add quotes.
33604      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
33605      ;;
33606    esac |
33607    sort
33608) |
33609  sed '
33610     /^ac_cv_env_/b end
33611     t clear
33612     :clear
33613     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
33614     t end
33615     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
33616     :end' >>confcache
33617if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
33618  if test -w "$cache_file"; then
33619    if test "x$cache_file" != "x/dev/null"; then
33620      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
33621$as_echo "$as_me: updating cache $cache_file" >&6;}
33622      if test ! -f "$cache_file" || test -h "$cache_file"; then
33623	cat confcache >"$cache_file"
33624      else
33625        case $cache_file in #(
33626        */* | ?:*)
33627	  mv -f confcache "$cache_file"$$ &&
33628	  mv -f "$cache_file"$$ "$cache_file" ;; #(
33629        *)
33630	  mv -f confcache "$cache_file" ;;
33631	esac
33632      fi
33633    fi
33634  else
33635    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
33636$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
33637  fi
33638fi
33639rm -f confcache
33640
33641test "x$prefix" = xNONE && prefix=$ac_default_prefix
33642# Let make expand exec_prefix.
33643test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
33644
33645DEFS=-DHAVE_CONFIG_H
33646
33647ac_libobjs=
33648ac_ltlibobjs=
33649U=
33650for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
33651  # 1. Remove the extension, and $U if already installed.
33652  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
33653  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
33654  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
33655  #    will be set to the directory where LIBOBJS objects are built.
33656  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
33657  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
33658done
33659LIBOBJS=$ac_libobjs
33660
33661LTLIBOBJS=$ac_ltlibobjs
33662
33663
33664
33665: "${CONFIG_STATUS=./config.status}"
33666ac_write_fail=0
33667ac_clean_files_save=$ac_clean_files
33668ac_clean_files="$ac_clean_files $CONFIG_STATUS"
33669{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
33670$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
33671as_write_fail=0
33672cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
33673#! $SHELL
33674# Generated by $as_me.
33675# Run this file to recreate the current configuration.
33676# Compiler output produced by configure, useful for debugging
33677# configure, is in config.log if it exists.
33678
33679debug=false
33680ac_cs_recheck=false
33681ac_cs_silent=false
33682
33683SHELL=\${CONFIG_SHELL-$SHELL}
33684export SHELL
33685_ASEOF
33686cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
33687## -------------------- ##
33688## M4sh Initialization. ##
33689## -------------------- ##
33690
33691# Be more Bourne compatible
33692DUALCASE=1; export DUALCASE # for MKS sh
33693if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
33694  emulate sh
33695  NULLCMD=:
33696  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
33697  # is contrary to our usage.  Disable this feature.
33698  alias -g '${1+"$@"}'='"$@"'
33699  setopt NO_GLOB_SUBST
33700else
33701  case `(set -o) 2>/dev/null` in #(
33702  *posix*) :
33703    set -o posix ;; #(
33704  *) :
33705     ;;
33706esac
33707fi
33708
33709
33710as_nl='
33711'
33712export as_nl
33713# Printing a long string crashes Solaris 7 /usr/bin/printf.
33714as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
33715as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
33716as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
33717# Prefer a ksh shell builtin over an external printf program on Solaris,
33718# but without wasting forks for bash or zsh.
33719if test -z "$BASH_VERSION$ZSH_VERSION" \
33720    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
33721  as_echo='print -r --'
33722  as_echo_n='print -rn --'
33723elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
33724  as_echo='printf %s\n'
33725  as_echo_n='printf %s'
33726else
33727  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
33728    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
33729    as_echo_n='/usr/ucb/echo -n'
33730  else
33731    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
33732    as_echo_n_body='eval
33733      arg=$1;
33734      case $arg in #(
33735      *"$as_nl"*)
33736	expr "X$arg" : "X\\(.*\\)$as_nl";
33737	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
33738      esac;
33739      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
33740    '
33741    export as_echo_n_body
33742    as_echo_n='sh -c $as_echo_n_body as_echo'
33743  fi
33744  export as_echo_body
33745  as_echo='sh -c $as_echo_body as_echo'
33746fi
33747
33748# The user is always right.
33749if test "${PATH_SEPARATOR+set}" != set; then
33750  PATH_SEPARATOR=:
33751  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
33752    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
33753      PATH_SEPARATOR=';'
33754  }
33755fi
33756
33757
33758# IFS
33759# We need space, tab and new line, in precisely that order.  Quoting is
33760# there to prevent editors from complaining about space-tab.
33761# (If _AS_PATH_WALK were called with IFS unset, it would disable word
33762# splitting by setting IFS to empty value.)
33763IFS=" ""	$as_nl"
33764
33765# Find who we are.  Look in the path if we contain no directory separator.
33766as_myself=
33767case $0 in #((
33768  *[\\/]* ) as_myself=$0 ;;
33769  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33770for as_dir in $PATH
33771do
33772  IFS=$as_save_IFS
33773  test -z "$as_dir" && as_dir=.
33774    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
33775  done
33776IFS=$as_save_IFS
33777
33778     ;;
33779esac
33780# We did not find ourselves, most probably we were run as `sh COMMAND'
33781# in which case we are not to be found in the path.
33782if test "x$as_myself" = x; then
33783  as_myself=$0
33784fi
33785if test ! -f "$as_myself"; then
33786  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
33787  exit 1
33788fi
33789
33790# Unset variables that we do not need and which cause bugs (e.g. in
33791# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
33792# suppresses any "Segmentation fault" message there.  '((' could
33793# trigger a bug in pdksh 5.2.14.
33794for as_var in BASH_ENV ENV MAIL MAILPATH
33795do eval test x\${$as_var+set} = xset \
33796  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
33797done
33798PS1='$ '
33799PS2='> '
33800PS4='+ '
33801
33802# NLS nuisances.
33803LC_ALL=C
33804export LC_ALL
33805LANGUAGE=C
33806export LANGUAGE
33807
33808# CDPATH.
33809(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
33810
33811
33812# as_fn_error STATUS ERROR [LINENO LOG_FD]
33813# ----------------------------------------
33814# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
33815# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
33816# script with STATUS, using 1 if that was 0.
33817as_fn_error ()
33818{
33819  as_status=$1; test $as_status -eq 0 && as_status=1
33820  if test "$4"; then
33821    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
33822    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
33823  fi
33824  $as_echo "$as_me: error: $2" >&2
33825  as_fn_exit $as_status
33826} # as_fn_error
33827
33828
33829# as_fn_set_status STATUS
33830# -----------------------
33831# Set $? to STATUS, without forking.
33832as_fn_set_status ()
33833{
33834  return $1
33835} # as_fn_set_status
33836
33837# as_fn_exit STATUS
33838# -----------------
33839# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
33840as_fn_exit ()
33841{
33842  set +e
33843  as_fn_set_status $1
33844  exit $1
33845} # as_fn_exit
33846
33847# as_fn_unset VAR
33848# ---------------
33849# Portably unset VAR.
33850as_fn_unset ()
33851{
33852  { eval $1=; unset $1;}
33853}
33854as_unset=as_fn_unset
33855# as_fn_append VAR VALUE
33856# ----------------------
33857# Append the text in VALUE to the end of the definition contained in VAR. Take
33858# advantage of any shell optimizations that allow amortized linear growth over
33859# repeated appends, instead of the typical quadratic growth present in naive
33860# implementations.
33861if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
33862  eval 'as_fn_append ()
33863  {
33864    eval $1+=\$2
33865  }'
33866else
33867  as_fn_append ()
33868  {
33869    eval $1=\$$1\$2
33870  }
33871fi # as_fn_append
33872
33873# as_fn_arith ARG...
33874# ------------------
33875# Perform arithmetic evaluation on the ARGs, and store the result in the
33876# global $as_val. Take advantage of shells that can avoid forks. The arguments
33877# must be portable across $(()) and expr.
33878if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
33879  eval 'as_fn_arith ()
33880  {
33881    as_val=$(( $* ))
33882  }'
33883else
33884  as_fn_arith ()
33885  {
33886    as_val=`expr "$@" || test $? -eq 1`
33887  }
33888fi # as_fn_arith
33889
33890
33891if expr a : '\(a\)' >/dev/null 2>&1 &&
33892   test "X`expr 00001 : '.*\(...\)'`" = X001; then
33893  as_expr=expr
33894else
33895  as_expr=false
33896fi
33897
33898if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
33899  as_basename=basename
33900else
33901  as_basename=false
33902fi
33903
33904if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
33905  as_dirname=dirname
33906else
33907  as_dirname=false
33908fi
33909
33910as_me=`$as_basename -- "$0" ||
33911$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
33912	 X"$0" : 'X\(//\)$' \| \
33913	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
33914$as_echo X/"$0" |
33915    sed '/^.*\/\([^/][^/]*\)\/*$/{
33916	    s//\1/
33917	    q
33918	  }
33919	  /^X\/\(\/\/\)$/{
33920	    s//\1/
33921	    q
33922	  }
33923	  /^X\/\(\/\).*/{
33924	    s//\1/
33925	    q
33926	  }
33927	  s/.*/./; q'`
33928
33929# Avoid depending upon Character Ranges.
33930as_cr_letters='abcdefghijklmnopqrstuvwxyz'
33931as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
33932as_cr_Letters=$as_cr_letters$as_cr_LETTERS
33933as_cr_digits='0123456789'
33934as_cr_alnum=$as_cr_Letters$as_cr_digits
33935
33936ECHO_C= ECHO_N= ECHO_T=
33937case `echo -n x` in #(((((
33938-n*)
33939  case `echo 'xy\c'` in
33940  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
33941  xy)  ECHO_C='\c';;
33942  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
33943       ECHO_T='	';;
33944  esac;;
33945*)
33946  ECHO_N='-n';;
33947esac
33948
33949rm -f conf$$ conf$$.exe conf$$.file
33950if test -d conf$$.dir; then
33951  rm -f conf$$.dir/conf$$.file
33952else
33953  rm -f conf$$.dir
33954  mkdir conf$$.dir 2>/dev/null
33955fi
33956if (echo >conf$$.file) 2>/dev/null; then
33957  if ln -s conf$$.file conf$$ 2>/dev/null; then
33958    as_ln_s='ln -s'
33959    # ... but there are two gotchas:
33960    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
33961    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
33962    # In both cases, we have to default to `cp -pR'.
33963    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
33964      as_ln_s='cp -pR'
33965  elif ln conf$$.file conf$$ 2>/dev/null; then
33966    as_ln_s=ln
33967  else
33968    as_ln_s='cp -pR'
33969  fi
33970else
33971  as_ln_s='cp -pR'
33972fi
33973rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
33974rmdir conf$$.dir 2>/dev/null
33975
33976
33977# as_fn_mkdir_p
33978# -------------
33979# Create "$as_dir" as a directory, including parents if necessary.
33980as_fn_mkdir_p ()
33981{
33982
33983  case $as_dir in #(
33984  -*) as_dir=./$as_dir;;
33985  esac
33986  test -d "$as_dir" || eval $as_mkdir_p || {
33987    as_dirs=
33988    while :; do
33989      case $as_dir in #(
33990      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
33991      *) as_qdir=$as_dir;;
33992      esac
33993      as_dirs="'$as_qdir' $as_dirs"
33994      as_dir=`$as_dirname -- "$as_dir" ||
33995$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
33996	 X"$as_dir" : 'X\(//\)[^/]' \| \
33997	 X"$as_dir" : 'X\(//\)$' \| \
33998	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
33999$as_echo X"$as_dir" |
34000    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
34001	    s//\1/
34002	    q
34003	  }
34004	  /^X\(\/\/\)[^/].*/{
34005	    s//\1/
34006	    q
34007	  }
34008	  /^X\(\/\/\)$/{
34009	    s//\1/
34010	    q
34011	  }
34012	  /^X\(\/\).*/{
34013	    s//\1/
34014	    q
34015	  }
34016	  s/.*/./; q'`
34017      test -d "$as_dir" && break
34018    done
34019    test -z "$as_dirs" || eval "mkdir $as_dirs"
34020  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
34021
34022
34023} # as_fn_mkdir_p
34024if mkdir -p . 2>/dev/null; then
34025  as_mkdir_p='mkdir -p "$as_dir"'
34026else
34027  test -d ./-p && rmdir ./-p
34028  as_mkdir_p=false
34029fi
34030
34031
34032# as_fn_executable_p FILE
34033# -----------------------
34034# Test if FILE is an executable regular file.
34035as_fn_executable_p ()
34036{
34037  test -f "$1" && test -x "$1"
34038} # as_fn_executable_p
34039as_test_x='test -x'
34040as_executable_p=as_fn_executable_p
34041
34042# Sed expression to map a string onto a valid CPP name.
34043as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
34044
34045# Sed expression to map a string onto a valid variable name.
34046as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
34047
34048
34049exec 6>&1
34050## ----------------------------------- ##
34051## Main body of $CONFIG_STATUS script. ##
34052## ----------------------------------- ##
34053_ASEOF
34054test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
34055
34056cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34057# Save the log message, to keep $0 and so on meaningful, and to
34058# report actual input values of CONFIG_FILES etc. instead of their
34059# values after options handling.
34060ac_log="
34061This file was extended by OpenJDK $as_me jdk8, which was
34062generated by GNU Autoconf 2.69.  Invocation command line was
34063
34064  CONFIG_FILES    = $CONFIG_FILES
34065  CONFIG_HEADERS  = $CONFIG_HEADERS
34066  CONFIG_LINKS    = $CONFIG_LINKS
34067  CONFIG_COMMANDS = $CONFIG_COMMANDS
34068  $ $0 $@
34069
34070on `(hostname || uname -n) 2>/dev/null | sed 1q`
34071"
34072
34073_ACEOF
34074
34075case $ac_config_files in *"
34076"*) set x $ac_config_files; shift; ac_config_files=$*;;
34077esac
34078
34079case $ac_config_headers in *"
34080"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
34081esac
34082
34083
34084cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34085# Files that config.status was made for.
34086config_files="$ac_config_files"
34087config_headers="$ac_config_headers"
34088
34089_ACEOF
34090
34091cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34092ac_cs_usage="\
34093\`$as_me' instantiates files and other configuration actions
34094from templates according to the current configuration.  Unless the files
34095and actions are specified as TAGs, all are instantiated by default.
34096
34097Usage: $0 [OPTION]... [TAG]...
34098
34099  -h, --help       print this help, then exit
34100  -V, --version    print version number and configuration settings, then exit
34101      --config     print configuration, then exit
34102  -q, --quiet, --silent
34103                   do not print progress messages
34104  -d, --debug      don't remove temporary files
34105      --recheck    update $as_me by reconfiguring in the same conditions
34106      --file=FILE[:TEMPLATE]
34107                   instantiate the configuration file FILE
34108      --header=FILE[:TEMPLATE]
34109                   instantiate the configuration header FILE
34110
34111Configuration files:
34112$config_files
34113
34114Configuration headers:
34115$config_headers
34116
34117Report bugs to <build-dev@openjdk.java.net>.
34118OpenJDK home page: <http://openjdk.java.net>."
34119
34120_ACEOF
34121cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34122ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
34123ac_cs_version="\\
34124OpenJDK config.status jdk8
34125configured by $0, generated by GNU Autoconf 2.69,
34126  with options \\"\$ac_cs_config\\"
34127
34128Copyright (C) 2012 Free Software Foundation, Inc.
34129This config.status script is free software; the Free Software Foundation
34130gives unlimited permission to copy, distribute and modify it."
34131
34132ac_pwd='$ac_pwd'
34133srcdir='$srcdir'
34134AWK='$AWK'
34135test -n "\$AWK" || AWK=awk
34136_ACEOF
34137
34138cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34139# The default lists apply if the user does not specify any file.
34140ac_need_defaults=:
34141while test $# != 0
34142do
34143  case $1 in
34144  --*=?*)
34145    ac_option=`expr "X$1" : 'X\([^=]*\)='`
34146    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
34147    ac_shift=:
34148    ;;
34149  --*=)
34150    ac_option=`expr "X$1" : 'X\([^=]*\)='`
34151    ac_optarg=
34152    ac_shift=:
34153    ;;
34154  *)
34155    ac_option=$1
34156    ac_optarg=$2
34157    ac_shift=shift
34158    ;;
34159  esac
34160
34161  case $ac_option in
34162  # Handling of the options.
34163  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
34164    ac_cs_recheck=: ;;
34165  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
34166    $as_echo "$ac_cs_version"; exit ;;
34167  --config | --confi | --conf | --con | --co | --c )
34168    $as_echo "$ac_cs_config"; exit ;;
34169  --debug | --debu | --deb | --de | --d | -d )
34170    debug=: ;;
34171  --file | --fil | --fi | --f )
34172    $ac_shift
34173    case $ac_optarg in
34174    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
34175    '') as_fn_error $? "missing file argument" ;;
34176    esac
34177    as_fn_append CONFIG_FILES " '$ac_optarg'"
34178    ac_need_defaults=false;;
34179  --header | --heade | --head | --hea )
34180    $ac_shift
34181    case $ac_optarg in
34182    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
34183    esac
34184    as_fn_append CONFIG_HEADERS " '$ac_optarg'"
34185    ac_need_defaults=false;;
34186  --he | --h)
34187    # Conflict between --help and --header
34188    as_fn_error $? "ambiguous option: \`$1'
34189Try \`$0 --help' for more information.";;
34190  --help | --hel | -h )
34191    $as_echo "$ac_cs_usage"; exit ;;
34192  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
34193  | -silent | --silent | --silen | --sile | --sil | --si | --s)
34194    ac_cs_silent=: ;;
34195
34196  # This is an error.
34197  -*) as_fn_error $? "unrecognized option: \`$1'
34198Try \`$0 --help' for more information." ;;
34199
34200  *) as_fn_append ac_config_targets " $1"
34201     ac_need_defaults=false ;;
34202
34203  esac
34204  shift
34205done
34206
34207ac_configure_extra_args=
34208
34209if $ac_cs_silent; then
34210  exec 6>/dev/null
34211  ac_configure_extra_args="$ac_configure_extra_args --silent"
34212fi
34213
34214_ACEOF
34215cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34216if \$ac_cs_recheck; then
34217  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
34218  shift
34219  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
34220  CONFIG_SHELL='$SHELL'
34221  export CONFIG_SHELL
34222  exec "\$@"
34223fi
34224
34225_ACEOF
34226cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34227exec 5>>config.log
34228{
34229  echo
34230  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
34231## Running $as_me. ##
34232_ASBOX
34233  $as_echo "$ac_log"
34234} >&5
34235
34236_ACEOF
34237cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34238_ACEOF
34239
34240cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34241
34242# Handling of arguments.
34243for ac_config_target in $ac_config_targets
34244do
34245  case $ac_config_target in
34246    "$OUTPUT_ROOT/config.h") CONFIG_HEADERS="$CONFIG_HEADERS $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in" ;;
34247    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
34248    "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
34249    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
34250    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
34251    "$OUTPUT_ROOT/spec.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in" ;;
34252    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
34253
34254  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
34255  esac
34256done
34257
34258
34259# If the user did not use the arguments to specify the items to instantiate,
34260# then the envvar interface is used.  Set only those that are not.
34261# We use the long form for the default assignment because of an extremely
34262# bizarre bug on SunOS 4.1.3.
34263if $ac_need_defaults; then
34264  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
34265  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
34266fi
34267
34268# Have a temporary directory for convenience.  Make it in the build tree
34269# simply because there is no reason against having it here, and in addition,
34270# creating and moving files from /tmp can sometimes cause problems.
34271# Hook for its removal unless debugging.
34272# Note that there is a small window in which the directory will not be cleaned:
34273# after its creation but before its name has been assigned to `$tmp'.
34274$debug ||
34275{
34276  tmp= ac_tmp=
34277  trap 'exit_status=$?
34278  : "${ac_tmp:=$tmp}"
34279  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
34280' 0
34281  trap 'as_fn_exit 1' 1 2 13 15
34282}
34283# Create a (secure) tmp directory for tmp files.
34284
34285{
34286  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
34287  test -d "$tmp"
34288}  ||
34289{
34290  tmp=./conf$$-$RANDOM
34291  (umask 077 && mkdir "$tmp")
34292} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
34293ac_tmp=$tmp
34294
34295# Set up the scripts for CONFIG_FILES section.
34296# No need to generate them if there are no CONFIG_FILES.
34297# This happens for instance with `./config.status config.h'.
34298if test -n "$CONFIG_FILES"; then
34299
34300
34301ac_cr=`echo X | tr X '\015'`
34302# On cygwin, bash can eat \r inside `` if the user requested igncr.
34303# But we know of no other shell where ac_cr would be empty at this
34304# point, so we can use a bashism as a fallback.
34305if test "x$ac_cr" = x; then
34306  eval ac_cr=\$\'\\r\'
34307fi
34308ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
34309if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
34310  ac_cs_awk_cr='\\r'
34311else
34312  ac_cs_awk_cr=$ac_cr
34313fi
34314
34315echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
34316_ACEOF
34317
34318
34319{
34320  echo "cat >conf$$subs.awk <<_ACEOF" &&
34321  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
34322  echo "_ACEOF"
34323} >conf$$subs.sh ||
34324  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
34325ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
34326ac_delim='%!_!# '
34327for ac_last_try in false false false false false :; do
34328  . ./conf$$subs.sh ||
34329    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
34330
34331  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
34332  if test $ac_delim_n = $ac_delim_num; then
34333    break
34334  elif $ac_last_try; then
34335    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
34336  else
34337    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
34338  fi
34339done
34340rm -f conf$$subs.sh
34341
34342cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34343cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
34344_ACEOF
34345sed -n '
34346h
34347s/^/S["/; s/!.*/"]=/
34348p
34349g
34350s/^[^!]*!//
34351:repl
34352t repl
34353s/'"$ac_delim"'$//
34354t delim
34355:nl
34356h
34357s/\(.\{148\}\)..*/\1/
34358t more1
34359s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
34360p
34361n
34362b repl
34363:more1
34364s/["\\]/\\&/g; s/^/"/; s/$/"\\/
34365p
34366g
34367s/.\{148\}//
34368t nl
34369:delim
34370h
34371s/\(.\{148\}\)..*/\1/
34372t more2
34373s/["\\]/\\&/g; s/^/"/; s/$/"/
34374p
34375b
34376:more2
34377s/["\\]/\\&/g; s/^/"/; s/$/"\\/
34378p
34379g
34380s/.\{148\}//
34381t delim
34382' <conf$$subs.awk | sed '
34383/^[^""]/{
34384  N
34385  s/\n//
34386}
34387' >>$CONFIG_STATUS || ac_write_fail=1
34388rm -f conf$$subs.awk
34389cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34390_ACAWK
34391cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
34392  for (key in S) S_is_set[key] = 1
34393  FS = ""
34394
34395}
34396{
34397  line = $ 0
34398  nfields = split(line, field, "@")
34399  substed = 0
34400  len = length(field[1])
34401  for (i = 2; i < nfields; i++) {
34402    key = field[i]
34403    keylen = length(key)
34404    if (S_is_set[key]) {
34405      value = S[key]
34406      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
34407      len += length(value) + length(field[++i])
34408      substed = 1
34409    } else
34410      len += 1 + keylen
34411  }
34412
34413  print line
34414}
34415
34416_ACAWK
34417_ACEOF
34418cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34419if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
34420  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
34421else
34422  cat
34423fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
34424  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
34425_ACEOF
34426
34427# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
34428# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
34429# trailing colons and then remove the whole line if VPATH becomes empty
34430# (actually we leave an empty line to preserve line numbers).
34431if test "x$srcdir" = x.; then
34432  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
34433h
34434s///
34435s/^/:/
34436s/[	 ]*$/:/
34437s/:\$(srcdir):/:/g
34438s/:\${srcdir}:/:/g
34439s/:@srcdir@:/:/g
34440s/^:*//
34441s/:*$//
34442x
34443s/\(=[	 ]*\).*/\1/
34444G
34445s/\n//
34446s/^[^=]*=[	 ]*$//
34447}'
34448fi
34449
34450cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34451fi # test -n "$CONFIG_FILES"
34452
34453# Set up the scripts for CONFIG_HEADERS section.
34454# No need to generate them if there are no CONFIG_HEADERS.
34455# This happens for instance with `./config.status Makefile'.
34456if test -n "$CONFIG_HEADERS"; then
34457cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
34458BEGIN {
34459_ACEOF
34460
34461# Transform confdefs.h into an awk script `defines.awk', embedded as
34462# here-document in config.status, that substitutes the proper values into
34463# config.h.in to produce config.h.
34464
34465# Create a delimiter string that does not exist in confdefs.h, to ease
34466# handling of long lines.
34467ac_delim='%!_!# '
34468for ac_last_try in false false :; do
34469  ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
34470  if test -z "$ac_tt"; then
34471    break
34472  elif $ac_last_try; then
34473    as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
34474  else
34475    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
34476  fi
34477done
34478
34479# For the awk script, D is an array of macro values keyed by name,
34480# likewise P contains macro parameters if any.  Preserve backslash
34481# newline sequences.
34482
34483ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
34484sed -n '
34485s/.\{148\}/&'"$ac_delim"'/g
34486t rset
34487:rset
34488s/^[	 ]*#[	 ]*define[	 ][	 ]*/ /
34489t def
34490d
34491:def
34492s/\\$//
34493t bsnl
34494s/["\\]/\\&/g
34495s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
34496D["\1"]=" \3"/p
34497s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2"/p
34498d
34499:bsnl
34500s/["\\]/\\&/g
34501s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
34502D["\1"]=" \3\\\\\\n"\\/p
34503t cont
34504s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
34505t cont
34506d
34507:cont
34508n
34509s/.\{148\}/&'"$ac_delim"'/g
34510t clear
34511:clear
34512s/\\$//
34513t bsnlc
34514s/["\\]/\\&/g; s/^/"/; s/$/"/p
34515d
34516:bsnlc
34517s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
34518b cont
34519' <confdefs.h | sed '
34520s/'"$ac_delim"'/"\\\
34521"/g' >>$CONFIG_STATUS || ac_write_fail=1
34522
34523cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34524  for (key in D) D_is_set[key] = 1
34525  FS = ""
34526}
34527/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
34528  line = \$ 0
34529  split(line, arg, " ")
34530  if (arg[1] == "#") {
34531    defundef = arg[2]
34532    mac1 = arg[3]
34533  } else {
34534    defundef = substr(arg[1], 2)
34535    mac1 = arg[2]
34536  }
34537  split(mac1, mac2, "(") #)
34538  macro = mac2[1]
34539  prefix = substr(line, 1, index(line, defundef) - 1)
34540  if (D_is_set[macro]) {
34541    # Preserve the white space surrounding the "#".
34542    print prefix "define", macro P[macro] D[macro]
34543    next
34544  } else {
34545    # Replace #undef with comments.  This is necessary, for example,
34546    # in the case of _POSIX_SOURCE, which is predefined and required
34547    # on some systems where configure will not decide to define it.
34548    if (defundef == "undef") {
34549      print "/*", prefix defundef, macro, "*/"
34550      next
34551    }
34552  }
34553}
34554{ print }
34555_ACAWK
34556_ACEOF
34557cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34558  as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
34559fi # test -n "$CONFIG_HEADERS"
34560
34561
34562eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    "
34563shift
34564for ac_tag
34565do
34566  case $ac_tag in
34567  :[FHLC]) ac_mode=$ac_tag; continue;;
34568  esac
34569  case $ac_mode$ac_tag in
34570  :[FHL]*:*);;
34571  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
34572  :[FH]-) ac_tag=-:-;;
34573  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
34574  esac
34575  ac_save_IFS=$IFS
34576  IFS=:
34577  set x $ac_tag
34578  IFS=$ac_save_IFS
34579  shift
34580  ac_file=$1
34581  shift
34582
34583  case $ac_mode in
34584  :L) ac_source=$1;;
34585  :[FH])
34586    ac_file_inputs=
34587    for ac_f
34588    do
34589      case $ac_f in
34590      -) ac_f="$ac_tmp/stdin";;
34591      *) # Look for the file first in the build tree, then in the source tree
34592	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
34593	 # because $ac_f cannot contain `:'.
34594	 test -f "$ac_f" ||
34595	   case $ac_f in
34596	   [\\/$]*) false;;
34597	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
34598	   esac ||
34599	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
34600      esac
34601      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
34602      as_fn_append ac_file_inputs " '$ac_f'"
34603    done
34604
34605    # Let's still pretend it is `configure' which instantiates (i.e., don't
34606    # use $as_me), people would be surprised to read:
34607    #    /* config.h.  Generated by config.status.  */
34608    configure_input='Generated from '`
34609	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
34610	`' by configure.'
34611    if test x"$ac_file" != x-; then
34612      configure_input="$ac_file.  $configure_input"
34613      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
34614$as_echo "$as_me: creating $ac_file" >&6;}
34615    fi
34616    # Neutralize special characters interpreted by sed in replacement strings.
34617    case $configure_input in #(
34618    *\&* | *\|* | *\\* )
34619       ac_sed_conf_input=`$as_echo "$configure_input" |
34620       sed 's/[\\\\&|]/\\\\&/g'`;; #(
34621    *) ac_sed_conf_input=$configure_input;;
34622    esac
34623
34624    case $ac_tag in
34625    *:-:* | *:-) cat >"$ac_tmp/stdin" \
34626      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
34627    esac
34628    ;;
34629  esac
34630
34631  ac_dir=`$as_dirname -- "$ac_file" ||
34632$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
34633	 X"$ac_file" : 'X\(//\)[^/]' \| \
34634	 X"$ac_file" : 'X\(//\)$' \| \
34635	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
34636$as_echo X"$ac_file" |
34637    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
34638	    s//\1/
34639	    q
34640	  }
34641	  /^X\(\/\/\)[^/].*/{
34642	    s//\1/
34643	    q
34644	  }
34645	  /^X\(\/\/\)$/{
34646	    s//\1/
34647	    q
34648	  }
34649	  /^X\(\/\).*/{
34650	    s//\1/
34651	    q
34652	  }
34653	  s/.*/./; q'`
34654  as_dir="$ac_dir"; as_fn_mkdir_p
34655  ac_builddir=.
34656
34657case "$ac_dir" in
34658.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
34659*)
34660  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
34661  # A ".." for each directory in $ac_dir_suffix.
34662  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
34663  case $ac_top_builddir_sub in
34664  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
34665  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
34666  esac ;;
34667esac
34668ac_abs_top_builddir=$ac_pwd
34669ac_abs_builddir=$ac_pwd$ac_dir_suffix
34670# for backward compatibility:
34671ac_top_builddir=$ac_top_build_prefix
34672
34673case $srcdir in
34674  .)  # We are building in place.
34675    ac_srcdir=.
34676    ac_top_srcdir=$ac_top_builddir_sub
34677    ac_abs_top_srcdir=$ac_pwd ;;
34678  [\\/]* | ?:[\\/]* )  # Absolute name.
34679    ac_srcdir=$srcdir$ac_dir_suffix;
34680    ac_top_srcdir=$srcdir
34681    ac_abs_top_srcdir=$srcdir ;;
34682  *) # Relative name.
34683    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
34684    ac_top_srcdir=$ac_top_build_prefix$srcdir
34685    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
34686esac
34687ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
34688
34689
34690  case $ac_mode in
34691  :F)
34692  #
34693  # CONFIG_FILE
34694  #
34695
34696_ACEOF
34697
34698cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34699# If the template does not know about datarootdir, expand it.
34700# FIXME: This hack should be removed a few years after 2.60.
34701ac_datarootdir_hack=; ac_datarootdir_seen=
34702ac_sed_dataroot='
34703/datarootdir/ {
34704  p
34705  q
34706}
34707/@datadir@/p
34708/@docdir@/p
34709/@infodir@/p
34710/@localedir@/p
34711/@mandir@/p'
34712case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
34713*datarootdir*) ac_datarootdir_seen=yes;;
34714*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
34715  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
34716$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
34717_ACEOF
34718cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34719  ac_datarootdir_hack='
34720  s&@datadir@&$datadir&g
34721  s&@docdir@&$docdir&g
34722  s&@infodir@&$infodir&g
34723  s&@localedir@&$localedir&g
34724  s&@mandir@&$mandir&g
34725  s&\\\${datarootdir}&$datarootdir&g' ;;
34726esac
34727_ACEOF
34728
34729# Neutralize VPATH when `$srcdir' = `.'.
34730# Shell code in configure.ac might set extrasub.
34731# FIXME: do we really want to maintain this feature?
34732cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34733ac_sed_extra="$ac_vpsub
34734$extrasub
34735_ACEOF
34736cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34737:t
34738/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
34739s|@configure_input@|$ac_sed_conf_input|;t t
34740s&@top_builddir@&$ac_top_builddir_sub&;t t
34741s&@top_build_prefix@&$ac_top_build_prefix&;t t
34742s&@srcdir@&$ac_srcdir&;t t
34743s&@abs_srcdir@&$ac_abs_srcdir&;t t
34744s&@top_srcdir@&$ac_top_srcdir&;t t
34745s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
34746s&@builddir@&$ac_builddir&;t t
34747s&@abs_builddir@&$ac_abs_builddir&;t t
34748s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
34749$ac_datarootdir_hack
34750"
34751eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
34752  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
34753
34754test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
34755  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
34756  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
34757      "$ac_tmp/out"`; test -z "$ac_out"; } &&
34758  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
34759which seems to be undefined.  Please make sure it is defined" >&5
34760$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
34761which seems to be undefined.  Please make sure it is defined" >&2;}
34762
34763  rm -f "$ac_tmp/stdin"
34764  case $ac_file in
34765  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
34766  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
34767  esac \
34768  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
34769 ;;
34770  :H)
34771  #
34772  # CONFIG_HEADER
34773  #
34774  if test x"$ac_file" != x-; then
34775    {
34776      $as_echo "/* $configure_input  */" \
34777      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
34778    } >"$ac_tmp/config.h" \
34779      || as_fn_error $? "could not create $ac_file" "$LINENO" 5
34780    if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
34781      { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
34782$as_echo "$as_me: $ac_file is unchanged" >&6;}
34783    else
34784      rm -f "$ac_file"
34785      mv "$ac_tmp/config.h" "$ac_file" \
34786	|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
34787    fi
34788  else
34789    $as_echo "/* $configure_input  */" \
34790      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
34791      || as_fn_error $? "could not create -" "$LINENO" 5
34792  fi
34793 ;;
34794
34795
34796  esac
34797
34798done # for ac_tag
34799
34800
34801as_fn_exit 0
34802_ACEOF
34803ac_clean_files=$ac_clean_files_save
34804
34805test $ac_write_fail = 0 ||
34806  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
34807
34808
34809# configure is writing to config.log, and then calls config.status.
34810# config.status does its own redirection, appending to config.log.
34811# Unfortunately, on DOS this fails, as config.log is still kept open
34812# by configure, so config.status won't be able to write to it; its
34813# output is simply discarded.  So we exec the FD to /dev/null,
34814# effectively closing config.log, so it can be properly (re)opened and
34815# appended to by config.status.  When coming back to configure, we
34816# need to make the FD available again.
34817if test "$no_create" != yes; then
34818  ac_cs_success=:
34819  ac_config_status_args=
34820  test "$silent" = yes &&
34821    ac_config_status_args="$ac_config_status_args --quiet"
34822  exec 5>/dev/null
34823  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
34824  exec 5>>config.log
34825  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
34826  # would make configure fail if this is the last instruction.
34827  $ac_cs_success || as_fn_exit 1
34828fi
34829if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
34830  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
34831$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
34832fi
34833
34834
34835# Try to move the config.log file to the output directory.
34836if test -e ./config.log; then
34837  $MV -f ./config.log "$OUTPUT_ROOT/config.log" 2> /dev/null
34838fi
34839
34840# Make the compare script executable
34841$CHMOD +x $OUTPUT_ROOT/compare.sh
34842
34843# Finally output some useful information to the user
34844
34845  # Finally output some useful information to the user
34846
34847  if test "x$CCACHE_FOUND" != x; then
34848    if  test "x$HAS_GOOD_CCACHE" = x; then
34849      CCACHE_STATUS="installed, but disabled (version older than 3.1.4)"
34850      CCACHE_HELP_MSG="You have ccache installed, but it is a version prior to 3.1.4. Try upgrading."
34851    else
34852      CCACHE_STATUS="installed and in use"
34853    fi
34854  else
34855    if test "x$GCC" = xyes; then
34856      CCACHE_STATUS="not installed (consider installing)"
34857      CCACHE_HELP_MSG="You do not have ccache installed. Try installing it."
34858    else
34859      CCACHE_STATUS="not available for your system"
34860    fi
34861  fi
34862
34863  printf "\n"
34864  printf "====================================================\n"
34865  printf "A new configuration has been successfully created in\n"
34866  printf "$OUTPUT_ROOT\n"
34867  if test "x$CONFIGURE_COMMAND_LINE" != x; then
34868    printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
34869  else
34870    printf "using default settings.\n"
34871  fi
34872
34873  printf "\n"
34874  printf "Configuration summary:\n"
34875  printf "* Debug level:    $DEBUG_LEVEL\n"
34876  printf "* JDK variant:    $JDK_VARIANT\n"
34877  printf "* JVM variants:   $with_jvm_variants\n"
34878  printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
34879
34880  printf "\n"
34881  printf "Tools summary:\n"
34882  if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
34883    printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
34884  fi
34885  printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
34886  printf "* C Compiler:     $CC_VENDOR version $CC_VERSION (at $CC)\n"
34887  printf "* C++ Compiler:   $CXX_VENDOR version $CXX_VERSION (at $CXX)\n"
34888
34889  printf "\n"
34890  printf "Build performance summary:\n"
34891  printf "* Cores to use:   $JOBS\n"
34892  printf "* Memory limit:   $MEMORY_SIZE MB\n"
34893  printf "* ccache status:  $CCACHE_STATUS\n"
34894  printf "\n"
34895
34896  if test "x$CCACHE_HELP_MSG" != x && test "x$HIDE_PERFORMANCE_HINTS" = "xno"; then
34897    printf "Build performance tip: ccache gives a tremendous speedup for C++ recompilations.\n"
34898    printf "$CCACHE_HELP_MSG\n"
34899
34900  # Print a helpful message on how to acquire the necessary build dependency.
34901  # ccache is the help tag: freetyp2, cups, pulse, alsa etc
34902  MISSING_DEPENDENCY=ccache
34903
34904  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34905    cygwin_help $MISSING_DEPENDENCY
34906  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34907    msys_help $MISSING_DEPENDENCY
34908  else
34909    PKGHANDLER_COMMAND=
34910
34911    case $PKGHANDLER in
34912      apt-get)
34913        apt_help     $MISSING_DEPENDENCY ;;
34914      yum)
34915        yum_help     $MISSING_DEPENDENCY ;;
34916      port)
34917        port_help    $MISSING_DEPENDENCY ;;
34918      pkgutil)
34919        pkgutil_help $MISSING_DEPENDENCY ;;
34920      pkgadd)
34921        pkgadd_help  $MISSING_DEPENDENCY ;;
34922      * )
34923        break ;;
34924    esac
34925
34926    if test "x$PKGHANDLER_COMMAND" != x; then
34927      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
34928    fi
34929  fi
34930
34931    printf "$HELP_MSG\n"
34932    printf "\n"
34933  fi
34934
34935  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
34936    printf "NOTE: You have requested to build more than one version of the JVM, which\n"
34937    printf "will result in longer build times.\n"
34938    printf "\n"
34939  fi
34940
34941  if test "x$FOUND_ALT_VARIABLES" != "x"; then
34942    printf "WARNING: You have old-style ALT_ environment variables set.\n"
34943    printf "These are not respected, and will be ignored. It is recommended\n"
34944    printf "that you clean your environment. The following variables are set:\n"
34945    printf "$FOUND_ALT_VARIABLES\n"
34946    printf "\n"
34947  fi
34948
34949  if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
34950    printf "WARNING: Your build output directory is not on a local disk.\n"
34951    printf "This will severely degrade build performance!\n"
34952    printf "It is recommended that you create an output directory on a local disk,\n"
34953    printf "and run the configure script again from that directory.\n"
34954    printf "\n"
34955  fi
34956
34957  if test "x$IS_RECONFIGURE" = "xyes"; then
34958    printf "WARNING: The result of this configuration has overridden an older\n"
34959    printf "configuration. You *should* run 'make clean' to make sure you get a\n"
34960    printf "proper build. Failure to do so might result in strange build problems.\n"
34961    printf "\n"
34962  fi
34963
34964