generated-configure.sh revision 855:5b4f14990dd1
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    zip)
3448      PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P zip" ;;
3449    make)
3450      PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P make" ;;
3451    * )
3452      break ;;
3453  esac
3454}
3455
3456apt_help() {
3457  case $1 in
3458    devkit)
3459      PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
3460    openjdk)
3461      PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
3462    alsa)
3463      PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
3464    cups)
3465      PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
3466    freetype2)
3467      PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
3468    pulse)
3469      PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;;
3470    x11)
3471      PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
3472    ccache)
3473      PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
3474    * )
3475      break ;;
3476  esac
3477}
3478
3479yum_help() {
3480  case $1 in
3481    devkit)
3482      PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
3483    openjdk)
3484      PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
3485    alsa)
3486      PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
3487    cups)
3488      PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
3489    freetype2)
3490      PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
3491    pulse)
3492      PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;;
3493    x11)
3494      PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel" ;;
3495    ccache)
3496      PKGHANDLER_COMMAND="sudo yum install ccache" ;;
3497    * )
3498      break ;;
3499  esac
3500}
3501
3502port_help() {
3503  PKGHANDLER_COMMAND=""
3504}
3505
3506pkgutil_help() {
3507  PKGHANDLER_COMMAND=""
3508}
3509
3510pkgadd_help() {
3511  PKGHANDLER_COMMAND=""
3512}
3513
3514
3515
3516#
3517# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
3518# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3519#
3520# This code is free software; you can redistribute it and/or modify it
3521# under the terms of the GNU General Public License version 2 only, as
3522# published by the Free Software Foundation.  Oracle designates this
3523# particular file as subject to the "Classpath" exception as provided
3524# by Oracle in the LICENSE file that accompanied this code.
3525#
3526# This code is distributed in the hope that it will be useful, but WITHOUT
3527# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3528# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3529# version 2 for more details (a copy is included in the LICENSE file that
3530# accompanied this code).
3531#
3532# You should have received a copy of the GNU General Public License version
3533# 2 along with this work; if not, write to the Free Software Foundation,
3534# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3535#
3536# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3537# or visit www.oracle.com if you need additional information or have any
3538# questions.
3539#
3540
3541
3542
3543
3544
3545
3546
3547
3548###############################################################################
3549#
3550# Should we build only OpenJDK even if closed sources are present?
3551#
3552
3553
3554
3555
3556###############################################################################
3557#
3558# Setup version numbers
3559#
3560
3561
3562
3563
3564
3565
3566# Support for customization of the build process. Some build files
3567# will include counterparts from this location, if they exist. This allows
3568# for a degree of customization of the build targets and the rules/recipes
3569# to create them
3570
3571# Check whether --with-custom-make-dir was given.
3572if test "${with_custom_make_dir+set}" = set; then :
3573  withval=$with_custom_make_dir; CUSTOM_MAKE_DIR=$with_custom_make_dir
3574fi
3575
3576
3577
3578#
3579# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3580# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3581#
3582# This code is free software; you can redistribute it and/or modify it
3583# under the terms of the GNU General Public License version 2 only, as
3584# published by the Free Software Foundation.  Oracle designates this
3585# particular file as subject to the "Classpath" exception as provided
3586# by Oracle in the LICENSE file that accompanied this code.
3587#
3588# This code is distributed in the hope that it will be useful, but WITHOUT
3589# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3590# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3591# version 2 for more details (a copy is included in the LICENSE file that
3592# accompanied this code).
3593#
3594# You should have received a copy of the GNU General Public License version
3595# 2 along with this work; if not, write to the Free Software Foundation,
3596# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3597#
3598# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3599# or visit www.oracle.com if you need additional information or have any
3600# questions.
3601#
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617#
3618# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3619# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3620#
3621# This code is free software; you can redistribute it and/or modify it
3622# under the terms of the GNU General Public License version 2 only, as
3623# published by the Free Software Foundation.  Oracle designates this
3624# particular file as subject to the "Classpath" exception as provided
3625# by Oracle in the LICENSE file that accompanied this code.
3626#
3627# This code is distributed in the hope that it will be useful, but WITHOUT
3628# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3629# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3630# version 2 for more details (a copy is included in the LICENSE file that
3631# accompanied this code).
3632#
3633# You should have received a copy of the GNU General Public License version
3634# 2 along with this work; if not, write to the Free Software Foundation,
3635# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3636#
3637# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3638# or visit www.oracle.com if you need additional information or have any
3639# questions.
3640#
3641
3642# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
3643# Converts autoconf style CPU name to OpenJDK style, into
3644# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
3645
3646
3647# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
3648# Converts autoconf style OS name to OpenJDK style, into
3649# VAR_OS and VAR_OS_API.
3650
3651
3652# Expects $host_os $host_cpu $build_os and $build_cpu
3653# and $with_target_bits to have been setup!
3654#
3655# Translate the standard triplet(quadruplet) definition
3656# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
3657# OPENJDK_BUILD_OS, etc.
3658
3659
3660# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
3661# accordingly. Must be done after setting up build and target system, but before
3662# doing anything else with these values.
3663
3664
3665# Setup the legacy variables, for controlling the old makefiles.
3666#
3667
3668
3669
3670
3671#%%% Build and target systems %%%
3672
3673
3674
3675
3676# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
3677# Add -mX to various FLAGS variables.
3678
3679
3680
3681
3682
3683
3684#
3685# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3686# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3687#
3688# This code is free software; you can redistribute it and/or modify it
3689# under the terms of the GNU General Public License version 2 only, as
3690# published by the Free Software Foundation.  Oracle designates this
3691# particular file as subject to the "Classpath" exception as provided
3692# by Oracle in the LICENSE file that accompanied this code.
3693#
3694# This code is distributed in the hope that it will be useful, but WITHOUT
3695# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3696# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3697# version 2 for more details (a copy is included in the LICENSE file that
3698# accompanied this code).
3699#
3700# You should have received a copy of the GNU General Public License version
3701# 2 along with this work; if not, write to the Free Software Foundation,
3702# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3703#
3704# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3705# or visit www.oracle.com if you need additional information or have any
3706# questions.
3707#
3708
3709
3710
3711
3712
3713
3714
3715
3716#
3717# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3718# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3719#
3720# This code is free software; you can redistribute it and/or modify it
3721# under the terms of the GNU General Public License version 2 only, as
3722# published by the Free Software Foundation.  Oracle designates this
3723# particular file as subject to the "Classpath" exception as provided
3724# by Oracle in the LICENSE file that accompanied this code.
3725#
3726# This code is distributed in the hope that it will be useful, but WITHOUT
3727# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3728# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3729# version 2 for more details (a copy is included in the LICENSE file that
3730# accompanied this code).
3731#
3732# You should have received a copy of the GNU General Public License version
3733# 2 along with this work; if not, write to the Free Software Foundation,
3734# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3735#
3736# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3737# or visit www.oracle.com if you need additional information or have any
3738# questions.
3739#
3740
3741# $1 = compiler to test (CC or CXX)
3742# $2 = human readable name of compiler (C or C++)
3743
3744
3745
3746
3747
3748# $1 = compiler to test (CC or CXX)
3749# $2 = human readable name of compiler (C or C++)
3750# $3 = list of compiler names to search for
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764# TOOLCHAIN_COMPILER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3765#                                   [RUN-IF-FALSE])
3766# ------------------------------------------------------------
3767# Check that the c and c++ compilers support an argument
3768
3769
3770
3771
3772# Setup the JTREG paths
3773
3774
3775#
3776# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3777# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3778#
3779# This code is free software; you can redistribute it and/or modify it
3780# under the terms of the GNU General Public License version 2 only, as
3781# published by the Free Software Foundation.  Oracle designates this
3782# particular file as subject to the "Classpath" exception as provided
3783# by Oracle in the LICENSE file that accompanied this code.
3784#
3785# This code is distributed in the hope that it will be useful, but WITHOUT
3786# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3787# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3788# version 2 for more details (a copy is included in the LICENSE file that
3789# accompanied this code).
3790#
3791# You should have received a copy of the GNU General Public License version
3792# 2 along with this work; if not, write to the Free Software Foundation,
3793# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3794#
3795# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3796# or visit www.oracle.com if you need additional information or have any
3797# questions.
3798#
3799
3800
3801
3802
3803
3804
3805
3806# Check if the VS env variables were setup prior to running configure.
3807# If not, then find vcvarsall.bat and run it automatically, and integrate
3808# the set env variables into the spec file.
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819# This line needs to be here, verbatim, after all includes and the dummy hook
3820# definitions. It is replaced with custom functionality when building
3821# custom sources.
3822#CUSTOM_AUTOCONF_INCLUDE
3823
3824# Do not change or remove the following line, it is needed for consistency checks:
3825DATE_WHEN_GENERATED=1382084973
3826
3827###############################################################################
3828#
3829# Initialization / Boot-strapping
3830#
3831# The bootstrapping process needs to solve the "chicken or the egg" problem,
3832# thus it jumps back and forth, each time gaining something needed later on.
3833#
3834###############################################################################
3835
3836# Basic initialization that must happen first of all
3837
3838  # Save the original command line. This is passed to us by the wrapper configure script.
3839
3840  DATE_WHEN_CONFIGURED=`LANG=C date`
3841
3842  { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
3843$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
3844  { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
3845$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
3846
3847
3848
3849  # Start with tools that do not need have cross compilation support
3850  # and can be expected to be found in the default PATH. These tools are
3851  # used by configure. Nor are these tools expected to be found in the
3852  # devkit from the builddeps server either, since they are
3853  # needed to download the devkit.
3854
3855  # First are all the simple required tools.
3856
3857  for ac_prog in basename
3858do
3859  # Extract the first word of "$ac_prog", so it can be a program name with args.
3860set dummy $ac_prog; ac_word=$2
3861{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3862$as_echo_n "checking for $ac_word... " >&6; }
3863if ${ac_cv_path_BASENAME+:} false; then :
3864  $as_echo_n "(cached) " >&6
3865else
3866  case $BASENAME in
3867  [\\/]* | ?:[\\/]*)
3868  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
3869  ;;
3870  *)
3871  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3872for as_dir in $PATH
3873do
3874  IFS=$as_save_IFS
3875  test -z "$as_dir" && as_dir=.
3876    for ac_exec_ext in '' $ac_executable_extensions; do
3877  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3878    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
3879    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3880    break 2
3881  fi
3882done
3883  done
3884IFS=$as_save_IFS
3885
3886  ;;
3887esac
3888fi
3889BASENAME=$ac_cv_path_BASENAME
3890if test -n "$BASENAME"; then
3891  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
3892$as_echo "$BASENAME" >&6; }
3893else
3894  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3895$as_echo "no" >&6; }
3896fi
3897
3898
3899  test -n "$BASENAME" && break
3900done
3901
3902
3903  if test "x$BASENAME" = x; then
3904    if test "xbasename" = x; then
3905      PROG_NAME=basename
3906    else
3907      PROG_NAME=basename
3908    fi
3909    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3910$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3911    as_fn_error $? "Cannot continue" "$LINENO" 5
3912  fi
3913
3914
3915
3916  for ac_prog in bash
3917do
3918  # Extract the first word of "$ac_prog", so it can be a program name with args.
3919set dummy $ac_prog; ac_word=$2
3920{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3921$as_echo_n "checking for $ac_word... " >&6; }
3922if ${ac_cv_path_BASH+:} false; then :
3923  $as_echo_n "(cached) " >&6
3924else
3925  case $BASH in
3926  [\\/]* | ?:[\\/]*)
3927  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
3928  ;;
3929  *)
3930  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3931for as_dir in $PATH
3932do
3933  IFS=$as_save_IFS
3934  test -z "$as_dir" && as_dir=.
3935    for ac_exec_ext in '' $ac_executable_extensions; do
3936  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3937    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
3938    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3939    break 2
3940  fi
3941done
3942  done
3943IFS=$as_save_IFS
3944
3945  ;;
3946esac
3947fi
3948BASH=$ac_cv_path_BASH
3949if test -n "$BASH"; then
3950  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
3951$as_echo "$BASH" >&6; }
3952else
3953  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3954$as_echo "no" >&6; }
3955fi
3956
3957
3958  test -n "$BASH" && break
3959done
3960
3961
3962  if test "x$BASH" = x; then
3963    if test "xbash" = x; then
3964      PROG_NAME=bash
3965    else
3966      PROG_NAME=bash
3967    fi
3968    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3969$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3970    as_fn_error $? "Cannot continue" "$LINENO" 5
3971  fi
3972
3973
3974
3975  for ac_prog in cat
3976do
3977  # Extract the first word of "$ac_prog", so it can be a program name with args.
3978set dummy $ac_prog; ac_word=$2
3979{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3980$as_echo_n "checking for $ac_word... " >&6; }
3981if ${ac_cv_path_CAT+:} false; then :
3982  $as_echo_n "(cached) " >&6
3983else
3984  case $CAT in
3985  [\\/]* | ?:[\\/]*)
3986  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
3987  ;;
3988  *)
3989  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3990for as_dir in $PATH
3991do
3992  IFS=$as_save_IFS
3993  test -z "$as_dir" && as_dir=.
3994    for ac_exec_ext in '' $ac_executable_extensions; do
3995  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3996    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
3997    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3998    break 2
3999  fi
4000done
4001  done
4002IFS=$as_save_IFS
4003
4004  ;;
4005esac
4006fi
4007CAT=$ac_cv_path_CAT
4008if test -n "$CAT"; then
4009  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4010$as_echo "$CAT" >&6; }
4011else
4012  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4013$as_echo "no" >&6; }
4014fi
4015
4016
4017  test -n "$CAT" && break
4018done
4019
4020
4021  if test "x$CAT" = x; then
4022    if test "xcat" = x; then
4023      PROG_NAME=cat
4024    else
4025      PROG_NAME=cat
4026    fi
4027    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4028$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4029    as_fn_error $? "Cannot continue" "$LINENO" 5
4030  fi
4031
4032
4033
4034  for ac_prog in chmod
4035do
4036  # Extract the first word of "$ac_prog", so it can be a program name with args.
4037set dummy $ac_prog; ac_word=$2
4038{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4039$as_echo_n "checking for $ac_word... " >&6; }
4040if ${ac_cv_path_CHMOD+:} false; then :
4041  $as_echo_n "(cached) " >&6
4042else
4043  case $CHMOD in
4044  [\\/]* | ?:[\\/]*)
4045  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
4046  ;;
4047  *)
4048  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4049for as_dir in $PATH
4050do
4051  IFS=$as_save_IFS
4052  test -z "$as_dir" && as_dir=.
4053    for ac_exec_ext in '' $ac_executable_extensions; do
4054  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4055    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
4056    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4057    break 2
4058  fi
4059done
4060  done
4061IFS=$as_save_IFS
4062
4063  ;;
4064esac
4065fi
4066CHMOD=$ac_cv_path_CHMOD
4067if test -n "$CHMOD"; then
4068  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
4069$as_echo "$CHMOD" >&6; }
4070else
4071  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4072$as_echo "no" >&6; }
4073fi
4074
4075
4076  test -n "$CHMOD" && break
4077done
4078
4079
4080  if test "x$CHMOD" = x; then
4081    if test "xchmod" = x; then
4082      PROG_NAME=chmod
4083    else
4084      PROG_NAME=chmod
4085    fi
4086    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4087$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4088    as_fn_error $? "Cannot continue" "$LINENO" 5
4089  fi
4090
4091
4092
4093  for ac_prog in cmp
4094do
4095  # Extract the first word of "$ac_prog", so it can be a program name with args.
4096set dummy $ac_prog; ac_word=$2
4097{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4098$as_echo_n "checking for $ac_word... " >&6; }
4099if ${ac_cv_path_CMP+:} false; then :
4100  $as_echo_n "(cached) " >&6
4101else
4102  case $CMP in
4103  [\\/]* | ?:[\\/]*)
4104  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
4105  ;;
4106  *)
4107  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4108for as_dir in $PATH
4109do
4110  IFS=$as_save_IFS
4111  test -z "$as_dir" && as_dir=.
4112    for ac_exec_ext in '' $ac_executable_extensions; do
4113  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4114    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
4115    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4116    break 2
4117  fi
4118done
4119  done
4120IFS=$as_save_IFS
4121
4122  ;;
4123esac
4124fi
4125CMP=$ac_cv_path_CMP
4126if test -n "$CMP"; then
4127  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
4128$as_echo "$CMP" >&6; }
4129else
4130  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4131$as_echo "no" >&6; }
4132fi
4133
4134
4135  test -n "$CMP" && break
4136done
4137
4138
4139  if test "x$CMP" = x; then
4140    if test "xcmp" = x; then
4141      PROG_NAME=cmp
4142    else
4143      PROG_NAME=cmp
4144    fi
4145    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4146$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4147    as_fn_error $? "Cannot continue" "$LINENO" 5
4148  fi
4149
4150
4151
4152  for ac_prog in comm
4153do
4154  # Extract the first word of "$ac_prog", so it can be a program name with args.
4155set dummy $ac_prog; ac_word=$2
4156{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4157$as_echo_n "checking for $ac_word... " >&6; }
4158if ${ac_cv_path_COMM+:} false; then :
4159  $as_echo_n "(cached) " >&6
4160else
4161  case $COMM in
4162  [\\/]* | ?:[\\/]*)
4163  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
4164  ;;
4165  *)
4166  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4167for as_dir in $PATH
4168do
4169  IFS=$as_save_IFS
4170  test -z "$as_dir" && as_dir=.
4171    for ac_exec_ext in '' $ac_executable_extensions; do
4172  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4173    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
4174    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4175    break 2
4176  fi
4177done
4178  done
4179IFS=$as_save_IFS
4180
4181  ;;
4182esac
4183fi
4184COMM=$ac_cv_path_COMM
4185if test -n "$COMM"; then
4186  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
4187$as_echo "$COMM" >&6; }
4188else
4189  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4190$as_echo "no" >&6; }
4191fi
4192
4193
4194  test -n "$COMM" && break
4195done
4196
4197
4198  if test "x$COMM" = x; then
4199    if test "xcomm" = x; then
4200      PROG_NAME=comm
4201    else
4202      PROG_NAME=comm
4203    fi
4204    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4205$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4206    as_fn_error $? "Cannot continue" "$LINENO" 5
4207  fi
4208
4209
4210
4211  for ac_prog in cp
4212do
4213  # Extract the first word of "$ac_prog", so it can be a program name with args.
4214set dummy $ac_prog; ac_word=$2
4215{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4216$as_echo_n "checking for $ac_word... " >&6; }
4217if ${ac_cv_path_CP+:} false; then :
4218  $as_echo_n "(cached) " >&6
4219else
4220  case $CP in
4221  [\\/]* | ?:[\\/]*)
4222  ac_cv_path_CP="$CP" # Let the user override the test with a path.
4223  ;;
4224  *)
4225  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4226for as_dir in $PATH
4227do
4228  IFS=$as_save_IFS
4229  test -z "$as_dir" && as_dir=.
4230    for ac_exec_ext in '' $ac_executable_extensions; do
4231  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4232    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
4233    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4234    break 2
4235  fi
4236done
4237  done
4238IFS=$as_save_IFS
4239
4240  ;;
4241esac
4242fi
4243CP=$ac_cv_path_CP
4244if test -n "$CP"; then
4245  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
4246$as_echo "$CP" >&6; }
4247else
4248  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4249$as_echo "no" >&6; }
4250fi
4251
4252
4253  test -n "$CP" && break
4254done
4255
4256
4257  if test "x$CP" = x; then
4258    if test "xcp" = x; then
4259      PROG_NAME=cp
4260    else
4261      PROG_NAME=cp
4262    fi
4263    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4264$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4265    as_fn_error $? "Cannot continue" "$LINENO" 5
4266  fi
4267
4268
4269
4270  for ac_prog in cpio
4271do
4272  # Extract the first word of "$ac_prog", so it can be a program name with args.
4273set dummy $ac_prog; ac_word=$2
4274{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4275$as_echo_n "checking for $ac_word... " >&6; }
4276if ${ac_cv_path_CPIO+:} false; then :
4277  $as_echo_n "(cached) " >&6
4278else
4279  case $CPIO in
4280  [\\/]* | ?:[\\/]*)
4281  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
4282  ;;
4283  *)
4284  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4285for as_dir in $PATH
4286do
4287  IFS=$as_save_IFS
4288  test -z "$as_dir" && as_dir=.
4289    for ac_exec_ext in '' $ac_executable_extensions; do
4290  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4291    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
4292    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4293    break 2
4294  fi
4295done
4296  done
4297IFS=$as_save_IFS
4298
4299  ;;
4300esac
4301fi
4302CPIO=$ac_cv_path_CPIO
4303if test -n "$CPIO"; then
4304  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
4305$as_echo "$CPIO" >&6; }
4306else
4307  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4308$as_echo "no" >&6; }
4309fi
4310
4311
4312  test -n "$CPIO" && break
4313done
4314
4315
4316  if test "x$CPIO" = x; then
4317    if test "xcpio" = x; then
4318      PROG_NAME=cpio
4319    else
4320      PROG_NAME=cpio
4321    fi
4322    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4323$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4324    as_fn_error $? "Cannot continue" "$LINENO" 5
4325  fi
4326
4327
4328
4329  for ac_prog in cut
4330do
4331  # Extract the first word of "$ac_prog", so it can be a program name with args.
4332set dummy $ac_prog; ac_word=$2
4333{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4334$as_echo_n "checking for $ac_word... " >&6; }
4335if ${ac_cv_path_CUT+:} false; then :
4336  $as_echo_n "(cached) " >&6
4337else
4338  case $CUT in
4339  [\\/]* | ?:[\\/]*)
4340  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
4341  ;;
4342  *)
4343  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4344for as_dir in $PATH
4345do
4346  IFS=$as_save_IFS
4347  test -z "$as_dir" && as_dir=.
4348    for ac_exec_ext in '' $ac_executable_extensions; do
4349  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4350    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
4351    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4352    break 2
4353  fi
4354done
4355  done
4356IFS=$as_save_IFS
4357
4358  ;;
4359esac
4360fi
4361CUT=$ac_cv_path_CUT
4362if test -n "$CUT"; then
4363  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
4364$as_echo "$CUT" >&6; }
4365else
4366  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4367$as_echo "no" >&6; }
4368fi
4369
4370
4371  test -n "$CUT" && break
4372done
4373
4374
4375  if test "x$CUT" = x; then
4376    if test "xcut" = x; then
4377      PROG_NAME=cut
4378    else
4379      PROG_NAME=cut
4380    fi
4381    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4382$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4383    as_fn_error $? "Cannot continue" "$LINENO" 5
4384  fi
4385
4386
4387
4388  for ac_prog in date
4389do
4390  # Extract the first word of "$ac_prog", so it can be a program name with args.
4391set dummy $ac_prog; ac_word=$2
4392{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4393$as_echo_n "checking for $ac_word... " >&6; }
4394if ${ac_cv_path_DATE+:} false; then :
4395  $as_echo_n "(cached) " >&6
4396else
4397  case $DATE in
4398  [\\/]* | ?:[\\/]*)
4399  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
4400  ;;
4401  *)
4402  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4403for as_dir in $PATH
4404do
4405  IFS=$as_save_IFS
4406  test -z "$as_dir" && as_dir=.
4407    for ac_exec_ext in '' $ac_executable_extensions; do
4408  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4409    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
4410    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4411    break 2
4412  fi
4413done
4414  done
4415IFS=$as_save_IFS
4416
4417  ;;
4418esac
4419fi
4420DATE=$ac_cv_path_DATE
4421if test -n "$DATE"; then
4422  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
4423$as_echo "$DATE" >&6; }
4424else
4425  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4426$as_echo "no" >&6; }
4427fi
4428
4429
4430  test -n "$DATE" && break
4431done
4432
4433
4434  if test "x$DATE" = x; then
4435    if test "xdate" = x; then
4436      PROG_NAME=date
4437    else
4438      PROG_NAME=date
4439    fi
4440    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4441$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4442    as_fn_error $? "Cannot continue" "$LINENO" 5
4443  fi
4444
4445
4446
4447  for ac_prog in gdiff diff
4448do
4449  # Extract the first word of "$ac_prog", so it can be a program name with args.
4450set dummy $ac_prog; ac_word=$2
4451{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4452$as_echo_n "checking for $ac_word... " >&6; }
4453if ${ac_cv_path_DIFF+:} false; then :
4454  $as_echo_n "(cached) " >&6
4455else
4456  case $DIFF in
4457  [\\/]* | ?:[\\/]*)
4458  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
4459  ;;
4460  *)
4461  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4462for as_dir in $PATH
4463do
4464  IFS=$as_save_IFS
4465  test -z "$as_dir" && as_dir=.
4466    for ac_exec_ext in '' $ac_executable_extensions; do
4467  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4468    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
4469    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4470    break 2
4471  fi
4472done
4473  done
4474IFS=$as_save_IFS
4475
4476  ;;
4477esac
4478fi
4479DIFF=$ac_cv_path_DIFF
4480if test -n "$DIFF"; then
4481  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
4482$as_echo "$DIFF" >&6; }
4483else
4484  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4485$as_echo "no" >&6; }
4486fi
4487
4488
4489  test -n "$DIFF" && break
4490done
4491
4492
4493  if test "x$DIFF" = x; then
4494    if test "xgdiff diff" = x; then
4495      PROG_NAME=diff
4496    else
4497      PROG_NAME=gdiff diff
4498    fi
4499    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4500$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4501    as_fn_error $? "Cannot continue" "$LINENO" 5
4502  fi
4503
4504
4505
4506  for ac_prog in dirname
4507do
4508  # Extract the first word of "$ac_prog", so it can be a program name with args.
4509set dummy $ac_prog; ac_word=$2
4510{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4511$as_echo_n "checking for $ac_word... " >&6; }
4512if ${ac_cv_path_DIRNAME+:} false; then :
4513  $as_echo_n "(cached) " >&6
4514else
4515  case $DIRNAME in
4516  [\\/]* | ?:[\\/]*)
4517  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
4518  ;;
4519  *)
4520  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4521for as_dir in $PATH
4522do
4523  IFS=$as_save_IFS
4524  test -z "$as_dir" && as_dir=.
4525    for ac_exec_ext in '' $ac_executable_extensions; do
4526  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4527    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
4528    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4529    break 2
4530  fi
4531done
4532  done
4533IFS=$as_save_IFS
4534
4535  ;;
4536esac
4537fi
4538DIRNAME=$ac_cv_path_DIRNAME
4539if test -n "$DIRNAME"; then
4540  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
4541$as_echo "$DIRNAME" >&6; }
4542else
4543  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4544$as_echo "no" >&6; }
4545fi
4546
4547
4548  test -n "$DIRNAME" && break
4549done
4550
4551
4552  if test "x$DIRNAME" = x; then
4553    if test "xdirname" = x; then
4554      PROG_NAME=dirname
4555    else
4556      PROG_NAME=dirname
4557    fi
4558    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4559$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4560    as_fn_error $? "Cannot continue" "$LINENO" 5
4561  fi
4562
4563
4564
4565  for ac_prog in echo
4566do
4567  # Extract the first word of "$ac_prog", so it can be a program name with args.
4568set dummy $ac_prog; ac_word=$2
4569{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4570$as_echo_n "checking for $ac_word... " >&6; }
4571if ${ac_cv_path_ECHO+:} false; then :
4572  $as_echo_n "(cached) " >&6
4573else
4574  case $ECHO in
4575  [\\/]* | ?:[\\/]*)
4576  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
4577  ;;
4578  *)
4579  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4580for as_dir in $PATH
4581do
4582  IFS=$as_save_IFS
4583  test -z "$as_dir" && as_dir=.
4584    for ac_exec_ext in '' $ac_executable_extensions; do
4585  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4586    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
4587    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4588    break 2
4589  fi
4590done
4591  done
4592IFS=$as_save_IFS
4593
4594  ;;
4595esac
4596fi
4597ECHO=$ac_cv_path_ECHO
4598if test -n "$ECHO"; then
4599  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
4600$as_echo "$ECHO" >&6; }
4601else
4602  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4603$as_echo "no" >&6; }
4604fi
4605
4606
4607  test -n "$ECHO" && break
4608done
4609
4610
4611  if test "x$ECHO" = x; then
4612    if test "xecho" = x; then
4613      PROG_NAME=echo
4614    else
4615      PROG_NAME=echo
4616    fi
4617    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4618$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4619    as_fn_error $? "Cannot continue" "$LINENO" 5
4620  fi
4621
4622
4623
4624  for ac_prog in expr
4625do
4626  # Extract the first word of "$ac_prog", so it can be a program name with args.
4627set dummy $ac_prog; ac_word=$2
4628{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4629$as_echo_n "checking for $ac_word... " >&6; }
4630if ${ac_cv_path_EXPR+:} false; then :
4631  $as_echo_n "(cached) " >&6
4632else
4633  case $EXPR in
4634  [\\/]* | ?:[\\/]*)
4635  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
4636  ;;
4637  *)
4638  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4639for as_dir in $PATH
4640do
4641  IFS=$as_save_IFS
4642  test -z "$as_dir" && as_dir=.
4643    for ac_exec_ext in '' $ac_executable_extensions; do
4644  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4645    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
4646    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4647    break 2
4648  fi
4649done
4650  done
4651IFS=$as_save_IFS
4652
4653  ;;
4654esac
4655fi
4656EXPR=$ac_cv_path_EXPR
4657if test -n "$EXPR"; then
4658  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
4659$as_echo "$EXPR" >&6; }
4660else
4661  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4662$as_echo "no" >&6; }
4663fi
4664
4665
4666  test -n "$EXPR" && break
4667done
4668
4669
4670  if test "x$EXPR" = x; then
4671    if test "xexpr" = x; then
4672      PROG_NAME=expr
4673    else
4674      PROG_NAME=expr
4675    fi
4676    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4677$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4678    as_fn_error $? "Cannot continue" "$LINENO" 5
4679  fi
4680
4681
4682
4683  for ac_prog in file
4684do
4685  # Extract the first word of "$ac_prog", so it can be a program name with args.
4686set dummy $ac_prog; ac_word=$2
4687{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4688$as_echo_n "checking for $ac_word... " >&6; }
4689if ${ac_cv_path_FILE+:} false; then :
4690  $as_echo_n "(cached) " >&6
4691else
4692  case $FILE in
4693  [\\/]* | ?:[\\/]*)
4694  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
4695  ;;
4696  *)
4697  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4698for as_dir in $PATH
4699do
4700  IFS=$as_save_IFS
4701  test -z "$as_dir" && as_dir=.
4702    for ac_exec_ext in '' $ac_executable_extensions; do
4703  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4704    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
4705    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4706    break 2
4707  fi
4708done
4709  done
4710IFS=$as_save_IFS
4711
4712  ;;
4713esac
4714fi
4715FILE=$ac_cv_path_FILE
4716if test -n "$FILE"; then
4717  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
4718$as_echo "$FILE" >&6; }
4719else
4720  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4721$as_echo "no" >&6; }
4722fi
4723
4724
4725  test -n "$FILE" && break
4726done
4727
4728
4729  if test "x$FILE" = x; then
4730    if test "xfile" = x; then
4731      PROG_NAME=file
4732    else
4733      PROG_NAME=file
4734    fi
4735    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4736$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4737    as_fn_error $? "Cannot continue" "$LINENO" 5
4738  fi
4739
4740
4741
4742  for ac_prog in find
4743do
4744  # Extract the first word of "$ac_prog", so it can be a program name with args.
4745set dummy $ac_prog; ac_word=$2
4746{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4747$as_echo_n "checking for $ac_word... " >&6; }
4748if ${ac_cv_path_FIND+:} false; then :
4749  $as_echo_n "(cached) " >&6
4750else
4751  case $FIND in
4752  [\\/]* | ?:[\\/]*)
4753  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
4754  ;;
4755  *)
4756  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4757for as_dir in $PATH
4758do
4759  IFS=$as_save_IFS
4760  test -z "$as_dir" && as_dir=.
4761    for ac_exec_ext in '' $ac_executable_extensions; do
4762  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4763    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
4764    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4765    break 2
4766  fi
4767done
4768  done
4769IFS=$as_save_IFS
4770
4771  ;;
4772esac
4773fi
4774FIND=$ac_cv_path_FIND
4775if test -n "$FIND"; then
4776  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
4777$as_echo "$FIND" >&6; }
4778else
4779  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4780$as_echo "no" >&6; }
4781fi
4782
4783
4784  test -n "$FIND" && break
4785done
4786
4787
4788  if test "x$FIND" = x; then
4789    if test "xfind" = x; then
4790      PROG_NAME=find
4791    else
4792      PROG_NAME=find
4793    fi
4794    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4795$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4796    as_fn_error $? "Cannot continue" "$LINENO" 5
4797  fi
4798
4799
4800
4801  for ac_prog in head
4802do
4803  # Extract the first word of "$ac_prog", so it can be a program name with args.
4804set dummy $ac_prog; ac_word=$2
4805{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4806$as_echo_n "checking for $ac_word... " >&6; }
4807if ${ac_cv_path_HEAD+:} false; then :
4808  $as_echo_n "(cached) " >&6
4809else
4810  case $HEAD in
4811  [\\/]* | ?:[\\/]*)
4812  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
4813  ;;
4814  *)
4815  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4816for as_dir in $PATH
4817do
4818  IFS=$as_save_IFS
4819  test -z "$as_dir" && as_dir=.
4820    for ac_exec_ext in '' $ac_executable_extensions; do
4821  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4822    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
4823    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4824    break 2
4825  fi
4826done
4827  done
4828IFS=$as_save_IFS
4829
4830  ;;
4831esac
4832fi
4833HEAD=$ac_cv_path_HEAD
4834if test -n "$HEAD"; then
4835  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
4836$as_echo "$HEAD" >&6; }
4837else
4838  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4839$as_echo "no" >&6; }
4840fi
4841
4842
4843  test -n "$HEAD" && break
4844done
4845
4846
4847  if test "x$HEAD" = x; then
4848    if test "xhead" = x; then
4849      PROG_NAME=head
4850    else
4851      PROG_NAME=head
4852    fi
4853    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4854$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4855    as_fn_error $? "Cannot continue" "$LINENO" 5
4856  fi
4857
4858
4859
4860  for ac_prog in ln
4861do
4862  # Extract the first word of "$ac_prog", so it can be a program name with args.
4863set dummy $ac_prog; ac_word=$2
4864{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4865$as_echo_n "checking for $ac_word... " >&6; }
4866if ${ac_cv_path_LN+:} false; then :
4867  $as_echo_n "(cached) " >&6
4868else
4869  case $LN in
4870  [\\/]* | ?:[\\/]*)
4871  ac_cv_path_LN="$LN" # Let the user override the test with a path.
4872  ;;
4873  *)
4874  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4875for as_dir in $PATH
4876do
4877  IFS=$as_save_IFS
4878  test -z "$as_dir" && as_dir=.
4879    for ac_exec_ext in '' $ac_executable_extensions; do
4880  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4881    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
4882    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4883    break 2
4884  fi
4885done
4886  done
4887IFS=$as_save_IFS
4888
4889  ;;
4890esac
4891fi
4892LN=$ac_cv_path_LN
4893if test -n "$LN"; then
4894  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
4895$as_echo "$LN" >&6; }
4896else
4897  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4898$as_echo "no" >&6; }
4899fi
4900
4901
4902  test -n "$LN" && break
4903done
4904
4905
4906  if test "x$LN" = x; then
4907    if test "xln" = x; then
4908      PROG_NAME=ln
4909    else
4910      PROG_NAME=ln
4911    fi
4912    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4913$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4914    as_fn_error $? "Cannot continue" "$LINENO" 5
4915  fi
4916
4917
4918
4919  for ac_prog in ls
4920do
4921  # Extract the first word of "$ac_prog", so it can be a program name with args.
4922set dummy $ac_prog; ac_word=$2
4923{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4924$as_echo_n "checking for $ac_word... " >&6; }
4925if ${ac_cv_path_LS+:} false; then :
4926  $as_echo_n "(cached) " >&6
4927else
4928  case $LS in
4929  [\\/]* | ?:[\\/]*)
4930  ac_cv_path_LS="$LS" # Let the user override the test with a path.
4931  ;;
4932  *)
4933  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4934for as_dir in $PATH
4935do
4936  IFS=$as_save_IFS
4937  test -z "$as_dir" && as_dir=.
4938    for ac_exec_ext in '' $ac_executable_extensions; do
4939  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4940    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
4941    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4942    break 2
4943  fi
4944done
4945  done
4946IFS=$as_save_IFS
4947
4948  ;;
4949esac
4950fi
4951LS=$ac_cv_path_LS
4952if test -n "$LS"; then
4953  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
4954$as_echo "$LS" >&6; }
4955else
4956  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4957$as_echo "no" >&6; }
4958fi
4959
4960
4961  test -n "$LS" && break
4962done
4963
4964
4965  if test "x$LS" = x; then
4966    if test "xls" = x; then
4967      PROG_NAME=ls
4968    else
4969      PROG_NAME=ls
4970    fi
4971    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4972$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4973    as_fn_error $? "Cannot continue" "$LINENO" 5
4974  fi
4975
4976
4977
4978  for ac_prog in mkdir
4979do
4980  # Extract the first word of "$ac_prog", so it can be a program name with args.
4981set dummy $ac_prog; ac_word=$2
4982{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4983$as_echo_n "checking for $ac_word... " >&6; }
4984if ${ac_cv_path_MKDIR+:} false; then :
4985  $as_echo_n "(cached) " >&6
4986else
4987  case $MKDIR in
4988  [\\/]* | ?:[\\/]*)
4989  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
4990  ;;
4991  *)
4992  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4993for as_dir in $PATH
4994do
4995  IFS=$as_save_IFS
4996  test -z "$as_dir" && as_dir=.
4997    for ac_exec_ext in '' $ac_executable_extensions; do
4998  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4999    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
5000    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5001    break 2
5002  fi
5003done
5004  done
5005IFS=$as_save_IFS
5006
5007  ;;
5008esac
5009fi
5010MKDIR=$ac_cv_path_MKDIR
5011if test -n "$MKDIR"; then
5012  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
5013$as_echo "$MKDIR" >&6; }
5014else
5015  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5016$as_echo "no" >&6; }
5017fi
5018
5019
5020  test -n "$MKDIR" && break
5021done
5022
5023
5024  if test "x$MKDIR" = x; then
5025    if test "xmkdir" = x; then
5026      PROG_NAME=mkdir
5027    else
5028      PROG_NAME=mkdir
5029    fi
5030    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5031$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5032    as_fn_error $? "Cannot continue" "$LINENO" 5
5033  fi
5034
5035
5036
5037  for ac_prog in mktemp
5038do
5039  # Extract the first word of "$ac_prog", so it can be a program name with args.
5040set dummy $ac_prog; ac_word=$2
5041{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5042$as_echo_n "checking for $ac_word... " >&6; }
5043if ${ac_cv_path_MKTEMP+:} false; then :
5044  $as_echo_n "(cached) " >&6
5045else
5046  case $MKTEMP in
5047  [\\/]* | ?:[\\/]*)
5048  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
5049  ;;
5050  *)
5051  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5052for as_dir in $PATH
5053do
5054  IFS=$as_save_IFS
5055  test -z "$as_dir" && as_dir=.
5056    for ac_exec_ext in '' $ac_executable_extensions; do
5057  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5058    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
5059    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5060    break 2
5061  fi
5062done
5063  done
5064IFS=$as_save_IFS
5065
5066  ;;
5067esac
5068fi
5069MKTEMP=$ac_cv_path_MKTEMP
5070if test -n "$MKTEMP"; then
5071  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
5072$as_echo "$MKTEMP" >&6; }
5073else
5074  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5075$as_echo "no" >&6; }
5076fi
5077
5078
5079  test -n "$MKTEMP" && break
5080done
5081
5082
5083  if test "x$MKTEMP" = x; then
5084    if test "xmktemp" = x; then
5085      PROG_NAME=mktemp
5086    else
5087      PROG_NAME=mktemp
5088    fi
5089    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5090$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5091    as_fn_error $? "Cannot continue" "$LINENO" 5
5092  fi
5093
5094
5095
5096  for ac_prog in mv
5097do
5098  # Extract the first word of "$ac_prog", so it can be a program name with args.
5099set dummy $ac_prog; ac_word=$2
5100{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5101$as_echo_n "checking for $ac_word... " >&6; }
5102if ${ac_cv_path_MV+:} false; then :
5103  $as_echo_n "(cached) " >&6
5104else
5105  case $MV in
5106  [\\/]* | ?:[\\/]*)
5107  ac_cv_path_MV="$MV" # Let the user override the test with a path.
5108  ;;
5109  *)
5110  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5111for as_dir in $PATH
5112do
5113  IFS=$as_save_IFS
5114  test -z "$as_dir" && as_dir=.
5115    for ac_exec_ext in '' $ac_executable_extensions; do
5116  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5117    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
5118    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5119    break 2
5120  fi
5121done
5122  done
5123IFS=$as_save_IFS
5124
5125  ;;
5126esac
5127fi
5128MV=$ac_cv_path_MV
5129if test -n "$MV"; then
5130  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
5131$as_echo "$MV" >&6; }
5132else
5133  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5134$as_echo "no" >&6; }
5135fi
5136
5137
5138  test -n "$MV" && break
5139done
5140
5141
5142  if test "x$MV" = x; then
5143    if test "xmv" = x; then
5144      PROG_NAME=mv
5145    else
5146      PROG_NAME=mv
5147    fi
5148    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5149$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5150    as_fn_error $? "Cannot continue" "$LINENO" 5
5151  fi
5152
5153
5154
5155  for ac_prog in printf
5156do
5157  # Extract the first word of "$ac_prog", so it can be a program name with args.
5158set dummy $ac_prog; ac_word=$2
5159{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5160$as_echo_n "checking for $ac_word... " >&6; }
5161if ${ac_cv_path_PRINTF+:} false; then :
5162  $as_echo_n "(cached) " >&6
5163else
5164  case $PRINTF in
5165  [\\/]* | ?:[\\/]*)
5166  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
5167  ;;
5168  *)
5169  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5170for as_dir in $PATH
5171do
5172  IFS=$as_save_IFS
5173  test -z "$as_dir" && as_dir=.
5174    for ac_exec_ext in '' $ac_executable_extensions; do
5175  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5176    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
5177    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5178    break 2
5179  fi
5180done
5181  done
5182IFS=$as_save_IFS
5183
5184  ;;
5185esac
5186fi
5187PRINTF=$ac_cv_path_PRINTF
5188if test -n "$PRINTF"; then
5189  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
5190$as_echo "$PRINTF" >&6; }
5191else
5192  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5193$as_echo "no" >&6; }
5194fi
5195
5196
5197  test -n "$PRINTF" && break
5198done
5199
5200
5201  if test "x$PRINTF" = x; then
5202    if test "xprintf" = x; then
5203      PROG_NAME=printf
5204    else
5205      PROG_NAME=printf
5206    fi
5207    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5208$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5209    as_fn_error $? "Cannot continue" "$LINENO" 5
5210  fi
5211
5212
5213
5214  for ac_prog in rm
5215do
5216  # Extract the first word of "$ac_prog", so it can be a program name with args.
5217set dummy $ac_prog; ac_word=$2
5218{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5219$as_echo_n "checking for $ac_word... " >&6; }
5220if ${ac_cv_path_RM+:} false; then :
5221  $as_echo_n "(cached) " >&6
5222else
5223  case $RM in
5224  [\\/]* | ?:[\\/]*)
5225  ac_cv_path_RM="$RM" # Let the user override the test with a path.
5226  ;;
5227  *)
5228  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5229for as_dir in $PATH
5230do
5231  IFS=$as_save_IFS
5232  test -z "$as_dir" && as_dir=.
5233    for ac_exec_ext in '' $ac_executable_extensions; do
5234  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5235    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
5236    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5237    break 2
5238  fi
5239done
5240  done
5241IFS=$as_save_IFS
5242
5243  ;;
5244esac
5245fi
5246RM=$ac_cv_path_RM
5247if test -n "$RM"; then
5248  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
5249$as_echo "$RM" >&6; }
5250else
5251  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5252$as_echo "no" >&6; }
5253fi
5254
5255
5256  test -n "$RM" && break
5257done
5258
5259
5260  if test "x$RM" = x; then
5261    if test "xrm" = x; then
5262      PROG_NAME=rm
5263    else
5264      PROG_NAME=rm
5265    fi
5266    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5267$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5268    as_fn_error $? "Cannot continue" "$LINENO" 5
5269  fi
5270
5271
5272
5273  for ac_prog in sh
5274do
5275  # Extract the first word of "$ac_prog", so it can be a program name with args.
5276set dummy $ac_prog; ac_word=$2
5277{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5278$as_echo_n "checking for $ac_word... " >&6; }
5279if ${ac_cv_path_SH+:} false; then :
5280  $as_echo_n "(cached) " >&6
5281else
5282  case $SH in
5283  [\\/]* | ?:[\\/]*)
5284  ac_cv_path_SH="$SH" # Let the user override the test with a path.
5285  ;;
5286  *)
5287  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5288for as_dir in $PATH
5289do
5290  IFS=$as_save_IFS
5291  test -z "$as_dir" && as_dir=.
5292    for ac_exec_ext in '' $ac_executable_extensions; do
5293  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5294    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
5295    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5296    break 2
5297  fi
5298done
5299  done
5300IFS=$as_save_IFS
5301
5302  ;;
5303esac
5304fi
5305SH=$ac_cv_path_SH
5306if test -n "$SH"; then
5307  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
5308$as_echo "$SH" >&6; }
5309else
5310  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5311$as_echo "no" >&6; }
5312fi
5313
5314
5315  test -n "$SH" && break
5316done
5317
5318
5319  if test "x$SH" = x; then
5320    if test "xsh" = x; then
5321      PROG_NAME=sh
5322    else
5323      PROG_NAME=sh
5324    fi
5325    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5326$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5327    as_fn_error $? "Cannot continue" "$LINENO" 5
5328  fi
5329
5330
5331
5332  for ac_prog in sort
5333do
5334  # Extract the first word of "$ac_prog", so it can be a program name with args.
5335set dummy $ac_prog; ac_word=$2
5336{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5337$as_echo_n "checking for $ac_word... " >&6; }
5338if ${ac_cv_path_SORT+:} false; then :
5339  $as_echo_n "(cached) " >&6
5340else
5341  case $SORT in
5342  [\\/]* | ?:[\\/]*)
5343  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
5344  ;;
5345  *)
5346  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5347for as_dir in $PATH
5348do
5349  IFS=$as_save_IFS
5350  test -z "$as_dir" && as_dir=.
5351    for ac_exec_ext in '' $ac_executable_extensions; do
5352  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5353    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
5354    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5355    break 2
5356  fi
5357done
5358  done
5359IFS=$as_save_IFS
5360
5361  ;;
5362esac
5363fi
5364SORT=$ac_cv_path_SORT
5365if test -n "$SORT"; then
5366  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
5367$as_echo "$SORT" >&6; }
5368else
5369  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5370$as_echo "no" >&6; }
5371fi
5372
5373
5374  test -n "$SORT" && break
5375done
5376
5377
5378  if test "x$SORT" = x; then
5379    if test "xsort" = x; then
5380      PROG_NAME=sort
5381    else
5382      PROG_NAME=sort
5383    fi
5384    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5385$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5386    as_fn_error $? "Cannot continue" "$LINENO" 5
5387  fi
5388
5389
5390
5391  for ac_prog in tail
5392do
5393  # Extract the first word of "$ac_prog", so it can be a program name with args.
5394set dummy $ac_prog; ac_word=$2
5395{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5396$as_echo_n "checking for $ac_word... " >&6; }
5397if ${ac_cv_path_TAIL+:} false; then :
5398  $as_echo_n "(cached) " >&6
5399else
5400  case $TAIL in
5401  [\\/]* | ?:[\\/]*)
5402  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
5403  ;;
5404  *)
5405  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5406for as_dir in $PATH
5407do
5408  IFS=$as_save_IFS
5409  test -z "$as_dir" && as_dir=.
5410    for ac_exec_ext in '' $ac_executable_extensions; do
5411  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5412    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
5413    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5414    break 2
5415  fi
5416done
5417  done
5418IFS=$as_save_IFS
5419
5420  ;;
5421esac
5422fi
5423TAIL=$ac_cv_path_TAIL
5424if test -n "$TAIL"; then
5425  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
5426$as_echo "$TAIL" >&6; }
5427else
5428  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5429$as_echo "no" >&6; }
5430fi
5431
5432
5433  test -n "$TAIL" && break
5434done
5435
5436
5437  if test "x$TAIL" = x; then
5438    if test "xtail" = x; then
5439      PROG_NAME=tail
5440    else
5441      PROG_NAME=tail
5442    fi
5443    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5444$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5445    as_fn_error $? "Cannot continue" "$LINENO" 5
5446  fi
5447
5448
5449
5450  for ac_prog in tar
5451do
5452  # Extract the first word of "$ac_prog", so it can be a program name with args.
5453set dummy $ac_prog; ac_word=$2
5454{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5455$as_echo_n "checking for $ac_word... " >&6; }
5456if ${ac_cv_path_TAR+:} false; then :
5457  $as_echo_n "(cached) " >&6
5458else
5459  case $TAR in
5460  [\\/]* | ?:[\\/]*)
5461  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
5462  ;;
5463  *)
5464  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5465for as_dir in $PATH
5466do
5467  IFS=$as_save_IFS
5468  test -z "$as_dir" && as_dir=.
5469    for ac_exec_ext in '' $ac_executable_extensions; do
5470  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5471    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
5472    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5473    break 2
5474  fi
5475done
5476  done
5477IFS=$as_save_IFS
5478
5479  ;;
5480esac
5481fi
5482TAR=$ac_cv_path_TAR
5483if test -n "$TAR"; then
5484  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
5485$as_echo "$TAR" >&6; }
5486else
5487  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5488$as_echo "no" >&6; }
5489fi
5490
5491
5492  test -n "$TAR" && break
5493done
5494
5495
5496  if test "x$TAR" = x; then
5497    if test "xtar" = x; then
5498      PROG_NAME=tar
5499    else
5500      PROG_NAME=tar
5501    fi
5502    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5503$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5504    as_fn_error $? "Cannot continue" "$LINENO" 5
5505  fi
5506
5507
5508
5509  for ac_prog in tee
5510do
5511  # Extract the first word of "$ac_prog", so it can be a program name with args.
5512set dummy $ac_prog; ac_word=$2
5513{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5514$as_echo_n "checking for $ac_word... " >&6; }
5515if ${ac_cv_path_TEE+:} false; then :
5516  $as_echo_n "(cached) " >&6
5517else
5518  case $TEE in
5519  [\\/]* | ?:[\\/]*)
5520  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
5521  ;;
5522  *)
5523  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5524for as_dir in $PATH
5525do
5526  IFS=$as_save_IFS
5527  test -z "$as_dir" && as_dir=.
5528    for ac_exec_ext in '' $ac_executable_extensions; do
5529  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5530    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
5531    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5532    break 2
5533  fi
5534done
5535  done
5536IFS=$as_save_IFS
5537
5538  ;;
5539esac
5540fi
5541TEE=$ac_cv_path_TEE
5542if test -n "$TEE"; then
5543  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
5544$as_echo "$TEE" >&6; }
5545else
5546  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5547$as_echo "no" >&6; }
5548fi
5549
5550
5551  test -n "$TEE" && break
5552done
5553
5554
5555  if test "x$TEE" = x; then
5556    if test "xtee" = x; then
5557      PROG_NAME=tee
5558    else
5559      PROG_NAME=tee
5560    fi
5561    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5562$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5563    as_fn_error $? "Cannot continue" "$LINENO" 5
5564  fi
5565
5566
5567
5568  for ac_prog in touch
5569do
5570  # Extract the first word of "$ac_prog", so it can be a program name with args.
5571set dummy $ac_prog; ac_word=$2
5572{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5573$as_echo_n "checking for $ac_word... " >&6; }
5574if ${ac_cv_path_TOUCH+:} false; then :
5575  $as_echo_n "(cached) " >&6
5576else
5577  case $TOUCH in
5578  [\\/]* | ?:[\\/]*)
5579  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
5580  ;;
5581  *)
5582  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5583for as_dir in $PATH
5584do
5585  IFS=$as_save_IFS
5586  test -z "$as_dir" && as_dir=.
5587    for ac_exec_ext in '' $ac_executable_extensions; do
5588  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5589    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
5590    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5591    break 2
5592  fi
5593done
5594  done
5595IFS=$as_save_IFS
5596
5597  ;;
5598esac
5599fi
5600TOUCH=$ac_cv_path_TOUCH
5601if test -n "$TOUCH"; then
5602  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
5603$as_echo "$TOUCH" >&6; }
5604else
5605  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5606$as_echo "no" >&6; }
5607fi
5608
5609
5610  test -n "$TOUCH" && break
5611done
5612
5613
5614  if test "x$TOUCH" = x; then
5615    if test "xtouch" = x; then
5616      PROG_NAME=touch
5617    else
5618      PROG_NAME=touch
5619    fi
5620    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5621$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5622    as_fn_error $? "Cannot continue" "$LINENO" 5
5623  fi
5624
5625
5626
5627  for ac_prog in tr
5628do
5629  # Extract the first word of "$ac_prog", so it can be a program name with args.
5630set dummy $ac_prog; ac_word=$2
5631{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5632$as_echo_n "checking for $ac_word... " >&6; }
5633if ${ac_cv_path_TR+:} false; then :
5634  $as_echo_n "(cached) " >&6
5635else
5636  case $TR in
5637  [\\/]* | ?:[\\/]*)
5638  ac_cv_path_TR="$TR" # Let the user override the test with a path.
5639  ;;
5640  *)
5641  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5642for as_dir in $PATH
5643do
5644  IFS=$as_save_IFS
5645  test -z "$as_dir" && as_dir=.
5646    for ac_exec_ext in '' $ac_executable_extensions; do
5647  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5648    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
5649    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5650    break 2
5651  fi
5652done
5653  done
5654IFS=$as_save_IFS
5655
5656  ;;
5657esac
5658fi
5659TR=$ac_cv_path_TR
5660if test -n "$TR"; then
5661  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
5662$as_echo "$TR" >&6; }
5663else
5664  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5665$as_echo "no" >&6; }
5666fi
5667
5668
5669  test -n "$TR" && break
5670done
5671
5672
5673  if test "x$TR" = x; then
5674    if test "xtr" = x; then
5675      PROG_NAME=tr
5676    else
5677      PROG_NAME=tr
5678    fi
5679    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5680$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5681    as_fn_error $? "Cannot continue" "$LINENO" 5
5682  fi
5683
5684
5685
5686  for ac_prog in uname
5687do
5688  # Extract the first word of "$ac_prog", so it can be a program name with args.
5689set dummy $ac_prog; ac_word=$2
5690{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5691$as_echo_n "checking for $ac_word... " >&6; }
5692if ${ac_cv_path_UNAME+:} false; then :
5693  $as_echo_n "(cached) " >&6
5694else
5695  case $UNAME in
5696  [\\/]* | ?:[\\/]*)
5697  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
5698  ;;
5699  *)
5700  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5701for as_dir in $PATH
5702do
5703  IFS=$as_save_IFS
5704  test -z "$as_dir" && as_dir=.
5705    for ac_exec_ext in '' $ac_executable_extensions; do
5706  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5707    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
5708    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5709    break 2
5710  fi
5711done
5712  done
5713IFS=$as_save_IFS
5714
5715  ;;
5716esac
5717fi
5718UNAME=$ac_cv_path_UNAME
5719if test -n "$UNAME"; then
5720  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
5721$as_echo "$UNAME" >&6; }
5722else
5723  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5724$as_echo "no" >&6; }
5725fi
5726
5727
5728  test -n "$UNAME" && break
5729done
5730
5731
5732  if test "x$UNAME" = x; then
5733    if test "xuname" = x; then
5734      PROG_NAME=uname
5735    else
5736      PROG_NAME=uname
5737    fi
5738    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5739$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5740    as_fn_error $? "Cannot continue" "$LINENO" 5
5741  fi
5742
5743
5744
5745  for ac_prog in uniq
5746do
5747  # Extract the first word of "$ac_prog", so it can be a program name with args.
5748set dummy $ac_prog; ac_word=$2
5749{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5750$as_echo_n "checking for $ac_word... " >&6; }
5751if ${ac_cv_path_UNIQ+:} false; then :
5752  $as_echo_n "(cached) " >&6
5753else
5754  case $UNIQ in
5755  [\\/]* | ?:[\\/]*)
5756  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
5757  ;;
5758  *)
5759  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5760for as_dir in $PATH
5761do
5762  IFS=$as_save_IFS
5763  test -z "$as_dir" && as_dir=.
5764    for ac_exec_ext in '' $ac_executable_extensions; do
5765  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5766    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
5767    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5768    break 2
5769  fi
5770done
5771  done
5772IFS=$as_save_IFS
5773
5774  ;;
5775esac
5776fi
5777UNIQ=$ac_cv_path_UNIQ
5778if test -n "$UNIQ"; then
5779  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
5780$as_echo "$UNIQ" >&6; }
5781else
5782  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5783$as_echo "no" >&6; }
5784fi
5785
5786
5787  test -n "$UNIQ" && break
5788done
5789
5790
5791  if test "x$UNIQ" = x; then
5792    if test "xuniq" = x; then
5793      PROG_NAME=uniq
5794    else
5795      PROG_NAME=uniq
5796    fi
5797    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5798$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5799    as_fn_error $? "Cannot continue" "$LINENO" 5
5800  fi
5801
5802
5803
5804  for ac_prog in wc
5805do
5806  # Extract the first word of "$ac_prog", so it can be a program name with args.
5807set dummy $ac_prog; ac_word=$2
5808{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5809$as_echo_n "checking for $ac_word... " >&6; }
5810if ${ac_cv_path_WC+:} false; then :
5811  $as_echo_n "(cached) " >&6
5812else
5813  case $WC in
5814  [\\/]* | ?:[\\/]*)
5815  ac_cv_path_WC="$WC" # Let the user override the test with a path.
5816  ;;
5817  *)
5818  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5819for as_dir in $PATH
5820do
5821  IFS=$as_save_IFS
5822  test -z "$as_dir" && as_dir=.
5823    for ac_exec_ext in '' $ac_executable_extensions; do
5824  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5825    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
5826    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5827    break 2
5828  fi
5829done
5830  done
5831IFS=$as_save_IFS
5832
5833  ;;
5834esac
5835fi
5836WC=$ac_cv_path_WC
5837if test -n "$WC"; then
5838  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
5839$as_echo "$WC" >&6; }
5840else
5841  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5842$as_echo "no" >&6; }
5843fi
5844
5845
5846  test -n "$WC" && break
5847done
5848
5849
5850  if test "x$WC" = x; then
5851    if test "xwc" = x; then
5852      PROG_NAME=wc
5853    else
5854      PROG_NAME=wc
5855    fi
5856    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5857$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5858    as_fn_error $? "Cannot continue" "$LINENO" 5
5859  fi
5860
5861
5862
5863  for ac_prog in which
5864do
5865  # Extract the first word of "$ac_prog", so it can be a program name with args.
5866set dummy $ac_prog; ac_word=$2
5867{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5868$as_echo_n "checking for $ac_word... " >&6; }
5869if ${ac_cv_path_WHICH+:} false; then :
5870  $as_echo_n "(cached) " >&6
5871else
5872  case $WHICH in
5873  [\\/]* | ?:[\\/]*)
5874  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
5875  ;;
5876  *)
5877  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5878for as_dir in $PATH
5879do
5880  IFS=$as_save_IFS
5881  test -z "$as_dir" && as_dir=.
5882    for ac_exec_ext in '' $ac_executable_extensions; do
5883  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5884    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
5885    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5886    break 2
5887  fi
5888done
5889  done
5890IFS=$as_save_IFS
5891
5892  ;;
5893esac
5894fi
5895WHICH=$ac_cv_path_WHICH
5896if test -n "$WHICH"; then
5897  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
5898$as_echo "$WHICH" >&6; }
5899else
5900  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5901$as_echo "no" >&6; }
5902fi
5903
5904
5905  test -n "$WHICH" && break
5906done
5907
5908
5909  if test "x$WHICH" = x; then
5910    if test "xwhich" = x; then
5911      PROG_NAME=which
5912    else
5913      PROG_NAME=which
5914    fi
5915    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5916$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5917    as_fn_error $? "Cannot continue" "$LINENO" 5
5918  fi
5919
5920
5921
5922  for ac_prog in xargs
5923do
5924  # Extract the first word of "$ac_prog", so it can be a program name with args.
5925set dummy $ac_prog; ac_word=$2
5926{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5927$as_echo_n "checking for $ac_word... " >&6; }
5928if ${ac_cv_path_XARGS+:} false; then :
5929  $as_echo_n "(cached) " >&6
5930else
5931  case $XARGS in
5932  [\\/]* | ?:[\\/]*)
5933  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
5934  ;;
5935  *)
5936  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5937for as_dir in $PATH
5938do
5939  IFS=$as_save_IFS
5940  test -z "$as_dir" && as_dir=.
5941    for ac_exec_ext in '' $ac_executable_extensions; do
5942  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5943    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
5944    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5945    break 2
5946  fi
5947done
5948  done
5949IFS=$as_save_IFS
5950
5951  ;;
5952esac
5953fi
5954XARGS=$ac_cv_path_XARGS
5955if test -n "$XARGS"; then
5956  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
5957$as_echo "$XARGS" >&6; }
5958else
5959  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5960$as_echo "no" >&6; }
5961fi
5962
5963
5964  test -n "$XARGS" && break
5965done
5966
5967
5968  if test "x$XARGS" = x; then
5969    if test "xxargs" = x; then
5970      PROG_NAME=xargs
5971    else
5972      PROG_NAME=xargs
5973    fi
5974    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5975$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5976    as_fn_error $? "Cannot continue" "$LINENO" 5
5977  fi
5978
5979
5980
5981  # Then required tools that require some special treatment.
5982  for ac_prog in gawk mawk nawk awk
5983do
5984  # Extract the first word of "$ac_prog", so it can be a program name with args.
5985set dummy $ac_prog; ac_word=$2
5986{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5987$as_echo_n "checking for $ac_word... " >&6; }
5988if ${ac_cv_prog_AWK+:} false; then :
5989  $as_echo_n "(cached) " >&6
5990else
5991  if test -n "$AWK"; then
5992  ac_cv_prog_AWK="$AWK" # Let the user override the test.
5993else
5994as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5995for as_dir in $PATH
5996do
5997  IFS=$as_save_IFS
5998  test -z "$as_dir" && as_dir=.
5999    for ac_exec_ext in '' $ac_executable_extensions; do
6000  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6001    ac_cv_prog_AWK="$ac_prog"
6002    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6003    break 2
6004  fi
6005done
6006  done
6007IFS=$as_save_IFS
6008
6009fi
6010fi
6011AWK=$ac_cv_prog_AWK
6012if test -n "$AWK"; then
6013  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
6014$as_echo "$AWK" >&6; }
6015else
6016  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6017$as_echo "no" >&6; }
6018fi
6019
6020
6021  test -n "$AWK" && break
6022done
6023
6024
6025  if test "x$AWK" = x; then
6026    if test "x" = x; then
6027      PROG_NAME=awk
6028    else
6029      PROG_NAME=
6030    fi
6031    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6032$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6033    as_fn_error $? "Cannot continue" "$LINENO" 5
6034  fi
6035
6036  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
6037$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
6038if ${ac_cv_path_GREP+:} false; then :
6039  $as_echo_n "(cached) " >&6
6040else
6041  if test -z "$GREP"; then
6042  ac_path_GREP_found=false
6043  # Loop through the user's path and test for each of PROGNAME-LIST
6044  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6045for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6046do
6047  IFS=$as_save_IFS
6048  test -z "$as_dir" && as_dir=.
6049    for ac_prog in grep ggrep; do
6050    for ac_exec_ext in '' $ac_executable_extensions; do
6051      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
6052      as_fn_executable_p "$ac_path_GREP" || continue
6053# Check for GNU ac_path_GREP and select it if it is found.
6054  # Check for GNU $ac_path_GREP
6055case `"$ac_path_GREP" --version 2>&1` in
6056*GNU*)
6057  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
6058*)
6059  ac_count=0
6060  $as_echo_n 0123456789 >"conftest.in"
6061  while :
6062  do
6063    cat "conftest.in" "conftest.in" >"conftest.tmp"
6064    mv "conftest.tmp" "conftest.in"
6065    cp "conftest.in" "conftest.nl"
6066    $as_echo 'GREP' >> "conftest.nl"
6067    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6068    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6069    as_fn_arith $ac_count + 1 && ac_count=$as_val
6070    if test $ac_count -gt ${ac_path_GREP_max-0}; then
6071      # Best one so far, save it but keep looking for a better one
6072      ac_cv_path_GREP="$ac_path_GREP"
6073      ac_path_GREP_max=$ac_count
6074    fi
6075    # 10*(2^10) chars as input seems more than enough
6076    test $ac_count -gt 10 && break
6077  done
6078  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6079esac
6080
6081      $ac_path_GREP_found && break 3
6082    done
6083  done
6084  done
6085IFS=$as_save_IFS
6086  if test -z "$ac_cv_path_GREP"; then
6087    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6088  fi
6089else
6090  ac_cv_path_GREP=$GREP
6091fi
6092
6093fi
6094{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
6095$as_echo "$ac_cv_path_GREP" >&6; }
6096 GREP="$ac_cv_path_GREP"
6097
6098
6099
6100  if test "x$GREP" = x; then
6101    if test "x" = x; then
6102      PROG_NAME=grep
6103    else
6104      PROG_NAME=
6105    fi
6106    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6107$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6108    as_fn_error $? "Cannot continue" "$LINENO" 5
6109  fi
6110
6111  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
6112$as_echo_n "checking for egrep... " >&6; }
6113if ${ac_cv_path_EGREP+:} false; then :
6114  $as_echo_n "(cached) " >&6
6115else
6116  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
6117   then ac_cv_path_EGREP="$GREP -E"
6118   else
6119     if test -z "$EGREP"; then
6120  ac_path_EGREP_found=false
6121  # Loop through the user's path and test for each of PROGNAME-LIST
6122  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6123for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6124do
6125  IFS=$as_save_IFS
6126  test -z "$as_dir" && as_dir=.
6127    for ac_prog in egrep; do
6128    for ac_exec_ext in '' $ac_executable_extensions; do
6129      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
6130      as_fn_executable_p "$ac_path_EGREP" || continue
6131# Check for GNU ac_path_EGREP and select it if it is found.
6132  # Check for GNU $ac_path_EGREP
6133case `"$ac_path_EGREP" --version 2>&1` in
6134*GNU*)
6135  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
6136*)
6137  ac_count=0
6138  $as_echo_n 0123456789 >"conftest.in"
6139  while :
6140  do
6141    cat "conftest.in" "conftest.in" >"conftest.tmp"
6142    mv "conftest.tmp" "conftest.in"
6143    cp "conftest.in" "conftest.nl"
6144    $as_echo 'EGREP' >> "conftest.nl"
6145    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6146    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6147    as_fn_arith $ac_count + 1 && ac_count=$as_val
6148    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
6149      # Best one so far, save it but keep looking for a better one
6150      ac_cv_path_EGREP="$ac_path_EGREP"
6151      ac_path_EGREP_max=$ac_count
6152    fi
6153    # 10*(2^10) chars as input seems more than enough
6154    test $ac_count -gt 10 && break
6155  done
6156  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6157esac
6158
6159      $ac_path_EGREP_found && break 3
6160    done
6161  done
6162  done
6163IFS=$as_save_IFS
6164  if test -z "$ac_cv_path_EGREP"; then
6165    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6166  fi
6167else
6168  ac_cv_path_EGREP=$EGREP
6169fi
6170
6171   fi
6172fi
6173{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
6174$as_echo "$ac_cv_path_EGREP" >&6; }
6175 EGREP="$ac_cv_path_EGREP"
6176
6177
6178
6179  if test "x$EGREP" = x; then
6180    if test "x" = x; then
6181      PROG_NAME=egrep
6182    else
6183      PROG_NAME=
6184    fi
6185    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6186$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6187    as_fn_error $? "Cannot continue" "$LINENO" 5
6188  fi
6189
6190  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
6191$as_echo_n "checking for fgrep... " >&6; }
6192if ${ac_cv_path_FGREP+:} false; then :
6193  $as_echo_n "(cached) " >&6
6194else
6195  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
6196   then ac_cv_path_FGREP="$GREP -F"
6197   else
6198     if test -z "$FGREP"; then
6199  ac_path_FGREP_found=false
6200  # Loop through the user's path and test for each of PROGNAME-LIST
6201  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6202for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6203do
6204  IFS=$as_save_IFS
6205  test -z "$as_dir" && as_dir=.
6206    for ac_prog in fgrep; do
6207    for ac_exec_ext in '' $ac_executable_extensions; do
6208      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
6209      as_fn_executable_p "$ac_path_FGREP" || continue
6210# Check for GNU ac_path_FGREP and select it if it is found.
6211  # Check for GNU $ac_path_FGREP
6212case `"$ac_path_FGREP" --version 2>&1` in
6213*GNU*)
6214  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
6215*)
6216  ac_count=0
6217  $as_echo_n 0123456789 >"conftest.in"
6218  while :
6219  do
6220    cat "conftest.in" "conftest.in" >"conftest.tmp"
6221    mv "conftest.tmp" "conftest.in"
6222    cp "conftest.in" "conftest.nl"
6223    $as_echo 'FGREP' >> "conftest.nl"
6224    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
6225    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6226    as_fn_arith $ac_count + 1 && ac_count=$as_val
6227    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
6228      # Best one so far, save it but keep looking for a better one
6229      ac_cv_path_FGREP="$ac_path_FGREP"
6230      ac_path_FGREP_max=$ac_count
6231    fi
6232    # 10*(2^10) chars as input seems more than enough
6233    test $ac_count -gt 10 && break
6234  done
6235  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6236esac
6237
6238      $ac_path_FGREP_found && break 3
6239    done
6240  done
6241  done
6242IFS=$as_save_IFS
6243  if test -z "$ac_cv_path_FGREP"; then
6244    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6245  fi
6246else
6247  ac_cv_path_FGREP=$FGREP
6248fi
6249
6250   fi
6251fi
6252{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
6253$as_echo "$ac_cv_path_FGREP" >&6; }
6254 FGREP="$ac_cv_path_FGREP"
6255
6256
6257
6258  if test "x$FGREP" = x; then
6259    if test "x" = x; then
6260      PROG_NAME=fgrep
6261    else
6262      PROG_NAME=
6263    fi
6264    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6265$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6266    as_fn_error $? "Cannot continue" "$LINENO" 5
6267  fi
6268
6269  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
6270$as_echo_n "checking for a sed that does not truncate output... " >&6; }
6271if ${ac_cv_path_SED+:} false; then :
6272  $as_echo_n "(cached) " >&6
6273else
6274            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
6275     for ac_i in 1 2 3 4 5 6 7; do
6276       ac_script="$ac_script$as_nl$ac_script"
6277     done
6278     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
6279     { ac_script=; unset ac_script;}
6280     if test -z "$SED"; then
6281  ac_path_SED_found=false
6282  # Loop through the user's path and test for each of PROGNAME-LIST
6283  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6284for as_dir in $PATH
6285do
6286  IFS=$as_save_IFS
6287  test -z "$as_dir" && as_dir=.
6288    for ac_prog in sed gsed; do
6289    for ac_exec_ext in '' $ac_executable_extensions; do
6290      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
6291      as_fn_executable_p "$ac_path_SED" || continue
6292# Check for GNU ac_path_SED and select it if it is found.
6293  # Check for GNU $ac_path_SED
6294case `"$ac_path_SED" --version 2>&1` in
6295*GNU*)
6296  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
6297*)
6298  ac_count=0
6299  $as_echo_n 0123456789 >"conftest.in"
6300  while :
6301  do
6302    cat "conftest.in" "conftest.in" >"conftest.tmp"
6303    mv "conftest.tmp" "conftest.in"
6304    cp "conftest.in" "conftest.nl"
6305    $as_echo '' >> "conftest.nl"
6306    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
6307    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6308    as_fn_arith $ac_count + 1 && ac_count=$as_val
6309    if test $ac_count -gt ${ac_path_SED_max-0}; then
6310      # Best one so far, save it but keep looking for a better one
6311      ac_cv_path_SED="$ac_path_SED"
6312      ac_path_SED_max=$ac_count
6313    fi
6314    # 10*(2^10) chars as input seems more than enough
6315    test $ac_count -gt 10 && break
6316  done
6317  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6318esac
6319
6320      $ac_path_SED_found && break 3
6321    done
6322  done
6323  done
6324IFS=$as_save_IFS
6325  if test -z "$ac_cv_path_SED"; then
6326    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
6327  fi
6328else
6329  ac_cv_path_SED=$SED
6330fi
6331
6332fi
6333{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
6334$as_echo "$ac_cv_path_SED" >&6; }
6335 SED="$ac_cv_path_SED"
6336  rm -f conftest.sed
6337
6338
6339  if test "x$SED" = x; then
6340    if test "x" = x; then
6341      PROG_NAME=sed
6342    else
6343      PROG_NAME=
6344    fi
6345    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6346$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6347    as_fn_error $? "Cannot continue" "$LINENO" 5
6348  fi
6349
6350
6351  for ac_prog in nawk gawk awk
6352do
6353  # Extract the first word of "$ac_prog", so it can be a program name with args.
6354set dummy $ac_prog; ac_word=$2
6355{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6356$as_echo_n "checking for $ac_word... " >&6; }
6357if ${ac_cv_path_NAWK+:} false; then :
6358  $as_echo_n "(cached) " >&6
6359else
6360  case $NAWK in
6361  [\\/]* | ?:[\\/]*)
6362  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
6363  ;;
6364  *)
6365  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6366for as_dir in $PATH
6367do
6368  IFS=$as_save_IFS
6369  test -z "$as_dir" && as_dir=.
6370    for ac_exec_ext in '' $ac_executable_extensions; do
6371  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6372    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
6373    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6374    break 2
6375  fi
6376done
6377  done
6378IFS=$as_save_IFS
6379
6380  ;;
6381esac
6382fi
6383NAWK=$ac_cv_path_NAWK
6384if test -n "$NAWK"; then
6385  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
6386$as_echo "$NAWK" >&6; }
6387else
6388  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6389$as_echo "no" >&6; }
6390fi
6391
6392
6393  test -n "$NAWK" && break
6394done
6395
6396
6397  if test "x$NAWK" = x; then
6398    if test "x" = x; then
6399      PROG_NAME=nawk
6400    else
6401      PROG_NAME=
6402    fi
6403    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6404$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6405    as_fn_error $? "Cannot continue" "$LINENO" 5
6406  fi
6407
6408
6409  # Always force rm.
6410  RM="$RM -f"
6411
6412  # pwd behaves differently on various platforms and some don't support the -L flag.
6413  # Always use the bash builtin pwd to get uniform behavior.
6414  THEPWDCMD=pwd
6415
6416  # These are not required on all platforms
6417  # Extract the first word of "cygpath", so it can be a program name with args.
6418set dummy cygpath; ac_word=$2
6419{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6420$as_echo_n "checking for $ac_word... " >&6; }
6421if ${ac_cv_path_CYGPATH+:} false; then :
6422  $as_echo_n "(cached) " >&6
6423else
6424  case $CYGPATH in
6425  [\\/]* | ?:[\\/]*)
6426  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
6427  ;;
6428  *)
6429  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6430for as_dir in $PATH
6431do
6432  IFS=$as_save_IFS
6433  test -z "$as_dir" && as_dir=.
6434    for ac_exec_ext in '' $ac_executable_extensions; do
6435  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6436    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
6437    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6438    break 2
6439  fi
6440done
6441  done
6442IFS=$as_save_IFS
6443
6444  ;;
6445esac
6446fi
6447CYGPATH=$ac_cv_path_CYGPATH
6448if test -n "$CYGPATH"; then
6449  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
6450$as_echo "$CYGPATH" >&6; }
6451else
6452  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6453$as_echo "no" >&6; }
6454fi
6455
6456
6457  # Extract the first word of "readlink", so it can be a program name with args.
6458set dummy readlink; ac_word=$2
6459{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6460$as_echo_n "checking for $ac_word... " >&6; }
6461if ${ac_cv_path_READLINK+:} false; then :
6462  $as_echo_n "(cached) " >&6
6463else
6464  case $READLINK in
6465  [\\/]* | ?:[\\/]*)
6466  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
6467  ;;
6468  *)
6469  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6470for as_dir in $PATH
6471do
6472  IFS=$as_save_IFS
6473  test -z "$as_dir" && as_dir=.
6474    for ac_exec_ext in '' $ac_executable_extensions; do
6475  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6476    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
6477    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6478    break 2
6479  fi
6480done
6481  done
6482IFS=$as_save_IFS
6483
6484  ;;
6485esac
6486fi
6487READLINK=$ac_cv_path_READLINK
6488if test -n "$READLINK"; then
6489  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
6490$as_echo "$READLINK" >&6; }
6491else
6492  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6493$as_echo "no" >&6; }
6494fi
6495
6496
6497  # Extract the first word of "df", so it can be a program name with args.
6498set dummy df; ac_word=$2
6499{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6500$as_echo_n "checking for $ac_word... " >&6; }
6501if ${ac_cv_path_DF+:} false; then :
6502  $as_echo_n "(cached) " >&6
6503else
6504  case $DF in
6505  [\\/]* | ?:[\\/]*)
6506  ac_cv_path_DF="$DF" # Let the user override the test with a path.
6507  ;;
6508  *)
6509  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6510for as_dir in $PATH
6511do
6512  IFS=$as_save_IFS
6513  test -z "$as_dir" && as_dir=.
6514    for ac_exec_ext in '' $ac_executable_extensions; do
6515  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6516    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
6517    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6518    break 2
6519  fi
6520done
6521  done
6522IFS=$as_save_IFS
6523
6524  ;;
6525esac
6526fi
6527DF=$ac_cv_path_DF
6528if test -n "$DF"; then
6529  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
6530$as_echo "$DF" >&6; }
6531else
6532  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6533$as_echo "no" >&6; }
6534fi
6535
6536
6537  # Extract the first word of "SetFile", so it can be a program name with args.
6538set dummy SetFile; ac_word=$2
6539{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6540$as_echo_n "checking for $ac_word... " >&6; }
6541if ${ac_cv_path_SETFILE+:} false; then :
6542  $as_echo_n "(cached) " >&6
6543else
6544  case $SETFILE in
6545  [\\/]* | ?:[\\/]*)
6546  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
6547  ;;
6548  *)
6549  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6550for as_dir in $PATH
6551do
6552  IFS=$as_save_IFS
6553  test -z "$as_dir" && as_dir=.
6554    for ac_exec_ext in '' $ac_executable_extensions; do
6555  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6556    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
6557    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6558    break 2
6559  fi
6560done
6561  done
6562IFS=$as_save_IFS
6563
6564  ;;
6565esac
6566fi
6567SETFILE=$ac_cv_path_SETFILE
6568if test -n "$SETFILE"; then
6569  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
6570$as_echo "$SETFILE" >&6; }
6571else
6572  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6573$as_echo "no" >&6; }
6574fi
6575
6576
6577
6578
6579# Now we can determine OpenJDK build and target platforms. This is required to
6580# have early on.
6581# Make sure we can run config.sub.
6582$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
6583  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
6584
6585{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
6586$as_echo_n "checking build system type... " >&6; }
6587if ${ac_cv_build+:} false; then :
6588  $as_echo_n "(cached) " >&6
6589else
6590  ac_build_alias=$build_alias
6591test "x$ac_build_alias" = x &&
6592  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
6593test "x$ac_build_alias" = x &&
6594  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
6595ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
6596  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
6597
6598fi
6599{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
6600$as_echo "$ac_cv_build" >&6; }
6601case $ac_cv_build in
6602*-*-*) ;;
6603*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
6604esac
6605build=$ac_cv_build
6606ac_save_IFS=$IFS; IFS='-'
6607set x $ac_cv_build
6608shift
6609build_cpu=$1
6610build_vendor=$2
6611shift; shift
6612# Remember, the first character of IFS is used to create $*,
6613# except with old shells:
6614build_os=$*
6615IFS=$ac_save_IFS
6616case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
6617
6618
6619{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
6620$as_echo_n "checking host system type... " >&6; }
6621if ${ac_cv_host+:} false; then :
6622  $as_echo_n "(cached) " >&6
6623else
6624  if test "x$host_alias" = x; then
6625  ac_cv_host=$ac_cv_build
6626else
6627  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
6628    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
6629fi
6630
6631fi
6632{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
6633$as_echo "$ac_cv_host" >&6; }
6634case $ac_cv_host in
6635*-*-*) ;;
6636*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
6637esac
6638host=$ac_cv_host
6639ac_save_IFS=$IFS; IFS='-'
6640set x $ac_cv_host
6641shift
6642host_cpu=$1
6643host_vendor=$2
6644shift; shift
6645# Remember, the first character of IFS is used to create $*,
6646# except with old shells:
6647host_os=$*
6648IFS=$ac_save_IFS
6649case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
6650
6651
6652{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
6653$as_echo_n "checking target system type... " >&6; }
6654if ${ac_cv_target+:} false; then :
6655  $as_echo_n "(cached) " >&6
6656else
6657  if test "x$target_alias" = x; then
6658  ac_cv_target=$ac_cv_host
6659else
6660  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
6661    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
6662fi
6663
6664fi
6665{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
6666$as_echo "$ac_cv_target" >&6; }
6667case $ac_cv_target in
6668*-*-*) ;;
6669*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
6670esac
6671target=$ac_cv_target
6672ac_save_IFS=$IFS; IFS='-'
6673set x $ac_cv_target
6674shift
6675target_cpu=$1
6676target_vendor=$2
6677shift; shift
6678# Remember, the first character of IFS is used to create $*,
6679# except with old shells:
6680target_os=$*
6681IFS=$ac_save_IFS
6682case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
6683
6684
6685# The aliases save the names the user supplied, while $host etc.
6686# will get canonicalized.
6687test -n "$target_alias" &&
6688  test "$program_prefix$program_suffix$program_transform_name" = \
6689    NONENONEs,x,x, &&
6690  program_prefix=${target_alias}-
6691
6692  # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
6693  # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
6694  # product you're building. The target of this build is called "host". Since this is confusing to most people, we
6695  # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
6696  # to use the configure naming style.
6697
6698
6699
6700
6701
6702  # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
6703  # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
6704  # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
6705  # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
6706  OPENJDK_TARGET_AUTOCONF_NAME="$host"
6707  OPENJDK_BUILD_AUTOCONF_NAME="$build"
6708
6709
6710
6711  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
6712
6713  case "$build_os" in
6714    *linux*)
6715      VAR_OS=linux
6716      VAR_OS_API=posix
6717      VAR_OS_ENV=linux
6718      ;;
6719    *solaris*)
6720      VAR_OS=solaris
6721      VAR_OS_API=posix
6722      VAR_OS_ENV=solaris
6723      ;;
6724    *darwin*)
6725      VAR_OS=macosx
6726      VAR_OS_API=posix
6727      VAR_OS_ENV=macosx
6728      ;;
6729    *bsd*)
6730      VAR_OS=bsd
6731      VAR_OS_API=posix
6732      VAR_OS_ENV=bsd
6733      ;;
6734    *cygwin*)
6735      VAR_OS=windows
6736      VAR_OS_API=winapi
6737      VAR_OS_ENV=windows.cygwin
6738      ;;
6739    *mingw*)
6740      VAR_OS=windows
6741      VAR_OS_API=winapi
6742      VAR_OS_ENV=windows.msys
6743      ;;
6744    *)
6745      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
6746      ;;
6747  esac
6748
6749
6750  # First argument is the cpu name from the trip/quad
6751  case "$build_cpu" in
6752    x86_64)
6753      VAR_CPU=x86_64
6754      VAR_CPU_ARCH=x86
6755      VAR_CPU_BITS=64
6756      VAR_CPU_ENDIAN=little
6757      ;;
6758    i?86)
6759      VAR_CPU=x86
6760      VAR_CPU_ARCH=x86
6761      VAR_CPU_BITS=32
6762      VAR_CPU_ENDIAN=little
6763      ;;
6764    arm*)
6765      VAR_CPU=arm
6766      VAR_CPU_ARCH=arm
6767      VAR_CPU_BITS=32
6768      VAR_CPU_ENDIAN=little
6769      ;;
6770    powerpc)
6771      VAR_CPU=ppc
6772      VAR_CPU_ARCH=ppc
6773      VAR_CPU_BITS=32
6774      VAR_CPU_ENDIAN=big
6775      ;;
6776    powerpc64)
6777      VAR_CPU=ppc64
6778      VAR_CPU_ARCH=ppc
6779      VAR_CPU_BITS=64
6780      VAR_CPU_ENDIAN=big
6781      ;;
6782    s390)
6783      VAR_CPU=s390
6784      VAR_CPU_ARCH=s390
6785      VAR_CPU_BITS=32
6786      VAR_CPU_ENDIAN=big
6787      ;;
6788    s390x)
6789      VAR_CPU=s390x
6790      VAR_CPU_ARCH=s390
6791      VAR_CPU_BITS=64
6792      VAR_CPU_ENDIAN=big
6793      ;;
6794    sparc)
6795      VAR_CPU=sparc
6796      VAR_CPU_ARCH=sparc
6797      VAR_CPU_BITS=32
6798      VAR_CPU_ENDIAN=big
6799      ;;
6800    sparcv9)
6801      VAR_CPU=sparcv9
6802      VAR_CPU_ARCH=sparc
6803      VAR_CPU_BITS=64
6804      VAR_CPU_ENDIAN=big
6805      ;;
6806    *)
6807      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
6808      ;;
6809  esac
6810
6811  # ..and setup our own variables. (Do this explicitely to facilitate searching)
6812  OPENJDK_BUILD_OS="$VAR_OS"
6813  OPENJDK_BUILD_OS_API="$VAR_OS_API"
6814  OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
6815  OPENJDK_BUILD_CPU="$VAR_CPU"
6816  OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
6817  OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
6818  OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
6819
6820
6821
6822
6823
6824
6825
6826  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
6827$as_echo_n "checking openjdk-build os-cpu... " >&6; }
6828  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
6829$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
6830
6831  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
6832
6833  case "$host_os" in
6834    *linux*)
6835      VAR_OS=linux
6836      VAR_OS_API=posix
6837      VAR_OS_ENV=linux
6838      ;;
6839    *solaris*)
6840      VAR_OS=solaris
6841      VAR_OS_API=posix
6842      VAR_OS_ENV=solaris
6843      ;;
6844    *darwin*)
6845      VAR_OS=macosx
6846      VAR_OS_API=posix
6847      VAR_OS_ENV=macosx
6848      ;;
6849    *bsd*)
6850      VAR_OS=bsd
6851      VAR_OS_API=posix
6852      VAR_OS_ENV=bsd
6853      ;;
6854    *cygwin*)
6855      VAR_OS=windows
6856      VAR_OS_API=winapi
6857      VAR_OS_ENV=windows.cygwin
6858      ;;
6859    *mingw*)
6860      VAR_OS=windows
6861      VAR_OS_API=winapi
6862      VAR_OS_ENV=windows.msys
6863      ;;
6864    *)
6865      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
6866      ;;
6867  esac
6868
6869
6870  # First argument is the cpu name from the trip/quad
6871  case "$host_cpu" in
6872    x86_64)
6873      VAR_CPU=x86_64
6874      VAR_CPU_ARCH=x86
6875      VAR_CPU_BITS=64
6876      VAR_CPU_ENDIAN=little
6877      ;;
6878    i?86)
6879      VAR_CPU=x86
6880      VAR_CPU_ARCH=x86
6881      VAR_CPU_BITS=32
6882      VAR_CPU_ENDIAN=little
6883      ;;
6884    arm*)
6885      VAR_CPU=arm
6886      VAR_CPU_ARCH=arm
6887      VAR_CPU_BITS=32
6888      VAR_CPU_ENDIAN=little
6889      ;;
6890    powerpc)
6891      VAR_CPU=ppc
6892      VAR_CPU_ARCH=ppc
6893      VAR_CPU_BITS=32
6894      VAR_CPU_ENDIAN=big
6895      ;;
6896    powerpc64)
6897      VAR_CPU=ppc64
6898      VAR_CPU_ARCH=ppc
6899      VAR_CPU_BITS=64
6900      VAR_CPU_ENDIAN=big
6901      ;;
6902    s390)
6903      VAR_CPU=s390
6904      VAR_CPU_ARCH=s390
6905      VAR_CPU_BITS=32
6906      VAR_CPU_ENDIAN=big
6907      ;;
6908    s390x)
6909      VAR_CPU=s390x
6910      VAR_CPU_ARCH=s390
6911      VAR_CPU_BITS=64
6912      VAR_CPU_ENDIAN=big
6913      ;;
6914    sparc)
6915      VAR_CPU=sparc
6916      VAR_CPU_ARCH=sparc
6917      VAR_CPU_BITS=32
6918      VAR_CPU_ENDIAN=big
6919      ;;
6920    sparcv9)
6921      VAR_CPU=sparcv9
6922      VAR_CPU_ARCH=sparc
6923      VAR_CPU_BITS=64
6924      VAR_CPU_ENDIAN=big
6925      ;;
6926    *)
6927      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
6928      ;;
6929  esac
6930
6931  # ... and setup our own variables. (Do this explicitely to facilitate searching)
6932  OPENJDK_TARGET_OS="$VAR_OS"
6933  OPENJDK_TARGET_OS_API="$VAR_OS_API"
6934  OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
6935  OPENJDK_TARGET_CPU="$VAR_CPU"
6936  OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
6937  OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
6938  OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
6939
6940
6941
6942
6943
6944
6945
6946  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
6947$as_echo_n "checking openjdk-target os-cpu... " >&6; }
6948  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
6949$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
6950
6951
6952
6953# Check whether --with-target-bits was given.
6954if test "${with_target_bits+set}" = set; then :
6955  withval=$with_target_bits;
6956fi
6957
6958
6959  # We have three types of compiles:
6960  # native  == normal compilation, target system == build system
6961  # cross   == traditional cross compilation, target system != build system; special toolchain needed
6962  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
6963  #
6964  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
6965    # We're doing a proper cross-compilation
6966    COMPILE_TYPE="cross"
6967  else
6968    COMPILE_TYPE="native"
6969  fi
6970
6971  if test "x$with_target_bits" != x; then
6972    if test "x$COMPILE_TYPE" = "xcross"; then
6973      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
6974    fi
6975
6976    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
6977      # A reduced build is requested
6978      COMPILE_TYPE="reduced"
6979      OPENJDK_TARGET_CPU_BITS=32
6980      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
6981        OPENJDK_TARGET_CPU=x86
6982      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
6983        OPENJDK_TARGET_CPU=sparc
6984      else
6985        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
6986      fi
6987    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
6988      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
6989    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
6990      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
6991$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
6992    else
6993      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
6994    fi
6995  fi
6996
6997
6998  { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
6999$as_echo_n "checking compilation type... " >&6; }
7000  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
7001$as_echo "$COMPILE_TYPE" >&6; }
7002
7003
7004  if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
7005    REQUIRED_OS_NAME=SunOS
7006    REQUIRED_OS_VERSION=5.10
7007  fi
7008  if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
7009    REQUIRED_OS_NAME=Linux
7010    REQUIRED_OS_VERSION=2.6
7011  fi
7012  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
7013    REQUIRED_OS_NAME=Windows
7014    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
7015      REQUIRED_OS_VERSION=5.2
7016    else
7017      REQUIRED_OS_VERSION=5.1
7018    fi
7019  fi
7020  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
7021    REQUIRED_OS_NAME=Darwin
7022    REQUIRED_OS_VERSION=11.2
7023  fi
7024
7025
7026
7027
7028
7029  # Also store the legacy naming of the cpu.
7030  # Ie i586 and amd64 instead of x86 and x86_64
7031  OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
7032  if test "x$OPENJDK_TARGET_CPU" = xx86; then
7033    OPENJDK_TARGET_CPU_LEGACY="i586"
7034  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7035    # On all platforms except MacOSX replace x86_64 with amd64.
7036    OPENJDK_TARGET_CPU_LEGACY="amd64"
7037  fi
7038
7039
7040  # And the second legacy naming of the cpu.
7041  # Ie i386 and amd64 instead of x86 and x86_64.
7042  OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
7043  if test "x$OPENJDK_TARGET_CPU" = xx86; then
7044    OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
7045  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7046    OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
7047  fi
7048
7049
7050  # This is the name of the cpu (but using i386 and amd64 instead of
7051  # x86 and x86_64, respectively), preceeded by a /, to be used when
7052  # locating libraries. On macosx, it's empty, though.
7053  OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
7054  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
7055    OPENJDK_TARGET_CPU_LIBDIR=""
7056  fi
7057
7058
7059  # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
7060  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
7061  # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
7062  OPENJDK_TARGET_CPU_ISADIR=""
7063  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
7064    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7065      OPENJDK_TARGET_CPU_ISADIR="/amd64"
7066    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
7067      OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
7068    fi
7069  fi
7070
7071
7072  # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
7073  OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
7074  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
7075    # On linux only, we replace x86 with i386.
7076    OPENJDK_TARGET_CPU_OSARCH="i386"
7077  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7078    # On all platforms except macosx, we replace x86_64 with amd64.
7079    OPENJDK_TARGET_CPU_OSARCH="amd64"
7080  fi
7081
7082
7083  OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
7084  if test "x$OPENJDK_TARGET_CPU" = xx86; then
7085    OPENJDK_TARGET_CPU_JLI="i386"
7086  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7087    # On all platforms except macosx, we replace x86_64 with amd64.
7088    OPENJDK_TARGET_CPU_JLI="amd64"
7089  fi
7090  # Now setup the -D flags for building libjli.
7091  OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
7092  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
7093    if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
7094      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
7095    elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
7096      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
7097    fi
7098  fi
7099
7100
7101  # Setup OPENJDK_TARGET_OS_API_DIR, used in source paths.
7102  if test "x$OPENJDK_TARGET_OS_API" = xposix; then
7103    OPENJDK_TARGET_OS_API_DIR="solaris"
7104  fi
7105  if test "x$OPENJDK_TARGET_OS_API" = xwinapi; then
7106    OPENJDK_TARGET_OS_API_DIR="windows"
7107  fi
7108
7109
7110  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7111    A_LP64="LP64:="
7112    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
7113    # unpack200.exe
7114    if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
7115      ADD_LP64="-D_LP64=1"
7116    fi
7117  fi
7118  LP64=$A_LP64
7119
7120
7121  if test "x$COMPILE_TYPE" = "xcross"; then
7122    # FIXME: ... or should this include reduced builds..?
7123    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
7124  else
7125    DEFINE_CROSS_COMPILE_ARCH=""
7126  fi
7127
7128
7129  # ZERO_ARCHDEF is used to enable architecture-specific code
7130  case "${OPENJDK_TARGET_CPU}" in
7131    ppc*)    ZERO_ARCHDEF=PPC   ;;
7132    s390*)   ZERO_ARCHDEF=S390  ;;
7133    sparc*)  ZERO_ARCHDEF=SPARC ;;
7134    x86_64*) ZERO_ARCHDEF=AMD64 ;;
7135    x86)     ZERO_ARCHDEF=IA32  ;;
7136    *)      ZERO_ARCHDEF=$(echo "${OPENJDK_TARGET_CPU_LEGACY_LIB}" | tr a-z A-Z)
7137  esac
7138
7139
7140
7141
7142# Continue setting up basic stuff. Most remaining code require fundamental tools.
7143
7144  # Locate the directory of this script.
7145  SCRIPT="$0"
7146  AUTOCONF_DIR=`cd \`$DIRNAME $SCRIPT\`; $THEPWDCMD -L`
7147
7148  # Where is the source? It is located two levels above the configure script.
7149  CURDIR="$PWD"
7150  cd "$AUTOCONF_DIR/../.."
7151  SRC_ROOT="`$THEPWDCMD -L`"
7152
7153  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
7154    PATH_SEP=";"
7155
7156  SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
7157  if test $SRC_ROOT_LENGTH -gt 100; then
7158    as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
7159  fi
7160
7161  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7162    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
7163$as_echo_n "checking cygwin release... " >&6; }
7164    CYGWIN_VERSION=`$UNAME -r`
7165    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
7166$as_echo "$CYGWIN_VERSION" >&6; }
7167    WINDOWS_ENV_VENDOR='cygwin'
7168    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
7169
7170    CYGWIN_VERSION_OK=`$ECHO $CYGWIN_VERSION | $GREP ^1.7.`
7171    if test "x$CYGWIN_VERSION_OK" = x; then
7172      { $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
7173$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;}
7174      as_fn_error $? "Cannot continue" "$LINENO" 5
7175    fi
7176    if test "x$CYGPATH" = x; then
7177      as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
7178    fi
7179    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
7180$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
7181    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
7182    cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
7183    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
7184    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
7185    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
7186$as_echo "$CYGWIN_ROOT_PATH" >&6; }
7187    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
7188    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
7189    if test "x$test_cygdrive_prefix" = x; then
7190      as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
7191    fi
7192  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7193    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
7194$as_echo_n "checking msys release... " >&6; }
7195    MSYS_VERSION=`$UNAME -r`
7196    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
7197$as_echo "$MSYS_VERSION" >&6; }
7198
7199    WINDOWS_ENV_VENDOR='msys'
7200    WINDOWS_ENV_VERSION="$MSYS_VERSION"
7201
7202    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
7203$as_echo_n "checking msys root directory as unix-style path... " >&6; }
7204    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
7205    MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
7206
7207  windows_path="$MSYS_ROOT_PATH"
7208  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7209    unix_path=`$CYGPATH -u "$windows_path"`
7210    MSYS_ROOT_PATH="$unix_path"
7211  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7212    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7213    MSYS_ROOT_PATH="$unix_path"
7214  fi
7215
7216    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
7217$as_echo "$MSYS_ROOT_PATH" >&6; }
7218    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
7219  else
7220    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
7221  fi
7222
7223  # Test if windows or unix (cygwin/msys) find is first in path.
7224  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
7225$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
7226  FIND_BINARY_OUTPUT=`find --version 2>&1`
7227  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
7228    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
7229$as_echo "unix style" >&6; }
7230  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
7231    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
7232$as_echo "Windows" >&6; }
7233    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
7234$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
7235    { $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
7236$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
7237    as_fn_error $? "Cannot continue" "$LINENO" 5
7238  else
7239    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
7240$as_echo "unknown" >&6; }
7241    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
7242$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
7243  fi
7244
7245  else
7246    PATH_SEP=":"
7247  fi
7248
7249
7250
7251  cd "$CURDIR"
7252
7253
7254  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7255
7256  # Input might be given as Windows format, start by converting to
7257  # unix format.
7258  path="$SRC_ROOT"
7259  new_path=`$CYGPATH -u "$path"`
7260
7261  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7262  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7263  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7264  # "foo.exe" is OK but "foo" is an error.
7265  #
7266  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7267  # It is also a way to make sure we got the proper file name for the real test later on.
7268  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7269  if test "x$test_shortpath" = x; then
7270    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5
7271$as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;}
7272    as_fn_error $? "Cannot locate the the path of SRC_ROOT" "$LINENO" 5
7273  fi
7274
7275  # Call helper function which possibly converts this using DOS-style short mode.
7276  # If so, the updated path is stored in $new_path.
7277
7278  input_path="$new_path"
7279  # Check if we need to convert this using DOS-style short mode. If the path
7280  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7281  # take no chances and rewrite it.
7282  # Note: m4 eats our [], so we need to use [ and ] instead.
7283  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7284  if test "x$has_forbidden_chars" != x; then
7285    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7286    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7287    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7288    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7289      # Going to short mode and back again did indeed matter. Since short mode is
7290      # case insensitive, let's make it lowercase to improve readability.
7291      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7292      # Now convert it back to Unix-stile (cygpath)
7293      input_path=`$CYGPATH -u "$shortmode_path"`
7294      new_path="$input_path"
7295    fi
7296  fi
7297
7298  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7299  if test "x$test_cygdrive_prefix" = x; then
7300    # As a simple fix, exclude /usr/bin since it's not a real path.
7301    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7302      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7303      # a path prefixed by /cygdrive for fixpath to work.
7304      new_path="$CYGWIN_ROOT_PATH$input_path"
7305    fi
7306  fi
7307
7308
7309  if test "x$path" != "x$new_path"; then
7310    SRC_ROOT="$new_path"
7311    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5
7312$as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;}
7313  fi
7314
7315  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7316
7317  path="$SRC_ROOT"
7318  has_colon=`$ECHO $path | $GREP ^.:`
7319  new_path="$path"
7320  if test "x$has_colon" = x; then
7321    # Not in mixed or Windows style, start by that.
7322    new_path=`cmd //c echo $path`
7323  fi
7324
7325
7326  input_path="$new_path"
7327  # Check if we need to convert this using DOS-style short mode. If the path
7328  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7329  # take no chances and rewrite it.
7330  # Note: m4 eats our [], so we need to use [ and ] instead.
7331  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7332  if test "x$has_forbidden_chars" != x; then
7333    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7334    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7335  fi
7336
7337
7338  windows_path="$new_path"
7339  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7340    unix_path=`$CYGPATH -u "$windows_path"`
7341    new_path="$unix_path"
7342  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7343    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7344    new_path="$unix_path"
7345  fi
7346
7347  if test "x$path" != "x$new_path"; then
7348    SRC_ROOT="$new_path"
7349    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5
7350$as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;}
7351  fi
7352
7353  # Save the first 10 bytes of this path to the storage, so fixpath can work.
7354  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7355
7356  else
7357    # We're on a posix platform. Hooray! :)
7358    path="$SRC_ROOT"
7359    has_space=`$ECHO "$path" | $GREP " "`
7360    if test "x$has_space" != x; then
7361      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5
7362$as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;}
7363      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7364    fi
7365
7366    # Use eval to expand a potential ~
7367    eval path="$path"
7368    if test ! -f "$path" && test ! -d "$path"; then
7369      as_fn_error $? "The path of SRC_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
7370    fi
7371
7372    SRC_ROOT="`cd "$path"; $THEPWDCMD -L`"
7373  fi
7374
7375
7376  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7377
7378  # Input might be given as Windows format, start by converting to
7379  # unix format.
7380  path="$CURDIR"
7381  new_path=`$CYGPATH -u "$path"`
7382
7383  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7384  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7385  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7386  # "foo.exe" is OK but "foo" is an error.
7387  #
7388  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7389  # It is also a way to make sure we got the proper file name for the real test later on.
7390  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7391  if test "x$test_shortpath" = x; then
7392    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
7393$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
7394    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
7395  fi
7396
7397  # Call helper function which possibly converts this using DOS-style short mode.
7398  # If so, the updated path is stored in $new_path.
7399
7400  input_path="$new_path"
7401  # Check if we need to convert this using DOS-style short mode. If the path
7402  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7403  # take no chances and rewrite it.
7404  # Note: m4 eats our [], so we need to use [ and ] instead.
7405  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7406  if test "x$has_forbidden_chars" != x; then
7407    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7408    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7409    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7410    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7411      # Going to short mode and back again did indeed matter. Since short mode is
7412      # case insensitive, let's make it lowercase to improve readability.
7413      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7414      # Now convert it back to Unix-stile (cygpath)
7415      input_path=`$CYGPATH -u "$shortmode_path"`
7416      new_path="$input_path"
7417    fi
7418  fi
7419
7420  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7421  if test "x$test_cygdrive_prefix" = x; then
7422    # As a simple fix, exclude /usr/bin since it's not a real path.
7423    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7424      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7425      # a path prefixed by /cygdrive for fixpath to work.
7426      new_path="$CYGWIN_ROOT_PATH$input_path"
7427    fi
7428  fi
7429
7430
7431  if test "x$path" != "x$new_path"; then
7432    CURDIR="$new_path"
7433    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
7434$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
7435  fi
7436
7437  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7438
7439  path="$CURDIR"
7440  has_colon=`$ECHO $path | $GREP ^.:`
7441  new_path="$path"
7442  if test "x$has_colon" = x; then
7443    # Not in mixed or Windows style, start by that.
7444    new_path=`cmd //c echo $path`
7445  fi
7446
7447
7448  input_path="$new_path"
7449  # Check if we need to convert this using DOS-style short mode. If the path
7450  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7451  # take no chances and rewrite it.
7452  # Note: m4 eats our [], so we need to use [ and ] instead.
7453  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7454  if test "x$has_forbidden_chars" != x; then
7455    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7456    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7457  fi
7458
7459
7460  windows_path="$new_path"
7461  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7462    unix_path=`$CYGPATH -u "$windows_path"`
7463    new_path="$unix_path"
7464  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7465    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7466    new_path="$unix_path"
7467  fi
7468
7469  if test "x$path" != "x$new_path"; then
7470    CURDIR="$new_path"
7471    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
7472$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
7473  fi
7474
7475  # Save the first 10 bytes of this path to the storage, so fixpath can work.
7476  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7477
7478  else
7479    # We're on a posix platform. Hooray! :)
7480    path="$CURDIR"
7481    has_space=`$ECHO "$path" | $GREP " "`
7482    if test "x$has_space" != x; then
7483      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
7484$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
7485      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7486    fi
7487
7488    # Use eval to expand a potential ~
7489    eval path="$path"
7490    if test ! -f "$path" && test ! -d "$path"; then
7491      as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
7492    fi
7493
7494    CURDIR="`cd "$path"; $THEPWDCMD -L`"
7495  fi
7496
7497
7498  if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
7499    # Add extra search paths on solaris for utilities like ar and as etc...
7500    PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
7501  fi
7502
7503  # You can force the sys-root if the sys-root encoded into the cross compiler tools
7504  # is not correct.
7505
7506# Check whether --with-sys-root was given.
7507if test "${with_sys_root+set}" = set; then :
7508  withval=$with_sys_root;
7509fi
7510
7511
7512  if test "x$with_sys_root" != x; then
7513    SYS_ROOT=$with_sys_root
7514  else
7515    SYS_ROOT=/
7516  fi
7517
7518
7519
7520# Check whether --with-tools-dir was given.
7521if test "${with_tools_dir+set}" = set; then :
7522  withval=$with_tools_dir; TOOLS_DIR=$with_tools_dir
7523
7524fi
7525
7526
7527
7528# Check whether --with-devkit was given.
7529if test "${with_devkit+set}" = set; then :
7530  withval=$with_devkit;
7531        if test "x$with_sys_root" != x; then
7532          as_fn_error $? "Cannot specify both --with-devkit and --with-sys-root at the same time" "$LINENO" 5
7533        fi
7534
7535  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7536
7537  # Input might be given as Windows format, start by converting to
7538  # unix format.
7539  path="$with_devkit"
7540  new_path=`$CYGPATH -u "$path"`
7541
7542  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7543  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7544  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7545  # "foo.exe" is OK but "foo" is an error.
7546  #
7547  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7548  # It is also a way to make sure we got the proper file name for the real test later on.
7549  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7550  if test "x$test_shortpath" = x; then
7551    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
7552$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
7553    as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
7554  fi
7555
7556  # Call helper function which possibly converts this using DOS-style short mode.
7557  # If so, the updated path is stored in $new_path.
7558
7559  input_path="$new_path"
7560  # Check if we need to convert this using DOS-style short mode. If the path
7561  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7562  # take no chances and rewrite it.
7563  # Note: m4 eats our [], so we need to use [ and ] instead.
7564  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7565  if test "x$has_forbidden_chars" != x; then
7566    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7567    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7568    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7569    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7570      # Going to short mode and back again did indeed matter. Since short mode is
7571      # case insensitive, let's make it lowercase to improve readability.
7572      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7573      # Now convert it back to Unix-stile (cygpath)
7574      input_path=`$CYGPATH -u "$shortmode_path"`
7575      new_path="$input_path"
7576    fi
7577  fi
7578
7579  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7580  if test "x$test_cygdrive_prefix" = x; then
7581    # As a simple fix, exclude /usr/bin since it's not a real path.
7582    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7583      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7584      # a path prefixed by /cygdrive for fixpath to work.
7585      new_path="$CYGWIN_ROOT_PATH$input_path"
7586    fi
7587  fi
7588
7589
7590  if test "x$path" != "x$new_path"; then
7591    with_devkit="$new_path"
7592    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
7593$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
7594  fi
7595
7596  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7597
7598  path="$with_devkit"
7599  has_colon=`$ECHO $path | $GREP ^.:`
7600  new_path="$path"
7601  if test "x$has_colon" = x; then
7602    # Not in mixed or Windows style, start by that.
7603    new_path=`cmd //c echo $path`
7604  fi
7605
7606
7607  input_path="$new_path"
7608  # Check if we need to convert this using DOS-style short mode. If the path
7609  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7610  # take no chances and rewrite it.
7611  # Note: m4 eats our [], so we need to use [ and ] instead.
7612  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7613  if test "x$has_forbidden_chars" != x; then
7614    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7615    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7616  fi
7617
7618
7619  windows_path="$new_path"
7620  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7621    unix_path=`$CYGPATH -u "$windows_path"`
7622    new_path="$unix_path"
7623  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7624    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7625    new_path="$unix_path"
7626  fi
7627
7628  if test "x$path" != "x$new_path"; then
7629    with_devkit="$new_path"
7630    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
7631$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
7632  fi
7633
7634  # Save the first 10 bytes of this path to the storage, so fixpath can work.
7635  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7636
7637  else
7638    # We're on a posix platform. Hooray! :)
7639    path="$with_devkit"
7640    has_space=`$ECHO "$path" | $GREP " "`
7641    if test "x$has_space" != x; then
7642      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
7643$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
7644      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7645    fi
7646
7647    # Use eval to expand a potential ~
7648    eval path="$path"
7649    if test ! -f "$path" && test ! -d "$path"; then
7650      as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
7651    fi
7652
7653    with_devkit="`cd "$path"; $THEPWDCMD -L`"
7654  fi
7655
7656
7657  if test "x$TOOLS_DIR" = x; then
7658    TOOLS_DIR="$with_devkit/bin"
7659  else
7660    TOOLS_DIR="$TOOLS_DIR:$with_devkit/bin"
7661  fi
7662
7663        if test -d "$with_devkit/$host_alias/libc"; then
7664          SYS_ROOT=$with_devkit/$host_alias/libc
7665        elif test -d "$with_devkit/$host/sys-root"; then
7666          SYS_ROOT=$with_devkit/$host/sys-root
7667        fi
7668
7669fi
7670
7671
7672
7673  # Setup default logging of stdout and stderr to build.log in the output root.
7674  BUILD_LOG='$(OUTPUT_ROOT)/build.log'
7675  BUILD_LOG_PREVIOUS='$(OUTPUT_ROOT)/build.log.old'
7676  BUILD_LOG_WRAPPER='$(BASH) $(SRC_ROOT)/common/bin/logger.sh $(BUILD_LOG)'
7677
7678
7679
7680
7681
7682# Check if it's a pure open build or if custom sources are to be used.
7683
7684  # Check whether --enable-openjdk-only was given.
7685if test "${enable_openjdk_only+set}" = set; then :
7686  enableval=$enable_openjdk_only;
7687else
7688  enable_openjdk_only="no"
7689fi
7690
7691
7692  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
7693$as_echo_n "checking for presence of closed sources... " >&6; }
7694  if test -d "$SRC_ROOT/jdk/src/closed"; then
7695    CLOSED_SOURCE_PRESENT=yes
7696  else
7697    CLOSED_SOURCE_PRESENT=no
7698  fi
7699  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
7700$as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
7701
7702  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
7703$as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
7704  SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
7705  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
7706$as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
7707
7708  if test "x$CLOSED_SOURCE_PRESENT" = xno; then
7709    OPENJDK=true
7710    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
7711      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
7712$as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
7713    fi
7714  else
7715    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
7716      OPENJDK=true
7717    else
7718      OPENJDK=false
7719    fi
7720  fi
7721
7722  if test "x$OPENJDK" = "xtrue"; then
7723    SET_OPENJDK="OPENJDK=true"
7724  fi
7725
7726
7727
7728
7729# These are needed to be able to create a configuration name (and thus the output directory)
7730
7731  ###############################################################################
7732  #
7733  # Check which variant of the JDK that we want to build.
7734  # Currently we have:
7735  #    normal:   standard edition
7736  # but the custom make system may add other variants
7737  #
7738  # Effectively the JDK variant gives a name to a specific set of
7739  # modules to compile into the JDK. In the future, these modules
7740  # might even be Jigsaw modules.
7741  #
7742  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
7743$as_echo_n "checking which variant of the JDK to build... " >&6; }
7744
7745# Check whether --with-jdk-variant was given.
7746if test "${with_jdk_variant+set}" = set; then :
7747  withval=$with_jdk_variant;
7748fi
7749
7750
7751  if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
7752    JDK_VARIANT="normal"
7753  else
7754    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
7755  fi
7756
7757
7758
7759  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
7760$as_echo "$JDK_VARIANT" >&6; }
7761
7762
7763
7764  ###############################################################################
7765  #
7766  # Check which variants of the JVM that we want to build.
7767  # Currently we have:
7768  #    server: normal interpreter and a tiered C1/C2 compiler
7769  #    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
7770  #    minimal1: reduced form of client with optional VM services and features stripped out
7771  #    kernel: kernel footprint JVM that passes the TCK without major performance problems,
7772  #             ie normal interpreter and C1, only the serial GC, kernel jvmti etc
7773  #    zero: no machine code interpreter, no compiler
7774  #    zeroshark: zero interpreter and shark/llvm compiler backend
7775  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
7776$as_echo_n "checking which variants of the JVM to build... " >&6; }
7777
7778# Check whether --with-jvm-variants was given.
7779if test "${with_jvm_variants+set}" = set; then :
7780  withval=$with_jvm_variants;
7781fi
7782
7783
7784  if test "x$with_jvm_variants" = x; then
7785    with_jvm_variants="server"
7786  fi
7787
7788  JVM_VARIANTS=",$with_jvm_variants,"
7789  TEST_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,//' -e 's/client,//'  -e 's/minimal1,//' -e 's/kernel,//' -e 's/zero,//' -e 's/zeroshark,//'`
7790
7791  if test "x$TEST_VARIANTS" != "x,"; then
7792    as_fn_error $? "The available JVM variants are: server, client, minimal1, kernel, zero, zeroshark" "$LINENO" 5
7793  fi
7794  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
7795$as_echo "$with_jvm_variants" >&6; }
7796
7797  JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
7798  JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
7799  JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
7800  JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
7801  JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
7802  JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
7803
7804  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
7805    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7806      as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
7807    fi
7808  fi
7809  if test "x$JVM_VARIANT_KERNEL" = xtrue; then
7810    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7811      as_fn_error $? "You cannot build a kernel JVM for a 64-bit machine." "$LINENO" 5
7812    fi
7813  fi
7814  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
7815    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7816      as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
7817    fi
7818  fi
7819
7820  # Replace the commas with AND for use in the build directory name.
7821  ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/'`
7822  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/'`
7823  if test "x$COUNT_VARIANTS" != "x,1"; then
7824    BUILDING_MULTIPLE_JVM_VARIANTS=yes
7825  else
7826    BUILDING_MULTIPLE_JVM_VARIANTS=no
7827  fi
7828
7829
7830
7831
7832
7833
7834
7835
7836
7837  INCLUDE_SA=true
7838  if test "x$JVM_VARIANT_ZERO" = xtrue ; then
7839    INCLUDE_SA=false
7840  fi
7841  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then
7842    INCLUDE_SA=false
7843  fi
7844
7845
7846  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
7847    MACOSX_UNIVERSAL="true"
7848  fi
7849
7850
7851
7852
7853  ###############################################################################
7854  #
7855  # Set the debug level
7856  #    release: no debug information, all optimizations, no asserts.
7857  #    fastdebug: debug information (-g), all optimizations, all asserts
7858  #    slowdebug: debug information (-g), no optimizations, all asserts
7859  #
7860  DEBUG_LEVEL="release"
7861  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
7862$as_echo_n "checking which debug level to use... " >&6; }
7863  # Check whether --enable-debug was given.
7864if test "${enable_debug+set}" = set; then :
7865  enableval=$enable_debug;
7866        ENABLE_DEBUG="${enableval}"
7867        DEBUG_LEVEL="fastdebug"
7868
7869else
7870  ENABLE_DEBUG="no"
7871fi
7872
7873
7874
7875# Check whether --with-debug-level was given.
7876if test "${with_debug_level+set}" = set; then :
7877  withval=$with_debug_level;
7878        DEBUG_LEVEL="${withval}"
7879        if test "x$ENABLE_DEBUG" = xyes; then
7880          as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
7881        fi
7882
7883fi
7884
7885  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
7886$as_echo "$DEBUG_LEVEL" >&6; }
7887
7888  if test "x$DEBUG_LEVEL" != xrelease && \
7889      test "x$DEBUG_LEVEL" != xfastdebug && \
7890      test "x$DEBUG_LEVEL" != xslowdebug; then
7891    as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
7892  fi
7893
7894
7895  ###############################################################################
7896  #
7897  # Setup legacy vars/targets and new vars to deal with different debug levels.
7898  #
7899
7900  case $DEBUG_LEVEL in
7901    release )
7902      VARIANT="OPT"
7903      FASTDEBUG="false"
7904      DEBUG_CLASSFILES="false"
7905      BUILD_VARIANT_RELEASE=""
7906      HOTSPOT_DEBUG_LEVEL="product"
7907      HOTSPOT_EXPORT="product"
7908      ;;
7909    fastdebug )
7910      VARIANT="DBG"
7911      FASTDEBUG="true"
7912      DEBUG_CLASSFILES="true"
7913      BUILD_VARIANT_RELEASE="-fastdebug"
7914      HOTSPOT_DEBUG_LEVEL="fastdebug"
7915      HOTSPOT_EXPORT="fastdebug"
7916      ;;
7917    slowdebug )
7918      VARIANT="DBG"
7919      FASTDEBUG="false"
7920      DEBUG_CLASSFILES="true"
7921      BUILD_VARIANT_RELEASE="-debug"
7922      HOTSPOT_DEBUG_LEVEL="jvmg"
7923      HOTSPOT_EXPORT="debug"
7924      ;;
7925  esac
7926
7927  #####
7928  # Generate the legacy makefile targets for hotspot.
7929  # The hotspot api for selecting the build artifacts, really, needs to be improved.
7930  # JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
7931  # determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
7932  # But until then ...
7933  HOTSPOT_TARGET=""
7934
7935  if test "x$JVM_VARIANT_SERVER" = xtrue; then
7936    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
7937  fi
7938
7939  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
7940    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
7941  fi
7942
7943  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
7944    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
7945  fi
7946
7947  if test "x$JVM_VARIANT_KERNEL" = xtrue; then
7948    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
7949  fi
7950
7951  if test "x$JVM_VARIANT_ZERO" = xtrue; then
7952    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
7953  fi
7954
7955  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
7956    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
7957  fi
7958
7959  HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
7960
7961  # On Macosx universal binaries are produced, but they only contain
7962  # 64 bit intel. This invalidates control of which jvms are built
7963  # from configure, but only server is valid anyway. Fix this
7964  # when hotspot makefiles are rewritten.
7965  if test "x$MACOSX_UNIVERSAL" = xtrue; then
7966    HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
7967  fi
7968
7969  #####
7970
7971
7972
7973
7974
7975
7976
7977
7978# With basic setup done, call the custom early hook.
7979
7980
7981# To properly create a configuration name, we need to have the OpenJDK target
7982# and options (variants and debug level) parsed.
7983
7984
7985
7986# Check whether --with-conf-name was given.
7987if test "${with_conf_name+set}" = set; then :
7988  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
7989fi
7990
7991
7992  # Test from where we are running configure, in or outside of src root.
7993  if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
7994      || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
7995      || test "x$CURDIR" = "x$SRC_ROOT/common/makefiles" ; then
7996    # We are running configure from the src root.
7997    # Create a default ./build/target-variant-debuglevel output root.
7998    if test "x${CONF_NAME}" = x; then
7999      CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
8000    fi
8001    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
8002    $MKDIR -p "$OUTPUT_ROOT"
8003    if test ! -d "$OUTPUT_ROOT"; then
8004      as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
8005    fi
8006  else
8007    # We are running configure from outside of the src dir.
8008    # Then use the current directory as output dir!
8009    # If configuration is situated in normal build directory, just use the build
8010    # directory name as configuration name, otherwise use the complete path.
8011    if test "x${CONF_NAME}" = x; then
8012      CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
8013    fi
8014    OUTPUT_ROOT="$CURDIR"
8015
8016    # WARNING: This might be a bad thing to do. You need to be sure you want to
8017    # have a configuration in this directory. Do some sanity checks!
8018
8019    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
8020      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
8021      # other files
8022      files_present=`$LS $OUTPUT_ROOT`
8023      # Configure has already touched config.log and confdefs.h in the current dir when this check
8024      # is performed.
8025      filtered_files=`$ECHO "$files_present" | $SED -e 's/config.log//g' -e 's/confdefs.h//g' -e 's/ //g' \
8026      | $TR -d '\n'`
8027      if test "x$filtered_files" != x; then
8028        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
8029$as_echo "$as_me: Current directory is $CURDIR." >&6;}
8030        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
8031$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
8032        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
8033$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
8034        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
8035$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
8036        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
8037$as_echo "$as_me: seriously mess up just about everything." >&6;}
8038        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
8039$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
8040        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
8041$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
8042        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
8043      fi
8044    fi
8045  fi
8046  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
8047$as_echo_n "checking what configuration name to use... " >&6; }
8048  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
8049$as_echo "$CONF_NAME" >&6; }
8050
8051
8052  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8053
8054  # Input might be given as Windows format, start by converting to
8055  # unix format.
8056  path="$OUTPUT_ROOT"
8057  new_path=`$CYGPATH -u "$path"`
8058
8059  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8060  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8061  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8062  # "foo.exe" is OK but "foo" is an error.
8063  #
8064  # This test is therefore slightly more accurate than "test -f" to check for file precense.
8065  # It is also a way to make sure we got the proper file name for the real test later on.
8066  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8067  if test "x$test_shortpath" = x; then
8068    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
8069$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
8070    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
8071  fi
8072
8073  # Call helper function which possibly converts this using DOS-style short mode.
8074  # If so, the updated path is stored in $new_path.
8075
8076  input_path="$new_path"
8077  # Check if we need to convert this using DOS-style short mode. If the path
8078  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8079  # take no chances and rewrite it.
8080  # Note: m4 eats our [], so we need to use [ and ] instead.
8081  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8082  if test "x$has_forbidden_chars" != x; then
8083    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8084    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8085    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8086    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8087      # Going to short mode and back again did indeed matter. Since short mode is
8088      # case insensitive, let's make it lowercase to improve readability.
8089      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8090      # Now convert it back to Unix-stile (cygpath)
8091      input_path=`$CYGPATH -u "$shortmode_path"`
8092      new_path="$input_path"
8093    fi
8094  fi
8095
8096  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8097  if test "x$test_cygdrive_prefix" = x; then
8098    # As a simple fix, exclude /usr/bin since it's not a real path.
8099    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
8100      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8101      # a path prefixed by /cygdrive for fixpath to work.
8102      new_path="$CYGWIN_ROOT_PATH$input_path"
8103    fi
8104  fi
8105
8106
8107  if test "x$path" != "x$new_path"; then
8108    OUTPUT_ROOT="$new_path"
8109    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
8110$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
8111  fi
8112
8113  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8114
8115  path="$OUTPUT_ROOT"
8116  has_colon=`$ECHO $path | $GREP ^.:`
8117  new_path="$path"
8118  if test "x$has_colon" = x; then
8119    # Not in mixed or Windows style, start by that.
8120    new_path=`cmd //c echo $path`
8121  fi
8122
8123
8124  input_path="$new_path"
8125  # Check if we need to convert this using DOS-style short mode. If the path
8126  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8127  # take no chances and rewrite it.
8128  # Note: m4 eats our [], so we need to use [ and ] instead.
8129  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8130  if test "x$has_forbidden_chars" != x; then
8131    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8132    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8133  fi
8134
8135
8136  windows_path="$new_path"
8137  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8138    unix_path=`$CYGPATH -u "$windows_path"`
8139    new_path="$unix_path"
8140  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8141    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8142    new_path="$unix_path"
8143  fi
8144
8145  if test "x$path" != "x$new_path"; then
8146    OUTPUT_ROOT="$new_path"
8147    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
8148$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
8149  fi
8150
8151  # Save the first 10 bytes of this path to the storage, so fixpath can work.
8152  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8153
8154  else
8155    # We're on a posix platform. Hooray! :)
8156    path="$OUTPUT_ROOT"
8157    has_space=`$ECHO "$path" | $GREP " "`
8158    if test "x$has_space" != x; then
8159      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
8160$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
8161      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
8162    fi
8163
8164    # Use eval to expand a potential ~
8165    eval path="$path"
8166    if test ! -f "$path" && test ! -d "$path"; then
8167      as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
8168    fi
8169
8170    OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
8171  fi
8172
8173
8174  SPEC=$OUTPUT_ROOT/spec.gmk
8175
8176  CONF_NAME=$CONF_NAME
8177
8178  OUTPUT_ROOT=$OUTPUT_ROOT
8179
8180
8181  # Most of the probed defines are put into config.h
8182  ac_config_headers="$ac_config_headers $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in"
8183
8184  # The spec.gmk file contains all variables for the make system.
8185  ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
8186
8187  # The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
8188  ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
8189
8190  # The bootcycle-spec.gmk file contains support for boot cycle builds.
8191  ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
8192
8193  # The compare.sh is used to compare the build output to other builds.
8194  ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
8195
8196  # Spec.sh is currently used by compare-objects.sh
8197  ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in"
8198
8199  # The generated Makefile knows where the spec.gmk is and where the source is.
8200  # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
8201  # which will look for generated configurations
8202  ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
8203
8204
8205  # Save the arguments given to us
8206  echo "$CONFIGURE_COMMAND_LINE" > $OUTPUT_ROOT/configure-arguments
8207
8208
8209# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
8210
8211  for ac_prog in apt-get yum port pkgutil pkgadd
8212do
8213  # Extract the first word of "$ac_prog", so it can be a program name with args.
8214set dummy $ac_prog; ac_word=$2
8215{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8216$as_echo_n "checking for $ac_word... " >&6; }
8217if ${ac_cv_prog_PKGHANDLER+:} false; then :
8218  $as_echo_n "(cached) " >&6
8219else
8220  if test -n "$PKGHANDLER"; then
8221  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
8222else
8223as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8224for as_dir in $PATH
8225do
8226  IFS=$as_save_IFS
8227  test -z "$as_dir" && as_dir=.
8228    for ac_exec_ext in '' $ac_executable_extensions; do
8229  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8230    ac_cv_prog_PKGHANDLER="$ac_prog"
8231    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8232    break 2
8233  fi
8234done
8235  done
8236IFS=$as_save_IFS
8237
8238fi
8239fi
8240PKGHANDLER=$ac_cv_prog_PKGHANDLER
8241if test -n "$PKGHANDLER"; then
8242  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
8243$as_echo "$PKGHANDLER" >&6; }
8244else
8245  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8246$as_echo "no" >&6; }
8247fi
8248
8249
8250  test -n "$PKGHANDLER" && break
8251done
8252
8253
8254
8255# Setup tools that requires more complex handling, or that is not needed by the configure script.
8256
8257
8258  # We need to find a recent version of GNU make. Especially on Solaris, this can be tricky.
8259  if test "x$MAKE" != x; then
8260    # User has supplied a make, test it.
8261    if test ! -f "$MAKE"; then
8262      as_fn_error $? "The specified make (by MAKE=$MAKE) is not found." "$LINENO" 5
8263    fi
8264
8265  MAKE_CANDIDATE=""$MAKE""
8266  DESCRIPTION="user supplied MAKE=$MAKE"
8267  if test "x$MAKE_CANDIDATE" != x; then
8268    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8269$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8270    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8271    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8272    if test "x$IS_GNU_MAKE" = x; then
8273      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8274$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8275    else
8276      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8277      if test "x$IS_MODERN_MAKE" = x; then
8278        { $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
8279$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;}
8280      else
8281        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8282          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8283            MAKE_EXPECTED_ENV='cygwin'
8284          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8285            MAKE_EXPECTED_ENV='msys'
8286          else
8287            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8288          fi
8289          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8290          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8291        else
8292          # Not relevant for non-Windows
8293          IS_MAKE_CORRECT_ENV=true
8294        fi
8295        if test "x$IS_MAKE_CORRECT_ENV" = x; then
8296          { $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
8297$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;}
8298        else
8299          FOUND_MAKE=$MAKE_CANDIDATE
8300
8301  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8302
8303  # First separate the path from the arguments. This will split at the first
8304  # space.
8305  complete="$FOUND_MAKE"
8306  path="${complete%% *}"
8307  tmp="$complete EOL"
8308  arguments="${tmp#* }"
8309
8310  # Input might be given as Windows format, start by converting to
8311  # unix format.
8312  new_path=`$CYGPATH -u "$path"`
8313
8314  # Now try to locate executable using which
8315  new_path=`$WHICH "$new_path" 2> /dev/null`
8316  # bat and cmd files are not always considered executable in cygwin causing which
8317  # to not find them
8318  if test "x$new_path" = x \
8319      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8320      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8321    new_path=`$CYGPATH -u "$path"`
8322  fi
8323  if test "x$new_path" = x; then
8324    # Oops. Which didn't find the executable.
8325    # The splitting of arguments from the executable at a space might have been incorrect,
8326    # since paths with space are more likely in Windows. Give it another try with the whole
8327    # argument.
8328    path="$complete"
8329    arguments="EOL"
8330    new_path=`$CYGPATH -u "$path"`
8331    new_path=`$WHICH "$new_path" 2> /dev/null`
8332    # bat and cmd files are not always considered executable in cygwin causing which
8333    # to not find them
8334    if test "x$new_path" = x \
8335        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8336        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8337      new_path=`$CYGPATH -u "$path"`
8338    fi
8339    if test "x$new_path" = x; then
8340      # It's still not found. Now this is an unrecoverable error.
8341      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8342$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8343      has_space=`$ECHO "$complete" | $GREP " "`
8344      if test "x$has_space" != x; then
8345        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8346$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8347      fi
8348      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8349    fi
8350  fi
8351
8352  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8353  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8354  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8355  # "foo.exe" is OK but "foo" is an error.
8356  #
8357  # This test is therefore slightly more accurate than "test -f" to check for file presence.
8358  # It is also a way to make sure we got the proper file name for the real test later on.
8359  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8360  if test "x$test_shortpath" = x; then
8361    # Short path failed, file does not exist as specified.
8362    # Try adding .exe or .cmd
8363    if test -f "${new_path}.exe"; then
8364      input_to_shortpath="${new_path}.exe"
8365    elif test -f "${new_path}.cmd"; then
8366      input_to_shortpath="${new_path}.cmd"
8367    else
8368      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8369$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8370      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8371$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8372      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8373    fi
8374  else
8375    input_to_shortpath="$new_path"
8376  fi
8377
8378  # Call helper function which possibly converts this using DOS-style short mode.
8379  # If so, the updated path is stored in $new_path.
8380  new_path="$input_to_shortpath"
8381
8382  input_path="$input_to_shortpath"
8383  # Check if we need to convert this using DOS-style short mode. If the path
8384  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8385  # take no chances and rewrite it.
8386  # Note: m4 eats our [], so we need to use [ and ] instead.
8387  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8388  if test "x$has_forbidden_chars" != x; then
8389    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8390    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8391    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8392    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8393      # Going to short mode and back again did indeed matter. Since short mode is
8394      # case insensitive, let's make it lowercase to improve readability.
8395      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8396      # Now convert it back to Unix-stile (cygpath)
8397      input_path=`$CYGPATH -u "$shortmode_path"`
8398      new_path="$input_path"
8399    fi
8400  fi
8401
8402  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8403  if test "x$test_cygdrive_prefix" = x; then
8404    # As a simple fix, exclude /usr/bin since it's not a real path.
8405    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8406      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8407      # a path prefixed by /cygdrive for fixpath to work.
8408      new_path="$CYGWIN_ROOT_PATH$input_path"
8409    fi
8410  fi
8411
8412  # remove trailing .exe if any
8413  new_path="${new_path/%.exe/}"
8414
8415  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8416
8417  # First separate the path from the arguments. This will split at the first
8418  # space.
8419  complete="$FOUND_MAKE"
8420  path="${complete%% *}"
8421  tmp="$complete EOL"
8422  arguments="${tmp#* }"
8423
8424  # Input might be given as Windows format, start by converting to
8425  # unix format.
8426  new_path="$path"
8427
8428  windows_path="$new_path"
8429  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8430    unix_path=`$CYGPATH -u "$windows_path"`
8431    new_path="$unix_path"
8432  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8433    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8434    new_path="$unix_path"
8435  fi
8436
8437
8438  # Now try to locate executable using which
8439  new_path=`$WHICH "$new_path" 2> /dev/null`
8440
8441  if test "x$new_path" = x; then
8442    # Oops. Which didn't find the executable.
8443    # The splitting of arguments from the executable at a space might have been incorrect,
8444    # since paths with space are more likely in Windows. Give it another try with the whole
8445    # argument.
8446    path="$complete"
8447    arguments="EOL"
8448    new_path="$path"
8449
8450  windows_path="$new_path"
8451  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8452    unix_path=`$CYGPATH -u "$windows_path"`
8453    new_path="$unix_path"
8454  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8455    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8456    new_path="$unix_path"
8457  fi
8458
8459
8460    new_path=`$WHICH "$new_path" 2> /dev/null`
8461
8462    if test "x$new_path" = x; then
8463      # It's still not found. Now this is an unrecoverable error.
8464      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8465$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8466      has_space=`$ECHO "$complete" | $GREP " "`
8467      if test "x$has_space" != x; then
8468        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8469$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8470      fi
8471      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8472    fi
8473  fi
8474
8475  # Now new_path has a complete unix path to the binary
8476  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8477    # Keep paths in /bin as-is, but remove trailing .exe if any
8478    new_path="${new_path/%.exe/}"
8479    # Do not save /bin paths to all_fixpath_prefixes!
8480  else
8481    # Not in mixed or Windows style, start by that.
8482    new_path=`cmd //c echo $new_path`
8483
8484  input_path="$new_path"
8485  # Check if we need to convert this using DOS-style short mode. If the path
8486  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8487  # take no chances and rewrite it.
8488  # Note: m4 eats our [], so we need to use [ and ] instead.
8489  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8490  if test "x$has_forbidden_chars" != x; then
8491    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8492    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8493  fi
8494
8495    # Output is in $new_path
8496
8497  windows_path="$new_path"
8498  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8499    unix_path=`$CYGPATH -u "$windows_path"`
8500    new_path="$unix_path"
8501  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8502    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8503    new_path="$unix_path"
8504  fi
8505
8506    # remove trailing .exe if any
8507    new_path="${new_path/%.exe/}"
8508
8509    # Save the first 10 bytes of this path to the storage, so fixpath can work.
8510    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8511  fi
8512
8513  else
8514    # We're on a posix platform. Hooray! :)
8515    # First separate the path from the arguments. This will split at the first
8516    # space.
8517    complete="$FOUND_MAKE"
8518    path="${complete%% *}"
8519    tmp="$complete EOL"
8520    arguments="${tmp#* }"
8521
8522    # Cannot rely on the command "which" here since it doesn't always work.
8523    is_absolute_path=`$ECHO "$path" | $GREP ^/`
8524    if test -z "$is_absolute_path"; then
8525      # Path to executable is not absolute. Find it.
8526      IFS_save="$IFS"
8527      IFS=:
8528      for p in $PATH; do
8529        if test -f "$p/$path" && test -x "$p/$path"; then
8530          new_path="$p/$path"
8531          break
8532        fi
8533      done
8534      IFS="$IFS_save"
8535    else
8536      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
8537$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
8538      new_path="$path"
8539    fi
8540
8541    if test "x$new_path" = x; then
8542      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8543$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8544      has_space=`$ECHO "$complete" | $GREP " "`
8545      if test "x$has_space" != x; then
8546        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
8547$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
8548      fi
8549      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8550    fi
8551  fi
8552
8553  # Now join together the path and the arguments once again
8554  if test "x$arguments" != xEOL; then
8555    new_complete="$new_path ${arguments% *}"
8556  else
8557    new_complete="$new_path"
8558  fi
8559
8560  if test "x$complete" != "x$new_complete"; then
8561    FOUND_MAKE="$new_complete"
8562    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
8563$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
8564  fi
8565
8566        fi
8567      fi
8568    fi
8569  fi
8570
8571    if test "x$FOUND_MAKE" = x; then
8572      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make 3.81 or newer." "$LINENO" 5
8573    fi
8574  else
8575    # Try our hardest to locate a correct version of GNU make
8576    for ac_prog in gmake
8577do
8578  # Extract the first word of "$ac_prog", so it can be a program name with args.
8579set dummy $ac_prog; ac_word=$2
8580{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8581$as_echo_n "checking for $ac_word... " >&6; }
8582if ${ac_cv_path_CHECK_GMAKE+:} false; then :
8583  $as_echo_n "(cached) " >&6
8584else
8585  case $CHECK_GMAKE in
8586  [\\/]* | ?:[\\/]*)
8587  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
8588  ;;
8589  *)
8590  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8591for as_dir in $PATH
8592do
8593  IFS=$as_save_IFS
8594  test -z "$as_dir" && as_dir=.
8595    for ac_exec_ext in '' $ac_executable_extensions; do
8596  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8597    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
8598    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8599    break 2
8600  fi
8601done
8602  done
8603IFS=$as_save_IFS
8604
8605  ;;
8606esac
8607fi
8608CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
8609if test -n "$CHECK_GMAKE"; then
8610  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
8611$as_echo "$CHECK_GMAKE" >&6; }
8612else
8613  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8614$as_echo "no" >&6; }
8615fi
8616
8617
8618  test -n "$CHECK_GMAKE" && break
8619done
8620
8621
8622  MAKE_CANDIDATE=""$CHECK_GMAKE""
8623  DESCRIPTION="gmake in PATH"
8624  if test "x$MAKE_CANDIDATE" != x; then
8625    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8626$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8627    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8628    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8629    if test "x$IS_GNU_MAKE" = x; then
8630      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8631$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8632    else
8633      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8634      if test "x$IS_MODERN_MAKE" = x; then
8635        { $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
8636$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;}
8637      else
8638        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8639          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8640            MAKE_EXPECTED_ENV='cygwin'
8641          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8642            MAKE_EXPECTED_ENV='msys'
8643          else
8644            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8645          fi
8646          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8647          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8648        else
8649          # Not relevant for non-Windows
8650          IS_MAKE_CORRECT_ENV=true
8651        fi
8652        if test "x$IS_MAKE_CORRECT_ENV" = x; then
8653          { $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
8654$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;}
8655        else
8656          FOUND_MAKE=$MAKE_CANDIDATE
8657
8658  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8659
8660  # First separate the path from the arguments. This will split at the first
8661  # space.
8662  complete="$FOUND_MAKE"
8663  path="${complete%% *}"
8664  tmp="$complete EOL"
8665  arguments="${tmp#* }"
8666
8667  # Input might be given as Windows format, start by converting to
8668  # unix format.
8669  new_path=`$CYGPATH -u "$path"`
8670
8671  # Now try to locate executable using which
8672  new_path=`$WHICH "$new_path" 2> /dev/null`
8673  # bat and cmd files are not always considered executable in cygwin causing which
8674  # to not find them
8675  if test "x$new_path" = x \
8676      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8677      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8678    new_path=`$CYGPATH -u "$path"`
8679  fi
8680  if test "x$new_path" = x; then
8681    # Oops. Which didn't find the executable.
8682    # The splitting of arguments from the executable at a space might have been incorrect,
8683    # since paths with space are more likely in Windows. Give it another try with the whole
8684    # argument.
8685    path="$complete"
8686    arguments="EOL"
8687    new_path=`$CYGPATH -u "$path"`
8688    new_path=`$WHICH "$new_path" 2> /dev/null`
8689    # bat and cmd files are not always considered executable in cygwin causing which
8690    # to not find them
8691    if test "x$new_path" = x \
8692        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8693        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8694      new_path=`$CYGPATH -u "$path"`
8695    fi
8696    if test "x$new_path" = x; then
8697      # It's still not found. Now this is an unrecoverable error.
8698      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8699$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8700      has_space=`$ECHO "$complete" | $GREP " "`
8701      if test "x$has_space" != x; then
8702        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8703$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8704      fi
8705      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8706    fi
8707  fi
8708
8709  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8710  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8711  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8712  # "foo.exe" is OK but "foo" is an error.
8713  #
8714  # This test is therefore slightly more accurate than "test -f" to check for file presence.
8715  # It is also a way to make sure we got the proper file name for the real test later on.
8716  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8717  if test "x$test_shortpath" = x; then
8718    # Short path failed, file does not exist as specified.
8719    # Try adding .exe or .cmd
8720    if test -f "${new_path}.exe"; then
8721      input_to_shortpath="${new_path}.exe"
8722    elif test -f "${new_path}.cmd"; then
8723      input_to_shortpath="${new_path}.cmd"
8724    else
8725      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8726$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8727      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8728$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8729      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8730    fi
8731  else
8732    input_to_shortpath="$new_path"
8733  fi
8734
8735  # Call helper function which possibly converts this using DOS-style short mode.
8736  # If so, the updated path is stored in $new_path.
8737  new_path="$input_to_shortpath"
8738
8739  input_path="$input_to_shortpath"
8740  # Check if we need to convert this using DOS-style short mode. If the path
8741  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8742  # take no chances and rewrite it.
8743  # Note: m4 eats our [], so we need to use [ and ] instead.
8744  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8745  if test "x$has_forbidden_chars" != x; then
8746    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8747    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8748    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8749    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8750      # Going to short mode and back again did indeed matter. Since short mode is
8751      # case insensitive, let's make it lowercase to improve readability.
8752      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8753      # Now convert it back to Unix-stile (cygpath)
8754      input_path=`$CYGPATH -u "$shortmode_path"`
8755      new_path="$input_path"
8756    fi
8757  fi
8758
8759  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8760  if test "x$test_cygdrive_prefix" = x; then
8761    # As a simple fix, exclude /usr/bin since it's not a real path.
8762    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8763      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8764      # a path prefixed by /cygdrive for fixpath to work.
8765      new_path="$CYGWIN_ROOT_PATH$input_path"
8766    fi
8767  fi
8768
8769  # remove trailing .exe if any
8770  new_path="${new_path/%.exe/}"
8771
8772  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8773
8774  # First separate the path from the arguments. This will split at the first
8775  # space.
8776  complete="$FOUND_MAKE"
8777  path="${complete%% *}"
8778  tmp="$complete EOL"
8779  arguments="${tmp#* }"
8780
8781  # Input might be given as Windows format, start by converting to
8782  # unix format.
8783  new_path="$path"
8784
8785  windows_path="$new_path"
8786  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8787    unix_path=`$CYGPATH -u "$windows_path"`
8788    new_path="$unix_path"
8789  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8790    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8791    new_path="$unix_path"
8792  fi
8793
8794
8795  # Now try to locate executable using which
8796  new_path=`$WHICH "$new_path" 2> /dev/null`
8797
8798  if test "x$new_path" = x; then
8799    # Oops. Which didn't find the executable.
8800    # The splitting of arguments from the executable at a space might have been incorrect,
8801    # since paths with space are more likely in Windows. Give it another try with the whole
8802    # argument.
8803    path="$complete"
8804    arguments="EOL"
8805    new_path="$path"
8806
8807  windows_path="$new_path"
8808  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8809    unix_path=`$CYGPATH -u "$windows_path"`
8810    new_path="$unix_path"
8811  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8812    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8813    new_path="$unix_path"
8814  fi
8815
8816
8817    new_path=`$WHICH "$new_path" 2> /dev/null`
8818
8819    if test "x$new_path" = x; then
8820      # It's still not found. Now this is an unrecoverable error.
8821      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8822$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8823      has_space=`$ECHO "$complete" | $GREP " "`
8824      if test "x$has_space" != x; then
8825        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8826$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8827      fi
8828      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8829    fi
8830  fi
8831
8832  # Now new_path has a complete unix path to the binary
8833  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8834    # Keep paths in /bin as-is, but remove trailing .exe if any
8835    new_path="${new_path/%.exe/}"
8836    # Do not save /bin paths to all_fixpath_prefixes!
8837  else
8838    # Not in mixed or Windows style, start by that.
8839    new_path=`cmd //c echo $new_path`
8840
8841  input_path="$new_path"
8842  # Check if we need to convert this using DOS-style short mode. If the path
8843  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8844  # take no chances and rewrite it.
8845  # Note: m4 eats our [], so we need to use [ and ] instead.
8846  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8847  if test "x$has_forbidden_chars" != x; then
8848    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8849    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8850  fi
8851
8852    # Output is in $new_path
8853
8854  windows_path="$new_path"
8855  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8856    unix_path=`$CYGPATH -u "$windows_path"`
8857    new_path="$unix_path"
8858  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8859    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8860    new_path="$unix_path"
8861  fi
8862
8863    # remove trailing .exe if any
8864    new_path="${new_path/%.exe/}"
8865
8866    # Save the first 10 bytes of this path to the storage, so fixpath can work.
8867    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8868  fi
8869
8870  else
8871    # We're on a posix platform. Hooray! :)
8872    # First separate the path from the arguments. This will split at the first
8873    # space.
8874    complete="$FOUND_MAKE"
8875    path="${complete%% *}"
8876    tmp="$complete EOL"
8877    arguments="${tmp#* }"
8878
8879    # Cannot rely on the command "which" here since it doesn't always work.
8880    is_absolute_path=`$ECHO "$path" | $GREP ^/`
8881    if test -z "$is_absolute_path"; then
8882      # Path to executable is not absolute. Find it.
8883      IFS_save="$IFS"
8884      IFS=:
8885      for p in $PATH; do
8886        if test -f "$p/$path" && test -x "$p/$path"; then
8887          new_path="$p/$path"
8888          break
8889        fi
8890      done
8891      IFS="$IFS_save"
8892    else
8893      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
8894$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
8895      new_path="$path"
8896    fi
8897
8898    if test "x$new_path" = x; then
8899      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8900$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8901      has_space=`$ECHO "$complete" | $GREP " "`
8902      if test "x$has_space" != x; then
8903        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
8904$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
8905      fi
8906      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8907    fi
8908  fi
8909
8910  # Now join together the path and the arguments once again
8911  if test "x$arguments" != xEOL; then
8912    new_complete="$new_path ${arguments% *}"
8913  else
8914    new_complete="$new_path"
8915  fi
8916
8917  if test "x$complete" != "x$new_complete"; then
8918    FOUND_MAKE="$new_complete"
8919    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
8920$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
8921  fi
8922
8923        fi
8924      fi
8925    fi
8926  fi
8927
8928
8929    if test "x$FOUND_MAKE" = x; then
8930      for ac_prog in make
8931do
8932  # Extract the first word of "$ac_prog", so it can be a program name with args.
8933set dummy $ac_prog; ac_word=$2
8934{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8935$as_echo_n "checking for $ac_word... " >&6; }
8936if ${ac_cv_path_CHECK_MAKE+:} false; then :
8937  $as_echo_n "(cached) " >&6
8938else
8939  case $CHECK_MAKE in
8940  [\\/]* | ?:[\\/]*)
8941  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
8942  ;;
8943  *)
8944  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8945for as_dir in $PATH
8946do
8947  IFS=$as_save_IFS
8948  test -z "$as_dir" && as_dir=.
8949    for ac_exec_ext in '' $ac_executable_extensions; do
8950  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8951    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
8952    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8953    break 2
8954  fi
8955done
8956  done
8957IFS=$as_save_IFS
8958
8959  ;;
8960esac
8961fi
8962CHECK_MAKE=$ac_cv_path_CHECK_MAKE
8963if test -n "$CHECK_MAKE"; then
8964  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
8965$as_echo "$CHECK_MAKE" >&6; }
8966else
8967  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8968$as_echo "no" >&6; }
8969fi
8970
8971
8972  test -n "$CHECK_MAKE" && break
8973done
8974
8975
8976  MAKE_CANDIDATE=""$CHECK_MAKE""
8977  DESCRIPTION="make in PATH"
8978  if test "x$MAKE_CANDIDATE" != x; then
8979    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8980$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8981    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8982    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8983    if test "x$IS_GNU_MAKE" = x; then
8984      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8985$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8986    else
8987      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8988      if test "x$IS_MODERN_MAKE" = x; then
8989        { $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
8990$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;}
8991      else
8992        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8993          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8994            MAKE_EXPECTED_ENV='cygwin'
8995          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8996            MAKE_EXPECTED_ENV='msys'
8997          else
8998            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8999          fi
9000          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
9001          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
9002        else
9003          # Not relevant for non-Windows
9004          IS_MAKE_CORRECT_ENV=true
9005        fi
9006        if test "x$IS_MAKE_CORRECT_ENV" = x; then
9007          { $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
9008$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;}
9009        else
9010          FOUND_MAKE=$MAKE_CANDIDATE
9011
9012  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9013
9014  # First separate the path from the arguments. This will split at the first
9015  # space.
9016  complete="$FOUND_MAKE"
9017  path="${complete%% *}"
9018  tmp="$complete EOL"
9019  arguments="${tmp#* }"
9020
9021  # Input might be given as Windows format, start by converting to
9022  # unix format.
9023  new_path=`$CYGPATH -u "$path"`
9024
9025  # Now try to locate executable using which
9026  new_path=`$WHICH "$new_path" 2> /dev/null`
9027  # bat and cmd files are not always considered executable in cygwin causing which
9028  # to not find them
9029  if test "x$new_path" = x \
9030      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9031      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9032    new_path=`$CYGPATH -u "$path"`
9033  fi
9034  if test "x$new_path" = x; then
9035    # Oops. Which didn't find the executable.
9036    # The splitting of arguments from the executable at a space might have been incorrect,
9037    # since paths with space are more likely in Windows. Give it another try with the whole
9038    # argument.
9039    path="$complete"
9040    arguments="EOL"
9041    new_path=`$CYGPATH -u "$path"`
9042    new_path=`$WHICH "$new_path" 2> /dev/null`
9043    # bat and cmd files are not always considered executable in cygwin causing which
9044    # to not find them
9045    if test "x$new_path" = x \
9046        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9047        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9048      new_path=`$CYGPATH -u "$path"`
9049    fi
9050    if test "x$new_path" = x; then
9051      # It's still not found. Now this is an unrecoverable error.
9052      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9053$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9054      has_space=`$ECHO "$complete" | $GREP " "`
9055      if test "x$has_space" != x; then
9056        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9057$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9058      fi
9059      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9060    fi
9061  fi
9062
9063  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9064  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9065  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9066  # "foo.exe" is OK but "foo" is an error.
9067  #
9068  # This test is therefore slightly more accurate than "test -f" to check for file presence.
9069  # It is also a way to make sure we got the proper file name for the real test later on.
9070  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9071  if test "x$test_shortpath" = x; then
9072    # Short path failed, file does not exist as specified.
9073    # Try adding .exe or .cmd
9074    if test -f "${new_path}.exe"; then
9075      input_to_shortpath="${new_path}.exe"
9076    elif test -f "${new_path}.cmd"; then
9077      input_to_shortpath="${new_path}.cmd"
9078    else
9079      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9080$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9081      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9082$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9083      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9084    fi
9085  else
9086    input_to_shortpath="$new_path"
9087  fi
9088
9089  # Call helper function which possibly converts this using DOS-style short mode.
9090  # If so, the updated path is stored in $new_path.
9091  new_path="$input_to_shortpath"
9092
9093  input_path="$input_to_shortpath"
9094  # Check if we need to convert this using DOS-style short mode. If the path
9095  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9096  # take no chances and rewrite it.
9097  # Note: m4 eats our [], so we need to use [ and ] instead.
9098  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9099  if test "x$has_forbidden_chars" != x; then
9100    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9101    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9102    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9103    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9104      # Going to short mode and back again did indeed matter. Since short mode is
9105      # case insensitive, let's make it lowercase to improve readability.
9106      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9107      # Now convert it back to Unix-stile (cygpath)
9108      input_path=`$CYGPATH -u "$shortmode_path"`
9109      new_path="$input_path"
9110    fi
9111  fi
9112
9113  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9114  if test "x$test_cygdrive_prefix" = x; then
9115    # As a simple fix, exclude /usr/bin since it's not a real path.
9116    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9117      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9118      # a path prefixed by /cygdrive for fixpath to work.
9119      new_path="$CYGWIN_ROOT_PATH$input_path"
9120    fi
9121  fi
9122
9123  # remove trailing .exe if any
9124  new_path="${new_path/%.exe/}"
9125
9126  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9127
9128  # First separate the path from the arguments. This will split at the first
9129  # space.
9130  complete="$FOUND_MAKE"
9131  path="${complete%% *}"
9132  tmp="$complete EOL"
9133  arguments="${tmp#* }"
9134
9135  # Input might be given as Windows format, start by converting to
9136  # unix format.
9137  new_path="$path"
9138
9139  windows_path="$new_path"
9140  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9141    unix_path=`$CYGPATH -u "$windows_path"`
9142    new_path="$unix_path"
9143  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9144    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9145    new_path="$unix_path"
9146  fi
9147
9148
9149  # Now try to locate executable using which
9150  new_path=`$WHICH "$new_path" 2> /dev/null`
9151
9152  if test "x$new_path" = x; then
9153    # Oops. Which didn't find the executable.
9154    # The splitting of arguments from the executable at a space might have been incorrect,
9155    # since paths with space are more likely in Windows. Give it another try with the whole
9156    # argument.
9157    path="$complete"
9158    arguments="EOL"
9159    new_path="$path"
9160
9161  windows_path="$new_path"
9162  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9163    unix_path=`$CYGPATH -u "$windows_path"`
9164    new_path="$unix_path"
9165  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9166    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9167    new_path="$unix_path"
9168  fi
9169
9170
9171    new_path=`$WHICH "$new_path" 2> /dev/null`
9172
9173    if test "x$new_path" = x; then
9174      # It's still not found. Now this is an unrecoverable error.
9175      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9176$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9177      has_space=`$ECHO "$complete" | $GREP " "`
9178      if test "x$has_space" != x; then
9179        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9180$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9181      fi
9182      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9183    fi
9184  fi
9185
9186  # Now new_path has a complete unix path to the binary
9187  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9188    # Keep paths in /bin as-is, but remove trailing .exe if any
9189    new_path="${new_path/%.exe/}"
9190    # Do not save /bin paths to all_fixpath_prefixes!
9191  else
9192    # Not in mixed or Windows style, start by that.
9193    new_path=`cmd //c echo $new_path`
9194
9195  input_path="$new_path"
9196  # Check if we need to convert this using DOS-style short mode. If the path
9197  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9198  # take no chances and rewrite it.
9199  # Note: m4 eats our [], so we need to use [ and ] instead.
9200  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9201  if test "x$has_forbidden_chars" != x; then
9202    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9203    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9204  fi
9205
9206    # Output is in $new_path
9207
9208  windows_path="$new_path"
9209  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9210    unix_path=`$CYGPATH -u "$windows_path"`
9211    new_path="$unix_path"
9212  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9213    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9214    new_path="$unix_path"
9215  fi
9216
9217    # remove trailing .exe if any
9218    new_path="${new_path/%.exe/}"
9219
9220    # Save the first 10 bytes of this path to the storage, so fixpath can work.
9221    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9222  fi
9223
9224  else
9225    # We're on a posix platform. Hooray! :)
9226    # First separate the path from the arguments. This will split at the first
9227    # space.
9228    complete="$FOUND_MAKE"
9229    path="${complete%% *}"
9230    tmp="$complete EOL"
9231    arguments="${tmp#* }"
9232
9233    # Cannot rely on the command "which" here since it doesn't always work.
9234    is_absolute_path=`$ECHO "$path" | $GREP ^/`
9235    if test -z "$is_absolute_path"; then
9236      # Path to executable is not absolute. Find it.
9237      IFS_save="$IFS"
9238      IFS=:
9239      for p in $PATH; do
9240        if test -f "$p/$path" && test -x "$p/$path"; then
9241          new_path="$p/$path"
9242          break
9243        fi
9244      done
9245      IFS="$IFS_save"
9246    else
9247      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9248$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9249      new_path="$path"
9250    fi
9251
9252    if test "x$new_path" = x; then
9253      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9254$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9255      has_space=`$ECHO "$complete" | $GREP " "`
9256      if test "x$has_space" != x; then
9257        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9258$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9259      fi
9260      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9261    fi
9262  fi
9263
9264  # Now join together the path and the arguments once again
9265  if test "x$arguments" != xEOL; then
9266    new_complete="$new_path ${arguments% *}"
9267  else
9268    new_complete="$new_path"
9269  fi
9270
9271  if test "x$complete" != "x$new_complete"; then
9272    FOUND_MAKE="$new_complete"
9273    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9274$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9275  fi
9276
9277        fi
9278      fi
9279    fi
9280  fi
9281
9282    fi
9283
9284    if test "x$FOUND_MAKE" = x; then
9285      if test "x$TOOLS_DIR" != x; then
9286        # We have a tools-dir, check that as well before giving up.
9287        OLD_PATH=$PATH
9288        PATH=$TOOLS_DIR:$PATH
9289        for ac_prog in gmake
9290do
9291  # Extract the first word of "$ac_prog", so it can be a program name with args.
9292set dummy $ac_prog; ac_word=$2
9293{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9294$as_echo_n "checking for $ac_word... " >&6; }
9295if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
9296  $as_echo_n "(cached) " >&6
9297else
9298  case $CHECK_TOOLSDIR_GMAKE in
9299  [\\/]* | ?:[\\/]*)
9300  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
9301  ;;
9302  *)
9303  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9304for as_dir in $PATH
9305do
9306  IFS=$as_save_IFS
9307  test -z "$as_dir" && as_dir=.
9308    for ac_exec_ext in '' $ac_executable_extensions; do
9309  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9310    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
9311    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9312    break 2
9313  fi
9314done
9315  done
9316IFS=$as_save_IFS
9317
9318  ;;
9319esac
9320fi
9321CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
9322if test -n "$CHECK_TOOLSDIR_GMAKE"; then
9323  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
9324$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
9325else
9326  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9327$as_echo "no" >&6; }
9328fi
9329
9330
9331  test -n "$CHECK_TOOLSDIR_GMAKE" && break
9332done
9333
9334
9335  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
9336  DESCRIPTION="gmake in tools-dir"
9337  if test "x$MAKE_CANDIDATE" != x; then
9338    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
9339$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
9340    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
9341    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
9342    if test "x$IS_GNU_MAKE" = x; then
9343      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
9344$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
9345    else
9346      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
9347      if test "x$IS_MODERN_MAKE" = x; then
9348        { $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
9349$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;}
9350      else
9351        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9352          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9353            MAKE_EXPECTED_ENV='cygwin'
9354          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9355            MAKE_EXPECTED_ENV='msys'
9356          else
9357            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
9358          fi
9359          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
9360          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
9361        else
9362          # Not relevant for non-Windows
9363          IS_MAKE_CORRECT_ENV=true
9364        fi
9365        if test "x$IS_MAKE_CORRECT_ENV" = x; then
9366          { $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
9367$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;}
9368        else
9369          FOUND_MAKE=$MAKE_CANDIDATE
9370
9371  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9372
9373  # First separate the path from the arguments. This will split at the first
9374  # space.
9375  complete="$FOUND_MAKE"
9376  path="${complete%% *}"
9377  tmp="$complete EOL"
9378  arguments="${tmp#* }"
9379
9380  # Input might be given as Windows format, start by converting to
9381  # unix format.
9382  new_path=`$CYGPATH -u "$path"`
9383
9384  # Now try to locate executable using which
9385  new_path=`$WHICH "$new_path" 2> /dev/null`
9386  # bat and cmd files are not always considered executable in cygwin causing which
9387  # to not find them
9388  if test "x$new_path" = x \
9389      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9390      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9391    new_path=`$CYGPATH -u "$path"`
9392  fi
9393  if test "x$new_path" = x; then
9394    # Oops. Which didn't find the executable.
9395    # The splitting of arguments from the executable at a space might have been incorrect,
9396    # since paths with space are more likely in Windows. Give it another try with the whole
9397    # argument.
9398    path="$complete"
9399    arguments="EOL"
9400    new_path=`$CYGPATH -u "$path"`
9401    new_path=`$WHICH "$new_path" 2> /dev/null`
9402    # bat and cmd files are not always considered executable in cygwin causing which
9403    # to not find them
9404    if test "x$new_path" = x \
9405        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9406        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9407      new_path=`$CYGPATH -u "$path"`
9408    fi
9409    if test "x$new_path" = x; then
9410      # It's still not found. Now this is an unrecoverable error.
9411      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9412$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9413      has_space=`$ECHO "$complete" | $GREP " "`
9414      if test "x$has_space" != x; then
9415        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9416$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9417      fi
9418      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9419    fi
9420  fi
9421
9422  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9423  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9424  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9425  # "foo.exe" is OK but "foo" is an error.
9426  #
9427  # This test is therefore slightly more accurate than "test -f" to check for file presence.
9428  # It is also a way to make sure we got the proper file name for the real test later on.
9429  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9430  if test "x$test_shortpath" = x; then
9431    # Short path failed, file does not exist as specified.
9432    # Try adding .exe or .cmd
9433    if test -f "${new_path}.exe"; then
9434      input_to_shortpath="${new_path}.exe"
9435    elif test -f "${new_path}.cmd"; then
9436      input_to_shortpath="${new_path}.cmd"
9437    else
9438      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9439$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9440      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9441$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9442      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9443    fi
9444  else
9445    input_to_shortpath="$new_path"
9446  fi
9447
9448  # Call helper function which possibly converts this using DOS-style short mode.
9449  # If so, the updated path is stored in $new_path.
9450  new_path="$input_to_shortpath"
9451
9452  input_path="$input_to_shortpath"
9453  # Check if we need to convert this using DOS-style short mode. If the path
9454  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9455  # take no chances and rewrite it.
9456  # Note: m4 eats our [], so we need to use [ and ] instead.
9457  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9458  if test "x$has_forbidden_chars" != x; then
9459    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9460    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9461    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9462    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9463      # Going to short mode and back again did indeed matter. Since short mode is
9464      # case insensitive, let's make it lowercase to improve readability.
9465      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9466      # Now convert it back to Unix-stile (cygpath)
9467      input_path=`$CYGPATH -u "$shortmode_path"`
9468      new_path="$input_path"
9469    fi
9470  fi
9471
9472  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9473  if test "x$test_cygdrive_prefix" = x; then
9474    # As a simple fix, exclude /usr/bin since it's not a real path.
9475    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9476      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9477      # a path prefixed by /cygdrive for fixpath to work.
9478      new_path="$CYGWIN_ROOT_PATH$input_path"
9479    fi
9480  fi
9481
9482  # remove trailing .exe if any
9483  new_path="${new_path/%.exe/}"
9484
9485  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9486
9487  # First separate the path from the arguments. This will split at the first
9488  # space.
9489  complete="$FOUND_MAKE"
9490  path="${complete%% *}"
9491  tmp="$complete EOL"
9492  arguments="${tmp#* }"
9493
9494  # Input might be given as Windows format, start by converting to
9495  # unix format.
9496  new_path="$path"
9497
9498  windows_path="$new_path"
9499  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9500    unix_path=`$CYGPATH -u "$windows_path"`
9501    new_path="$unix_path"
9502  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9503    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9504    new_path="$unix_path"
9505  fi
9506
9507
9508  # Now try to locate executable using which
9509  new_path=`$WHICH "$new_path" 2> /dev/null`
9510
9511  if test "x$new_path" = x; then
9512    # Oops. Which didn't find the executable.
9513    # The splitting of arguments from the executable at a space might have been incorrect,
9514    # since paths with space are more likely in Windows. Give it another try with the whole
9515    # argument.
9516    path="$complete"
9517    arguments="EOL"
9518    new_path="$path"
9519
9520  windows_path="$new_path"
9521  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9522    unix_path=`$CYGPATH -u "$windows_path"`
9523    new_path="$unix_path"
9524  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9525    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9526    new_path="$unix_path"
9527  fi
9528
9529
9530    new_path=`$WHICH "$new_path" 2> /dev/null`
9531
9532    if test "x$new_path" = x; then
9533      # It's still not found. Now this is an unrecoverable error.
9534      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9535$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9536      has_space=`$ECHO "$complete" | $GREP " "`
9537      if test "x$has_space" != x; then
9538        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9539$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9540      fi
9541      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9542    fi
9543  fi
9544
9545  # Now new_path has a complete unix path to the binary
9546  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9547    # Keep paths in /bin as-is, but remove trailing .exe if any
9548    new_path="${new_path/%.exe/}"
9549    # Do not save /bin paths to all_fixpath_prefixes!
9550  else
9551    # Not in mixed or Windows style, start by that.
9552    new_path=`cmd //c echo $new_path`
9553
9554  input_path="$new_path"
9555  # Check if we need to convert this using DOS-style short mode. If the path
9556  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9557  # take no chances and rewrite it.
9558  # Note: m4 eats our [], so we need to use [ and ] instead.
9559  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9560  if test "x$has_forbidden_chars" != x; then
9561    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9562    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9563  fi
9564
9565    # Output is in $new_path
9566
9567  windows_path="$new_path"
9568  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9569    unix_path=`$CYGPATH -u "$windows_path"`
9570    new_path="$unix_path"
9571  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9572    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9573    new_path="$unix_path"
9574  fi
9575
9576    # remove trailing .exe if any
9577    new_path="${new_path/%.exe/}"
9578
9579    # Save the first 10 bytes of this path to the storage, so fixpath can work.
9580    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9581  fi
9582
9583  else
9584    # We're on a posix platform. Hooray! :)
9585    # First separate the path from the arguments. This will split at the first
9586    # space.
9587    complete="$FOUND_MAKE"
9588    path="${complete%% *}"
9589    tmp="$complete EOL"
9590    arguments="${tmp#* }"
9591
9592    # Cannot rely on the command "which" here since it doesn't always work.
9593    is_absolute_path=`$ECHO "$path" | $GREP ^/`
9594    if test -z "$is_absolute_path"; then
9595      # Path to executable is not absolute. Find it.
9596      IFS_save="$IFS"
9597      IFS=:
9598      for p in $PATH; do
9599        if test -f "$p/$path" && test -x "$p/$path"; then
9600          new_path="$p/$path"
9601          break
9602        fi
9603      done
9604      IFS="$IFS_save"
9605    else
9606      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9607$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9608      new_path="$path"
9609    fi
9610
9611    if test "x$new_path" = x; then
9612      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9613$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9614      has_space=`$ECHO "$complete" | $GREP " "`
9615      if test "x$has_space" != x; then
9616        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9617$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9618      fi
9619      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9620    fi
9621  fi
9622
9623  # Now join together the path and the arguments once again
9624  if test "x$arguments" != xEOL; then
9625    new_complete="$new_path ${arguments% *}"
9626  else
9627    new_complete="$new_path"
9628  fi
9629
9630  if test "x$complete" != "x$new_complete"; then
9631    FOUND_MAKE="$new_complete"
9632    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9633$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9634  fi
9635
9636        fi
9637      fi
9638    fi
9639  fi
9640
9641        if test "x$FOUND_MAKE" = x; then
9642          for ac_prog in make
9643do
9644  # Extract the first word of "$ac_prog", so it can be a program name with args.
9645set dummy $ac_prog; ac_word=$2
9646{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9647$as_echo_n "checking for $ac_word... " >&6; }
9648if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
9649  $as_echo_n "(cached) " >&6
9650else
9651  case $CHECK_TOOLSDIR_MAKE in
9652  [\\/]* | ?:[\\/]*)
9653  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
9654  ;;
9655  *)
9656  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9657for as_dir in $PATH
9658do
9659  IFS=$as_save_IFS
9660  test -z "$as_dir" && as_dir=.
9661    for ac_exec_ext in '' $ac_executable_extensions; do
9662  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9663    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
9664    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9665    break 2
9666  fi
9667done
9668  done
9669IFS=$as_save_IFS
9670
9671  ;;
9672esac
9673fi
9674CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
9675if test -n "$CHECK_TOOLSDIR_MAKE"; then
9676  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
9677$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
9678else
9679  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9680$as_echo "no" >&6; }
9681fi
9682
9683
9684  test -n "$CHECK_TOOLSDIR_MAKE" && break
9685done
9686
9687
9688  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
9689  DESCRIPTION="make in tools-dir"
9690  if test "x$MAKE_CANDIDATE" != x; then
9691    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
9692$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
9693    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
9694    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
9695    if test "x$IS_GNU_MAKE" = x; then
9696      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
9697$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
9698    else
9699      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
9700      if test "x$IS_MODERN_MAKE" = x; then
9701        { $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
9702$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;}
9703      else
9704        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9705          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9706            MAKE_EXPECTED_ENV='cygwin'
9707          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9708            MAKE_EXPECTED_ENV='msys'
9709          else
9710            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
9711          fi
9712          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
9713          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
9714        else
9715          # Not relevant for non-Windows
9716          IS_MAKE_CORRECT_ENV=true
9717        fi
9718        if test "x$IS_MAKE_CORRECT_ENV" = x; then
9719          { $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
9720$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;}
9721        else
9722          FOUND_MAKE=$MAKE_CANDIDATE
9723
9724  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9725
9726  # First separate the path from the arguments. This will split at the first
9727  # space.
9728  complete="$FOUND_MAKE"
9729  path="${complete%% *}"
9730  tmp="$complete EOL"
9731  arguments="${tmp#* }"
9732
9733  # Input might be given as Windows format, start by converting to
9734  # unix format.
9735  new_path=`$CYGPATH -u "$path"`
9736
9737  # Now try to locate executable using which
9738  new_path=`$WHICH "$new_path" 2> /dev/null`
9739  # bat and cmd files are not always considered executable in cygwin causing which
9740  # to not find them
9741  if test "x$new_path" = x \
9742      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9743      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9744    new_path=`$CYGPATH -u "$path"`
9745  fi
9746  if test "x$new_path" = x; then
9747    # Oops. Which didn't find the executable.
9748    # The splitting of arguments from the executable at a space might have been incorrect,
9749    # since paths with space are more likely in Windows. Give it another try with the whole
9750    # argument.
9751    path="$complete"
9752    arguments="EOL"
9753    new_path=`$CYGPATH -u "$path"`
9754    new_path=`$WHICH "$new_path" 2> /dev/null`
9755    # bat and cmd files are not always considered executable in cygwin causing which
9756    # to not find them
9757    if test "x$new_path" = x \
9758        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9759        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9760      new_path=`$CYGPATH -u "$path"`
9761    fi
9762    if test "x$new_path" = x; then
9763      # It's still not found. Now this is an unrecoverable error.
9764      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9765$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9766      has_space=`$ECHO "$complete" | $GREP " "`
9767      if test "x$has_space" != x; then
9768        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9769$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9770      fi
9771      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9772    fi
9773  fi
9774
9775  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9776  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9777  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9778  # "foo.exe" is OK but "foo" is an error.
9779  #
9780  # This test is therefore slightly more accurate than "test -f" to check for file presence.
9781  # It is also a way to make sure we got the proper file name for the real test later on.
9782  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9783  if test "x$test_shortpath" = x; then
9784    # Short path failed, file does not exist as specified.
9785    # Try adding .exe or .cmd
9786    if test -f "${new_path}.exe"; then
9787      input_to_shortpath="${new_path}.exe"
9788    elif test -f "${new_path}.cmd"; then
9789      input_to_shortpath="${new_path}.cmd"
9790    else
9791      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9792$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9793      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9794$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9795      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9796    fi
9797  else
9798    input_to_shortpath="$new_path"
9799  fi
9800
9801  # Call helper function which possibly converts this using DOS-style short mode.
9802  # If so, the updated path is stored in $new_path.
9803  new_path="$input_to_shortpath"
9804
9805  input_path="$input_to_shortpath"
9806  # Check if we need to convert this using DOS-style short mode. If the path
9807  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9808  # take no chances and rewrite it.
9809  # Note: m4 eats our [], so we need to use [ and ] instead.
9810  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9811  if test "x$has_forbidden_chars" != x; then
9812    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9813    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9814    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9815    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9816      # Going to short mode and back again did indeed matter. Since short mode is
9817      # case insensitive, let's make it lowercase to improve readability.
9818      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9819      # Now convert it back to Unix-stile (cygpath)
9820      input_path=`$CYGPATH -u "$shortmode_path"`
9821      new_path="$input_path"
9822    fi
9823  fi
9824
9825  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9826  if test "x$test_cygdrive_prefix" = x; then
9827    # As a simple fix, exclude /usr/bin since it's not a real path.
9828    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9829      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9830      # a path prefixed by /cygdrive for fixpath to work.
9831      new_path="$CYGWIN_ROOT_PATH$input_path"
9832    fi
9833  fi
9834
9835  # remove trailing .exe if any
9836  new_path="${new_path/%.exe/}"
9837
9838  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9839
9840  # First separate the path from the arguments. This will split at the first
9841  # space.
9842  complete="$FOUND_MAKE"
9843  path="${complete%% *}"
9844  tmp="$complete EOL"
9845  arguments="${tmp#* }"
9846
9847  # Input might be given as Windows format, start by converting to
9848  # unix format.
9849  new_path="$path"
9850
9851  windows_path="$new_path"
9852  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9853    unix_path=`$CYGPATH -u "$windows_path"`
9854    new_path="$unix_path"
9855  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9856    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9857    new_path="$unix_path"
9858  fi
9859
9860
9861  # Now try to locate executable using which
9862  new_path=`$WHICH "$new_path" 2> /dev/null`
9863
9864  if test "x$new_path" = x; then
9865    # Oops. Which didn't find the executable.
9866    # The splitting of arguments from the executable at a space might have been incorrect,
9867    # since paths with space are more likely in Windows. Give it another try with the whole
9868    # argument.
9869    path="$complete"
9870    arguments="EOL"
9871    new_path="$path"
9872
9873  windows_path="$new_path"
9874  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9875    unix_path=`$CYGPATH -u "$windows_path"`
9876    new_path="$unix_path"
9877  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9878    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9879    new_path="$unix_path"
9880  fi
9881
9882
9883    new_path=`$WHICH "$new_path" 2> /dev/null`
9884
9885    if test "x$new_path" = x; then
9886      # It's still not found. Now this is an unrecoverable error.
9887      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9888$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9889      has_space=`$ECHO "$complete" | $GREP " "`
9890      if test "x$has_space" != x; then
9891        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9892$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9893      fi
9894      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9895    fi
9896  fi
9897
9898  # Now new_path has a complete unix path to the binary
9899  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9900    # Keep paths in /bin as-is, but remove trailing .exe if any
9901    new_path="${new_path/%.exe/}"
9902    # Do not save /bin paths to all_fixpath_prefixes!
9903  else
9904    # Not in mixed or Windows style, start by that.
9905    new_path=`cmd //c echo $new_path`
9906
9907  input_path="$new_path"
9908  # Check if we need to convert this using DOS-style short mode. If the path
9909  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9910  # take no chances and rewrite it.
9911  # Note: m4 eats our [], so we need to use [ and ] instead.
9912  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9913  if test "x$has_forbidden_chars" != x; then
9914    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9915    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9916  fi
9917
9918    # Output is in $new_path
9919
9920  windows_path="$new_path"
9921  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9922    unix_path=`$CYGPATH -u "$windows_path"`
9923    new_path="$unix_path"
9924  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9925    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9926    new_path="$unix_path"
9927  fi
9928
9929    # remove trailing .exe if any
9930    new_path="${new_path/%.exe/}"
9931
9932    # Save the first 10 bytes of this path to the storage, so fixpath can work.
9933    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9934  fi
9935
9936  else
9937    # We're on a posix platform. Hooray! :)
9938    # First separate the path from the arguments. This will split at the first
9939    # space.
9940    complete="$FOUND_MAKE"
9941    path="${complete%% *}"
9942    tmp="$complete EOL"
9943    arguments="${tmp#* }"
9944
9945    # Cannot rely on the command "which" here since it doesn't always work.
9946    is_absolute_path=`$ECHO "$path" | $GREP ^/`
9947    if test -z "$is_absolute_path"; then
9948      # Path to executable is not absolute. Find it.
9949      IFS_save="$IFS"
9950      IFS=:
9951      for p in $PATH; do
9952        if test -f "$p/$path" && test -x "$p/$path"; then
9953          new_path="$p/$path"
9954          break
9955        fi
9956      done
9957      IFS="$IFS_save"
9958    else
9959      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9960$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9961      new_path="$path"
9962    fi
9963
9964    if test "x$new_path" = x; then
9965      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9966$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9967      has_space=`$ECHO "$complete" | $GREP " "`
9968      if test "x$has_space" != x; then
9969        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9970$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9971      fi
9972      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9973    fi
9974  fi
9975
9976  # Now join together the path and the arguments once again
9977  if test "x$arguments" != xEOL; then
9978    new_complete="$new_path ${arguments% *}"
9979  else
9980    new_complete="$new_path"
9981  fi
9982
9983  if test "x$complete" != "x$new_complete"; then
9984    FOUND_MAKE="$new_complete"
9985    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9986$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9987  fi
9988
9989        fi
9990      fi
9991    fi
9992  fi
9993
9994        fi
9995        PATH=$OLD_PATH
9996      fi
9997    fi
9998
9999    if test "x$FOUND_MAKE" = x; then
10000      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
10001    fi
10002  fi
10003
10004  MAKE=$FOUND_MAKE
10005
10006  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
10007$as_echo "$as_me: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
10008
10009
10010
10011  # Test if find supports -delete
10012  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
10013$as_echo_n "checking if find supports -delete... " >&6; }
10014  FIND_DELETE="-delete"
10015
10016  DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
10017
10018  echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
10019
10020  TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
10021  if test -f $DELETEDIR/TestIfFindSupportsDelete; then
10022    # No, it does not.
10023    rm $DELETEDIR/TestIfFindSupportsDelete
10024    FIND_DELETE="-exec rm \{\} \+"
10025    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10026$as_echo "no" >&6; }
10027  else
10028    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10029$as_echo "yes" >&6; }
10030  fi
10031  rmdir $DELETEDIR
10032
10033
10034
10035  # These tools might not be installed by default,
10036  # need hint on how to install them.
10037
10038  for ac_prog in unzip
10039do
10040  # Extract the first word of "$ac_prog", so it can be a program name with args.
10041set dummy $ac_prog; ac_word=$2
10042{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10043$as_echo_n "checking for $ac_word... " >&6; }
10044if ${ac_cv_path_UNZIP+:} false; then :
10045  $as_echo_n "(cached) " >&6
10046else
10047  case $UNZIP in
10048  [\\/]* | ?:[\\/]*)
10049  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
10050  ;;
10051  *)
10052  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10053for as_dir in $PATH
10054do
10055  IFS=$as_save_IFS
10056  test -z "$as_dir" && as_dir=.
10057    for ac_exec_ext in '' $ac_executable_extensions; do
10058  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10059    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
10060    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10061    break 2
10062  fi
10063done
10064  done
10065IFS=$as_save_IFS
10066
10067  ;;
10068esac
10069fi
10070UNZIP=$ac_cv_path_UNZIP
10071if test -n "$UNZIP"; then
10072  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
10073$as_echo "$UNZIP" >&6; }
10074else
10075  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10076$as_echo "no" >&6; }
10077fi
10078
10079
10080  test -n "$UNZIP" && break
10081done
10082
10083
10084  if test "x$UNZIP" = x; then
10085    if test "xunzip" = x; then
10086      PROG_NAME=unzip
10087    else
10088      PROG_NAME=unzip
10089    fi
10090    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10091$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10092    as_fn_error $? "Cannot continue" "$LINENO" 5
10093  fi
10094
10095
10096
10097  for ac_prog in zip
10098do
10099  # Extract the first word of "$ac_prog", so it can be a program name with args.
10100set dummy $ac_prog; ac_word=$2
10101{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10102$as_echo_n "checking for $ac_word... " >&6; }
10103if ${ac_cv_path_ZIP+:} false; then :
10104  $as_echo_n "(cached) " >&6
10105else
10106  case $ZIP in
10107  [\\/]* | ?:[\\/]*)
10108  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
10109  ;;
10110  *)
10111  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10112for as_dir in $PATH
10113do
10114  IFS=$as_save_IFS
10115  test -z "$as_dir" && as_dir=.
10116    for ac_exec_ext in '' $ac_executable_extensions; do
10117  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10118    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
10119    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10120    break 2
10121  fi
10122done
10123  done
10124IFS=$as_save_IFS
10125
10126  ;;
10127esac
10128fi
10129ZIP=$ac_cv_path_ZIP
10130if test -n "$ZIP"; then
10131  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
10132$as_echo "$ZIP" >&6; }
10133else
10134  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10135$as_echo "no" >&6; }
10136fi
10137
10138
10139  test -n "$ZIP" && break
10140done
10141
10142
10143  if test "x$ZIP" = x; then
10144    if test "xzip" = x; then
10145      PROG_NAME=zip
10146    else
10147      PROG_NAME=zip
10148    fi
10149    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10150$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10151    as_fn_error $? "Cannot continue" "$LINENO" 5
10152  fi
10153
10154
10155
10156  # Non-required basic tools
10157
10158  # Extract the first word of "ldd", so it can be a program name with args.
10159set dummy ldd; ac_word=$2
10160{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10161$as_echo_n "checking for $ac_word... " >&6; }
10162if ${ac_cv_path_LDD+:} false; then :
10163  $as_echo_n "(cached) " >&6
10164else
10165  case $LDD in
10166  [\\/]* | ?:[\\/]*)
10167  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
10168  ;;
10169  *)
10170  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10171for as_dir in $PATH
10172do
10173  IFS=$as_save_IFS
10174  test -z "$as_dir" && as_dir=.
10175    for ac_exec_ext in '' $ac_executable_extensions; do
10176  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10177    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
10178    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10179    break 2
10180  fi
10181done
10182  done
10183IFS=$as_save_IFS
10184
10185  ;;
10186esac
10187fi
10188LDD=$ac_cv_path_LDD
10189if test -n "$LDD"; then
10190  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
10191$as_echo "$LDD" >&6; }
10192else
10193  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10194$as_echo "no" >&6; }
10195fi
10196
10197
10198  if test "x$LDD" = "x"; then
10199    # List shared lib dependencies is used for
10200    # debug output and checking for forbidden dependencies.
10201    # We can build without it.
10202    LDD="true"
10203  fi
10204  # Extract the first word of "otool", so it can be a program name with args.
10205set dummy otool; ac_word=$2
10206{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10207$as_echo_n "checking for $ac_word... " >&6; }
10208if ${ac_cv_path_OTOOL+:} false; then :
10209  $as_echo_n "(cached) " >&6
10210else
10211  case $OTOOL in
10212  [\\/]* | ?:[\\/]*)
10213  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
10214  ;;
10215  *)
10216  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10217for as_dir in $PATH
10218do
10219  IFS=$as_save_IFS
10220  test -z "$as_dir" && as_dir=.
10221    for ac_exec_ext in '' $ac_executable_extensions; do
10222  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10223    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
10224    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10225    break 2
10226  fi
10227done
10228  done
10229IFS=$as_save_IFS
10230
10231  ;;
10232esac
10233fi
10234OTOOL=$ac_cv_path_OTOOL
10235if test -n "$OTOOL"; then
10236  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
10237$as_echo "$OTOOL" >&6; }
10238else
10239  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10240$as_echo "no" >&6; }
10241fi
10242
10243
10244  if test "x$OTOOL" = "x"; then
10245    OTOOL="true"
10246  fi
10247  for ac_prog in readelf greadelf
10248do
10249  # Extract the first word of "$ac_prog", so it can be a program name with args.
10250set dummy $ac_prog; ac_word=$2
10251{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10252$as_echo_n "checking for $ac_word... " >&6; }
10253if ${ac_cv_path_READELF+:} false; then :
10254  $as_echo_n "(cached) " >&6
10255else
10256  case $READELF in
10257  [\\/]* | ?:[\\/]*)
10258  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
10259  ;;
10260  *)
10261  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10262for as_dir in $PATH
10263do
10264  IFS=$as_save_IFS
10265  test -z "$as_dir" && as_dir=.
10266    for ac_exec_ext in '' $ac_executable_extensions; do
10267  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10268    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
10269    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10270    break 2
10271  fi
10272done
10273  done
10274IFS=$as_save_IFS
10275
10276  ;;
10277esac
10278fi
10279READELF=$ac_cv_path_READELF
10280if test -n "$READELF"; then
10281  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
10282$as_echo "$READELF" >&6; }
10283else
10284  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10285$as_echo "no" >&6; }
10286fi
10287
10288
10289  test -n "$READELF" && break
10290done
10291
10292  # Extract the first word of "hg", so it can be a program name with args.
10293set dummy hg; ac_word=$2
10294{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10295$as_echo_n "checking for $ac_word... " >&6; }
10296if ${ac_cv_path_HG+:} false; then :
10297  $as_echo_n "(cached) " >&6
10298else
10299  case $HG in
10300  [\\/]* | ?:[\\/]*)
10301  ac_cv_path_HG="$HG" # Let the user override the test with a path.
10302  ;;
10303  *)
10304  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10305for as_dir in $PATH
10306do
10307  IFS=$as_save_IFS
10308  test -z "$as_dir" && as_dir=.
10309    for ac_exec_ext in '' $ac_executable_extensions; do
10310  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10311    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
10312    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10313    break 2
10314  fi
10315done
10316  done
10317IFS=$as_save_IFS
10318
10319  ;;
10320esac
10321fi
10322HG=$ac_cv_path_HG
10323if test -n "$HG"; then
10324  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
10325$as_echo "$HG" >&6; }
10326else
10327  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10328$as_echo "no" >&6; }
10329fi
10330
10331
10332  # Extract the first word of "stat", so it can be a program name with args.
10333set dummy stat; ac_word=$2
10334{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10335$as_echo_n "checking for $ac_word... " >&6; }
10336if ${ac_cv_path_STAT+:} false; then :
10337  $as_echo_n "(cached) " >&6
10338else
10339  case $STAT in
10340  [\\/]* | ?:[\\/]*)
10341  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
10342  ;;
10343  *)
10344  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10345for as_dir in $PATH
10346do
10347  IFS=$as_save_IFS
10348  test -z "$as_dir" && as_dir=.
10349    for ac_exec_ext in '' $ac_executable_extensions; do
10350  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10351    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
10352    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10353    break 2
10354  fi
10355done
10356  done
10357IFS=$as_save_IFS
10358
10359  ;;
10360esac
10361fi
10362STAT=$ac_cv_path_STAT
10363if test -n "$STAT"; then
10364  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
10365$as_echo "$STAT" >&6; }
10366else
10367  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10368$as_echo "no" >&6; }
10369fi
10370
10371
10372  # Extract the first word of "time", so it can be a program name with args.
10373set dummy time; ac_word=$2
10374{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10375$as_echo_n "checking for $ac_word... " >&6; }
10376if ${ac_cv_path_TIME+:} false; then :
10377  $as_echo_n "(cached) " >&6
10378else
10379  case $TIME in
10380  [\\/]* | ?:[\\/]*)
10381  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
10382  ;;
10383  *)
10384  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10385for as_dir in $PATH
10386do
10387  IFS=$as_save_IFS
10388  test -z "$as_dir" && as_dir=.
10389    for ac_exec_ext in '' $ac_executable_extensions; do
10390  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10391    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
10392    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10393    break 2
10394  fi
10395done
10396  done
10397IFS=$as_save_IFS
10398
10399  ;;
10400esac
10401fi
10402TIME=$ac_cv_path_TIME
10403if test -n "$TIME"; then
10404  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
10405$as_echo "$TIME" >&6; }
10406else
10407  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10408$as_echo "no" >&6; }
10409fi
10410
10411
10412  # Check if it's GNU time
10413  IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
10414  if test "x$IS_GNU_TIME" != x; then
10415    IS_GNU_TIME=yes
10416  else
10417    IS_GNU_TIME=no
10418  fi
10419
10420
10421  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
10422
10423  for ac_prog in comm
10424do
10425  # Extract the first word of "$ac_prog", so it can be a program name with args.
10426set dummy $ac_prog; ac_word=$2
10427{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10428$as_echo_n "checking for $ac_word... " >&6; }
10429if ${ac_cv_path_COMM+:} false; then :
10430  $as_echo_n "(cached) " >&6
10431else
10432  case $COMM in
10433  [\\/]* | ?:[\\/]*)
10434  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
10435  ;;
10436  *)
10437  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10438for as_dir in $PATH
10439do
10440  IFS=$as_save_IFS
10441  test -z "$as_dir" && as_dir=.
10442    for ac_exec_ext in '' $ac_executable_extensions; do
10443  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10444    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
10445    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10446    break 2
10447  fi
10448done
10449  done
10450IFS=$as_save_IFS
10451
10452  ;;
10453esac
10454fi
10455COMM=$ac_cv_path_COMM
10456if test -n "$COMM"; then
10457  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
10458$as_echo "$COMM" >&6; }
10459else
10460  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10461$as_echo "no" >&6; }
10462fi
10463
10464
10465  test -n "$COMM" && break
10466done
10467
10468
10469  if test "x$COMM" = x; then
10470    if test "xcomm" = x; then
10471      PROG_NAME=comm
10472    else
10473      PROG_NAME=comm
10474    fi
10475    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10476$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10477    as_fn_error $? "Cannot continue" "$LINENO" 5
10478  fi
10479
10480
10481  fi
10482
10483  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
10484
10485  for ac_prog in xattr
10486do
10487  # Extract the first word of "$ac_prog", so it can be a program name with args.
10488set dummy $ac_prog; ac_word=$2
10489{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10490$as_echo_n "checking for $ac_word... " >&6; }
10491if ${ac_cv_path_XATTR+:} false; then :
10492  $as_echo_n "(cached) " >&6
10493else
10494  case $XATTR in
10495  [\\/]* | ?:[\\/]*)
10496  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
10497  ;;
10498  *)
10499  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10500for as_dir in $PATH
10501do
10502  IFS=$as_save_IFS
10503  test -z "$as_dir" && as_dir=.
10504    for ac_exec_ext in '' $ac_executable_extensions; do
10505  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10506    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
10507    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10508    break 2
10509  fi
10510done
10511  done
10512IFS=$as_save_IFS
10513
10514  ;;
10515esac
10516fi
10517XATTR=$ac_cv_path_XATTR
10518if test -n "$XATTR"; then
10519  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
10520$as_echo "$XATTR" >&6; }
10521else
10522  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10523$as_echo "no" >&6; }
10524fi
10525
10526
10527  test -n "$XATTR" && break
10528done
10529
10530
10531  if test "x$XATTR" = x; then
10532    if test "xxattr" = x; then
10533      PROG_NAME=xattr
10534    else
10535      PROG_NAME=xattr
10536    fi
10537    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10538$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10539    as_fn_error $? "Cannot continue" "$LINENO" 5
10540  fi
10541
10542
10543    # Extract the first word of "codesign", so it can be a program name with args.
10544set dummy codesign; ac_word=$2
10545{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10546$as_echo_n "checking for $ac_word... " >&6; }
10547if ${ac_cv_path_CODESIGN+:} false; then :
10548  $as_echo_n "(cached) " >&6
10549else
10550  case $CODESIGN in
10551  [\\/]* | ?:[\\/]*)
10552  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
10553  ;;
10554  *)
10555  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10556for as_dir in $PATH
10557do
10558  IFS=$as_save_IFS
10559  test -z "$as_dir" && as_dir=.
10560    for ac_exec_ext in '' $ac_executable_extensions; do
10561  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10562    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
10563    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10564    break 2
10565  fi
10566done
10567  done
10568IFS=$as_save_IFS
10569
10570  ;;
10571esac
10572fi
10573CODESIGN=$ac_cv_path_CODESIGN
10574if test -n "$CODESIGN"; then
10575  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
10576$as_echo "$CODESIGN" >&6; }
10577else
10578  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10579$as_echo "no" >&6; }
10580fi
10581
10582
10583    if test "x$CODESIGN" != "x"; then
10584      # Verify that the openjdk_codesign certificate is present
10585      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
10586$as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
10587      rm -f codesign-testfile
10588      touch codesign-testfile
10589      codesign -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
10590      rm -f codesign-testfile
10591      if test "x$CODESIGN" = x; then
10592        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10593$as_echo "no" >&6; }
10594      else
10595        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10596$as_echo "yes" >&6; }
10597      fi
10598    fi
10599  fi
10600
10601
10602# Check if pkg-config is available.
10603
10604
10605if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
10606	if test -n "$ac_tool_prefix"; then
10607  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
10608set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
10609{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10610$as_echo_n "checking for $ac_word... " >&6; }
10611if ${ac_cv_path_PKG_CONFIG+:} false; then :
10612  $as_echo_n "(cached) " >&6
10613else
10614  case $PKG_CONFIG in
10615  [\\/]* | ?:[\\/]*)
10616  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10617  ;;
10618  *)
10619  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10620for as_dir in $PATH
10621do
10622  IFS=$as_save_IFS
10623  test -z "$as_dir" && as_dir=.
10624    for ac_exec_ext in '' $ac_executable_extensions; do
10625  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10626    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10627    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10628    break 2
10629  fi
10630done
10631  done
10632IFS=$as_save_IFS
10633
10634  ;;
10635esac
10636fi
10637PKG_CONFIG=$ac_cv_path_PKG_CONFIG
10638if test -n "$PKG_CONFIG"; then
10639  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
10640$as_echo "$PKG_CONFIG" >&6; }
10641else
10642  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10643$as_echo "no" >&6; }
10644fi
10645
10646
10647fi
10648if test -z "$ac_cv_path_PKG_CONFIG"; then
10649  ac_pt_PKG_CONFIG=$PKG_CONFIG
10650  # Extract the first word of "pkg-config", so it can be a program name with args.
10651set dummy pkg-config; ac_word=$2
10652{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10653$as_echo_n "checking for $ac_word... " >&6; }
10654if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
10655  $as_echo_n "(cached) " >&6
10656else
10657  case $ac_pt_PKG_CONFIG in
10658  [\\/]* | ?:[\\/]*)
10659  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
10660  ;;
10661  *)
10662  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10663for as_dir in $PATH
10664do
10665  IFS=$as_save_IFS
10666  test -z "$as_dir" && as_dir=.
10667    for ac_exec_ext in '' $ac_executable_extensions; do
10668  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10669    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10670    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10671    break 2
10672  fi
10673done
10674  done
10675IFS=$as_save_IFS
10676
10677  ;;
10678esac
10679fi
10680ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
10681if test -n "$ac_pt_PKG_CONFIG"; then
10682  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
10683$as_echo "$ac_pt_PKG_CONFIG" >&6; }
10684else
10685  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10686$as_echo "no" >&6; }
10687fi
10688
10689  if test "x$ac_pt_PKG_CONFIG" = x; then
10690    PKG_CONFIG=""
10691  else
10692    case $cross_compiling:$ac_tool_warned in
10693yes:)
10694{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10695$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10696ac_tool_warned=yes ;;
10697esac
10698    PKG_CONFIG=$ac_pt_PKG_CONFIG
10699  fi
10700else
10701  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
10702fi
10703
10704fi
10705if test -n "$PKG_CONFIG"; then
10706	_pkg_min_version=0.9.0
10707	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
10708$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
10709	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
10710		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10711$as_echo "yes" >&6; }
10712	else
10713		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10714$as_echo "no" >&6; }
10715		PKG_CONFIG=""
10716	fi
10717
10718fi
10719
10720# After basic tools have been setup, we can check build os specific details.
10721
10722  ###############################################################################
10723
10724  # Note that this is the build platform OS version!
10725
10726  OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
10727  OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
10728  OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
10729  OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
10730
10731
10732
10733
10734
10735# Setup builddeps, for automatic downloading of tools we need.
10736# This is needed before we can call BDEPS_CHECK_MODULE, which is done in
10737# boot-jdk setup, but we need to have basic tools setup first.
10738
10739
10740# Check whether --with-builddeps-conf was given.
10741if test "${with_builddeps_conf+set}" = set; then :
10742  withval=$with_builddeps_conf;
10743fi
10744
10745
10746
10747# Check whether --with-builddeps-server was given.
10748if test "${with_builddeps_server+set}" = set; then :
10749  withval=$with_builddeps_server;
10750fi
10751
10752
10753
10754# Check whether --with-builddeps-dir was given.
10755if test "${with_builddeps_dir+set}" = set; then :
10756  withval=$with_builddeps_dir;
10757else
10758  with_builddeps_dir=/localhome/builddeps
10759fi
10760
10761
10762
10763# Check whether --with-builddeps-group was given.
10764if test "${with_builddeps_group+set}" = set; then :
10765  withval=$with_builddeps_group;
10766fi
10767
10768
10769
10770
10771  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
10772    if test "x$with_builddeps_conf" != x; then
10773      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for supplied builddeps configuration file" >&5
10774$as_echo_n "checking for supplied builddeps configuration file... " >&6; }
10775      builddepsfile=$with_builddeps_conf
10776      if test -s $builddepsfile; then
10777        . $builddepsfile
10778        { $as_echo "$as_me:${as_lineno-$LINENO}: result: loaded!" >&5
10779$as_echo "loaded!" >&6; }
10780      else
10781        as_fn_error $? "The given builddeps conf file $with_builddeps_conf could not be loaded!" "$LINENO" 5
10782      fi
10783    else
10784      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builddeps.conf files in sources..." >&5
10785$as_echo_n "checking for builddeps.conf files in sources...... " >&6; }
10786      builddepsfile=`mktemp`
10787      touch $builddepsfile
10788      # Put all found confs into a single file.
10789      find ${SRC_ROOT} -name builddeps.conf -exec cat \{\} \; >> $builddepsfile
10790      # Source the file to acquire the variables
10791      if test -s $builddepsfile; then
10792        . $builddepsfile
10793        { $as_echo "$as_me:${as_lineno-$LINENO}: result: found at least one!" >&5
10794$as_echo "found at least one!" >&6; }
10795      else
10796        as_fn_error $? "Could not find any builddeps.conf at all!" "$LINENO" 5
10797      fi
10798    fi
10799    # Create build and target names that use _ instead of "-" and ".".
10800    # This is necessary to use them in variable names.
10801    build_var=`echo ${OPENJDK_BUILD_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
10802    target_var=`echo ${OPENJDK_TARGET_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
10803    # Extract rewrite information for build and target
10804    eval rewritten_build=\${REWRITE_${build_var}}
10805    if test "x$rewritten_build" = x; then
10806      rewritten_build=${OPENJDK_BUILD_AUTOCONF_NAME}
10807      echo Build stays the same $rewritten_build
10808    else
10809      echo Rewriting build for builddeps into $rewritten_build
10810    fi
10811    eval rewritten_target=\${REWRITE_${target_var}}
10812    if test "x$rewritten_target" = x; then
10813      rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME}
10814      echo Target stays the same $rewritten_target
10815    else
10816      echo Rewriting target for builddeps into $rewritten_target
10817    fi
10818    rewritten_build_var=`echo ${rewritten_build} | tr '-' '_' | tr '.' '_'`
10819    rewritten_target_var=`echo ${rewritten_target} | tr '-' '_' | tr '.' '_'`
10820  fi
10821  for ac_prog in 7z unzip
10822do
10823  # Extract the first word of "$ac_prog", so it can be a program name with args.
10824set dummy $ac_prog; ac_word=$2
10825{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10826$as_echo_n "checking for $ac_word... " >&6; }
10827if ${ac_cv_prog_BDEPS_UNZIP+:} false; then :
10828  $as_echo_n "(cached) " >&6
10829else
10830  if test -n "$BDEPS_UNZIP"; then
10831  ac_cv_prog_BDEPS_UNZIP="$BDEPS_UNZIP" # Let the user override the test.
10832else
10833as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10834for as_dir in $PATH
10835do
10836  IFS=$as_save_IFS
10837  test -z "$as_dir" && as_dir=.
10838    for ac_exec_ext in '' $ac_executable_extensions; do
10839  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10840    ac_cv_prog_BDEPS_UNZIP="$ac_prog"
10841    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10842    break 2
10843  fi
10844done
10845  done
10846IFS=$as_save_IFS
10847
10848fi
10849fi
10850BDEPS_UNZIP=$ac_cv_prog_BDEPS_UNZIP
10851if test -n "$BDEPS_UNZIP"; then
10852  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_UNZIP" >&5
10853$as_echo "$BDEPS_UNZIP" >&6; }
10854else
10855  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10856$as_echo "no" >&6; }
10857fi
10858
10859
10860  test -n "$BDEPS_UNZIP" && break
10861done
10862
10863  if test "x$BDEPS_UNZIP" = x7z; then
10864    BDEPS_UNZIP="7z x"
10865  fi
10866
10867  for ac_prog in wget lftp ftp
10868do
10869  # Extract the first word of "$ac_prog", so it can be a program name with args.
10870set dummy $ac_prog; ac_word=$2
10871{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10872$as_echo_n "checking for $ac_word... " >&6; }
10873if ${ac_cv_prog_BDEPS_FTP+:} false; then :
10874  $as_echo_n "(cached) " >&6
10875else
10876  if test -n "$BDEPS_FTP"; then
10877  ac_cv_prog_BDEPS_FTP="$BDEPS_FTP" # Let the user override the test.
10878else
10879as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10880for as_dir in $PATH
10881do
10882  IFS=$as_save_IFS
10883  test -z "$as_dir" && as_dir=.
10884    for ac_exec_ext in '' $ac_executable_extensions; do
10885  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10886    ac_cv_prog_BDEPS_FTP="$ac_prog"
10887    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10888    break 2
10889  fi
10890done
10891  done
10892IFS=$as_save_IFS
10893
10894fi
10895fi
10896BDEPS_FTP=$ac_cv_prog_BDEPS_FTP
10897if test -n "$BDEPS_FTP"; then
10898  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_FTP" >&5
10899$as_echo "$BDEPS_FTP" >&6; }
10900else
10901  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10902$as_echo "no" >&6; }
10903fi
10904
10905
10906  test -n "$BDEPS_FTP" && break
10907done
10908
10909
10910
10911###############################################################################
10912#
10913# Determine OpenJDK variants, options and version numbers.
10914#
10915###############################################################################
10916
10917# We need build & target for this.
10918
10919
10920  ###############################################################################
10921  #
10922  # Should we build a JDK/JVM with headful support (ie a graphical ui)?
10923  # We always build headless support.
10924  #
10925  { $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
10926$as_echo_n "checking headful support... " >&6; }
10927  # Check whether --enable-headful was given.
10928if test "${enable_headful+set}" = set; then :
10929  enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
10930else
10931  SUPPORT_HEADFUL=yes
10932fi
10933
10934
10935  SUPPORT_HEADLESS=yes
10936  BUILD_HEADLESS="BUILD_HEADLESS:=true"
10937
10938  if test "x$SUPPORT_HEADFUL" = xyes; then
10939    # We are building both headful and headless.
10940    headful_msg="include support for both headful and headless"
10941  fi
10942
10943  if test "x$SUPPORT_HEADFUL" = xno; then
10944    # Thus we are building headless only.
10945    BUILD_HEADLESS="BUILD_HEADLESS:=true"
10946    headful_msg="headless only"
10947  fi
10948
10949  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
10950$as_echo "$headful_msg" >&6; }
10951
10952
10953
10954
10955
10956  # Control wether Hotspot runs Queens test after build.
10957  # Check whether --enable-hotspot-test-in-build was given.
10958if test "${enable_hotspot_test_in_build+set}" = set; then :
10959  enableval=$enable_hotspot_test_in_build;
10960else
10961  enable_hotspot_test_in_build=no
10962fi
10963
10964  if test "x$enable_hotspot_test_in_build" = "xyes"; then
10965    TEST_IN_BUILD=true
10966  else
10967    TEST_IN_BUILD=false
10968  fi
10969
10970
10971  ###############################################################################
10972  #
10973  # Choose cacerts source file
10974  #
10975
10976# Check whether --with-cacerts-file was given.
10977if test "${with_cacerts_file+set}" = set; then :
10978  withval=$with_cacerts_file;
10979fi
10980
10981  if test "x$with_cacerts_file" != x; then
10982    CACERTS_FILE=$with_cacerts_file
10983  else
10984    CACERTS_FILE=${SRC_ROOT}/jdk/src/share/lib/security/cacerts
10985  fi
10986
10987
10988  ###############################################################################
10989  #
10990  # Enable or disable unlimited crypto
10991  #
10992  # Check whether --enable-unlimited-crypto was given.
10993if test "${enable_unlimited_crypto+set}" = set; then :
10994  enableval=$enable_unlimited_crypto;
10995else
10996  enable_unlimited_crypto=no
10997fi
10998
10999  if test "x$enable_unlimited_crypto" = "xyes"; then
11000    UNLIMITED_CRYPTO=true
11001  else
11002    UNLIMITED_CRYPTO=false
11003  fi
11004
11005
11006  ###############################################################################
11007  #
11008  # Enable or disable the elliptic curve crypto implementation
11009  #
11010
11011
11012  ###############################################################################
11013  #
11014  # Compress jars
11015  #
11016  COMPRESS_JARS=false
11017
11018
11019
11020
11021  # Source the version numbers
11022  . $AUTOCONF_DIR/version-numbers
11023
11024  # Get the settings from parameters
11025
11026# Check whether --with-milestone was given.
11027if test "${with_milestone+set}" = set; then :
11028  withval=$with_milestone;
11029fi
11030
11031  if test "x$with_milestone" = xyes; then
11032    as_fn_error $? "Milestone must have a value" "$LINENO" 5
11033  elif test "x$with_milestone" != x; then
11034    MILESTONE="$with_milestone"
11035  fi
11036  if test "x$MILESTONE" = x; then
11037    MILESTONE=internal
11038  fi
11039
11040
11041# Check whether --with-update-version was given.
11042if test "${with_update_version+set}" = set; then :
11043  withval=$with_update_version;
11044fi
11045
11046  if test "x$with_update_version" = xyes; then
11047    as_fn_error $? "Update version must have a value" "$LINENO" 5
11048  elif test "x$with_update_version" != x; then
11049    JDK_UPDATE_VERSION="$with_update_version"
11050  fi
11051
11052
11053# Check whether --with-user-release-suffix was given.
11054if test "${with_user_release_suffix+set}" = set; then :
11055  withval=$with_user_release_suffix;
11056fi
11057
11058  if test "x$with_user_release_suffix" = xyes; then
11059    as_fn_error $? "Release suffix must have a value" "$LINENO" 5
11060  elif test "x$with_user_release_suffix" != x; then
11061    USER_RELEASE_SUFFIX="$with_user_release_suffix"
11062  fi
11063
11064
11065# Check whether --with-build-number was given.
11066if test "${with_build_number+set}" = set; then :
11067  withval=$with_build_number;
11068fi
11069
11070  if test "x$with_build_number" = xyes; then
11071    as_fn_error $? "Build number must have a value" "$LINENO" 5
11072  elif test "x$with_build_number" != x; then
11073    JDK_BUILD_NUMBER="$with_build_number"
11074  fi
11075  # Define default USER_RELEASE_SUFFIX if BUILD_NUMBER and USER_RELEASE_SUFFIX are not set
11076  if test "x$JDK_BUILD_NUMBER" = x; then
11077    JDK_BUILD_NUMBER=b00
11078    if test "x$USER_RELEASE_SUFFIX" = x; then
11079      BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
11080      # Avoid [:alnum:] since it depends on the locale.
11081      CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvqxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'`
11082      USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11083    fi
11084  fi
11085
11086  # Now set the JDK version, milestone, build number etc.
11087
11088
11089
11090
11091
11092
11093
11094
11095
11096
11097
11098
11099
11100
11101
11102  COPYRIGHT_YEAR=`date +'%Y'`
11103
11104
11105  if test "x$JDK_UPDATE_VERSION" != x; then
11106    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
11107  else
11108    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
11109  fi
11110
11111
11112  COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
11113
11114
11115
11116###############################################################################
11117#
11118# Setup BootJDK, used to bootstrap the build.
11119#
11120###############################################################################
11121
11122
11123  BOOT_JDK_FOUND=no
11124
11125# Check whether --with-boot-jdk was given.
11126if test "${with_boot_jdk+set}" = set; then :
11127  withval=$with_boot_jdk;
11128fi
11129
11130
11131  # We look for the Boot JDK through various means, going from more certain to
11132  # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
11133  # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
11134  # must check if this is indeed valid; otherwise we'll continue looking.
11135
11136  # Test: Is bootjdk explicitely set by command line arguments?
11137
11138  if test "x$BOOT_JDK_FOUND" = xno; then
11139    # Now execute the test
11140
11141  if test "x$with_boot_jdk" != x; then
11142    BOOT_JDK=$with_boot_jdk
11143    BOOT_JDK_FOUND=maybe
11144    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
11145$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
11146  fi
11147
11148
11149    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11150    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11151      # Do we have a bin/java?
11152      if test ! -x "$BOOT_JDK/bin/java"; then
11153        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11154$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11155        BOOT_JDK_FOUND=no
11156      else
11157        # Do we have a bin/javac?
11158        if test ! -x "$BOOT_JDK/bin/javac"; then
11159          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11160$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11161          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11162$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11163          BOOT_JDK_FOUND=no
11164        else
11165          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11166          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11167            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11168$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11169            BOOT_JDK_FOUND=no
11170          else
11171            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11172            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11173
11174            # Extra M4 quote needed to protect [] in grep expression.
11175            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11176            if test "x$FOUND_VERSION_78" = x; then
11177              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11178$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11179              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11180$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11181              BOOT_JDK_FOUND=no
11182            else
11183              # We're done! :-)
11184              BOOT_JDK_FOUND=yes
11185
11186  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11187
11188  # Input might be given as Windows format, start by converting to
11189  # unix format.
11190  path="$BOOT_JDK"
11191  new_path=`$CYGPATH -u "$path"`
11192
11193  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11194  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11195  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11196  # "foo.exe" is OK but "foo" is an error.
11197  #
11198  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11199  # It is also a way to make sure we got the proper file name for the real test later on.
11200  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11201  if test "x$test_shortpath" = x; then
11202    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11203$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11204    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11205  fi
11206
11207  # Call helper function which possibly converts this using DOS-style short mode.
11208  # If so, the updated path is stored in $new_path.
11209
11210  input_path="$new_path"
11211  # Check if we need to convert this using DOS-style short mode. If the path
11212  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11213  # take no chances and rewrite it.
11214  # Note: m4 eats our [], so we need to use [ and ] instead.
11215  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11216  if test "x$has_forbidden_chars" != x; then
11217    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11218    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11219    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11220    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11221      # Going to short mode and back again did indeed matter. Since short mode is
11222      # case insensitive, let's make it lowercase to improve readability.
11223      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11224      # Now convert it back to Unix-stile (cygpath)
11225      input_path=`$CYGPATH -u "$shortmode_path"`
11226      new_path="$input_path"
11227    fi
11228  fi
11229
11230  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11231  if test "x$test_cygdrive_prefix" = x; then
11232    # As a simple fix, exclude /usr/bin since it's not a real path.
11233    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11234      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11235      # a path prefixed by /cygdrive for fixpath to work.
11236      new_path="$CYGWIN_ROOT_PATH$input_path"
11237    fi
11238  fi
11239
11240
11241  if test "x$path" != "x$new_path"; then
11242    BOOT_JDK="$new_path"
11243    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11244$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11245  fi
11246
11247  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11248
11249  path="$BOOT_JDK"
11250  has_colon=`$ECHO $path | $GREP ^.:`
11251  new_path="$path"
11252  if test "x$has_colon" = x; then
11253    # Not in mixed or Windows style, start by that.
11254    new_path=`cmd //c echo $path`
11255  fi
11256
11257
11258  input_path="$new_path"
11259  # Check if we need to convert this using DOS-style short mode. If the path
11260  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11261  # take no chances and rewrite it.
11262  # Note: m4 eats our [], so we need to use [ and ] instead.
11263  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11264  if test "x$has_forbidden_chars" != x; then
11265    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11266    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11267  fi
11268
11269
11270  windows_path="$new_path"
11271  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11272    unix_path=`$CYGPATH -u "$windows_path"`
11273    new_path="$unix_path"
11274  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11275    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11276    new_path="$unix_path"
11277  fi
11278
11279  if test "x$path" != "x$new_path"; then
11280    BOOT_JDK="$new_path"
11281    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11282$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11283  fi
11284
11285  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11286  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11287
11288  else
11289    # We're on a posix platform. Hooray! :)
11290    path="$BOOT_JDK"
11291    has_space=`$ECHO "$path" | $GREP " "`
11292    if test "x$has_space" != x; then
11293      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11294$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11295      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11296    fi
11297
11298    # Use eval to expand a potential ~
11299    eval path="$path"
11300    if test ! -f "$path" && test ! -d "$path"; then
11301      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11302    fi
11303
11304    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
11305  fi
11306
11307              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11308$as_echo_n "checking for Boot JDK... " >&6; }
11309              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11310$as_echo "$BOOT_JDK" >&6; }
11311              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11312$as_echo_n "checking Boot JDK version... " >&6; }
11313              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11314              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11315$as_echo "$BOOT_JDK_VERSION" >&6; }
11316            fi # end check jdk version
11317          fi # end check rt.jar
11318        fi # end check javac
11319      fi # end check java
11320    fi # end check boot jdk found
11321  fi
11322
11323  if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
11324    # Having specified an argument which is incorrect will produce an instant failure;
11325    # we should not go on looking
11326    as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
11327  fi
11328
11329  # Test: Is bootjdk available from builddeps?
11330
11331  if test "x$BOOT_JDK_FOUND" = xno; then
11332    # Now execute the test
11333
11334
11335
11336  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
11337    # Source the builddeps file again, to make sure it uses the latest variables!
11338    . $builddepsfile
11339    # Look for a target and build machine specific resource!
11340    eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
11341    if test "x$resource" = x; then
11342      # Ok, lets instead look for a target specific resource
11343      eval resource=\${builddep_bootjdk_TARGET_${rewritten_target_var}}
11344    fi
11345    if test "x$resource" = x; then
11346      # Ok, lets instead look for a build specific resource
11347      eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}}
11348    fi
11349    if test "x$resource" = x; then
11350      # Ok, lets instead look for a generic resource
11351      # (The bootjdk comes from M4 and not the shell, thus no need for eval here.)
11352      resource=${builddep_bootjdk}
11353    fi
11354    if test "x$resource" != x; then
11355      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for bootjdk" >&5
11356$as_echo "$as_me: Using builddeps $resource for bootjdk" >&6;}
11357      # If the resource in the builddeps.conf file is an existing directory,
11358      # for example /java/linux/cups
11359      if test -d ${resource}; then
11360        depdir=${resource}
11361      else
11362
11363  # bootjdk is for example mymodule
11364  # $resource is for example libs/general/libmymod_1_2_3.zip
11365  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
11366  # $with_builddeps_dir is for example /localhome/builddeps
11367  # depdir is the name of the variable into which we store the depdir, eg MYMOD
11368  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
11369  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
11370  filename=`basename $resource`
11371  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
11372  filebase=${filename%%.*}
11373  extension=${filename#*.}
11374  installdir=$with_builddeps_dir/$filebase
11375  if test ! -f $installdir/$filename.unpacked; then
11376    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&5
11377$as_echo "$as_me: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&6;}
11378    if test ! -d $installdir; then
11379      mkdir -p $installdir
11380    fi
11381    if test ! -d $installdir; then
11382      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
11383    fi
11384    tmpfile=`mktemp $installdir/bootjdk.XXXXXXXXX`
11385    touch $tmpfile
11386    if test ! -f $tmpfile; then
11387      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
11388    fi
11389
11390  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
11391  # $tmpfile is the local file name for the downloaded file.
11392  VALID_TOOL=no
11393  if test "x$BDEPS_FTP" = xwget; then
11394    VALID_TOOL=yes
11395    wget -O $tmpfile $with_builddeps_server/$resource
11396  fi
11397  if test "x$BDEPS_FTP" = xlftp; then
11398    VALID_TOOL=yes
11399    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
11400  fi
11401  if test "x$BDEPS_FTP" = xftp; then
11402    VALID_TOOL=yes
11403    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
11404    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
11405    FTPUSERPWD=${FTPSERVER%%@*}
11406    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
11407      FTPUSER=${userpwd%%:*}
11408      FTPPWD=${userpwd#*@}
11409      FTPSERVER=${FTPSERVER#*@}
11410    else
11411      FTPUSER=ftp
11412      FTPPWD=ftp
11413    fi
11414    # the "pass" command does not work on some
11415    # ftp clients (read ftp.exe) but if it works,
11416    # passive mode is better!
11417    ( \
11418        echo "user $FTPUSER $FTPPWD"        ; \
11419        echo "pass"                         ; \
11420        echo "bin"                          ; \
11421        echo "get $FTPPATH $tmpfile"              ; \
11422    ) | ftp -in $FTPSERVER
11423  fi
11424  if test "x$VALID_TOOL" != xyes; then
11425    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
11426  fi
11427
11428    mv $tmpfile $installdir/$filename
11429    if test ! -s $installdir/$filename; then
11430      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
11431    fi
11432    case "$extension" in
11433      zip)  echo "Unzipping $installdir/$filename..."
11434        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
11435        ;;
11436      tar.gz) echo "Untaring $installdir/$filename..."
11437        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
11438        ;;
11439      tgz) echo "Untaring $installdir/$filename..."
11440        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
11441        ;;
11442      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
11443        ;;
11444    esac
11445  fi
11446  if test -f $installdir/$filename.unpacked; then
11447    depdir=$installdir
11448  fi
11449
11450      fi
11451      # Source the builddeps file again, because in the previous command, the depdir
11452      # was updated to point at the current build dependency install directory.
11453      . $builddepsfile
11454      # Now extract variables from the builddeps.conf files.
11455      theroot=${builddep_bootjdk_ROOT}
11456      thecflags=${builddep_bootjdk_CFLAGS}
11457      thelibs=${builddep_bootjdk_LIBS}
11458      if test "x$depdir" = x; then
11459        as_fn_error $? "Could not download build dependency bootjdk" "$LINENO" 5
11460      fi
11461      BOOT_JDK=$depdir
11462      if test "x$theroot" != x; then
11463        BOOT_JDK="$theroot"
11464      fi
11465      if test "x$thecflags" != x; then
11466        BOOT_JDK_CFLAGS="$thecflags"
11467      fi
11468      if test "x$thelibs" != x; then
11469        BOOT_JDK_LIBS="$thelibs"
11470      fi
11471      BOOT_JDK_FOUND=maybe
11472      else BOOT_JDK_FOUND=no
11473
11474    fi
11475    else BOOT_JDK_FOUND=no
11476
11477  fi
11478
11479
11480
11481    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11482    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11483      # Do we have a bin/java?
11484      if test ! -x "$BOOT_JDK/bin/java"; then
11485        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11486$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11487        BOOT_JDK_FOUND=no
11488      else
11489        # Do we have a bin/javac?
11490        if test ! -x "$BOOT_JDK/bin/javac"; then
11491          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11492$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11493          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11494$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11495          BOOT_JDK_FOUND=no
11496        else
11497          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11498          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11499            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11500$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11501            BOOT_JDK_FOUND=no
11502          else
11503            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11504            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11505
11506            # Extra M4 quote needed to protect [] in grep expression.
11507            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11508            if test "x$FOUND_VERSION_78" = x; then
11509              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11510$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11511              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11512$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11513              BOOT_JDK_FOUND=no
11514            else
11515              # We're done! :-)
11516              BOOT_JDK_FOUND=yes
11517
11518  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11519
11520  # Input might be given as Windows format, start by converting to
11521  # unix format.
11522  path="$BOOT_JDK"
11523  new_path=`$CYGPATH -u "$path"`
11524
11525  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11526  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11527  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11528  # "foo.exe" is OK but "foo" is an error.
11529  #
11530  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11531  # It is also a way to make sure we got the proper file name for the real test later on.
11532  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11533  if test "x$test_shortpath" = x; then
11534    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11535$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11536    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11537  fi
11538
11539  # Call helper function which possibly converts this using DOS-style short mode.
11540  # If so, the updated path is stored in $new_path.
11541
11542  input_path="$new_path"
11543  # Check if we need to convert this using DOS-style short mode. If the path
11544  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11545  # take no chances and rewrite it.
11546  # Note: m4 eats our [], so we need to use [ and ] instead.
11547  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11548  if test "x$has_forbidden_chars" != x; then
11549    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11550    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11551    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11552    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11553      # Going to short mode and back again did indeed matter. Since short mode is
11554      # case insensitive, let's make it lowercase to improve readability.
11555      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11556      # Now convert it back to Unix-stile (cygpath)
11557      input_path=`$CYGPATH -u "$shortmode_path"`
11558      new_path="$input_path"
11559    fi
11560  fi
11561
11562  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11563  if test "x$test_cygdrive_prefix" = x; then
11564    # As a simple fix, exclude /usr/bin since it's not a real path.
11565    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11566      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11567      # a path prefixed by /cygdrive for fixpath to work.
11568      new_path="$CYGWIN_ROOT_PATH$input_path"
11569    fi
11570  fi
11571
11572
11573  if test "x$path" != "x$new_path"; then
11574    BOOT_JDK="$new_path"
11575    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11576$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11577  fi
11578
11579  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11580
11581  path="$BOOT_JDK"
11582  has_colon=`$ECHO $path | $GREP ^.:`
11583  new_path="$path"
11584  if test "x$has_colon" = x; then
11585    # Not in mixed or Windows style, start by that.
11586    new_path=`cmd //c echo $path`
11587  fi
11588
11589
11590  input_path="$new_path"
11591  # Check if we need to convert this using DOS-style short mode. If the path
11592  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11593  # take no chances and rewrite it.
11594  # Note: m4 eats our [], so we need to use [ and ] instead.
11595  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11596  if test "x$has_forbidden_chars" != x; then
11597    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11598    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11599  fi
11600
11601
11602  windows_path="$new_path"
11603  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11604    unix_path=`$CYGPATH -u "$windows_path"`
11605    new_path="$unix_path"
11606  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11607    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11608    new_path="$unix_path"
11609  fi
11610
11611  if test "x$path" != "x$new_path"; then
11612    BOOT_JDK="$new_path"
11613    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11614$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11615  fi
11616
11617  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11618  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11619
11620  else
11621    # We're on a posix platform. Hooray! :)
11622    path="$BOOT_JDK"
11623    has_space=`$ECHO "$path" | $GREP " "`
11624    if test "x$has_space" != x; then
11625      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11626$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11627      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11628    fi
11629
11630    # Use eval to expand a potential ~
11631    eval path="$path"
11632    if test ! -f "$path" && test ! -d "$path"; then
11633      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11634    fi
11635
11636    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
11637  fi
11638
11639              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11640$as_echo_n "checking for Boot JDK... " >&6; }
11641              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11642$as_echo "$BOOT_JDK" >&6; }
11643              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11644$as_echo_n "checking Boot JDK version... " >&6; }
11645              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11646              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11647$as_echo "$BOOT_JDK_VERSION" >&6; }
11648            fi # end check jdk version
11649          fi # end check rt.jar
11650        fi # end check javac
11651      fi # end check java
11652    fi # end check boot jdk found
11653  fi
11654
11655
11656  # Test: Is $JAVA_HOME set?
11657
11658  if test "x$BOOT_JDK_FOUND" = xno; then
11659    # Now execute the test
11660
11661  if test "x$JAVA_HOME" != x; then
11662    JAVA_HOME_PROCESSED="$JAVA_HOME"
11663
11664  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11665
11666  # Input might be given as Windows format, start by converting to
11667  # unix format.
11668  path="$JAVA_HOME_PROCESSED"
11669  new_path=`$CYGPATH -u "$path"`
11670
11671  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11672  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11673  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11674  # "foo.exe" is OK but "foo" is an error.
11675  #
11676  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11677  # It is also a way to make sure we got the proper file name for the real test later on.
11678  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11679  if test "x$test_shortpath" = x; then
11680    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
11681$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
11682    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
11683  fi
11684
11685  # Call helper function which possibly converts this using DOS-style short mode.
11686  # If so, the updated path is stored in $new_path.
11687
11688  input_path="$new_path"
11689  # Check if we need to convert this using DOS-style short mode. If the path
11690  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11691  # take no chances and rewrite it.
11692  # Note: m4 eats our [], so we need to use [ and ] instead.
11693  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11694  if test "x$has_forbidden_chars" != x; then
11695    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11696    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11697    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11698    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11699      # Going to short mode and back again did indeed matter. Since short mode is
11700      # case insensitive, let's make it lowercase to improve readability.
11701      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11702      # Now convert it back to Unix-stile (cygpath)
11703      input_path=`$CYGPATH -u "$shortmode_path"`
11704      new_path="$input_path"
11705    fi
11706  fi
11707
11708  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11709  if test "x$test_cygdrive_prefix" = x; then
11710    # As a simple fix, exclude /usr/bin since it's not a real path.
11711    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11712      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11713      # a path prefixed by /cygdrive for fixpath to work.
11714      new_path="$CYGWIN_ROOT_PATH$input_path"
11715    fi
11716  fi
11717
11718
11719  if test "x$path" != "x$new_path"; then
11720    JAVA_HOME_PROCESSED="$new_path"
11721    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
11722$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
11723  fi
11724
11725  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11726
11727  path="$JAVA_HOME_PROCESSED"
11728  has_colon=`$ECHO $path | $GREP ^.:`
11729  new_path="$path"
11730  if test "x$has_colon" = x; then
11731    # Not in mixed or Windows style, start by that.
11732    new_path=`cmd //c echo $path`
11733  fi
11734
11735
11736  input_path="$new_path"
11737  # Check if we need to convert this using DOS-style short mode. If the path
11738  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11739  # take no chances and rewrite it.
11740  # Note: m4 eats our [], so we need to use [ and ] instead.
11741  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11742  if test "x$has_forbidden_chars" != x; then
11743    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11744    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11745  fi
11746
11747
11748  windows_path="$new_path"
11749  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11750    unix_path=`$CYGPATH -u "$windows_path"`
11751    new_path="$unix_path"
11752  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11753    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11754    new_path="$unix_path"
11755  fi
11756
11757  if test "x$path" != "x$new_path"; then
11758    JAVA_HOME_PROCESSED="$new_path"
11759    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
11760$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
11761  fi
11762
11763  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11764  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11765
11766  else
11767    # We're on a posix platform. Hooray! :)
11768    path="$JAVA_HOME_PROCESSED"
11769    has_space=`$ECHO "$path" | $GREP " "`
11770    if test "x$has_space" != x; then
11771      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
11772$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
11773      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11774    fi
11775
11776    # Use eval to expand a potential ~
11777    eval path="$path"
11778    if test ! -f "$path" && test ! -d "$path"; then
11779      as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
11780    fi
11781
11782    JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
11783  fi
11784
11785    if test ! -d "$JAVA_HOME_PROCESSED"; then
11786      { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
11787$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
11788    else
11789      # Aha, the user has set a JAVA_HOME
11790      # let us use that as the Boot JDK.
11791      BOOT_JDK="$JAVA_HOME_PROCESSED"
11792      BOOT_JDK_FOUND=maybe
11793      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
11794$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
11795    fi
11796  fi
11797
11798
11799    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11800    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11801      # Do we have a bin/java?
11802      if test ! -x "$BOOT_JDK/bin/java"; then
11803        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11804$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11805        BOOT_JDK_FOUND=no
11806      else
11807        # Do we have a bin/javac?
11808        if test ! -x "$BOOT_JDK/bin/javac"; then
11809          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11810$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11811          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11812$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11813          BOOT_JDK_FOUND=no
11814        else
11815          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11816          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11817            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11818$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11819            BOOT_JDK_FOUND=no
11820          else
11821            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11822            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11823
11824            # Extra M4 quote needed to protect [] in grep expression.
11825            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11826            if test "x$FOUND_VERSION_78" = x; then
11827              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11828$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11829              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11830$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11831              BOOT_JDK_FOUND=no
11832            else
11833              # We're done! :-)
11834              BOOT_JDK_FOUND=yes
11835
11836  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11837
11838  # Input might be given as Windows format, start by converting to
11839  # unix format.
11840  path="$BOOT_JDK"
11841  new_path=`$CYGPATH -u "$path"`
11842
11843  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11844  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11845  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11846  # "foo.exe" is OK but "foo" is an error.
11847  #
11848  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11849  # It is also a way to make sure we got the proper file name for the real test later on.
11850  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11851  if test "x$test_shortpath" = x; then
11852    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11853$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11854    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11855  fi
11856
11857  # Call helper function which possibly converts this using DOS-style short mode.
11858  # If so, the updated path is stored in $new_path.
11859
11860  input_path="$new_path"
11861  # Check if we need to convert this using DOS-style short mode. If the path
11862  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11863  # take no chances and rewrite it.
11864  # Note: m4 eats our [], so we need to use [ and ] instead.
11865  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11866  if test "x$has_forbidden_chars" != x; then
11867    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11868    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11869    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11870    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11871      # Going to short mode and back again did indeed matter. Since short mode is
11872      # case insensitive, let's make it lowercase to improve readability.
11873      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11874      # Now convert it back to Unix-stile (cygpath)
11875      input_path=`$CYGPATH -u "$shortmode_path"`
11876      new_path="$input_path"
11877    fi
11878  fi
11879
11880  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11881  if test "x$test_cygdrive_prefix" = x; then
11882    # As a simple fix, exclude /usr/bin since it's not a real path.
11883    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11884      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11885      # a path prefixed by /cygdrive for fixpath to work.
11886      new_path="$CYGWIN_ROOT_PATH$input_path"
11887    fi
11888  fi
11889
11890
11891  if test "x$path" != "x$new_path"; then
11892    BOOT_JDK="$new_path"
11893    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11894$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11895  fi
11896
11897  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11898
11899  path="$BOOT_JDK"
11900  has_colon=`$ECHO $path | $GREP ^.:`
11901  new_path="$path"
11902  if test "x$has_colon" = x; then
11903    # Not in mixed or Windows style, start by that.
11904    new_path=`cmd //c echo $path`
11905  fi
11906
11907
11908  input_path="$new_path"
11909  # Check if we need to convert this using DOS-style short mode. If the path
11910  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11911  # take no chances and rewrite it.
11912  # Note: m4 eats our [], so we need to use [ and ] instead.
11913  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11914  if test "x$has_forbidden_chars" != x; then
11915    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11916    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11917  fi
11918
11919
11920  windows_path="$new_path"
11921  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11922    unix_path=`$CYGPATH -u "$windows_path"`
11923    new_path="$unix_path"
11924  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11925    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11926    new_path="$unix_path"
11927  fi
11928
11929  if test "x$path" != "x$new_path"; then
11930    BOOT_JDK="$new_path"
11931    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11932$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11933  fi
11934
11935  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11936  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11937
11938  else
11939    # We're on a posix platform. Hooray! :)
11940    path="$BOOT_JDK"
11941    has_space=`$ECHO "$path" | $GREP " "`
11942    if test "x$has_space" != x; then
11943      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11944$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11945      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11946    fi
11947
11948    # Use eval to expand a potential ~
11949    eval path="$path"
11950    if test ! -f "$path" && test ! -d "$path"; then
11951      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11952    fi
11953
11954    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
11955  fi
11956
11957              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11958$as_echo_n "checking for Boot JDK... " >&6; }
11959              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11960$as_echo "$BOOT_JDK" >&6; }
11961              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11962$as_echo_n "checking Boot JDK version... " >&6; }
11963              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11964              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11965$as_echo "$BOOT_JDK_VERSION" >&6; }
11966            fi # end check jdk version
11967          fi # end check rt.jar
11968        fi # end check javac
11969      fi # end check java
11970    fi # end check boot jdk found
11971  fi
11972
11973
11974  # Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
11975
11976  if test "x$BOOT_JDK_FOUND" = xno; then
11977    # Now execute the test
11978
11979  if test -x /usr/libexec/java_home; then
11980    BOOT_JDK=`/usr/libexec/java_home`
11981    BOOT_JDK_FOUND=maybe
11982    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home" >&5
11983$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home" >&6;}
11984  fi
11985
11986
11987    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11988    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11989      # Do we have a bin/java?
11990      if test ! -x "$BOOT_JDK/bin/java"; then
11991        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11992$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11993        BOOT_JDK_FOUND=no
11994      else
11995        # Do we have a bin/javac?
11996        if test ! -x "$BOOT_JDK/bin/javac"; then
11997          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11998$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11999          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12000$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12001          BOOT_JDK_FOUND=no
12002        else
12003          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12004          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12005            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12006$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12007            BOOT_JDK_FOUND=no
12008          else
12009            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12010            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12011
12012            # Extra M4 quote needed to protect [] in grep expression.
12013            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12014            if test "x$FOUND_VERSION_78" = x; then
12015              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12016$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12017              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12018$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12019              BOOT_JDK_FOUND=no
12020            else
12021              # We're done! :-)
12022              BOOT_JDK_FOUND=yes
12023
12024  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12025
12026  # Input might be given as Windows format, start by converting to
12027  # unix format.
12028  path="$BOOT_JDK"
12029  new_path=`$CYGPATH -u "$path"`
12030
12031  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12032  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12033  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12034  # "foo.exe" is OK but "foo" is an error.
12035  #
12036  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12037  # It is also a way to make sure we got the proper file name for the real test later on.
12038  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12039  if test "x$test_shortpath" = x; then
12040    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12041$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12042    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12043  fi
12044
12045  # Call helper function which possibly converts this using DOS-style short mode.
12046  # If so, the updated path is stored in $new_path.
12047
12048  input_path="$new_path"
12049  # Check if we need to convert this using DOS-style short mode. If the path
12050  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12051  # take no chances and rewrite it.
12052  # Note: m4 eats our [], so we need to use [ and ] instead.
12053  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12054  if test "x$has_forbidden_chars" != x; then
12055    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12056    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12057    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12058    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12059      # Going to short mode and back again did indeed matter. Since short mode is
12060      # case insensitive, let's make it lowercase to improve readability.
12061      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12062      # Now convert it back to Unix-stile (cygpath)
12063      input_path=`$CYGPATH -u "$shortmode_path"`
12064      new_path="$input_path"
12065    fi
12066  fi
12067
12068  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12069  if test "x$test_cygdrive_prefix" = x; then
12070    # As a simple fix, exclude /usr/bin since it's not a real path.
12071    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12072      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12073      # a path prefixed by /cygdrive for fixpath to work.
12074      new_path="$CYGWIN_ROOT_PATH$input_path"
12075    fi
12076  fi
12077
12078
12079  if test "x$path" != "x$new_path"; then
12080    BOOT_JDK="$new_path"
12081    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12082$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12083  fi
12084
12085  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12086
12087  path="$BOOT_JDK"
12088  has_colon=`$ECHO $path | $GREP ^.:`
12089  new_path="$path"
12090  if test "x$has_colon" = x; then
12091    # Not in mixed or Windows style, start by that.
12092    new_path=`cmd //c echo $path`
12093  fi
12094
12095
12096  input_path="$new_path"
12097  # Check if we need to convert this using DOS-style short mode. If the path
12098  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12099  # take no chances and rewrite it.
12100  # Note: m4 eats our [], so we need to use [ and ] instead.
12101  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12102  if test "x$has_forbidden_chars" != x; then
12103    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12104    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12105  fi
12106
12107
12108  windows_path="$new_path"
12109  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12110    unix_path=`$CYGPATH -u "$windows_path"`
12111    new_path="$unix_path"
12112  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12113    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12114    new_path="$unix_path"
12115  fi
12116
12117  if test "x$path" != "x$new_path"; then
12118    BOOT_JDK="$new_path"
12119    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12120$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12121  fi
12122
12123  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12124  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12125
12126  else
12127    # We're on a posix platform. Hooray! :)
12128    path="$BOOT_JDK"
12129    has_space=`$ECHO "$path" | $GREP " "`
12130    if test "x$has_space" != x; then
12131      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12132$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12133      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12134    fi
12135
12136    # Use eval to expand a potential ~
12137    eval path="$path"
12138    if test ! -f "$path" && test ! -d "$path"; then
12139      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12140    fi
12141
12142    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
12143  fi
12144
12145              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12146$as_echo_n "checking for Boot JDK... " >&6; }
12147              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12148$as_echo "$BOOT_JDK" >&6; }
12149              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12150$as_echo_n "checking Boot JDK version... " >&6; }
12151              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12152              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12153$as_echo "$BOOT_JDK_VERSION" >&6; }
12154            fi # end check jdk version
12155          fi # end check rt.jar
12156        fi # end check javac
12157      fi # end check java
12158    fi # end check boot jdk found
12159  fi
12160
12161
12162  # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
12163
12164  if test "x$BOOT_JDK_FOUND" = xno; then
12165    # Now execute the test
12166
12167  # Extract the first word of "javac", so it can be a program name with args.
12168set dummy javac; ac_word=$2
12169{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12170$as_echo_n "checking for $ac_word... " >&6; }
12171if ${ac_cv_path_JAVAC_CHECK+:} false; then :
12172  $as_echo_n "(cached) " >&6
12173else
12174  case $JAVAC_CHECK in
12175  [\\/]* | ?:[\\/]*)
12176  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
12177  ;;
12178  *)
12179  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12180for as_dir in $PATH
12181do
12182  IFS=$as_save_IFS
12183  test -z "$as_dir" && as_dir=.
12184    for ac_exec_ext in '' $ac_executable_extensions; do
12185  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12186    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
12187    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12188    break 2
12189  fi
12190done
12191  done
12192IFS=$as_save_IFS
12193
12194  ;;
12195esac
12196fi
12197JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
12198if test -n "$JAVAC_CHECK"; then
12199  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
12200$as_echo "$JAVAC_CHECK" >&6; }
12201else
12202  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12203$as_echo "no" >&6; }
12204fi
12205
12206
12207  # Extract the first word of "java", so it can be a program name with args.
12208set dummy java; ac_word=$2
12209{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12210$as_echo_n "checking for $ac_word... " >&6; }
12211if ${ac_cv_path_JAVA_CHECK+:} false; then :
12212  $as_echo_n "(cached) " >&6
12213else
12214  case $JAVA_CHECK in
12215  [\\/]* | ?:[\\/]*)
12216  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
12217  ;;
12218  *)
12219  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12220for as_dir in $PATH
12221do
12222  IFS=$as_save_IFS
12223  test -z "$as_dir" && as_dir=.
12224    for ac_exec_ext in '' $ac_executable_extensions; do
12225  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12226    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
12227    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12228    break 2
12229  fi
12230done
12231  done
12232IFS=$as_save_IFS
12233
12234  ;;
12235esac
12236fi
12237JAVA_CHECK=$ac_cv_path_JAVA_CHECK
12238if test -n "$JAVA_CHECK"; then
12239  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
12240$as_echo "$JAVA_CHECK" >&6; }
12241else
12242  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12243$as_echo "no" >&6; }
12244fi
12245
12246
12247  BINARY="$JAVAC_CHECK"
12248  if test "x$JAVAC_CHECK" = x; then
12249    BINARY="$JAVA_CHECK"
12250  fi
12251  if test "x$BINARY" != x; then
12252    # So there is a java(c) binary, it might be part of a JDK.
12253    # Lets find the JDK/JRE directory by following symbolic links.
12254    # Linux/GNU systems often have links from /usr/bin/java to
12255    # /etc/alternatives/java to the real JDK binary.
12256
12257  if test "x$OPENJDK_BUILD_OS" != xwindows; then
12258    # Follow a chain of symbolic links. Use readlink
12259    # where it exists, else fall back to horribly
12260    # complicated shell code.
12261    if test "x$READLINK_TESTED" != yes; then
12262      # On MacOSX there is a readlink tool with a different
12263      # purpose than the GNU readlink tool. Check the found readlink.
12264      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
12265      if test "x$ISGNU" = x; then
12266        # A readlink that we do not know how to use.
12267        # Are there other non-GNU readlinks out there?
12268        READLINK_TESTED=yes
12269        READLINK=
12270      fi
12271    fi
12272
12273    if test "x$READLINK" != x; then
12274      BINARY=`$READLINK -f $BINARY`
12275    else
12276      # Save the current directory for restoring afterwards
12277      STARTDIR=$PWD
12278      COUNTER=0
12279      sym_link_dir=`$DIRNAME $BINARY`
12280      sym_link_file=`$BASENAME $BINARY`
12281      cd $sym_link_dir
12282      # Use -P flag to resolve symlinks in directories.
12283      cd `$THEPWDCMD -P`
12284      sym_link_dir=`$THEPWDCMD -P`
12285      # Resolve file symlinks
12286      while test $COUNTER -lt 20; do
12287        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
12288        if test "x$ISLINK" == x; then
12289          # This is not a symbolic link! We are done!
12290          break
12291        fi
12292        # Again resolve directory symlinks since the target of the just found
12293        # link could be in a different directory
12294        cd `$DIRNAME $ISLINK`
12295        sym_link_dir=`$THEPWDCMD -P`
12296        sym_link_file=`$BASENAME $ISLINK`
12297        let COUNTER=COUNTER+1
12298      done
12299      cd $STARTDIR
12300      BINARY=$sym_link_dir/$sym_link_file
12301    fi
12302  fi
12303
12304    BOOT_JDK=`dirname "$BINARY"`
12305    BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
12306    if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
12307      # Looks like we found ourselves an JDK
12308      BOOT_JDK_FOUND=maybe
12309      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
12310$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
12311    fi
12312  fi
12313
12314
12315    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12316    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12317      # Do we have a bin/java?
12318      if test ! -x "$BOOT_JDK/bin/java"; then
12319        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12320$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12321        BOOT_JDK_FOUND=no
12322      else
12323        # Do we have a bin/javac?
12324        if test ! -x "$BOOT_JDK/bin/javac"; then
12325          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12326$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12327          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12328$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12329          BOOT_JDK_FOUND=no
12330        else
12331          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12332          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12333            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12334$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12335            BOOT_JDK_FOUND=no
12336          else
12337            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12338            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12339
12340            # Extra M4 quote needed to protect [] in grep expression.
12341            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12342            if test "x$FOUND_VERSION_78" = x; then
12343              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12344$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12345              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12346$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12347              BOOT_JDK_FOUND=no
12348            else
12349              # We're done! :-)
12350              BOOT_JDK_FOUND=yes
12351
12352  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12353
12354  # Input might be given as Windows format, start by converting to
12355  # unix format.
12356  path="$BOOT_JDK"
12357  new_path=`$CYGPATH -u "$path"`
12358
12359  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12360  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12361  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12362  # "foo.exe" is OK but "foo" is an error.
12363  #
12364  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12365  # It is also a way to make sure we got the proper file name for the real test later on.
12366  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12367  if test "x$test_shortpath" = x; then
12368    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12369$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12370    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12371  fi
12372
12373  # Call helper function which possibly converts this using DOS-style short mode.
12374  # If so, the updated path is stored in $new_path.
12375
12376  input_path="$new_path"
12377  # Check if we need to convert this using DOS-style short mode. If the path
12378  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12379  # take no chances and rewrite it.
12380  # Note: m4 eats our [], so we need to use [ and ] instead.
12381  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12382  if test "x$has_forbidden_chars" != x; then
12383    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12384    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12385    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12386    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12387      # Going to short mode and back again did indeed matter. Since short mode is
12388      # case insensitive, let's make it lowercase to improve readability.
12389      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12390      # Now convert it back to Unix-stile (cygpath)
12391      input_path=`$CYGPATH -u "$shortmode_path"`
12392      new_path="$input_path"
12393    fi
12394  fi
12395
12396  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12397  if test "x$test_cygdrive_prefix" = x; then
12398    # As a simple fix, exclude /usr/bin since it's not a real path.
12399    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12400      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12401      # a path prefixed by /cygdrive for fixpath to work.
12402      new_path="$CYGWIN_ROOT_PATH$input_path"
12403    fi
12404  fi
12405
12406
12407  if test "x$path" != "x$new_path"; then
12408    BOOT_JDK="$new_path"
12409    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12410$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12411  fi
12412
12413  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12414
12415  path="$BOOT_JDK"
12416  has_colon=`$ECHO $path | $GREP ^.:`
12417  new_path="$path"
12418  if test "x$has_colon" = x; then
12419    # Not in mixed or Windows style, start by that.
12420    new_path=`cmd //c echo $path`
12421  fi
12422
12423
12424  input_path="$new_path"
12425  # Check if we need to convert this using DOS-style short mode. If the path
12426  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12427  # take no chances and rewrite it.
12428  # Note: m4 eats our [], so we need to use [ and ] instead.
12429  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12430  if test "x$has_forbidden_chars" != x; then
12431    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12432    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12433  fi
12434
12435
12436  windows_path="$new_path"
12437  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12438    unix_path=`$CYGPATH -u "$windows_path"`
12439    new_path="$unix_path"
12440  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12441    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12442    new_path="$unix_path"
12443  fi
12444
12445  if test "x$path" != "x$new_path"; then
12446    BOOT_JDK="$new_path"
12447    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12448$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12449  fi
12450
12451  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12452  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12453
12454  else
12455    # We're on a posix platform. Hooray! :)
12456    path="$BOOT_JDK"
12457    has_space=`$ECHO "$path" | $GREP " "`
12458    if test "x$has_space" != x; then
12459      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12460$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12461      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12462    fi
12463
12464    # Use eval to expand a potential ~
12465    eval path="$path"
12466    if test ! -f "$path" && test ! -d "$path"; then
12467      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12468    fi
12469
12470    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
12471  fi
12472
12473              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12474$as_echo_n "checking for Boot JDK... " >&6; }
12475              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12476$as_echo "$BOOT_JDK" >&6; }
12477              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12478$as_echo_n "checking Boot JDK version... " >&6; }
12479              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12480              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12481$as_echo "$BOOT_JDK_VERSION" >&6; }
12482            fi # end check jdk version
12483          fi # end check rt.jar
12484        fi # end check javac
12485      fi # end check java
12486    fi # end check boot jdk found
12487  fi
12488
12489
12490  # Test: Is there a JDK installed in default, well-known locations?
12491
12492  if test "x$BOOT_JDK_FOUND" = xno; then
12493    # Now execute the test
12494
12495  if test "x$OPENJDK_TARGET_OS" = xwindows; then
12496
12497  if test "x$BOOT_JDK_FOUND" = xno; then
12498    # Now execute the test
12499
12500  if test "x$ProgramW6432" != x; then
12501    VIRTUAL_DIR="$ProgramW6432/Java"
12502
12503  windows_path="$VIRTUAL_DIR"
12504  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12505    unix_path=`$CYGPATH -u "$windows_path"`
12506    VIRTUAL_DIR="$unix_path"
12507  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12508    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12509    VIRTUAL_DIR="$unix_path"
12510  fi
12511
12512
12513  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
12514  BOOT_JDK_SUFFIX=""
12515  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
12516  if test "x$ALL_JDKS_FOUND" != x; then
12517    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
12518
12519  if test "x$BOOT_JDK_FOUND" = xno; then
12520    # Now execute the test
12521
12522        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
12523        if test -d "$BOOT_JDK"; then
12524          BOOT_JDK_FOUND=maybe
12525          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
12526$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
12527        fi
12528
12529
12530    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12531    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12532      # Do we have a bin/java?
12533      if test ! -x "$BOOT_JDK/bin/java"; then
12534        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12535$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12536        BOOT_JDK_FOUND=no
12537      else
12538        # Do we have a bin/javac?
12539        if test ! -x "$BOOT_JDK/bin/javac"; then
12540          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12541$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12542          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12543$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12544          BOOT_JDK_FOUND=no
12545        else
12546          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12547          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12548            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12549$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12550            BOOT_JDK_FOUND=no
12551          else
12552            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12553            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12554
12555            # Extra M4 quote needed to protect [] in grep expression.
12556            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12557            if test "x$FOUND_VERSION_78" = x; then
12558              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12559$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12560              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12561$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12562              BOOT_JDK_FOUND=no
12563            else
12564              # We're done! :-)
12565              BOOT_JDK_FOUND=yes
12566
12567  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12568
12569  # Input might be given as Windows format, start by converting to
12570  # unix format.
12571  path="$BOOT_JDK"
12572  new_path=`$CYGPATH -u "$path"`
12573
12574  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12575  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12576  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12577  # "foo.exe" is OK but "foo" is an error.
12578  #
12579  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12580  # It is also a way to make sure we got the proper file name for the real test later on.
12581  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12582  if test "x$test_shortpath" = x; then
12583    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12584$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12585    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12586  fi
12587
12588  # Call helper function which possibly converts this using DOS-style short mode.
12589  # If so, the updated path is stored in $new_path.
12590
12591  input_path="$new_path"
12592  # Check if we need to convert this using DOS-style short mode. If the path
12593  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12594  # take no chances and rewrite it.
12595  # Note: m4 eats our [], so we need to use [ and ] instead.
12596  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12597  if test "x$has_forbidden_chars" != x; then
12598    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12599    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12600    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12601    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12602      # Going to short mode and back again did indeed matter. Since short mode is
12603      # case insensitive, let's make it lowercase to improve readability.
12604      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12605      # Now convert it back to Unix-stile (cygpath)
12606      input_path=`$CYGPATH -u "$shortmode_path"`
12607      new_path="$input_path"
12608    fi
12609  fi
12610
12611  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12612  if test "x$test_cygdrive_prefix" = x; then
12613    # As a simple fix, exclude /usr/bin since it's not a real path.
12614    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12615      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12616      # a path prefixed by /cygdrive for fixpath to work.
12617      new_path="$CYGWIN_ROOT_PATH$input_path"
12618    fi
12619  fi
12620
12621
12622  if test "x$path" != "x$new_path"; then
12623    BOOT_JDK="$new_path"
12624    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12625$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12626  fi
12627
12628  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12629
12630  path="$BOOT_JDK"
12631  has_colon=`$ECHO $path | $GREP ^.:`
12632  new_path="$path"
12633  if test "x$has_colon" = x; then
12634    # Not in mixed or Windows style, start by that.
12635    new_path=`cmd //c echo $path`
12636  fi
12637
12638
12639  input_path="$new_path"
12640  # Check if we need to convert this using DOS-style short mode. If the path
12641  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12642  # take no chances and rewrite it.
12643  # Note: m4 eats our [], so we need to use [ and ] instead.
12644  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12645  if test "x$has_forbidden_chars" != x; then
12646    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12647    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12648  fi
12649
12650
12651  windows_path="$new_path"
12652  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12653    unix_path=`$CYGPATH -u "$windows_path"`
12654    new_path="$unix_path"
12655  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12656    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12657    new_path="$unix_path"
12658  fi
12659
12660  if test "x$path" != "x$new_path"; then
12661    BOOT_JDK="$new_path"
12662    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12663$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12664  fi
12665
12666  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12667  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12668
12669  else
12670    # We're on a posix platform. Hooray! :)
12671    path="$BOOT_JDK"
12672    has_space=`$ECHO "$path" | $GREP " "`
12673    if test "x$has_space" != x; then
12674      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12675$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12676      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12677    fi
12678
12679    # Use eval to expand a potential ~
12680    eval path="$path"
12681    if test ! -f "$path" && test ! -d "$path"; then
12682      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12683    fi
12684
12685    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
12686  fi
12687
12688              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12689$as_echo_n "checking for Boot JDK... " >&6; }
12690              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12691$as_echo "$BOOT_JDK" >&6; }
12692              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12693$as_echo_n "checking Boot JDK version... " >&6; }
12694              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12695              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12696$as_echo "$BOOT_JDK_VERSION" >&6; }
12697            fi # end check jdk version
12698          fi # end check rt.jar
12699        fi # end check javac
12700      fi # end check java
12701    fi # end check boot jdk found
12702  fi
12703
12704    done
12705  fi
12706
12707  fi
12708
12709
12710    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12711    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12712      # Do we have a bin/java?
12713      if test ! -x "$BOOT_JDK/bin/java"; then
12714        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12715$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12716        BOOT_JDK_FOUND=no
12717      else
12718        # Do we have a bin/javac?
12719        if test ! -x "$BOOT_JDK/bin/javac"; then
12720          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12721$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12722          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12723$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12724          BOOT_JDK_FOUND=no
12725        else
12726          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12727          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12728            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12729$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12730            BOOT_JDK_FOUND=no
12731          else
12732            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12733            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12734
12735            # Extra M4 quote needed to protect [] in grep expression.
12736            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12737            if test "x$FOUND_VERSION_78" = x; then
12738              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12739$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12740              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12741$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12742              BOOT_JDK_FOUND=no
12743            else
12744              # We're done! :-)
12745              BOOT_JDK_FOUND=yes
12746
12747  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12748
12749  # Input might be given as Windows format, start by converting to
12750  # unix format.
12751  path="$BOOT_JDK"
12752  new_path=`$CYGPATH -u "$path"`
12753
12754  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12755  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12756  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12757  # "foo.exe" is OK but "foo" is an error.
12758  #
12759  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12760  # It is also a way to make sure we got the proper file name for the real test later on.
12761  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12762  if test "x$test_shortpath" = x; then
12763    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12764$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12765    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12766  fi
12767
12768  # Call helper function which possibly converts this using DOS-style short mode.
12769  # If so, the updated path is stored in $new_path.
12770
12771  input_path="$new_path"
12772  # Check if we need to convert this using DOS-style short mode. If the path
12773  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12774  # take no chances and rewrite it.
12775  # Note: m4 eats our [], so we need to use [ and ] instead.
12776  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12777  if test "x$has_forbidden_chars" != x; then
12778    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12779    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12780    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12781    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12782      # Going to short mode and back again did indeed matter. Since short mode is
12783      # case insensitive, let's make it lowercase to improve readability.
12784      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12785      # Now convert it back to Unix-stile (cygpath)
12786      input_path=`$CYGPATH -u "$shortmode_path"`
12787      new_path="$input_path"
12788    fi
12789  fi
12790
12791  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12792  if test "x$test_cygdrive_prefix" = x; then
12793    # As a simple fix, exclude /usr/bin since it's not a real path.
12794    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12795      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12796      # a path prefixed by /cygdrive for fixpath to work.
12797      new_path="$CYGWIN_ROOT_PATH$input_path"
12798    fi
12799  fi
12800
12801
12802  if test "x$path" != "x$new_path"; then
12803    BOOT_JDK="$new_path"
12804    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12805$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12806  fi
12807
12808  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12809
12810  path="$BOOT_JDK"
12811  has_colon=`$ECHO $path | $GREP ^.:`
12812  new_path="$path"
12813  if test "x$has_colon" = x; then
12814    # Not in mixed or Windows style, start by that.
12815    new_path=`cmd //c echo $path`
12816  fi
12817
12818
12819  input_path="$new_path"
12820  # Check if we need to convert this using DOS-style short mode. If the path
12821  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12822  # take no chances and rewrite it.
12823  # Note: m4 eats our [], so we need to use [ and ] instead.
12824  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12825  if test "x$has_forbidden_chars" != x; then
12826    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12827    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12828  fi
12829
12830
12831  windows_path="$new_path"
12832  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12833    unix_path=`$CYGPATH -u "$windows_path"`
12834    new_path="$unix_path"
12835  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12836    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12837    new_path="$unix_path"
12838  fi
12839
12840  if test "x$path" != "x$new_path"; then
12841    BOOT_JDK="$new_path"
12842    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12843$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12844  fi
12845
12846  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12847  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12848
12849  else
12850    # We're on a posix platform. Hooray! :)
12851    path="$BOOT_JDK"
12852    has_space=`$ECHO "$path" | $GREP " "`
12853    if test "x$has_space" != x; then
12854      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12855$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12856      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12857    fi
12858
12859    # Use eval to expand a potential ~
12860    eval path="$path"
12861    if test ! -f "$path" && test ! -d "$path"; then
12862      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12863    fi
12864
12865    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
12866  fi
12867
12868              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12869$as_echo_n "checking for Boot JDK... " >&6; }
12870              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12871$as_echo "$BOOT_JDK" >&6; }
12872              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12873$as_echo_n "checking Boot JDK version... " >&6; }
12874              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12875              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12876$as_echo "$BOOT_JDK_VERSION" >&6; }
12877            fi # end check jdk version
12878          fi # end check rt.jar
12879        fi # end check javac
12880      fi # end check java
12881    fi # end check boot jdk found
12882  fi
12883
12884
12885  if test "x$BOOT_JDK_FOUND" = xno; then
12886    # Now execute the test
12887
12888  if test "x$PROGRAMW6432" != x; then
12889    VIRTUAL_DIR="$PROGRAMW6432/Java"
12890
12891  windows_path="$VIRTUAL_DIR"
12892  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12893    unix_path=`$CYGPATH -u "$windows_path"`
12894    VIRTUAL_DIR="$unix_path"
12895  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12896    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12897    VIRTUAL_DIR="$unix_path"
12898  fi
12899
12900
12901  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
12902  BOOT_JDK_SUFFIX=""
12903  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
12904  if test "x$ALL_JDKS_FOUND" != x; then
12905    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
12906
12907  if test "x$BOOT_JDK_FOUND" = xno; then
12908    # Now execute the test
12909
12910        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
12911        if test -d "$BOOT_JDK"; then
12912          BOOT_JDK_FOUND=maybe
12913          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
12914$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
12915        fi
12916
12917
12918    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12919    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12920      # Do we have a bin/java?
12921      if test ! -x "$BOOT_JDK/bin/java"; then
12922        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12923$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12924        BOOT_JDK_FOUND=no
12925      else
12926        # Do we have a bin/javac?
12927        if test ! -x "$BOOT_JDK/bin/javac"; then
12928          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12929$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12930          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12931$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12932          BOOT_JDK_FOUND=no
12933        else
12934          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12935          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12936            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12937$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12938            BOOT_JDK_FOUND=no
12939          else
12940            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12941            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12942
12943            # Extra M4 quote needed to protect [] in grep expression.
12944            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12945            if test "x$FOUND_VERSION_78" = x; then
12946              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12947$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12948              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12949$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12950              BOOT_JDK_FOUND=no
12951            else
12952              # We're done! :-)
12953              BOOT_JDK_FOUND=yes
12954
12955  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12956
12957  # Input might be given as Windows format, start by converting to
12958  # unix format.
12959  path="$BOOT_JDK"
12960  new_path=`$CYGPATH -u "$path"`
12961
12962  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12963  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12964  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12965  # "foo.exe" is OK but "foo" is an error.
12966  #
12967  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12968  # It is also a way to make sure we got the proper file name for the real test later on.
12969  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12970  if test "x$test_shortpath" = x; then
12971    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12972$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12973    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12974  fi
12975
12976  # Call helper function which possibly converts this using DOS-style short mode.
12977  # If so, the updated path is stored in $new_path.
12978
12979  input_path="$new_path"
12980  # Check if we need to convert this using DOS-style short mode. If the path
12981  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12982  # take no chances and rewrite it.
12983  # Note: m4 eats our [], so we need to use [ and ] instead.
12984  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12985  if test "x$has_forbidden_chars" != x; then
12986    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12987    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12988    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12989    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12990      # Going to short mode and back again did indeed matter. Since short mode is
12991      # case insensitive, let's make it lowercase to improve readability.
12992      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12993      # Now convert it back to Unix-stile (cygpath)
12994      input_path=`$CYGPATH -u "$shortmode_path"`
12995      new_path="$input_path"
12996    fi
12997  fi
12998
12999  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13000  if test "x$test_cygdrive_prefix" = x; then
13001    # As a simple fix, exclude /usr/bin since it's not a real path.
13002    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13003      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13004      # a path prefixed by /cygdrive for fixpath to work.
13005      new_path="$CYGWIN_ROOT_PATH$input_path"
13006    fi
13007  fi
13008
13009
13010  if test "x$path" != "x$new_path"; then
13011    BOOT_JDK="$new_path"
13012    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13013$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13014  fi
13015
13016  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13017
13018  path="$BOOT_JDK"
13019  has_colon=`$ECHO $path | $GREP ^.:`
13020  new_path="$path"
13021  if test "x$has_colon" = x; then
13022    # Not in mixed or Windows style, start by that.
13023    new_path=`cmd //c echo $path`
13024  fi
13025
13026
13027  input_path="$new_path"
13028  # Check if we need to convert this using DOS-style short mode. If the path
13029  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13030  # take no chances and rewrite it.
13031  # Note: m4 eats our [], so we need to use [ and ] instead.
13032  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13033  if test "x$has_forbidden_chars" != x; then
13034    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13035    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13036  fi
13037
13038
13039  windows_path="$new_path"
13040  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13041    unix_path=`$CYGPATH -u "$windows_path"`
13042    new_path="$unix_path"
13043  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13044    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13045    new_path="$unix_path"
13046  fi
13047
13048  if test "x$path" != "x$new_path"; then
13049    BOOT_JDK="$new_path"
13050    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13051$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13052  fi
13053
13054  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13055  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13056
13057  else
13058    # We're on a posix platform. Hooray! :)
13059    path="$BOOT_JDK"
13060    has_space=`$ECHO "$path" | $GREP " "`
13061    if test "x$has_space" != x; then
13062      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13063$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13064      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13065    fi
13066
13067    # Use eval to expand a potential ~
13068    eval path="$path"
13069    if test ! -f "$path" && test ! -d "$path"; then
13070      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13071    fi
13072
13073    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13074  fi
13075
13076              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13077$as_echo_n "checking for Boot JDK... " >&6; }
13078              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13079$as_echo "$BOOT_JDK" >&6; }
13080              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13081$as_echo_n "checking Boot JDK version... " >&6; }
13082              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13083              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13084$as_echo "$BOOT_JDK_VERSION" >&6; }
13085            fi # end check jdk version
13086          fi # end check rt.jar
13087        fi # end check javac
13088      fi # end check java
13089    fi # end check boot jdk found
13090  fi
13091
13092    done
13093  fi
13094
13095  fi
13096
13097
13098    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13099    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13100      # Do we have a bin/java?
13101      if test ! -x "$BOOT_JDK/bin/java"; then
13102        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13103$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13104        BOOT_JDK_FOUND=no
13105      else
13106        # Do we have a bin/javac?
13107        if test ! -x "$BOOT_JDK/bin/javac"; then
13108          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13109$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13110          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13111$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13112          BOOT_JDK_FOUND=no
13113        else
13114          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13115          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13116            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13117$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13118            BOOT_JDK_FOUND=no
13119          else
13120            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13121            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13122
13123            # Extra M4 quote needed to protect [] in grep expression.
13124            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13125            if test "x$FOUND_VERSION_78" = x; then
13126              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13127$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13128              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13129$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13130              BOOT_JDK_FOUND=no
13131            else
13132              # We're done! :-)
13133              BOOT_JDK_FOUND=yes
13134
13135  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13136
13137  # Input might be given as Windows format, start by converting to
13138  # unix format.
13139  path="$BOOT_JDK"
13140  new_path=`$CYGPATH -u "$path"`
13141
13142  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13143  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13144  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13145  # "foo.exe" is OK but "foo" is an error.
13146  #
13147  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13148  # It is also a way to make sure we got the proper file name for the real test later on.
13149  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13150  if test "x$test_shortpath" = x; then
13151    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13152$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13153    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13154  fi
13155
13156  # Call helper function which possibly converts this using DOS-style short mode.
13157  # If so, the updated path is stored in $new_path.
13158
13159  input_path="$new_path"
13160  # Check if we need to convert this using DOS-style short mode. If the path
13161  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13162  # take no chances and rewrite it.
13163  # Note: m4 eats our [], so we need to use [ and ] instead.
13164  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13165  if test "x$has_forbidden_chars" != x; then
13166    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13167    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13168    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13169    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13170      # Going to short mode and back again did indeed matter. Since short mode is
13171      # case insensitive, let's make it lowercase to improve readability.
13172      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13173      # Now convert it back to Unix-stile (cygpath)
13174      input_path=`$CYGPATH -u "$shortmode_path"`
13175      new_path="$input_path"
13176    fi
13177  fi
13178
13179  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13180  if test "x$test_cygdrive_prefix" = x; then
13181    # As a simple fix, exclude /usr/bin since it's not a real path.
13182    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13183      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13184      # a path prefixed by /cygdrive for fixpath to work.
13185      new_path="$CYGWIN_ROOT_PATH$input_path"
13186    fi
13187  fi
13188
13189
13190  if test "x$path" != "x$new_path"; then
13191    BOOT_JDK="$new_path"
13192    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13193$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13194  fi
13195
13196  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13197
13198  path="$BOOT_JDK"
13199  has_colon=`$ECHO $path | $GREP ^.:`
13200  new_path="$path"
13201  if test "x$has_colon" = x; then
13202    # Not in mixed or Windows style, start by that.
13203    new_path=`cmd //c echo $path`
13204  fi
13205
13206
13207  input_path="$new_path"
13208  # Check if we need to convert this using DOS-style short mode. If the path
13209  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13210  # take no chances and rewrite it.
13211  # Note: m4 eats our [], so we need to use [ and ] instead.
13212  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13213  if test "x$has_forbidden_chars" != x; then
13214    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13215    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13216  fi
13217
13218
13219  windows_path="$new_path"
13220  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13221    unix_path=`$CYGPATH -u "$windows_path"`
13222    new_path="$unix_path"
13223  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13224    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13225    new_path="$unix_path"
13226  fi
13227
13228  if test "x$path" != "x$new_path"; then
13229    BOOT_JDK="$new_path"
13230    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13231$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13232  fi
13233
13234  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13235  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13236
13237  else
13238    # We're on a posix platform. Hooray! :)
13239    path="$BOOT_JDK"
13240    has_space=`$ECHO "$path" | $GREP " "`
13241    if test "x$has_space" != x; then
13242      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13243$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13244      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13245    fi
13246
13247    # Use eval to expand a potential ~
13248    eval path="$path"
13249    if test ! -f "$path" && test ! -d "$path"; then
13250      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13251    fi
13252
13253    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13254  fi
13255
13256              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13257$as_echo_n "checking for Boot JDK... " >&6; }
13258              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13259$as_echo "$BOOT_JDK" >&6; }
13260              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13261$as_echo_n "checking Boot JDK version... " >&6; }
13262              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13263              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13264$as_echo "$BOOT_JDK_VERSION" >&6; }
13265            fi # end check jdk version
13266          fi # end check rt.jar
13267        fi # end check javac
13268      fi # end check java
13269    fi # end check boot jdk found
13270  fi
13271
13272
13273  if test "x$BOOT_JDK_FOUND" = xno; then
13274    # Now execute the test
13275
13276  if test "x$PROGRAMFILES" != x; then
13277    VIRTUAL_DIR="$PROGRAMFILES/Java"
13278
13279  windows_path="$VIRTUAL_DIR"
13280  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13281    unix_path=`$CYGPATH -u "$windows_path"`
13282    VIRTUAL_DIR="$unix_path"
13283  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13284    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13285    VIRTUAL_DIR="$unix_path"
13286  fi
13287
13288
13289  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
13290  BOOT_JDK_SUFFIX=""
13291  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13292  if test "x$ALL_JDKS_FOUND" != x; then
13293    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13294
13295  if test "x$BOOT_JDK_FOUND" = xno; then
13296    # Now execute the test
13297
13298        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13299        if test -d "$BOOT_JDK"; then
13300          BOOT_JDK_FOUND=maybe
13301          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13302$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13303        fi
13304
13305
13306    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13307    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13308      # Do we have a bin/java?
13309      if test ! -x "$BOOT_JDK/bin/java"; then
13310        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13311$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13312        BOOT_JDK_FOUND=no
13313      else
13314        # Do we have a bin/javac?
13315        if test ! -x "$BOOT_JDK/bin/javac"; then
13316          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13317$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13318          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13319$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13320          BOOT_JDK_FOUND=no
13321        else
13322          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13323          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13324            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13325$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13326            BOOT_JDK_FOUND=no
13327          else
13328            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13329            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13330
13331            # Extra M4 quote needed to protect [] in grep expression.
13332            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13333            if test "x$FOUND_VERSION_78" = x; then
13334              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13335$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13336              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13337$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13338              BOOT_JDK_FOUND=no
13339            else
13340              # We're done! :-)
13341              BOOT_JDK_FOUND=yes
13342
13343  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13344
13345  # Input might be given as Windows format, start by converting to
13346  # unix format.
13347  path="$BOOT_JDK"
13348  new_path=`$CYGPATH -u "$path"`
13349
13350  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13351  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13352  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13353  # "foo.exe" is OK but "foo" is an error.
13354  #
13355  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13356  # It is also a way to make sure we got the proper file name for the real test later on.
13357  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13358  if test "x$test_shortpath" = x; then
13359    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13360$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13361    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13362  fi
13363
13364  # Call helper function which possibly converts this using DOS-style short mode.
13365  # If so, the updated path is stored in $new_path.
13366
13367  input_path="$new_path"
13368  # Check if we need to convert this using DOS-style short mode. If the path
13369  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13370  # take no chances and rewrite it.
13371  # Note: m4 eats our [], so we need to use [ and ] instead.
13372  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13373  if test "x$has_forbidden_chars" != x; then
13374    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13375    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13376    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13377    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13378      # Going to short mode and back again did indeed matter. Since short mode is
13379      # case insensitive, let's make it lowercase to improve readability.
13380      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13381      # Now convert it back to Unix-stile (cygpath)
13382      input_path=`$CYGPATH -u "$shortmode_path"`
13383      new_path="$input_path"
13384    fi
13385  fi
13386
13387  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13388  if test "x$test_cygdrive_prefix" = x; then
13389    # As a simple fix, exclude /usr/bin since it's not a real path.
13390    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13391      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13392      # a path prefixed by /cygdrive for fixpath to work.
13393      new_path="$CYGWIN_ROOT_PATH$input_path"
13394    fi
13395  fi
13396
13397
13398  if test "x$path" != "x$new_path"; then
13399    BOOT_JDK="$new_path"
13400    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13401$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13402  fi
13403
13404  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13405
13406  path="$BOOT_JDK"
13407  has_colon=`$ECHO $path | $GREP ^.:`
13408  new_path="$path"
13409  if test "x$has_colon" = x; then
13410    # Not in mixed or Windows style, start by that.
13411    new_path=`cmd //c echo $path`
13412  fi
13413
13414
13415  input_path="$new_path"
13416  # Check if we need to convert this using DOS-style short mode. If the path
13417  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13418  # take no chances and rewrite it.
13419  # Note: m4 eats our [], so we need to use [ and ] instead.
13420  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13421  if test "x$has_forbidden_chars" != x; then
13422    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13423    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13424  fi
13425
13426
13427  windows_path="$new_path"
13428  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13429    unix_path=`$CYGPATH -u "$windows_path"`
13430    new_path="$unix_path"
13431  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13432    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13433    new_path="$unix_path"
13434  fi
13435
13436  if test "x$path" != "x$new_path"; then
13437    BOOT_JDK="$new_path"
13438    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13439$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13440  fi
13441
13442  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13443  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13444
13445  else
13446    # We're on a posix platform. Hooray! :)
13447    path="$BOOT_JDK"
13448    has_space=`$ECHO "$path" | $GREP " "`
13449    if test "x$has_space" != x; then
13450      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13451$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13452      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13453    fi
13454
13455    # Use eval to expand a potential ~
13456    eval path="$path"
13457    if test ! -f "$path" && test ! -d "$path"; then
13458      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13459    fi
13460
13461    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13462  fi
13463
13464              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13465$as_echo_n "checking for Boot JDK... " >&6; }
13466              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13467$as_echo "$BOOT_JDK" >&6; }
13468              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13469$as_echo_n "checking Boot JDK version... " >&6; }
13470              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13471              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13472$as_echo "$BOOT_JDK_VERSION" >&6; }
13473            fi # end check jdk version
13474          fi # end check rt.jar
13475        fi # end check javac
13476      fi # end check java
13477    fi # end check boot jdk found
13478  fi
13479
13480    done
13481  fi
13482
13483  fi
13484
13485
13486    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13487    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13488      # Do we have a bin/java?
13489      if test ! -x "$BOOT_JDK/bin/java"; then
13490        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13491$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13492        BOOT_JDK_FOUND=no
13493      else
13494        # Do we have a bin/javac?
13495        if test ! -x "$BOOT_JDK/bin/javac"; then
13496          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13497$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13498          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13499$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13500          BOOT_JDK_FOUND=no
13501        else
13502          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13503          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13504            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13505$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13506            BOOT_JDK_FOUND=no
13507          else
13508            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13509            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13510
13511            # Extra M4 quote needed to protect [] in grep expression.
13512            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13513            if test "x$FOUND_VERSION_78" = x; then
13514              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13515$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13516              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13517$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13518              BOOT_JDK_FOUND=no
13519            else
13520              # We're done! :-)
13521              BOOT_JDK_FOUND=yes
13522
13523  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13524
13525  # Input might be given as Windows format, start by converting to
13526  # unix format.
13527  path="$BOOT_JDK"
13528  new_path=`$CYGPATH -u "$path"`
13529
13530  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13531  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13532  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13533  # "foo.exe" is OK but "foo" is an error.
13534  #
13535  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13536  # It is also a way to make sure we got the proper file name for the real test later on.
13537  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13538  if test "x$test_shortpath" = x; then
13539    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13540$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13541    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13542  fi
13543
13544  # Call helper function which possibly converts this using DOS-style short mode.
13545  # If so, the updated path is stored in $new_path.
13546
13547  input_path="$new_path"
13548  # Check if we need to convert this using DOS-style short mode. If the path
13549  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13550  # take no chances and rewrite it.
13551  # Note: m4 eats our [], so we need to use [ and ] instead.
13552  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13553  if test "x$has_forbidden_chars" != x; then
13554    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13555    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13556    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13557    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13558      # Going to short mode and back again did indeed matter. Since short mode is
13559      # case insensitive, let's make it lowercase to improve readability.
13560      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13561      # Now convert it back to Unix-stile (cygpath)
13562      input_path=`$CYGPATH -u "$shortmode_path"`
13563      new_path="$input_path"
13564    fi
13565  fi
13566
13567  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13568  if test "x$test_cygdrive_prefix" = x; then
13569    # As a simple fix, exclude /usr/bin since it's not a real path.
13570    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13571      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13572      # a path prefixed by /cygdrive for fixpath to work.
13573      new_path="$CYGWIN_ROOT_PATH$input_path"
13574    fi
13575  fi
13576
13577
13578  if test "x$path" != "x$new_path"; then
13579    BOOT_JDK="$new_path"
13580    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13581$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13582  fi
13583
13584  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13585
13586  path="$BOOT_JDK"
13587  has_colon=`$ECHO $path | $GREP ^.:`
13588  new_path="$path"
13589  if test "x$has_colon" = x; then
13590    # Not in mixed or Windows style, start by that.
13591    new_path=`cmd //c echo $path`
13592  fi
13593
13594
13595  input_path="$new_path"
13596  # Check if we need to convert this using DOS-style short mode. If the path
13597  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13598  # take no chances and rewrite it.
13599  # Note: m4 eats our [], so we need to use [ and ] instead.
13600  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13601  if test "x$has_forbidden_chars" != x; then
13602    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13603    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13604  fi
13605
13606
13607  windows_path="$new_path"
13608  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13609    unix_path=`$CYGPATH -u "$windows_path"`
13610    new_path="$unix_path"
13611  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13612    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13613    new_path="$unix_path"
13614  fi
13615
13616  if test "x$path" != "x$new_path"; then
13617    BOOT_JDK="$new_path"
13618    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13619$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13620  fi
13621
13622  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13623  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13624
13625  else
13626    # We're on a posix platform. Hooray! :)
13627    path="$BOOT_JDK"
13628    has_space=`$ECHO "$path" | $GREP " "`
13629    if test "x$has_space" != x; then
13630      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13631$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13632      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13633    fi
13634
13635    # Use eval to expand a potential ~
13636    eval path="$path"
13637    if test ! -f "$path" && test ! -d "$path"; then
13638      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13639    fi
13640
13641    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13642  fi
13643
13644              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13645$as_echo_n "checking for Boot JDK... " >&6; }
13646              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13647$as_echo "$BOOT_JDK" >&6; }
13648              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13649$as_echo_n "checking Boot JDK version... " >&6; }
13650              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13651              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13652$as_echo "$BOOT_JDK_VERSION" >&6; }
13653            fi # end check jdk version
13654          fi # end check rt.jar
13655        fi # end check javac
13656      fi # end check java
13657    fi # end check boot jdk found
13658  fi
13659
13660
13661  if test "x$BOOT_JDK_FOUND" = xno; then
13662    # Now execute the test
13663
13664  if test "x$ProgramFiles" != x; then
13665    VIRTUAL_DIR="$ProgramFiles/Java"
13666
13667  windows_path="$VIRTUAL_DIR"
13668  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13669    unix_path=`$CYGPATH -u "$windows_path"`
13670    VIRTUAL_DIR="$unix_path"
13671  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13672    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13673    VIRTUAL_DIR="$unix_path"
13674  fi
13675
13676
13677  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
13678  BOOT_JDK_SUFFIX=""
13679  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13680  if test "x$ALL_JDKS_FOUND" != x; then
13681    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13682
13683  if test "x$BOOT_JDK_FOUND" = xno; then
13684    # Now execute the test
13685
13686        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13687        if test -d "$BOOT_JDK"; then
13688          BOOT_JDK_FOUND=maybe
13689          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13690$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13691        fi
13692
13693
13694    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13695    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13696      # Do we have a bin/java?
13697      if test ! -x "$BOOT_JDK/bin/java"; then
13698        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13699$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13700        BOOT_JDK_FOUND=no
13701      else
13702        # Do we have a bin/javac?
13703        if test ! -x "$BOOT_JDK/bin/javac"; then
13704          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13705$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13706          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13707$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13708          BOOT_JDK_FOUND=no
13709        else
13710          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13711          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13712            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13713$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13714            BOOT_JDK_FOUND=no
13715          else
13716            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13717            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13718
13719            # Extra M4 quote needed to protect [] in grep expression.
13720            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13721            if test "x$FOUND_VERSION_78" = x; then
13722              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13723$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13724              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13725$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13726              BOOT_JDK_FOUND=no
13727            else
13728              # We're done! :-)
13729              BOOT_JDK_FOUND=yes
13730
13731  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13732
13733  # Input might be given as Windows format, start by converting to
13734  # unix format.
13735  path="$BOOT_JDK"
13736  new_path=`$CYGPATH -u "$path"`
13737
13738  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13739  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13740  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13741  # "foo.exe" is OK but "foo" is an error.
13742  #
13743  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13744  # It is also a way to make sure we got the proper file name for the real test later on.
13745  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13746  if test "x$test_shortpath" = x; then
13747    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13748$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13749    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13750  fi
13751
13752  # Call helper function which possibly converts this using DOS-style short mode.
13753  # If so, the updated path is stored in $new_path.
13754
13755  input_path="$new_path"
13756  # Check if we need to convert this using DOS-style short mode. If the path
13757  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13758  # take no chances and rewrite it.
13759  # Note: m4 eats our [], so we need to use [ and ] instead.
13760  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13761  if test "x$has_forbidden_chars" != x; then
13762    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13763    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13764    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13765    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13766      # Going to short mode and back again did indeed matter. Since short mode is
13767      # case insensitive, let's make it lowercase to improve readability.
13768      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13769      # Now convert it back to Unix-stile (cygpath)
13770      input_path=`$CYGPATH -u "$shortmode_path"`
13771      new_path="$input_path"
13772    fi
13773  fi
13774
13775  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13776  if test "x$test_cygdrive_prefix" = x; then
13777    # As a simple fix, exclude /usr/bin since it's not a real path.
13778    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13779      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13780      # a path prefixed by /cygdrive for fixpath to work.
13781      new_path="$CYGWIN_ROOT_PATH$input_path"
13782    fi
13783  fi
13784
13785
13786  if test "x$path" != "x$new_path"; then
13787    BOOT_JDK="$new_path"
13788    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13789$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13790  fi
13791
13792  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13793
13794  path="$BOOT_JDK"
13795  has_colon=`$ECHO $path | $GREP ^.:`
13796  new_path="$path"
13797  if test "x$has_colon" = x; then
13798    # Not in mixed or Windows style, start by that.
13799    new_path=`cmd //c echo $path`
13800  fi
13801
13802
13803  input_path="$new_path"
13804  # Check if we need to convert this using DOS-style short mode. If the path
13805  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13806  # take no chances and rewrite it.
13807  # Note: m4 eats our [], so we need to use [ and ] instead.
13808  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13809  if test "x$has_forbidden_chars" != x; then
13810    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13811    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13812  fi
13813
13814
13815  windows_path="$new_path"
13816  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13817    unix_path=`$CYGPATH -u "$windows_path"`
13818    new_path="$unix_path"
13819  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13820    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13821    new_path="$unix_path"
13822  fi
13823
13824  if test "x$path" != "x$new_path"; then
13825    BOOT_JDK="$new_path"
13826    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13827$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13828  fi
13829
13830  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13831  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13832
13833  else
13834    # We're on a posix platform. Hooray! :)
13835    path="$BOOT_JDK"
13836    has_space=`$ECHO "$path" | $GREP " "`
13837    if test "x$has_space" != x; then
13838      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13839$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13840      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13841    fi
13842
13843    # Use eval to expand a potential ~
13844    eval path="$path"
13845    if test ! -f "$path" && test ! -d "$path"; then
13846      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13847    fi
13848
13849    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13850  fi
13851
13852              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13853$as_echo_n "checking for Boot JDK... " >&6; }
13854              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13855$as_echo "$BOOT_JDK" >&6; }
13856              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13857$as_echo_n "checking Boot JDK version... " >&6; }
13858              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13859              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13860$as_echo "$BOOT_JDK_VERSION" >&6; }
13861            fi # end check jdk version
13862          fi # end check rt.jar
13863        fi # end check javac
13864      fi # end check java
13865    fi # end check boot jdk found
13866  fi
13867
13868    done
13869  fi
13870
13871  fi
13872
13873
13874    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13875    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13876      # Do we have a bin/java?
13877      if test ! -x "$BOOT_JDK/bin/java"; then
13878        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13879$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13880        BOOT_JDK_FOUND=no
13881      else
13882        # Do we have a bin/javac?
13883        if test ! -x "$BOOT_JDK/bin/javac"; then
13884          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13885$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13886          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13887$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13888          BOOT_JDK_FOUND=no
13889        else
13890          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13891          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13892            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13893$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13894            BOOT_JDK_FOUND=no
13895          else
13896            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13897            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13898
13899            # Extra M4 quote needed to protect [] in grep expression.
13900            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13901            if test "x$FOUND_VERSION_78" = x; then
13902              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13903$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13904              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13905$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13906              BOOT_JDK_FOUND=no
13907            else
13908              # We're done! :-)
13909              BOOT_JDK_FOUND=yes
13910
13911  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13912
13913  # Input might be given as Windows format, start by converting to
13914  # unix format.
13915  path="$BOOT_JDK"
13916  new_path=`$CYGPATH -u "$path"`
13917
13918  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13919  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13920  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13921  # "foo.exe" is OK but "foo" is an error.
13922  #
13923  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13924  # It is also a way to make sure we got the proper file name for the real test later on.
13925  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13926  if test "x$test_shortpath" = x; then
13927    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13928$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13929    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13930  fi
13931
13932  # Call helper function which possibly converts this using DOS-style short mode.
13933  # If so, the updated path is stored in $new_path.
13934
13935  input_path="$new_path"
13936  # Check if we need to convert this using DOS-style short mode. If the path
13937  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13938  # take no chances and rewrite it.
13939  # Note: m4 eats our [], so we need to use [ and ] instead.
13940  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13941  if test "x$has_forbidden_chars" != x; then
13942    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13943    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13944    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13945    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13946      # Going to short mode and back again did indeed matter. Since short mode is
13947      # case insensitive, let's make it lowercase to improve readability.
13948      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13949      # Now convert it back to Unix-stile (cygpath)
13950      input_path=`$CYGPATH -u "$shortmode_path"`
13951      new_path="$input_path"
13952    fi
13953  fi
13954
13955  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13956  if test "x$test_cygdrive_prefix" = x; then
13957    # As a simple fix, exclude /usr/bin since it's not a real path.
13958    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13959      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13960      # a path prefixed by /cygdrive for fixpath to work.
13961      new_path="$CYGWIN_ROOT_PATH$input_path"
13962    fi
13963  fi
13964
13965
13966  if test "x$path" != "x$new_path"; then
13967    BOOT_JDK="$new_path"
13968    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13969$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13970  fi
13971
13972  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13973
13974  path="$BOOT_JDK"
13975  has_colon=`$ECHO $path | $GREP ^.:`
13976  new_path="$path"
13977  if test "x$has_colon" = x; then
13978    # Not in mixed or Windows style, start by that.
13979    new_path=`cmd //c echo $path`
13980  fi
13981
13982
13983  input_path="$new_path"
13984  # Check if we need to convert this using DOS-style short mode. If the path
13985  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13986  # take no chances and rewrite it.
13987  # Note: m4 eats our [], so we need to use [ and ] instead.
13988  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13989  if test "x$has_forbidden_chars" != x; then
13990    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13991    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13992  fi
13993
13994
13995  windows_path="$new_path"
13996  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13997    unix_path=`$CYGPATH -u "$windows_path"`
13998    new_path="$unix_path"
13999  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14000    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14001    new_path="$unix_path"
14002  fi
14003
14004  if test "x$path" != "x$new_path"; then
14005    BOOT_JDK="$new_path"
14006    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14007$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14008  fi
14009
14010  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14011  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14012
14013  else
14014    # We're on a posix platform. Hooray! :)
14015    path="$BOOT_JDK"
14016    has_space=`$ECHO "$path" | $GREP " "`
14017    if test "x$has_space" != x; then
14018      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14019$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14020      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14021    fi
14022
14023    # Use eval to expand a potential ~
14024    eval path="$path"
14025    if test ! -f "$path" && test ! -d "$path"; then
14026      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14027    fi
14028
14029    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14030  fi
14031
14032              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14033$as_echo_n "checking for Boot JDK... " >&6; }
14034              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14035$as_echo "$BOOT_JDK" >&6; }
14036              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14037$as_echo_n "checking Boot JDK version... " >&6; }
14038              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14039              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14040$as_echo "$BOOT_JDK_VERSION" >&6; }
14041            fi # end check jdk version
14042          fi # end check rt.jar
14043        fi # end check javac
14044      fi # end check java
14045    fi # end check boot jdk found
14046  fi
14047
14048
14049  if test "x$BOOT_JDK_FOUND" = xno; then
14050    # Now execute the test
14051
14052  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
14053  BOOT_JDK_SUFFIX=""
14054  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14055  if test "x$ALL_JDKS_FOUND" != x; then
14056    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14057
14058  if test "x$BOOT_JDK_FOUND" = xno; then
14059    # Now execute the test
14060
14061        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14062        if test -d "$BOOT_JDK"; then
14063          BOOT_JDK_FOUND=maybe
14064          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14065$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14066        fi
14067
14068
14069    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14070    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14071      # Do we have a bin/java?
14072      if test ! -x "$BOOT_JDK/bin/java"; then
14073        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14074$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14075        BOOT_JDK_FOUND=no
14076      else
14077        # Do we have a bin/javac?
14078        if test ! -x "$BOOT_JDK/bin/javac"; then
14079          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14080$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14081          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14082$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14083          BOOT_JDK_FOUND=no
14084        else
14085          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14086          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14087            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14088$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14089            BOOT_JDK_FOUND=no
14090          else
14091            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14092            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14093
14094            # Extra M4 quote needed to protect [] in grep expression.
14095            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14096            if test "x$FOUND_VERSION_78" = x; then
14097              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14098$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14099              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14100$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14101              BOOT_JDK_FOUND=no
14102            else
14103              # We're done! :-)
14104              BOOT_JDK_FOUND=yes
14105
14106  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14107
14108  # Input might be given as Windows format, start by converting to
14109  # unix format.
14110  path="$BOOT_JDK"
14111  new_path=`$CYGPATH -u "$path"`
14112
14113  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14114  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14115  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14116  # "foo.exe" is OK but "foo" is an error.
14117  #
14118  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14119  # It is also a way to make sure we got the proper file name for the real test later on.
14120  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14121  if test "x$test_shortpath" = x; then
14122    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14123$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14124    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14125  fi
14126
14127  # Call helper function which possibly converts this using DOS-style short mode.
14128  # If so, the updated path is stored in $new_path.
14129
14130  input_path="$new_path"
14131  # Check if we need to convert this using DOS-style short mode. If the path
14132  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14133  # take no chances and rewrite it.
14134  # Note: m4 eats our [], so we need to use [ and ] instead.
14135  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14136  if test "x$has_forbidden_chars" != x; then
14137    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14138    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14139    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14140    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14141      # Going to short mode and back again did indeed matter. Since short mode is
14142      # case insensitive, let's make it lowercase to improve readability.
14143      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14144      # Now convert it back to Unix-stile (cygpath)
14145      input_path=`$CYGPATH -u "$shortmode_path"`
14146      new_path="$input_path"
14147    fi
14148  fi
14149
14150  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14151  if test "x$test_cygdrive_prefix" = x; then
14152    # As a simple fix, exclude /usr/bin since it's not a real path.
14153    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14154      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14155      # a path prefixed by /cygdrive for fixpath to work.
14156      new_path="$CYGWIN_ROOT_PATH$input_path"
14157    fi
14158  fi
14159
14160
14161  if test "x$path" != "x$new_path"; then
14162    BOOT_JDK="$new_path"
14163    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14164$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14165  fi
14166
14167  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14168
14169  path="$BOOT_JDK"
14170  has_colon=`$ECHO $path | $GREP ^.:`
14171  new_path="$path"
14172  if test "x$has_colon" = x; then
14173    # Not in mixed or Windows style, start by that.
14174    new_path=`cmd //c echo $path`
14175  fi
14176
14177
14178  input_path="$new_path"
14179  # Check if we need to convert this using DOS-style short mode. If the path
14180  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14181  # take no chances and rewrite it.
14182  # Note: m4 eats our [], so we need to use [ and ] instead.
14183  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14184  if test "x$has_forbidden_chars" != x; then
14185    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14186    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14187  fi
14188
14189
14190  windows_path="$new_path"
14191  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14192    unix_path=`$CYGPATH -u "$windows_path"`
14193    new_path="$unix_path"
14194  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14195    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14196    new_path="$unix_path"
14197  fi
14198
14199  if test "x$path" != "x$new_path"; then
14200    BOOT_JDK="$new_path"
14201    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14202$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14203  fi
14204
14205  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14206  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14207
14208  else
14209    # We're on a posix platform. Hooray! :)
14210    path="$BOOT_JDK"
14211    has_space=`$ECHO "$path" | $GREP " "`
14212    if test "x$has_space" != x; then
14213      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14214$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14215      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14216    fi
14217
14218    # Use eval to expand a potential ~
14219    eval path="$path"
14220    if test ! -f "$path" && test ! -d "$path"; then
14221      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14222    fi
14223
14224    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14225  fi
14226
14227              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14228$as_echo_n "checking for Boot JDK... " >&6; }
14229              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14230$as_echo "$BOOT_JDK" >&6; }
14231              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14232$as_echo_n "checking Boot JDK version... " >&6; }
14233              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14234              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14235$as_echo "$BOOT_JDK_VERSION" >&6; }
14236            fi # end check jdk version
14237          fi # end check rt.jar
14238        fi # end check javac
14239      fi # end check java
14240    fi # end check boot jdk found
14241  fi
14242
14243    done
14244  fi
14245
14246
14247    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14248    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14249      # Do we have a bin/java?
14250      if test ! -x "$BOOT_JDK/bin/java"; then
14251        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14252$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14253        BOOT_JDK_FOUND=no
14254      else
14255        # Do we have a bin/javac?
14256        if test ! -x "$BOOT_JDK/bin/javac"; then
14257          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14258$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14259          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14260$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14261          BOOT_JDK_FOUND=no
14262        else
14263          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14264          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14265            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14266$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14267            BOOT_JDK_FOUND=no
14268          else
14269            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14270            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14271
14272            # Extra M4 quote needed to protect [] in grep expression.
14273            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14274            if test "x$FOUND_VERSION_78" = x; then
14275              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14276$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14277              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14278$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14279              BOOT_JDK_FOUND=no
14280            else
14281              # We're done! :-)
14282              BOOT_JDK_FOUND=yes
14283
14284  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14285
14286  # Input might be given as Windows format, start by converting to
14287  # unix format.
14288  path="$BOOT_JDK"
14289  new_path=`$CYGPATH -u "$path"`
14290
14291  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14292  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14293  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14294  # "foo.exe" is OK but "foo" is an error.
14295  #
14296  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14297  # It is also a way to make sure we got the proper file name for the real test later on.
14298  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14299  if test "x$test_shortpath" = x; then
14300    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14301$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14302    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14303  fi
14304
14305  # Call helper function which possibly converts this using DOS-style short mode.
14306  # If so, the updated path is stored in $new_path.
14307
14308  input_path="$new_path"
14309  # Check if we need to convert this using DOS-style short mode. If the path
14310  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14311  # take no chances and rewrite it.
14312  # Note: m4 eats our [], so we need to use [ and ] instead.
14313  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14314  if test "x$has_forbidden_chars" != x; then
14315    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14316    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14317    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14318    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14319      # Going to short mode and back again did indeed matter. Since short mode is
14320      # case insensitive, let's make it lowercase to improve readability.
14321      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14322      # Now convert it back to Unix-stile (cygpath)
14323      input_path=`$CYGPATH -u "$shortmode_path"`
14324      new_path="$input_path"
14325    fi
14326  fi
14327
14328  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14329  if test "x$test_cygdrive_prefix" = x; then
14330    # As a simple fix, exclude /usr/bin since it's not a real path.
14331    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14332      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14333      # a path prefixed by /cygdrive for fixpath to work.
14334      new_path="$CYGWIN_ROOT_PATH$input_path"
14335    fi
14336  fi
14337
14338
14339  if test "x$path" != "x$new_path"; then
14340    BOOT_JDK="$new_path"
14341    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14342$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14343  fi
14344
14345  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14346
14347  path="$BOOT_JDK"
14348  has_colon=`$ECHO $path | $GREP ^.:`
14349  new_path="$path"
14350  if test "x$has_colon" = x; then
14351    # Not in mixed or Windows style, start by that.
14352    new_path=`cmd //c echo $path`
14353  fi
14354
14355
14356  input_path="$new_path"
14357  # Check if we need to convert this using DOS-style short mode. If the path
14358  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14359  # take no chances and rewrite it.
14360  # Note: m4 eats our [], so we need to use [ and ] instead.
14361  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14362  if test "x$has_forbidden_chars" != x; then
14363    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14364    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14365  fi
14366
14367
14368  windows_path="$new_path"
14369  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14370    unix_path=`$CYGPATH -u "$windows_path"`
14371    new_path="$unix_path"
14372  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14373    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14374    new_path="$unix_path"
14375  fi
14376
14377  if test "x$path" != "x$new_path"; then
14378    BOOT_JDK="$new_path"
14379    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14380$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14381  fi
14382
14383  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14384  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14385
14386  else
14387    # We're on a posix platform. Hooray! :)
14388    path="$BOOT_JDK"
14389    has_space=`$ECHO "$path" | $GREP " "`
14390    if test "x$has_space" != x; then
14391      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14392$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14393      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14394    fi
14395
14396    # Use eval to expand a potential ~
14397    eval path="$path"
14398    if test ! -f "$path" && test ! -d "$path"; then
14399      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14400    fi
14401
14402    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14403  fi
14404
14405              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14406$as_echo_n "checking for Boot JDK... " >&6; }
14407              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14408$as_echo "$BOOT_JDK" >&6; }
14409              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14410$as_echo_n "checking Boot JDK version... " >&6; }
14411              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14412              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14413$as_echo "$BOOT_JDK_VERSION" >&6; }
14414            fi # end check jdk version
14415          fi # end check rt.jar
14416        fi # end check javac
14417      fi # end check java
14418    fi # end check boot jdk found
14419  fi
14420
14421  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
14422
14423  if test "x$BOOT_JDK_FOUND" = xno; then
14424    # Now execute the test
14425
14426  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
14427  BOOT_JDK_SUFFIX="/Contents/Home"
14428  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14429  if test "x$ALL_JDKS_FOUND" != x; then
14430    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14431
14432  if test "x$BOOT_JDK_FOUND" = xno; then
14433    # Now execute the test
14434
14435        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14436        if test -d "$BOOT_JDK"; then
14437          BOOT_JDK_FOUND=maybe
14438          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14439$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14440        fi
14441
14442
14443    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14444    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14445      # Do we have a bin/java?
14446      if test ! -x "$BOOT_JDK/bin/java"; then
14447        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14448$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14449        BOOT_JDK_FOUND=no
14450      else
14451        # Do we have a bin/javac?
14452        if test ! -x "$BOOT_JDK/bin/javac"; then
14453          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14454$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14455          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14456$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14457          BOOT_JDK_FOUND=no
14458        else
14459          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14460          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14461            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14462$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14463            BOOT_JDK_FOUND=no
14464          else
14465            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14466            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14467
14468            # Extra M4 quote needed to protect [] in grep expression.
14469            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14470            if test "x$FOUND_VERSION_78" = x; then
14471              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14472$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14473              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14474$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14475              BOOT_JDK_FOUND=no
14476            else
14477              # We're done! :-)
14478              BOOT_JDK_FOUND=yes
14479
14480  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14481
14482  # Input might be given as Windows format, start by converting to
14483  # unix format.
14484  path="$BOOT_JDK"
14485  new_path=`$CYGPATH -u "$path"`
14486
14487  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14488  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14489  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14490  # "foo.exe" is OK but "foo" is an error.
14491  #
14492  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14493  # It is also a way to make sure we got the proper file name for the real test later on.
14494  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14495  if test "x$test_shortpath" = x; then
14496    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14497$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14498    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14499  fi
14500
14501  # Call helper function which possibly converts this using DOS-style short mode.
14502  # If so, the updated path is stored in $new_path.
14503
14504  input_path="$new_path"
14505  # Check if we need to convert this using DOS-style short mode. If the path
14506  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14507  # take no chances and rewrite it.
14508  # Note: m4 eats our [], so we need to use [ and ] instead.
14509  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14510  if test "x$has_forbidden_chars" != x; then
14511    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14512    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14513    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14514    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14515      # Going to short mode and back again did indeed matter. Since short mode is
14516      # case insensitive, let's make it lowercase to improve readability.
14517      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14518      # Now convert it back to Unix-stile (cygpath)
14519      input_path=`$CYGPATH -u "$shortmode_path"`
14520      new_path="$input_path"
14521    fi
14522  fi
14523
14524  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14525  if test "x$test_cygdrive_prefix" = x; then
14526    # As a simple fix, exclude /usr/bin since it's not a real path.
14527    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14528      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14529      # a path prefixed by /cygdrive for fixpath to work.
14530      new_path="$CYGWIN_ROOT_PATH$input_path"
14531    fi
14532  fi
14533
14534
14535  if test "x$path" != "x$new_path"; then
14536    BOOT_JDK="$new_path"
14537    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14538$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14539  fi
14540
14541  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14542
14543  path="$BOOT_JDK"
14544  has_colon=`$ECHO $path | $GREP ^.:`
14545  new_path="$path"
14546  if test "x$has_colon" = x; then
14547    # Not in mixed or Windows style, start by that.
14548    new_path=`cmd //c echo $path`
14549  fi
14550
14551
14552  input_path="$new_path"
14553  # Check if we need to convert this using DOS-style short mode. If the path
14554  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14555  # take no chances and rewrite it.
14556  # Note: m4 eats our [], so we need to use [ and ] instead.
14557  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14558  if test "x$has_forbidden_chars" != x; then
14559    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14560    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14561  fi
14562
14563
14564  windows_path="$new_path"
14565  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14566    unix_path=`$CYGPATH -u "$windows_path"`
14567    new_path="$unix_path"
14568  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14569    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14570    new_path="$unix_path"
14571  fi
14572
14573  if test "x$path" != "x$new_path"; then
14574    BOOT_JDK="$new_path"
14575    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14576$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14577  fi
14578
14579  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14580  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14581
14582  else
14583    # We're on a posix platform. Hooray! :)
14584    path="$BOOT_JDK"
14585    has_space=`$ECHO "$path" | $GREP " "`
14586    if test "x$has_space" != x; then
14587      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14588$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14589      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14590    fi
14591
14592    # Use eval to expand a potential ~
14593    eval path="$path"
14594    if test ! -f "$path" && test ! -d "$path"; then
14595      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14596    fi
14597
14598    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14599  fi
14600
14601              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14602$as_echo_n "checking for Boot JDK... " >&6; }
14603              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14604$as_echo "$BOOT_JDK" >&6; }
14605              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14606$as_echo_n "checking Boot JDK version... " >&6; }
14607              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14608              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14609$as_echo "$BOOT_JDK_VERSION" >&6; }
14610            fi # end check jdk version
14611          fi # end check rt.jar
14612        fi # end check javac
14613      fi # end check java
14614    fi # end check boot jdk found
14615  fi
14616
14617    done
14618  fi
14619
14620
14621    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14622    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14623      # Do we have a bin/java?
14624      if test ! -x "$BOOT_JDK/bin/java"; then
14625        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14626$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14627        BOOT_JDK_FOUND=no
14628      else
14629        # Do we have a bin/javac?
14630        if test ! -x "$BOOT_JDK/bin/javac"; then
14631          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14632$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14633          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14634$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14635          BOOT_JDK_FOUND=no
14636        else
14637          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14638          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14639            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14640$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14641            BOOT_JDK_FOUND=no
14642          else
14643            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14644            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14645
14646            # Extra M4 quote needed to protect [] in grep expression.
14647            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14648            if test "x$FOUND_VERSION_78" = x; then
14649              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14650$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14651              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14652$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14653              BOOT_JDK_FOUND=no
14654            else
14655              # We're done! :-)
14656              BOOT_JDK_FOUND=yes
14657
14658  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14659
14660  # Input might be given as Windows format, start by converting to
14661  # unix format.
14662  path="$BOOT_JDK"
14663  new_path=`$CYGPATH -u "$path"`
14664
14665  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14666  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14667  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14668  # "foo.exe" is OK but "foo" is an error.
14669  #
14670  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14671  # It is also a way to make sure we got the proper file name for the real test later on.
14672  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14673  if test "x$test_shortpath" = x; then
14674    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14675$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14676    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14677  fi
14678
14679  # Call helper function which possibly converts this using DOS-style short mode.
14680  # If so, the updated path is stored in $new_path.
14681
14682  input_path="$new_path"
14683  # Check if we need to convert this using DOS-style short mode. If the path
14684  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14685  # take no chances and rewrite it.
14686  # Note: m4 eats our [], so we need to use [ and ] instead.
14687  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14688  if test "x$has_forbidden_chars" != x; then
14689    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14690    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14691    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14692    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14693      # Going to short mode and back again did indeed matter. Since short mode is
14694      # case insensitive, let's make it lowercase to improve readability.
14695      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14696      # Now convert it back to Unix-stile (cygpath)
14697      input_path=`$CYGPATH -u "$shortmode_path"`
14698      new_path="$input_path"
14699    fi
14700  fi
14701
14702  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14703  if test "x$test_cygdrive_prefix" = x; then
14704    # As a simple fix, exclude /usr/bin since it's not a real path.
14705    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14706      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14707      # a path prefixed by /cygdrive for fixpath to work.
14708      new_path="$CYGWIN_ROOT_PATH$input_path"
14709    fi
14710  fi
14711
14712
14713  if test "x$path" != "x$new_path"; then
14714    BOOT_JDK="$new_path"
14715    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14716$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14717  fi
14718
14719  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14720
14721  path="$BOOT_JDK"
14722  has_colon=`$ECHO $path | $GREP ^.:`
14723  new_path="$path"
14724  if test "x$has_colon" = x; then
14725    # Not in mixed or Windows style, start by that.
14726    new_path=`cmd //c echo $path`
14727  fi
14728
14729
14730  input_path="$new_path"
14731  # Check if we need to convert this using DOS-style short mode. If the path
14732  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14733  # take no chances and rewrite it.
14734  # Note: m4 eats our [], so we need to use [ and ] instead.
14735  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14736  if test "x$has_forbidden_chars" != x; then
14737    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14738    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14739  fi
14740
14741
14742  windows_path="$new_path"
14743  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14744    unix_path=`$CYGPATH -u "$windows_path"`
14745    new_path="$unix_path"
14746  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14747    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14748    new_path="$unix_path"
14749  fi
14750
14751  if test "x$path" != "x$new_path"; then
14752    BOOT_JDK="$new_path"
14753    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14754$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14755  fi
14756
14757  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14758  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14759
14760  else
14761    # We're on a posix platform. Hooray! :)
14762    path="$BOOT_JDK"
14763    has_space=`$ECHO "$path" | $GREP " "`
14764    if test "x$has_space" != x; then
14765      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14766$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14767      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14768    fi
14769
14770    # Use eval to expand a potential ~
14771    eval path="$path"
14772    if test ! -f "$path" && test ! -d "$path"; then
14773      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14774    fi
14775
14776    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14777  fi
14778
14779              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14780$as_echo_n "checking for Boot JDK... " >&6; }
14781              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14782$as_echo "$BOOT_JDK" >&6; }
14783              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14784$as_echo_n "checking Boot JDK version... " >&6; }
14785              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14786              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14787$as_echo "$BOOT_JDK_VERSION" >&6; }
14788            fi # end check jdk version
14789          fi # end check rt.jar
14790        fi # end check javac
14791      fi # end check java
14792    fi # end check boot jdk found
14793  fi
14794
14795
14796  if test "x$BOOT_JDK_FOUND" = xno; then
14797    # Now execute the test
14798
14799  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
14800  BOOT_JDK_SUFFIX="/Contents/Home"
14801  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14802  if test "x$ALL_JDKS_FOUND" != x; then
14803    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14804
14805  if test "x$BOOT_JDK_FOUND" = xno; then
14806    # Now execute the test
14807
14808        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14809        if test -d "$BOOT_JDK"; then
14810          BOOT_JDK_FOUND=maybe
14811          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14812$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14813        fi
14814
14815
14816    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14817    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14818      # Do we have a bin/java?
14819      if test ! -x "$BOOT_JDK/bin/java"; then
14820        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14821$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14822        BOOT_JDK_FOUND=no
14823      else
14824        # Do we have a bin/javac?
14825        if test ! -x "$BOOT_JDK/bin/javac"; then
14826          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14827$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14828          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14829$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14830          BOOT_JDK_FOUND=no
14831        else
14832          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14833          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14834            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14835$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14836            BOOT_JDK_FOUND=no
14837          else
14838            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14839            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14840
14841            # Extra M4 quote needed to protect [] in grep expression.
14842            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14843            if test "x$FOUND_VERSION_78" = x; then
14844              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14845$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14846              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14847$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14848              BOOT_JDK_FOUND=no
14849            else
14850              # We're done! :-)
14851              BOOT_JDK_FOUND=yes
14852
14853  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14854
14855  # Input might be given as Windows format, start by converting to
14856  # unix format.
14857  path="$BOOT_JDK"
14858  new_path=`$CYGPATH -u "$path"`
14859
14860  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14861  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14862  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14863  # "foo.exe" is OK but "foo" is an error.
14864  #
14865  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14866  # It is also a way to make sure we got the proper file name for the real test later on.
14867  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14868  if test "x$test_shortpath" = x; then
14869    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14870$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14871    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14872  fi
14873
14874  # Call helper function which possibly converts this using DOS-style short mode.
14875  # If so, the updated path is stored in $new_path.
14876
14877  input_path="$new_path"
14878  # Check if we need to convert this using DOS-style short mode. If the path
14879  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14880  # take no chances and rewrite it.
14881  # Note: m4 eats our [], so we need to use [ and ] instead.
14882  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14883  if test "x$has_forbidden_chars" != x; then
14884    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14885    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14886    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14887    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14888      # Going to short mode and back again did indeed matter. Since short mode is
14889      # case insensitive, let's make it lowercase to improve readability.
14890      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14891      # Now convert it back to Unix-stile (cygpath)
14892      input_path=`$CYGPATH -u "$shortmode_path"`
14893      new_path="$input_path"
14894    fi
14895  fi
14896
14897  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14898  if test "x$test_cygdrive_prefix" = x; then
14899    # As a simple fix, exclude /usr/bin since it's not a real path.
14900    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14901      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14902      # a path prefixed by /cygdrive for fixpath to work.
14903      new_path="$CYGWIN_ROOT_PATH$input_path"
14904    fi
14905  fi
14906
14907
14908  if test "x$path" != "x$new_path"; then
14909    BOOT_JDK="$new_path"
14910    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14911$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14912  fi
14913
14914  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14915
14916  path="$BOOT_JDK"
14917  has_colon=`$ECHO $path | $GREP ^.:`
14918  new_path="$path"
14919  if test "x$has_colon" = x; then
14920    # Not in mixed or Windows style, start by that.
14921    new_path=`cmd //c echo $path`
14922  fi
14923
14924
14925  input_path="$new_path"
14926  # Check if we need to convert this using DOS-style short mode. If the path
14927  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14928  # take no chances and rewrite it.
14929  # Note: m4 eats our [], so we need to use [ and ] instead.
14930  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14931  if test "x$has_forbidden_chars" != x; then
14932    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14933    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14934  fi
14935
14936
14937  windows_path="$new_path"
14938  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14939    unix_path=`$CYGPATH -u "$windows_path"`
14940    new_path="$unix_path"
14941  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14942    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14943    new_path="$unix_path"
14944  fi
14945
14946  if test "x$path" != "x$new_path"; then
14947    BOOT_JDK="$new_path"
14948    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14949$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14950  fi
14951
14952  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14953  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14954
14955  else
14956    # We're on a posix platform. Hooray! :)
14957    path="$BOOT_JDK"
14958    has_space=`$ECHO "$path" | $GREP " "`
14959    if test "x$has_space" != x; then
14960      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14961$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14962      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14963    fi
14964
14965    # Use eval to expand a potential ~
14966    eval path="$path"
14967    if test ! -f "$path" && test ! -d "$path"; then
14968      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14969    fi
14970
14971    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14972  fi
14973
14974              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14975$as_echo_n "checking for Boot JDK... " >&6; }
14976              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14977$as_echo "$BOOT_JDK" >&6; }
14978              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14979$as_echo_n "checking Boot JDK version... " >&6; }
14980              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14981              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14982$as_echo "$BOOT_JDK_VERSION" >&6; }
14983            fi # end check jdk version
14984          fi # end check rt.jar
14985        fi # end check javac
14986      fi # end check java
14987    fi # end check boot jdk found
14988  fi
14989
14990    done
14991  fi
14992
14993
14994    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14995    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14996      # Do we have a bin/java?
14997      if test ! -x "$BOOT_JDK/bin/java"; then
14998        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14999$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15000        BOOT_JDK_FOUND=no
15001      else
15002        # Do we have a bin/javac?
15003        if test ! -x "$BOOT_JDK/bin/javac"; then
15004          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15005$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15006          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15007$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15008          BOOT_JDK_FOUND=no
15009        else
15010          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15011          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15012            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15013$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15014            BOOT_JDK_FOUND=no
15015          else
15016            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15017            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15018
15019            # Extra M4 quote needed to protect [] in grep expression.
15020            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15021            if test "x$FOUND_VERSION_78" = x; then
15022              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15023$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15024              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15025$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15026              BOOT_JDK_FOUND=no
15027            else
15028              # We're done! :-)
15029              BOOT_JDK_FOUND=yes
15030
15031  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15032
15033  # Input might be given as Windows format, start by converting to
15034  # unix format.
15035  path="$BOOT_JDK"
15036  new_path=`$CYGPATH -u "$path"`
15037
15038  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15039  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15040  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15041  # "foo.exe" is OK but "foo" is an error.
15042  #
15043  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15044  # It is also a way to make sure we got the proper file name for the real test later on.
15045  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15046  if test "x$test_shortpath" = x; then
15047    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15048$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15049    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15050  fi
15051
15052  # Call helper function which possibly converts this using DOS-style short mode.
15053  # If so, the updated path is stored in $new_path.
15054
15055  input_path="$new_path"
15056  # Check if we need to convert this using DOS-style short mode. If the path
15057  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15058  # take no chances and rewrite it.
15059  # Note: m4 eats our [], so we need to use [ and ] instead.
15060  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15061  if test "x$has_forbidden_chars" != x; then
15062    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15063    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15064    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15065    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15066      # Going to short mode and back again did indeed matter. Since short mode is
15067      # case insensitive, let's make it lowercase to improve readability.
15068      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15069      # Now convert it back to Unix-stile (cygpath)
15070      input_path=`$CYGPATH -u "$shortmode_path"`
15071      new_path="$input_path"
15072    fi
15073  fi
15074
15075  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15076  if test "x$test_cygdrive_prefix" = x; then
15077    # As a simple fix, exclude /usr/bin since it's not a real path.
15078    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15079      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15080      # a path prefixed by /cygdrive for fixpath to work.
15081      new_path="$CYGWIN_ROOT_PATH$input_path"
15082    fi
15083  fi
15084
15085
15086  if test "x$path" != "x$new_path"; then
15087    BOOT_JDK="$new_path"
15088    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15089$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15090  fi
15091
15092  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15093
15094  path="$BOOT_JDK"
15095  has_colon=`$ECHO $path | $GREP ^.:`
15096  new_path="$path"
15097  if test "x$has_colon" = x; then
15098    # Not in mixed or Windows style, start by that.
15099    new_path=`cmd //c echo $path`
15100  fi
15101
15102
15103  input_path="$new_path"
15104  # Check if we need to convert this using DOS-style short mode. If the path
15105  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15106  # take no chances and rewrite it.
15107  # Note: m4 eats our [], so we need to use [ and ] instead.
15108  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15109  if test "x$has_forbidden_chars" != x; then
15110    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15111    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15112  fi
15113
15114
15115  windows_path="$new_path"
15116  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15117    unix_path=`$CYGPATH -u "$windows_path"`
15118    new_path="$unix_path"
15119  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15120    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15121    new_path="$unix_path"
15122  fi
15123
15124  if test "x$path" != "x$new_path"; then
15125    BOOT_JDK="$new_path"
15126    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15127$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15128  fi
15129
15130  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15131  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15132
15133  else
15134    # We're on a posix platform. Hooray! :)
15135    path="$BOOT_JDK"
15136    has_space=`$ECHO "$path" | $GREP " "`
15137    if test "x$has_space" != x; then
15138      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15139$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15140      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15141    fi
15142
15143    # Use eval to expand a potential ~
15144    eval path="$path"
15145    if test ! -f "$path" && test ! -d "$path"; then
15146      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15147    fi
15148
15149    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
15150  fi
15151
15152              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15153$as_echo_n "checking for Boot JDK... " >&6; }
15154              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15155$as_echo "$BOOT_JDK" >&6; }
15156              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15157$as_echo_n "checking Boot JDK version... " >&6; }
15158              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15159              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15160$as_echo "$BOOT_JDK_VERSION" >&6; }
15161            fi # end check jdk version
15162          fi # end check rt.jar
15163        fi # end check javac
15164      fi # end check java
15165    fi # end check boot jdk found
15166  fi
15167
15168  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
15169
15170  if test "x$BOOT_JDK_FOUND" = xno; then
15171    # Now execute the test
15172
15173  BOOT_JDK_PREFIX="/usr/lib/jvm"
15174  BOOT_JDK_SUFFIX=""
15175  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
15176  if test "x$ALL_JDKS_FOUND" != x; then
15177    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
15178
15179  if test "x$BOOT_JDK_FOUND" = xno; then
15180    # Now execute the test
15181
15182        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
15183        if test -d "$BOOT_JDK"; then
15184          BOOT_JDK_FOUND=maybe
15185          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
15186$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
15187        fi
15188
15189
15190    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15191    if test "x$BOOT_JDK_FOUND" = xmaybe; then
15192      # Do we have a bin/java?
15193      if test ! -x "$BOOT_JDK/bin/java"; then
15194        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15195$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15196        BOOT_JDK_FOUND=no
15197      else
15198        # Do we have a bin/javac?
15199        if test ! -x "$BOOT_JDK/bin/javac"; then
15200          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15201$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15202          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15203$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15204          BOOT_JDK_FOUND=no
15205        else
15206          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15207          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15208            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15209$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15210            BOOT_JDK_FOUND=no
15211          else
15212            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15213            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15214
15215            # Extra M4 quote needed to protect [] in grep expression.
15216            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15217            if test "x$FOUND_VERSION_78" = x; then
15218              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15219$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15220              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15221$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15222              BOOT_JDK_FOUND=no
15223            else
15224              # We're done! :-)
15225              BOOT_JDK_FOUND=yes
15226
15227  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15228
15229  # Input might be given as Windows format, start by converting to
15230  # unix format.
15231  path="$BOOT_JDK"
15232  new_path=`$CYGPATH -u "$path"`
15233
15234  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15235  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15236  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15237  # "foo.exe" is OK but "foo" is an error.
15238  #
15239  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15240  # It is also a way to make sure we got the proper file name for the real test later on.
15241  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15242  if test "x$test_shortpath" = x; then
15243    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15244$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15245    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15246  fi
15247
15248  # Call helper function which possibly converts this using DOS-style short mode.
15249  # If so, the updated path is stored in $new_path.
15250
15251  input_path="$new_path"
15252  # Check if we need to convert this using DOS-style short mode. If the path
15253  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15254  # take no chances and rewrite it.
15255  # Note: m4 eats our [], so we need to use [ and ] instead.
15256  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15257  if test "x$has_forbidden_chars" != x; then
15258    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15259    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15260    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15261    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15262      # Going to short mode and back again did indeed matter. Since short mode is
15263      # case insensitive, let's make it lowercase to improve readability.
15264      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15265      # Now convert it back to Unix-stile (cygpath)
15266      input_path=`$CYGPATH -u "$shortmode_path"`
15267      new_path="$input_path"
15268    fi
15269  fi
15270
15271  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15272  if test "x$test_cygdrive_prefix" = x; then
15273    # As a simple fix, exclude /usr/bin since it's not a real path.
15274    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15275      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15276      # a path prefixed by /cygdrive for fixpath to work.
15277      new_path="$CYGWIN_ROOT_PATH$input_path"
15278    fi
15279  fi
15280
15281
15282  if test "x$path" != "x$new_path"; then
15283    BOOT_JDK="$new_path"
15284    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15285$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15286  fi
15287
15288  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15289
15290  path="$BOOT_JDK"
15291  has_colon=`$ECHO $path | $GREP ^.:`
15292  new_path="$path"
15293  if test "x$has_colon" = x; then
15294    # Not in mixed or Windows style, start by that.
15295    new_path=`cmd //c echo $path`
15296  fi
15297
15298
15299  input_path="$new_path"
15300  # Check if we need to convert this using DOS-style short mode. If the path
15301  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15302  # take no chances and rewrite it.
15303  # Note: m4 eats our [], so we need to use [ and ] instead.
15304  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15305  if test "x$has_forbidden_chars" != x; then
15306    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15307    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15308  fi
15309
15310
15311  windows_path="$new_path"
15312  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15313    unix_path=`$CYGPATH -u "$windows_path"`
15314    new_path="$unix_path"
15315  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15316    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15317    new_path="$unix_path"
15318  fi
15319
15320  if test "x$path" != "x$new_path"; then
15321    BOOT_JDK="$new_path"
15322    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15323$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15324  fi
15325
15326  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15327  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15328
15329  else
15330    # We're on a posix platform. Hooray! :)
15331    path="$BOOT_JDK"
15332    has_space=`$ECHO "$path" | $GREP " "`
15333    if test "x$has_space" != x; then
15334      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15335$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15336      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15337    fi
15338
15339    # Use eval to expand a potential ~
15340    eval path="$path"
15341    if test ! -f "$path" && test ! -d "$path"; then
15342      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15343    fi
15344
15345    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
15346  fi
15347
15348              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15349$as_echo_n "checking for Boot JDK... " >&6; }
15350              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15351$as_echo "$BOOT_JDK" >&6; }
15352              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15353$as_echo_n "checking Boot JDK version... " >&6; }
15354              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15355              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15356$as_echo "$BOOT_JDK_VERSION" >&6; }
15357            fi # end check jdk version
15358          fi # end check rt.jar
15359        fi # end check javac
15360      fi # end check java
15361    fi # end check boot jdk found
15362  fi
15363
15364    done
15365  fi
15366
15367
15368    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15369    if test "x$BOOT_JDK_FOUND" = xmaybe; then
15370      # Do we have a bin/java?
15371      if test ! -x "$BOOT_JDK/bin/java"; then
15372        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15373$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15374        BOOT_JDK_FOUND=no
15375      else
15376        # Do we have a bin/javac?
15377        if test ! -x "$BOOT_JDK/bin/javac"; then
15378          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15379$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15380          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15381$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15382          BOOT_JDK_FOUND=no
15383        else
15384          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15385          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15386            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15387$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15388            BOOT_JDK_FOUND=no
15389          else
15390            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15391            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15392
15393            # Extra M4 quote needed to protect [] in grep expression.
15394            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15395            if test "x$FOUND_VERSION_78" = x; then
15396              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15397$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15398              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15399$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15400              BOOT_JDK_FOUND=no
15401            else
15402              # We're done! :-)
15403              BOOT_JDK_FOUND=yes
15404
15405  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15406
15407  # Input might be given as Windows format, start by converting to
15408  # unix format.
15409  path="$BOOT_JDK"
15410  new_path=`$CYGPATH -u "$path"`
15411
15412  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15413  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15414  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15415  # "foo.exe" is OK but "foo" is an error.
15416  #
15417  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15418  # It is also a way to make sure we got the proper file name for the real test later on.
15419  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15420  if test "x$test_shortpath" = x; then
15421    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15422$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15423    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15424  fi
15425
15426  # Call helper function which possibly converts this using DOS-style short mode.
15427  # If so, the updated path is stored in $new_path.
15428
15429  input_path="$new_path"
15430  # Check if we need to convert this using DOS-style short mode. If the path
15431  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15432  # take no chances and rewrite it.
15433  # Note: m4 eats our [], so we need to use [ and ] instead.
15434  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15435  if test "x$has_forbidden_chars" != x; then
15436    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15437    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15438    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15439    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15440      # Going to short mode and back again did indeed matter. Since short mode is
15441      # case insensitive, let's make it lowercase to improve readability.
15442      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15443      # Now convert it back to Unix-stile (cygpath)
15444      input_path=`$CYGPATH -u "$shortmode_path"`
15445      new_path="$input_path"
15446    fi
15447  fi
15448
15449  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15450  if test "x$test_cygdrive_prefix" = x; then
15451    # As a simple fix, exclude /usr/bin since it's not a real path.
15452    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15453      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15454      # a path prefixed by /cygdrive for fixpath to work.
15455      new_path="$CYGWIN_ROOT_PATH$input_path"
15456    fi
15457  fi
15458
15459
15460  if test "x$path" != "x$new_path"; then
15461    BOOT_JDK="$new_path"
15462    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15463$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15464  fi
15465
15466  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15467
15468  path="$BOOT_JDK"
15469  has_colon=`$ECHO $path | $GREP ^.:`
15470  new_path="$path"
15471  if test "x$has_colon" = x; then
15472    # Not in mixed or Windows style, start by that.
15473    new_path=`cmd //c echo $path`
15474  fi
15475
15476
15477  input_path="$new_path"
15478  # Check if we need to convert this using DOS-style short mode. If the path
15479  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15480  # take no chances and rewrite it.
15481  # Note: m4 eats our [], so we need to use [ and ] instead.
15482  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15483  if test "x$has_forbidden_chars" != x; then
15484    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15485    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15486  fi
15487
15488
15489  windows_path="$new_path"
15490  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15491    unix_path=`$CYGPATH -u "$windows_path"`
15492    new_path="$unix_path"
15493  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15494    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15495    new_path="$unix_path"
15496  fi
15497
15498  if test "x$path" != "x$new_path"; then
15499    BOOT_JDK="$new_path"
15500    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15501$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15502  fi
15503
15504  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15505  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15506
15507  else
15508    # We're on a posix platform. Hooray! :)
15509    path="$BOOT_JDK"
15510    has_space=`$ECHO "$path" | $GREP " "`
15511    if test "x$has_space" != x; then
15512      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15513$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15514      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15515    fi
15516
15517    # Use eval to expand a potential ~
15518    eval path="$path"
15519    if test ! -f "$path" && test ! -d "$path"; then
15520      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15521    fi
15522
15523    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
15524  fi
15525
15526              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15527$as_echo_n "checking for Boot JDK... " >&6; }
15528              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15529$as_echo "$BOOT_JDK" >&6; }
15530              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15531$as_echo_n "checking Boot JDK version... " >&6; }
15532              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15533              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15534$as_echo "$BOOT_JDK_VERSION" >&6; }
15535            fi # end check jdk version
15536          fi # end check rt.jar
15537        fi # end check javac
15538      fi # end check java
15539    fi # end check boot jdk found
15540  fi
15541
15542  fi
15543
15544
15545    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15546    if test "x$BOOT_JDK_FOUND" = xmaybe; then
15547      # Do we have a bin/java?
15548      if test ! -x "$BOOT_JDK/bin/java"; then
15549        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15550$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15551        BOOT_JDK_FOUND=no
15552      else
15553        # Do we have a bin/javac?
15554        if test ! -x "$BOOT_JDK/bin/javac"; then
15555          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15556$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15557          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15558$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15559          BOOT_JDK_FOUND=no
15560        else
15561          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15562          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15563            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15564$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15565            BOOT_JDK_FOUND=no
15566          else
15567            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15568            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15569
15570            # Extra M4 quote needed to protect [] in grep expression.
15571            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15572            if test "x$FOUND_VERSION_78" = x; then
15573              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15574$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15575              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15576$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15577              BOOT_JDK_FOUND=no
15578            else
15579              # We're done! :-)
15580              BOOT_JDK_FOUND=yes
15581
15582  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15583
15584  # Input might be given as Windows format, start by converting to
15585  # unix format.
15586  path="$BOOT_JDK"
15587  new_path=`$CYGPATH -u "$path"`
15588
15589  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15590  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15591  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15592  # "foo.exe" is OK but "foo" is an error.
15593  #
15594  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15595  # It is also a way to make sure we got the proper file name for the real test later on.
15596  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15597  if test "x$test_shortpath" = x; then
15598    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15599$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15600    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15601  fi
15602
15603  # Call helper function which possibly converts this using DOS-style short mode.
15604  # If so, the updated path is stored in $new_path.
15605
15606  input_path="$new_path"
15607  # Check if we need to convert this using DOS-style short mode. If the path
15608  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15609  # take no chances and rewrite it.
15610  # Note: m4 eats our [], so we need to use [ and ] instead.
15611  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15612  if test "x$has_forbidden_chars" != x; then
15613    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15614    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15615    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15616    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15617      # Going to short mode and back again did indeed matter. Since short mode is
15618      # case insensitive, let's make it lowercase to improve readability.
15619      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15620      # Now convert it back to Unix-stile (cygpath)
15621      input_path=`$CYGPATH -u "$shortmode_path"`
15622      new_path="$input_path"
15623    fi
15624  fi
15625
15626  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15627  if test "x$test_cygdrive_prefix" = x; then
15628    # As a simple fix, exclude /usr/bin since it's not a real path.
15629    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15630      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15631      # a path prefixed by /cygdrive for fixpath to work.
15632      new_path="$CYGWIN_ROOT_PATH$input_path"
15633    fi
15634  fi
15635
15636
15637  if test "x$path" != "x$new_path"; then
15638    BOOT_JDK="$new_path"
15639    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15640$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15641  fi
15642
15643  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15644
15645  path="$BOOT_JDK"
15646  has_colon=`$ECHO $path | $GREP ^.:`
15647  new_path="$path"
15648  if test "x$has_colon" = x; then
15649    # Not in mixed or Windows style, start by that.
15650    new_path=`cmd //c echo $path`
15651  fi
15652
15653
15654  input_path="$new_path"
15655  # Check if we need to convert this using DOS-style short mode. If the path
15656  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15657  # take no chances and rewrite it.
15658  # Note: m4 eats our [], so we need to use [ and ] instead.
15659  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15660  if test "x$has_forbidden_chars" != x; then
15661    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15662    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15663  fi
15664
15665
15666  windows_path="$new_path"
15667  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15668    unix_path=`$CYGPATH -u "$windows_path"`
15669    new_path="$unix_path"
15670  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15671    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15672    new_path="$unix_path"
15673  fi
15674
15675  if test "x$path" != "x$new_path"; then
15676    BOOT_JDK="$new_path"
15677    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15678$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15679  fi
15680
15681  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15682  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15683
15684  else
15685    # We're on a posix platform. Hooray! :)
15686    path="$BOOT_JDK"
15687    has_space=`$ECHO "$path" | $GREP " "`
15688    if test "x$has_space" != x; then
15689      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15690$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15691      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15692    fi
15693
15694    # Use eval to expand a potential ~
15695    eval path="$path"
15696    if test ! -f "$path" && test ! -d "$path"; then
15697      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15698    fi
15699
15700    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
15701  fi
15702
15703              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15704$as_echo_n "checking for Boot JDK... " >&6; }
15705              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15706$as_echo "$BOOT_JDK" >&6; }
15707              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15708$as_echo_n "checking Boot JDK version... " >&6; }
15709              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15710              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15711$as_echo "$BOOT_JDK_VERSION" >&6; }
15712            fi # end check jdk version
15713          fi # end check rt.jar
15714        fi # end check javac
15715      fi # end check java
15716    fi # end check boot jdk found
15717  fi
15718
15719
15720  # If we haven't found anything yet, we've truly lost. Give up.
15721  if test "x$BOOT_JDK_FOUND" = xno; then
15722
15723  # Print a helpful message on how to acquire the necessary build dependency.
15724  # openjdk is the help tag: freetyp2, cups, pulse, alsa etc
15725  MISSING_DEPENDENCY=openjdk
15726  PKGHANDLER_COMMAND=
15727
15728  case $PKGHANDLER in
15729    apt-get)
15730      apt_help     $MISSING_DEPENDENCY ;;
15731    yum)
15732      yum_help     $MISSING_DEPENDENCY ;;
15733    port)
15734      port_help    $MISSING_DEPENDENCY ;;
15735    pkgutil)
15736      pkgutil_help $MISSING_DEPENDENCY ;;
15737    pkgadd)
15738      pkgadd_help  $MISSING_DEPENDENCY ;;
15739    * )
15740      break ;;
15741  esac
15742
15743  if test "x$PKGHANDLER_COMMAND" != x; then
15744    HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
15745  fi
15746
15747    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
15748$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
15749    { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
15750$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15751    as_fn_error $? "Cannot continue" "$LINENO" 5
15752  fi
15753
15754  # Setup proper paths for what we found
15755  BOOT_RTJAR="$BOOT_JDK/jre/lib/rt.jar"
15756  if test ! -f "$BOOT_RTJAR"; then
15757    # On MacOSX it is called classes.jar
15758    BOOT_RTJAR="$BOOT_JDK/../Classes/classes.jar"
15759    if test -f "$BOOT_RTJAR"; then
15760      # Remove the ..
15761      BOOT_RTJAR="`cd ${BOOT_RTJAR%/*} && pwd`/${BOOT_RTJAR##*/}"
15762    fi
15763  fi
15764  BOOT_TOOLSJAR="$BOOT_JDK/lib/tools.jar"
15765  BOOT_JDK="$BOOT_JDK"
15766
15767
15768
15769
15770  # Setup tools from the Boot JDK.
15771
15772  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
15773$as_echo_n "checking for java in Boot JDK... " >&6; }
15774  JAVA=$BOOT_JDK/bin/java
15775  if test ! -x $JAVA; then
15776    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15777$as_echo "not found" >&6; }
15778    { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15779$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15780    as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
15781  fi
15782  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15783$as_echo "ok" >&6; }
15784
15785
15786  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
15787$as_echo_n "checking for javac in Boot JDK... " >&6; }
15788  JAVAC=$BOOT_JDK/bin/javac
15789  if test ! -x $JAVAC; then
15790    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15791$as_echo "not found" >&6; }
15792    { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15793$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15794    as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
15795  fi
15796  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15797$as_echo "ok" >&6; }
15798
15799
15800  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
15801$as_echo_n "checking for javah in Boot JDK... " >&6; }
15802  JAVAH=$BOOT_JDK/bin/javah
15803  if test ! -x $JAVAH; then
15804    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15805$as_echo "not found" >&6; }
15806    { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15807$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15808    as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
15809  fi
15810  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15811$as_echo "ok" >&6; }
15812
15813
15814  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javap in Boot JDK" >&5
15815$as_echo_n "checking for javap in Boot JDK... " >&6; }
15816  JAVAP=$BOOT_JDK/bin/javap
15817  if test ! -x $JAVAP; then
15818    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15819$as_echo "not found" >&6; }
15820    { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15821$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15822    as_fn_error $? "Could not find javap in the Boot JDK" "$LINENO" 5
15823  fi
15824  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15825$as_echo "ok" >&6; }
15826
15827
15828  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
15829$as_echo_n "checking for jar in Boot JDK... " >&6; }
15830  JAR=$BOOT_JDK/bin/jar
15831  if test ! -x $JAR; then
15832    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15833$as_echo "not found" >&6; }
15834    { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15835$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15836    as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
15837  fi
15838  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15839$as_echo "ok" >&6; }
15840
15841
15842  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rmic in Boot JDK" >&5
15843$as_echo_n "checking for rmic in Boot JDK... " >&6; }
15844  RMIC=$BOOT_JDK/bin/rmic
15845  if test ! -x $RMIC; then
15846    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15847$as_echo "not found" >&6; }
15848    { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15849$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15850    as_fn_error $? "Could not find rmic in the Boot JDK" "$LINENO" 5
15851  fi
15852  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15853$as_echo "ok" >&6; }
15854
15855
15856  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5
15857$as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
15858  NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
15859  if test ! -x $NATIVE2ASCII; then
15860    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15861$as_echo "not found" >&6; }
15862    { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15863$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15864    as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5
15865  fi
15866  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15867$as_echo "ok" >&6; }
15868
15869
15870  # Finally, set some other options...
15871
15872  # When compiling code to be executed by the Boot JDK, force jdk7 compatibility.
15873  BOOT_JDK_SOURCETARGET="-source 7 -target 7"
15874
15875
15876
15877
15878  ##############################################################################
15879  #
15880  # Specify options for anything that is run with the Boot JDK.
15881  #
15882
15883# Check whether --with-boot-jdk-jvmargs was given.
15884if test "${with_boot_jdk_jvmargs+set}" = set; then :
15885  withval=$with_boot_jdk_jvmargs;
15886fi
15887
15888
15889  if test "x$with_boot_jdk_jvmargs" = x; then
15890    # Not all JVM:s accept the same arguments on the command line.
15891    # OpenJDK specific increase in thread stack for JDK build,
15892    # well more specifically, when running javac.
15893    if test "x$BUILD_NUM_BITS" = x32; then
15894      STACK_SIZE=768
15895    else
15896      # Running Javac on a JVM on a 64-bit machine, the stack takes more space
15897      # since 64-bit pointers are pushed on the stach. Apparently, we need
15898      # to increase the stack space when javacing the JDK....
15899      STACK_SIZE=1536
15900    fi
15901
15902    # Minimum amount of heap memory.
15903
15904  $ECHO "Check if jvm arg is ok: -Xms64M" >&5
15905  $ECHO "Command: $JAVA -Xms64M -version" >&5
15906  OUTPUT=`$JAVA -Xms64M -version 2>&1`
15907  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
15908  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
15909  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15910    boot_jdk_jvmargs="$boot_jdk_jvmargs -Xms64M"
15911    JVM_ARG_OK=true
15912  else
15913    $ECHO "Arg failed:" >&5
15914    $ECHO "$OUTPUT" >&5
15915    JVM_ARG_OK=false
15916  fi
15917
15918    if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
15919      # Why does macosx need more heap? Its the huge JDK batch.
15920
15921  $ECHO "Check if jvm arg is ok: -Xmx1600M" >&5
15922  $ECHO "Command: $JAVA -Xmx1600M -version" >&5
15923  OUTPUT=`$JAVA -Xmx1600M -version 2>&1`
15924  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
15925  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
15926  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15927    boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1600M"
15928    JVM_ARG_OK=true
15929  else
15930    $ECHO "Arg failed:" >&5
15931    $ECHO "$OUTPUT" >&5
15932    JVM_ARG_OK=false
15933  fi
15934
15935    else
15936
15937  $ECHO "Check if jvm arg is ok: -Xmx1100M" >&5
15938  $ECHO "Command: $JAVA -Xmx1100M -version" >&5
15939  OUTPUT=`$JAVA -Xmx1100M -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 -Xmx1100M"
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    fi
15952    # When is adding -client something that speeds up the JVM?
15953    # ADD_JVM_ARG_IF_OK([-client],boot_jdk_jvmargs,[$JAVA])
15954
15955  $ECHO "Check if jvm arg is ok: -XX:PermSize=32m" >&5
15956  $ECHO "Command: $JAVA -XX:PermSize=32m -version" >&5
15957  OUTPUT=`$JAVA -XX:PermSize=32m -version 2>&1`
15958  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
15959  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
15960  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15961    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:PermSize=32m"
15962    JVM_ARG_OK=true
15963  else
15964    $ECHO "Arg failed:" >&5
15965    $ECHO "$OUTPUT" >&5
15966    JVM_ARG_OK=false
15967  fi
15968
15969
15970  $ECHO "Check if jvm arg is ok: -XX:MaxPermSize=160m" >&5
15971  $ECHO "Command: $JAVA -XX:MaxPermSize=160m -version" >&5
15972  OUTPUT=`$JAVA -XX:MaxPermSize=160m -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 -XX:MaxPermSize=160m"
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
15985  $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
15986  $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
15987  OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
15988  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
15989  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
15990  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15991    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:ThreadStackSize=$STACK_SIZE"
15992    JVM_ARG_OK=true
15993  else
15994    $ECHO "Arg failed:" >&5
15995    $ECHO "$OUTPUT" >&5
15996    JVM_ARG_OK=false
15997  fi
15998
15999    # Disable special log output when a debug build is used as Boot JDK...
16000
16001  $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
16002  $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
16003  OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
16004  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
16005  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
16006  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
16007    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
16008    JVM_ARG_OK=true
16009  else
16010    $ECHO "Arg failed:" >&5
16011    $ECHO "$OUTPUT" >&5
16012    JVM_ARG_OK=false
16013  fi
16014
16015  fi
16016
16017  BOOT_JDK_JVMARGS=$boot_jdk_jvmargs
16018
16019
16020
16021###############################################################################
16022#
16023# Configure the sources to use. We can add or override individual directories.
16024#
16025###############################################################################
16026
16027
16028  # Where are the sources. Any of these can be overridden
16029  # using --with-override-corba and the likes.
16030  LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
16031  CORBA_TOPDIR="$SRC_ROOT/corba"
16032  JAXP_TOPDIR="$SRC_ROOT/jaxp"
16033  JAXWS_TOPDIR="$SRC_ROOT/jaxws"
16034  HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
16035  NASHORN_TOPDIR="$SRC_ROOT/nashorn"
16036  JDK_TOPDIR="$SRC_ROOT/jdk"
16037
16038
16039
16040
16041
16042
16043
16044
16045
16046
16047  ###############################################################################
16048  #
16049  # Pickup additional source for a component from outside of the source root
16050  # or override source for a component.
16051  #
16052
16053# Check whether --with-add-source-root was given.
16054if test "${with_add_source_root+set}" = set; then :
16055  withval=$with_add_source_root;
16056fi
16057
16058
16059
16060# Check whether --with-override-source-root was given.
16061if test "${with_override_source_root+set}" = set; then :
16062  withval=$with_override_source_root;
16063fi
16064
16065
16066
16067# Check whether --with-adds-and-overrides was given.
16068if test "${with_adds_and_overrides+set}" = set; then :
16069  withval=$with_adds_and_overrides;
16070fi
16071
16072
16073  if test "x$with_adds_and_overrides" != x; then
16074    with_add_source_root="$with_adds_and_overrides/adds"
16075    with_override_source_root="$with_adds_and_overrides/overrides"
16076  fi
16077
16078  if test "x$with_add_source_root" != x; then
16079    if ! test -d $with_add_source_root; then
16080      as_fn_error $? "Trying to use a non-existant add-source-root $with_add_source_root" "$LINENO" 5
16081    fi
16082    CURDIR="$PWD"
16083    cd "$with_add_source_root"
16084    ADD_SRC_ROOT="`pwd`"
16085    cd "$CURDIR"
16086    # Verify that the addon source root does not have any root makefiles.
16087    # If it does, then it is usually an error, prevent this.
16088    if test -f $with_add_source_root/langtools/makefiles/Makefile || \
16089      test -f $with_add_source_root/langtools/make/Makefile; then
16090      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
16091    fi
16092    if test -f $with_add_source_root/corba/makefiles/Makefile || \
16093      test -f $with_add_source_root/corba/make/Makefile; then
16094      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
16095    fi
16096    if test -f $with_add_source_root/jaxp/makefiles/Makefile || \
16097      test -f $with_add_source_root/jaxp/make/Makefile; then
16098      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
16099    fi
16100    if test -f $with_add_source_root/jaxws/makefiles/Makefile || \
16101      test -f $with_add_source_root/jaxws/make/Makefile; then
16102      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
16103    fi
16104    if test -f $with_add_source_root/hotspot/makefiles/Makefile || \
16105      test -f $with_add_source_root/hotspot/make/Makefile; then
16106      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
16107    fi
16108    if test -f $with_add_source_root/nashorn/makefiles/Makefile || \
16109      test -f $with_add_source_root/nashorn/make/Makefile; then
16110      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
16111    fi
16112    if test -f $with_add_source_root/jdk/makefiles/Makefile || \
16113      test -f $with_add_source_root/jdk/make/Makefile; then
16114      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
16115    fi
16116  fi
16117
16118
16119  if test "x$with_override_source_root" != x; then
16120    if ! test -d $with_override_source_root; then
16121      as_fn_error $? "Trying to use a non-existant override-source-root $with_override_source_root" "$LINENO" 5
16122    fi
16123    CURDIR="$PWD"
16124    cd "$with_override_source_root"
16125    OVERRIDE_SRC_ROOT="`pwd`"
16126    cd "$CURDIR"
16127    if test -f $with_override_source_root/langtools/makefiles/Makefile || \
16128      test -f $with_override_source_root/langtools/make/Makefile; then
16129      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
16130    fi
16131    if test -f $with_override_source_root/corba/makefiles/Makefile || \
16132      test -f $with_override_source_root/corba/make/Makefile; then
16133      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
16134    fi
16135    if test -f $with_override_source_root/jaxp/makefiles/Makefile || \
16136      test -f $with_override_source_root/jaxp/make/Makefile; then
16137      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
16138    fi
16139    if test -f $with_override_source_root/jaxws/makefiles/Makefile || \
16140      test -f $with_override_source_root/jaxws/make/Makefile; then
16141      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
16142    fi
16143    if test -f $with_override_source_root/hotspot/makefiles/Makefile || \
16144      test -f $with_override_source_root/hotspot/make/Makefile; then
16145      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
16146    fi
16147    if test -f $with_override_source_root/nashorn/makefiles/Makefile || \
16148      test -f $with_override_source_root/nashorn/make/Makefile; then
16149      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
16150    fi
16151    if test -f $with_override_source_root/jdk/makefiles/Makefile || \
16152      test -f $with_override_source_root/jdk/make/Makefile; then
16153      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
16154    fi
16155  fi
16156
16157
16158  ###############################################################################
16159  #
16160  # Override a repo completely, this is used for example when you have 3 small
16161  # development sandboxes of the langtools sources and want to avoid having 3 full
16162  # OpenJDK sources checked out on disk.
16163  #
16164  # Assuming that the 3 langtools sandboxes are located here:
16165  # /home/fredrik/sandbox1/langtools
16166  # /home/fredrik/sandbox2/langtools
16167  # /home/fredrik/sandbox3/langtools
16168  #
16169  # From the source root you create build subdirs manually:
16170  #     mkdir -p build1 build2 build3
16171  # in each build directory run:
16172  #     (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make)
16173  #     (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make)
16174  #     (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make)
16175  #
16176
16177
16178# Check whether --with-override-langtools was given.
16179if test "${with_override_langtools+set}" = set; then :
16180  withval=$with_override_langtools;
16181fi
16182
16183
16184
16185# Check whether --with-override-corba was given.
16186if test "${with_override_corba+set}" = set; then :
16187  withval=$with_override_corba;
16188fi
16189
16190
16191
16192# Check whether --with-override-jaxp was given.
16193if test "${with_override_jaxp+set}" = set; then :
16194  withval=$with_override_jaxp;
16195fi
16196
16197
16198
16199# Check whether --with-override-jaxws was given.
16200if test "${with_override_jaxws+set}" = set; then :
16201  withval=$with_override_jaxws;
16202fi
16203
16204
16205
16206# Check whether --with-override-hotspot was given.
16207if test "${with_override_hotspot+set}" = set; then :
16208  withval=$with_override_hotspot;
16209fi
16210
16211
16212
16213# Check whether --with-override-nashorn was given.
16214if test "${with_override_nashorn+set}" = set; then :
16215  withval=$with_override_nashorn;
16216fi
16217
16218
16219
16220# Check whether --with-override-jdk was given.
16221if test "${with_override_jdk+set}" = set; then :
16222  withval=$with_override_jdk;
16223fi
16224
16225
16226  if test "x$with_override_langtools" != x; then
16227    CURDIR="$PWD"
16228    cd "$with_override_langtools"
16229    LANGTOOLS_TOPDIR="`pwd`"
16230    cd "$CURDIR"
16231    if ! test -f $LANGTOOLS_TOPDIR/makefiles/Makefile; then
16232      as_fn_error $? "You have to override langtools with a full langtools repo!" "$LINENO" 5
16233    fi
16234    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if langtools should be overridden" >&5
16235$as_echo_n "checking if langtools should be overridden... " >&6; }
16236    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $LANGTOOLS_TOPDIR" >&5
16237$as_echo "yes with $LANGTOOLS_TOPDIR" >&6; }
16238  fi
16239  if test "x$with_override_corba" != x; then
16240    CURDIR="$PWD"
16241    cd "$with_override_corba"
16242    CORBA_TOPDIR="`pwd`"
16243    cd "$CURDIR"
16244    if ! test -f $CORBA_TOPDIR/makefiles/Makefile; then
16245      as_fn_error $? "You have to override corba with a full corba repo!" "$LINENO" 5
16246    fi
16247    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if corba should be overridden" >&5
16248$as_echo_n "checking if corba should be overridden... " >&6; }
16249    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $CORBA_TOPDIR" >&5
16250$as_echo "yes with $CORBA_TOPDIR" >&6; }
16251  fi
16252  if test "x$with_override_jaxp" != x; then
16253    CURDIR="$PWD"
16254    cd "$with_override_jaxp"
16255    JAXP_TOPDIR="`pwd`"
16256    cd "$CURDIR"
16257    if ! test -f $JAXP_TOPDIR/makefiles/Makefile; then
16258      as_fn_error $? "You have to override jaxp with a full jaxp repo!" "$LINENO" 5
16259    fi
16260    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxp should be overridden" >&5
16261$as_echo_n "checking if jaxp should be overridden... " >&6; }
16262    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXP_TOPDIR" >&5
16263$as_echo "yes with $JAXP_TOPDIR" >&6; }
16264  fi
16265  if test "x$with_override_jaxws" != x; then
16266    CURDIR="$PWD"
16267    cd "$with_override_jaxws"
16268    JAXWS_TOPDIR="`pwd`"
16269    cd "$CURDIR"
16270    if ! test -f $JAXWS_TOPDIR/makefiles/Makefile; then
16271      as_fn_error $? "You have to override jaxws with a full jaxws repo!" "$LINENO" 5
16272    fi
16273    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxws should be overridden" >&5
16274$as_echo_n "checking if jaxws should be overridden... " >&6; }
16275    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXWS_TOPDIR" >&5
16276$as_echo "yes with $JAXWS_TOPDIR" >&6; }
16277  fi
16278  if test "x$with_override_hotspot" != x; then
16279    CURDIR="$PWD"
16280    cd "$with_override_hotspot"
16281    HOTSPOT_TOPDIR="`pwd`"
16282    cd "$CURDIR"
16283    if ! test -f $HOTSPOT_TOPDIR/make/Makefile && \
16284        ! test -f $HOTSPOT_TOPDIR/makefiles/Makefile; then
16285      as_fn_error $? "You have to override hotspot with a full hotspot repo!" "$LINENO" 5
16286    fi
16287    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be overridden" >&5
16288$as_echo_n "checking if hotspot should be overridden... " >&6; }
16289    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $HOTSPOT_TOPDIR" >&5
16290$as_echo "yes with $HOTSPOT_TOPDIR" >&6; }
16291  fi
16292  if test "x$with_override_nashorn" != x; then
16293    CURDIR="$PWD"
16294    cd "$with_override_nashorn"
16295    NASHORN_TOPDIR="`pwd`"
16296    cd "$CURDIR"
16297    if ! test -f $NASHORN_TOPDIR/makefiles/Makefile; then
16298      as_fn_error $? "You have to override nashorn with a full nashorn repo!" "$LINENO" 5
16299    fi
16300    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if nashorn should be overridden" >&5
16301$as_echo_n "checking if nashorn should be overridden... " >&6; }
16302    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $NASHORN_TOPDIR" >&5
16303$as_echo "yes with $NASHORN_TOPDIR" >&6; }
16304  fi
16305  if test "x$with_override_jdk" != x; then
16306    CURDIR="$PWD"
16307    cd "$with_override_jdk"
16308    JDK_TOPDIR="`pwd`"
16309    cd "$CURDIR"
16310    if ! test -f $JDK_TOPDIR/makefiles/Makefile; then
16311      as_fn_error $? "You have to override JDK with a full JDK repo!" "$LINENO" 5
16312    fi
16313    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if JDK should be overridden" >&5
16314$as_echo_n "checking if JDK should be overridden... " >&6; }
16315    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JDK_TOPDIR" >&5
16316$as_echo "yes with $JDK_TOPDIR" >&6; }
16317  fi
16318
16319
16320  BUILD_OUTPUT="$OUTPUT_ROOT"
16321
16322
16323  HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
16324  BUILD_HOTSPOT=true
16325
16326
16327
16328# Check whether --with-import-hotspot was given.
16329if test "${with_import_hotspot+set}" = set; then :
16330  withval=$with_import_hotspot;
16331fi
16332
16333  if test "x$with_import_hotspot" != x; then
16334    CURDIR="$PWD"
16335    cd "$with_import_hotspot"
16336    HOTSPOT_DIST="`pwd`"
16337    cd "$CURDIR"
16338    if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
16339      as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
16340    fi
16341    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
16342$as_echo_n "checking if hotspot should be imported... " >&6; }
16343    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
16344$as_echo "yes from $HOTSPOT_DIST" >&6; }
16345    BUILD_HOTSPOT=false
16346  fi
16347
16348  JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
16349
16350
16351###############################################################################
16352#
16353# Setup the toolchain (compilers etc), i.e. the tools that need to be
16354# cross-compilation aware.
16355#
16356###############################################################################
16357
16358
16359  ###############################################################################
16360  #
16361  # Configure the development tool paths and potential sysroot.
16362  #
16363  ac_ext=cpp
16364ac_cpp='$CXXCPP $CPPFLAGS'
16365ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16366ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16367ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16368
16369
16370  # The option used to specify the target .o,.a or .so file.
16371  # When compiling, how to specify the to be created object file.
16372  CC_OUT_OPTION='-o$(SPACE)'
16373  # When linking, how to specify the to be created executable.
16374  EXE_OUT_OPTION='-o$(SPACE)'
16375  # When linking, how to specify the to be created dynamically linkable library.
16376  LD_OUT_OPTION='-o$(SPACE)'
16377  # When archiving, how to specify the to be create static archive for object files.
16378  AR_OUT_OPTION='rcs$(SPACE)'
16379
16380
16381
16382
16383
16384# Locate the actual tools
16385
16386
16387# Check whether --with-jtreg was given.
16388if test "${with_jtreg+set}" = set; then :
16389  withval=$with_jtreg;
16390else
16391  with_jtreg=no
16392fi
16393
16394
16395  if test "x$with_jtreg" = xno; then
16396    # jtreg disabled
16397    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
16398$as_echo_n "checking for jtreg... " >&6; }
16399    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16400$as_echo "no" >&6; }
16401  else
16402    if test "x$with_jtreg" != xyes; then
16403      # with path specified.
16404      JT_HOME="$with_jtreg"
16405    fi
16406
16407    if test "x$JT_HOME" != x; then
16408      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
16409$as_echo_n "checking for jtreg... " >&6; }
16410
16411      # use JT_HOME enviroment var.
16412
16413  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16414
16415  # Input might be given as Windows format, start by converting to
16416  # unix format.
16417  path="$JT_HOME"
16418  new_path=`$CYGPATH -u "$path"`
16419
16420  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16421  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16422  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16423  # "foo.exe" is OK but "foo" is an error.
16424  #
16425  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16426  # It is also a way to make sure we got the proper file name for the real test later on.
16427  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16428  if test "x$test_shortpath" = x; then
16429    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
16430$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
16431    as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
16432  fi
16433
16434  # Call helper function which possibly converts this using DOS-style short mode.
16435  # If so, the updated path is stored in $new_path.
16436
16437  input_path="$new_path"
16438  # Check if we need to convert this using DOS-style short mode. If the path
16439  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16440  # take no chances and rewrite it.
16441  # Note: m4 eats our [], so we need to use [ and ] instead.
16442  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16443  if test "x$has_forbidden_chars" != x; then
16444    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16445    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16446    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16447    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16448      # Going to short mode and back again did indeed matter. Since short mode is
16449      # case insensitive, let's make it lowercase to improve readability.
16450      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16451      # Now convert it back to Unix-stile (cygpath)
16452      input_path=`$CYGPATH -u "$shortmode_path"`
16453      new_path="$input_path"
16454    fi
16455  fi
16456
16457  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16458  if test "x$test_cygdrive_prefix" = x; then
16459    # As a simple fix, exclude /usr/bin since it's not a real path.
16460    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16461      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16462      # a path prefixed by /cygdrive for fixpath to work.
16463      new_path="$CYGWIN_ROOT_PATH$input_path"
16464    fi
16465  fi
16466
16467
16468  if test "x$path" != "x$new_path"; then
16469    JT_HOME="$new_path"
16470    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
16471$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
16472  fi
16473
16474  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16475
16476  path="$JT_HOME"
16477  has_colon=`$ECHO $path | $GREP ^.:`
16478  new_path="$path"
16479  if test "x$has_colon" = x; then
16480    # Not in mixed or Windows style, start by that.
16481    new_path=`cmd //c echo $path`
16482  fi
16483
16484
16485  input_path="$new_path"
16486  # Check if we need to convert this using DOS-style short mode. If the path
16487  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16488  # take no chances and rewrite it.
16489  # Note: m4 eats our [], so we need to use [ and ] instead.
16490  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16491  if test "x$has_forbidden_chars" != x; then
16492    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16493    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16494  fi
16495
16496
16497  windows_path="$new_path"
16498  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16499    unix_path=`$CYGPATH -u "$windows_path"`
16500    new_path="$unix_path"
16501  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16502    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16503    new_path="$unix_path"
16504  fi
16505
16506  if test "x$path" != "x$new_path"; then
16507    JT_HOME="$new_path"
16508    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
16509$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
16510  fi
16511
16512  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16513  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16514
16515  else
16516    # We're on a posix platform. Hooray! :)
16517    path="$JT_HOME"
16518    has_space=`$ECHO "$path" | $GREP " "`
16519    if test "x$has_space" != x; then
16520      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
16521$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
16522      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16523    fi
16524
16525    # Use eval to expand a potential ~
16526    eval path="$path"
16527    if test ! -f "$path" && test ! -d "$path"; then
16528      as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
16529    fi
16530
16531    JT_HOME="`cd "$path"; $THEPWDCMD -L`"
16532  fi
16533
16534
16535      # jtreg win32 script works for everybody
16536      JTREGEXE="$JT_HOME/win32/bin/jtreg"
16537
16538      if test ! -f "$JTREGEXE"; then
16539        as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
16540      fi
16541
16542      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
16543$as_echo "$JTREGEXE" >&6; }
16544    else
16545      # try to find jtreg on path
16546
16547  for ac_prog in jtreg
16548do
16549  # Extract the first word of "$ac_prog", so it can be a program name with args.
16550set dummy $ac_prog; ac_word=$2
16551{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16552$as_echo_n "checking for $ac_word... " >&6; }
16553if ${ac_cv_path_JTREGEXE+:} false; then :
16554  $as_echo_n "(cached) " >&6
16555else
16556  case $JTREGEXE in
16557  [\\/]* | ?:[\\/]*)
16558  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
16559  ;;
16560  *)
16561  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16562for as_dir in $PATH
16563do
16564  IFS=$as_save_IFS
16565  test -z "$as_dir" && as_dir=.
16566    for ac_exec_ext in '' $ac_executable_extensions; do
16567  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16568    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
16569    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16570    break 2
16571  fi
16572done
16573  done
16574IFS=$as_save_IFS
16575
16576  ;;
16577esac
16578fi
16579JTREGEXE=$ac_cv_path_JTREGEXE
16580if test -n "$JTREGEXE"; then
16581  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
16582$as_echo "$JTREGEXE" >&6; }
16583else
16584  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16585$as_echo "no" >&6; }
16586fi
16587
16588
16589  test -n "$JTREGEXE" && break
16590done
16591
16592
16593  if test "x$JTREGEXE" = x; then
16594    if test "xjtreg" = x; then
16595      PROG_NAME=jtregexe
16596    else
16597      PROG_NAME=jtreg
16598    fi
16599    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
16600$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
16601    as_fn_error $? "Cannot continue" "$LINENO" 5
16602  fi
16603
16604
16605      JT_HOME="`$DIRNAME $JTREGEXE`"
16606    fi
16607  fi
16608
16609
16610
16611
16612
16613  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
16614
16615  # Store path to cygwin link.exe to help excluding it when searching for
16616  # VS linker. This must be done before changing the PATH when looking for VS.
16617  # Extract the first word of "link", so it can be a program name with args.
16618set dummy link; ac_word=$2
16619{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16620$as_echo_n "checking for $ac_word... " >&6; }
16621if ${ac_cv_path_CYGWIN_LINK+:} false; then :
16622  $as_echo_n "(cached) " >&6
16623else
16624  case $CYGWIN_LINK in
16625  [\\/]* | ?:[\\/]*)
16626  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
16627  ;;
16628  *)
16629  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16630for as_dir in $PATH
16631do
16632  IFS=$as_save_IFS
16633  test -z "$as_dir" && as_dir=.
16634    for ac_exec_ext in '' $ac_executable_extensions; do
16635  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16636    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
16637    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16638    break 2
16639  fi
16640done
16641  done
16642IFS=$as_save_IFS
16643
16644  ;;
16645esac
16646fi
16647CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
16648if test -n "$CYGWIN_LINK"; then
16649  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
16650$as_echo "$CYGWIN_LINK" >&6; }
16651else
16652  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16653$as_echo "no" >&6; }
16654fi
16655
16656
16657  if test "x$CYGWIN_LINK" != x; then
16658    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
16659$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
16660    "$CYGWIN_LINK" --version > /dev/null
16661    if test $? -eq 0 ; then
16662      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16663$as_echo "yes" >&6; }
16664    else
16665      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16666$as_echo "no" >&6; }
16667      # This might be the VS linker. Don't exclude it later on.
16668      CYGWIN_LINK=""
16669    fi
16670  fi
16671
16672  # First-hand choice is to locate and run the vsvars bat file.
16673
16674  if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16675    VCVARSFILE="vc/bin/vcvars32.bat"
16676  else
16677    VCVARSFILE="vc/bin/amd64/vcvars64.bat"
16678  fi
16679
16680  VS_ENV_CMD=""
16681  VS_ENV_ARGS=""
16682  if test "x$with_toolsdir" != x; then
16683
16684  if test "x$VS_ENV_CMD" = x; then
16685    VS100BASE="$with_toolsdir/../.."
16686    METHOD="--with-tools-dir"
16687
16688  windows_path="$VS100BASE"
16689  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16690    unix_path=`$CYGPATH -u "$windows_path"`
16691    VS100BASE="$unix_path"
16692  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16693    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16694    VS100BASE="$unix_path"
16695  fi
16696
16697    if test -d "$VS100BASE"; then
16698      if test -f "$VS100BASE/$VCVARSFILE"; then
16699        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16700$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16701        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16702      else
16703        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16704$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16705        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16706$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16707      fi
16708    fi
16709  fi
16710
16711  fi
16712
16713  if test "x$with_toolsdir" != x && test "x$VS_ENV_CMD" = x; then
16714    # Having specified an argument which is incorrect will produce an instant failure;
16715    # we should not go on looking
16716    { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&5
16717$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&6;}
16718    { $as_echo "$as_me:${as_lineno-$LINENO}: Please point to the VC/bin directory within the Visual Studio installation" >&5
16719$as_echo "$as_me: Please point to the VC/bin directory within the Visual Studio installation" >&6;}
16720    as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
16721  fi
16722
16723  if test "x$VS100COMNTOOLS" != x; then
16724
16725  if test "x$VS_ENV_CMD" = x; then
16726    VS100BASE="$VS100COMNTOOLS/../.."
16727    METHOD="VS100COMNTOOLS variable"
16728
16729  windows_path="$VS100BASE"
16730  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16731    unix_path=`$CYGPATH -u "$windows_path"`
16732    VS100BASE="$unix_path"
16733  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16734    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16735    VS100BASE="$unix_path"
16736  fi
16737
16738    if test -d "$VS100BASE"; then
16739      if test -f "$VS100BASE/$VCVARSFILE"; then
16740        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16741$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16742        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16743      else
16744        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16745$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16746        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16747$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16748      fi
16749    fi
16750  fi
16751
16752  fi
16753  if test "x$PROGRAMFILES" != x; then
16754
16755  if test "x$VS_ENV_CMD" = x; then
16756    VS100BASE="$PROGRAMFILES/Microsoft Visual Studio 10.0"
16757    METHOD="well-known name"
16758
16759  windows_path="$VS100BASE"
16760  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16761    unix_path=`$CYGPATH -u "$windows_path"`
16762    VS100BASE="$unix_path"
16763  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16764    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16765    VS100BASE="$unix_path"
16766  fi
16767
16768    if test -d "$VS100BASE"; then
16769      if test -f "$VS100BASE/$VCVARSFILE"; then
16770        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16771$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16772        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16773      else
16774        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16775$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16776        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16777$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16778      fi
16779    fi
16780  fi
16781
16782  fi
16783
16784  if test "x$VS_ENV_CMD" = x; then
16785    VS100BASE="C:/Program Files/Microsoft Visual Studio 10.0"
16786    METHOD="well-known name"
16787
16788  windows_path="$VS100BASE"
16789  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16790    unix_path=`$CYGPATH -u "$windows_path"`
16791    VS100BASE="$unix_path"
16792  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16793    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16794    VS100BASE="$unix_path"
16795  fi
16796
16797    if test -d "$VS100BASE"; then
16798      if test -f "$VS100BASE/$VCVARSFILE"; then
16799        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16800$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16801        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16802      else
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        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16806$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16807      fi
16808    fi
16809  fi
16810
16811
16812  if test "x$VS_ENV_CMD" = x; then
16813    VS100BASE="C:/Program Files (x86)/Microsoft Visual Studio 10.0"
16814    METHOD="well-known name"
16815
16816  windows_path="$VS100BASE"
16817  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16818    unix_path=`$CYGPATH -u "$windows_path"`
16819    VS100BASE="$unix_path"
16820  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16821    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16822    VS100BASE="$unix_path"
16823  fi
16824
16825    if test -d "$VS100BASE"; then
16826      if test -f "$VS100BASE/$VCVARSFILE"; then
16827        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16828$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16829        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16830      else
16831        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16832$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16833        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16834$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16835      fi
16836    fi
16837  fi
16838
16839
16840  if test "x$ProgramW6432" != x; then
16841
16842  if test "x$VS_ENV_CMD" = x; then
16843    WIN_SDK_BASE="$ProgramW6432/Microsoft SDKs/Windows/v7.1/Bin"
16844    METHOD="well-known name"
16845
16846  windows_path="$WIN_SDK_BASE"
16847  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16848    unix_path=`$CYGPATH -u "$windows_path"`
16849    WIN_SDK_BASE="$unix_path"
16850  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16851    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16852    WIN_SDK_BASE="$unix_path"
16853  fi
16854
16855    if test -d "$WIN_SDK_BASE"; then
16856      # There have been cases of partial or broken SDK installations. A missing
16857      # lib dir is not going to work.
16858      if test ! -d "$WIN_SDK_BASE/../lib"; then
16859        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16860$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16861        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16862$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16863      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16864        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16865$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16866        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16867        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16868          VS_ENV_ARGS="/x86"
16869        else
16870          VS_ENV_ARGS="/x64"
16871        fi
16872      else
16873        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16874$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16875        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16876$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16877      fi
16878    fi
16879  fi
16880
16881  fi
16882  if test "x$PROGRAMW6432" != x; then
16883
16884  if test "x$VS_ENV_CMD" = x; then
16885    WIN_SDK_BASE="$PROGRAMW6432/Microsoft SDKs/Windows/v7.1/Bin"
16886    METHOD="well-known name"
16887
16888  windows_path="$WIN_SDK_BASE"
16889  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16890    unix_path=`$CYGPATH -u "$windows_path"`
16891    WIN_SDK_BASE="$unix_path"
16892  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16893    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16894    WIN_SDK_BASE="$unix_path"
16895  fi
16896
16897    if test -d "$WIN_SDK_BASE"; then
16898      # There have been cases of partial or broken SDK installations. A missing
16899      # lib dir is not going to work.
16900      if test ! -d "$WIN_SDK_BASE/../lib"; then
16901        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16902$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16903        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16904$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16905      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
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        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16909        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16910          VS_ENV_ARGS="/x86"
16911        else
16912          VS_ENV_ARGS="/x64"
16913        fi
16914      else
16915        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16916$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16917        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16918$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16919      fi
16920    fi
16921  fi
16922
16923  fi
16924  if test "x$PROGRAMFILES" != x; then
16925
16926  if test "x$VS_ENV_CMD" = x; then
16927    WIN_SDK_BASE="$PROGRAMFILES/Microsoft SDKs/Windows/v7.1/Bin"
16928    METHOD="well-known name"
16929
16930  windows_path="$WIN_SDK_BASE"
16931  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16932    unix_path=`$CYGPATH -u "$windows_path"`
16933    WIN_SDK_BASE="$unix_path"
16934  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16935    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16936    WIN_SDK_BASE="$unix_path"
16937  fi
16938
16939    if test -d "$WIN_SDK_BASE"; then
16940      # There have been cases of partial or broken SDK installations. A missing
16941      # lib dir is not going to work.
16942      if test ! -d "$WIN_SDK_BASE/../lib"; then
16943        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16944$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16945        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16946$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16947      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
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        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16951        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16952          VS_ENV_ARGS="/x86"
16953        else
16954          VS_ENV_ARGS="/x64"
16955        fi
16956      else
16957        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16958$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16959        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16960$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16961      fi
16962    fi
16963  fi
16964
16965  fi
16966
16967  if test "x$VS_ENV_CMD" = x; then
16968    WIN_SDK_BASE="C:/Program Files/Microsoft SDKs/Windows/v7.1/Bin"
16969    METHOD="well-known name"
16970
16971  windows_path="$WIN_SDK_BASE"
16972  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16973    unix_path=`$CYGPATH -u "$windows_path"`
16974    WIN_SDK_BASE="$unix_path"
16975  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16976    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16977    WIN_SDK_BASE="$unix_path"
16978  fi
16979
16980    if test -d "$WIN_SDK_BASE"; then
16981      # There have been cases of partial or broken SDK installations. A missing
16982      # lib dir is not going to work.
16983      if test ! -d "$WIN_SDK_BASE/../lib"; then
16984        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16985$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16986        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16987$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16988      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16989        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16990$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16991        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16992        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16993          VS_ENV_ARGS="/x86"
16994        else
16995          VS_ENV_ARGS="/x64"
16996        fi
16997      else
16998        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16999$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17000        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
17001$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
17002      fi
17003    fi
17004  fi
17005
17006
17007  if test "x$VS_ENV_CMD" = x; then
17008    WIN_SDK_BASE="C:/Program Files (x86)/Microsoft SDKs/Windows/v7.1/Bin"
17009    METHOD="well-known name"
17010
17011  windows_path="$WIN_SDK_BASE"
17012  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17013    unix_path=`$CYGPATH -u "$windows_path"`
17014    WIN_SDK_BASE="$unix_path"
17015  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17016    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17017    WIN_SDK_BASE="$unix_path"
17018  fi
17019
17020    if test -d "$WIN_SDK_BASE"; then
17021      # There have been cases of partial or broken SDK installations. A missing
17022      # lib dir is not going to work.
17023      if test ! -d "$WIN_SDK_BASE/../lib"; then
17024        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17025$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17026        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
17027$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
17028      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
17029        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17030$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17031        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
17032        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17033          VS_ENV_ARGS="/x86"
17034        else
17035          VS_ENV_ARGS="/x64"
17036        fi
17037      else
17038        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17039$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17040        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
17041$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
17042      fi
17043    fi
17044  fi
17045
17046
17047  if test "x$VS_ENV_CMD" != x; then
17048    # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
17049
17050  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17051
17052  # First separate the path from the arguments. This will split at the first
17053  # space.
17054  complete="$VS_ENV_CMD"
17055  path="${complete%% *}"
17056  tmp="$complete EOL"
17057  arguments="${tmp#* }"
17058
17059  # Input might be given as Windows format, start by converting to
17060  # unix format.
17061  new_path=`$CYGPATH -u "$path"`
17062
17063  # Now try to locate executable using which
17064  new_path=`$WHICH "$new_path" 2> /dev/null`
17065  # bat and cmd files are not always considered executable in cygwin causing which
17066  # to not find them
17067  if test "x$new_path" = x \
17068      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17069      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17070    new_path=`$CYGPATH -u "$path"`
17071  fi
17072  if test "x$new_path" = x; then
17073    # Oops. Which didn't find the executable.
17074    # The splitting of arguments from the executable at a space might have been incorrect,
17075    # since paths with space are more likely in Windows. Give it another try with the whole
17076    # argument.
17077    path="$complete"
17078    arguments="EOL"
17079    new_path=`$CYGPATH -u "$path"`
17080    new_path=`$WHICH "$new_path" 2> /dev/null`
17081    # bat and cmd files are not always considered executable in cygwin causing which
17082    # to not find them
17083    if test "x$new_path" = x \
17084        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17085        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17086      new_path=`$CYGPATH -u "$path"`
17087    fi
17088    if test "x$new_path" = x; then
17089      # It's still not found. Now this is an unrecoverable error.
17090      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
17091$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
17092      has_space=`$ECHO "$complete" | $GREP " "`
17093      if test "x$has_space" != x; then
17094        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17095$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17096      fi
17097      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
17098    fi
17099  fi
17100
17101  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17102  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17103  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17104  # "foo.exe" is OK but "foo" is an error.
17105  #
17106  # This test is therefore slightly more accurate than "test -f" to check for file presence.
17107  # It is also a way to make sure we got the proper file name for the real test later on.
17108  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17109  if test "x$test_shortpath" = x; then
17110    # Short path failed, file does not exist as specified.
17111    # Try adding .exe or .cmd
17112    if test -f "${new_path}.exe"; then
17113      input_to_shortpath="${new_path}.exe"
17114    elif test -f "${new_path}.cmd"; then
17115      input_to_shortpath="${new_path}.cmd"
17116    else
17117      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
17118$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
17119      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17120$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17121      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
17122    fi
17123  else
17124    input_to_shortpath="$new_path"
17125  fi
17126
17127  # Call helper function which possibly converts this using DOS-style short mode.
17128  # If so, the updated path is stored in $new_path.
17129  new_path="$input_to_shortpath"
17130
17131  input_path="$input_to_shortpath"
17132  # Check if we need to convert this using DOS-style short mode. If the path
17133  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17134  # take no chances and rewrite it.
17135  # Note: m4 eats our [], so we need to use [ and ] instead.
17136  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17137  if test "x$has_forbidden_chars" != x; then
17138    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17139    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17140    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17141    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17142      # Going to short mode and back again did indeed matter. Since short mode is
17143      # case insensitive, let's make it lowercase to improve readability.
17144      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17145      # Now convert it back to Unix-stile (cygpath)
17146      input_path=`$CYGPATH -u "$shortmode_path"`
17147      new_path="$input_path"
17148    fi
17149  fi
17150
17151  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17152  if test "x$test_cygdrive_prefix" = x; then
17153    # As a simple fix, exclude /usr/bin since it's not a real path.
17154    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17155      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17156      # a path prefixed by /cygdrive for fixpath to work.
17157      new_path="$CYGWIN_ROOT_PATH$input_path"
17158    fi
17159  fi
17160
17161  # remove trailing .exe if any
17162  new_path="${new_path/%.exe/}"
17163
17164  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17165
17166  # First separate the path from the arguments. This will split at the first
17167  # space.
17168  complete="$VS_ENV_CMD"
17169  path="${complete%% *}"
17170  tmp="$complete EOL"
17171  arguments="${tmp#* }"
17172
17173  # Input might be given as Windows format, start by converting to
17174  # unix format.
17175  new_path="$path"
17176
17177  windows_path="$new_path"
17178  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17179    unix_path=`$CYGPATH -u "$windows_path"`
17180    new_path="$unix_path"
17181  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17182    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17183    new_path="$unix_path"
17184  fi
17185
17186
17187  # Now try to locate executable using which
17188  new_path=`$WHICH "$new_path" 2> /dev/null`
17189
17190  if test "x$new_path" = x; then
17191    # Oops. Which didn't find the executable.
17192    # The splitting of arguments from the executable at a space might have been incorrect,
17193    # since paths with space are more likely in Windows. Give it another try with the whole
17194    # argument.
17195    path="$complete"
17196    arguments="EOL"
17197    new_path="$path"
17198
17199  windows_path="$new_path"
17200  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17201    unix_path=`$CYGPATH -u "$windows_path"`
17202    new_path="$unix_path"
17203  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17204    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17205    new_path="$unix_path"
17206  fi
17207
17208
17209    new_path=`$WHICH "$new_path" 2> /dev/null`
17210
17211    if test "x$new_path" = x; then
17212      # It's still not found. Now this is an unrecoverable error.
17213      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
17214$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
17215      has_space=`$ECHO "$complete" | $GREP " "`
17216      if test "x$has_space" != x; then
17217        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17218$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17219      fi
17220      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
17221    fi
17222  fi
17223
17224  # Now new_path has a complete unix path to the binary
17225  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17226    # Keep paths in /bin as-is, but remove trailing .exe if any
17227    new_path="${new_path/%.exe/}"
17228    # Do not save /bin paths to all_fixpath_prefixes!
17229  else
17230    # Not in mixed or Windows style, start by that.
17231    new_path=`cmd //c echo $new_path`
17232
17233  input_path="$new_path"
17234  # Check if we need to convert this using DOS-style short mode. If the path
17235  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17236  # take no chances and rewrite it.
17237  # Note: m4 eats our [], so we need to use [ and ] instead.
17238  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17239  if test "x$has_forbidden_chars" != x; then
17240    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17241    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17242  fi
17243
17244    # Output is in $new_path
17245
17246  windows_path="$new_path"
17247  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17248    unix_path=`$CYGPATH -u "$windows_path"`
17249    new_path="$unix_path"
17250  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17251    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17252    new_path="$unix_path"
17253  fi
17254
17255    # remove trailing .exe if any
17256    new_path="${new_path/%.exe/}"
17257
17258    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17259    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17260  fi
17261
17262  else
17263    # We're on a posix platform. Hooray! :)
17264    # First separate the path from the arguments. This will split at the first
17265    # space.
17266    complete="$VS_ENV_CMD"
17267    path="${complete%% *}"
17268    tmp="$complete EOL"
17269    arguments="${tmp#* }"
17270
17271    # Cannot rely on the command "which" here since it doesn't always work.
17272    is_absolute_path=`$ECHO "$path" | $GREP ^/`
17273    if test -z "$is_absolute_path"; then
17274      # Path to executable is not absolute. Find it.
17275      IFS_save="$IFS"
17276      IFS=:
17277      for p in $PATH; do
17278        if test -f "$p/$path" && test -x "$p/$path"; then
17279          new_path="$p/$path"
17280          break
17281        fi
17282      done
17283      IFS="$IFS_save"
17284    else
17285      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&5
17286$as_echo "$as_me: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&6;}
17287      new_path="$path"
17288    fi
17289
17290    if test "x$new_path" = x; then
17291      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
17292$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
17293      has_space=`$ECHO "$complete" | $GREP " "`
17294      if test "x$has_space" != x; then
17295        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17296$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17297      fi
17298      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
17299    fi
17300  fi
17301
17302  # Now join together the path and the arguments once again
17303  if test "x$arguments" != xEOL; then
17304    new_complete="$new_path ${arguments% *}"
17305  else
17306    new_complete="$new_path"
17307  fi
17308
17309  if test "x$complete" != "x$new_complete"; then
17310    VS_ENV_CMD="$new_complete"
17311    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
17312$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
17313  fi
17314
17315
17316    # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
17317    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
17318$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
17319    cd $OUTPUT_ROOT
17320    # FIXME: The code betweeen ---- was inlined from a separate script and is not properly adapted
17321    # to autoconf standards.
17322
17323    #----
17324
17325    # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment)
17326    # but calculate the difference in Cygwin environment before/after running it and then
17327    # apply the diff.
17328
17329    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
17330      _vs10varsall=`cygpath -a -m -s "$VS_ENV_CMD"`
17331      _dosvs10varsall=`cygpath -a -w -s $_vs10varsall`
17332      _dosbash=`cygpath -a -w -s \`which bash\`.*`
17333    else
17334      _dosvs10varsall=`cmd //c echo $VS_ENV_CMD`
17335      _dosbash=`cmd //c echo \`which bash\``
17336    fi
17337
17338    # generate the set of exported vars before/after the vs10 setup
17339    $ECHO "@echo off"                                           >  localdevenvtmp.bat
17340    $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export0" >> localdevenvtmp.bat
17341    $ECHO "call $_dosvs10varsall $VS_ENV_ARGS"                  >> localdevenvtmp.bat
17342    $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export1" >> localdevenvtmp.bat
17343
17344    # Now execute the newly created bat file.
17345    # The | cat is to stop SetEnv.Cmd to mess with system colors on msys
17346    cmd /c localdevenvtmp.bat | cat
17347
17348    # apply the diff (less some non-vs10 vars named by "!")
17349    $SORT localdevenvtmp.export0 | $GREP -v "!" > localdevenvtmp.export0.sort
17350    $SORT localdevenvtmp.export1 | $GREP -v "!" > localdevenvtmp.export1.sort
17351    $COMM -1 -3 localdevenvtmp.export0.sort localdevenvtmp.export1.sort > localdevenv.sh
17352
17353    # cleanup
17354    $RM localdevenvtmp*
17355    #----
17356    cd $CURDIR
17357    if test ! -s $OUTPUT_ROOT/localdevenv.sh; then
17358      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17359$as_echo "no" >&6; }
17360      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
17361$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
17362      { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
17363$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
17364      { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
17365$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
17366      as_fn_error $? "Cannot continue" "$LINENO" 5
17367    fi
17368
17369    # Now set all paths and other env variables. This will allow the rest of
17370    # the configure script to find and run the compiler in the proper way.
17371    { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
17372$as_echo "$as_me: Setting extracted environment variables" >&6;}
17373    . $OUTPUT_ROOT/localdevenv.sh
17374  else
17375    # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
17376    { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
17377$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
17378  fi
17379
17380  # At this point, we should have corrent variables in the environment, or we can't continue.
17381  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
17382$as_echo_n "checking for Visual Studio variables... " >&6; }
17383
17384  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x || test "x$WINDOWSSDKDIR" != x; then
17385    if test "x$INCLUDE" = x || test "x$LIB" = x; then
17386      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
17387$as_echo "present but broken" >&6; }
17388      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
17389    else
17390      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
17391$as_echo "ok" >&6; }
17392      # Remove any trailing \ from INCLUDE and LIB to avoid trouble in spec.gmk.
17393      VS_INCLUDE=`$ECHO "$INCLUDE" | $SED 's/\\\\$//'`
17394      VS_LIB=`$ECHO "$LIB" | $SED 's/\\\\$//'`
17395      # Remove any paths containing # (typically F#) as that messes up make
17396      PATH=`$ECHO "$PATH" | $SED 's/[^:#]*#[^:]*://g'`
17397      VS_PATH="$PATH"
17398
17399
17400
17401    fi
17402  else
17403    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17404$as_echo "not found" >&6; }
17405
17406    if test "x$VS_ENV_CMD" = x; then
17407      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
17408$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
17409      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
17410$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
17411    else
17412      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
17413$as_echo "$as_me: Running the extraction script failed." >&6;}
17414    fi
17415    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
17416$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
17417    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
17418$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
17419    as_fn_error $? "Cannot continue" "$LINENO" 5
17420  fi
17421
17422
17423
17424# Check whether --with-msvcr-dll was given.
17425if test "${with_msvcr_dll+set}" = set; then :
17426  withval=$with_msvcr_dll;
17427fi
17428
17429
17430  if test "x$with_msvcr_dll" != x; then
17431    # If given explicitely by user, do not probe. If not present, fail directly.
17432
17433  POSSIBLE_MSVCR_DLL="$with_msvcr_dll"
17434  METHOD="--with-msvcr-dll"
17435  if test -e "$POSSIBLE_MSVCR_DLL"; then
17436    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
17437$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
17438
17439    # Need to check if the found msvcr is correct architecture
17440    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
17441$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
17442    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
17443    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17444      CORRECT_MSVCR_ARCH=386
17445    else
17446      CORRECT_MSVCR_ARCH=x86-64
17447    fi
17448    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
17449      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
17450$as_echo "ok" >&6; }
17451      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17452      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
17453$as_echo_n "checking for msvcr100.dll... " >&6; }
17454      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
17455$as_echo "$MSVCR_DLL" >&6; }
17456    else
17457      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
17458$as_echo "incorrect, ignoring" >&6; }
17459      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
17460$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
17461    fi
17462  fi
17463
17464    if test "x$MSVCR_DLL" = x; then
17465      as_fn_error $? "Could not find a proper msvcr100.dll as specified by --with-msvcr-dll" "$LINENO" 5
17466    fi
17467  fi
17468
17469  if test "x$MSVCR_DLL" = x; then
17470    # Probe: Using well-known location from Visual Studio 10.0
17471    if test "x$VCINSTALLDIR" != x; then
17472      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
17473
17474  windows_path="$CYGWIN_VC_INSTALL_DIR"
17475  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17476    unix_path=`$CYGPATH -u "$windows_path"`
17477    CYGWIN_VC_INSTALL_DIR="$unix_path"
17478  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17479    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17480    CYGWIN_VC_INSTALL_DIR="$unix_path"
17481  fi
17482
17483      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
17484        POSSIBLE_MSVCR_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC100.CRT/msvcr100.dll"
17485      else
17486        POSSIBLE_MSVCR_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC100.CRT/msvcr100.dll"
17487      fi
17488
17489  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17490  METHOD="well-known location in VCINSTALLDIR"
17491  if test -e "$POSSIBLE_MSVCR_DLL"; then
17492    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
17493$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
17494
17495    # Need to check if the found msvcr is correct architecture
17496    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
17497$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
17498    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
17499    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17500      CORRECT_MSVCR_ARCH=386
17501    else
17502      CORRECT_MSVCR_ARCH=x86-64
17503    fi
17504    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
17505      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
17506$as_echo "ok" >&6; }
17507      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17508      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
17509$as_echo_n "checking for msvcr100.dll... " >&6; }
17510      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
17511$as_echo "$MSVCR_DLL" >&6; }
17512    else
17513      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
17514$as_echo "incorrect, ignoring" >&6; }
17515      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
17516$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
17517    fi
17518  fi
17519
17520    fi
17521  fi
17522
17523  if test "x$MSVCR_DLL" = x; then
17524    # Probe: Check in the Boot JDK directory.
17525    POSSIBLE_MSVCR_DLL="$BOOT_JDK/bin/msvcr100.dll"
17526
17527  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17528  METHOD="well-known location in Boot JDK"
17529  if test -e "$POSSIBLE_MSVCR_DLL"; then
17530    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
17531$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
17532
17533    # Need to check if the found msvcr is correct architecture
17534    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
17535$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
17536    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
17537    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17538      CORRECT_MSVCR_ARCH=386
17539    else
17540      CORRECT_MSVCR_ARCH=x86-64
17541    fi
17542    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
17543      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
17544$as_echo "ok" >&6; }
17545      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17546      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
17547$as_echo_n "checking for msvcr100.dll... " >&6; }
17548      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
17549$as_echo "$MSVCR_DLL" >&6; }
17550    else
17551      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
17552$as_echo "incorrect, ignoring" >&6; }
17553      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
17554$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
17555    fi
17556  fi
17557
17558  fi
17559
17560  if test "x$MSVCR_DLL" = x; then
17561    # Probe: Look in the Windows system32 directory
17562    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
17563
17564  windows_path="$CYGWIN_SYSTEMROOT"
17565  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17566    unix_path=`$CYGPATH -u "$windows_path"`
17567    CYGWIN_SYSTEMROOT="$unix_path"
17568  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17569    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17570    CYGWIN_SYSTEMROOT="$unix_path"
17571  fi
17572
17573    POSSIBLE_MSVCR_DLL="$CYGWIN_SYSTEMROOT/system32/msvcr100.dll"
17574
17575  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17576  METHOD="well-known location in SYSTEMROOT"
17577  if test -e "$POSSIBLE_MSVCR_DLL"; then
17578    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
17579$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
17580
17581    # Need to check if the found msvcr is correct architecture
17582    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
17583$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
17584    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
17585    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17586      CORRECT_MSVCR_ARCH=386
17587    else
17588      CORRECT_MSVCR_ARCH=x86-64
17589    fi
17590    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
17591      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
17592$as_echo "ok" >&6; }
17593      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17594      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
17595$as_echo_n "checking for msvcr100.dll... " >&6; }
17596      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
17597$as_echo "$MSVCR_DLL" >&6; }
17598    else
17599      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
17600$as_echo "incorrect, ignoring" >&6; }
17601      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
17602$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
17603    fi
17604  fi
17605
17606  fi
17607
17608  if test "x$MSVCR_DLL" = x; then
17609    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
17610    if test "x$VS100COMNTOOLS" != x; then
17611      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
17612
17613  windows_path="$CYGWIN_VS_TOOLS_DIR"
17614  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17615    unix_path=`$CYGPATH -u "$windows_path"`
17616    CYGWIN_VS_TOOLS_DIR="$unix_path"
17617  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17618    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17619    CYGWIN_VS_TOOLS_DIR="$unix_path"
17620  fi
17621
17622      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
17623        POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name msvcr100.dll | $GREP -i /x64/ | $HEAD --lines 1`
17624      else
17625        POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name msvcr100.dll | $GREP -i /x86/ | $HEAD --lines 1`
17626      fi
17627
17628  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17629  METHOD="search of VS100COMNTOOLS"
17630  if test -e "$POSSIBLE_MSVCR_DLL"; then
17631    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
17632$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
17633
17634    # Need to check if the found msvcr is correct architecture
17635    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
17636$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
17637    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
17638    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17639      CORRECT_MSVCR_ARCH=386
17640    else
17641      CORRECT_MSVCR_ARCH=x86-64
17642    fi
17643    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
17644      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
17645$as_echo "ok" >&6; }
17646      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17647      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
17648$as_echo_n "checking for msvcr100.dll... " >&6; }
17649      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
17650$as_echo "$MSVCR_DLL" >&6; }
17651    else
17652      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
17653$as_echo "incorrect, ignoring" >&6; }
17654      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
17655$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
17656    fi
17657  fi
17658
17659    fi
17660  fi
17661
17662  if test "x$MSVCR_DLL" = x; then
17663    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
17664    # (This was the original behaviour; kept since it might turn up something)
17665    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
17666      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
17667        POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $GREP x64 | $HEAD --lines 1`
17668      else
17669        POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
17670        if test "x$POSSIBLE_MSVCR_DLL" = x; then
17671          # We're grasping at straws now...
17672          POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $HEAD --lines 1`
17673        fi
17674      fi
17675
17676
17677  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17678  METHOD="search of VCINSTALLDIR"
17679  if test -e "$POSSIBLE_MSVCR_DLL"; then
17680    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
17681$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
17682
17683    # Need to check if the found msvcr is correct architecture
17684    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
17685$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
17686    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
17687    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17688      CORRECT_MSVCR_ARCH=386
17689    else
17690      CORRECT_MSVCR_ARCH=x86-64
17691    fi
17692    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
17693      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
17694$as_echo "ok" >&6; }
17695      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17696      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
17697$as_echo_n "checking for msvcr100.dll... " >&6; }
17698      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
17699$as_echo "$MSVCR_DLL" >&6; }
17700    else
17701      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
17702$as_echo "incorrect, ignoring" >&6; }
17703      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
17704$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
17705    fi
17706  fi
17707
17708    fi
17709  fi
17710
17711  if test "x$MSVCR_DLL" = x; then
17712    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
17713$as_echo_n "checking for msvcr100.dll... " >&6; }
17714    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17715$as_echo "no" >&6; }
17716    as_fn_error $? "Could not find msvcr100.dll. Please specify using --with-msvcr-dll." "$LINENO" 5
17717  fi
17718
17719
17720  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17721
17722  # Input might be given as Windows format, start by converting to
17723  # unix format.
17724  path="$MSVCR_DLL"
17725  new_path=`$CYGPATH -u "$path"`
17726
17727  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17728  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17729  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17730  # "foo.exe" is OK but "foo" is an error.
17731  #
17732  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17733  # It is also a way to make sure we got the proper file name for the real test later on.
17734  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17735  if test "x$test_shortpath" = x; then
17736    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
17737$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
17738    as_fn_error $? "Cannot locate the the path of MSVCR_DLL" "$LINENO" 5
17739  fi
17740
17741  # Call helper function which possibly converts this using DOS-style short mode.
17742  # If so, the updated path is stored in $new_path.
17743
17744  input_path="$new_path"
17745  # Check if we need to convert this using DOS-style short mode. If the path
17746  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17747  # take no chances and rewrite it.
17748  # Note: m4 eats our [], so we need to use [ and ] instead.
17749  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17750  if test "x$has_forbidden_chars" != x; then
17751    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17752    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17753    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17754    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17755      # Going to short mode and back again did indeed matter. Since short mode is
17756      # case insensitive, let's make it lowercase to improve readability.
17757      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17758      # Now convert it back to Unix-stile (cygpath)
17759      input_path=`$CYGPATH -u "$shortmode_path"`
17760      new_path="$input_path"
17761    fi
17762  fi
17763
17764  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17765  if test "x$test_cygdrive_prefix" = x; then
17766    # As a simple fix, exclude /usr/bin since it's not a real path.
17767    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17768      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17769      # a path prefixed by /cygdrive for fixpath to work.
17770      new_path="$CYGWIN_ROOT_PATH$input_path"
17771    fi
17772  fi
17773
17774
17775  if test "x$path" != "x$new_path"; then
17776    MSVCR_DLL="$new_path"
17777    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
17778$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
17779  fi
17780
17781  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17782
17783  path="$MSVCR_DLL"
17784  has_colon=`$ECHO $path | $GREP ^.:`
17785  new_path="$path"
17786  if test "x$has_colon" = x; then
17787    # Not in mixed or Windows style, start by that.
17788    new_path=`cmd //c echo $path`
17789  fi
17790
17791
17792  input_path="$new_path"
17793  # Check if we need to convert this using DOS-style short mode. If the path
17794  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17795  # take no chances and rewrite it.
17796  # Note: m4 eats our [], so we need to use [ and ] instead.
17797  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17798  if test "x$has_forbidden_chars" != x; then
17799    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17800    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17801  fi
17802
17803
17804  windows_path="$new_path"
17805  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17806    unix_path=`$CYGPATH -u "$windows_path"`
17807    new_path="$unix_path"
17808  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17809    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17810    new_path="$unix_path"
17811  fi
17812
17813  if test "x$path" != "x$new_path"; then
17814    MSVCR_DLL="$new_path"
17815    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
17816$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
17817  fi
17818
17819  # Save the first 10 bytes of this path to the storage, so fixpath can work.
17820  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17821
17822  else
17823    # We're on a posix platform. Hooray! :)
17824    path="$MSVCR_DLL"
17825    has_space=`$ECHO "$path" | $GREP " "`
17826    if test "x$has_space" != x; then
17827      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
17828$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
17829      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17830    fi
17831
17832    # Use eval to expand a potential ~
17833    eval path="$path"
17834    if test ! -f "$path" && test ! -d "$path"; then
17835      as_fn_error $? "The path of MSVCR_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
17836    fi
17837
17838    MSVCR_DLL="`cd "$path"; $THEPWDCMD -L`"
17839  fi
17840
17841
17842
17843
17844# Check whether --with-dxsdk was given.
17845if test "${with_dxsdk+set}" = set; then :
17846  withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
17847$as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
17848fi
17849
17850
17851
17852
17853# Check whether --with-dxsdk-lib was given.
17854if test "${with_dxsdk_lib+set}" = set; then :
17855  withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
17856$as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
17857fi
17858
17859
17860
17861
17862# Check whether --with-dxsdk-include was given.
17863if test "${with_dxsdk_include+set}" = set; then :
17864  withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
17865$as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
17866fi
17867
17868
17869  fi
17870
17871
17872
17873  # If --build AND --host is set, then the configure script will find any
17874  # cross compilation tools in the PATH. Cross compilation tools
17875  # follows the cross compilation standard where they are prefixed with ${host}.
17876  # For example the binary i686-sun-solaris2.10-gcc
17877  # will cross compile for i686-sun-solaris2.10
17878  # If neither of build and host is not set, then build=host and the
17879  # default compiler found in the path will be used.
17880  # Setting only --host, does not seem to be really supported.
17881  # Please set both --build and --host if you want to cross compile.
17882
17883  if test "x$COMPILE_TYPE" = "xcross"; then
17884    # Now we to find a C/C++ compiler that can build executables for the build
17885    # platform. We can't use the AC_PROG_CC macro, since it can only be used
17886    # once. Also, we need to do this before adding a tools dir to the path,
17887    # otherwise we might pick up cross-compilers which don't use standard naming.
17888    # Otherwise, we'll set the BUILD_tools to the native tools, but that'll have
17889    # to wait until they are properly discovered.
17890    for ac_prog in cl cc gcc
17891do
17892  # Extract the first word of "$ac_prog", so it can be a program name with args.
17893set dummy $ac_prog; ac_word=$2
17894{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17895$as_echo_n "checking for $ac_word... " >&6; }
17896if ${ac_cv_path_BUILD_CC+:} false; then :
17897  $as_echo_n "(cached) " >&6
17898else
17899  case $BUILD_CC in
17900  [\\/]* | ?:[\\/]*)
17901  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
17902  ;;
17903  *)
17904  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17905for as_dir in $PATH
17906do
17907  IFS=$as_save_IFS
17908  test -z "$as_dir" && as_dir=.
17909    for ac_exec_ext in '' $ac_executable_extensions; do
17910  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17911    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
17912    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17913    break 2
17914  fi
17915done
17916  done
17917IFS=$as_save_IFS
17918
17919  ;;
17920esac
17921fi
17922BUILD_CC=$ac_cv_path_BUILD_CC
17923if test -n "$BUILD_CC"; then
17924  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
17925$as_echo "$BUILD_CC" >&6; }
17926else
17927  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17928$as_echo "no" >&6; }
17929fi
17930
17931
17932  test -n "$BUILD_CC" && break
17933done
17934
17935
17936  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17937
17938  # First separate the path from the arguments. This will split at the first
17939  # space.
17940  complete="$BUILD_CC"
17941  path="${complete%% *}"
17942  tmp="$complete EOL"
17943  arguments="${tmp#* }"
17944
17945  # Input might be given as Windows format, start by converting to
17946  # unix format.
17947  new_path=`$CYGPATH -u "$path"`
17948
17949  # Now try to locate executable using which
17950  new_path=`$WHICH "$new_path" 2> /dev/null`
17951  # bat and cmd files are not always considered executable in cygwin causing which
17952  # to not find them
17953  if test "x$new_path" = x \
17954      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17955      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17956    new_path=`$CYGPATH -u "$path"`
17957  fi
17958  if test "x$new_path" = x; then
17959    # Oops. Which didn't find the executable.
17960    # The splitting of arguments from the executable at a space might have been incorrect,
17961    # since paths with space are more likely in Windows. Give it another try with the whole
17962    # argument.
17963    path="$complete"
17964    arguments="EOL"
17965    new_path=`$CYGPATH -u "$path"`
17966    new_path=`$WHICH "$new_path" 2> /dev/null`
17967    # bat and cmd files are not always considered executable in cygwin causing which
17968    # to not find them
17969    if test "x$new_path" = x \
17970        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17971        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17972      new_path=`$CYGPATH -u "$path"`
17973    fi
17974    if test "x$new_path" = x; then
17975      # It's still not found. Now this is an unrecoverable error.
17976      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
17977$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
17978      has_space=`$ECHO "$complete" | $GREP " "`
17979      if test "x$has_space" != x; then
17980        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17981$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17982      fi
17983      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
17984    fi
17985  fi
17986
17987  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17988  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17989  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17990  # "foo.exe" is OK but "foo" is an error.
17991  #
17992  # This test is therefore slightly more accurate than "test -f" to check for file presence.
17993  # It is also a way to make sure we got the proper file name for the real test later on.
17994  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17995  if test "x$test_shortpath" = x; then
17996    # Short path failed, file does not exist as specified.
17997    # Try adding .exe or .cmd
17998    if test -f "${new_path}.exe"; then
17999      input_to_shortpath="${new_path}.exe"
18000    elif test -f "${new_path}.cmd"; then
18001      input_to_shortpath="${new_path}.cmd"
18002    else
18003      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
18004$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
18005      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18006$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18007      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
18008    fi
18009  else
18010    input_to_shortpath="$new_path"
18011  fi
18012
18013  # Call helper function which possibly converts this using DOS-style short mode.
18014  # If so, the updated path is stored in $new_path.
18015  new_path="$input_to_shortpath"
18016
18017  input_path="$input_to_shortpath"
18018  # Check if we need to convert this using DOS-style short mode. If the path
18019  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18020  # take no chances and rewrite it.
18021  # Note: m4 eats our [], so we need to use [ and ] instead.
18022  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18023  if test "x$has_forbidden_chars" != x; then
18024    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18025    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18026    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18027    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18028      # Going to short mode and back again did indeed matter. Since short mode is
18029      # case insensitive, let's make it lowercase to improve readability.
18030      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18031      # Now convert it back to Unix-stile (cygpath)
18032      input_path=`$CYGPATH -u "$shortmode_path"`
18033      new_path="$input_path"
18034    fi
18035  fi
18036
18037  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18038  if test "x$test_cygdrive_prefix" = x; then
18039    # As a simple fix, exclude /usr/bin since it's not a real path.
18040    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18041      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18042      # a path prefixed by /cygdrive for fixpath to work.
18043      new_path="$CYGWIN_ROOT_PATH$input_path"
18044    fi
18045  fi
18046
18047  # remove trailing .exe if any
18048  new_path="${new_path/%.exe/}"
18049
18050  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18051
18052  # First separate the path from the arguments. This will split at the first
18053  # space.
18054  complete="$BUILD_CC"
18055  path="${complete%% *}"
18056  tmp="$complete EOL"
18057  arguments="${tmp#* }"
18058
18059  # Input might be given as Windows format, start by converting to
18060  # unix format.
18061  new_path="$path"
18062
18063  windows_path="$new_path"
18064  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18065    unix_path=`$CYGPATH -u "$windows_path"`
18066    new_path="$unix_path"
18067  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18068    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18069    new_path="$unix_path"
18070  fi
18071
18072
18073  # Now try to locate executable using which
18074  new_path=`$WHICH "$new_path" 2> /dev/null`
18075
18076  if test "x$new_path" = x; then
18077    # Oops. Which didn't find the executable.
18078    # The splitting of arguments from the executable at a space might have been incorrect,
18079    # since paths with space are more likely in Windows. Give it another try with the whole
18080    # argument.
18081    path="$complete"
18082    arguments="EOL"
18083    new_path="$path"
18084
18085  windows_path="$new_path"
18086  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18087    unix_path=`$CYGPATH -u "$windows_path"`
18088    new_path="$unix_path"
18089  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18090    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18091    new_path="$unix_path"
18092  fi
18093
18094
18095    new_path=`$WHICH "$new_path" 2> /dev/null`
18096
18097    if test "x$new_path" = x; then
18098      # It's still not found. Now this is an unrecoverable error.
18099      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
18100$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
18101      has_space=`$ECHO "$complete" | $GREP " "`
18102      if test "x$has_space" != x; then
18103        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18104$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18105      fi
18106      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
18107    fi
18108  fi
18109
18110  # Now new_path has a complete unix path to the binary
18111  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18112    # Keep paths in /bin as-is, but remove trailing .exe if any
18113    new_path="${new_path/%.exe/}"
18114    # Do not save /bin paths to all_fixpath_prefixes!
18115  else
18116    # Not in mixed or Windows style, start by that.
18117    new_path=`cmd //c echo $new_path`
18118
18119  input_path="$new_path"
18120  # Check if we need to convert this using DOS-style short mode. If the path
18121  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18122  # take no chances and rewrite it.
18123  # Note: m4 eats our [], so we need to use [ and ] instead.
18124  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18125  if test "x$has_forbidden_chars" != x; then
18126    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18127    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18128  fi
18129
18130    # Output is in $new_path
18131
18132  windows_path="$new_path"
18133  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18134    unix_path=`$CYGPATH -u "$windows_path"`
18135    new_path="$unix_path"
18136  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18137    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18138    new_path="$unix_path"
18139  fi
18140
18141    # remove trailing .exe if any
18142    new_path="${new_path/%.exe/}"
18143
18144    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18145    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18146  fi
18147
18148  else
18149    # We're on a posix platform. Hooray! :)
18150    # First separate the path from the arguments. This will split at the first
18151    # space.
18152    complete="$BUILD_CC"
18153    path="${complete%% *}"
18154    tmp="$complete EOL"
18155    arguments="${tmp#* }"
18156
18157    # Cannot rely on the command "which" here since it doesn't always work.
18158    is_absolute_path=`$ECHO "$path" | $GREP ^/`
18159    if test -z "$is_absolute_path"; then
18160      # Path to executable is not absolute. Find it.
18161      IFS_save="$IFS"
18162      IFS=:
18163      for p in $PATH; do
18164        if test -f "$p/$path" && test -x "$p/$path"; then
18165          new_path="$p/$path"
18166          break
18167        fi
18168      done
18169      IFS="$IFS_save"
18170    else
18171      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CC (as $path) failed, using $path directly." >&5
18172$as_echo "$as_me: Resolving BUILD_CC (as $path) failed, using $path directly." >&6;}
18173      new_path="$path"
18174    fi
18175
18176    if test "x$new_path" = x; then
18177      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
18178$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
18179      has_space=`$ECHO "$complete" | $GREP " "`
18180      if test "x$has_space" != x; then
18181        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18182$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18183      fi
18184      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
18185    fi
18186  fi
18187
18188  # Now join together the path and the arguments once again
18189  if test "x$arguments" != xEOL; then
18190    new_complete="$new_path ${arguments% *}"
18191  else
18192    new_complete="$new_path"
18193  fi
18194
18195  if test "x$complete" != "x$new_complete"; then
18196    BUILD_CC="$new_complete"
18197    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
18198$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
18199  fi
18200
18201    for ac_prog in cl CC g++
18202do
18203  # Extract the first word of "$ac_prog", so it can be a program name with args.
18204set dummy $ac_prog; ac_word=$2
18205{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18206$as_echo_n "checking for $ac_word... " >&6; }
18207if ${ac_cv_path_BUILD_CXX+:} false; then :
18208  $as_echo_n "(cached) " >&6
18209else
18210  case $BUILD_CXX in
18211  [\\/]* | ?:[\\/]*)
18212  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
18213  ;;
18214  *)
18215  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18216for as_dir in $PATH
18217do
18218  IFS=$as_save_IFS
18219  test -z "$as_dir" && as_dir=.
18220    for ac_exec_ext in '' $ac_executable_extensions; do
18221  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18222    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
18223    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18224    break 2
18225  fi
18226done
18227  done
18228IFS=$as_save_IFS
18229
18230  ;;
18231esac
18232fi
18233BUILD_CXX=$ac_cv_path_BUILD_CXX
18234if test -n "$BUILD_CXX"; then
18235  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
18236$as_echo "$BUILD_CXX" >&6; }
18237else
18238  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18239$as_echo "no" >&6; }
18240fi
18241
18242
18243  test -n "$BUILD_CXX" && break
18244done
18245
18246
18247  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18248
18249  # First separate the path from the arguments. This will split at the first
18250  # space.
18251  complete="$BUILD_CXX"
18252  path="${complete%% *}"
18253  tmp="$complete EOL"
18254  arguments="${tmp#* }"
18255
18256  # Input might be given as Windows format, start by converting to
18257  # unix format.
18258  new_path=`$CYGPATH -u "$path"`
18259
18260  # Now try to locate executable using which
18261  new_path=`$WHICH "$new_path" 2> /dev/null`
18262  # bat and cmd files are not always considered executable in cygwin causing which
18263  # to not find them
18264  if test "x$new_path" = x \
18265      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18266      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18267    new_path=`$CYGPATH -u "$path"`
18268  fi
18269  if test "x$new_path" = x; then
18270    # Oops. Which didn't find the executable.
18271    # The splitting of arguments from the executable at a space might have been incorrect,
18272    # since paths with space are more likely in Windows. Give it another try with the whole
18273    # argument.
18274    path="$complete"
18275    arguments="EOL"
18276    new_path=`$CYGPATH -u "$path"`
18277    new_path=`$WHICH "$new_path" 2> /dev/null`
18278    # bat and cmd files are not always considered executable in cygwin causing which
18279    # to not find them
18280    if test "x$new_path" = x \
18281        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18282        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18283      new_path=`$CYGPATH -u "$path"`
18284    fi
18285    if test "x$new_path" = x; then
18286      # It's still not found. Now this is an unrecoverable error.
18287      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
18288$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
18289      has_space=`$ECHO "$complete" | $GREP " "`
18290      if test "x$has_space" != x; then
18291        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18292$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18293      fi
18294      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18295    fi
18296  fi
18297
18298  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18299  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18300  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18301  # "foo.exe" is OK but "foo" is an error.
18302  #
18303  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18304  # It is also a way to make sure we got the proper file name for the real test later on.
18305  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18306  if test "x$test_shortpath" = x; then
18307    # Short path failed, file does not exist as specified.
18308    # Try adding .exe or .cmd
18309    if test -f "${new_path}.exe"; then
18310      input_to_shortpath="${new_path}.exe"
18311    elif test -f "${new_path}.cmd"; then
18312      input_to_shortpath="${new_path}.cmd"
18313    else
18314      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
18315$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
18316      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18317$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18318      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18319    fi
18320  else
18321    input_to_shortpath="$new_path"
18322  fi
18323
18324  # Call helper function which possibly converts this using DOS-style short mode.
18325  # If so, the updated path is stored in $new_path.
18326  new_path="$input_to_shortpath"
18327
18328  input_path="$input_to_shortpath"
18329  # Check if we need to convert this using DOS-style short mode. If the path
18330  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18331  # take no chances and rewrite it.
18332  # Note: m4 eats our [], so we need to use [ and ] instead.
18333  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18334  if test "x$has_forbidden_chars" != x; then
18335    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18336    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18337    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18338    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18339      # Going to short mode and back again did indeed matter. Since short mode is
18340      # case insensitive, let's make it lowercase to improve readability.
18341      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18342      # Now convert it back to Unix-stile (cygpath)
18343      input_path=`$CYGPATH -u "$shortmode_path"`
18344      new_path="$input_path"
18345    fi
18346  fi
18347
18348  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18349  if test "x$test_cygdrive_prefix" = x; then
18350    # As a simple fix, exclude /usr/bin since it's not a real path.
18351    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18352      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18353      # a path prefixed by /cygdrive for fixpath to work.
18354      new_path="$CYGWIN_ROOT_PATH$input_path"
18355    fi
18356  fi
18357
18358  # remove trailing .exe if any
18359  new_path="${new_path/%.exe/}"
18360
18361  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18362
18363  # First separate the path from the arguments. This will split at the first
18364  # space.
18365  complete="$BUILD_CXX"
18366  path="${complete%% *}"
18367  tmp="$complete EOL"
18368  arguments="${tmp#* }"
18369
18370  # Input might be given as Windows format, start by converting to
18371  # unix format.
18372  new_path="$path"
18373
18374  windows_path="$new_path"
18375  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18376    unix_path=`$CYGPATH -u "$windows_path"`
18377    new_path="$unix_path"
18378  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18379    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18380    new_path="$unix_path"
18381  fi
18382
18383
18384  # Now try to locate executable using which
18385  new_path=`$WHICH "$new_path" 2> /dev/null`
18386
18387  if test "x$new_path" = x; then
18388    # Oops. Which didn't find the executable.
18389    # The splitting of arguments from the executable at a space might have been incorrect,
18390    # since paths with space are more likely in Windows. Give it another try with the whole
18391    # argument.
18392    path="$complete"
18393    arguments="EOL"
18394    new_path="$path"
18395
18396  windows_path="$new_path"
18397  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18398    unix_path=`$CYGPATH -u "$windows_path"`
18399    new_path="$unix_path"
18400  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18401    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18402    new_path="$unix_path"
18403  fi
18404
18405
18406    new_path=`$WHICH "$new_path" 2> /dev/null`
18407
18408    if test "x$new_path" = x; then
18409      # It's still not found. Now this is an unrecoverable error.
18410      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
18411$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
18412      has_space=`$ECHO "$complete" | $GREP " "`
18413      if test "x$has_space" != x; then
18414        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18415$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18416      fi
18417      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18418    fi
18419  fi
18420
18421  # Now new_path has a complete unix path to the binary
18422  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18423    # Keep paths in /bin as-is, but remove trailing .exe if any
18424    new_path="${new_path/%.exe/}"
18425    # Do not save /bin paths to all_fixpath_prefixes!
18426  else
18427    # Not in mixed or Windows style, start by that.
18428    new_path=`cmd //c echo $new_path`
18429
18430  input_path="$new_path"
18431  # Check if we need to convert this using DOS-style short mode. If the path
18432  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18433  # take no chances and rewrite it.
18434  # Note: m4 eats our [], so we need to use [ and ] instead.
18435  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18436  if test "x$has_forbidden_chars" != x; then
18437    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18438    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18439  fi
18440
18441    # Output is in $new_path
18442
18443  windows_path="$new_path"
18444  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18445    unix_path=`$CYGPATH -u "$windows_path"`
18446    new_path="$unix_path"
18447  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18448    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18449    new_path="$unix_path"
18450  fi
18451
18452    # remove trailing .exe if any
18453    new_path="${new_path/%.exe/}"
18454
18455    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18456    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18457  fi
18458
18459  else
18460    # We're on a posix platform. Hooray! :)
18461    # First separate the path from the arguments. This will split at the first
18462    # space.
18463    complete="$BUILD_CXX"
18464    path="${complete%% *}"
18465    tmp="$complete EOL"
18466    arguments="${tmp#* }"
18467
18468    # Cannot rely on the command "which" here since it doesn't always work.
18469    is_absolute_path=`$ECHO "$path" | $GREP ^/`
18470    if test -z "$is_absolute_path"; then
18471      # Path to executable is not absolute. Find it.
18472      IFS_save="$IFS"
18473      IFS=:
18474      for p in $PATH; do
18475        if test -f "$p/$path" && test -x "$p/$path"; then
18476          new_path="$p/$path"
18477          break
18478        fi
18479      done
18480      IFS="$IFS_save"
18481    else
18482      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CXX (as $path) failed, using $path directly." >&5
18483$as_echo "$as_me: Resolving BUILD_CXX (as $path) failed, using $path directly." >&6;}
18484      new_path="$path"
18485    fi
18486
18487    if test "x$new_path" = x; then
18488      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
18489$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
18490      has_space=`$ECHO "$complete" | $GREP " "`
18491      if test "x$has_space" != x; then
18492        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18493$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18494      fi
18495      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18496    fi
18497  fi
18498
18499  # Now join together the path and the arguments once again
18500  if test "x$arguments" != xEOL; then
18501    new_complete="$new_path ${arguments% *}"
18502  else
18503    new_complete="$new_path"
18504  fi
18505
18506  if test "x$complete" != "x$new_complete"; then
18507    BUILD_CXX="$new_complete"
18508    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
18509$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
18510  fi
18511
18512    # Extract the first word of "ld", so it can be a program name with args.
18513set dummy ld; ac_word=$2
18514{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18515$as_echo_n "checking for $ac_word... " >&6; }
18516if ${ac_cv_path_BUILD_LD+:} false; then :
18517  $as_echo_n "(cached) " >&6
18518else
18519  case $BUILD_LD in
18520  [\\/]* | ?:[\\/]*)
18521  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
18522  ;;
18523  *)
18524  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18525for as_dir in $PATH
18526do
18527  IFS=$as_save_IFS
18528  test -z "$as_dir" && as_dir=.
18529    for ac_exec_ext in '' $ac_executable_extensions; do
18530  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18531    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
18532    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18533    break 2
18534  fi
18535done
18536  done
18537IFS=$as_save_IFS
18538
18539  ;;
18540esac
18541fi
18542BUILD_LD=$ac_cv_path_BUILD_LD
18543if test -n "$BUILD_LD"; then
18544  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
18545$as_echo "$BUILD_LD" >&6; }
18546else
18547  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18548$as_echo "no" >&6; }
18549fi
18550
18551
18552
18553  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18554
18555  # First separate the path from the arguments. This will split at the first
18556  # space.
18557  complete="$BUILD_LD"
18558  path="${complete%% *}"
18559  tmp="$complete EOL"
18560  arguments="${tmp#* }"
18561
18562  # Input might be given as Windows format, start by converting to
18563  # unix format.
18564  new_path=`$CYGPATH -u "$path"`
18565
18566  # Now try to locate executable using which
18567  new_path=`$WHICH "$new_path" 2> /dev/null`
18568  # bat and cmd files are not always considered executable in cygwin causing which
18569  # to not find them
18570  if test "x$new_path" = x \
18571      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18572      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18573    new_path=`$CYGPATH -u "$path"`
18574  fi
18575  if test "x$new_path" = x; then
18576    # Oops. Which didn't find the executable.
18577    # The splitting of arguments from the executable at a space might have been incorrect,
18578    # since paths with space are more likely in Windows. Give it another try with the whole
18579    # argument.
18580    path="$complete"
18581    arguments="EOL"
18582    new_path=`$CYGPATH -u "$path"`
18583    new_path=`$WHICH "$new_path" 2> /dev/null`
18584    # bat and cmd files are not always considered executable in cygwin causing which
18585    # to not find them
18586    if test "x$new_path" = x \
18587        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18588        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18589      new_path=`$CYGPATH -u "$path"`
18590    fi
18591    if test "x$new_path" = x; then
18592      # It's still not found. Now this is an unrecoverable error.
18593      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
18594$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
18595      has_space=`$ECHO "$complete" | $GREP " "`
18596      if test "x$has_space" != x; then
18597        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18598$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18599      fi
18600      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18601    fi
18602  fi
18603
18604  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18605  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18606  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18607  # "foo.exe" is OK but "foo" is an error.
18608  #
18609  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18610  # It is also a way to make sure we got the proper file name for the real test later on.
18611  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18612  if test "x$test_shortpath" = x; then
18613    # Short path failed, file does not exist as specified.
18614    # Try adding .exe or .cmd
18615    if test -f "${new_path}.exe"; then
18616      input_to_shortpath="${new_path}.exe"
18617    elif test -f "${new_path}.cmd"; then
18618      input_to_shortpath="${new_path}.cmd"
18619    else
18620      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&5
18621$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&6;}
18622      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18623$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18624      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18625    fi
18626  else
18627    input_to_shortpath="$new_path"
18628  fi
18629
18630  # Call helper function which possibly converts this using DOS-style short mode.
18631  # If so, the updated path is stored in $new_path.
18632  new_path="$input_to_shortpath"
18633
18634  input_path="$input_to_shortpath"
18635  # Check if we need to convert this using DOS-style short mode. If the path
18636  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18637  # take no chances and rewrite it.
18638  # Note: m4 eats our [], so we need to use [ and ] instead.
18639  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18640  if test "x$has_forbidden_chars" != x; then
18641    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18642    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18643    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18644    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18645      # Going to short mode and back again did indeed matter. Since short mode is
18646      # case insensitive, let's make it lowercase to improve readability.
18647      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18648      # Now convert it back to Unix-stile (cygpath)
18649      input_path=`$CYGPATH -u "$shortmode_path"`
18650      new_path="$input_path"
18651    fi
18652  fi
18653
18654  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18655  if test "x$test_cygdrive_prefix" = x; then
18656    # As a simple fix, exclude /usr/bin since it's not a real path.
18657    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18658      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18659      # a path prefixed by /cygdrive for fixpath to work.
18660      new_path="$CYGWIN_ROOT_PATH$input_path"
18661    fi
18662  fi
18663
18664  # remove trailing .exe if any
18665  new_path="${new_path/%.exe/}"
18666
18667  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18668
18669  # First separate the path from the arguments. This will split at the first
18670  # space.
18671  complete="$BUILD_LD"
18672  path="${complete%% *}"
18673  tmp="$complete EOL"
18674  arguments="${tmp#* }"
18675
18676  # Input might be given as Windows format, start by converting to
18677  # unix format.
18678  new_path="$path"
18679
18680  windows_path="$new_path"
18681  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18682    unix_path=`$CYGPATH -u "$windows_path"`
18683    new_path="$unix_path"
18684  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18685    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18686    new_path="$unix_path"
18687  fi
18688
18689
18690  # Now try to locate executable using which
18691  new_path=`$WHICH "$new_path" 2> /dev/null`
18692
18693  if test "x$new_path" = x; then
18694    # Oops. Which didn't find the executable.
18695    # The splitting of arguments from the executable at a space might have been incorrect,
18696    # since paths with space are more likely in Windows. Give it another try with the whole
18697    # argument.
18698    path="$complete"
18699    arguments="EOL"
18700    new_path="$path"
18701
18702  windows_path="$new_path"
18703  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18704    unix_path=`$CYGPATH -u "$windows_path"`
18705    new_path="$unix_path"
18706  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18707    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18708    new_path="$unix_path"
18709  fi
18710
18711
18712    new_path=`$WHICH "$new_path" 2> /dev/null`
18713
18714    if test "x$new_path" = x; then
18715      # It's still not found. Now this is an unrecoverable error.
18716      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
18717$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
18718      has_space=`$ECHO "$complete" | $GREP " "`
18719      if test "x$has_space" != x; then
18720        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18721$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18722      fi
18723      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18724    fi
18725  fi
18726
18727  # Now new_path has a complete unix path to the binary
18728  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18729    # Keep paths in /bin as-is, but remove trailing .exe if any
18730    new_path="${new_path/%.exe/}"
18731    # Do not save /bin paths to all_fixpath_prefixes!
18732  else
18733    # Not in mixed or Windows style, start by that.
18734    new_path=`cmd //c echo $new_path`
18735
18736  input_path="$new_path"
18737  # Check if we need to convert this using DOS-style short mode. If the path
18738  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18739  # take no chances and rewrite it.
18740  # Note: m4 eats our [], so we need to use [ and ] instead.
18741  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18742  if test "x$has_forbidden_chars" != x; then
18743    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18744    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18745  fi
18746
18747    # Output is in $new_path
18748
18749  windows_path="$new_path"
18750  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18751    unix_path=`$CYGPATH -u "$windows_path"`
18752    new_path="$unix_path"
18753  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18754    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18755    new_path="$unix_path"
18756  fi
18757
18758    # remove trailing .exe if any
18759    new_path="${new_path/%.exe/}"
18760
18761    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18762    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18763  fi
18764
18765  else
18766    # We're on a posix platform. Hooray! :)
18767    # First separate the path from the arguments. This will split at the first
18768    # space.
18769    complete="$BUILD_LD"
18770    path="${complete%% *}"
18771    tmp="$complete EOL"
18772    arguments="${tmp#* }"
18773
18774    # Cannot rely on the command "which" here since it doesn't always work.
18775    is_absolute_path=`$ECHO "$path" | $GREP ^/`
18776    if test -z "$is_absolute_path"; then
18777      # Path to executable is not absolute. Find it.
18778      IFS_save="$IFS"
18779      IFS=:
18780      for p in $PATH; do
18781        if test -f "$p/$path" && test -x "$p/$path"; then
18782          new_path="$p/$path"
18783          break
18784        fi
18785      done
18786      IFS="$IFS_save"
18787    else
18788      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_LD (as $path) failed, using $path directly." >&5
18789$as_echo "$as_me: Resolving BUILD_LD (as $path) failed, using $path directly." >&6;}
18790      new_path="$path"
18791    fi
18792
18793    if test "x$new_path" = x; then
18794      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
18795$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
18796      has_space=`$ECHO "$complete" | $GREP " "`
18797      if test "x$has_space" != x; then
18798        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18799$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18800      fi
18801      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18802    fi
18803  fi
18804
18805  # Now join together the path and the arguments once again
18806  if test "x$arguments" != xEOL; then
18807    new_complete="$new_path ${arguments% *}"
18808  else
18809    new_complete="$new_path"
18810  fi
18811
18812  if test "x$complete" != "x$new_complete"; then
18813    BUILD_LD="$new_complete"
18814    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_LD to \"$new_complete\"" >&5
18815$as_echo "$as_me: Rewriting BUILD_LD to \"$new_complete\"" >&6;}
18816  fi
18817
18818  fi
18819
18820
18821
18822
18823  # If a devkit is found on the builddeps server, then prepend its path to the
18824  # PATH variable. If there are cross compilers available in the devkit, these
18825  # will be found by AC_PROG_CC et al.
18826  DEVKIT=
18827
18828
18829  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
18830    # Source the builddeps file again, to make sure it uses the latest variables!
18831    . $builddepsfile
18832    # Look for a target and build machine specific resource!
18833    eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
18834    if test "x$resource" = x; then
18835      # Ok, lets instead look for a target specific resource
18836      eval resource=\${builddep_devkit_TARGET_${rewritten_target_var}}
18837    fi
18838    if test "x$resource" = x; then
18839      # Ok, lets instead look for a build specific resource
18840      eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}}
18841    fi
18842    if test "x$resource" = x; then
18843      # Ok, lets instead look for a generic resource
18844      # (The devkit comes from M4 and not the shell, thus no need for eval here.)
18845      resource=${builddep_devkit}
18846    fi
18847    if test "x$resource" != x; then
18848      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for devkit" >&5
18849$as_echo "$as_me: Using builddeps $resource for devkit" >&6;}
18850      # If the resource in the builddeps.conf file is an existing directory,
18851      # for example /java/linux/cups
18852      if test -d ${resource}; then
18853        depdir=${resource}
18854      else
18855
18856  # devkit is for example mymodule
18857  # $resource is for example libs/general/libmymod_1_2_3.zip
18858  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
18859  # $with_builddeps_dir is for example /localhome/builddeps
18860  # depdir is the name of the variable into which we store the depdir, eg MYMOD
18861  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
18862  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
18863  filename=`basename $resource`
18864  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
18865  filebase=${filename%%.*}
18866  extension=${filename#*.}
18867  installdir=$with_builddeps_dir/$filebase
18868  if test ! -f $installdir/$filename.unpacked; then
18869    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&5
18870$as_echo "$as_me: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&6;}
18871    if test ! -d $installdir; then
18872      mkdir -p $installdir
18873    fi
18874    if test ! -d $installdir; then
18875      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
18876    fi
18877    tmpfile=`mktemp $installdir/devkit.XXXXXXXXX`
18878    touch $tmpfile
18879    if test ! -f $tmpfile; then
18880      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
18881    fi
18882
18883  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
18884  # $tmpfile is the local file name for the downloaded file.
18885  VALID_TOOL=no
18886  if test "x$BDEPS_FTP" = xwget; then
18887    VALID_TOOL=yes
18888    wget -O $tmpfile $with_builddeps_server/$resource
18889  fi
18890  if test "x$BDEPS_FTP" = xlftp; then
18891    VALID_TOOL=yes
18892    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
18893  fi
18894  if test "x$BDEPS_FTP" = xftp; then
18895    VALID_TOOL=yes
18896    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
18897    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
18898    FTPUSERPWD=${FTPSERVER%%@*}
18899    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
18900      FTPUSER=${userpwd%%:*}
18901      FTPPWD=${userpwd#*@}
18902      FTPSERVER=${FTPSERVER#*@}
18903    else
18904      FTPUSER=ftp
18905      FTPPWD=ftp
18906    fi
18907    # the "pass" command does not work on some
18908    # ftp clients (read ftp.exe) but if it works,
18909    # passive mode is better!
18910    ( \
18911        echo "user $FTPUSER $FTPPWD"        ; \
18912        echo "pass"                         ; \
18913        echo "bin"                          ; \
18914        echo "get $FTPPATH $tmpfile"              ; \
18915    ) | ftp -in $FTPSERVER
18916  fi
18917  if test "x$VALID_TOOL" != xyes; then
18918    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
18919  fi
18920
18921    mv $tmpfile $installdir/$filename
18922    if test ! -s $installdir/$filename; then
18923      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
18924    fi
18925    case "$extension" in
18926      zip)  echo "Unzipping $installdir/$filename..."
18927        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
18928        ;;
18929      tar.gz) echo "Untaring $installdir/$filename..."
18930        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
18931        ;;
18932      tgz) echo "Untaring $installdir/$filename..."
18933        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
18934        ;;
18935      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
18936        ;;
18937    esac
18938  fi
18939  if test -f $installdir/$filename.unpacked; then
18940    depdir=$installdir
18941  fi
18942
18943      fi
18944      # Source the builddeps file again, because in the previous command, the depdir
18945      # was updated to point at the current build dependency install directory.
18946      . $builddepsfile
18947      # Now extract variables from the builddeps.conf files.
18948      theroot=${builddep_devkit_ROOT}
18949      thecflags=${builddep_devkit_CFLAGS}
18950      thelibs=${builddep_devkit_LIBS}
18951      if test "x$depdir" = x; then
18952        as_fn_error $? "Could not download build dependency devkit" "$LINENO" 5
18953      fi
18954      DEVKIT=$depdir
18955      if test "x$theroot" != x; then
18956        DEVKIT="$theroot"
18957      fi
18958      if test "x$thecflags" != x; then
18959        DEVKIT_CFLAGS="$thecflags"
18960      fi
18961      if test "x$thelibs" != x; then
18962        DEVKIT_LIBS="$thelibs"
18963      fi
18964
18965        # Found devkit
18966        PATH="$DEVKIT/bin:$PATH"
18967        SYS_ROOT="$DEVKIT/${rewritten_target}/sys-root"
18968        if test "x$x_includes" = "xNONE"; then
18969          x_includes="$SYS_ROOT/usr/include/X11"
18970        fi
18971        if test "x$x_libraries" = "xNONE"; then
18972          x_libraries="$SYS_ROOT/usr/lib"
18973        fi
18974
18975
18976    fi
18977
18978  fi
18979
18980
18981  # Store the CFLAGS etal passed to the configure script.
18982  ORG_CFLAGS="$CFLAGS"
18983  ORG_CXXFLAGS="$CXXFLAGS"
18984  ORG_OBJCFLAGS="$OBJCFLAGS"
18985
18986  # autoconf magic only relies on PATH, so update it if tools dir is specified
18987  OLD_PATH="$PATH"
18988  if test "x$TOOLS_DIR" != x; then
18989    PATH=$TOOLS_DIR:$PATH
18990  fi
18991
18992
18993  ### Locate C compiler (CC)
18994
18995  # On windows, only cl.exe is supported.
18996  # On Solaris, cc is preferred to gcc.
18997  # Elsewhere, gcc is preferred to cc.
18998
18999  if test "x$CC" != x; then
19000    COMPILER_CHECK_LIST="$CC"
19001  elif test "x$OPENJDK_TARGET_OS" = "xwindows"; then
19002    COMPILER_CHECK_LIST="cl"
19003  elif test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
19004    COMPILER_CHECK_LIST="cc gcc"
19005  else
19006    COMPILER_CHECK_LIST="gcc cc"
19007  fi
19008
19009
19010  COMPILER_NAME=C
19011
19012  CC=
19013  # If TOOLS_DIR is set, check for all compiler names in there first
19014  # before checking the rest of the PATH.
19015  if test -n "$TOOLS_DIR"; then
19016    PATH_save="$PATH"
19017    PATH="$TOOLS_DIR"
19018    for ac_prog in $COMPILER_CHECK_LIST
19019do
19020  # Extract the first word of "$ac_prog", so it can be a program name with args.
19021set dummy $ac_prog; ac_word=$2
19022{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19023$as_echo_n "checking for $ac_word... " >&6; }
19024if ${ac_cv_path_TOOLS_DIR_CC+:} false; then :
19025  $as_echo_n "(cached) " >&6
19026else
19027  case $TOOLS_DIR_CC in
19028  [\\/]* | ?:[\\/]*)
19029  ac_cv_path_TOOLS_DIR_CC="$TOOLS_DIR_CC" # Let the user override the test with a path.
19030  ;;
19031  *)
19032  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19033for as_dir in $PATH
19034do
19035  IFS=$as_save_IFS
19036  test -z "$as_dir" && as_dir=.
19037    for ac_exec_ext in '' $ac_executable_extensions; do
19038  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19039    ac_cv_path_TOOLS_DIR_CC="$as_dir/$ac_word$ac_exec_ext"
19040    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19041    break 2
19042  fi
19043done
19044  done
19045IFS=$as_save_IFS
19046
19047  ;;
19048esac
19049fi
19050TOOLS_DIR_CC=$ac_cv_path_TOOLS_DIR_CC
19051if test -n "$TOOLS_DIR_CC"; then
19052  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CC" >&5
19053$as_echo "$TOOLS_DIR_CC" >&6; }
19054else
19055  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19056$as_echo "no" >&6; }
19057fi
19058
19059
19060  test -n "$TOOLS_DIR_CC" && break
19061done
19062
19063    CC=$TOOLS_DIR_CC
19064    PATH="$PATH_save"
19065  fi
19066
19067  # AC_PATH_PROGS can't be run multiple times with the same variable,
19068  # so create a new name for this run.
19069  if test "x$CC" = x; then
19070    for ac_prog in $COMPILER_CHECK_LIST
19071do
19072  # Extract the first word of "$ac_prog", so it can be a program name with args.
19073set dummy $ac_prog; ac_word=$2
19074{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19075$as_echo_n "checking for $ac_word... " >&6; }
19076if ${ac_cv_path_POTENTIAL_CC+:} false; then :
19077  $as_echo_n "(cached) " >&6
19078else
19079  case $POTENTIAL_CC in
19080  [\\/]* | ?:[\\/]*)
19081  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
19082  ;;
19083  *)
19084  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19085for as_dir in $PATH
19086do
19087  IFS=$as_save_IFS
19088  test -z "$as_dir" && as_dir=.
19089    for ac_exec_ext in '' $ac_executable_extensions; do
19090  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19091    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
19092    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19093    break 2
19094  fi
19095done
19096  done
19097IFS=$as_save_IFS
19098
19099  ;;
19100esac
19101fi
19102POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
19103if test -n "$POTENTIAL_CC"; then
19104  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
19105$as_echo "$POTENTIAL_CC" >&6; }
19106else
19107  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19108$as_echo "no" >&6; }
19109fi
19110
19111
19112  test -n "$POTENTIAL_CC" && break
19113done
19114
19115    CC=$POTENTIAL_CC
19116  fi
19117
19118  if test "x$CC" = x; then
19119
19120  # Print a helpful message on how to acquire the necessary build dependency.
19121  # devkit is the help tag: freetyp2, cups, pulse, alsa etc
19122  MISSING_DEPENDENCY=devkit
19123  PKGHANDLER_COMMAND=
19124
19125  case $PKGHANDLER in
19126    apt-get)
19127      apt_help     $MISSING_DEPENDENCY ;;
19128    yum)
19129      yum_help     $MISSING_DEPENDENCY ;;
19130    port)
19131      port_help    $MISSING_DEPENDENCY ;;
19132    pkgutil)
19133      pkgutil_help $MISSING_DEPENDENCY ;;
19134    pkgadd)
19135      pkgadd_help  $MISSING_DEPENDENCY ;;
19136    * )
19137      break ;;
19138  esac
19139
19140  if test "x$PKGHANDLER_COMMAND" != x; then
19141    HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
19142  fi
19143
19144    as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
19145  fi
19146
19147  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19148
19149  # First separate the path from the arguments. This will split at the first
19150  # space.
19151  complete="$CC"
19152  path="${complete%% *}"
19153  tmp="$complete EOL"
19154  arguments="${tmp#* }"
19155
19156  # Input might be given as Windows format, start by converting to
19157  # unix format.
19158  new_path=`$CYGPATH -u "$path"`
19159
19160  # Now try to locate executable using which
19161  new_path=`$WHICH "$new_path" 2> /dev/null`
19162  # bat and cmd files are not always considered executable in cygwin causing which
19163  # to not find them
19164  if test "x$new_path" = x \
19165      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19166      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19167    new_path=`$CYGPATH -u "$path"`
19168  fi
19169  if test "x$new_path" = x; then
19170    # Oops. Which didn't find the executable.
19171    # The splitting of arguments from the executable at a space might have been incorrect,
19172    # since paths with space are more likely in Windows. Give it another try with the whole
19173    # argument.
19174    path="$complete"
19175    arguments="EOL"
19176    new_path=`$CYGPATH -u "$path"`
19177    new_path=`$WHICH "$new_path" 2> /dev/null`
19178    # bat and cmd files are not always considered executable in cygwin causing which
19179    # to not find them
19180    if test "x$new_path" = x \
19181        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19182        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19183      new_path=`$CYGPATH -u "$path"`
19184    fi
19185    if test "x$new_path" = x; then
19186      # It's still not found. Now this is an unrecoverable error.
19187      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
19188$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
19189      has_space=`$ECHO "$complete" | $GREP " "`
19190      if test "x$has_space" != x; then
19191        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19192$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19193      fi
19194      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
19195    fi
19196  fi
19197
19198  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19199  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19200  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19201  # "foo.exe" is OK but "foo" is an error.
19202  #
19203  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19204  # It is also a way to make sure we got the proper file name for the real test later on.
19205  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19206  if test "x$test_shortpath" = x; then
19207    # Short path failed, file does not exist as specified.
19208    # Try adding .exe or .cmd
19209    if test -f "${new_path}.exe"; then
19210      input_to_shortpath="${new_path}.exe"
19211    elif test -f "${new_path}.cmd"; then
19212      input_to_shortpath="${new_path}.cmd"
19213    else
19214      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
19215$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
19216      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19217$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19218      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
19219    fi
19220  else
19221    input_to_shortpath="$new_path"
19222  fi
19223
19224  # Call helper function which possibly converts this using DOS-style short mode.
19225  # If so, the updated path is stored in $new_path.
19226  new_path="$input_to_shortpath"
19227
19228  input_path="$input_to_shortpath"
19229  # Check if we need to convert this using DOS-style short mode. If the path
19230  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19231  # take no chances and rewrite it.
19232  # Note: m4 eats our [], so we need to use [ and ] instead.
19233  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19234  if test "x$has_forbidden_chars" != x; then
19235    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19236    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19237    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19238    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19239      # Going to short mode and back again did indeed matter. Since short mode is
19240      # case insensitive, let's make it lowercase to improve readability.
19241      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19242      # Now convert it back to Unix-stile (cygpath)
19243      input_path=`$CYGPATH -u "$shortmode_path"`
19244      new_path="$input_path"
19245    fi
19246  fi
19247
19248  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19249  if test "x$test_cygdrive_prefix" = x; then
19250    # As a simple fix, exclude /usr/bin since it's not a real path.
19251    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19252      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19253      # a path prefixed by /cygdrive for fixpath to work.
19254      new_path="$CYGWIN_ROOT_PATH$input_path"
19255    fi
19256  fi
19257
19258  # remove trailing .exe if any
19259  new_path="${new_path/%.exe/}"
19260
19261  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19262
19263  # First separate the path from the arguments. This will split at the first
19264  # space.
19265  complete="$CC"
19266  path="${complete%% *}"
19267  tmp="$complete EOL"
19268  arguments="${tmp#* }"
19269
19270  # Input might be given as Windows format, start by converting to
19271  # unix format.
19272  new_path="$path"
19273
19274  windows_path="$new_path"
19275  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19276    unix_path=`$CYGPATH -u "$windows_path"`
19277    new_path="$unix_path"
19278  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19279    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19280    new_path="$unix_path"
19281  fi
19282
19283
19284  # Now try to locate executable using which
19285  new_path=`$WHICH "$new_path" 2> /dev/null`
19286
19287  if test "x$new_path" = x; then
19288    # Oops. Which didn't find the executable.
19289    # The splitting of arguments from the executable at a space might have been incorrect,
19290    # since paths with space are more likely in Windows. Give it another try with the whole
19291    # argument.
19292    path="$complete"
19293    arguments="EOL"
19294    new_path="$path"
19295
19296  windows_path="$new_path"
19297  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19298    unix_path=`$CYGPATH -u "$windows_path"`
19299    new_path="$unix_path"
19300  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19301    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19302    new_path="$unix_path"
19303  fi
19304
19305
19306    new_path=`$WHICH "$new_path" 2> /dev/null`
19307
19308    if test "x$new_path" = x; then
19309      # It's still not found. Now this is an unrecoverable error.
19310      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
19311$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
19312      has_space=`$ECHO "$complete" | $GREP " "`
19313      if test "x$has_space" != x; then
19314        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19315$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19316      fi
19317      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
19318    fi
19319  fi
19320
19321  # Now new_path has a complete unix path to the binary
19322  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19323    # Keep paths in /bin as-is, but remove trailing .exe if any
19324    new_path="${new_path/%.exe/}"
19325    # Do not save /bin paths to all_fixpath_prefixes!
19326  else
19327    # Not in mixed or Windows style, start by that.
19328    new_path=`cmd //c echo $new_path`
19329
19330  input_path="$new_path"
19331  # Check if we need to convert this using DOS-style short mode. If the path
19332  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19333  # take no chances and rewrite it.
19334  # Note: m4 eats our [], so we need to use [ and ] instead.
19335  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19336  if test "x$has_forbidden_chars" != x; then
19337    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19338    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19339  fi
19340
19341    # Output is in $new_path
19342
19343  windows_path="$new_path"
19344  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19345    unix_path=`$CYGPATH -u "$windows_path"`
19346    new_path="$unix_path"
19347  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19348    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19349    new_path="$unix_path"
19350  fi
19351
19352    # remove trailing .exe if any
19353    new_path="${new_path/%.exe/}"
19354
19355    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19356    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19357  fi
19358
19359  else
19360    # We're on a posix platform. Hooray! :)
19361    # First separate the path from the arguments. This will split at the first
19362    # space.
19363    complete="$CC"
19364    path="${complete%% *}"
19365    tmp="$complete EOL"
19366    arguments="${tmp#* }"
19367
19368    # Cannot rely on the command "which" here since it doesn't always work.
19369    is_absolute_path=`$ECHO "$path" | $GREP ^/`
19370    if test -z "$is_absolute_path"; then
19371      # Path to executable is not absolute. Find it.
19372      IFS_save="$IFS"
19373      IFS=:
19374      for p in $PATH; do
19375        if test -f "$p/$path" && test -x "$p/$path"; then
19376          new_path="$p/$path"
19377          break
19378        fi
19379      done
19380      IFS="$IFS_save"
19381    else
19382      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CC (as $path) failed, using $path directly." >&5
19383$as_echo "$as_me: Resolving CC (as $path) failed, using $path directly." >&6;}
19384      new_path="$path"
19385    fi
19386
19387    if test "x$new_path" = x; then
19388      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
19389$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
19390      has_space=`$ECHO "$complete" | $GREP " "`
19391      if test "x$has_space" != x; then
19392        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19393$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19394      fi
19395      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
19396    fi
19397  fi
19398
19399  # Now join together the path and the arguments once again
19400  if test "x$arguments" != xEOL; then
19401    new_complete="$new_path ${arguments% *}"
19402  else
19403    new_complete="$new_path"
19404  fi
19405
19406  if test "x$complete" != "x$new_complete"; then
19407    CC="$new_complete"
19408    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
19409$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
19410  fi
19411
19412  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
19413$as_echo_n "checking resolved symbolic links for CC... " >&6; }
19414  TEST_COMPILER="$CC"
19415
19416  if test "x$OPENJDK_BUILD_OS" != xwindows; then
19417    # Follow a chain of symbolic links. Use readlink
19418    # where it exists, else fall back to horribly
19419    # complicated shell code.
19420    if test "x$READLINK_TESTED" != yes; then
19421      # On MacOSX there is a readlink tool with a different
19422      # purpose than the GNU readlink tool. Check the found readlink.
19423      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
19424      if test "x$ISGNU" = x; then
19425        # A readlink that we do not know how to use.
19426        # Are there other non-GNU readlinks out there?
19427        READLINK_TESTED=yes
19428        READLINK=
19429      fi
19430    fi
19431
19432    if test "x$READLINK" != x; then
19433      TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
19434    else
19435      # Save the current directory for restoring afterwards
19436      STARTDIR=$PWD
19437      COUNTER=0
19438      sym_link_dir=`$DIRNAME $TEST_COMPILER`
19439      sym_link_file=`$BASENAME $TEST_COMPILER`
19440      cd $sym_link_dir
19441      # Use -P flag to resolve symlinks in directories.
19442      cd `$THEPWDCMD -P`
19443      sym_link_dir=`$THEPWDCMD -P`
19444      # Resolve file symlinks
19445      while test $COUNTER -lt 20; do
19446        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
19447        if test "x$ISLINK" == x; then
19448          # This is not a symbolic link! We are done!
19449          break
19450        fi
19451        # Again resolve directory symlinks since the target of the just found
19452        # link could be in a different directory
19453        cd `$DIRNAME $ISLINK`
19454        sym_link_dir=`$THEPWDCMD -P`
19455        sym_link_file=`$BASENAME $ISLINK`
19456        let COUNTER=COUNTER+1
19457      done
19458      cd $STARTDIR
19459      TEST_COMPILER=$sym_link_dir/$sym_link_file
19460    fi
19461  fi
19462
19463  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
19464$as_echo "$TEST_COMPILER" >&6; }
19465  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
19466$as_echo_n "checking if CC is disguised ccache... " >&6; }
19467
19468  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
19469  if test "x$COMPILER_BASENAME" = "xccache"; then
19470    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
19471$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
19472    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
19473    # We want to control ccache invocation ourselves, so ignore this cc and try
19474    # searching again.
19475
19476    # Remove the path to the fake ccache cc from the PATH
19477    RETRY_COMPILER_SAVED_PATH="$PATH"
19478    COMPILER_DIRNAME=`$DIRNAME $CC`
19479    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
19480
19481    # Try again looking for our compiler
19482    if test -n "$ac_tool_prefix"; then
19483  for ac_prog in $COMPILER_CHECK_LIST
19484  do
19485    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
19486set dummy $ac_tool_prefix$ac_prog; ac_word=$2
19487{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19488$as_echo_n "checking for $ac_word... " >&6; }
19489if ${ac_cv_prog_PROPER_COMPILER_CC+:} false; then :
19490  $as_echo_n "(cached) " >&6
19491else
19492  if test -n "$PROPER_COMPILER_CC"; then
19493  ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
19494else
19495as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19496for as_dir in $PATH
19497do
19498  IFS=$as_save_IFS
19499  test -z "$as_dir" && as_dir=.
19500    for ac_exec_ext in '' $ac_executable_extensions; do
19501  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19502    ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
19503    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19504    break 2
19505  fi
19506done
19507  done
19508IFS=$as_save_IFS
19509
19510fi
19511fi
19512PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
19513if test -n "$PROPER_COMPILER_CC"; then
19514  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
19515$as_echo "$PROPER_COMPILER_CC" >&6; }
19516else
19517  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19518$as_echo "no" >&6; }
19519fi
19520
19521
19522    test -n "$PROPER_COMPILER_CC" && break
19523  done
19524fi
19525if test -z "$PROPER_COMPILER_CC"; then
19526  ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
19527  for ac_prog in $COMPILER_CHECK_LIST
19528do
19529  # Extract the first word of "$ac_prog", so it can be a program name with args.
19530set dummy $ac_prog; ac_word=$2
19531{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19532$as_echo_n "checking for $ac_word... " >&6; }
19533if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+:} false; then :
19534  $as_echo_n "(cached) " >&6
19535else
19536  if test -n "$ac_ct_PROPER_COMPILER_CC"; then
19537  ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
19538else
19539as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19540for as_dir in $PATH
19541do
19542  IFS=$as_save_IFS
19543  test -z "$as_dir" && as_dir=.
19544    for ac_exec_ext in '' $ac_executable_extensions; do
19545  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19546    ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
19547    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19548    break 2
19549  fi
19550done
19551  done
19552IFS=$as_save_IFS
19553
19554fi
19555fi
19556ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
19557if test -n "$ac_ct_PROPER_COMPILER_CC"; then
19558  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
19559$as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
19560else
19561  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19562$as_echo "no" >&6; }
19563fi
19564
19565
19566  test -n "$ac_ct_PROPER_COMPILER_CC" && break
19567done
19568
19569  if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
19570    PROPER_COMPILER_CC=""
19571  else
19572    case $cross_compiling:$ac_tool_warned in
19573yes:)
19574{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19575$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19576ac_tool_warned=yes ;;
19577esac
19578    PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
19579  fi
19580fi
19581
19582
19583  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19584
19585  # First separate the path from the arguments. This will split at the first
19586  # space.
19587  complete="$PROPER_COMPILER_CC"
19588  path="${complete%% *}"
19589  tmp="$complete EOL"
19590  arguments="${tmp#* }"
19591
19592  # Input might be given as Windows format, start by converting to
19593  # unix format.
19594  new_path=`$CYGPATH -u "$path"`
19595
19596  # Now try to locate executable using which
19597  new_path=`$WHICH "$new_path" 2> /dev/null`
19598  # bat and cmd files are not always considered executable in cygwin causing which
19599  # to not find them
19600  if test "x$new_path" = x \
19601      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19602      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19603    new_path=`$CYGPATH -u "$path"`
19604  fi
19605  if test "x$new_path" = x; then
19606    # Oops. Which didn't find the executable.
19607    # The splitting of arguments from the executable at a space might have been incorrect,
19608    # since paths with space are more likely in Windows. Give it another try with the whole
19609    # argument.
19610    path="$complete"
19611    arguments="EOL"
19612    new_path=`$CYGPATH -u "$path"`
19613    new_path=`$WHICH "$new_path" 2> /dev/null`
19614    # bat and cmd files are not always considered executable in cygwin causing which
19615    # to not find them
19616    if test "x$new_path" = x \
19617        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19618        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19619      new_path=`$CYGPATH -u "$path"`
19620    fi
19621    if test "x$new_path" = x; then
19622      # It's still not found. Now this is an unrecoverable error.
19623      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
19624$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
19625      has_space=`$ECHO "$complete" | $GREP " "`
19626      if test "x$has_space" != x; then
19627        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19628$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19629      fi
19630      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19631    fi
19632  fi
19633
19634  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19635  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19636  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19637  # "foo.exe" is OK but "foo" is an error.
19638  #
19639  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19640  # It is also a way to make sure we got the proper file name for the real test later on.
19641  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19642  if test "x$test_shortpath" = x; then
19643    # Short path failed, file does not exist as specified.
19644    # Try adding .exe or .cmd
19645    if test -f "${new_path}.exe"; then
19646      input_to_shortpath="${new_path}.exe"
19647    elif test -f "${new_path}.cmd"; then
19648      input_to_shortpath="${new_path}.cmd"
19649    else
19650      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
19651$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
19652      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19653$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19654      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19655    fi
19656  else
19657    input_to_shortpath="$new_path"
19658  fi
19659
19660  # Call helper function which possibly converts this using DOS-style short mode.
19661  # If so, the updated path is stored in $new_path.
19662  new_path="$input_to_shortpath"
19663
19664  input_path="$input_to_shortpath"
19665  # Check if we need to convert this using DOS-style short mode. If the path
19666  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19667  # take no chances and rewrite it.
19668  # Note: m4 eats our [], so we need to use [ and ] instead.
19669  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19670  if test "x$has_forbidden_chars" != x; then
19671    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19672    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19673    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19674    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19675      # Going to short mode and back again did indeed matter. Since short mode is
19676      # case insensitive, let's make it lowercase to improve readability.
19677      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19678      # Now convert it back to Unix-stile (cygpath)
19679      input_path=`$CYGPATH -u "$shortmode_path"`
19680      new_path="$input_path"
19681    fi
19682  fi
19683
19684  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19685  if test "x$test_cygdrive_prefix" = x; then
19686    # As a simple fix, exclude /usr/bin since it's not a real path.
19687    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19688      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19689      # a path prefixed by /cygdrive for fixpath to work.
19690      new_path="$CYGWIN_ROOT_PATH$input_path"
19691    fi
19692  fi
19693
19694  # remove trailing .exe if any
19695  new_path="${new_path/%.exe/}"
19696
19697  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19698
19699  # First separate the path from the arguments. This will split at the first
19700  # space.
19701  complete="$PROPER_COMPILER_CC"
19702  path="${complete%% *}"
19703  tmp="$complete EOL"
19704  arguments="${tmp#* }"
19705
19706  # Input might be given as Windows format, start by converting to
19707  # unix format.
19708  new_path="$path"
19709
19710  windows_path="$new_path"
19711  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19712    unix_path=`$CYGPATH -u "$windows_path"`
19713    new_path="$unix_path"
19714  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19715    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19716    new_path="$unix_path"
19717  fi
19718
19719
19720  # Now try to locate executable using which
19721  new_path=`$WHICH "$new_path" 2> /dev/null`
19722
19723  if test "x$new_path" = x; then
19724    # Oops. Which didn't find the executable.
19725    # The splitting of arguments from the executable at a space might have been incorrect,
19726    # since paths with space are more likely in Windows. Give it another try with the whole
19727    # argument.
19728    path="$complete"
19729    arguments="EOL"
19730    new_path="$path"
19731
19732  windows_path="$new_path"
19733  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19734    unix_path=`$CYGPATH -u "$windows_path"`
19735    new_path="$unix_path"
19736  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19737    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19738    new_path="$unix_path"
19739  fi
19740
19741
19742    new_path=`$WHICH "$new_path" 2> /dev/null`
19743
19744    if test "x$new_path" = x; then
19745      # It's still not found. Now this is an unrecoverable error.
19746      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
19747$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
19748      has_space=`$ECHO "$complete" | $GREP " "`
19749      if test "x$has_space" != x; then
19750        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19751$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19752      fi
19753      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19754    fi
19755  fi
19756
19757  # Now new_path has a complete unix path to the binary
19758  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19759    # Keep paths in /bin as-is, but remove trailing .exe if any
19760    new_path="${new_path/%.exe/}"
19761    # Do not save /bin paths to all_fixpath_prefixes!
19762  else
19763    # Not in mixed or Windows style, start by that.
19764    new_path=`cmd //c echo $new_path`
19765
19766  input_path="$new_path"
19767  # Check if we need to convert this using DOS-style short mode. If the path
19768  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19769  # take no chances and rewrite it.
19770  # Note: m4 eats our [], so we need to use [ and ] instead.
19771  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19772  if test "x$has_forbidden_chars" != x; then
19773    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19774    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19775  fi
19776
19777    # Output is in $new_path
19778
19779  windows_path="$new_path"
19780  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19781    unix_path=`$CYGPATH -u "$windows_path"`
19782    new_path="$unix_path"
19783  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19784    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19785    new_path="$unix_path"
19786  fi
19787
19788    # remove trailing .exe if any
19789    new_path="${new_path/%.exe/}"
19790
19791    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19792    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19793  fi
19794
19795  else
19796    # We're on a posix platform. Hooray! :)
19797    # First separate the path from the arguments. This will split at the first
19798    # space.
19799    complete="$PROPER_COMPILER_CC"
19800    path="${complete%% *}"
19801    tmp="$complete EOL"
19802    arguments="${tmp#* }"
19803
19804    # Cannot rely on the command "which" here since it doesn't always work.
19805    is_absolute_path=`$ECHO "$path" | $GREP ^/`
19806    if test -z "$is_absolute_path"; then
19807      # Path to executable is not absolute. Find it.
19808      IFS_save="$IFS"
19809      IFS=:
19810      for p in $PATH; do
19811        if test -f "$p/$path" && test -x "$p/$path"; then
19812          new_path="$p/$path"
19813          break
19814        fi
19815      done
19816      IFS="$IFS_save"
19817    else
19818      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&5
19819$as_echo "$as_me: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&6;}
19820      new_path="$path"
19821    fi
19822
19823    if test "x$new_path" = x; then
19824      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
19825$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
19826      has_space=`$ECHO "$complete" | $GREP " "`
19827      if test "x$has_space" != x; then
19828        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19829$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19830      fi
19831      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19832    fi
19833  fi
19834
19835  # Now join together the path and the arguments once again
19836  if test "x$arguments" != xEOL; then
19837    new_complete="$new_path ${arguments% *}"
19838  else
19839    new_complete="$new_path"
19840  fi
19841
19842  if test "x$complete" != "x$new_complete"; then
19843    PROPER_COMPILER_CC="$new_complete"
19844    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
19845$as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
19846  fi
19847
19848    PATH="$RETRY_COMPILER_SAVED_PATH"
19849
19850    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
19851$as_echo_n "checking for resolved symbolic links for CC... " >&6; }
19852
19853  if test "x$OPENJDK_BUILD_OS" != xwindows; then
19854    # Follow a chain of symbolic links. Use readlink
19855    # where it exists, else fall back to horribly
19856    # complicated shell code.
19857    if test "x$READLINK_TESTED" != yes; then
19858      # On MacOSX there is a readlink tool with a different
19859      # purpose than the GNU readlink tool. Check the found readlink.
19860      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
19861      if test "x$ISGNU" = x; then
19862        # A readlink that we do not know how to use.
19863        # Are there other non-GNU readlinks out there?
19864        READLINK_TESTED=yes
19865        READLINK=
19866      fi
19867    fi
19868
19869    if test "x$READLINK" != x; then
19870      PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
19871    else
19872      # Save the current directory for restoring afterwards
19873      STARTDIR=$PWD
19874      COUNTER=0
19875      sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
19876      sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
19877      cd $sym_link_dir
19878      # Use -P flag to resolve symlinks in directories.
19879      cd `$THEPWDCMD -P`
19880      sym_link_dir=`$THEPWDCMD -P`
19881      # Resolve file symlinks
19882      while test $COUNTER -lt 20; do
19883        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
19884        if test "x$ISLINK" == x; then
19885          # This is not a symbolic link! We are done!
19886          break
19887        fi
19888        # Again resolve directory symlinks since the target of the just found
19889        # link could be in a different directory
19890        cd `$DIRNAME $ISLINK`
19891        sym_link_dir=`$THEPWDCMD -P`
19892        sym_link_file=`$BASENAME $ISLINK`
19893        let COUNTER=COUNTER+1
19894      done
19895      cd $STARTDIR
19896      PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
19897    fi
19898  fi
19899
19900    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
19901$as_echo "$PROPER_COMPILER_CC" >&6; }
19902    CC="$PROPER_COMPILER_CC"
19903  else
19904    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
19905$as_echo "no, keeping CC" >&6; }
19906    CC="$TEST_COMPILER"
19907  fi
19908
19909  COMPILER=$CC
19910  COMPILER_NAME=$COMPILER_NAME
19911
19912  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
19913    # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
19914    COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
19915    $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
19916    if test $? -ne 0; then
19917      GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
19918
19919      { $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
19920$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
19921      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
19922$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
19923      as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
19924    else
19925      COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
19926      COMPILER_VENDOR="Sun Studio"
19927    fi
19928  elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
19929    # First line typically looks something like:
19930    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
19931    COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
19932    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
19933    COMPILER_VENDOR="Microsoft CL.EXE"
19934    COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
19935    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
19936      if test "x$COMPILER_CPU_TEST" != "x80x86"; then
19937        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
19938      fi
19939    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
19940      if test "x$COMPILER_CPU_TEST" != "xx64"; then
19941        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
19942      fi
19943    fi
19944  else
19945    COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
19946    # Check that this is likely to be GCC.
19947    $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
19948    if test $? -ne 0; then
19949      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
19950$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
19951      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
19952$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
19953      as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
19954    fi
19955
19956    # First line typically looks something like:
19957    # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
19958    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
19959    COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
19960  fi
19961  # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
19962  CC_VERSION="$COMPILER_VERSION"
19963  # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
19964  CC_VENDOR="$COMPILER_VENDOR"
19965
19966  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
19967$as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
19968
19969
19970  # Now that we have resolved CC ourself, let autoconf have its go at it
19971  ac_ext=c
19972ac_cpp='$CPP $CPPFLAGS'
19973ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19974ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19975ac_compiler_gnu=$ac_cv_c_compiler_gnu
19976if test -n "$ac_tool_prefix"; then
19977  for ac_prog in $CC
19978  do
19979    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
19980set dummy $ac_tool_prefix$ac_prog; ac_word=$2
19981{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19982$as_echo_n "checking for $ac_word... " >&6; }
19983if ${ac_cv_prog_CC+:} false; then :
19984  $as_echo_n "(cached) " >&6
19985else
19986  if test -n "$CC"; then
19987  ac_cv_prog_CC="$CC" # Let the user override the test.
19988else
19989as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19990for as_dir in $PATH
19991do
19992  IFS=$as_save_IFS
19993  test -z "$as_dir" && as_dir=.
19994    for ac_exec_ext in '' $ac_executable_extensions; do
19995  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19996    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
19997    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19998    break 2
19999  fi
20000done
20001  done
20002IFS=$as_save_IFS
20003
20004fi
20005fi
20006CC=$ac_cv_prog_CC
20007if test -n "$CC"; then
20008  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
20009$as_echo "$CC" >&6; }
20010else
20011  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20012$as_echo "no" >&6; }
20013fi
20014
20015
20016    test -n "$CC" && break
20017  done
20018fi
20019if test -z "$CC"; then
20020  ac_ct_CC=$CC
20021  for ac_prog in $CC
20022do
20023  # Extract the first word of "$ac_prog", so it can be a program name with args.
20024set dummy $ac_prog; ac_word=$2
20025{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20026$as_echo_n "checking for $ac_word... " >&6; }
20027if ${ac_cv_prog_ac_ct_CC+:} false; then :
20028  $as_echo_n "(cached) " >&6
20029else
20030  if test -n "$ac_ct_CC"; then
20031  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
20032else
20033as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20034for as_dir in $PATH
20035do
20036  IFS=$as_save_IFS
20037  test -z "$as_dir" && as_dir=.
20038    for ac_exec_ext in '' $ac_executable_extensions; do
20039  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20040    ac_cv_prog_ac_ct_CC="$ac_prog"
20041    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20042    break 2
20043  fi
20044done
20045  done
20046IFS=$as_save_IFS
20047
20048fi
20049fi
20050ac_ct_CC=$ac_cv_prog_ac_ct_CC
20051if test -n "$ac_ct_CC"; then
20052  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
20053$as_echo "$ac_ct_CC" >&6; }
20054else
20055  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20056$as_echo "no" >&6; }
20057fi
20058
20059
20060  test -n "$ac_ct_CC" && break
20061done
20062
20063  if test "x$ac_ct_CC" = x; then
20064    CC=""
20065  else
20066    case $cross_compiling:$ac_tool_warned in
20067yes:)
20068{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
20069$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
20070ac_tool_warned=yes ;;
20071esac
20072    CC=$ac_ct_CC
20073  fi
20074fi
20075
20076
20077test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20078$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20079as_fn_error $? "no acceptable C compiler found in \$PATH
20080See \`config.log' for more details" "$LINENO" 5; }
20081
20082# Provide some information about the compiler.
20083$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
20084set X $ac_compile
20085ac_compiler=$2
20086for ac_option in --version -v -V -qversion; do
20087  { { ac_try="$ac_compiler $ac_option >&5"
20088case "(($ac_try" in
20089  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20090  *) ac_try_echo=$ac_try;;
20091esac
20092eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20093$as_echo "$ac_try_echo"; } >&5
20094  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
20095  ac_status=$?
20096  if test -s conftest.err; then
20097    sed '10a\
20098... rest of stderr output deleted ...
20099         10q' conftest.err >conftest.er1
20100    cat conftest.er1 >&5
20101  fi
20102  rm -f conftest.er1 conftest.err
20103  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20104  test $ac_status = 0; }
20105done
20106
20107cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20108/* end confdefs.h.  */
20109
20110int
20111main ()
20112{
20113
20114  ;
20115  return 0;
20116}
20117_ACEOF
20118ac_clean_files_save=$ac_clean_files
20119ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
20120# Try to create an executable without -o first, disregard a.out.
20121# It will help us diagnose broken compilers, and finding out an intuition
20122# of exeext.
20123{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
20124$as_echo_n "checking whether the C compiler works... " >&6; }
20125ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
20126
20127# The possible output files:
20128ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
20129
20130ac_rmfiles=
20131for ac_file in $ac_files
20132do
20133  case $ac_file in
20134    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
20135    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
20136  esac
20137done
20138rm -f $ac_rmfiles
20139
20140if { { ac_try="$ac_link_default"
20141case "(($ac_try" in
20142  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20143  *) ac_try_echo=$ac_try;;
20144esac
20145eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20146$as_echo "$ac_try_echo"; } >&5
20147  (eval "$ac_link_default") 2>&5
20148  ac_status=$?
20149  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20150  test $ac_status = 0; }; then :
20151  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
20152# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
20153# in a Makefile.  We should not override ac_cv_exeext if it was cached,
20154# so that the user can short-circuit this test for compilers unknown to
20155# Autoconf.
20156for ac_file in $ac_files ''
20157do
20158  test -f "$ac_file" || continue
20159  case $ac_file in
20160    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
20161	;;
20162    [ab].out )
20163	# We found the default executable, but exeext='' is most
20164	# certainly right.
20165	break;;
20166    *.* )
20167	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
20168	then :; else
20169	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
20170	fi
20171	# We set ac_cv_exeext here because the later test for it is not
20172	# safe: cross compilers may not add the suffix if given an `-o'
20173	# argument, so we may need to know it at that point already.
20174	# Even if this section looks crufty: it has the advantage of
20175	# actually working.
20176	break;;
20177    * )
20178	break;;
20179  esac
20180done
20181test "$ac_cv_exeext" = no && ac_cv_exeext=
20182
20183else
20184  ac_file=''
20185fi
20186if test -z "$ac_file"; then :
20187  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20188$as_echo "no" >&6; }
20189$as_echo "$as_me: failed program was:" >&5
20190sed 's/^/| /' conftest.$ac_ext >&5
20191
20192{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20193$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20194as_fn_error 77 "C compiler cannot create executables
20195See \`config.log' for more details" "$LINENO" 5; }
20196else
20197  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20198$as_echo "yes" >&6; }
20199fi
20200{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
20201$as_echo_n "checking for C compiler default output file name... " >&6; }
20202{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
20203$as_echo "$ac_file" >&6; }
20204ac_exeext=$ac_cv_exeext
20205
20206rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
20207ac_clean_files=$ac_clean_files_save
20208{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
20209$as_echo_n "checking for suffix of executables... " >&6; }
20210if { { ac_try="$ac_link"
20211case "(($ac_try" in
20212  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20213  *) ac_try_echo=$ac_try;;
20214esac
20215eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20216$as_echo "$ac_try_echo"; } >&5
20217  (eval "$ac_link") 2>&5
20218  ac_status=$?
20219  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20220  test $ac_status = 0; }; then :
20221  # If both `conftest.exe' and `conftest' are `present' (well, observable)
20222# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
20223# work properly (i.e., refer to `conftest.exe'), while it won't with
20224# `rm'.
20225for ac_file in conftest.exe conftest conftest.*; do
20226  test -f "$ac_file" || continue
20227  case $ac_file in
20228    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
20229    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
20230	  break;;
20231    * ) break;;
20232  esac
20233done
20234else
20235  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20236$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20237as_fn_error $? "cannot compute suffix of executables: cannot compile and link
20238See \`config.log' for more details" "$LINENO" 5; }
20239fi
20240rm -f conftest conftest$ac_cv_exeext
20241{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
20242$as_echo "$ac_cv_exeext" >&6; }
20243
20244rm -f conftest.$ac_ext
20245EXEEXT=$ac_cv_exeext
20246ac_exeext=$EXEEXT
20247cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20248/* end confdefs.h.  */
20249#include <stdio.h>
20250int
20251main ()
20252{
20253FILE *f = fopen ("conftest.out", "w");
20254 return ferror (f) || fclose (f) != 0;
20255
20256  ;
20257  return 0;
20258}
20259_ACEOF
20260ac_clean_files="$ac_clean_files conftest.out"
20261# Check that the compiler produces executables we can run.  If not, either
20262# the compiler is broken, or we cross compile.
20263{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
20264$as_echo_n "checking whether we are cross compiling... " >&6; }
20265if test "$cross_compiling" != yes; then
20266  { { ac_try="$ac_link"
20267case "(($ac_try" in
20268  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20269  *) ac_try_echo=$ac_try;;
20270esac
20271eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20272$as_echo "$ac_try_echo"; } >&5
20273  (eval "$ac_link") 2>&5
20274  ac_status=$?
20275  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20276  test $ac_status = 0; }
20277  if { ac_try='./conftest$ac_cv_exeext'
20278  { { case "(($ac_try" in
20279  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20280  *) ac_try_echo=$ac_try;;
20281esac
20282eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20283$as_echo "$ac_try_echo"; } >&5
20284  (eval "$ac_try") 2>&5
20285  ac_status=$?
20286  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20287  test $ac_status = 0; }; }; then
20288    cross_compiling=no
20289  else
20290    if test "$cross_compiling" = maybe; then
20291	cross_compiling=yes
20292    else
20293	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20294$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20295as_fn_error $? "cannot run C compiled programs.
20296If you meant to cross compile, use \`--host'.
20297See \`config.log' for more details" "$LINENO" 5; }
20298    fi
20299  fi
20300fi
20301{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
20302$as_echo "$cross_compiling" >&6; }
20303
20304rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
20305ac_clean_files=$ac_clean_files_save
20306{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
20307$as_echo_n "checking for suffix of object files... " >&6; }
20308if ${ac_cv_objext+:} false; then :
20309  $as_echo_n "(cached) " >&6
20310else
20311  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20312/* end confdefs.h.  */
20313
20314int
20315main ()
20316{
20317
20318  ;
20319  return 0;
20320}
20321_ACEOF
20322rm -f conftest.o conftest.obj
20323if { { ac_try="$ac_compile"
20324case "(($ac_try" in
20325  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20326  *) ac_try_echo=$ac_try;;
20327esac
20328eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20329$as_echo "$ac_try_echo"; } >&5
20330  (eval "$ac_compile") 2>&5
20331  ac_status=$?
20332  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20333  test $ac_status = 0; }; then :
20334  for ac_file in conftest.o conftest.obj conftest.*; do
20335  test -f "$ac_file" || continue;
20336  case $ac_file in
20337    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
20338    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
20339       break;;
20340  esac
20341done
20342else
20343  $as_echo "$as_me: failed program was:" >&5
20344sed 's/^/| /' conftest.$ac_ext >&5
20345
20346{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20347$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20348as_fn_error $? "cannot compute suffix of object files: cannot compile
20349See \`config.log' for more details" "$LINENO" 5; }
20350fi
20351rm -f conftest.$ac_cv_objext conftest.$ac_ext
20352fi
20353{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
20354$as_echo "$ac_cv_objext" >&6; }
20355OBJEXT=$ac_cv_objext
20356ac_objext=$OBJEXT
20357{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
20358$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
20359if ${ac_cv_c_compiler_gnu+:} false; then :
20360  $as_echo_n "(cached) " >&6
20361else
20362  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20363/* end confdefs.h.  */
20364
20365int
20366main ()
20367{
20368#ifndef __GNUC__
20369       choke me
20370#endif
20371
20372  ;
20373  return 0;
20374}
20375_ACEOF
20376if ac_fn_c_try_compile "$LINENO"; then :
20377  ac_compiler_gnu=yes
20378else
20379  ac_compiler_gnu=no
20380fi
20381rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20382ac_cv_c_compiler_gnu=$ac_compiler_gnu
20383
20384fi
20385{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
20386$as_echo "$ac_cv_c_compiler_gnu" >&6; }
20387if test $ac_compiler_gnu = yes; then
20388  GCC=yes
20389else
20390  GCC=
20391fi
20392ac_test_CFLAGS=${CFLAGS+set}
20393ac_save_CFLAGS=$CFLAGS
20394{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
20395$as_echo_n "checking whether $CC accepts -g... " >&6; }
20396if ${ac_cv_prog_cc_g+:} false; then :
20397  $as_echo_n "(cached) " >&6
20398else
20399  ac_save_c_werror_flag=$ac_c_werror_flag
20400   ac_c_werror_flag=yes
20401   ac_cv_prog_cc_g=no
20402   CFLAGS="-g"
20403   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20404/* end confdefs.h.  */
20405
20406int
20407main ()
20408{
20409
20410  ;
20411  return 0;
20412}
20413_ACEOF
20414if ac_fn_c_try_compile "$LINENO"; then :
20415  ac_cv_prog_cc_g=yes
20416else
20417  CFLAGS=""
20418      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20419/* end confdefs.h.  */
20420
20421int
20422main ()
20423{
20424
20425  ;
20426  return 0;
20427}
20428_ACEOF
20429if ac_fn_c_try_compile "$LINENO"; then :
20430
20431else
20432  ac_c_werror_flag=$ac_save_c_werror_flag
20433	 CFLAGS="-g"
20434	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20435/* end confdefs.h.  */
20436
20437int
20438main ()
20439{
20440
20441  ;
20442  return 0;
20443}
20444_ACEOF
20445if ac_fn_c_try_compile "$LINENO"; then :
20446  ac_cv_prog_cc_g=yes
20447fi
20448rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20449fi
20450rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20451fi
20452rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20453   ac_c_werror_flag=$ac_save_c_werror_flag
20454fi
20455{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
20456$as_echo "$ac_cv_prog_cc_g" >&6; }
20457if test "$ac_test_CFLAGS" = set; then
20458  CFLAGS=$ac_save_CFLAGS
20459elif test $ac_cv_prog_cc_g = yes; then
20460  if test "$GCC" = yes; then
20461    CFLAGS="-g -O2"
20462  else
20463    CFLAGS="-g"
20464  fi
20465else
20466  if test "$GCC" = yes; then
20467    CFLAGS="-O2"
20468  else
20469    CFLAGS=
20470  fi
20471fi
20472{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
20473$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
20474if ${ac_cv_prog_cc_c89+:} false; then :
20475  $as_echo_n "(cached) " >&6
20476else
20477  ac_cv_prog_cc_c89=no
20478ac_save_CC=$CC
20479cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20480/* end confdefs.h.  */
20481#include <stdarg.h>
20482#include <stdio.h>
20483struct stat;
20484/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
20485struct buf { int x; };
20486FILE * (*rcsopen) (struct buf *, struct stat *, int);
20487static char *e (p, i)
20488     char **p;
20489     int i;
20490{
20491  return p[i];
20492}
20493static char *f (char * (*g) (char **, int), char **p, ...)
20494{
20495  char *s;
20496  va_list v;
20497  va_start (v,p);
20498  s = g (p, va_arg (v,int));
20499  va_end (v);
20500  return s;
20501}
20502
20503/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
20504   function prototypes and stuff, but not '\xHH' hex character constants.
20505   These don't provoke an error unfortunately, instead are silently treated
20506   as 'x'.  The following induces an error, until -std is added to get
20507   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
20508   array size at least.  It's necessary to write '\x00'==0 to get something
20509   that's true only with -std.  */
20510int osf4_cc_array ['\x00' == 0 ? 1 : -1];
20511
20512/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
20513   inside strings and character constants.  */
20514#define FOO(x) 'x'
20515int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
20516
20517int test (int i, double x);
20518struct s1 {int (*f) (int a);};
20519struct s2 {int (*f) (double a);};
20520int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
20521int argc;
20522char **argv;
20523int
20524main ()
20525{
20526return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
20527  ;
20528  return 0;
20529}
20530_ACEOF
20531for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
20532	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
20533do
20534  CC="$ac_save_CC $ac_arg"
20535  if ac_fn_c_try_compile "$LINENO"; then :
20536  ac_cv_prog_cc_c89=$ac_arg
20537fi
20538rm -f core conftest.err conftest.$ac_objext
20539  test "x$ac_cv_prog_cc_c89" != "xno" && break
20540done
20541rm -f conftest.$ac_ext
20542CC=$ac_save_CC
20543
20544fi
20545# AC_CACHE_VAL
20546case "x$ac_cv_prog_cc_c89" in
20547  x)
20548    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
20549$as_echo "none needed" >&6; } ;;
20550  xno)
20551    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
20552$as_echo "unsupported" >&6; } ;;
20553  *)
20554    CC="$CC $ac_cv_prog_cc_c89"
20555    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
20556$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
20557esac
20558if test "x$ac_cv_prog_cc_c89" != xno; then :
20559
20560fi
20561
20562ac_ext=cpp
20563ac_cpp='$CXXCPP $CPPFLAGS'
20564ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20565ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20566ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20567
20568
20569  ### Locate C++ compiler (CXX)
20570
20571  if test "x$CXX" != x; then
20572    COMPILER_CHECK_LIST="$CXX"
20573  elif test "x$OPENJDK_TARGET_OS" = "xwindows"; then
20574    COMPILER_CHECK_LIST="cl"
20575  elif test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
20576    COMPILER_CHECK_LIST="CC g++"
20577  else
20578    COMPILER_CHECK_LIST="g++ CC"
20579  fi
20580
20581
20582  COMPILER_NAME=C++
20583
20584  CXX=
20585  # If TOOLS_DIR is set, check for all compiler names in there first
20586  # before checking the rest of the PATH.
20587  if test -n "$TOOLS_DIR"; then
20588    PATH_save="$PATH"
20589    PATH="$TOOLS_DIR"
20590    for ac_prog in $COMPILER_CHECK_LIST
20591do
20592  # Extract the first word of "$ac_prog", so it can be a program name with args.
20593set dummy $ac_prog; ac_word=$2
20594{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20595$as_echo_n "checking for $ac_word... " >&6; }
20596if ${ac_cv_path_TOOLS_DIR_CXX+:} false; then :
20597  $as_echo_n "(cached) " >&6
20598else
20599  case $TOOLS_DIR_CXX in
20600  [\\/]* | ?:[\\/]*)
20601  ac_cv_path_TOOLS_DIR_CXX="$TOOLS_DIR_CXX" # Let the user override the test with a path.
20602  ;;
20603  *)
20604  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20605for as_dir in $PATH
20606do
20607  IFS=$as_save_IFS
20608  test -z "$as_dir" && as_dir=.
20609    for ac_exec_ext in '' $ac_executable_extensions; do
20610  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20611    ac_cv_path_TOOLS_DIR_CXX="$as_dir/$ac_word$ac_exec_ext"
20612    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20613    break 2
20614  fi
20615done
20616  done
20617IFS=$as_save_IFS
20618
20619  ;;
20620esac
20621fi
20622TOOLS_DIR_CXX=$ac_cv_path_TOOLS_DIR_CXX
20623if test -n "$TOOLS_DIR_CXX"; then
20624  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CXX" >&5
20625$as_echo "$TOOLS_DIR_CXX" >&6; }
20626else
20627  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20628$as_echo "no" >&6; }
20629fi
20630
20631
20632  test -n "$TOOLS_DIR_CXX" && break
20633done
20634
20635    CXX=$TOOLS_DIR_CXX
20636    PATH="$PATH_save"
20637  fi
20638
20639  # AC_PATH_PROGS can't be run multiple times with the same variable,
20640  # so create a new name for this run.
20641  if test "x$CXX" = x; then
20642    for ac_prog in $COMPILER_CHECK_LIST
20643do
20644  # Extract the first word of "$ac_prog", so it can be a program name with args.
20645set dummy $ac_prog; ac_word=$2
20646{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20647$as_echo_n "checking for $ac_word... " >&6; }
20648if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
20649  $as_echo_n "(cached) " >&6
20650else
20651  case $POTENTIAL_CXX in
20652  [\\/]* | ?:[\\/]*)
20653  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
20654  ;;
20655  *)
20656  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20657for as_dir in $PATH
20658do
20659  IFS=$as_save_IFS
20660  test -z "$as_dir" && as_dir=.
20661    for ac_exec_ext in '' $ac_executable_extensions; do
20662  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20663    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
20664    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20665    break 2
20666  fi
20667done
20668  done
20669IFS=$as_save_IFS
20670
20671  ;;
20672esac
20673fi
20674POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
20675if test -n "$POTENTIAL_CXX"; then
20676  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
20677$as_echo "$POTENTIAL_CXX" >&6; }
20678else
20679  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20680$as_echo "no" >&6; }
20681fi
20682
20683
20684  test -n "$POTENTIAL_CXX" && break
20685done
20686
20687    CXX=$POTENTIAL_CXX
20688  fi
20689
20690  if test "x$CXX" = x; then
20691
20692  # Print a helpful message on how to acquire the necessary build dependency.
20693  # devkit is the help tag: freetyp2, cups, pulse, alsa etc
20694  MISSING_DEPENDENCY=devkit
20695  PKGHANDLER_COMMAND=
20696
20697  case $PKGHANDLER in
20698    apt-get)
20699      apt_help     $MISSING_DEPENDENCY ;;
20700    yum)
20701      yum_help     $MISSING_DEPENDENCY ;;
20702    port)
20703      port_help    $MISSING_DEPENDENCY ;;
20704    pkgutil)
20705      pkgutil_help $MISSING_DEPENDENCY ;;
20706    pkgadd)
20707      pkgadd_help  $MISSING_DEPENDENCY ;;
20708    * )
20709      break ;;
20710  esac
20711
20712  if test "x$PKGHANDLER_COMMAND" != x; then
20713    HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
20714  fi
20715
20716    as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
20717  fi
20718
20719  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20720
20721  # First separate the path from the arguments. This will split at the first
20722  # space.
20723  complete="$CXX"
20724  path="${complete%% *}"
20725  tmp="$complete EOL"
20726  arguments="${tmp#* }"
20727
20728  # Input might be given as Windows format, start by converting to
20729  # unix format.
20730  new_path=`$CYGPATH -u "$path"`
20731
20732  # Now try to locate executable using which
20733  new_path=`$WHICH "$new_path" 2> /dev/null`
20734  # bat and cmd files are not always considered executable in cygwin causing which
20735  # to not find them
20736  if test "x$new_path" = x \
20737      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20738      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20739    new_path=`$CYGPATH -u "$path"`
20740  fi
20741  if test "x$new_path" = x; then
20742    # Oops. Which didn't find the executable.
20743    # The splitting of arguments from the executable at a space might have been incorrect,
20744    # since paths with space are more likely in Windows. Give it another try with the whole
20745    # argument.
20746    path="$complete"
20747    arguments="EOL"
20748    new_path=`$CYGPATH -u "$path"`
20749    new_path=`$WHICH "$new_path" 2> /dev/null`
20750    # bat and cmd files are not always considered executable in cygwin causing which
20751    # to not find them
20752    if test "x$new_path" = x \
20753        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20754        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20755      new_path=`$CYGPATH -u "$path"`
20756    fi
20757    if test "x$new_path" = x; then
20758      # It's still not found. Now this is an unrecoverable error.
20759      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
20760$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
20761      has_space=`$ECHO "$complete" | $GREP " "`
20762      if test "x$has_space" != x; then
20763        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20764$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20765      fi
20766      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20767    fi
20768  fi
20769
20770  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20771  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20772  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20773  # "foo.exe" is OK but "foo" is an error.
20774  #
20775  # This test is therefore slightly more accurate than "test -f" to check for file presence.
20776  # It is also a way to make sure we got the proper file name for the real test later on.
20777  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20778  if test "x$test_shortpath" = x; then
20779    # Short path failed, file does not exist as specified.
20780    # Try adding .exe or .cmd
20781    if test -f "${new_path}.exe"; then
20782      input_to_shortpath="${new_path}.exe"
20783    elif test -f "${new_path}.cmd"; then
20784      input_to_shortpath="${new_path}.cmd"
20785    else
20786      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
20787$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
20788      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20789$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20790      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20791    fi
20792  else
20793    input_to_shortpath="$new_path"
20794  fi
20795
20796  # Call helper function which possibly converts this using DOS-style short mode.
20797  # If so, the updated path is stored in $new_path.
20798  new_path="$input_to_shortpath"
20799
20800  input_path="$input_to_shortpath"
20801  # Check if we need to convert this using DOS-style short mode. If the path
20802  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20803  # take no chances and rewrite it.
20804  # Note: m4 eats our [], so we need to use [ and ] instead.
20805  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20806  if test "x$has_forbidden_chars" != x; then
20807    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20808    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20809    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20810    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20811      # Going to short mode and back again did indeed matter. Since short mode is
20812      # case insensitive, let's make it lowercase to improve readability.
20813      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20814      # Now convert it back to Unix-stile (cygpath)
20815      input_path=`$CYGPATH -u "$shortmode_path"`
20816      new_path="$input_path"
20817    fi
20818  fi
20819
20820  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20821  if test "x$test_cygdrive_prefix" = x; then
20822    # As a simple fix, exclude /usr/bin since it's not a real path.
20823    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20824      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20825      # a path prefixed by /cygdrive for fixpath to work.
20826      new_path="$CYGWIN_ROOT_PATH$input_path"
20827    fi
20828  fi
20829
20830  # remove trailing .exe if any
20831  new_path="${new_path/%.exe/}"
20832
20833  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20834
20835  # First separate the path from the arguments. This will split at the first
20836  # space.
20837  complete="$CXX"
20838  path="${complete%% *}"
20839  tmp="$complete EOL"
20840  arguments="${tmp#* }"
20841
20842  # Input might be given as Windows format, start by converting to
20843  # unix format.
20844  new_path="$path"
20845
20846  windows_path="$new_path"
20847  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20848    unix_path=`$CYGPATH -u "$windows_path"`
20849    new_path="$unix_path"
20850  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20851    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20852    new_path="$unix_path"
20853  fi
20854
20855
20856  # Now try to locate executable using which
20857  new_path=`$WHICH "$new_path" 2> /dev/null`
20858
20859  if test "x$new_path" = x; then
20860    # Oops. Which didn't find the executable.
20861    # The splitting of arguments from the executable at a space might have been incorrect,
20862    # since paths with space are more likely in Windows. Give it another try with the whole
20863    # argument.
20864    path="$complete"
20865    arguments="EOL"
20866    new_path="$path"
20867
20868  windows_path="$new_path"
20869  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20870    unix_path=`$CYGPATH -u "$windows_path"`
20871    new_path="$unix_path"
20872  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20873    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20874    new_path="$unix_path"
20875  fi
20876
20877
20878    new_path=`$WHICH "$new_path" 2> /dev/null`
20879
20880    if test "x$new_path" = x; then
20881      # It's still not found. Now this is an unrecoverable error.
20882      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
20883$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
20884      has_space=`$ECHO "$complete" | $GREP " "`
20885      if test "x$has_space" != x; then
20886        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20887$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20888      fi
20889      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20890    fi
20891  fi
20892
20893  # Now new_path has a complete unix path to the binary
20894  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20895    # Keep paths in /bin as-is, but remove trailing .exe if any
20896    new_path="${new_path/%.exe/}"
20897    # Do not save /bin paths to all_fixpath_prefixes!
20898  else
20899    # Not in mixed or Windows style, start by that.
20900    new_path=`cmd //c echo $new_path`
20901
20902  input_path="$new_path"
20903  # Check if we need to convert this using DOS-style short mode. If the path
20904  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20905  # take no chances and rewrite it.
20906  # Note: m4 eats our [], so we need to use [ and ] instead.
20907  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20908  if test "x$has_forbidden_chars" != x; then
20909    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20910    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20911  fi
20912
20913    # Output is in $new_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    # remove trailing .exe if any
20925    new_path="${new_path/%.exe/}"
20926
20927    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20928    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20929  fi
20930
20931  else
20932    # We're on a posix platform. Hooray! :)
20933    # First separate the path from the arguments. This will split at the first
20934    # space.
20935    complete="$CXX"
20936    path="${complete%% *}"
20937    tmp="$complete EOL"
20938    arguments="${tmp#* }"
20939
20940    # Cannot rely on the command "which" here since it doesn't always work.
20941    is_absolute_path=`$ECHO "$path" | $GREP ^/`
20942    if test -z "$is_absolute_path"; then
20943      # Path to executable is not absolute. Find it.
20944      IFS_save="$IFS"
20945      IFS=:
20946      for p in $PATH; do
20947        if test -f "$p/$path" && test -x "$p/$path"; then
20948          new_path="$p/$path"
20949          break
20950        fi
20951      done
20952      IFS="$IFS_save"
20953    else
20954      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXX (as $path) failed, using $path directly." >&5
20955$as_echo "$as_me: Resolving CXX (as $path) failed, using $path directly." >&6;}
20956      new_path="$path"
20957    fi
20958
20959    if test "x$new_path" = x; then
20960      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
20961$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
20962      has_space=`$ECHO "$complete" | $GREP " "`
20963      if test "x$has_space" != x; then
20964        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20965$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20966      fi
20967      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20968    fi
20969  fi
20970
20971  # Now join together the path and the arguments once again
20972  if test "x$arguments" != xEOL; then
20973    new_complete="$new_path ${arguments% *}"
20974  else
20975    new_complete="$new_path"
20976  fi
20977
20978  if test "x$complete" != "x$new_complete"; then
20979    CXX="$new_complete"
20980    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
20981$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
20982  fi
20983
20984  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
20985$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
20986  TEST_COMPILER="$CXX"
20987
20988  if test "x$OPENJDK_BUILD_OS" != xwindows; then
20989    # Follow a chain of symbolic links. Use readlink
20990    # where it exists, else fall back to horribly
20991    # complicated shell code.
20992    if test "x$READLINK_TESTED" != yes; then
20993      # On MacOSX there is a readlink tool with a different
20994      # purpose than the GNU readlink tool. Check the found readlink.
20995      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
20996      if test "x$ISGNU" = x; then
20997        # A readlink that we do not know how to use.
20998        # Are there other non-GNU readlinks out there?
20999        READLINK_TESTED=yes
21000        READLINK=
21001      fi
21002    fi
21003
21004    if test "x$READLINK" != x; then
21005      TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
21006    else
21007      # Save the current directory for restoring afterwards
21008      STARTDIR=$PWD
21009      COUNTER=0
21010      sym_link_dir=`$DIRNAME $TEST_COMPILER`
21011      sym_link_file=`$BASENAME $TEST_COMPILER`
21012      cd $sym_link_dir
21013      # Use -P flag to resolve symlinks in directories.
21014      cd `$THEPWDCMD -P`
21015      sym_link_dir=`$THEPWDCMD -P`
21016      # Resolve file symlinks
21017      while test $COUNTER -lt 20; do
21018        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
21019        if test "x$ISLINK" == x; then
21020          # This is not a symbolic link! We are done!
21021          break
21022        fi
21023        # Again resolve directory symlinks since the target of the just found
21024        # link could be in a different directory
21025        cd `$DIRNAME $ISLINK`
21026        sym_link_dir=`$THEPWDCMD -P`
21027        sym_link_file=`$BASENAME $ISLINK`
21028        let COUNTER=COUNTER+1
21029      done
21030      cd $STARTDIR
21031      TEST_COMPILER=$sym_link_dir/$sym_link_file
21032    fi
21033  fi
21034
21035  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
21036$as_echo "$TEST_COMPILER" >&6; }
21037  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
21038$as_echo_n "checking if CXX is disguised ccache... " >&6; }
21039
21040  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
21041  if test "x$COMPILER_BASENAME" = "xccache"; then
21042    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
21043$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
21044    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
21045    # We want to control ccache invocation ourselves, so ignore this cc and try
21046    # searching again.
21047
21048    # Remove the path to the fake ccache cc from the PATH
21049    RETRY_COMPILER_SAVED_PATH="$PATH"
21050    COMPILER_DIRNAME=`$DIRNAME $CXX`
21051    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
21052
21053    # Try again looking for our compiler
21054    if test -n "$ac_tool_prefix"; then
21055  for ac_prog in $COMPILER_CHECK_LIST
21056  do
21057    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
21058set dummy $ac_tool_prefix$ac_prog; ac_word=$2
21059{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21060$as_echo_n "checking for $ac_word... " >&6; }
21061if ${ac_cv_prog_PROPER_COMPILER_CXX+:} false; then :
21062  $as_echo_n "(cached) " >&6
21063else
21064  if test -n "$PROPER_COMPILER_CXX"; then
21065  ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
21066else
21067as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21068for as_dir in $PATH
21069do
21070  IFS=$as_save_IFS
21071  test -z "$as_dir" && as_dir=.
21072    for ac_exec_ext in '' $ac_executable_extensions; do
21073  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21074    ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
21075    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21076    break 2
21077  fi
21078done
21079  done
21080IFS=$as_save_IFS
21081
21082fi
21083fi
21084PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
21085if test -n "$PROPER_COMPILER_CXX"; then
21086  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
21087$as_echo "$PROPER_COMPILER_CXX" >&6; }
21088else
21089  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21090$as_echo "no" >&6; }
21091fi
21092
21093
21094    test -n "$PROPER_COMPILER_CXX" && break
21095  done
21096fi
21097if test -z "$PROPER_COMPILER_CXX"; then
21098  ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
21099  for ac_prog in $COMPILER_CHECK_LIST
21100do
21101  # Extract the first word of "$ac_prog", so it can be a program name with args.
21102set dummy $ac_prog; ac_word=$2
21103{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21104$as_echo_n "checking for $ac_word... " >&6; }
21105if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+:} false; then :
21106  $as_echo_n "(cached) " >&6
21107else
21108  if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
21109  ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
21110else
21111as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21112for as_dir in $PATH
21113do
21114  IFS=$as_save_IFS
21115  test -z "$as_dir" && as_dir=.
21116    for ac_exec_ext in '' $ac_executable_extensions; do
21117  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21118    ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
21119    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21120    break 2
21121  fi
21122done
21123  done
21124IFS=$as_save_IFS
21125
21126fi
21127fi
21128ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
21129if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
21130  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
21131$as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
21132else
21133  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21134$as_echo "no" >&6; }
21135fi
21136
21137
21138  test -n "$ac_ct_PROPER_COMPILER_CXX" && break
21139done
21140
21141  if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
21142    PROPER_COMPILER_CXX=""
21143  else
21144    case $cross_compiling:$ac_tool_warned in
21145yes:)
21146{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
21147$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
21148ac_tool_warned=yes ;;
21149esac
21150    PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
21151  fi
21152fi
21153
21154
21155  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21156
21157  # First separate the path from the arguments. This will split at the first
21158  # space.
21159  complete="$PROPER_COMPILER_CXX"
21160  path="${complete%% *}"
21161  tmp="$complete EOL"
21162  arguments="${tmp#* }"
21163
21164  # Input might be given as Windows format, start by converting to
21165  # unix format.
21166  new_path=`$CYGPATH -u "$path"`
21167
21168  # Now try to locate executable using which
21169  new_path=`$WHICH "$new_path" 2> /dev/null`
21170  # bat and cmd files are not always considered executable in cygwin causing which
21171  # to not find them
21172  if test "x$new_path" = x \
21173      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21174      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21175    new_path=`$CYGPATH -u "$path"`
21176  fi
21177  if test "x$new_path" = x; then
21178    # Oops. Which didn't find the executable.
21179    # The splitting of arguments from the executable at a space might have been incorrect,
21180    # since paths with space are more likely in Windows. Give it another try with the whole
21181    # argument.
21182    path="$complete"
21183    arguments="EOL"
21184    new_path=`$CYGPATH -u "$path"`
21185    new_path=`$WHICH "$new_path" 2> /dev/null`
21186    # bat and cmd files are not always considered executable in cygwin causing which
21187    # to not find them
21188    if test "x$new_path" = x \
21189        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21190        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21191      new_path=`$CYGPATH -u "$path"`
21192    fi
21193    if test "x$new_path" = x; then
21194      # It's still not found. Now this is an unrecoverable error.
21195      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
21196$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
21197      has_space=`$ECHO "$complete" | $GREP " "`
21198      if test "x$has_space" != x; then
21199        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21200$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21201      fi
21202      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21203    fi
21204  fi
21205
21206  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21207  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21208  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21209  # "foo.exe" is OK but "foo" is an error.
21210  #
21211  # This test is therefore slightly more accurate than "test -f" to check for file presence.
21212  # It is also a way to make sure we got the proper file name for the real test later on.
21213  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21214  if test "x$test_shortpath" = x; then
21215    # Short path failed, file does not exist as specified.
21216    # Try adding .exe or .cmd
21217    if test -f "${new_path}.exe"; then
21218      input_to_shortpath="${new_path}.exe"
21219    elif test -f "${new_path}.cmd"; then
21220      input_to_shortpath="${new_path}.cmd"
21221    else
21222      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
21223$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
21224      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21225$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21226      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21227    fi
21228  else
21229    input_to_shortpath="$new_path"
21230  fi
21231
21232  # Call helper function which possibly converts this using DOS-style short mode.
21233  # If so, the updated path is stored in $new_path.
21234  new_path="$input_to_shortpath"
21235
21236  input_path="$input_to_shortpath"
21237  # Check if we need to convert this using DOS-style short mode. If the path
21238  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21239  # take no chances and rewrite it.
21240  # Note: m4 eats our [], so we need to use [ and ] instead.
21241  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21242  if test "x$has_forbidden_chars" != x; then
21243    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21244    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21245    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21246    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21247      # Going to short mode and back again did indeed matter. Since short mode is
21248      # case insensitive, let's make it lowercase to improve readability.
21249      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21250      # Now convert it back to Unix-stile (cygpath)
21251      input_path=`$CYGPATH -u "$shortmode_path"`
21252      new_path="$input_path"
21253    fi
21254  fi
21255
21256  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21257  if test "x$test_cygdrive_prefix" = x; then
21258    # As a simple fix, exclude /usr/bin since it's not a real path.
21259    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21260      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21261      # a path prefixed by /cygdrive for fixpath to work.
21262      new_path="$CYGWIN_ROOT_PATH$input_path"
21263    fi
21264  fi
21265
21266  # remove trailing .exe if any
21267  new_path="${new_path/%.exe/}"
21268
21269  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21270
21271  # First separate the path from the arguments. This will split at the first
21272  # space.
21273  complete="$PROPER_COMPILER_CXX"
21274  path="${complete%% *}"
21275  tmp="$complete EOL"
21276  arguments="${tmp#* }"
21277
21278  # Input might be given as Windows format, start by converting to
21279  # unix format.
21280  new_path="$path"
21281
21282  windows_path="$new_path"
21283  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21284    unix_path=`$CYGPATH -u "$windows_path"`
21285    new_path="$unix_path"
21286  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21287    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21288    new_path="$unix_path"
21289  fi
21290
21291
21292  # Now try to locate executable using which
21293  new_path=`$WHICH "$new_path" 2> /dev/null`
21294
21295  if test "x$new_path" = x; then
21296    # Oops. Which didn't find the executable.
21297    # The splitting of arguments from the executable at a space might have been incorrect,
21298    # since paths with space are more likely in Windows. Give it another try with the whole
21299    # argument.
21300    path="$complete"
21301    arguments="EOL"
21302    new_path="$path"
21303
21304  windows_path="$new_path"
21305  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21306    unix_path=`$CYGPATH -u "$windows_path"`
21307    new_path="$unix_path"
21308  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21309    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21310    new_path="$unix_path"
21311  fi
21312
21313
21314    new_path=`$WHICH "$new_path" 2> /dev/null`
21315
21316    if test "x$new_path" = x; then
21317      # It's still not found. Now this is an unrecoverable error.
21318      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
21319$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
21320      has_space=`$ECHO "$complete" | $GREP " "`
21321      if test "x$has_space" != x; then
21322        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21323$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21324      fi
21325      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21326    fi
21327  fi
21328
21329  # Now new_path has a complete unix path to the binary
21330  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21331    # Keep paths in /bin as-is, but remove trailing .exe if any
21332    new_path="${new_path/%.exe/}"
21333    # Do not save /bin paths to all_fixpath_prefixes!
21334  else
21335    # Not in mixed or Windows style, start by that.
21336    new_path=`cmd //c echo $new_path`
21337
21338  input_path="$new_path"
21339  # Check if we need to convert this using DOS-style short mode. If the path
21340  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21341  # take no chances and rewrite it.
21342  # Note: m4 eats our [], so we need to use [ and ] instead.
21343  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21344  if test "x$has_forbidden_chars" != x; then
21345    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21346    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21347  fi
21348
21349    # Output is in $new_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    # remove trailing .exe if any
21361    new_path="${new_path/%.exe/}"
21362
21363    # Save the first 10 bytes of this path to the storage, so fixpath can work.
21364    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21365  fi
21366
21367  else
21368    # We're on a posix platform. Hooray! :)
21369    # First separate the path from the arguments. This will split at the first
21370    # space.
21371    complete="$PROPER_COMPILER_CXX"
21372    path="${complete%% *}"
21373    tmp="$complete EOL"
21374    arguments="${tmp#* }"
21375
21376    # Cannot rely on the command "which" here since it doesn't always work.
21377    is_absolute_path=`$ECHO "$path" | $GREP ^/`
21378    if test -z "$is_absolute_path"; then
21379      # Path to executable is not absolute. Find it.
21380      IFS_save="$IFS"
21381      IFS=:
21382      for p in $PATH; do
21383        if test -f "$p/$path" && test -x "$p/$path"; then
21384          new_path="$p/$path"
21385          break
21386        fi
21387      done
21388      IFS="$IFS_save"
21389    else
21390      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&5
21391$as_echo "$as_me: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&6;}
21392      new_path="$path"
21393    fi
21394
21395    if test "x$new_path" = x; then
21396      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
21397$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
21398      has_space=`$ECHO "$complete" | $GREP " "`
21399      if test "x$has_space" != x; then
21400        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21401$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21402      fi
21403      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21404    fi
21405  fi
21406
21407  # Now join together the path and the arguments once again
21408  if test "x$arguments" != xEOL; then
21409    new_complete="$new_path ${arguments% *}"
21410  else
21411    new_complete="$new_path"
21412  fi
21413
21414  if test "x$complete" != "x$new_complete"; then
21415    PROPER_COMPILER_CXX="$new_complete"
21416    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
21417$as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
21418  fi
21419
21420    PATH="$RETRY_COMPILER_SAVED_PATH"
21421
21422    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
21423$as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
21424
21425  if test "x$OPENJDK_BUILD_OS" != xwindows; then
21426    # Follow a chain of symbolic links. Use readlink
21427    # where it exists, else fall back to horribly
21428    # complicated shell code.
21429    if test "x$READLINK_TESTED" != yes; then
21430      # On MacOSX there is a readlink tool with a different
21431      # purpose than the GNU readlink tool. Check the found readlink.
21432      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
21433      if test "x$ISGNU" = x; then
21434        # A readlink that we do not know how to use.
21435        # Are there other non-GNU readlinks out there?
21436        READLINK_TESTED=yes
21437        READLINK=
21438      fi
21439    fi
21440
21441    if test "x$READLINK" != x; then
21442      PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
21443    else
21444      # Save the current directory for restoring afterwards
21445      STARTDIR=$PWD
21446      COUNTER=0
21447      sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
21448      sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
21449      cd $sym_link_dir
21450      # Use -P flag to resolve symlinks in directories.
21451      cd `$THEPWDCMD -P`
21452      sym_link_dir=`$THEPWDCMD -P`
21453      # Resolve file symlinks
21454      while test $COUNTER -lt 20; do
21455        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
21456        if test "x$ISLINK" == x; then
21457          # This is not a symbolic link! We are done!
21458          break
21459        fi
21460        # Again resolve directory symlinks since the target of the just found
21461        # link could be in a different directory
21462        cd `$DIRNAME $ISLINK`
21463        sym_link_dir=`$THEPWDCMD -P`
21464        sym_link_file=`$BASENAME $ISLINK`
21465        let COUNTER=COUNTER+1
21466      done
21467      cd $STARTDIR
21468      PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
21469    fi
21470  fi
21471
21472    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
21473$as_echo "$PROPER_COMPILER_CXX" >&6; }
21474    CXX="$PROPER_COMPILER_CXX"
21475  else
21476    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
21477$as_echo "no, keeping CXX" >&6; }
21478    CXX="$TEST_COMPILER"
21479  fi
21480
21481  COMPILER=$CXX
21482  COMPILER_NAME=$COMPILER_NAME
21483
21484  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
21485    # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
21486    COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
21487    $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
21488    if test $? -ne 0; then
21489      GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
21490
21491      { $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
21492$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
21493      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
21494$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
21495      as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
21496    else
21497      COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
21498      COMPILER_VENDOR="Sun Studio"
21499    fi
21500  elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
21501    # First line typically looks something like:
21502    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
21503    COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
21504    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
21505    COMPILER_VENDOR="Microsoft CL.EXE"
21506    COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
21507    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
21508      if test "x$COMPILER_CPU_TEST" != "x80x86"; then
21509        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
21510      fi
21511    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
21512      if test "x$COMPILER_CPU_TEST" != "xx64"; then
21513        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
21514      fi
21515    fi
21516  else
21517    COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
21518    # Check that this is likely to be GCC.
21519    $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
21520    if test $? -ne 0; then
21521      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
21522$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
21523      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
21524$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
21525      as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
21526    fi
21527
21528    # First line typically looks something like:
21529    # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
21530    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
21531    COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
21532  fi
21533  # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
21534  CXX_VERSION="$COMPILER_VERSION"
21535  # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
21536  CXX_VENDOR="$COMPILER_VENDOR"
21537
21538  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
21539$as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
21540
21541
21542  # Now that we have resolved CXX ourself, let autoconf have its go at it
21543  ac_ext=cpp
21544ac_cpp='$CXXCPP $CPPFLAGS'
21545ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21546ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21547ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21548if test -z "$CXX"; then
21549  if test -n "$CCC"; then
21550    CXX=$CCC
21551  else
21552    if test -n "$ac_tool_prefix"; then
21553  for ac_prog in $CXX
21554  do
21555    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
21556set dummy $ac_tool_prefix$ac_prog; ac_word=$2
21557{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21558$as_echo_n "checking for $ac_word... " >&6; }
21559if ${ac_cv_prog_CXX+:} false; then :
21560  $as_echo_n "(cached) " >&6
21561else
21562  if test -n "$CXX"; then
21563  ac_cv_prog_CXX="$CXX" # Let the user override the test.
21564else
21565as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21566for as_dir in $PATH
21567do
21568  IFS=$as_save_IFS
21569  test -z "$as_dir" && as_dir=.
21570    for ac_exec_ext in '' $ac_executable_extensions; do
21571  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21572    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
21573    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21574    break 2
21575  fi
21576done
21577  done
21578IFS=$as_save_IFS
21579
21580fi
21581fi
21582CXX=$ac_cv_prog_CXX
21583if test -n "$CXX"; then
21584  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
21585$as_echo "$CXX" >&6; }
21586else
21587  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21588$as_echo "no" >&6; }
21589fi
21590
21591
21592    test -n "$CXX" && break
21593  done
21594fi
21595if test -z "$CXX"; then
21596  ac_ct_CXX=$CXX
21597  for ac_prog in $CXX
21598do
21599  # Extract the first word of "$ac_prog", so it can be a program name with args.
21600set dummy $ac_prog; ac_word=$2
21601{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21602$as_echo_n "checking for $ac_word... " >&6; }
21603if ${ac_cv_prog_ac_ct_CXX+:} false; then :
21604  $as_echo_n "(cached) " >&6
21605else
21606  if test -n "$ac_ct_CXX"; then
21607  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
21608else
21609as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21610for as_dir in $PATH
21611do
21612  IFS=$as_save_IFS
21613  test -z "$as_dir" && as_dir=.
21614    for ac_exec_ext in '' $ac_executable_extensions; do
21615  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21616    ac_cv_prog_ac_ct_CXX="$ac_prog"
21617    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21618    break 2
21619  fi
21620done
21621  done
21622IFS=$as_save_IFS
21623
21624fi
21625fi
21626ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
21627if test -n "$ac_ct_CXX"; then
21628  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
21629$as_echo "$ac_ct_CXX" >&6; }
21630else
21631  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21632$as_echo "no" >&6; }
21633fi
21634
21635
21636  test -n "$ac_ct_CXX" && break
21637done
21638
21639  if test "x$ac_ct_CXX" = x; then
21640    CXX="g++"
21641  else
21642    case $cross_compiling:$ac_tool_warned in
21643yes:)
21644{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
21645$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
21646ac_tool_warned=yes ;;
21647esac
21648    CXX=$ac_ct_CXX
21649  fi
21650fi
21651
21652  fi
21653fi
21654# Provide some information about the compiler.
21655$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
21656set X $ac_compile
21657ac_compiler=$2
21658for ac_option in --version -v -V -qversion; do
21659  { { ac_try="$ac_compiler $ac_option >&5"
21660case "(($ac_try" in
21661  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21662  *) ac_try_echo=$ac_try;;
21663esac
21664eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
21665$as_echo "$ac_try_echo"; } >&5
21666  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
21667  ac_status=$?
21668  if test -s conftest.err; then
21669    sed '10a\
21670... rest of stderr output deleted ...
21671         10q' conftest.err >conftest.er1
21672    cat conftest.er1 >&5
21673  fi
21674  rm -f conftest.er1 conftest.err
21675  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21676  test $ac_status = 0; }
21677done
21678
21679{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
21680$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
21681if ${ac_cv_cxx_compiler_gnu+:} false; then :
21682  $as_echo_n "(cached) " >&6
21683else
21684  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21685/* end confdefs.h.  */
21686
21687int
21688main ()
21689{
21690#ifndef __GNUC__
21691       choke me
21692#endif
21693
21694  ;
21695  return 0;
21696}
21697_ACEOF
21698if ac_fn_cxx_try_compile "$LINENO"; then :
21699  ac_compiler_gnu=yes
21700else
21701  ac_compiler_gnu=no
21702fi
21703rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21704ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
21705
21706fi
21707{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
21708$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
21709if test $ac_compiler_gnu = yes; then
21710  GXX=yes
21711else
21712  GXX=
21713fi
21714ac_test_CXXFLAGS=${CXXFLAGS+set}
21715ac_save_CXXFLAGS=$CXXFLAGS
21716{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
21717$as_echo_n "checking whether $CXX accepts -g... " >&6; }
21718if ${ac_cv_prog_cxx_g+:} false; then :
21719  $as_echo_n "(cached) " >&6
21720else
21721  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
21722   ac_cxx_werror_flag=yes
21723   ac_cv_prog_cxx_g=no
21724   CXXFLAGS="-g"
21725   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21726/* end confdefs.h.  */
21727
21728int
21729main ()
21730{
21731
21732  ;
21733  return 0;
21734}
21735_ACEOF
21736if ac_fn_cxx_try_compile "$LINENO"; then :
21737  ac_cv_prog_cxx_g=yes
21738else
21739  CXXFLAGS=""
21740      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21741/* end confdefs.h.  */
21742
21743int
21744main ()
21745{
21746
21747  ;
21748  return 0;
21749}
21750_ACEOF
21751if ac_fn_cxx_try_compile "$LINENO"; then :
21752
21753else
21754  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
21755	 CXXFLAGS="-g"
21756	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21757/* end confdefs.h.  */
21758
21759int
21760main ()
21761{
21762
21763  ;
21764  return 0;
21765}
21766_ACEOF
21767if ac_fn_cxx_try_compile "$LINENO"; then :
21768  ac_cv_prog_cxx_g=yes
21769fi
21770rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21771fi
21772rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21773fi
21774rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21775   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
21776fi
21777{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
21778$as_echo "$ac_cv_prog_cxx_g" >&6; }
21779if test "$ac_test_CXXFLAGS" = set; then
21780  CXXFLAGS=$ac_save_CXXFLAGS
21781elif test $ac_cv_prog_cxx_g = yes; then
21782  if test "$GXX" = yes; then
21783    CXXFLAGS="-g -O2"
21784  else
21785    CXXFLAGS="-g"
21786  fi
21787else
21788  if test "$GXX" = yes; then
21789    CXXFLAGS="-O2"
21790  else
21791    CXXFLAGS=
21792  fi
21793fi
21794ac_ext=cpp
21795ac_cpp='$CXXCPP $CPPFLAGS'
21796ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21797ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21798ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21799
21800
21801  ### Locate other tools
21802
21803  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
21804    ac_ext=m
21805ac_cpp='$OBJCPP $CPPFLAGS'
21806ac_compile='$OBJC -c $OBJCFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21807ac_link='$OBJC -o conftest$ac_exeext $OBJCFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21808ac_compiler_gnu=$ac_cv_objc_compiler_gnu
21809if test -n "$ac_tool_prefix"; then
21810  for ac_prog in gcc objcc objc cc CC
21811  do
21812    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
21813set dummy $ac_tool_prefix$ac_prog; ac_word=$2
21814{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21815$as_echo_n "checking for $ac_word... " >&6; }
21816if ${ac_cv_prog_OBJC+:} false; then :
21817  $as_echo_n "(cached) " >&6
21818else
21819  if test -n "$OBJC"; then
21820  ac_cv_prog_OBJC="$OBJC" # Let the user override the test.
21821else
21822as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21823for as_dir in $PATH
21824do
21825  IFS=$as_save_IFS
21826  test -z "$as_dir" && as_dir=.
21827    for ac_exec_ext in '' $ac_executable_extensions; do
21828  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21829    ac_cv_prog_OBJC="$ac_tool_prefix$ac_prog"
21830    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21831    break 2
21832  fi
21833done
21834  done
21835IFS=$as_save_IFS
21836
21837fi
21838fi
21839OBJC=$ac_cv_prog_OBJC
21840if test -n "$OBJC"; then
21841  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJC" >&5
21842$as_echo "$OBJC" >&6; }
21843else
21844  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21845$as_echo "no" >&6; }
21846fi
21847
21848
21849    test -n "$OBJC" && break
21850  done
21851fi
21852if test -z "$OBJC"; then
21853  ac_ct_OBJC=$OBJC
21854  for ac_prog in gcc objcc objc cc CC
21855do
21856  # Extract the first word of "$ac_prog", so it can be a program name with args.
21857set dummy $ac_prog; ac_word=$2
21858{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21859$as_echo_n "checking for $ac_word... " >&6; }
21860if ${ac_cv_prog_ac_ct_OBJC+:} false; then :
21861  $as_echo_n "(cached) " >&6
21862else
21863  if test -n "$ac_ct_OBJC"; then
21864  ac_cv_prog_ac_ct_OBJC="$ac_ct_OBJC" # Let the user override the test.
21865else
21866as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21867for as_dir in $PATH
21868do
21869  IFS=$as_save_IFS
21870  test -z "$as_dir" && as_dir=.
21871    for ac_exec_ext in '' $ac_executable_extensions; do
21872  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21873    ac_cv_prog_ac_ct_OBJC="$ac_prog"
21874    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21875    break 2
21876  fi
21877done
21878  done
21879IFS=$as_save_IFS
21880
21881fi
21882fi
21883ac_ct_OBJC=$ac_cv_prog_ac_ct_OBJC
21884if test -n "$ac_ct_OBJC"; then
21885  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJC" >&5
21886$as_echo "$ac_ct_OBJC" >&6; }
21887else
21888  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21889$as_echo "no" >&6; }
21890fi
21891
21892
21893  test -n "$ac_ct_OBJC" && break
21894done
21895
21896  if test "x$ac_ct_OBJC" = x; then
21897    OBJC="gcc"
21898  else
21899    case $cross_compiling:$ac_tool_warned in
21900yes:)
21901{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
21902$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
21903ac_tool_warned=yes ;;
21904esac
21905    OBJC=$ac_ct_OBJC
21906  fi
21907fi
21908
21909# Provide some information about the compiler.
21910$as_echo "$as_me:${as_lineno-$LINENO}: checking for Objective C compiler version" >&5
21911set X $ac_compile
21912ac_compiler=$2
21913for ac_option in --version -v -V -qversion; do
21914  { { ac_try="$ac_compiler $ac_option >&5"
21915case "(($ac_try" in
21916  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21917  *) ac_try_echo=$ac_try;;
21918esac
21919eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
21920$as_echo "$ac_try_echo"; } >&5
21921  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
21922  ac_status=$?
21923  if test -s conftest.err; then
21924    sed '10a\
21925... rest of stderr output deleted ...
21926         10q' conftest.err >conftest.er1
21927    cat conftest.er1 >&5
21928  fi
21929  rm -f conftest.er1 conftest.err
21930  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21931  test $ac_status = 0; }
21932done
21933
21934{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Objective C compiler" >&5
21935$as_echo_n "checking whether we are using the GNU Objective C compiler... " >&6; }
21936if ${ac_cv_objc_compiler_gnu+:} false; then :
21937  $as_echo_n "(cached) " >&6
21938else
21939  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21940/* end confdefs.h.  */
21941
21942int
21943main ()
21944{
21945#ifndef __GNUC__
21946       choke me
21947#endif
21948
21949  ;
21950  return 0;
21951}
21952_ACEOF
21953if ac_fn_objc_try_compile "$LINENO"; then :
21954  ac_compiler_gnu=yes
21955else
21956  ac_compiler_gnu=no
21957fi
21958rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21959ac_cv_objc_compiler_gnu=$ac_compiler_gnu
21960
21961fi
21962{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objc_compiler_gnu" >&5
21963$as_echo "$ac_cv_objc_compiler_gnu" >&6; }
21964if test $ac_compiler_gnu = yes; then
21965  GOBJC=yes
21966else
21967  GOBJC=
21968fi
21969ac_test_OBJCFLAGS=${OBJCFLAGS+set}
21970ac_save_OBJCFLAGS=$OBJCFLAGS
21971{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $OBJC accepts -g" >&5
21972$as_echo_n "checking whether $OBJC accepts -g... " >&6; }
21973if ${ac_cv_prog_objc_g+:} false; then :
21974  $as_echo_n "(cached) " >&6
21975else
21976  ac_save_objc_werror_flag=$ac_objc_werror_flag
21977   ac_objc_werror_flag=yes
21978   ac_cv_prog_objc_g=no
21979   OBJCFLAGS="-g"
21980   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21981/* end confdefs.h.  */
21982
21983int
21984main ()
21985{
21986
21987  ;
21988  return 0;
21989}
21990_ACEOF
21991if ac_fn_objc_try_compile "$LINENO"; then :
21992  ac_cv_prog_objc_g=yes
21993else
21994  OBJCFLAGS=""
21995      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21996/* end confdefs.h.  */
21997
21998int
21999main ()
22000{
22001
22002  ;
22003  return 0;
22004}
22005_ACEOF
22006if ac_fn_objc_try_compile "$LINENO"; then :
22007
22008else
22009  ac_objc_werror_flag=$ac_save_objc_werror_flag
22010	 OBJCFLAGS="-g"
22011	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22012/* end confdefs.h.  */
22013
22014int
22015main ()
22016{
22017
22018  ;
22019  return 0;
22020}
22021_ACEOF
22022if ac_fn_objc_try_compile "$LINENO"; then :
22023  ac_cv_prog_objc_g=yes
22024fi
22025rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22026fi
22027rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22028fi
22029rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22030   ac_objc_werror_flag=$ac_save_objc_werror_flag
22031fi
22032{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_objc_g" >&5
22033$as_echo "$ac_cv_prog_objc_g" >&6; }
22034if test "$ac_test_OBJCFLAGS" = set; then
22035  OBJCFLAGS=$ac_save_OBJCFLAGS
22036elif test $ac_cv_prog_objc_g = yes; then
22037  if test "$GOBJC" = yes; then
22038    OBJCFLAGS="-g -O2"
22039  else
22040    OBJCFLAGS="-g"
22041  fi
22042else
22043  if test "$GOBJC" = yes; then
22044    OBJCFLAGS="-O2"
22045  else
22046    OBJCFLAGS=
22047  fi
22048fi
22049ac_ext=cpp
22050ac_cpp='$CXXCPP $CPPFLAGS'
22051ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
22052ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
22053ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
22054
22055
22056  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22057
22058  # First separate the path from the arguments. This will split at the first
22059  # space.
22060  complete="$OBJC"
22061  path="${complete%% *}"
22062  tmp="$complete EOL"
22063  arguments="${tmp#* }"
22064
22065  # Input might be given as Windows format, start by converting to
22066  # unix format.
22067  new_path=`$CYGPATH -u "$path"`
22068
22069  # Now try to locate executable using which
22070  new_path=`$WHICH "$new_path" 2> /dev/null`
22071  # bat and cmd files are not always considered executable in cygwin causing which
22072  # to not find them
22073  if test "x$new_path" = x \
22074      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22075      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22076    new_path=`$CYGPATH -u "$path"`
22077  fi
22078  if test "x$new_path" = x; then
22079    # Oops. Which didn't find the executable.
22080    # The splitting of arguments from the executable at a space might have been incorrect,
22081    # since paths with space are more likely in Windows. Give it another try with the whole
22082    # argument.
22083    path="$complete"
22084    arguments="EOL"
22085    new_path=`$CYGPATH -u "$path"`
22086    new_path=`$WHICH "$new_path" 2> /dev/null`
22087    # bat and cmd files are not always considered executable in cygwin causing which
22088    # to not find them
22089    if test "x$new_path" = x \
22090        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22091        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22092      new_path=`$CYGPATH -u "$path"`
22093    fi
22094    if test "x$new_path" = x; then
22095      # It's still not found. Now this is an unrecoverable error.
22096      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
22097$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
22098      has_space=`$ECHO "$complete" | $GREP " "`
22099      if test "x$has_space" != x; then
22100        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22101$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22102      fi
22103      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
22104    fi
22105  fi
22106
22107  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22108  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22109  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22110  # "foo.exe" is OK but "foo" is an error.
22111  #
22112  # This test is therefore slightly more accurate than "test -f" to check for file presence.
22113  # It is also a way to make sure we got the proper file name for the real test later on.
22114  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22115  if test "x$test_shortpath" = x; then
22116    # Short path failed, file does not exist as specified.
22117    # Try adding .exe or .cmd
22118    if test -f "${new_path}.exe"; then
22119      input_to_shortpath="${new_path}.exe"
22120    elif test -f "${new_path}.cmd"; then
22121      input_to_shortpath="${new_path}.cmd"
22122    else
22123      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$new_path\", is invalid." >&5
22124$as_echo "$as_me: The path of OBJC, which resolves as \"$new_path\", is invalid." >&6;}
22125      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22126$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22127      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
22128    fi
22129  else
22130    input_to_shortpath="$new_path"
22131  fi
22132
22133  # Call helper function which possibly converts this using DOS-style short mode.
22134  # If so, the updated path is stored in $new_path.
22135  new_path="$input_to_shortpath"
22136
22137  input_path="$input_to_shortpath"
22138  # Check if we need to convert this using DOS-style short mode. If the path
22139  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22140  # take no chances and rewrite it.
22141  # Note: m4 eats our [], so we need to use [ and ] instead.
22142  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22143  if test "x$has_forbidden_chars" != x; then
22144    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22145    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22146    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22147    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22148      # Going to short mode and back again did indeed matter. Since short mode is
22149      # case insensitive, let's make it lowercase to improve readability.
22150      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22151      # Now convert it back to Unix-stile (cygpath)
22152      input_path=`$CYGPATH -u "$shortmode_path"`
22153      new_path="$input_path"
22154    fi
22155  fi
22156
22157  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22158  if test "x$test_cygdrive_prefix" = x; then
22159    # As a simple fix, exclude /usr/bin since it's not a real path.
22160    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22161      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22162      # a path prefixed by /cygdrive for fixpath to work.
22163      new_path="$CYGWIN_ROOT_PATH$input_path"
22164    fi
22165  fi
22166
22167  # remove trailing .exe if any
22168  new_path="${new_path/%.exe/}"
22169
22170  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22171
22172  # First separate the path from the arguments. This will split at the first
22173  # space.
22174  complete="$OBJC"
22175  path="${complete%% *}"
22176  tmp="$complete EOL"
22177  arguments="${tmp#* }"
22178
22179  # Input might be given as Windows format, start by converting to
22180  # unix format.
22181  new_path="$path"
22182
22183  windows_path="$new_path"
22184  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22185    unix_path=`$CYGPATH -u "$windows_path"`
22186    new_path="$unix_path"
22187  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22188    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22189    new_path="$unix_path"
22190  fi
22191
22192
22193  # Now try to locate executable using which
22194  new_path=`$WHICH "$new_path" 2> /dev/null`
22195
22196  if test "x$new_path" = x; then
22197    # Oops. Which didn't find the executable.
22198    # The splitting of arguments from the executable at a space might have been incorrect,
22199    # since paths with space are more likely in Windows. Give it another try with the whole
22200    # argument.
22201    path="$complete"
22202    arguments="EOL"
22203    new_path="$path"
22204
22205  windows_path="$new_path"
22206  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22207    unix_path=`$CYGPATH -u "$windows_path"`
22208    new_path="$unix_path"
22209  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22210    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22211    new_path="$unix_path"
22212  fi
22213
22214
22215    new_path=`$WHICH "$new_path" 2> /dev/null`
22216
22217    if test "x$new_path" = x; then
22218      # It's still not found. Now this is an unrecoverable error.
22219      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
22220$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
22221      has_space=`$ECHO "$complete" | $GREP " "`
22222      if test "x$has_space" != x; then
22223        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22224$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22225      fi
22226      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
22227    fi
22228  fi
22229
22230  # Now new_path has a complete unix path to the binary
22231  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22232    # Keep paths in /bin as-is, but remove trailing .exe if any
22233    new_path="${new_path/%.exe/}"
22234    # Do not save /bin paths to all_fixpath_prefixes!
22235  else
22236    # Not in mixed or Windows style, start by that.
22237    new_path=`cmd //c echo $new_path`
22238
22239  input_path="$new_path"
22240  # Check if we need to convert this using DOS-style short mode. If the path
22241  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22242  # take no chances and rewrite it.
22243  # Note: m4 eats our [], so we need to use [ and ] instead.
22244  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22245  if test "x$has_forbidden_chars" != x; then
22246    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22247    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22248  fi
22249
22250    # Output is in $new_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    # remove trailing .exe if any
22262    new_path="${new_path/%.exe/}"
22263
22264    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22265    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22266  fi
22267
22268  else
22269    # We're on a posix platform. Hooray! :)
22270    # First separate the path from the arguments. This will split at the first
22271    # space.
22272    complete="$OBJC"
22273    path="${complete%% *}"
22274    tmp="$complete EOL"
22275    arguments="${tmp#* }"
22276
22277    # Cannot rely on the command "which" here since it doesn't always work.
22278    is_absolute_path=`$ECHO "$path" | $GREP ^/`
22279    if test -z "$is_absolute_path"; then
22280      # Path to executable is not absolute. Find it.
22281      IFS_save="$IFS"
22282      IFS=:
22283      for p in $PATH; do
22284        if test -f "$p/$path" && test -x "$p/$path"; then
22285          new_path="$p/$path"
22286          break
22287        fi
22288      done
22289      IFS="$IFS_save"
22290    else
22291      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJC (as $path) failed, using $path directly." >&5
22292$as_echo "$as_me: Resolving OBJC (as $path) failed, using $path directly." >&6;}
22293      new_path="$path"
22294    fi
22295
22296    if test "x$new_path" = x; then
22297      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
22298$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
22299      has_space=`$ECHO "$complete" | $GREP " "`
22300      if test "x$has_space" != x; then
22301        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22302$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22303      fi
22304      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
22305    fi
22306  fi
22307
22308  # Now join together the path and the arguments once again
22309  if test "x$arguments" != xEOL; then
22310    new_complete="$new_path ${arguments% *}"
22311  else
22312    new_complete="$new_path"
22313  fi
22314
22315  if test "x$complete" != "x$new_complete"; then
22316    OBJC="$new_complete"
22317    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJC to \"$new_complete\"" >&5
22318$as_echo "$as_me: Rewriting OBJC to \"$new_complete\"" >&6;}
22319  fi
22320
22321  else
22322    OBJC=
22323  fi
22324
22325  # Restore the flags to the user specified values.
22326  # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
22327  CFLAGS="$ORG_CFLAGS"
22328  CXXFLAGS="$ORG_CXXFLAGS"
22329  OBJCFLAGS="$ORG_OBJCFLAGS"
22330
22331  LD="$CC"
22332  LDEXE="$CC"
22333  LDCXX="$CXX"
22334  LDEXECXX="$CXX"
22335
22336  # LDEXE is the linker to use, when creating executables.
22337
22338  # Linking C++ libraries.
22339
22340  # Linking C++ executables.
22341
22342
22343  if test "x$OPENJDK_TARGET_OS" != xwindows; then
22344    if test -n "$ac_tool_prefix"; then
22345  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
22346set dummy ${ac_tool_prefix}ar; ac_word=$2
22347{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22348$as_echo_n "checking for $ac_word... " >&6; }
22349if ${ac_cv_prog_AR+:} false; then :
22350  $as_echo_n "(cached) " >&6
22351else
22352  if test -n "$AR"; then
22353  ac_cv_prog_AR="$AR" # Let the user override the test.
22354else
22355as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22356for as_dir in $PATH
22357do
22358  IFS=$as_save_IFS
22359  test -z "$as_dir" && as_dir=.
22360    for ac_exec_ext in '' $ac_executable_extensions; do
22361  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22362    ac_cv_prog_AR="${ac_tool_prefix}ar"
22363    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22364    break 2
22365  fi
22366done
22367  done
22368IFS=$as_save_IFS
22369
22370fi
22371fi
22372AR=$ac_cv_prog_AR
22373if test -n "$AR"; then
22374  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
22375$as_echo "$AR" >&6; }
22376else
22377  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22378$as_echo "no" >&6; }
22379fi
22380
22381
22382fi
22383if test -z "$ac_cv_prog_AR"; then
22384  ac_ct_AR=$AR
22385  # Extract the first word of "ar", so it can be a program name with args.
22386set dummy ar; ac_word=$2
22387{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22388$as_echo_n "checking for $ac_word... " >&6; }
22389if ${ac_cv_prog_ac_ct_AR+:} false; then :
22390  $as_echo_n "(cached) " >&6
22391else
22392  if test -n "$ac_ct_AR"; then
22393  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
22394else
22395as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22396for as_dir in $PATH
22397do
22398  IFS=$as_save_IFS
22399  test -z "$as_dir" && as_dir=.
22400    for ac_exec_ext in '' $ac_executable_extensions; do
22401  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22402    ac_cv_prog_ac_ct_AR="ar"
22403    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22404    break 2
22405  fi
22406done
22407  done
22408IFS=$as_save_IFS
22409
22410fi
22411fi
22412ac_ct_AR=$ac_cv_prog_ac_ct_AR
22413if test -n "$ac_ct_AR"; then
22414  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
22415$as_echo "$ac_ct_AR" >&6; }
22416else
22417  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22418$as_echo "no" >&6; }
22419fi
22420
22421  if test "x$ac_ct_AR" = x; then
22422    AR=""
22423  else
22424    case $cross_compiling:$ac_tool_warned in
22425yes:)
22426{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
22427$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
22428ac_tool_warned=yes ;;
22429esac
22430    AR=$ac_ct_AR
22431  fi
22432else
22433  AR="$ac_cv_prog_AR"
22434fi
22435
22436
22437  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22438
22439  # First separate the path from the arguments. This will split at the first
22440  # space.
22441  complete="$AR"
22442  path="${complete%% *}"
22443  tmp="$complete EOL"
22444  arguments="${tmp#* }"
22445
22446  # Input might be given as Windows format, start by converting to
22447  # unix format.
22448  new_path=`$CYGPATH -u "$path"`
22449
22450  # Now try to locate executable using which
22451  new_path=`$WHICH "$new_path" 2> /dev/null`
22452  # bat and cmd files are not always considered executable in cygwin causing which
22453  # to not find them
22454  if test "x$new_path" = x \
22455      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22456      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22457    new_path=`$CYGPATH -u "$path"`
22458  fi
22459  if test "x$new_path" = x; then
22460    # Oops. Which didn't find the executable.
22461    # The splitting of arguments from the executable at a space might have been incorrect,
22462    # since paths with space are more likely in Windows. Give it another try with the whole
22463    # argument.
22464    path="$complete"
22465    arguments="EOL"
22466    new_path=`$CYGPATH -u "$path"`
22467    new_path=`$WHICH "$new_path" 2> /dev/null`
22468    # bat and cmd files are not always considered executable in cygwin causing which
22469    # to not find them
22470    if test "x$new_path" = x \
22471        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22472        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22473      new_path=`$CYGPATH -u "$path"`
22474    fi
22475    if test "x$new_path" = x; then
22476      # It's still not found. Now this is an unrecoverable error.
22477      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
22478$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
22479      has_space=`$ECHO "$complete" | $GREP " "`
22480      if test "x$has_space" != x; then
22481        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22482$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22483      fi
22484      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22485    fi
22486  fi
22487
22488  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22489  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22490  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22491  # "foo.exe" is OK but "foo" is an error.
22492  #
22493  # This test is therefore slightly more accurate than "test -f" to check for file presence.
22494  # It is also a way to make sure we got the proper file name for the real test later on.
22495  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22496  if test "x$test_shortpath" = x; then
22497    # Short path failed, file does not exist as specified.
22498    # Try adding .exe or .cmd
22499    if test -f "${new_path}.exe"; then
22500      input_to_shortpath="${new_path}.exe"
22501    elif test -f "${new_path}.cmd"; then
22502      input_to_shortpath="${new_path}.cmd"
22503    else
22504      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
22505$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
22506      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22507$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22508      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22509    fi
22510  else
22511    input_to_shortpath="$new_path"
22512  fi
22513
22514  # Call helper function which possibly converts this using DOS-style short mode.
22515  # If so, the updated path is stored in $new_path.
22516  new_path="$input_to_shortpath"
22517
22518  input_path="$input_to_shortpath"
22519  # Check if we need to convert this using DOS-style short mode. If the path
22520  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22521  # take no chances and rewrite it.
22522  # Note: m4 eats our [], so we need to use [ and ] instead.
22523  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22524  if test "x$has_forbidden_chars" != x; then
22525    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22526    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22527    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22528    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22529      # Going to short mode and back again did indeed matter. Since short mode is
22530      # case insensitive, let's make it lowercase to improve readability.
22531      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22532      # Now convert it back to Unix-stile (cygpath)
22533      input_path=`$CYGPATH -u "$shortmode_path"`
22534      new_path="$input_path"
22535    fi
22536  fi
22537
22538  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22539  if test "x$test_cygdrive_prefix" = x; then
22540    # As a simple fix, exclude /usr/bin since it's not a real path.
22541    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22542      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22543      # a path prefixed by /cygdrive for fixpath to work.
22544      new_path="$CYGWIN_ROOT_PATH$input_path"
22545    fi
22546  fi
22547
22548  # remove trailing .exe if any
22549  new_path="${new_path/%.exe/}"
22550
22551  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22552
22553  # First separate the path from the arguments. This will split at the first
22554  # space.
22555  complete="$AR"
22556  path="${complete%% *}"
22557  tmp="$complete EOL"
22558  arguments="${tmp#* }"
22559
22560  # Input might be given as Windows format, start by converting to
22561  # unix format.
22562  new_path="$path"
22563
22564  windows_path="$new_path"
22565  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22566    unix_path=`$CYGPATH -u "$windows_path"`
22567    new_path="$unix_path"
22568  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22569    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22570    new_path="$unix_path"
22571  fi
22572
22573
22574  # Now try to locate executable using which
22575  new_path=`$WHICH "$new_path" 2> /dev/null`
22576
22577  if test "x$new_path" = x; then
22578    # Oops. Which didn't find the executable.
22579    # The splitting of arguments from the executable at a space might have been incorrect,
22580    # since paths with space are more likely in Windows. Give it another try with the whole
22581    # argument.
22582    path="$complete"
22583    arguments="EOL"
22584    new_path="$path"
22585
22586  windows_path="$new_path"
22587  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22588    unix_path=`$CYGPATH -u "$windows_path"`
22589    new_path="$unix_path"
22590  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22591    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22592    new_path="$unix_path"
22593  fi
22594
22595
22596    new_path=`$WHICH "$new_path" 2> /dev/null`
22597
22598    if test "x$new_path" = x; then
22599      # It's still not found. Now this is an unrecoverable error.
22600      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
22601$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
22602      has_space=`$ECHO "$complete" | $GREP " "`
22603      if test "x$has_space" != x; then
22604        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22605$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22606      fi
22607      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22608    fi
22609  fi
22610
22611  # Now new_path has a complete unix path to the binary
22612  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22613    # Keep paths in /bin as-is, but remove trailing .exe if any
22614    new_path="${new_path/%.exe/}"
22615    # Do not save /bin paths to all_fixpath_prefixes!
22616  else
22617    # Not in mixed or Windows style, start by that.
22618    new_path=`cmd //c echo $new_path`
22619
22620  input_path="$new_path"
22621  # Check if we need to convert this using DOS-style short mode. If the path
22622  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22623  # take no chances and rewrite it.
22624  # Note: m4 eats our [], so we need to use [ and ] instead.
22625  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22626  if test "x$has_forbidden_chars" != x; then
22627    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22628    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22629  fi
22630
22631    # Output is in $new_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    # remove trailing .exe if any
22643    new_path="${new_path/%.exe/}"
22644
22645    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22646    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22647  fi
22648
22649  else
22650    # We're on a posix platform. Hooray! :)
22651    # First separate the path from the arguments. This will split at the first
22652    # space.
22653    complete="$AR"
22654    path="${complete%% *}"
22655    tmp="$complete EOL"
22656    arguments="${tmp#* }"
22657
22658    # Cannot rely on the command "which" here since it doesn't always work.
22659    is_absolute_path=`$ECHO "$path" | $GREP ^/`
22660    if test -z "$is_absolute_path"; then
22661      # Path to executable is not absolute. Find it.
22662      IFS_save="$IFS"
22663      IFS=:
22664      for p in $PATH; do
22665        if test -f "$p/$path" && test -x "$p/$path"; then
22666          new_path="$p/$path"
22667          break
22668        fi
22669      done
22670      IFS="$IFS_save"
22671    else
22672      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AR (as $path) failed, using $path directly." >&5
22673$as_echo "$as_me: Resolving AR (as $path) failed, using $path directly." >&6;}
22674      new_path="$path"
22675    fi
22676
22677    if test "x$new_path" = x; then
22678      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
22679$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
22680      has_space=`$ECHO "$complete" | $GREP " "`
22681      if test "x$has_space" != x; then
22682        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22683$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22684      fi
22685      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22686    fi
22687  fi
22688
22689  # Now join together the path and the arguments once again
22690  if test "x$arguments" != xEOL; then
22691    new_complete="$new_path ${arguments% *}"
22692  else
22693    new_complete="$new_path"
22694  fi
22695
22696  if test "x$complete" != "x$new_complete"; then
22697    AR="$new_complete"
22698    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
22699$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
22700  fi
22701
22702  fi
22703  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
22704    ARFLAGS="-r"
22705  else
22706    ARFLAGS=""
22707  fi
22708
22709
22710  # For hotspot, we need these in Windows mixed path; other platforms keep them the same
22711  HOTSPOT_CXX="$CXX"
22712  HOTSPOT_LD="$LD"
22713
22714
22715
22716  COMPILER_NAME=gcc
22717  COMPILER_TYPE=CC
22718  if test "x$OPENJDK_TARGET_OS" = xwindows; then :
22719
22720    # For now, assume that we are always compiling using cl.exe.
22721    CC_OUT_OPTION=-Fo
22722    EXE_OUT_OPTION=-out:
22723    LD_OUT_OPTION=-out:
22724    AR_OUT_OPTION=-out:
22725    # On Windows, reject /usr/bin/link (as determined in CYGWIN_LINK), which is a cygwin
22726    # program for something completely different.
22727    # Extract the first word of "link", so it can be a program name with args.
22728set dummy link; ac_word=$2
22729{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22730$as_echo_n "checking for $ac_word... " >&6; }
22731if ${ac_cv_prog_WINLD+:} false; then :
22732  $as_echo_n "(cached) " >&6
22733else
22734  if test -n "$WINLD"; then
22735  ac_cv_prog_WINLD="$WINLD" # Let the user override the test.
22736else
22737  ac_prog_rejected=no
22738as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22739for as_dir in $PATH
22740do
22741  IFS=$as_save_IFS
22742  test -z "$as_dir" && as_dir=.
22743    for ac_exec_ext in '' $ac_executable_extensions; do
22744  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22745    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
22746       ac_prog_rejected=yes
22747       continue
22748     fi
22749    ac_cv_prog_WINLD="link"
22750    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22751    break 2
22752  fi
22753done
22754  done
22755IFS=$as_save_IFS
22756
22757if test $ac_prog_rejected = yes; then
22758  # We found a bogon in the path, so make sure we never use it.
22759  set dummy $ac_cv_prog_WINLD
22760  shift
22761  if test $# != 0; then
22762    # We chose a different compiler from the bogus one.
22763    # However, it has the same basename, so the bogon will be chosen
22764    # first if we set WINLD to just the basename; use the full file name.
22765    shift
22766    ac_cv_prog_WINLD="$as_dir/$ac_word${1+' '}$@"
22767  fi
22768fi
22769fi
22770fi
22771WINLD=$ac_cv_prog_WINLD
22772if test -n "$WINLD"; then
22773  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINLD" >&5
22774$as_echo "$WINLD" >&6; }
22775else
22776  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22777$as_echo "no" >&6; }
22778fi
22779
22780
22781    # Since we must ignore the first found link, WINLD will contain
22782    # the full path to the link.exe program.
22783
22784  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22785
22786  # First separate the path from the arguments. This will split at the first
22787  # space.
22788  complete="$WINLD"
22789  path="${complete%% *}"
22790  tmp="$complete EOL"
22791  arguments="${tmp#* }"
22792
22793  # Input might be given as Windows format, start by converting to
22794  # unix format.
22795  new_path=`$CYGPATH -u "$path"`
22796
22797  # Now try to locate executable using which
22798  new_path=`$WHICH "$new_path" 2> /dev/null`
22799  # bat and cmd files are not always considered executable in cygwin causing which
22800  # to not find them
22801  if test "x$new_path" = x \
22802      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22803      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22804    new_path=`$CYGPATH -u "$path"`
22805  fi
22806  if test "x$new_path" = x; then
22807    # Oops. Which didn't find the executable.
22808    # The splitting of arguments from the executable at a space might have been incorrect,
22809    # since paths with space are more likely in Windows. Give it another try with the whole
22810    # argument.
22811    path="$complete"
22812    arguments="EOL"
22813    new_path=`$CYGPATH -u "$path"`
22814    new_path=`$WHICH "$new_path" 2> /dev/null`
22815    # bat and cmd files are not always considered executable in cygwin causing which
22816    # to not find them
22817    if test "x$new_path" = x \
22818        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22819        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22820      new_path=`$CYGPATH -u "$path"`
22821    fi
22822    if test "x$new_path" = x; then
22823      # It's still not found. Now this is an unrecoverable error.
22824      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
22825$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
22826      has_space=`$ECHO "$complete" | $GREP " "`
22827      if test "x$has_space" != x; then
22828        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22829$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22830      fi
22831      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22832    fi
22833  fi
22834
22835  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22836  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22837  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22838  # "foo.exe" is OK but "foo" is an error.
22839  #
22840  # This test is therefore slightly more accurate than "test -f" to check for file presence.
22841  # It is also a way to make sure we got the proper file name for the real test later on.
22842  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22843  if test "x$test_shortpath" = x; then
22844    # Short path failed, file does not exist as specified.
22845    # Try adding .exe or .cmd
22846    if test -f "${new_path}.exe"; then
22847      input_to_shortpath="${new_path}.exe"
22848    elif test -f "${new_path}.cmd"; then
22849      input_to_shortpath="${new_path}.cmd"
22850    else
22851      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$new_path\", is invalid." >&5
22852$as_echo "$as_me: The path of WINLD, which resolves as \"$new_path\", is invalid." >&6;}
22853      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22854$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22855      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22856    fi
22857  else
22858    input_to_shortpath="$new_path"
22859  fi
22860
22861  # Call helper function which possibly converts this using DOS-style short mode.
22862  # If so, the updated path is stored in $new_path.
22863  new_path="$input_to_shortpath"
22864
22865  input_path="$input_to_shortpath"
22866  # Check if we need to convert this using DOS-style short mode. If the path
22867  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22868  # take no chances and rewrite it.
22869  # Note: m4 eats our [], so we need to use [ and ] instead.
22870  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22871  if test "x$has_forbidden_chars" != x; then
22872    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22873    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22874    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22875    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22876      # Going to short mode and back again did indeed matter. Since short mode is
22877      # case insensitive, let's make it lowercase to improve readability.
22878      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22879      # Now convert it back to Unix-stile (cygpath)
22880      input_path=`$CYGPATH -u "$shortmode_path"`
22881      new_path="$input_path"
22882    fi
22883  fi
22884
22885  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22886  if test "x$test_cygdrive_prefix" = x; then
22887    # As a simple fix, exclude /usr/bin since it's not a real path.
22888    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22889      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22890      # a path prefixed by /cygdrive for fixpath to work.
22891      new_path="$CYGWIN_ROOT_PATH$input_path"
22892    fi
22893  fi
22894
22895  # remove trailing .exe if any
22896  new_path="${new_path/%.exe/}"
22897
22898  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22899
22900  # First separate the path from the arguments. This will split at the first
22901  # space.
22902  complete="$WINLD"
22903  path="${complete%% *}"
22904  tmp="$complete EOL"
22905  arguments="${tmp#* }"
22906
22907  # Input might be given as Windows format, start by converting to
22908  # unix format.
22909  new_path="$path"
22910
22911  windows_path="$new_path"
22912  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22913    unix_path=`$CYGPATH -u "$windows_path"`
22914    new_path="$unix_path"
22915  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22916    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22917    new_path="$unix_path"
22918  fi
22919
22920
22921  # Now try to locate executable using which
22922  new_path=`$WHICH "$new_path" 2> /dev/null`
22923
22924  if test "x$new_path" = x; then
22925    # Oops. Which didn't find the executable.
22926    # The splitting of arguments from the executable at a space might have been incorrect,
22927    # since paths with space are more likely in Windows. Give it another try with the whole
22928    # argument.
22929    path="$complete"
22930    arguments="EOL"
22931    new_path="$path"
22932
22933  windows_path="$new_path"
22934  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22935    unix_path=`$CYGPATH -u "$windows_path"`
22936    new_path="$unix_path"
22937  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22938    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22939    new_path="$unix_path"
22940  fi
22941
22942
22943    new_path=`$WHICH "$new_path" 2> /dev/null`
22944
22945    if test "x$new_path" = x; then
22946      # It's still not found. Now this is an unrecoverable error.
22947      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
22948$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
22949      has_space=`$ECHO "$complete" | $GREP " "`
22950      if test "x$has_space" != x; then
22951        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22952$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22953      fi
22954      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22955    fi
22956  fi
22957
22958  # Now new_path has a complete unix path to the binary
22959  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22960    # Keep paths in /bin as-is, but remove trailing .exe if any
22961    new_path="${new_path/%.exe/}"
22962    # Do not save /bin paths to all_fixpath_prefixes!
22963  else
22964    # Not in mixed or Windows style, start by that.
22965    new_path=`cmd //c echo $new_path`
22966
22967  input_path="$new_path"
22968  # Check if we need to convert this using DOS-style short mode. If the path
22969  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22970  # take no chances and rewrite it.
22971  # Note: m4 eats our [], so we need to use [ and ] instead.
22972  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22973  if test "x$has_forbidden_chars" != x; then
22974    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22975    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22976  fi
22977
22978    # Output is in $new_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    # remove trailing .exe if any
22990    new_path="${new_path/%.exe/}"
22991
22992    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22993    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22994  fi
22995
22996  else
22997    # We're on a posix platform. Hooray! :)
22998    # First separate the path from the arguments. This will split at the first
22999    # space.
23000    complete="$WINLD"
23001    path="${complete%% *}"
23002    tmp="$complete EOL"
23003    arguments="${tmp#* }"
23004
23005    # Cannot rely on the command "which" here since it doesn't always work.
23006    is_absolute_path=`$ECHO "$path" | $GREP ^/`
23007    if test -z "$is_absolute_path"; then
23008      # Path to executable is not absolute. Find it.
23009      IFS_save="$IFS"
23010      IFS=:
23011      for p in $PATH; do
23012        if test -f "$p/$path" && test -x "$p/$path"; then
23013          new_path="$p/$path"
23014          break
23015        fi
23016      done
23017      IFS="$IFS_save"
23018    else
23019      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINLD (as $path) failed, using $path directly." >&5
23020$as_echo "$as_me: Resolving WINLD (as $path) failed, using $path directly." >&6;}
23021      new_path="$path"
23022    fi
23023
23024    if test "x$new_path" = x; then
23025      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
23026$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
23027      has_space=`$ECHO "$complete" | $GREP " "`
23028      if test "x$has_space" != x; then
23029        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23030$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23031      fi
23032      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
23033    fi
23034  fi
23035
23036  # Now join together the path and the arguments once again
23037  if test "x$arguments" != xEOL; then
23038    new_complete="$new_path ${arguments% *}"
23039  else
23040    new_complete="$new_path"
23041  fi
23042
23043  if test "x$complete" != "x$new_complete"; then
23044    WINLD="$new_complete"
23045    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINLD to \"$new_complete\"" >&5
23046$as_echo "$as_me: Rewriting WINLD to \"$new_complete\"" >&6;}
23047  fi
23048
23049    printf "Windows linker was found at $WINLD\n"
23050    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
23051$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
23052    "$WINLD" --version > /dev/null
23053    if test $? -eq 0 ; then
23054      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23055$as_echo "no" >&6; }
23056      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
23057    else
23058      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23059$as_echo "yes" >&6; }
23060    fi
23061    LD="$WINLD"
23062    LDEXE="$WINLD"
23063    LDCXX="$WINLD"
23064    LDEXECXX="$WINLD"
23065
23066    # Extract the first word of "mt", so it can be a program name with args.
23067set dummy mt; ac_word=$2
23068{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23069$as_echo_n "checking for $ac_word... " >&6; }
23070if ${ac_cv_prog_MT+:} false; then :
23071  $as_echo_n "(cached) " >&6
23072else
23073  if test -n "$MT"; then
23074  ac_cv_prog_MT="$MT" # Let the user override the test.
23075else
23076  ac_prog_rejected=no
23077as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23078for as_dir in $PATH
23079do
23080  IFS=$as_save_IFS
23081  test -z "$as_dir" && as_dir=.
23082    for ac_exec_ext in '' $ac_executable_extensions; do
23083  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23084    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
23085       ac_prog_rejected=yes
23086       continue
23087     fi
23088    ac_cv_prog_MT="mt"
23089    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23090    break 2
23091  fi
23092done
23093  done
23094IFS=$as_save_IFS
23095
23096if test $ac_prog_rejected = yes; then
23097  # We found a bogon in the path, so make sure we never use it.
23098  set dummy $ac_cv_prog_MT
23099  shift
23100  if test $# != 0; then
23101    # We chose a different compiler from the bogus one.
23102    # However, it has the same basename, so the bogon will be chosen
23103    # first if we set MT to just the basename; use the full file name.
23104    shift
23105    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
23106  fi
23107fi
23108fi
23109fi
23110MT=$ac_cv_prog_MT
23111if test -n "$MT"; then
23112  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
23113$as_echo "$MT" >&6; }
23114else
23115  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23116$as_echo "no" >&6; }
23117fi
23118
23119
23120
23121  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23122
23123  # First separate the path from the arguments. This will split at the first
23124  # space.
23125  complete="$MT"
23126  path="${complete%% *}"
23127  tmp="$complete EOL"
23128  arguments="${tmp#* }"
23129
23130  # Input might be given as Windows format, start by converting to
23131  # unix format.
23132  new_path=`$CYGPATH -u "$path"`
23133
23134  # Now try to locate executable using which
23135  new_path=`$WHICH "$new_path" 2> /dev/null`
23136  # bat and cmd files are not always considered executable in cygwin causing which
23137  # to not find them
23138  if test "x$new_path" = x \
23139      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23140      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23141    new_path=`$CYGPATH -u "$path"`
23142  fi
23143  if test "x$new_path" = x; then
23144    # Oops. Which didn't find the executable.
23145    # The splitting of arguments from the executable at a space might have been incorrect,
23146    # since paths with space are more likely in Windows. Give it another try with the whole
23147    # argument.
23148    path="$complete"
23149    arguments="EOL"
23150    new_path=`$CYGPATH -u "$path"`
23151    new_path=`$WHICH "$new_path" 2> /dev/null`
23152    # bat and cmd files are not always considered executable in cygwin causing which
23153    # to not find them
23154    if test "x$new_path" = x \
23155        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23156        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23157      new_path=`$CYGPATH -u "$path"`
23158    fi
23159    if test "x$new_path" = x; then
23160      # It's still not found. Now this is an unrecoverable error.
23161      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
23162$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
23163      has_space=`$ECHO "$complete" | $GREP " "`
23164      if test "x$has_space" != x; then
23165        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23166$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23167      fi
23168      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
23169    fi
23170  fi
23171
23172  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23173  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23174  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23175  # "foo.exe" is OK but "foo" is an error.
23176  #
23177  # This test is therefore slightly more accurate than "test -f" to check for file presence.
23178  # It is also a way to make sure we got the proper file name for the real test later on.
23179  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23180  if test "x$test_shortpath" = x; then
23181    # Short path failed, file does not exist as specified.
23182    # Try adding .exe or .cmd
23183    if test -f "${new_path}.exe"; then
23184      input_to_shortpath="${new_path}.exe"
23185    elif test -f "${new_path}.cmd"; then
23186      input_to_shortpath="${new_path}.cmd"
23187    else
23188      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
23189$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
23190      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23191$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23192      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
23193    fi
23194  else
23195    input_to_shortpath="$new_path"
23196  fi
23197
23198  # Call helper function which possibly converts this using DOS-style short mode.
23199  # If so, the updated path is stored in $new_path.
23200  new_path="$input_to_shortpath"
23201
23202  input_path="$input_to_shortpath"
23203  # Check if we need to convert this using DOS-style short mode. If the path
23204  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23205  # take no chances and rewrite it.
23206  # Note: m4 eats our [], so we need to use [ and ] instead.
23207  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23208  if test "x$has_forbidden_chars" != x; then
23209    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23210    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23211    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23212    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23213      # Going to short mode and back again did indeed matter. Since short mode is
23214      # case insensitive, let's make it lowercase to improve readability.
23215      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23216      # Now convert it back to Unix-stile (cygpath)
23217      input_path=`$CYGPATH -u "$shortmode_path"`
23218      new_path="$input_path"
23219    fi
23220  fi
23221
23222  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23223  if test "x$test_cygdrive_prefix" = x; then
23224    # As a simple fix, exclude /usr/bin since it's not a real path.
23225    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23226      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23227      # a path prefixed by /cygdrive for fixpath to work.
23228      new_path="$CYGWIN_ROOT_PATH$input_path"
23229    fi
23230  fi
23231
23232  # remove trailing .exe if any
23233  new_path="${new_path/%.exe/}"
23234
23235  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23236
23237  # First separate the path from the arguments. This will split at the first
23238  # space.
23239  complete="$MT"
23240  path="${complete%% *}"
23241  tmp="$complete EOL"
23242  arguments="${tmp#* }"
23243
23244  # Input might be given as Windows format, start by converting to
23245  # unix format.
23246  new_path="$path"
23247
23248  windows_path="$new_path"
23249  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23250    unix_path=`$CYGPATH -u "$windows_path"`
23251    new_path="$unix_path"
23252  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23253    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23254    new_path="$unix_path"
23255  fi
23256
23257
23258  # Now try to locate executable using which
23259  new_path=`$WHICH "$new_path" 2> /dev/null`
23260
23261  if test "x$new_path" = x; then
23262    # Oops. Which didn't find the executable.
23263    # The splitting of arguments from the executable at a space might have been incorrect,
23264    # since paths with space are more likely in Windows. Give it another try with the whole
23265    # argument.
23266    path="$complete"
23267    arguments="EOL"
23268    new_path="$path"
23269
23270  windows_path="$new_path"
23271  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23272    unix_path=`$CYGPATH -u "$windows_path"`
23273    new_path="$unix_path"
23274  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23275    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23276    new_path="$unix_path"
23277  fi
23278
23279
23280    new_path=`$WHICH "$new_path" 2> /dev/null`
23281
23282    if test "x$new_path" = x; then
23283      # It's still not found. Now this is an unrecoverable error.
23284      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
23285$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
23286      has_space=`$ECHO "$complete" | $GREP " "`
23287      if test "x$has_space" != x; then
23288        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23289$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23290      fi
23291      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
23292    fi
23293  fi
23294
23295  # Now new_path has a complete unix path to the binary
23296  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23297    # Keep paths in /bin as-is, but remove trailing .exe if any
23298    new_path="${new_path/%.exe/}"
23299    # Do not save /bin paths to all_fixpath_prefixes!
23300  else
23301    # Not in mixed or Windows style, start by that.
23302    new_path=`cmd //c echo $new_path`
23303
23304  input_path="$new_path"
23305  # Check if we need to convert this using DOS-style short mode. If the path
23306  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23307  # take no chances and rewrite it.
23308  # Note: m4 eats our [], so we need to use [ and ] instead.
23309  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23310  if test "x$has_forbidden_chars" != x; then
23311    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23312    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23313  fi
23314
23315    # Output is in $new_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    # remove trailing .exe if any
23327    new_path="${new_path/%.exe/}"
23328
23329    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23330    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23331  fi
23332
23333  else
23334    # We're on a posix platform. Hooray! :)
23335    # First separate the path from the arguments. This will split at the first
23336    # space.
23337    complete="$MT"
23338    path="${complete%% *}"
23339    tmp="$complete EOL"
23340    arguments="${tmp#* }"
23341
23342    # Cannot rely on the command "which" here since it doesn't always work.
23343    is_absolute_path=`$ECHO "$path" | $GREP ^/`
23344    if test -z "$is_absolute_path"; then
23345      # Path to executable is not absolute. Find it.
23346      IFS_save="$IFS"
23347      IFS=:
23348      for p in $PATH; do
23349        if test -f "$p/$path" && test -x "$p/$path"; then
23350          new_path="$p/$path"
23351          break
23352        fi
23353      done
23354      IFS="$IFS_save"
23355    else
23356      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MT (as $path) failed, using $path directly." >&5
23357$as_echo "$as_me: Resolving MT (as $path) failed, using $path directly." >&6;}
23358      new_path="$path"
23359    fi
23360
23361    if test "x$new_path" = x; then
23362      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
23363$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
23364      has_space=`$ECHO "$complete" | $GREP " "`
23365      if test "x$has_space" != x; then
23366        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23367$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23368      fi
23369      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
23370    fi
23371  fi
23372
23373  # Now join together the path and the arguments once again
23374  if test "x$arguments" != xEOL; then
23375    new_complete="$new_path ${arguments% *}"
23376  else
23377    new_complete="$new_path"
23378  fi
23379
23380  if test "x$complete" != "x$new_complete"; then
23381    MT="$new_complete"
23382    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
23383$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
23384  fi
23385
23386    # The resource compiler
23387    # Extract the first word of "rc", so it can be a program name with args.
23388set dummy rc; ac_word=$2
23389{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23390$as_echo_n "checking for $ac_word... " >&6; }
23391if ${ac_cv_prog_RC+:} false; then :
23392  $as_echo_n "(cached) " >&6
23393else
23394  if test -n "$RC"; then
23395  ac_cv_prog_RC="$RC" # Let the user override the test.
23396else
23397  ac_prog_rejected=no
23398as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23399for as_dir in $PATH
23400do
23401  IFS=$as_save_IFS
23402  test -z "$as_dir" && as_dir=.
23403    for ac_exec_ext in '' $ac_executable_extensions; do
23404  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23405    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
23406       ac_prog_rejected=yes
23407       continue
23408     fi
23409    ac_cv_prog_RC="rc"
23410    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23411    break 2
23412  fi
23413done
23414  done
23415IFS=$as_save_IFS
23416
23417if test $ac_prog_rejected = yes; then
23418  # We found a bogon in the path, so make sure we never use it.
23419  set dummy $ac_cv_prog_RC
23420  shift
23421  if test $# != 0; then
23422    # We chose a different compiler from the bogus one.
23423    # However, it has the same basename, so the bogon will be chosen
23424    # first if we set RC to just the basename; use the full file name.
23425    shift
23426    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
23427  fi
23428fi
23429fi
23430fi
23431RC=$ac_cv_prog_RC
23432if test -n "$RC"; then
23433  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
23434$as_echo "$RC" >&6; }
23435else
23436  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23437$as_echo "no" >&6; }
23438fi
23439
23440
23441
23442  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23443
23444  # First separate the path from the arguments. This will split at the first
23445  # space.
23446  complete="$RC"
23447  path="${complete%% *}"
23448  tmp="$complete EOL"
23449  arguments="${tmp#* }"
23450
23451  # Input might be given as Windows format, start by converting to
23452  # unix format.
23453  new_path=`$CYGPATH -u "$path"`
23454
23455  # Now try to locate executable using which
23456  new_path=`$WHICH "$new_path" 2> /dev/null`
23457  # bat and cmd files are not always considered executable in cygwin causing which
23458  # to not find them
23459  if test "x$new_path" = x \
23460      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23461      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23462    new_path=`$CYGPATH -u "$path"`
23463  fi
23464  if test "x$new_path" = x; then
23465    # Oops. Which didn't find the executable.
23466    # The splitting of arguments from the executable at a space might have been incorrect,
23467    # since paths with space are more likely in Windows. Give it another try with the whole
23468    # argument.
23469    path="$complete"
23470    arguments="EOL"
23471    new_path=`$CYGPATH -u "$path"`
23472    new_path=`$WHICH "$new_path" 2> /dev/null`
23473    # bat and cmd files are not always considered executable in cygwin causing which
23474    # to not find them
23475    if test "x$new_path" = x \
23476        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23477        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23478      new_path=`$CYGPATH -u "$path"`
23479    fi
23480    if test "x$new_path" = x; then
23481      # It's still not found. Now this is an unrecoverable error.
23482      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
23483$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
23484      has_space=`$ECHO "$complete" | $GREP " "`
23485      if test "x$has_space" != x; then
23486        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23487$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23488      fi
23489      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23490    fi
23491  fi
23492
23493  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23494  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23495  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23496  # "foo.exe" is OK but "foo" is an error.
23497  #
23498  # This test is therefore slightly more accurate than "test -f" to check for file presence.
23499  # It is also a way to make sure we got the proper file name for the real test later on.
23500  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23501  if test "x$test_shortpath" = x; then
23502    # Short path failed, file does not exist as specified.
23503    # Try adding .exe or .cmd
23504    if test -f "${new_path}.exe"; then
23505      input_to_shortpath="${new_path}.exe"
23506    elif test -f "${new_path}.cmd"; then
23507      input_to_shortpath="${new_path}.cmd"
23508    else
23509      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
23510$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
23511      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23512$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23513      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23514    fi
23515  else
23516    input_to_shortpath="$new_path"
23517  fi
23518
23519  # Call helper function which possibly converts this using DOS-style short mode.
23520  # If so, the updated path is stored in $new_path.
23521  new_path="$input_to_shortpath"
23522
23523  input_path="$input_to_shortpath"
23524  # Check if we need to convert this using DOS-style short mode. If the path
23525  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23526  # take no chances and rewrite it.
23527  # Note: m4 eats our [], so we need to use [ and ] instead.
23528  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23529  if test "x$has_forbidden_chars" != x; then
23530    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23531    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23532    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23533    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23534      # Going to short mode and back again did indeed matter. Since short mode is
23535      # case insensitive, let's make it lowercase to improve readability.
23536      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23537      # Now convert it back to Unix-stile (cygpath)
23538      input_path=`$CYGPATH -u "$shortmode_path"`
23539      new_path="$input_path"
23540    fi
23541  fi
23542
23543  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23544  if test "x$test_cygdrive_prefix" = x; then
23545    # As a simple fix, exclude /usr/bin since it's not a real path.
23546    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23547      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23548      # a path prefixed by /cygdrive for fixpath to work.
23549      new_path="$CYGWIN_ROOT_PATH$input_path"
23550    fi
23551  fi
23552
23553  # remove trailing .exe if any
23554  new_path="${new_path/%.exe/}"
23555
23556  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23557
23558  # First separate the path from the arguments. This will split at the first
23559  # space.
23560  complete="$RC"
23561  path="${complete%% *}"
23562  tmp="$complete EOL"
23563  arguments="${tmp#* }"
23564
23565  # Input might be given as Windows format, start by converting to
23566  # unix format.
23567  new_path="$path"
23568
23569  windows_path="$new_path"
23570  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23571    unix_path=`$CYGPATH -u "$windows_path"`
23572    new_path="$unix_path"
23573  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23574    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23575    new_path="$unix_path"
23576  fi
23577
23578
23579  # Now try to locate executable using which
23580  new_path=`$WHICH "$new_path" 2> /dev/null`
23581
23582  if test "x$new_path" = x; then
23583    # Oops. Which didn't find the executable.
23584    # The splitting of arguments from the executable at a space might have been incorrect,
23585    # since paths with space are more likely in Windows. Give it another try with the whole
23586    # argument.
23587    path="$complete"
23588    arguments="EOL"
23589    new_path="$path"
23590
23591  windows_path="$new_path"
23592  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23593    unix_path=`$CYGPATH -u "$windows_path"`
23594    new_path="$unix_path"
23595  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23596    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23597    new_path="$unix_path"
23598  fi
23599
23600
23601    new_path=`$WHICH "$new_path" 2> /dev/null`
23602
23603    if test "x$new_path" = x; then
23604      # It's still not found. Now this is an unrecoverable error.
23605      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
23606$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
23607      has_space=`$ECHO "$complete" | $GREP " "`
23608      if test "x$has_space" != x; then
23609        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23610$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23611      fi
23612      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23613    fi
23614  fi
23615
23616  # Now new_path has a complete unix path to the binary
23617  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23618    # Keep paths in /bin as-is, but remove trailing .exe if any
23619    new_path="${new_path/%.exe/}"
23620    # Do not save /bin paths to all_fixpath_prefixes!
23621  else
23622    # Not in mixed or Windows style, start by that.
23623    new_path=`cmd //c echo $new_path`
23624
23625  input_path="$new_path"
23626  # Check if we need to convert this using DOS-style short mode. If the path
23627  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23628  # take no chances and rewrite it.
23629  # Note: m4 eats our [], so we need to use [ and ] instead.
23630  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23631  if test "x$has_forbidden_chars" != x; then
23632    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23633    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23634  fi
23635
23636    # Output is in $new_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    # remove trailing .exe if any
23648    new_path="${new_path/%.exe/}"
23649
23650    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23651    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23652  fi
23653
23654  else
23655    # We're on a posix platform. Hooray! :)
23656    # First separate the path from the arguments. This will split at the first
23657    # space.
23658    complete="$RC"
23659    path="${complete%% *}"
23660    tmp="$complete EOL"
23661    arguments="${tmp#* }"
23662
23663    # Cannot rely on the command "which" here since it doesn't always work.
23664    is_absolute_path=`$ECHO "$path" | $GREP ^/`
23665    if test -z "$is_absolute_path"; then
23666      # Path to executable is not absolute. Find it.
23667      IFS_save="$IFS"
23668      IFS=:
23669      for p in $PATH; do
23670        if test -f "$p/$path" && test -x "$p/$path"; then
23671          new_path="$p/$path"
23672          break
23673        fi
23674      done
23675      IFS="$IFS_save"
23676    else
23677      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving RC (as $path) failed, using $path directly." >&5
23678$as_echo "$as_me: Resolving RC (as $path) failed, using $path directly." >&6;}
23679      new_path="$path"
23680    fi
23681
23682    if test "x$new_path" = x; then
23683      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
23684$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
23685      has_space=`$ECHO "$complete" | $GREP " "`
23686      if test "x$has_space" != x; then
23687        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23688$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23689      fi
23690      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23691    fi
23692  fi
23693
23694  # Now join together the path and the arguments once again
23695  if test "x$arguments" != xEOL; then
23696    new_complete="$new_path ${arguments% *}"
23697  else
23698    new_complete="$new_path"
23699  fi
23700
23701  if test "x$complete" != "x$new_complete"; then
23702    RC="$new_complete"
23703    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
23704$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
23705  fi
23706
23707
23708    # For hotspot, we need these in Windows mixed path,
23709    # so rewrite them all. Need added .exe suffix.
23710    HOTSPOT_CXX="$CXX.exe"
23711    HOTSPOT_LD="$LD.exe"
23712    HOTSPOT_MT="$MT.exe"
23713    HOTSPOT_RC="$RC.exe"
23714
23715  unix_path="$HOTSPOT_CXX"
23716  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23717    windows_path=`$CYGPATH -m "$unix_path"`
23718    HOTSPOT_CXX="$windows_path"
23719  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23720    windows_path=`cmd //c echo $unix_path`
23721    HOTSPOT_CXX="$windows_path"
23722  fi
23723
23724
23725  unix_path="$HOTSPOT_LD"
23726  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23727    windows_path=`$CYGPATH -m "$unix_path"`
23728    HOTSPOT_LD="$windows_path"
23729  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23730    windows_path=`cmd //c echo $unix_path`
23731    HOTSPOT_LD="$windows_path"
23732  fi
23733
23734
23735  unix_path="$HOTSPOT_MT"
23736  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23737    windows_path=`$CYGPATH -m "$unix_path"`
23738    HOTSPOT_MT="$windows_path"
23739  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23740    windows_path=`cmd //c echo $unix_path`
23741    HOTSPOT_MT="$windows_path"
23742  fi
23743
23744
23745  unix_path="$HOTSPOT_RC"
23746  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23747    windows_path=`$CYGPATH -m "$unix_path"`
23748    HOTSPOT_RC="$windows_path"
23749  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23750    windows_path=`cmd //c echo $unix_path`
23751    HOTSPOT_RC="$windows_path"
23752  fi
23753
23754
23755
23756
23757    RC_FLAGS="-nologo -l 0x409 -r"
23758    if test "x$VARIANT" = xOPT; then :
23759
23760    RC_FLAGS="$RC_FLAGS -d NDEBUG"
23761
23762fi
23763
23764  # The version variables used to create RC_FLAGS may be overridden
23765  # in a custom configure script, or possibly the command line.
23766  # Let those variables be expanded at make time in spec.gmk.
23767  # The \$ are escaped to the shell, and the $(...) variables
23768  # are evaluated by make.
23769  RC_FLAGS="$RC_FLAGS \
23770      -d \"JDK_BUILD_ID=\$(FULL_VERSION)\" \
23771      -d \"JDK_COMPANY=\$(COMPANY_NAME)\" \
23772      -d \"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
23773      -d \"JDK_VER=\$(JDK_MINOR_VERSION).\$(JDK_MICRO_VERSION).\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0).\$(COOKED_BUILD_NUMBER)\" \
23774      -d \"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
23775      -d \"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(JDK_MINOR_VERSION) \$(JDK_UPDATE_META_TAG)\" \
23776      -d \"JDK_FVER=\$(JDK_MINOR_VERSION),\$(JDK_MICRO_VERSION),\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0),\$(COOKED_BUILD_NUMBER)\""
23777
23778  # lib.exe is used to create static libraries.
23779  # Extract the first word of "lib", so it can be a program name with args.
23780set dummy lib; ac_word=$2
23781{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23782$as_echo_n "checking for $ac_word... " >&6; }
23783if ${ac_cv_prog_WINAR+:} false; then :
23784  $as_echo_n "(cached) " >&6
23785else
23786  if test -n "$WINAR"; then
23787  ac_cv_prog_WINAR="$WINAR" # Let the user override the test.
23788else
23789as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23790for as_dir in $PATH
23791do
23792  IFS=$as_save_IFS
23793  test -z "$as_dir" && as_dir=.
23794    for ac_exec_ext in '' $ac_executable_extensions; do
23795  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23796    ac_cv_prog_WINAR="lib"
23797    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23798    break 2
23799  fi
23800done
23801  done
23802IFS=$as_save_IFS
23803
23804fi
23805fi
23806WINAR=$ac_cv_prog_WINAR
23807if test -n "$WINAR"; then
23808  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINAR" >&5
23809$as_echo "$WINAR" >&6; }
23810else
23811  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23812$as_echo "no" >&6; }
23813fi
23814
23815
23816
23817  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23818
23819  # First separate the path from the arguments. This will split at the first
23820  # space.
23821  complete="$WINAR"
23822  path="${complete%% *}"
23823  tmp="$complete EOL"
23824  arguments="${tmp#* }"
23825
23826  # Input might be given as Windows format, start by converting to
23827  # unix format.
23828  new_path=`$CYGPATH -u "$path"`
23829
23830  # Now try to locate executable using which
23831  new_path=`$WHICH "$new_path" 2> /dev/null`
23832  # bat and cmd files are not always considered executable in cygwin causing which
23833  # to not find them
23834  if test "x$new_path" = x \
23835      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23836      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23837    new_path=`$CYGPATH -u "$path"`
23838  fi
23839  if test "x$new_path" = x; then
23840    # Oops. Which didn't find the executable.
23841    # The splitting of arguments from the executable at a space might have been incorrect,
23842    # since paths with space are more likely in Windows. Give it another try with the whole
23843    # argument.
23844    path="$complete"
23845    arguments="EOL"
23846    new_path=`$CYGPATH -u "$path"`
23847    new_path=`$WHICH "$new_path" 2> /dev/null`
23848    # bat and cmd files are not always considered executable in cygwin causing which
23849    # to not find them
23850    if test "x$new_path" = x \
23851        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23852        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23853      new_path=`$CYGPATH -u "$path"`
23854    fi
23855    if test "x$new_path" = x; then
23856      # It's still not found. Now this is an unrecoverable error.
23857      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
23858$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
23859      has_space=`$ECHO "$complete" | $GREP " "`
23860      if test "x$has_space" != x; then
23861        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23862$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23863      fi
23864      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
23865    fi
23866  fi
23867
23868  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23869  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23870  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23871  # "foo.exe" is OK but "foo" is an error.
23872  #
23873  # This test is therefore slightly more accurate than "test -f" to check for file presence.
23874  # It is also a way to make sure we got the proper file name for the real test later on.
23875  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23876  if test "x$test_shortpath" = x; then
23877    # Short path failed, file does not exist as specified.
23878    # Try adding .exe or .cmd
23879    if test -f "${new_path}.exe"; then
23880      input_to_shortpath="${new_path}.exe"
23881    elif test -f "${new_path}.cmd"; then
23882      input_to_shortpath="${new_path}.cmd"
23883    else
23884      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$new_path\", is invalid." >&5
23885$as_echo "$as_me: The path of WINAR, which resolves as \"$new_path\", is invalid." >&6;}
23886      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23887$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23888      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
23889    fi
23890  else
23891    input_to_shortpath="$new_path"
23892  fi
23893
23894  # Call helper function which possibly converts this using DOS-style short mode.
23895  # If so, the updated path is stored in $new_path.
23896  new_path="$input_to_shortpath"
23897
23898  input_path="$input_to_shortpath"
23899  # Check if we need to convert this using DOS-style short mode. If the path
23900  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23901  # take no chances and rewrite it.
23902  # Note: m4 eats our [], so we need to use [ and ] instead.
23903  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23904  if test "x$has_forbidden_chars" != x; then
23905    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23906    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23907    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23908    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23909      # Going to short mode and back again did indeed matter. Since short mode is
23910      # case insensitive, let's make it lowercase to improve readability.
23911      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23912      # Now convert it back to Unix-stile (cygpath)
23913      input_path=`$CYGPATH -u "$shortmode_path"`
23914      new_path="$input_path"
23915    fi
23916  fi
23917
23918  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23919  if test "x$test_cygdrive_prefix" = x; then
23920    # As a simple fix, exclude /usr/bin since it's not a real path.
23921    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23922      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23923      # a path prefixed by /cygdrive for fixpath to work.
23924      new_path="$CYGWIN_ROOT_PATH$input_path"
23925    fi
23926  fi
23927
23928  # remove trailing .exe if any
23929  new_path="${new_path/%.exe/}"
23930
23931  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23932
23933  # First separate the path from the arguments. This will split at the first
23934  # space.
23935  complete="$WINAR"
23936  path="${complete%% *}"
23937  tmp="$complete EOL"
23938  arguments="${tmp#* }"
23939
23940  # Input might be given as Windows format, start by converting to
23941  # unix format.
23942  new_path="$path"
23943
23944  windows_path="$new_path"
23945  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23946    unix_path=`$CYGPATH -u "$windows_path"`
23947    new_path="$unix_path"
23948  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23949    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23950    new_path="$unix_path"
23951  fi
23952
23953
23954  # Now try to locate executable using which
23955  new_path=`$WHICH "$new_path" 2> /dev/null`
23956
23957  if test "x$new_path" = x; then
23958    # Oops. Which didn't find the executable.
23959    # The splitting of arguments from the executable at a space might have been incorrect,
23960    # since paths with space are more likely in Windows. Give it another try with the whole
23961    # argument.
23962    path="$complete"
23963    arguments="EOL"
23964    new_path="$path"
23965
23966  windows_path="$new_path"
23967  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23968    unix_path=`$CYGPATH -u "$windows_path"`
23969    new_path="$unix_path"
23970  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23971    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23972    new_path="$unix_path"
23973  fi
23974
23975
23976    new_path=`$WHICH "$new_path" 2> /dev/null`
23977
23978    if test "x$new_path" = x; then
23979      # It's still not found. Now this is an unrecoverable error.
23980      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
23981$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
23982      has_space=`$ECHO "$complete" | $GREP " "`
23983      if test "x$has_space" != x; then
23984        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23985$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23986      fi
23987      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
23988    fi
23989  fi
23990
23991  # Now new_path has a complete unix path to the binary
23992  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23993    # Keep paths in /bin as-is, but remove trailing .exe if any
23994    new_path="${new_path/%.exe/}"
23995    # Do not save /bin paths to all_fixpath_prefixes!
23996  else
23997    # Not in mixed or Windows style, start by that.
23998    new_path=`cmd //c echo $new_path`
23999
24000  input_path="$new_path"
24001  # Check if we need to convert this using DOS-style short mode. If the path
24002  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24003  # take no chances and rewrite it.
24004  # Note: m4 eats our [], so we need to use [ and ] instead.
24005  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24006  if test "x$has_forbidden_chars" != x; then
24007    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24008    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24009  fi
24010
24011    # Output is in $new_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    # remove trailing .exe if any
24023    new_path="${new_path/%.exe/}"
24024
24025    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24026    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24027  fi
24028
24029  else
24030    # We're on a posix platform. Hooray! :)
24031    # First separate the path from the arguments. This will split at the first
24032    # space.
24033    complete="$WINAR"
24034    path="${complete%% *}"
24035    tmp="$complete EOL"
24036    arguments="${tmp#* }"
24037
24038    # Cannot rely on the command "which" here since it doesn't always work.
24039    is_absolute_path=`$ECHO "$path" | $GREP ^/`
24040    if test -z "$is_absolute_path"; then
24041      # Path to executable is not absolute. Find it.
24042      IFS_save="$IFS"
24043      IFS=:
24044      for p in $PATH; do
24045        if test -f "$p/$path" && test -x "$p/$path"; then
24046          new_path="$p/$path"
24047          break
24048        fi
24049      done
24050      IFS="$IFS_save"
24051    else
24052      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINAR (as $path) failed, using $path directly." >&5
24053$as_echo "$as_me: Resolving WINAR (as $path) failed, using $path directly." >&6;}
24054      new_path="$path"
24055    fi
24056
24057    if test "x$new_path" = x; then
24058      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
24059$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
24060      has_space=`$ECHO "$complete" | $GREP " "`
24061      if test "x$has_space" != x; then
24062        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24063$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24064      fi
24065      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
24066    fi
24067  fi
24068
24069  # Now join together the path and the arguments once again
24070  if test "x$arguments" != xEOL; then
24071    new_complete="$new_path ${arguments% *}"
24072  else
24073    new_complete="$new_path"
24074  fi
24075
24076  if test "x$complete" != "x$new_complete"; then
24077    WINAR="$new_complete"
24078    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINAR to \"$new_complete\"" >&5
24079$as_echo "$as_me: Rewriting WINAR to \"$new_complete\"" >&6;}
24080  fi
24081
24082  AR="$WINAR"
24083  ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
24084
24085  # Extract the first word of "dumpbin", so it can be a program name with args.
24086set dummy dumpbin; ac_word=$2
24087{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24088$as_echo_n "checking for $ac_word... " >&6; }
24089if ${ac_cv_prog_DUMPBIN+:} false; then :
24090  $as_echo_n "(cached) " >&6
24091else
24092  if test -n "$DUMPBIN"; then
24093  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
24094else
24095as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24096for as_dir in $PATH
24097do
24098  IFS=$as_save_IFS
24099  test -z "$as_dir" && as_dir=.
24100    for ac_exec_ext in '' $ac_executable_extensions; do
24101  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24102    ac_cv_prog_DUMPBIN="dumpbin"
24103    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24104    break 2
24105  fi
24106done
24107  done
24108IFS=$as_save_IFS
24109
24110fi
24111fi
24112DUMPBIN=$ac_cv_prog_DUMPBIN
24113if test -n "$DUMPBIN"; then
24114  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
24115$as_echo "$DUMPBIN" >&6; }
24116else
24117  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24118$as_echo "no" >&6; }
24119fi
24120
24121
24122
24123  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24124
24125  # First separate the path from the arguments. This will split at the first
24126  # space.
24127  complete="$DUMPBIN"
24128  path="${complete%% *}"
24129  tmp="$complete EOL"
24130  arguments="${tmp#* }"
24131
24132  # Input might be given as Windows format, start by converting to
24133  # unix format.
24134  new_path=`$CYGPATH -u "$path"`
24135
24136  # Now try to locate executable using which
24137  new_path=`$WHICH "$new_path" 2> /dev/null`
24138  # bat and cmd files are not always considered executable in cygwin causing which
24139  # to not find them
24140  if test "x$new_path" = x \
24141      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24142      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24143    new_path=`$CYGPATH -u "$path"`
24144  fi
24145  if test "x$new_path" = x; then
24146    # Oops. Which didn't find the executable.
24147    # The splitting of arguments from the executable at a space might have been incorrect,
24148    # since paths with space are more likely in Windows. Give it another try with the whole
24149    # argument.
24150    path="$complete"
24151    arguments="EOL"
24152    new_path=`$CYGPATH -u "$path"`
24153    new_path=`$WHICH "$new_path" 2> /dev/null`
24154    # bat and cmd files are not always considered executable in cygwin causing which
24155    # to not find them
24156    if test "x$new_path" = x \
24157        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24158        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24159      new_path=`$CYGPATH -u "$path"`
24160    fi
24161    if test "x$new_path" = x; then
24162      # It's still not found. Now this is an unrecoverable error.
24163      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
24164$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
24165      has_space=`$ECHO "$complete" | $GREP " "`
24166      if test "x$has_space" != x; then
24167        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24168$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24169      fi
24170      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
24171    fi
24172  fi
24173
24174  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24175  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24176  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24177  # "foo.exe" is OK but "foo" is an error.
24178  #
24179  # This test is therefore slightly more accurate than "test -f" to check for file presence.
24180  # It is also a way to make sure we got the proper file name for the real test later on.
24181  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24182  if test "x$test_shortpath" = x; then
24183    # Short path failed, file does not exist as specified.
24184    # Try adding .exe or .cmd
24185    if test -f "${new_path}.exe"; then
24186      input_to_shortpath="${new_path}.exe"
24187    elif test -f "${new_path}.cmd"; then
24188      input_to_shortpath="${new_path}.cmd"
24189    else
24190      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
24191$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
24192      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24193$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24194      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
24195    fi
24196  else
24197    input_to_shortpath="$new_path"
24198  fi
24199
24200  # Call helper function which possibly converts this using DOS-style short mode.
24201  # If so, the updated path is stored in $new_path.
24202  new_path="$input_to_shortpath"
24203
24204  input_path="$input_to_shortpath"
24205  # Check if we need to convert this using DOS-style short mode. If the path
24206  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24207  # take no chances and rewrite it.
24208  # Note: m4 eats our [], so we need to use [ and ] instead.
24209  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24210  if test "x$has_forbidden_chars" != x; then
24211    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24212    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24213    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24214    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24215      # Going to short mode and back again did indeed matter. Since short mode is
24216      # case insensitive, let's make it lowercase to improve readability.
24217      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24218      # Now convert it back to Unix-stile (cygpath)
24219      input_path=`$CYGPATH -u "$shortmode_path"`
24220      new_path="$input_path"
24221    fi
24222  fi
24223
24224  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24225  if test "x$test_cygdrive_prefix" = x; then
24226    # As a simple fix, exclude /usr/bin since it's not a real path.
24227    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24228      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24229      # a path prefixed by /cygdrive for fixpath to work.
24230      new_path="$CYGWIN_ROOT_PATH$input_path"
24231    fi
24232  fi
24233
24234  # remove trailing .exe if any
24235  new_path="${new_path/%.exe/}"
24236
24237  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24238
24239  # First separate the path from the arguments. This will split at the first
24240  # space.
24241  complete="$DUMPBIN"
24242  path="${complete%% *}"
24243  tmp="$complete EOL"
24244  arguments="${tmp#* }"
24245
24246  # Input might be given as Windows format, start by converting to
24247  # unix format.
24248  new_path="$path"
24249
24250  windows_path="$new_path"
24251  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24252    unix_path=`$CYGPATH -u "$windows_path"`
24253    new_path="$unix_path"
24254  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24255    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24256    new_path="$unix_path"
24257  fi
24258
24259
24260  # Now try to locate executable using which
24261  new_path=`$WHICH "$new_path" 2> /dev/null`
24262
24263  if test "x$new_path" = x; then
24264    # Oops. Which didn't find the executable.
24265    # The splitting of arguments from the executable at a space might have been incorrect,
24266    # since paths with space are more likely in Windows. Give it another try with the whole
24267    # argument.
24268    path="$complete"
24269    arguments="EOL"
24270    new_path="$path"
24271
24272  windows_path="$new_path"
24273  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24274    unix_path=`$CYGPATH -u "$windows_path"`
24275    new_path="$unix_path"
24276  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24277    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24278    new_path="$unix_path"
24279  fi
24280
24281
24282    new_path=`$WHICH "$new_path" 2> /dev/null`
24283
24284    if test "x$new_path" = x; then
24285      # It's still not found. Now this is an unrecoverable error.
24286      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
24287$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
24288      has_space=`$ECHO "$complete" | $GREP " "`
24289      if test "x$has_space" != x; then
24290        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24291$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24292      fi
24293      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
24294    fi
24295  fi
24296
24297  # Now new_path has a complete unix path to the binary
24298  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24299    # Keep paths in /bin as-is, but remove trailing .exe if any
24300    new_path="${new_path/%.exe/}"
24301    # Do not save /bin paths to all_fixpath_prefixes!
24302  else
24303    # Not in mixed or Windows style, start by that.
24304    new_path=`cmd //c echo $new_path`
24305
24306  input_path="$new_path"
24307  # Check if we need to convert this using DOS-style short mode. If the path
24308  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24309  # take no chances and rewrite it.
24310  # Note: m4 eats our [], so we need to use [ and ] instead.
24311  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24312  if test "x$has_forbidden_chars" != x; then
24313    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24314    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24315  fi
24316
24317    # Output is in $new_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    # remove trailing .exe if any
24329    new_path="${new_path/%.exe/}"
24330
24331    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24332    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24333  fi
24334
24335  else
24336    # We're on a posix platform. Hooray! :)
24337    # First separate the path from the arguments. This will split at the first
24338    # space.
24339    complete="$DUMPBIN"
24340    path="${complete%% *}"
24341    tmp="$complete EOL"
24342    arguments="${tmp#* }"
24343
24344    # Cannot rely on the command "which" here since it doesn't always work.
24345    is_absolute_path=`$ECHO "$path" | $GREP ^/`
24346    if test -z "$is_absolute_path"; then
24347      # Path to executable is not absolute. Find it.
24348      IFS_save="$IFS"
24349      IFS=:
24350      for p in $PATH; do
24351        if test -f "$p/$path" && test -x "$p/$path"; then
24352          new_path="$p/$path"
24353          break
24354        fi
24355      done
24356      IFS="$IFS_save"
24357    else
24358      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving DUMPBIN (as $path) failed, using $path directly." >&5
24359$as_echo "$as_me: Resolving DUMPBIN (as $path) failed, using $path directly." >&6;}
24360      new_path="$path"
24361    fi
24362
24363    if test "x$new_path" = x; then
24364      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
24365$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
24366      has_space=`$ECHO "$complete" | $GREP " "`
24367      if test "x$has_space" != x; then
24368        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24369$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24370      fi
24371      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
24372    fi
24373  fi
24374
24375  # Now join together the path and the arguments once again
24376  if test "x$arguments" != xEOL; then
24377    new_complete="$new_path ${arguments% *}"
24378  else
24379    new_complete="$new_path"
24380  fi
24381
24382  if test "x$complete" != "x$new_complete"; then
24383    DUMPBIN="$new_complete"
24384    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
24385$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
24386  fi
24387
24388
24389      COMPILER_TYPE=CL
24390      CCXXFLAGS="$CCXXFLAGS -nologo"
24391
24392fi
24393
24394
24395
24396  ac_ext=c
24397ac_cpp='$CPP $CPPFLAGS'
24398ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24399ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24400ac_compiler_gnu=$ac_cv_c_compiler_gnu
24401{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
24402$as_echo_n "checking how to run the C preprocessor... " >&6; }
24403# On Suns, sometimes $CPP names a directory.
24404if test -n "$CPP" && test -d "$CPP"; then
24405  CPP=
24406fi
24407if test -z "$CPP"; then
24408  if ${ac_cv_prog_CPP+:} false; then :
24409  $as_echo_n "(cached) " >&6
24410else
24411      # Double quotes because CPP needs to be expanded
24412    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
24413    do
24414      ac_preproc_ok=false
24415for ac_c_preproc_warn_flag in '' yes
24416do
24417  # Use a header file that comes with gcc, so configuring glibc
24418  # with a fresh cross-compiler works.
24419  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24420  # <limits.h> exists even on freestanding compilers.
24421  # On the NeXT, cc -E runs the code through the compiler's parser,
24422  # not just through cpp. "Syntax error" is here to catch this case.
24423  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24424/* end confdefs.h.  */
24425#ifdef __STDC__
24426# include <limits.h>
24427#else
24428# include <assert.h>
24429#endif
24430		     Syntax error
24431_ACEOF
24432if ac_fn_c_try_cpp "$LINENO"; then :
24433
24434else
24435  # Broken: fails on valid input.
24436continue
24437fi
24438rm -f conftest.err conftest.i conftest.$ac_ext
24439
24440  # OK, works on sane cases.  Now check whether nonexistent headers
24441  # can be detected and how.
24442  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24443/* end confdefs.h.  */
24444#include <ac_nonexistent.h>
24445_ACEOF
24446if ac_fn_c_try_cpp "$LINENO"; then :
24447  # Broken: success on invalid input.
24448continue
24449else
24450  # Passes both tests.
24451ac_preproc_ok=:
24452break
24453fi
24454rm -f conftest.err conftest.i conftest.$ac_ext
24455
24456done
24457# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24458rm -f conftest.i conftest.err conftest.$ac_ext
24459if $ac_preproc_ok; then :
24460  break
24461fi
24462
24463    done
24464    ac_cv_prog_CPP=$CPP
24465
24466fi
24467  CPP=$ac_cv_prog_CPP
24468else
24469  ac_cv_prog_CPP=$CPP
24470fi
24471{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
24472$as_echo "$CPP" >&6; }
24473ac_preproc_ok=false
24474for ac_c_preproc_warn_flag in '' yes
24475do
24476  # Use a header file that comes with gcc, so configuring glibc
24477  # with a fresh cross-compiler works.
24478  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24479  # <limits.h> exists even on freestanding compilers.
24480  # On the NeXT, cc -E runs the code through the compiler's parser,
24481  # not just through cpp. "Syntax error" is here to catch this case.
24482  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24483/* end confdefs.h.  */
24484#ifdef __STDC__
24485# include <limits.h>
24486#else
24487# include <assert.h>
24488#endif
24489		     Syntax error
24490_ACEOF
24491if ac_fn_c_try_cpp "$LINENO"; then :
24492
24493else
24494  # Broken: fails on valid input.
24495continue
24496fi
24497rm -f conftest.err conftest.i conftest.$ac_ext
24498
24499  # OK, works on sane cases.  Now check whether nonexistent headers
24500  # can be detected and how.
24501  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24502/* end confdefs.h.  */
24503#include <ac_nonexistent.h>
24504_ACEOF
24505if ac_fn_c_try_cpp "$LINENO"; then :
24506  # Broken: success on invalid input.
24507continue
24508else
24509  # Passes both tests.
24510ac_preproc_ok=:
24511break
24512fi
24513rm -f conftest.err conftest.i conftest.$ac_ext
24514
24515done
24516# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24517rm -f conftest.i conftest.err conftest.$ac_ext
24518if $ac_preproc_ok; then :
24519
24520else
24521  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
24522$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
24523as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
24524See \`config.log' for more details" "$LINENO" 5; }
24525fi
24526
24527ac_ext=cpp
24528ac_cpp='$CXXCPP $CPPFLAGS'
24529ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24530ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24531ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24532
24533
24534  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24535
24536  # First separate the path from the arguments. This will split at the first
24537  # space.
24538  complete="$CPP"
24539  path="${complete%% *}"
24540  tmp="$complete EOL"
24541  arguments="${tmp#* }"
24542
24543  # Input might be given as Windows format, start by converting to
24544  # unix format.
24545  new_path=`$CYGPATH -u "$path"`
24546
24547  # Now try to locate executable using which
24548  new_path=`$WHICH "$new_path" 2> /dev/null`
24549  # bat and cmd files are not always considered executable in cygwin causing which
24550  # to not find them
24551  if test "x$new_path" = x \
24552      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24553      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24554    new_path=`$CYGPATH -u "$path"`
24555  fi
24556  if test "x$new_path" = x; then
24557    # Oops. Which didn't find the executable.
24558    # The splitting of arguments from the executable at a space might have been incorrect,
24559    # since paths with space are more likely in Windows. Give it another try with the whole
24560    # argument.
24561    path="$complete"
24562    arguments="EOL"
24563    new_path=`$CYGPATH -u "$path"`
24564    new_path=`$WHICH "$new_path" 2> /dev/null`
24565    # bat and cmd files are not always considered executable in cygwin causing which
24566    # to not find them
24567    if test "x$new_path" = x \
24568        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24569        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24570      new_path=`$CYGPATH -u "$path"`
24571    fi
24572    if test "x$new_path" = x; then
24573      # It's still not found. Now this is an unrecoverable error.
24574      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
24575$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
24576      has_space=`$ECHO "$complete" | $GREP " "`
24577      if test "x$has_space" != x; then
24578        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24579$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24580      fi
24581      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24582    fi
24583  fi
24584
24585  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24586  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24587  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24588  # "foo.exe" is OK but "foo" is an error.
24589  #
24590  # This test is therefore slightly more accurate than "test -f" to check for file presence.
24591  # It is also a way to make sure we got the proper file name for the real test later on.
24592  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24593  if test "x$test_shortpath" = x; then
24594    # Short path failed, file does not exist as specified.
24595    # Try adding .exe or .cmd
24596    if test -f "${new_path}.exe"; then
24597      input_to_shortpath="${new_path}.exe"
24598    elif test -f "${new_path}.cmd"; then
24599      input_to_shortpath="${new_path}.cmd"
24600    else
24601      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
24602$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
24603      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24604$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24605      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24606    fi
24607  else
24608    input_to_shortpath="$new_path"
24609  fi
24610
24611  # Call helper function which possibly converts this using DOS-style short mode.
24612  # If so, the updated path is stored in $new_path.
24613  new_path="$input_to_shortpath"
24614
24615  input_path="$input_to_shortpath"
24616  # Check if we need to convert this using DOS-style short mode. If the path
24617  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24618  # take no chances and rewrite it.
24619  # Note: m4 eats our [], so we need to use [ and ] instead.
24620  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24621  if test "x$has_forbidden_chars" != x; then
24622    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24623    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24624    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24625    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24626      # Going to short mode and back again did indeed matter. Since short mode is
24627      # case insensitive, let's make it lowercase to improve readability.
24628      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24629      # Now convert it back to Unix-stile (cygpath)
24630      input_path=`$CYGPATH -u "$shortmode_path"`
24631      new_path="$input_path"
24632    fi
24633  fi
24634
24635  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24636  if test "x$test_cygdrive_prefix" = x; then
24637    # As a simple fix, exclude /usr/bin since it's not a real path.
24638    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24639      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24640      # a path prefixed by /cygdrive for fixpath to work.
24641      new_path="$CYGWIN_ROOT_PATH$input_path"
24642    fi
24643  fi
24644
24645  # remove trailing .exe if any
24646  new_path="${new_path/%.exe/}"
24647
24648  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24649
24650  # First separate the path from the arguments. This will split at the first
24651  # space.
24652  complete="$CPP"
24653  path="${complete%% *}"
24654  tmp="$complete EOL"
24655  arguments="${tmp#* }"
24656
24657  # Input might be given as Windows format, start by converting to
24658  # unix format.
24659  new_path="$path"
24660
24661  windows_path="$new_path"
24662  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24663    unix_path=`$CYGPATH -u "$windows_path"`
24664    new_path="$unix_path"
24665  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24666    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24667    new_path="$unix_path"
24668  fi
24669
24670
24671  # Now try to locate executable using which
24672  new_path=`$WHICH "$new_path" 2> /dev/null`
24673
24674  if test "x$new_path" = x; then
24675    # Oops. Which didn't find the executable.
24676    # The splitting of arguments from the executable at a space might have been incorrect,
24677    # since paths with space are more likely in Windows. Give it another try with the whole
24678    # argument.
24679    path="$complete"
24680    arguments="EOL"
24681    new_path="$path"
24682
24683  windows_path="$new_path"
24684  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24685    unix_path=`$CYGPATH -u "$windows_path"`
24686    new_path="$unix_path"
24687  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24688    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24689    new_path="$unix_path"
24690  fi
24691
24692
24693    new_path=`$WHICH "$new_path" 2> /dev/null`
24694
24695    if test "x$new_path" = x; then
24696      # It's still not found. Now this is an unrecoverable error.
24697      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
24698$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
24699      has_space=`$ECHO "$complete" | $GREP " "`
24700      if test "x$has_space" != x; then
24701        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24702$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24703      fi
24704      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24705    fi
24706  fi
24707
24708  # Now new_path has a complete unix path to the binary
24709  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24710    # Keep paths in /bin as-is, but remove trailing .exe if any
24711    new_path="${new_path/%.exe/}"
24712    # Do not save /bin paths to all_fixpath_prefixes!
24713  else
24714    # Not in mixed or Windows style, start by that.
24715    new_path=`cmd //c echo $new_path`
24716
24717  input_path="$new_path"
24718  # Check if we need to convert this using DOS-style short mode. If the path
24719  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24720  # take no chances and rewrite it.
24721  # Note: m4 eats our [], so we need to use [ and ] instead.
24722  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24723  if test "x$has_forbidden_chars" != x; then
24724    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24725    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24726  fi
24727
24728    # Output is in $new_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    # remove trailing .exe if any
24740    new_path="${new_path/%.exe/}"
24741
24742    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24743    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24744  fi
24745
24746  else
24747    # We're on a posix platform. Hooray! :)
24748    # First separate the path from the arguments. This will split at the first
24749    # space.
24750    complete="$CPP"
24751    path="${complete%% *}"
24752    tmp="$complete EOL"
24753    arguments="${tmp#* }"
24754
24755    # Cannot rely on the command "which" here since it doesn't always work.
24756    is_absolute_path=`$ECHO "$path" | $GREP ^/`
24757    if test -z "$is_absolute_path"; then
24758      # Path to executable is not absolute. Find it.
24759      IFS_save="$IFS"
24760      IFS=:
24761      for p in $PATH; do
24762        if test -f "$p/$path" && test -x "$p/$path"; then
24763          new_path="$p/$path"
24764          break
24765        fi
24766      done
24767      IFS="$IFS_save"
24768    else
24769      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CPP (as $path) failed, using $path directly." >&5
24770$as_echo "$as_me: Resolving CPP (as $path) failed, using $path directly." >&6;}
24771      new_path="$path"
24772    fi
24773
24774    if test "x$new_path" = x; then
24775      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
24776$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
24777      has_space=`$ECHO "$complete" | $GREP " "`
24778      if test "x$has_space" != x; then
24779        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24780$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24781      fi
24782      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24783    fi
24784  fi
24785
24786  # Now join together the path and the arguments once again
24787  if test "x$arguments" != xEOL; then
24788    new_complete="$new_path ${arguments% *}"
24789  else
24790    new_complete="$new_path"
24791  fi
24792
24793  if test "x$complete" != "x$new_complete"; then
24794    CPP="$new_complete"
24795    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
24796$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
24797  fi
24798
24799
24800  ac_ext=cpp
24801ac_cpp='$CXXCPP $CPPFLAGS'
24802ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24803ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24804ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24805{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
24806$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
24807if test -z "$CXXCPP"; then
24808  if ${ac_cv_prog_CXXCPP+:} false; then :
24809  $as_echo_n "(cached) " >&6
24810else
24811      # Double quotes because CXXCPP needs to be expanded
24812    for CXXCPP in "$CXX -E" "/lib/cpp"
24813    do
24814      ac_preproc_ok=false
24815for ac_cxx_preproc_warn_flag in '' yes
24816do
24817  # Use a header file that comes with gcc, so configuring glibc
24818  # with a fresh cross-compiler works.
24819  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24820  # <limits.h> exists even on freestanding compilers.
24821  # On the NeXT, cc -E runs the code through the compiler's parser,
24822  # not just through cpp. "Syntax error" is here to catch this case.
24823  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24824/* end confdefs.h.  */
24825#ifdef __STDC__
24826# include <limits.h>
24827#else
24828# include <assert.h>
24829#endif
24830		     Syntax error
24831_ACEOF
24832if ac_fn_cxx_try_cpp "$LINENO"; then :
24833
24834else
24835  # Broken: fails on valid input.
24836continue
24837fi
24838rm -f conftest.err conftest.i conftest.$ac_ext
24839
24840  # OK, works on sane cases.  Now check whether nonexistent headers
24841  # can be detected and how.
24842  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24843/* end confdefs.h.  */
24844#include <ac_nonexistent.h>
24845_ACEOF
24846if ac_fn_cxx_try_cpp "$LINENO"; then :
24847  # Broken: success on invalid input.
24848continue
24849else
24850  # Passes both tests.
24851ac_preproc_ok=:
24852break
24853fi
24854rm -f conftest.err conftest.i conftest.$ac_ext
24855
24856done
24857# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24858rm -f conftest.i conftest.err conftest.$ac_ext
24859if $ac_preproc_ok; then :
24860  break
24861fi
24862
24863    done
24864    ac_cv_prog_CXXCPP=$CXXCPP
24865
24866fi
24867  CXXCPP=$ac_cv_prog_CXXCPP
24868else
24869  ac_cv_prog_CXXCPP=$CXXCPP
24870fi
24871{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
24872$as_echo "$CXXCPP" >&6; }
24873ac_preproc_ok=false
24874for ac_cxx_preproc_warn_flag in '' yes
24875do
24876  # Use a header file that comes with gcc, so configuring glibc
24877  # with a fresh cross-compiler works.
24878  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24879  # <limits.h> exists even on freestanding compilers.
24880  # On the NeXT, cc -E runs the code through the compiler's parser,
24881  # not just through cpp. "Syntax error" is here to catch this case.
24882  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24883/* end confdefs.h.  */
24884#ifdef __STDC__
24885# include <limits.h>
24886#else
24887# include <assert.h>
24888#endif
24889		     Syntax error
24890_ACEOF
24891if ac_fn_cxx_try_cpp "$LINENO"; then :
24892
24893else
24894  # Broken: fails on valid input.
24895continue
24896fi
24897rm -f conftest.err conftest.i conftest.$ac_ext
24898
24899  # OK, works on sane cases.  Now check whether nonexistent headers
24900  # can be detected and how.
24901  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24902/* end confdefs.h.  */
24903#include <ac_nonexistent.h>
24904_ACEOF
24905if ac_fn_cxx_try_cpp "$LINENO"; then :
24906  # Broken: success on invalid input.
24907continue
24908else
24909  # Passes both tests.
24910ac_preproc_ok=:
24911break
24912fi
24913rm -f conftest.err conftest.i conftest.$ac_ext
24914
24915done
24916# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24917rm -f conftest.i conftest.err conftest.$ac_ext
24918if $ac_preproc_ok; then :
24919
24920else
24921  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
24922$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
24923as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
24924See \`config.log' for more details" "$LINENO" 5; }
24925fi
24926
24927ac_ext=cpp
24928ac_cpp='$CXXCPP $CPPFLAGS'
24929ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24930ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24931ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24932
24933
24934  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24935
24936  # First separate the path from the arguments. This will split at the first
24937  # space.
24938  complete="$CXXCPP"
24939  path="${complete%% *}"
24940  tmp="$complete EOL"
24941  arguments="${tmp#* }"
24942
24943  # Input might be given as Windows format, start by converting to
24944  # unix format.
24945  new_path=`$CYGPATH -u "$path"`
24946
24947  # Now try to locate executable using which
24948  new_path=`$WHICH "$new_path" 2> /dev/null`
24949  # bat and cmd files are not always considered executable in cygwin causing which
24950  # to not find them
24951  if test "x$new_path" = x \
24952      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24953      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24954    new_path=`$CYGPATH -u "$path"`
24955  fi
24956  if test "x$new_path" = x; then
24957    # Oops. Which didn't find the executable.
24958    # The splitting of arguments from the executable at a space might have been incorrect,
24959    # since paths with space are more likely in Windows. Give it another try with the whole
24960    # argument.
24961    path="$complete"
24962    arguments="EOL"
24963    new_path=`$CYGPATH -u "$path"`
24964    new_path=`$WHICH "$new_path" 2> /dev/null`
24965    # bat and cmd files are not always considered executable in cygwin causing which
24966    # to not find them
24967    if test "x$new_path" = x \
24968        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24969        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24970      new_path=`$CYGPATH -u "$path"`
24971    fi
24972    if test "x$new_path" = x; then
24973      # It's still not found. Now this is an unrecoverable error.
24974      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
24975$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
24976      has_space=`$ECHO "$complete" | $GREP " "`
24977      if test "x$has_space" != x; then
24978        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24979$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24980      fi
24981      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
24982    fi
24983  fi
24984
24985  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24986  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24987  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24988  # "foo.exe" is OK but "foo" is an error.
24989  #
24990  # This test is therefore slightly more accurate than "test -f" to check for file presence.
24991  # It is also a way to make sure we got the proper file name for the real test later on.
24992  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24993  if test "x$test_shortpath" = x; then
24994    # Short path failed, file does not exist as specified.
24995    # Try adding .exe or .cmd
24996    if test -f "${new_path}.exe"; then
24997      input_to_shortpath="${new_path}.exe"
24998    elif test -f "${new_path}.cmd"; then
24999      input_to_shortpath="${new_path}.cmd"
25000    else
25001      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
25002$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
25003      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25004$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25005      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
25006    fi
25007  else
25008    input_to_shortpath="$new_path"
25009  fi
25010
25011  # Call helper function which possibly converts this using DOS-style short mode.
25012  # If so, the updated path is stored in $new_path.
25013  new_path="$input_to_shortpath"
25014
25015  input_path="$input_to_shortpath"
25016  # Check if we need to convert this using DOS-style short mode. If the path
25017  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25018  # take no chances and rewrite it.
25019  # Note: m4 eats our [], so we need to use [ and ] instead.
25020  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25021  if test "x$has_forbidden_chars" != x; then
25022    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25023    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25024    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25025    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25026      # Going to short mode and back again did indeed matter. Since short mode is
25027      # case insensitive, let's make it lowercase to improve readability.
25028      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25029      # Now convert it back to Unix-stile (cygpath)
25030      input_path=`$CYGPATH -u "$shortmode_path"`
25031      new_path="$input_path"
25032    fi
25033  fi
25034
25035  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25036  if test "x$test_cygdrive_prefix" = x; then
25037    # As a simple fix, exclude /usr/bin since it's not a real path.
25038    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25039      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25040      # a path prefixed by /cygdrive for fixpath to work.
25041      new_path="$CYGWIN_ROOT_PATH$input_path"
25042    fi
25043  fi
25044
25045  # remove trailing .exe if any
25046  new_path="${new_path/%.exe/}"
25047
25048  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25049
25050  # First separate the path from the arguments. This will split at the first
25051  # space.
25052  complete="$CXXCPP"
25053  path="${complete%% *}"
25054  tmp="$complete EOL"
25055  arguments="${tmp#* }"
25056
25057  # Input might be given as Windows format, start by converting to
25058  # unix format.
25059  new_path="$path"
25060
25061  windows_path="$new_path"
25062  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25063    unix_path=`$CYGPATH -u "$windows_path"`
25064    new_path="$unix_path"
25065  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25066    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25067    new_path="$unix_path"
25068  fi
25069
25070
25071  # Now try to locate executable using which
25072  new_path=`$WHICH "$new_path" 2> /dev/null`
25073
25074  if test "x$new_path" = x; then
25075    # Oops. Which didn't find the executable.
25076    # The splitting of arguments from the executable at a space might have been incorrect,
25077    # since paths with space are more likely in Windows. Give it another try with the whole
25078    # argument.
25079    path="$complete"
25080    arguments="EOL"
25081    new_path="$path"
25082
25083  windows_path="$new_path"
25084  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25085    unix_path=`$CYGPATH -u "$windows_path"`
25086    new_path="$unix_path"
25087  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25088    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25089    new_path="$unix_path"
25090  fi
25091
25092
25093    new_path=`$WHICH "$new_path" 2> /dev/null`
25094
25095    if test "x$new_path" = x; then
25096      # It's still not found. Now this is an unrecoverable error.
25097      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
25098$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
25099      has_space=`$ECHO "$complete" | $GREP " "`
25100      if test "x$has_space" != x; then
25101        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25102$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25103      fi
25104      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
25105    fi
25106  fi
25107
25108  # Now new_path has a complete unix path to the binary
25109  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25110    # Keep paths in /bin as-is, but remove trailing .exe if any
25111    new_path="${new_path/%.exe/}"
25112    # Do not save /bin paths to all_fixpath_prefixes!
25113  else
25114    # Not in mixed or Windows style, start by that.
25115    new_path=`cmd //c echo $new_path`
25116
25117  input_path="$new_path"
25118  # Check if we need to convert this using DOS-style short mode. If the path
25119  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25120  # take no chances and rewrite it.
25121  # Note: m4 eats our [], so we need to use [ and ] instead.
25122  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25123  if test "x$has_forbidden_chars" != x; then
25124    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25125    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25126  fi
25127
25128    # Output is in $new_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    # remove trailing .exe if any
25140    new_path="${new_path/%.exe/}"
25141
25142    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25143    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25144  fi
25145
25146  else
25147    # We're on a posix platform. Hooray! :)
25148    # First separate the path from the arguments. This will split at the first
25149    # space.
25150    complete="$CXXCPP"
25151    path="${complete%% *}"
25152    tmp="$complete EOL"
25153    arguments="${tmp#* }"
25154
25155    # Cannot rely on the command "which" here since it doesn't always work.
25156    is_absolute_path=`$ECHO "$path" | $GREP ^/`
25157    if test -z "$is_absolute_path"; then
25158      # Path to executable is not absolute. Find it.
25159      IFS_save="$IFS"
25160      IFS=:
25161      for p in $PATH; do
25162        if test -f "$p/$path" && test -x "$p/$path"; then
25163          new_path="$p/$path"
25164          break
25165        fi
25166      done
25167      IFS="$IFS_save"
25168    else
25169      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXXCPP (as $path) failed, using $path directly." >&5
25170$as_echo "$as_me: Resolving CXXCPP (as $path) failed, using $path directly." >&6;}
25171      new_path="$path"
25172    fi
25173
25174    if test "x$new_path" = x; then
25175      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
25176$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
25177      has_space=`$ECHO "$complete" | $GREP " "`
25178      if test "x$has_space" != x; then
25179        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25180$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25181      fi
25182      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
25183    fi
25184  fi
25185
25186  # Now join together the path and the arguments once again
25187  if test "x$arguments" != xEOL; then
25188    new_complete="$new_path ${arguments% *}"
25189  else
25190    new_complete="$new_path"
25191  fi
25192
25193  if test "x$complete" != "x$new_complete"; then
25194    CXXCPP="$new_complete"
25195    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
25196$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
25197  fi
25198
25199
25200  if test "x$COMPILE_TYPE" != "xcross"; then
25201    # If we are not cross compiling, use the same compilers for
25202    # building the build platform executables. The cross-compilation
25203    # case needed to be done earlier, but this can only be done after
25204    # the native tools have been localized.
25205    BUILD_CC="$CC"
25206    BUILD_CXX="$CXX"
25207    BUILD_LD="$LD"
25208  fi
25209
25210  # for solaris we really need solaris tools, and not gnu equivalent
25211  #   these seems to normally reside in /usr/ccs/bin so add that to path before
25212  #   starting to probe
25213  #
25214  #   NOTE: I add this /usr/ccs/bin after TOOLS but before OLD_PATH
25215  #         so that it can be overriden --with-tools-dir
25216  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
25217    PATH="${TOOLS_DIR}:/usr/ccs/bin:${OLD_PATH}"
25218  fi
25219
25220  # Find the right assembler.
25221  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
25222    # Extract the first word of "as", so it can be a program name with args.
25223set dummy as; ac_word=$2
25224{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25225$as_echo_n "checking for $ac_word... " >&6; }
25226if ${ac_cv_path_AS+:} false; then :
25227  $as_echo_n "(cached) " >&6
25228else
25229  case $AS in
25230  [\\/]* | ?:[\\/]*)
25231  ac_cv_path_AS="$AS" # Let the user override the test with a path.
25232  ;;
25233  *)
25234  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25235for as_dir in $PATH
25236do
25237  IFS=$as_save_IFS
25238  test -z "$as_dir" && as_dir=.
25239    for ac_exec_ext in '' $ac_executable_extensions; do
25240  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25241    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
25242    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25243    break 2
25244  fi
25245done
25246  done
25247IFS=$as_save_IFS
25248
25249  ;;
25250esac
25251fi
25252AS=$ac_cv_path_AS
25253if test -n "$AS"; then
25254  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
25255$as_echo "$AS" >&6; }
25256else
25257  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25258$as_echo "no" >&6; }
25259fi
25260
25261
25262
25263  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25264
25265  # First separate the path from the arguments. This will split at the first
25266  # space.
25267  complete="$AS"
25268  path="${complete%% *}"
25269  tmp="$complete EOL"
25270  arguments="${tmp#* }"
25271
25272  # Input might be given as Windows format, start by converting to
25273  # unix format.
25274  new_path=`$CYGPATH -u "$path"`
25275
25276  # Now try to locate executable using which
25277  new_path=`$WHICH "$new_path" 2> /dev/null`
25278  # bat and cmd files are not always considered executable in cygwin causing which
25279  # to not find them
25280  if test "x$new_path" = x \
25281      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25282      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25283    new_path=`$CYGPATH -u "$path"`
25284  fi
25285  if test "x$new_path" = x; then
25286    # Oops. Which didn't find the executable.
25287    # The splitting of arguments from the executable at a space might have been incorrect,
25288    # since paths with space are more likely in Windows. Give it another try with the whole
25289    # argument.
25290    path="$complete"
25291    arguments="EOL"
25292    new_path=`$CYGPATH -u "$path"`
25293    new_path=`$WHICH "$new_path" 2> /dev/null`
25294    # bat and cmd files are not always considered executable in cygwin causing which
25295    # to not find them
25296    if test "x$new_path" = x \
25297        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25298        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25299      new_path=`$CYGPATH -u "$path"`
25300    fi
25301    if test "x$new_path" = x; then
25302      # It's still not found. Now this is an unrecoverable error.
25303      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
25304$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
25305      has_space=`$ECHO "$complete" | $GREP " "`
25306      if test "x$has_space" != x; then
25307        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25308$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25309      fi
25310      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25311    fi
25312  fi
25313
25314  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25315  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25316  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25317  # "foo.exe" is OK but "foo" is an error.
25318  #
25319  # This test is therefore slightly more accurate than "test -f" to check for file presence.
25320  # It is also a way to make sure we got the proper file name for the real test later on.
25321  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25322  if test "x$test_shortpath" = x; then
25323    # Short path failed, file does not exist as specified.
25324    # Try adding .exe or .cmd
25325    if test -f "${new_path}.exe"; then
25326      input_to_shortpath="${new_path}.exe"
25327    elif test -f "${new_path}.cmd"; then
25328      input_to_shortpath="${new_path}.cmd"
25329    else
25330      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
25331$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
25332      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25333$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25334      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25335    fi
25336  else
25337    input_to_shortpath="$new_path"
25338  fi
25339
25340  # Call helper function which possibly converts this using DOS-style short mode.
25341  # If so, the updated path is stored in $new_path.
25342  new_path="$input_to_shortpath"
25343
25344  input_path="$input_to_shortpath"
25345  # Check if we need to convert this using DOS-style short mode. If the path
25346  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25347  # take no chances and rewrite it.
25348  # Note: m4 eats our [], so we need to use [ and ] instead.
25349  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25350  if test "x$has_forbidden_chars" != x; then
25351    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25352    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25353    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25354    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25355      # Going to short mode and back again did indeed matter. Since short mode is
25356      # case insensitive, let's make it lowercase to improve readability.
25357      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25358      # Now convert it back to Unix-stile (cygpath)
25359      input_path=`$CYGPATH -u "$shortmode_path"`
25360      new_path="$input_path"
25361    fi
25362  fi
25363
25364  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25365  if test "x$test_cygdrive_prefix" = x; then
25366    # As a simple fix, exclude /usr/bin since it's not a real path.
25367    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25368      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25369      # a path prefixed by /cygdrive for fixpath to work.
25370      new_path="$CYGWIN_ROOT_PATH$input_path"
25371    fi
25372  fi
25373
25374  # remove trailing .exe if any
25375  new_path="${new_path/%.exe/}"
25376
25377  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25378
25379  # First separate the path from the arguments. This will split at the first
25380  # space.
25381  complete="$AS"
25382  path="${complete%% *}"
25383  tmp="$complete EOL"
25384  arguments="${tmp#* }"
25385
25386  # Input might be given as Windows format, start by converting to
25387  # unix format.
25388  new_path="$path"
25389
25390  windows_path="$new_path"
25391  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25392    unix_path=`$CYGPATH -u "$windows_path"`
25393    new_path="$unix_path"
25394  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25395    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25396    new_path="$unix_path"
25397  fi
25398
25399
25400  # Now try to locate executable using which
25401  new_path=`$WHICH "$new_path" 2> /dev/null`
25402
25403  if test "x$new_path" = x; then
25404    # Oops. Which didn't find the executable.
25405    # The splitting of arguments from the executable at a space might have been incorrect,
25406    # since paths with space are more likely in Windows. Give it another try with the whole
25407    # argument.
25408    path="$complete"
25409    arguments="EOL"
25410    new_path="$path"
25411
25412  windows_path="$new_path"
25413  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25414    unix_path=`$CYGPATH -u "$windows_path"`
25415    new_path="$unix_path"
25416  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25417    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25418    new_path="$unix_path"
25419  fi
25420
25421
25422    new_path=`$WHICH "$new_path" 2> /dev/null`
25423
25424    if test "x$new_path" = x; then
25425      # It's still not found. Now this is an unrecoverable error.
25426      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
25427$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
25428      has_space=`$ECHO "$complete" | $GREP " "`
25429      if test "x$has_space" != x; then
25430        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25431$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25432      fi
25433      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25434    fi
25435  fi
25436
25437  # Now new_path has a complete unix path to the binary
25438  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25439    # Keep paths in /bin as-is, but remove trailing .exe if any
25440    new_path="${new_path/%.exe/}"
25441    # Do not save /bin paths to all_fixpath_prefixes!
25442  else
25443    # Not in mixed or Windows style, start by that.
25444    new_path=`cmd //c echo $new_path`
25445
25446  input_path="$new_path"
25447  # Check if we need to convert this using DOS-style short mode. If the path
25448  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25449  # take no chances and rewrite it.
25450  # Note: m4 eats our [], so we need to use [ and ] instead.
25451  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25452  if test "x$has_forbidden_chars" != x; then
25453    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25454    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25455  fi
25456
25457    # Output is in $new_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    # remove trailing .exe if any
25469    new_path="${new_path/%.exe/}"
25470
25471    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25472    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25473  fi
25474
25475  else
25476    # We're on a posix platform. Hooray! :)
25477    # First separate the path from the arguments. This will split at the first
25478    # space.
25479    complete="$AS"
25480    path="${complete%% *}"
25481    tmp="$complete EOL"
25482    arguments="${tmp#* }"
25483
25484    # Cannot rely on the command "which" here since it doesn't always work.
25485    is_absolute_path=`$ECHO "$path" | $GREP ^/`
25486    if test -z "$is_absolute_path"; then
25487      # Path to executable is not absolute. Find it.
25488      IFS_save="$IFS"
25489      IFS=:
25490      for p in $PATH; do
25491        if test -f "$p/$path" && test -x "$p/$path"; then
25492          new_path="$p/$path"
25493          break
25494        fi
25495      done
25496      IFS="$IFS_save"
25497    else
25498      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AS (as $path) failed, using $path directly." >&5
25499$as_echo "$as_me: Resolving AS (as $path) failed, using $path directly." >&6;}
25500      new_path="$path"
25501    fi
25502
25503    if test "x$new_path" = x; then
25504      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
25505$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
25506      has_space=`$ECHO "$complete" | $GREP " "`
25507      if test "x$has_space" != x; then
25508        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25509$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25510      fi
25511      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25512    fi
25513  fi
25514
25515  # Now join together the path and the arguments once again
25516  if test "x$arguments" != xEOL; then
25517    new_complete="$new_path ${arguments% *}"
25518  else
25519    new_complete="$new_path"
25520  fi
25521
25522  if test "x$complete" != "x$new_complete"; then
25523    AS="$new_complete"
25524    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
25525$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
25526  fi
25527
25528  else
25529    AS="$CC -c"
25530  fi
25531
25532
25533  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
25534    # Extract the first word of "nm", so it can be a program name with args.
25535set dummy nm; ac_word=$2
25536{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25537$as_echo_n "checking for $ac_word... " >&6; }
25538if ${ac_cv_path_NM+:} false; then :
25539  $as_echo_n "(cached) " >&6
25540else
25541  case $NM in
25542  [\\/]* | ?:[\\/]*)
25543  ac_cv_path_NM="$NM" # Let the user override the test with a path.
25544  ;;
25545  *)
25546  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25547for as_dir in $PATH
25548do
25549  IFS=$as_save_IFS
25550  test -z "$as_dir" && as_dir=.
25551    for ac_exec_ext in '' $ac_executable_extensions; do
25552  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25553    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
25554    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25555    break 2
25556  fi
25557done
25558  done
25559IFS=$as_save_IFS
25560
25561  ;;
25562esac
25563fi
25564NM=$ac_cv_path_NM
25565if test -n "$NM"; then
25566  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
25567$as_echo "$NM" >&6; }
25568else
25569  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25570$as_echo "no" >&6; }
25571fi
25572
25573
25574
25575  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25576
25577  # First separate the path from the arguments. This will split at the first
25578  # space.
25579  complete="$NM"
25580  path="${complete%% *}"
25581  tmp="$complete EOL"
25582  arguments="${tmp#* }"
25583
25584  # Input might be given as Windows format, start by converting to
25585  # unix format.
25586  new_path=`$CYGPATH -u "$path"`
25587
25588  # Now try to locate executable using which
25589  new_path=`$WHICH "$new_path" 2> /dev/null`
25590  # bat and cmd files are not always considered executable in cygwin causing which
25591  # to not find them
25592  if test "x$new_path" = x \
25593      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25594      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25595    new_path=`$CYGPATH -u "$path"`
25596  fi
25597  if test "x$new_path" = x; then
25598    # Oops. Which didn't find the executable.
25599    # The splitting of arguments from the executable at a space might have been incorrect,
25600    # since paths with space are more likely in Windows. Give it another try with the whole
25601    # argument.
25602    path="$complete"
25603    arguments="EOL"
25604    new_path=`$CYGPATH -u "$path"`
25605    new_path=`$WHICH "$new_path" 2> /dev/null`
25606    # bat and cmd files are not always considered executable in cygwin causing which
25607    # to not find them
25608    if test "x$new_path" = x \
25609        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25610        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25611      new_path=`$CYGPATH -u "$path"`
25612    fi
25613    if test "x$new_path" = x; then
25614      # It's still not found. Now this is an unrecoverable error.
25615      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25616$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25617      has_space=`$ECHO "$complete" | $GREP " "`
25618      if test "x$has_space" != x; then
25619        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25620$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25621      fi
25622      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25623    fi
25624  fi
25625
25626  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25627  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25628  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25629  # "foo.exe" is OK but "foo" is an error.
25630  #
25631  # This test is therefore slightly more accurate than "test -f" to check for file presence.
25632  # It is also a way to make sure we got the proper file name for the real test later on.
25633  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25634  if test "x$test_shortpath" = x; then
25635    # Short path failed, file does not exist as specified.
25636    # Try adding .exe or .cmd
25637    if test -f "${new_path}.exe"; then
25638      input_to_shortpath="${new_path}.exe"
25639    elif test -f "${new_path}.cmd"; then
25640      input_to_shortpath="${new_path}.cmd"
25641    else
25642      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
25643$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
25644      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25645$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25646      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25647    fi
25648  else
25649    input_to_shortpath="$new_path"
25650  fi
25651
25652  # Call helper function which possibly converts this using DOS-style short mode.
25653  # If so, the updated path is stored in $new_path.
25654  new_path="$input_to_shortpath"
25655
25656  input_path="$input_to_shortpath"
25657  # Check if we need to convert this using DOS-style short mode. If the path
25658  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25659  # take no chances and rewrite it.
25660  # Note: m4 eats our [], so we need to use [ and ] instead.
25661  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25662  if test "x$has_forbidden_chars" != x; then
25663    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25664    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25665    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25666    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25667      # Going to short mode and back again did indeed matter. Since short mode is
25668      # case insensitive, let's make it lowercase to improve readability.
25669      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25670      # Now convert it back to Unix-stile (cygpath)
25671      input_path=`$CYGPATH -u "$shortmode_path"`
25672      new_path="$input_path"
25673    fi
25674  fi
25675
25676  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25677  if test "x$test_cygdrive_prefix" = x; then
25678    # As a simple fix, exclude /usr/bin since it's not a real path.
25679    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25680      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25681      # a path prefixed by /cygdrive for fixpath to work.
25682      new_path="$CYGWIN_ROOT_PATH$input_path"
25683    fi
25684  fi
25685
25686  # remove trailing .exe if any
25687  new_path="${new_path/%.exe/}"
25688
25689  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25690
25691  # First separate the path from the arguments. This will split at the first
25692  # space.
25693  complete="$NM"
25694  path="${complete%% *}"
25695  tmp="$complete EOL"
25696  arguments="${tmp#* }"
25697
25698  # Input might be given as Windows format, start by converting to
25699  # unix format.
25700  new_path="$path"
25701
25702  windows_path="$new_path"
25703  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25704    unix_path=`$CYGPATH -u "$windows_path"`
25705    new_path="$unix_path"
25706  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25707    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25708    new_path="$unix_path"
25709  fi
25710
25711
25712  # Now try to locate executable using which
25713  new_path=`$WHICH "$new_path" 2> /dev/null`
25714
25715  if test "x$new_path" = x; then
25716    # Oops. Which didn't find the executable.
25717    # The splitting of arguments from the executable at a space might have been incorrect,
25718    # since paths with space are more likely in Windows. Give it another try with the whole
25719    # argument.
25720    path="$complete"
25721    arguments="EOL"
25722    new_path="$path"
25723
25724  windows_path="$new_path"
25725  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25726    unix_path=`$CYGPATH -u "$windows_path"`
25727    new_path="$unix_path"
25728  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25729    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25730    new_path="$unix_path"
25731  fi
25732
25733
25734    new_path=`$WHICH "$new_path" 2> /dev/null`
25735
25736    if test "x$new_path" = x; then
25737      # It's still not found. Now this is an unrecoverable error.
25738      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25739$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25740      has_space=`$ECHO "$complete" | $GREP " "`
25741      if test "x$has_space" != x; then
25742        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25743$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25744      fi
25745      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25746    fi
25747  fi
25748
25749  # Now new_path has a complete unix path to the binary
25750  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25751    # Keep paths in /bin as-is, but remove trailing .exe if any
25752    new_path="${new_path/%.exe/}"
25753    # Do not save /bin paths to all_fixpath_prefixes!
25754  else
25755    # Not in mixed or Windows style, start by that.
25756    new_path=`cmd //c echo $new_path`
25757
25758  input_path="$new_path"
25759  # Check if we need to convert this using DOS-style short mode. If the path
25760  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25761  # take no chances and rewrite it.
25762  # Note: m4 eats our [], so we need to use [ and ] instead.
25763  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25764  if test "x$has_forbidden_chars" != x; then
25765    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25766    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25767  fi
25768
25769    # Output is in $new_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    # remove trailing .exe if any
25781    new_path="${new_path/%.exe/}"
25782
25783    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25784    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25785  fi
25786
25787  else
25788    # We're on a posix platform. Hooray! :)
25789    # First separate the path from the arguments. This will split at the first
25790    # space.
25791    complete="$NM"
25792    path="${complete%% *}"
25793    tmp="$complete EOL"
25794    arguments="${tmp#* }"
25795
25796    # Cannot rely on the command "which" here since it doesn't always work.
25797    is_absolute_path=`$ECHO "$path" | $GREP ^/`
25798    if test -z "$is_absolute_path"; then
25799      # Path to executable is not absolute. Find it.
25800      IFS_save="$IFS"
25801      IFS=:
25802      for p in $PATH; do
25803        if test -f "$p/$path" && test -x "$p/$path"; then
25804          new_path="$p/$path"
25805          break
25806        fi
25807      done
25808      IFS="$IFS_save"
25809    else
25810      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) failed, using $path directly." >&5
25811$as_echo "$as_me: Resolving NM (as $path) failed, using $path directly." >&6;}
25812      new_path="$path"
25813    fi
25814
25815    if test "x$new_path" = x; then
25816      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25817$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25818      has_space=`$ECHO "$complete" | $GREP " "`
25819      if test "x$has_space" != x; then
25820        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25821$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25822      fi
25823      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25824    fi
25825  fi
25826
25827  # Now join together the path and the arguments once again
25828  if test "x$arguments" != xEOL; then
25829    new_complete="$new_path ${arguments% *}"
25830  else
25831    new_complete="$new_path"
25832  fi
25833
25834  if test "x$complete" != "x$new_complete"; then
25835    NM="$new_complete"
25836    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
25837$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
25838  fi
25839
25840    # Extract the first word of "gnm", so it can be a program name with args.
25841set dummy gnm; ac_word=$2
25842{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25843$as_echo_n "checking for $ac_word... " >&6; }
25844if ${ac_cv_path_GNM+:} false; then :
25845  $as_echo_n "(cached) " >&6
25846else
25847  case $GNM in
25848  [\\/]* | ?:[\\/]*)
25849  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
25850  ;;
25851  *)
25852  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25853for as_dir in $PATH
25854do
25855  IFS=$as_save_IFS
25856  test -z "$as_dir" && as_dir=.
25857    for ac_exec_ext in '' $ac_executable_extensions; do
25858  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25859    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
25860    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25861    break 2
25862  fi
25863done
25864  done
25865IFS=$as_save_IFS
25866
25867  ;;
25868esac
25869fi
25870GNM=$ac_cv_path_GNM
25871if test -n "$GNM"; then
25872  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
25873$as_echo "$GNM" >&6; }
25874else
25875  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25876$as_echo "no" >&6; }
25877fi
25878
25879
25880
25881  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25882
25883  # First separate the path from the arguments. This will split at the first
25884  # space.
25885  complete="$GNM"
25886  path="${complete%% *}"
25887  tmp="$complete EOL"
25888  arguments="${tmp#* }"
25889
25890  # Input might be given as Windows format, start by converting to
25891  # unix format.
25892  new_path=`$CYGPATH -u "$path"`
25893
25894  # Now try to locate executable using which
25895  new_path=`$WHICH "$new_path" 2> /dev/null`
25896  # bat and cmd files are not always considered executable in cygwin causing which
25897  # to not find them
25898  if test "x$new_path" = x \
25899      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25900      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25901    new_path=`$CYGPATH -u "$path"`
25902  fi
25903  if test "x$new_path" = x; then
25904    # Oops. Which didn't find the executable.
25905    # The splitting of arguments from the executable at a space might have been incorrect,
25906    # since paths with space are more likely in Windows. Give it another try with the whole
25907    # argument.
25908    path="$complete"
25909    arguments="EOL"
25910    new_path=`$CYGPATH -u "$path"`
25911    new_path=`$WHICH "$new_path" 2> /dev/null`
25912    # bat and cmd files are not always considered executable in cygwin causing which
25913    # to not find them
25914    if test "x$new_path" = x \
25915        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25916        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25917      new_path=`$CYGPATH -u "$path"`
25918    fi
25919    if test "x$new_path" = x; then
25920      # It's still not found. Now this is an unrecoverable error.
25921      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
25922$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
25923      has_space=`$ECHO "$complete" | $GREP " "`
25924      if test "x$has_space" != x; then
25925        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25926$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25927      fi
25928      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
25929    fi
25930  fi
25931
25932  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25933  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25934  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25935  # "foo.exe" is OK but "foo" is an error.
25936  #
25937  # This test is therefore slightly more accurate than "test -f" to check for file presence.
25938  # It is also a way to make sure we got the proper file name for the real test later on.
25939  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25940  if test "x$test_shortpath" = x; then
25941    # Short path failed, file does not exist as specified.
25942    # Try adding .exe or .cmd
25943    if test -f "${new_path}.exe"; then
25944      input_to_shortpath="${new_path}.exe"
25945    elif test -f "${new_path}.cmd"; then
25946      input_to_shortpath="${new_path}.cmd"
25947    else
25948      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
25949$as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
25950      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25951$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25952      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
25953    fi
25954  else
25955    input_to_shortpath="$new_path"
25956  fi
25957
25958  # Call helper function which possibly converts this using DOS-style short mode.
25959  # If so, the updated path is stored in $new_path.
25960  new_path="$input_to_shortpath"
25961
25962  input_path="$input_to_shortpath"
25963  # Check if we need to convert this using DOS-style short mode. If the path
25964  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25965  # take no chances and rewrite it.
25966  # Note: m4 eats our [], so we need to use [ and ] instead.
25967  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25968  if test "x$has_forbidden_chars" != x; then
25969    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25970    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25971    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25972    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25973      # Going to short mode and back again did indeed matter. Since short mode is
25974      # case insensitive, let's make it lowercase to improve readability.
25975      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25976      # Now convert it back to Unix-stile (cygpath)
25977      input_path=`$CYGPATH -u "$shortmode_path"`
25978      new_path="$input_path"
25979    fi
25980  fi
25981
25982  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25983  if test "x$test_cygdrive_prefix" = x; then
25984    # As a simple fix, exclude /usr/bin since it's not a real path.
25985    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25986      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25987      # a path prefixed by /cygdrive for fixpath to work.
25988      new_path="$CYGWIN_ROOT_PATH$input_path"
25989    fi
25990  fi
25991
25992  # remove trailing .exe if any
25993  new_path="${new_path/%.exe/}"
25994
25995  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25996
25997  # First separate the path from the arguments. This will split at the first
25998  # space.
25999  complete="$GNM"
26000  path="${complete%% *}"
26001  tmp="$complete EOL"
26002  arguments="${tmp#* }"
26003
26004  # Input might be given as Windows format, start by converting to
26005  # unix format.
26006  new_path="$path"
26007
26008  windows_path="$new_path"
26009  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26010    unix_path=`$CYGPATH -u "$windows_path"`
26011    new_path="$unix_path"
26012  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26013    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26014    new_path="$unix_path"
26015  fi
26016
26017
26018  # Now try to locate executable using which
26019  new_path=`$WHICH "$new_path" 2> /dev/null`
26020
26021  if test "x$new_path" = x; then
26022    # Oops. Which didn't find the executable.
26023    # The splitting of arguments from the executable at a space might have been incorrect,
26024    # since paths with space are more likely in Windows. Give it another try with the whole
26025    # argument.
26026    path="$complete"
26027    arguments="EOL"
26028    new_path="$path"
26029
26030  windows_path="$new_path"
26031  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26032    unix_path=`$CYGPATH -u "$windows_path"`
26033    new_path="$unix_path"
26034  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26035    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26036    new_path="$unix_path"
26037  fi
26038
26039
26040    new_path=`$WHICH "$new_path" 2> /dev/null`
26041
26042    if test "x$new_path" = x; then
26043      # It's still not found. Now this is an unrecoverable error.
26044      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
26045$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
26046      has_space=`$ECHO "$complete" | $GREP " "`
26047      if test "x$has_space" != x; then
26048        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26049$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26050      fi
26051      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
26052    fi
26053  fi
26054
26055  # Now new_path has a complete unix path to the binary
26056  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26057    # Keep paths in /bin as-is, but remove trailing .exe if any
26058    new_path="${new_path/%.exe/}"
26059    # Do not save /bin paths to all_fixpath_prefixes!
26060  else
26061    # Not in mixed or Windows style, start by that.
26062    new_path=`cmd //c echo $new_path`
26063
26064  input_path="$new_path"
26065  # Check if we need to convert this using DOS-style short mode. If the path
26066  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26067  # take no chances and rewrite it.
26068  # Note: m4 eats our [], so we need to use [ and ] instead.
26069  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26070  if test "x$has_forbidden_chars" != x; then
26071    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26072    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26073  fi
26074
26075    # Output is in $new_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    # remove trailing .exe if any
26087    new_path="${new_path/%.exe/}"
26088
26089    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26090    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26091  fi
26092
26093  else
26094    # We're on a posix platform. Hooray! :)
26095    # First separate the path from the arguments. This will split at the first
26096    # space.
26097    complete="$GNM"
26098    path="${complete%% *}"
26099    tmp="$complete EOL"
26100    arguments="${tmp#* }"
26101
26102    # Cannot rely on the command "which" here since it doesn't always work.
26103    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26104    if test -z "$is_absolute_path"; then
26105      # Path to executable is not absolute. Find it.
26106      IFS_save="$IFS"
26107      IFS=:
26108      for p in $PATH; do
26109        if test -f "$p/$path" && test -x "$p/$path"; then
26110          new_path="$p/$path"
26111          break
26112        fi
26113      done
26114      IFS="$IFS_save"
26115    else
26116      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving GNM (as $path) failed, using $path directly." >&5
26117$as_echo "$as_me: Resolving GNM (as $path) failed, using $path directly." >&6;}
26118      new_path="$path"
26119    fi
26120
26121    if test "x$new_path" = x; then
26122      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
26123$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
26124      has_space=`$ECHO "$complete" | $GREP " "`
26125      if test "x$has_space" != x; then
26126        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26127$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26128      fi
26129      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
26130    fi
26131  fi
26132
26133  # Now join together the path and the arguments once again
26134  if test "x$arguments" != xEOL; then
26135    new_complete="$new_path ${arguments% *}"
26136  else
26137    new_complete="$new_path"
26138  fi
26139
26140  if test "x$complete" != "x$new_complete"; then
26141    GNM="$new_complete"
26142    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
26143$as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
26144  fi
26145
26146    # Extract the first word of "strip", so it can be a program name with args.
26147set dummy strip; ac_word=$2
26148{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26149$as_echo_n "checking for $ac_word... " >&6; }
26150if ${ac_cv_path_STRIP+:} false; then :
26151  $as_echo_n "(cached) " >&6
26152else
26153  case $STRIP in
26154  [\\/]* | ?:[\\/]*)
26155  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
26156  ;;
26157  *)
26158  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26159for as_dir in $PATH
26160do
26161  IFS=$as_save_IFS
26162  test -z "$as_dir" && as_dir=.
26163    for ac_exec_ext in '' $ac_executable_extensions; do
26164  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26165    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
26166    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26167    break 2
26168  fi
26169done
26170  done
26171IFS=$as_save_IFS
26172
26173  ;;
26174esac
26175fi
26176STRIP=$ac_cv_path_STRIP
26177if test -n "$STRIP"; then
26178  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
26179$as_echo "$STRIP" >&6; }
26180else
26181  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26182$as_echo "no" >&6; }
26183fi
26184
26185
26186
26187  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26188
26189  # First separate the path from the arguments. This will split at the first
26190  # space.
26191  complete="$STRIP"
26192  path="${complete%% *}"
26193  tmp="$complete EOL"
26194  arguments="${tmp#* }"
26195
26196  # Input might be given as Windows format, start by converting to
26197  # unix format.
26198  new_path=`$CYGPATH -u "$path"`
26199
26200  # Now try to locate executable using which
26201  new_path=`$WHICH "$new_path" 2> /dev/null`
26202  # bat and cmd files are not always considered executable in cygwin causing which
26203  # to not find them
26204  if test "x$new_path" = x \
26205      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26206      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26207    new_path=`$CYGPATH -u "$path"`
26208  fi
26209  if test "x$new_path" = x; then
26210    # Oops. Which didn't find the executable.
26211    # The splitting of arguments from the executable at a space might have been incorrect,
26212    # since paths with space are more likely in Windows. Give it another try with the whole
26213    # argument.
26214    path="$complete"
26215    arguments="EOL"
26216    new_path=`$CYGPATH -u "$path"`
26217    new_path=`$WHICH "$new_path" 2> /dev/null`
26218    # bat and cmd files are not always considered executable in cygwin causing which
26219    # to not find them
26220    if test "x$new_path" = x \
26221        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26222        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26223      new_path=`$CYGPATH -u "$path"`
26224    fi
26225    if test "x$new_path" = x; then
26226      # It's still not found. Now this is an unrecoverable error.
26227      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26228$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26229      has_space=`$ECHO "$complete" | $GREP " "`
26230      if test "x$has_space" != x; then
26231        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26232$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26233      fi
26234      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26235    fi
26236  fi
26237
26238  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26239  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26240  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26241  # "foo.exe" is OK but "foo" is an error.
26242  #
26243  # This test is therefore slightly more accurate than "test -f" to check for file presence.
26244  # It is also a way to make sure we got the proper file name for the real test later on.
26245  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26246  if test "x$test_shortpath" = x; then
26247    # Short path failed, file does not exist as specified.
26248    # Try adding .exe or .cmd
26249    if test -f "${new_path}.exe"; then
26250      input_to_shortpath="${new_path}.exe"
26251    elif test -f "${new_path}.cmd"; then
26252      input_to_shortpath="${new_path}.cmd"
26253    else
26254      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
26255$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
26256      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26257$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26258      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26259    fi
26260  else
26261    input_to_shortpath="$new_path"
26262  fi
26263
26264  # Call helper function which possibly converts this using DOS-style short mode.
26265  # If so, the updated path is stored in $new_path.
26266  new_path="$input_to_shortpath"
26267
26268  input_path="$input_to_shortpath"
26269  # Check if we need to convert this using DOS-style short mode. If the path
26270  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26271  # take no chances and rewrite it.
26272  # Note: m4 eats our [], so we need to use [ and ] instead.
26273  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26274  if test "x$has_forbidden_chars" != x; then
26275    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26276    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26277    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26278    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26279      # Going to short mode and back again did indeed matter. Since short mode is
26280      # case insensitive, let's make it lowercase to improve readability.
26281      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26282      # Now convert it back to Unix-stile (cygpath)
26283      input_path=`$CYGPATH -u "$shortmode_path"`
26284      new_path="$input_path"
26285    fi
26286  fi
26287
26288  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26289  if test "x$test_cygdrive_prefix" = x; then
26290    # As a simple fix, exclude /usr/bin since it's not a real path.
26291    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26292      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26293      # a path prefixed by /cygdrive for fixpath to work.
26294      new_path="$CYGWIN_ROOT_PATH$input_path"
26295    fi
26296  fi
26297
26298  # remove trailing .exe if any
26299  new_path="${new_path/%.exe/}"
26300
26301  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26302
26303  # First separate the path from the arguments. This will split at the first
26304  # space.
26305  complete="$STRIP"
26306  path="${complete%% *}"
26307  tmp="$complete EOL"
26308  arguments="${tmp#* }"
26309
26310  # Input might be given as Windows format, start by converting to
26311  # unix format.
26312  new_path="$path"
26313
26314  windows_path="$new_path"
26315  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26316    unix_path=`$CYGPATH -u "$windows_path"`
26317    new_path="$unix_path"
26318  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26319    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26320    new_path="$unix_path"
26321  fi
26322
26323
26324  # Now try to locate executable using which
26325  new_path=`$WHICH "$new_path" 2> /dev/null`
26326
26327  if test "x$new_path" = x; then
26328    # Oops. Which didn't find the executable.
26329    # The splitting of arguments from the executable at a space might have been incorrect,
26330    # since paths with space are more likely in Windows. Give it another try with the whole
26331    # argument.
26332    path="$complete"
26333    arguments="EOL"
26334    new_path="$path"
26335
26336  windows_path="$new_path"
26337  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26338    unix_path=`$CYGPATH -u "$windows_path"`
26339    new_path="$unix_path"
26340  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26341    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26342    new_path="$unix_path"
26343  fi
26344
26345
26346    new_path=`$WHICH "$new_path" 2> /dev/null`
26347
26348    if test "x$new_path" = x; then
26349      # It's still not found. Now this is an unrecoverable error.
26350      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26351$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26352      has_space=`$ECHO "$complete" | $GREP " "`
26353      if test "x$has_space" != x; then
26354        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26355$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26356      fi
26357      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26358    fi
26359  fi
26360
26361  # Now new_path has a complete unix path to the binary
26362  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26363    # Keep paths in /bin as-is, but remove trailing .exe if any
26364    new_path="${new_path/%.exe/}"
26365    # Do not save /bin paths to all_fixpath_prefixes!
26366  else
26367    # Not in mixed or Windows style, start by that.
26368    new_path=`cmd //c echo $new_path`
26369
26370  input_path="$new_path"
26371  # Check if we need to convert this using DOS-style short mode. If the path
26372  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26373  # take no chances and rewrite it.
26374  # Note: m4 eats our [], so we need to use [ and ] instead.
26375  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26376  if test "x$has_forbidden_chars" != x; then
26377    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26378    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26379  fi
26380
26381    # Output is in $new_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    # remove trailing .exe if any
26393    new_path="${new_path/%.exe/}"
26394
26395    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26396    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26397  fi
26398
26399  else
26400    # We're on a posix platform. Hooray! :)
26401    # First separate the path from the arguments. This will split at the first
26402    # space.
26403    complete="$STRIP"
26404    path="${complete%% *}"
26405    tmp="$complete EOL"
26406    arguments="${tmp#* }"
26407
26408    # Cannot rely on the command "which" here since it doesn't always work.
26409    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26410    if test -z "$is_absolute_path"; then
26411      # Path to executable is not absolute. Find it.
26412      IFS_save="$IFS"
26413      IFS=:
26414      for p in $PATH; do
26415        if test -f "$p/$path" && test -x "$p/$path"; then
26416          new_path="$p/$path"
26417          break
26418        fi
26419      done
26420      IFS="$IFS_save"
26421    else
26422      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) failed, using $path directly." >&5
26423$as_echo "$as_me: Resolving STRIP (as $path) failed, using $path directly." >&6;}
26424      new_path="$path"
26425    fi
26426
26427    if test "x$new_path" = x; then
26428      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26429$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26430      has_space=`$ECHO "$complete" | $GREP " "`
26431      if test "x$has_space" != x; then
26432        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26433$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26434      fi
26435      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26436    fi
26437  fi
26438
26439  # Now join together the path and the arguments once again
26440  if test "x$arguments" != xEOL; then
26441    new_complete="$new_path ${arguments% *}"
26442  else
26443    new_complete="$new_path"
26444  fi
26445
26446  if test "x$complete" != "x$new_complete"; then
26447    STRIP="$new_complete"
26448    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
26449$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
26450  fi
26451
26452    # Extract the first word of "mcs", so it can be a program name with args.
26453set dummy mcs; ac_word=$2
26454{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26455$as_echo_n "checking for $ac_word... " >&6; }
26456if ${ac_cv_path_MCS+:} false; then :
26457  $as_echo_n "(cached) " >&6
26458else
26459  case $MCS in
26460  [\\/]* | ?:[\\/]*)
26461  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
26462  ;;
26463  *)
26464  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26465for as_dir in $PATH
26466do
26467  IFS=$as_save_IFS
26468  test -z "$as_dir" && as_dir=.
26469    for ac_exec_ext in '' $ac_executable_extensions; do
26470  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26471    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
26472    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26473    break 2
26474  fi
26475done
26476  done
26477IFS=$as_save_IFS
26478
26479  ;;
26480esac
26481fi
26482MCS=$ac_cv_path_MCS
26483if test -n "$MCS"; then
26484  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
26485$as_echo "$MCS" >&6; }
26486else
26487  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26488$as_echo "no" >&6; }
26489fi
26490
26491
26492
26493  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26494
26495  # First separate the path from the arguments. This will split at the first
26496  # space.
26497  complete="$MCS"
26498  path="${complete%% *}"
26499  tmp="$complete EOL"
26500  arguments="${tmp#* }"
26501
26502  # Input might be given as Windows format, start by converting to
26503  # unix format.
26504  new_path=`$CYGPATH -u "$path"`
26505
26506  # Now try to locate executable using which
26507  new_path=`$WHICH "$new_path" 2> /dev/null`
26508  # bat and cmd files are not always considered executable in cygwin causing which
26509  # to not find them
26510  if test "x$new_path" = x \
26511      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26512      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26513    new_path=`$CYGPATH -u "$path"`
26514  fi
26515  if test "x$new_path" = x; then
26516    # Oops. Which didn't find the executable.
26517    # The splitting of arguments from the executable at a space might have been incorrect,
26518    # since paths with space are more likely in Windows. Give it another try with the whole
26519    # argument.
26520    path="$complete"
26521    arguments="EOL"
26522    new_path=`$CYGPATH -u "$path"`
26523    new_path=`$WHICH "$new_path" 2> /dev/null`
26524    # bat and cmd files are not always considered executable in cygwin causing which
26525    # to not find them
26526    if test "x$new_path" = x \
26527        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26528        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26529      new_path=`$CYGPATH -u "$path"`
26530    fi
26531    if test "x$new_path" = x; then
26532      # It's still not found. Now this is an unrecoverable error.
26533      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
26534$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
26535      has_space=`$ECHO "$complete" | $GREP " "`
26536      if test "x$has_space" != x; then
26537        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26538$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26539      fi
26540      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
26541    fi
26542  fi
26543
26544  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26545  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26546  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26547  # "foo.exe" is OK but "foo" is an error.
26548  #
26549  # This test is therefore slightly more accurate than "test -f" to check for file presence.
26550  # It is also a way to make sure we got the proper file name for the real test later on.
26551  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26552  if test "x$test_shortpath" = x; then
26553    # Short path failed, file does not exist as specified.
26554    # Try adding .exe or .cmd
26555    if test -f "${new_path}.exe"; then
26556      input_to_shortpath="${new_path}.exe"
26557    elif test -f "${new_path}.cmd"; then
26558      input_to_shortpath="${new_path}.cmd"
26559    else
26560      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$new_path\", is invalid." >&5
26561$as_echo "$as_me: The path of MCS, which resolves as \"$new_path\", is invalid." >&6;}
26562      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26563$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26564      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
26565    fi
26566  else
26567    input_to_shortpath="$new_path"
26568  fi
26569
26570  # Call helper function which possibly converts this using DOS-style short mode.
26571  # If so, the updated path is stored in $new_path.
26572  new_path="$input_to_shortpath"
26573
26574  input_path="$input_to_shortpath"
26575  # Check if we need to convert this using DOS-style short mode. If the path
26576  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26577  # take no chances and rewrite it.
26578  # Note: m4 eats our [], so we need to use [ and ] instead.
26579  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26580  if test "x$has_forbidden_chars" != x; then
26581    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26582    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26583    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26584    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26585      # Going to short mode and back again did indeed matter. Since short mode is
26586      # case insensitive, let's make it lowercase to improve readability.
26587      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26588      # Now convert it back to Unix-stile (cygpath)
26589      input_path=`$CYGPATH -u "$shortmode_path"`
26590      new_path="$input_path"
26591    fi
26592  fi
26593
26594  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26595  if test "x$test_cygdrive_prefix" = x; then
26596    # As a simple fix, exclude /usr/bin since it's not a real path.
26597    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26598      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26599      # a path prefixed by /cygdrive for fixpath to work.
26600      new_path="$CYGWIN_ROOT_PATH$input_path"
26601    fi
26602  fi
26603
26604  # remove trailing .exe if any
26605  new_path="${new_path/%.exe/}"
26606
26607  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26608
26609  # First separate the path from the arguments. This will split at the first
26610  # space.
26611  complete="$MCS"
26612  path="${complete%% *}"
26613  tmp="$complete EOL"
26614  arguments="${tmp#* }"
26615
26616  # Input might be given as Windows format, start by converting to
26617  # unix format.
26618  new_path="$path"
26619
26620  windows_path="$new_path"
26621  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26622    unix_path=`$CYGPATH -u "$windows_path"`
26623    new_path="$unix_path"
26624  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26625    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26626    new_path="$unix_path"
26627  fi
26628
26629
26630  # Now try to locate executable using which
26631  new_path=`$WHICH "$new_path" 2> /dev/null`
26632
26633  if test "x$new_path" = x; then
26634    # Oops. Which didn't find the executable.
26635    # The splitting of arguments from the executable at a space might have been incorrect,
26636    # since paths with space are more likely in Windows. Give it another try with the whole
26637    # argument.
26638    path="$complete"
26639    arguments="EOL"
26640    new_path="$path"
26641
26642  windows_path="$new_path"
26643  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26644    unix_path=`$CYGPATH -u "$windows_path"`
26645    new_path="$unix_path"
26646  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26647    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26648    new_path="$unix_path"
26649  fi
26650
26651
26652    new_path=`$WHICH "$new_path" 2> /dev/null`
26653
26654    if test "x$new_path" = x; then
26655      # It's still not found. Now this is an unrecoverable error.
26656      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
26657$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
26658      has_space=`$ECHO "$complete" | $GREP " "`
26659      if test "x$has_space" != x; then
26660        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26661$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26662      fi
26663      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
26664    fi
26665  fi
26666
26667  # Now new_path has a complete unix path to the binary
26668  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26669    # Keep paths in /bin as-is, but remove trailing .exe if any
26670    new_path="${new_path/%.exe/}"
26671    # Do not save /bin paths to all_fixpath_prefixes!
26672  else
26673    # Not in mixed or Windows style, start by that.
26674    new_path=`cmd //c echo $new_path`
26675
26676  input_path="$new_path"
26677  # Check if we need to convert this using DOS-style short mode. If the path
26678  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26679  # take no chances and rewrite it.
26680  # Note: m4 eats our [], so we need to use [ and ] instead.
26681  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26682  if test "x$has_forbidden_chars" != x; then
26683    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26684    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26685  fi
26686
26687    # Output is in $new_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    # remove trailing .exe if any
26699    new_path="${new_path/%.exe/}"
26700
26701    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26702    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26703  fi
26704
26705  else
26706    # We're on a posix platform. Hooray! :)
26707    # First separate the path from the arguments. This will split at the first
26708    # space.
26709    complete="$MCS"
26710    path="${complete%% *}"
26711    tmp="$complete EOL"
26712    arguments="${tmp#* }"
26713
26714    # Cannot rely on the command "which" here since it doesn't always work.
26715    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26716    if test -z "$is_absolute_path"; then
26717      # Path to executable is not absolute. Find it.
26718      IFS_save="$IFS"
26719      IFS=:
26720      for p in $PATH; do
26721        if test -f "$p/$path" && test -x "$p/$path"; then
26722          new_path="$p/$path"
26723          break
26724        fi
26725      done
26726      IFS="$IFS_save"
26727    else
26728      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MCS (as $path) failed, using $path directly." >&5
26729$as_echo "$as_me: Resolving MCS (as $path) failed, using $path directly." >&6;}
26730      new_path="$path"
26731    fi
26732
26733    if test "x$new_path" = x; then
26734      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
26735$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
26736      has_space=`$ECHO "$complete" | $GREP " "`
26737      if test "x$has_space" != x; then
26738        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26739$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26740      fi
26741      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
26742    fi
26743  fi
26744
26745  # Now join together the path and the arguments once again
26746  if test "x$arguments" != xEOL; then
26747    new_complete="$new_path ${arguments% *}"
26748  else
26749    new_complete="$new_path"
26750  fi
26751
26752  if test "x$complete" != "x$new_complete"; then
26753    MCS="$new_complete"
26754    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MCS to \"$new_complete\"" >&5
26755$as_echo "$as_me: Rewriting MCS to \"$new_complete\"" >&6;}
26756  fi
26757
26758  elif test "x$OPENJDK_TARGET_OS" != xwindows; then
26759    if test -n "$ac_tool_prefix"; then
26760  # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
26761set dummy ${ac_tool_prefix}nm; ac_word=$2
26762{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26763$as_echo_n "checking for $ac_word... " >&6; }
26764if ${ac_cv_prog_NM+:} false; then :
26765  $as_echo_n "(cached) " >&6
26766else
26767  if test -n "$NM"; then
26768  ac_cv_prog_NM="$NM" # Let the user override the test.
26769else
26770as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26771for as_dir in $PATH
26772do
26773  IFS=$as_save_IFS
26774  test -z "$as_dir" && as_dir=.
26775    for ac_exec_ext in '' $ac_executable_extensions; do
26776  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26777    ac_cv_prog_NM="${ac_tool_prefix}nm"
26778    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26779    break 2
26780  fi
26781done
26782  done
26783IFS=$as_save_IFS
26784
26785fi
26786fi
26787NM=$ac_cv_prog_NM
26788if test -n "$NM"; then
26789  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
26790$as_echo "$NM" >&6; }
26791else
26792  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26793$as_echo "no" >&6; }
26794fi
26795
26796
26797fi
26798if test -z "$ac_cv_prog_NM"; then
26799  ac_ct_NM=$NM
26800  # Extract the first word of "nm", so it can be a program name with args.
26801set dummy nm; ac_word=$2
26802{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26803$as_echo_n "checking for $ac_word... " >&6; }
26804if ${ac_cv_prog_ac_ct_NM+:} false; then :
26805  $as_echo_n "(cached) " >&6
26806else
26807  if test -n "$ac_ct_NM"; then
26808  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
26809else
26810as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26811for as_dir in $PATH
26812do
26813  IFS=$as_save_IFS
26814  test -z "$as_dir" && as_dir=.
26815    for ac_exec_ext in '' $ac_executable_extensions; do
26816  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26817    ac_cv_prog_ac_ct_NM="nm"
26818    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26819    break 2
26820  fi
26821done
26822  done
26823IFS=$as_save_IFS
26824
26825fi
26826fi
26827ac_ct_NM=$ac_cv_prog_ac_ct_NM
26828if test -n "$ac_ct_NM"; then
26829  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
26830$as_echo "$ac_ct_NM" >&6; }
26831else
26832  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26833$as_echo "no" >&6; }
26834fi
26835
26836  if test "x$ac_ct_NM" = x; then
26837    NM=""
26838  else
26839    case $cross_compiling:$ac_tool_warned in
26840yes:)
26841{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
26842$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
26843ac_tool_warned=yes ;;
26844esac
26845    NM=$ac_ct_NM
26846  fi
26847else
26848  NM="$ac_cv_prog_NM"
26849fi
26850
26851
26852  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26853
26854  # First separate the path from the arguments. This will split at the first
26855  # space.
26856  complete="$NM"
26857  path="${complete%% *}"
26858  tmp="$complete EOL"
26859  arguments="${tmp#* }"
26860
26861  # Input might be given as Windows format, start by converting to
26862  # unix format.
26863  new_path=`$CYGPATH -u "$path"`
26864
26865  # Now try to locate executable using which
26866  new_path=`$WHICH "$new_path" 2> /dev/null`
26867  # bat and cmd files are not always considered executable in cygwin causing which
26868  # to not find them
26869  if test "x$new_path" = x \
26870      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26871      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26872    new_path=`$CYGPATH -u "$path"`
26873  fi
26874  if test "x$new_path" = x; then
26875    # Oops. Which didn't find the executable.
26876    # The splitting of arguments from the executable at a space might have been incorrect,
26877    # since paths with space are more likely in Windows. Give it another try with the whole
26878    # argument.
26879    path="$complete"
26880    arguments="EOL"
26881    new_path=`$CYGPATH -u "$path"`
26882    new_path=`$WHICH "$new_path" 2> /dev/null`
26883    # bat and cmd files are not always considered executable in cygwin causing which
26884    # to not find them
26885    if test "x$new_path" = x \
26886        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26887        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26888      new_path=`$CYGPATH -u "$path"`
26889    fi
26890    if test "x$new_path" = x; then
26891      # It's still not found. Now this is an unrecoverable error.
26892      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
26893$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
26894      has_space=`$ECHO "$complete" | $GREP " "`
26895      if test "x$has_space" != x; then
26896        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26897$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26898      fi
26899      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
26900    fi
26901  fi
26902
26903  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26904  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26905  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26906  # "foo.exe" is OK but "foo" is an error.
26907  #
26908  # This test is therefore slightly more accurate than "test -f" to check for file presence.
26909  # It is also a way to make sure we got the proper file name for the real test later on.
26910  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26911  if test "x$test_shortpath" = x; then
26912    # Short path failed, file does not exist as specified.
26913    # Try adding .exe or .cmd
26914    if test -f "${new_path}.exe"; then
26915      input_to_shortpath="${new_path}.exe"
26916    elif test -f "${new_path}.cmd"; then
26917      input_to_shortpath="${new_path}.cmd"
26918    else
26919      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
26920$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
26921      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26922$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26923      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
26924    fi
26925  else
26926    input_to_shortpath="$new_path"
26927  fi
26928
26929  # Call helper function which possibly converts this using DOS-style short mode.
26930  # If so, the updated path is stored in $new_path.
26931  new_path="$input_to_shortpath"
26932
26933  input_path="$input_to_shortpath"
26934  # Check if we need to convert this using DOS-style short mode. If the path
26935  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26936  # take no chances and rewrite it.
26937  # Note: m4 eats our [], so we need to use [ and ] instead.
26938  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26939  if test "x$has_forbidden_chars" != x; then
26940    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26941    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26942    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26943    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26944      # Going to short mode and back again did indeed matter. Since short mode is
26945      # case insensitive, let's make it lowercase to improve readability.
26946      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26947      # Now convert it back to Unix-stile (cygpath)
26948      input_path=`$CYGPATH -u "$shortmode_path"`
26949      new_path="$input_path"
26950    fi
26951  fi
26952
26953  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26954  if test "x$test_cygdrive_prefix" = x; then
26955    # As a simple fix, exclude /usr/bin since it's not a real path.
26956    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26957      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26958      # a path prefixed by /cygdrive for fixpath to work.
26959      new_path="$CYGWIN_ROOT_PATH$input_path"
26960    fi
26961  fi
26962
26963  # remove trailing .exe if any
26964  new_path="${new_path/%.exe/}"
26965
26966  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26967
26968  # First separate the path from the arguments. This will split at the first
26969  # space.
26970  complete="$NM"
26971  path="${complete%% *}"
26972  tmp="$complete EOL"
26973  arguments="${tmp#* }"
26974
26975  # Input might be given as Windows format, start by converting to
26976  # unix format.
26977  new_path="$path"
26978
26979  windows_path="$new_path"
26980  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26981    unix_path=`$CYGPATH -u "$windows_path"`
26982    new_path="$unix_path"
26983  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26984    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26985    new_path="$unix_path"
26986  fi
26987
26988
26989  # Now try to locate executable using which
26990  new_path=`$WHICH "$new_path" 2> /dev/null`
26991
26992  if test "x$new_path" = x; then
26993    # Oops. Which didn't find the executable.
26994    # The splitting of arguments from the executable at a space might have been incorrect,
26995    # since paths with space are more likely in Windows. Give it another try with the whole
26996    # argument.
26997    path="$complete"
26998    arguments="EOL"
26999    new_path="$path"
27000
27001  windows_path="$new_path"
27002  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27003    unix_path=`$CYGPATH -u "$windows_path"`
27004    new_path="$unix_path"
27005  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27006    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27007    new_path="$unix_path"
27008  fi
27009
27010
27011    new_path=`$WHICH "$new_path" 2> /dev/null`
27012
27013    if test "x$new_path" = x; then
27014      # It's still not found. Now this is an unrecoverable error.
27015      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
27016$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
27017      has_space=`$ECHO "$complete" | $GREP " "`
27018      if test "x$has_space" != x; then
27019        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27020$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27021      fi
27022      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
27023    fi
27024  fi
27025
27026  # Now new_path has a complete unix path to the binary
27027  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27028    # Keep paths in /bin as-is, but remove trailing .exe if any
27029    new_path="${new_path/%.exe/}"
27030    # Do not save /bin paths to all_fixpath_prefixes!
27031  else
27032    # Not in mixed or Windows style, start by that.
27033    new_path=`cmd //c echo $new_path`
27034
27035  input_path="$new_path"
27036  # Check if we need to convert this using DOS-style short mode. If the path
27037  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27038  # take no chances and rewrite it.
27039  # Note: m4 eats our [], so we need to use [ and ] instead.
27040  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27041  if test "x$has_forbidden_chars" != x; then
27042    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27043    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27044  fi
27045
27046    # Output is in $new_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    # remove trailing .exe if any
27058    new_path="${new_path/%.exe/}"
27059
27060    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27061    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27062  fi
27063
27064  else
27065    # We're on a posix platform. Hooray! :)
27066    # First separate the path from the arguments. This will split at the first
27067    # space.
27068    complete="$NM"
27069    path="${complete%% *}"
27070    tmp="$complete EOL"
27071    arguments="${tmp#* }"
27072
27073    # Cannot rely on the command "which" here since it doesn't always work.
27074    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27075    if test -z "$is_absolute_path"; then
27076      # Path to executable is not absolute. Find it.
27077      IFS_save="$IFS"
27078      IFS=:
27079      for p in $PATH; do
27080        if test -f "$p/$path" && test -x "$p/$path"; then
27081          new_path="$p/$path"
27082          break
27083        fi
27084      done
27085      IFS="$IFS_save"
27086    else
27087      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) failed, using $path directly." >&5
27088$as_echo "$as_me: Resolving NM (as $path) failed, using $path directly." >&6;}
27089      new_path="$path"
27090    fi
27091
27092    if test "x$new_path" = x; then
27093      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
27094$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
27095      has_space=`$ECHO "$complete" | $GREP " "`
27096      if test "x$has_space" != x; then
27097        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27098$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27099      fi
27100      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
27101    fi
27102  fi
27103
27104  # Now join together the path and the arguments once again
27105  if test "x$arguments" != xEOL; then
27106    new_complete="$new_path ${arguments% *}"
27107  else
27108    new_complete="$new_path"
27109  fi
27110
27111  if test "x$complete" != "x$new_complete"; then
27112    NM="$new_complete"
27113    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
27114$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
27115  fi
27116
27117    GNM="$NM"
27118
27119    if test -n "$ac_tool_prefix"; then
27120  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
27121set dummy ${ac_tool_prefix}strip; ac_word=$2
27122{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27123$as_echo_n "checking for $ac_word... " >&6; }
27124if ${ac_cv_prog_STRIP+:} false; then :
27125  $as_echo_n "(cached) " >&6
27126else
27127  if test -n "$STRIP"; then
27128  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
27129else
27130as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27131for as_dir in $PATH
27132do
27133  IFS=$as_save_IFS
27134  test -z "$as_dir" && as_dir=.
27135    for ac_exec_ext in '' $ac_executable_extensions; do
27136  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27137    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
27138    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27139    break 2
27140  fi
27141done
27142  done
27143IFS=$as_save_IFS
27144
27145fi
27146fi
27147STRIP=$ac_cv_prog_STRIP
27148if test -n "$STRIP"; then
27149  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
27150$as_echo "$STRIP" >&6; }
27151else
27152  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27153$as_echo "no" >&6; }
27154fi
27155
27156
27157fi
27158if test -z "$ac_cv_prog_STRIP"; then
27159  ac_ct_STRIP=$STRIP
27160  # Extract the first word of "strip", so it can be a program name with args.
27161set dummy strip; ac_word=$2
27162{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27163$as_echo_n "checking for $ac_word... " >&6; }
27164if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
27165  $as_echo_n "(cached) " >&6
27166else
27167  if test -n "$ac_ct_STRIP"; then
27168  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
27169else
27170as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27171for as_dir in $PATH
27172do
27173  IFS=$as_save_IFS
27174  test -z "$as_dir" && as_dir=.
27175    for ac_exec_ext in '' $ac_executable_extensions; do
27176  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27177    ac_cv_prog_ac_ct_STRIP="strip"
27178    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27179    break 2
27180  fi
27181done
27182  done
27183IFS=$as_save_IFS
27184
27185fi
27186fi
27187ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
27188if test -n "$ac_ct_STRIP"; then
27189  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
27190$as_echo "$ac_ct_STRIP" >&6; }
27191else
27192  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27193$as_echo "no" >&6; }
27194fi
27195
27196  if test "x$ac_ct_STRIP" = x; then
27197    STRIP=""
27198  else
27199    case $cross_compiling:$ac_tool_warned in
27200yes:)
27201{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
27202$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
27203ac_tool_warned=yes ;;
27204esac
27205    STRIP=$ac_ct_STRIP
27206  fi
27207else
27208  STRIP="$ac_cv_prog_STRIP"
27209fi
27210
27211
27212  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27213
27214  # First separate the path from the arguments. This will split at the first
27215  # space.
27216  complete="$STRIP"
27217  path="${complete%% *}"
27218  tmp="$complete EOL"
27219  arguments="${tmp#* }"
27220
27221  # Input might be given as Windows format, start by converting to
27222  # unix format.
27223  new_path=`$CYGPATH -u "$path"`
27224
27225  # Now try to locate executable using which
27226  new_path=`$WHICH "$new_path" 2> /dev/null`
27227  # bat and cmd files are not always considered executable in cygwin causing which
27228  # to not find them
27229  if test "x$new_path" = x \
27230      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27231      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27232    new_path=`$CYGPATH -u "$path"`
27233  fi
27234  if test "x$new_path" = x; then
27235    # Oops. Which didn't find the executable.
27236    # The splitting of arguments from the executable at a space might have been incorrect,
27237    # since paths with space are more likely in Windows. Give it another try with the whole
27238    # argument.
27239    path="$complete"
27240    arguments="EOL"
27241    new_path=`$CYGPATH -u "$path"`
27242    new_path=`$WHICH "$new_path" 2> /dev/null`
27243    # bat and cmd files are not always considered executable in cygwin causing which
27244    # to not find them
27245    if test "x$new_path" = x \
27246        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27247        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27248      new_path=`$CYGPATH -u "$path"`
27249    fi
27250    if test "x$new_path" = x; then
27251      # It's still not found. Now this is an unrecoverable error.
27252      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
27253$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
27254      has_space=`$ECHO "$complete" | $GREP " "`
27255      if test "x$has_space" != x; then
27256        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27257$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27258      fi
27259      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
27260    fi
27261  fi
27262
27263  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27264  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27265  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27266  # "foo.exe" is OK but "foo" is an error.
27267  #
27268  # This test is therefore slightly more accurate than "test -f" to check for file presence.
27269  # It is also a way to make sure we got the proper file name for the real test later on.
27270  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27271  if test "x$test_shortpath" = x; then
27272    # Short path failed, file does not exist as specified.
27273    # Try adding .exe or .cmd
27274    if test -f "${new_path}.exe"; then
27275      input_to_shortpath="${new_path}.exe"
27276    elif test -f "${new_path}.cmd"; then
27277      input_to_shortpath="${new_path}.cmd"
27278    else
27279      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
27280$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
27281      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27282$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27283      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
27284    fi
27285  else
27286    input_to_shortpath="$new_path"
27287  fi
27288
27289  # Call helper function which possibly converts this using DOS-style short mode.
27290  # If so, the updated path is stored in $new_path.
27291  new_path="$input_to_shortpath"
27292
27293  input_path="$input_to_shortpath"
27294  # Check if we need to convert this using DOS-style short mode. If the path
27295  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27296  # take no chances and rewrite it.
27297  # Note: m4 eats our [], so we need to use [ and ] instead.
27298  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27299  if test "x$has_forbidden_chars" != x; then
27300    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27301    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27302    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27303    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27304      # Going to short mode and back again did indeed matter. Since short mode is
27305      # case insensitive, let's make it lowercase to improve readability.
27306      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27307      # Now convert it back to Unix-stile (cygpath)
27308      input_path=`$CYGPATH -u "$shortmode_path"`
27309      new_path="$input_path"
27310    fi
27311  fi
27312
27313  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27314  if test "x$test_cygdrive_prefix" = x; then
27315    # As a simple fix, exclude /usr/bin since it's not a real path.
27316    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27317      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27318      # a path prefixed by /cygdrive for fixpath to work.
27319      new_path="$CYGWIN_ROOT_PATH$input_path"
27320    fi
27321  fi
27322
27323  # remove trailing .exe if any
27324  new_path="${new_path/%.exe/}"
27325
27326  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27327
27328  # First separate the path from the arguments. This will split at the first
27329  # space.
27330  complete="$STRIP"
27331  path="${complete%% *}"
27332  tmp="$complete EOL"
27333  arguments="${tmp#* }"
27334
27335  # Input might be given as Windows format, start by converting to
27336  # unix format.
27337  new_path="$path"
27338
27339  windows_path="$new_path"
27340  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27341    unix_path=`$CYGPATH -u "$windows_path"`
27342    new_path="$unix_path"
27343  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27344    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27345    new_path="$unix_path"
27346  fi
27347
27348
27349  # Now try to locate executable using which
27350  new_path=`$WHICH "$new_path" 2> /dev/null`
27351
27352  if test "x$new_path" = x; then
27353    # Oops. Which didn't find the executable.
27354    # The splitting of arguments from the executable at a space might have been incorrect,
27355    # since paths with space are more likely in Windows. Give it another try with the whole
27356    # argument.
27357    path="$complete"
27358    arguments="EOL"
27359    new_path="$path"
27360
27361  windows_path="$new_path"
27362  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27363    unix_path=`$CYGPATH -u "$windows_path"`
27364    new_path="$unix_path"
27365  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27366    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27367    new_path="$unix_path"
27368  fi
27369
27370
27371    new_path=`$WHICH "$new_path" 2> /dev/null`
27372
27373    if test "x$new_path" = x; then
27374      # It's still not found. Now this is an unrecoverable error.
27375      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
27376$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
27377      has_space=`$ECHO "$complete" | $GREP " "`
27378      if test "x$has_space" != x; then
27379        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27380$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27381      fi
27382      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
27383    fi
27384  fi
27385
27386  # Now new_path has a complete unix path to the binary
27387  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27388    # Keep paths in /bin as-is, but remove trailing .exe if any
27389    new_path="${new_path/%.exe/}"
27390    # Do not save /bin paths to all_fixpath_prefixes!
27391  else
27392    # Not in mixed or Windows style, start by that.
27393    new_path=`cmd //c echo $new_path`
27394
27395  input_path="$new_path"
27396  # Check if we need to convert this using DOS-style short mode. If the path
27397  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27398  # take no chances and rewrite it.
27399  # Note: m4 eats our [], so we need to use [ and ] instead.
27400  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27401  if test "x$has_forbidden_chars" != x; then
27402    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27403    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27404  fi
27405
27406    # Output is in $new_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    # remove trailing .exe if any
27418    new_path="${new_path/%.exe/}"
27419
27420    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27421    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27422  fi
27423
27424  else
27425    # We're on a posix platform. Hooray! :)
27426    # First separate the path from the arguments. This will split at the first
27427    # space.
27428    complete="$STRIP"
27429    path="${complete%% *}"
27430    tmp="$complete EOL"
27431    arguments="${tmp#* }"
27432
27433    # Cannot rely on the command "which" here since it doesn't always work.
27434    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27435    if test -z "$is_absolute_path"; then
27436      # Path to executable is not absolute. Find it.
27437      IFS_save="$IFS"
27438      IFS=:
27439      for p in $PATH; do
27440        if test -f "$p/$path" && test -x "$p/$path"; then
27441          new_path="$p/$path"
27442          break
27443        fi
27444      done
27445      IFS="$IFS_save"
27446    else
27447      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) failed, using $path directly." >&5
27448$as_echo "$as_me: Resolving STRIP (as $path) failed, using $path directly." >&6;}
27449      new_path="$path"
27450    fi
27451
27452    if test "x$new_path" = x; then
27453      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
27454$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
27455      has_space=`$ECHO "$complete" | $GREP " "`
27456      if test "x$has_space" != x; then
27457        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27458$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27459      fi
27460      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
27461    fi
27462  fi
27463
27464  # Now join together the path and the arguments once again
27465  if test "x$arguments" != xEOL; then
27466    new_complete="$new_path ${arguments% *}"
27467  else
27468    new_complete="$new_path"
27469  fi
27470
27471  if test "x$complete" != "x$new_complete"; then
27472    STRIP="$new_complete"
27473    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
27474$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
27475  fi
27476
27477  fi
27478
27479  # objcopy is used for moving debug symbols to separate files when
27480  # full debug symbols are enabled.
27481  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
27482    if test -n "$ac_tool_prefix"; then
27483  for ac_prog in gobjcopy objcopy
27484  do
27485    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
27486set dummy $ac_tool_prefix$ac_prog; ac_word=$2
27487{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27488$as_echo_n "checking for $ac_word... " >&6; }
27489if ${ac_cv_prog_OBJCOPY+:} false; then :
27490  $as_echo_n "(cached) " >&6
27491else
27492  if test -n "$OBJCOPY"; then
27493  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
27494else
27495as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27496for as_dir in $PATH
27497do
27498  IFS=$as_save_IFS
27499  test -z "$as_dir" && as_dir=.
27500    for ac_exec_ext in '' $ac_executable_extensions; do
27501  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27502    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
27503    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27504    break 2
27505  fi
27506done
27507  done
27508IFS=$as_save_IFS
27509
27510fi
27511fi
27512OBJCOPY=$ac_cv_prog_OBJCOPY
27513if test -n "$OBJCOPY"; then
27514  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
27515$as_echo "$OBJCOPY" >&6; }
27516else
27517  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27518$as_echo "no" >&6; }
27519fi
27520
27521
27522    test -n "$OBJCOPY" && break
27523  done
27524fi
27525if test -z "$OBJCOPY"; then
27526  ac_ct_OBJCOPY=$OBJCOPY
27527  for ac_prog in gobjcopy objcopy
27528do
27529  # Extract the first word of "$ac_prog", so it can be a program name with args.
27530set dummy $ac_prog; ac_word=$2
27531{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27532$as_echo_n "checking for $ac_word... " >&6; }
27533if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
27534  $as_echo_n "(cached) " >&6
27535else
27536  if test -n "$ac_ct_OBJCOPY"; then
27537  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
27538else
27539as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27540for as_dir in $PATH
27541do
27542  IFS=$as_save_IFS
27543  test -z "$as_dir" && as_dir=.
27544    for ac_exec_ext in '' $ac_executable_extensions; do
27545  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27546    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
27547    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27548    break 2
27549  fi
27550done
27551  done
27552IFS=$as_save_IFS
27553
27554fi
27555fi
27556ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
27557if test -n "$ac_ct_OBJCOPY"; then
27558  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
27559$as_echo "$ac_ct_OBJCOPY" >&6; }
27560else
27561  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27562$as_echo "no" >&6; }
27563fi
27564
27565
27566  test -n "$ac_ct_OBJCOPY" && break
27567done
27568
27569  if test "x$ac_ct_OBJCOPY" = x; then
27570    OBJCOPY=""
27571  else
27572    case $cross_compiling:$ac_tool_warned in
27573yes:)
27574{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
27575$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
27576ac_tool_warned=yes ;;
27577esac
27578    OBJCOPY=$ac_ct_OBJCOPY
27579  fi
27580fi
27581
27582    # Only call fixup if objcopy was found.
27583    if test -n "$OBJCOPY"; then
27584
27585  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27586
27587  # First separate the path from the arguments. This will split at the first
27588  # space.
27589  complete="$OBJCOPY"
27590  path="${complete%% *}"
27591  tmp="$complete EOL"
27592  arguments="${tmp#* }"
27593
27594  # Input might be given as Windows format, start by converting to
27595  # unix format.
27596  new_path=`$CYGPATH -u "$path"`
27597
27598  # Now try to locate executable using which
27599  new_path=`$WHICH "$new_path" 2> /dev/null`
27600  # bat and cmd files are not always considered executable in cygwin causing which
27601  # to not find them
27602  if test "x$new_path" = x \
27603      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27604      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27605    new_path=`$CYGPATH -u "$path"`
27606  fi
27607  if test "x$new_path" = x; then
27608    # Oops. Which didn't find the executable.
27609    # The splitting of arguments from the executable at a space might have been incorrect,
27610    # since paths with space are more likely in Windows. Give it another try with the whole
27611    # argument.
27612    path="$complete"
27613    arguments="EOL"
27614    new_path=`$CYGPATH -u "$path"`
27615    new_path=`$WHICH "$new_path" 2> /dev/null`
27616    # bat and cmd files are not always considered executable in cygwin causing which
27617    # to not find them
27618    if test "x$new_path" = x \
27619        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27620        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27621      new_path=`$CYGPATH -u "$path"`
27622    fi
27623    if test "x$new_path" = x; then
27624      # It's still not found. Now this is an unrecoverable error.
27625      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
27626$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
27627      has_space=`$ECHO "$complete" | $GREP " "`
27628      if test "x$has_space" != x; then
27629        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27630$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27631      fi
27632      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
27633    fi
27634  fi
27635
27636  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27637  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27638  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27639  # "foo.exe" is OK but "foo" is an error.
27640  #
27641  # This test is therefore slightly more accurate than "test -f" to check for file presence.
27642  # It is also a way to make sure we got the proper file name for the real test later on.
27643  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27644  if test "x$test_shortpath" = x; then
27645    # Short path failed, file does not exist as specified.
27646    # Try adding .exe or .cmd
27647    if test -f "${new_path}.exe"; then
27648      input_to_shortpath="${new_path}.exe"
27649    elif test -f "${new_path}.cmd"; then
27650      input_to_shortpath="${new_path}.cmd"
27651    else
27652      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
27653$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
27654      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27655$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27656      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
27657    fi
27658  else
27659    input_to_shortpath="$new_path"
27660  fi
27661
27662  # Call helper function which possibly converts this using DOS-style short mode.
27663  # If so, the updated path is stored in $new_path.
27664  new_path="$input_to_shortpath"
27665
27666  input_path="$input_to_shortpath"
27667  # Check if we need to convert this using DOS-style short mode. If the path
27668  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27669  # take no chances and rewrite it.
27670  # Note: m4 eats our [], so we need to use [ and ] instead.
27671  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27672  if test "x$has_forbidden_chars" != x; then
27673    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27674    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27675    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27676    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27677      # Going to short mode and back again did indeed matter. Since short mode is
27678      # case insensitive, let's make it lowercase to improve readability.
27679      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27680      # Now convert it back to Unix-stile (cygpath)
27681      input_path=`$CYGPATH -u "$shortmode_path"`
27682      new_path="$input_path"
27683    fi
27684  fi
27685
27686  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27687  if test "x$test_cygdrive_prefix" = x; then
27688    # As a simple fix, exclude /usr/bin since it's not a real path.
27689    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27690      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27691      # a path prefixed by /cygdrive for fixpath to work.
27692      new_path="$CYGWIN_ROOT_PATH$input_path"
27693    fi
27694  fi
27695
27696  # remove trailing .exe if any
27697  new_path="${new_path/%.exe/}"
27698
27699  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27700
27701  # First separate the path from the arguments. This will split at the first
27702  # space.
27703  complete="$OBJCOPY"
27704  path="${complete%% *}"
27705  tmp="$complete EOL"
27706  arguments="${tmp#* }"
27707
27708  # Input might be given as Windows format, start by converting to
27709  # unix format.
27710  new_path="$path"
27711
27712  windows_path="$new_path"
27713  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27714    unix_path=`$CYGPATH -u "$windows_path"`
27715    new_path="$unix_path"
27716  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27717    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27718    new_path="$unix_path"
27719  fi
27720
27721
27722  # Now try to locate executable using which
27723  new_path=`$WHICH "$new_path" 2> /dev/null`
27724
27725  if test "x$new_path" = x; then
27726    # Oops. Which didn't find the executable.
27727    # The splitting of arguments from the executable at a space might have been incorrect,
27728    # since paths with space are more likely in Windows. Give it another try with the whole
27729    # argument.
27730    path="$complete"
27731    arguments="EOL"
27732    new_path="$path"
27733
27734  windows_path="$new_path"
27735  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27736    unix_path=`$CYGPATH -u "$windows_path"`
27737    new_path="$unix_path"
27738  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27739    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27740    new_path="$unix_path"
27741  fi
27742
27743
27744    new_path=`$WHICH "$new_path" 2> /dev/null`
27745
27746    if test "x$new_path" = x; then
27747      # It's still not found. Now this is an unrecoverable error.
27748      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
27749$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
27750      has_space=`$ECHO "$complete" | $GREP " "`
27751      if test "x$has_space" != x; then
27752        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27753$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27754      fi
27755      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
27756    fi
27757  fi
27758
27759  # Now new_path has a complete unix path to the binary
27760  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27761    # Keep paths in /bin as-is, but remove trailing .exe if any
27762    new_path="${new_path/%.exe/}"
27763    # Do not save /bin paths to all_fixpath_prefixes!
27764  else
27765    # Not in mixed or Windows style, start by that.
27766    new_path=`cmd //c echo $new_path`
27767
27768  input_path="$new_path"
27769  # Check if we need to convert this using DOS-style short mode. If the path
27770  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27771  # take no chances and rewrite it.
27772  # Note: m4 eats our [], so we need to use [ and ] instead.
27773  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27774  if test "x$has_forbidden_chars" != x; then
27775    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27776    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27777  fi
27778
27779    # Output is in $new_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    # remove trailing .exe if any
27791    new_path="${new_path/%.exe/}"
27792
27793    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27794    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27795  fi
27796
27797  else
27798    # We're on a posix platform. Hooray! :)
27799    # First separate the path from the arguments. This will split at the first
27800    # space.
27801    complete="$OBJCOPY"
27802    path="${complete%% *}"
27803    tmp="$complete EOL"
27804    arguments="${tmp#* }"
27805
27806    # Cannot rely on the command "which" here since it doesn't always work.
27807    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27808    if test -z "$is_absolute_path"; then
27809      # Path to executable is not absolute. Find it.
27810      IFS_save="$IFS"
27811      IFS=:
27812      for p in $PATH; do
27813        if test -f "$p/$path" && test -x "$p/$path"; then
27814          new_path="$p/$path"
27815          break
27816        fi
27817      done
27818      IFS="$IFS_save"
27819    else
27820      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJCOPY (as $path) failed, using $path directly." >&5
27821$as_echo "$as_me: Resolving OBJCOPY (as $path) failed, using $path directly." >&6;}
27822      new_path="$path"
27823    fi
27824
27825    if test "x$new_path" = x; then
27826      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
27827$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
27828      has_space=`$ECHO "$complete" | $GREP " "`
27829      if test "x$has_space" != x; then
27830        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27831$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27832      fi
27833      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
27834    fi
27835  fi
27836
27837  # Now join together the path and the arguments once again
27838  if test "x$arguments" != xEOL; then
27839    new_complete="$new_path ${arguments% *}"
27840  else
27841    new_complete="$new_path"
27842  fi
27843
27844  if test "x$complete" != "x$new_complete"; then
27845    OBJCOPY="$new_complete"
27846    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
27847$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
27848  fi
27849
27850    fi
27851  fi
27852
27853  if test -n "$ac_tool_prefix"; then
27854  for ac_prog in gobjdump objdump
27855  do
27856    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
27857set dummy $ac_tool_prefix$ac_prog; ac_word=$2
27858{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27859$as_echo_n "checking for $ac_word... " >&6; }
27860if ${ac_cv_prog_OBJDUMP+:} false; then :
27861  $as_echo_n "(cached) " >&6
27862else
27863  if test -n "$OBJDUMP"; then
27864  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
27865else
27866as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27867for as_dir in $PATH
27868do
27869  IFS=$as_save_IFS
27870  test -z "$as_dir" && as_dir=.
27871    for ac_exec_ext in '' $ac_executable_extensions; do
27872  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27873    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
27874    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27875    break 2
27876  fi
27877done
27878  done
27879IFS=$as_save_IFS
27880
27881fi
27882fi
27883OBJDUMP=$ac_cv_prog_OBJDUMP
27884if test -n "$OBJDUMP"; then
27885  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
27886$as_echo "$OBJDUMP" >&6; }
27887else
27888  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27889$as_echo "no" >&6; }
27890fi
27891
27892
27893    test -n "$OBJDUMP" && break
27894  done
27895fi
27896if test -z "$OBJDUMP"; then
27897  ac_ct_OBJDUMP=$OBJDUMP
27898  for ac_prog in gobjdump objdump
27899do
27900  # Extract the first word of "$ac_prog", so it can be a program name with args.
27901set dummy $ac_prog; ac_word=$2
27902{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27903$as_echo_n "checking for $ac_word... " >&6; }
27904if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
27905  $as_echo_n "(cached) " >&6
27906else
27907  if test -n "$ac_ct_OBJDUMP"; then
27908  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
27909else
27910as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27911for as_dir in $PATH
27912do
27913  IFS=$as_save_IFS
27914  test -z "$as_dir" && as_dir=.
27915    for ac_exec_ext in '' $ac_executable_extensions; do
27916  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27917    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
27918    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27919    break 2
27920  fi
27921done
27922  done
27923IFS=$as_save_IFS
27924
27925fi
27926fi
27927ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
27928if test -n "$ac_ct_OBJDUMP"; then
27929  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
27930$as_echo "$ac_ct_OBJDUMP" >&6; }
27931else
27932  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27933$as_echo "no" >&6; }
27934fi
27935
27936
27937  test -n "$ac_ct_OBJDUMP" && break
27938done
27939
27940  if test "x$ac_ct_OBJDUMP" = x; then
27941    OBJDUMP=""
27942  else
27943    case $cross_compiling:$ac_tool_warned in
27944yes:)
27945{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
27946$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
27947ac_tool_warned=yes ;;
27948esac
27949    OBJDUMP=$ac_ct_OBJDUMP
27950  fi
27951fi
27952
27953  if test "x$OBJDUMP" != x; then
27954    # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE bails if argument is missing.
27955
27956  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27957
27958  # First separate the path from the arguments. This will split at the first
27959  # space.
27960  complete="$OBJDUMP"
27961  path="${complete%% *}"
27962  tmp="$complete EOL"
27963  arguments="${tmp#* }"
27964
27965  # Input might be given as Windows format, start by converting to
27966  # unix format.
27967  new_path=`$CYGPATH -u "$path"`
27968
27969  # Now try to locate executable using which
27970  new_path=`$WHICH "$new_path" 2> /dev/null`
27971  # bat and cmd files are not always considered executable in cygwin causing which
27972  # to not find them
27973  if test "x$new_path" = x \
27974      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27975      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27976    new_path=`$CYGPATH -u "$path"`
27977  fi
27978  if test "x$new_path" = x; then
27979    # Oops. Which didn't find the executable.
27980    # The splitting of arguments from the executable at a space might have been incorrect,
27981    # since paths with space are more likely in Windows. Give it another try with the whole
27982    # argument.
27983    path="$complete"
27984    arguments="EOL"
27985    new_path=`$CYGPATH -u "$path"`
27986    new_path=`$WHICH "$new_path" 2> /dev/null`
27987    # bat and cmd files are not always considered executable in cygwin causing which
27988    # to not find them
27989    if test "x$new_path" = x \
27990        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27991        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27992      new_path=`$CYGPATH -u "$path"`
27993    fi
27994    if test "x$new_path" = x; then
27995      # It's still not found. Now this is an unrecoverable error.
27996      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
27997$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
27998      has_space=`$ECHO "$complete" | $GREP " "`
27999      if test "x$has_space" != x; then
28000        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28001$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28002      fi
28003      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
28004    fi
28005  fi
28006
28007  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28008  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28009  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28010  # "foo.exe" is OK but "foo" is an error.
28011  #
28012  # This test is therefore slightly more accurate than "test -f" to check for file presence.
28013  # It is also a way to make sure we got the proper file name for the real test later on.
28014  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28015  if test "x$test_shortpath" = x; then
28016    # Short path failed, file does not exist as specified.
28017    # Try adding .exe or .cmd
28018    if test -f "${new_path}.exe"; then
28019      input_to_shortpath="${new_path}.exe"
28020    elif test -f "${new_path}.cmd"; then
28021      input_to_shortpath="${new_path}.cmd"
28022    else
28023      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
28024$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
28025      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
28026$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
28027      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
28028    fi
28029  else
28030    input_to_shortpath="$new_path"
28031  fi
28032
28033  # Call helper function which possibly converts this using DOS-style short mode.
28034  # If so, the updated path is stored in $new_path.
28035  new_path="$input_to_shortpath"
28036
28037  input_path="$input_to_shortpath"
28038  # Check if we need to convert this using DOS-style short mode. If the path
28039  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28040  # take no chances and rewrite it.
28041  # Note: m4 eats our [], so we need to use [ and ] instead.
28042  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28043  if test "x$has_forbidden_chars" != x; then
28044    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28045    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28046    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28047    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28048      # Going to short mode and back again did indeed matter. Since short mode is
28049      # case insensitive, let's make it lowercase to improve readability.
28050      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28051      # Now convert it back to Unix-stile (cygpath)
28052      input_path=`$CYGPATH -u "$shortmode_path"`
28053      new_path="$input_path"
28054    fi
28055  fi
28056
28057  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28058  if test "x$test_cygdrive_prefix" = x; then
28059    # As a simple fix, exclude /usr/bin since it's not a real path.
28060    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28061      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28062      # a path prefixed by /cygdrive for fixpath to work.
28063      new_path="$CYGWIN_ROOT_PATH$input_path"
28064    fi
28065  fi
28066
28067  # remove trailing .exe if any
28068  new_path="${new_path/%.exe/}"
28069
28070  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28071
28072  # First separate the path from the arguments. This will split at the first
28073  # space.
28074  complete="$OBJDUMP"
28075  path="${complete%% *}"
28076  tmp="$complete EOL"
28077  arguments="${tmp#* }"
28078
28079  # Input might be given as Windows format, start by converting to
28080  # unix format.
28081  new_path="$path"
28082
28083  windows_path="$new_path"
28084  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28085    unix_path=`$CYGPATH -u "$windows_path"`
28086    new_path="$unix_path"
28087  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28088    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28089    new_path="$unix_path"
28090  fi
28091
28092
28093  # Now try to locate executable using which
28094  new_path=`$WHICH "$new_path" 2> /dev/null`
28095
28096  if test "x$new_path" = x; then
28097    # Oops. Which didn't find the executable.
28098    # The splitting of arguments from the executable at a space might have been incorrect,
28099    # since paths with space are more likely in Windows. Give it another try with the whole
28100    # argument.
28101    path="$complete"
28102    arguments="EOL"
28103    new_path="$path"
28104
28105  windows_path="$new_path"
28106  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28107    unix_path=`$CYGPATH -u "$windows_path"`
28108    new_path="$unix_path"
28109  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28110    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28111    new_path="$unix_path"
28112  fi
28113
28114
28115    new_path=`$WHICH "$new_path" 2> /dev/null`
28116
28117    if test "x$new_path" = x; then
28118      # It's still not found. Now this is an unrecoverable error.
28119      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
28120$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
28121      has_space=`$ECHO "$complete" | $GREP " "`
28122      if test "x$has_space" != x; then
28123        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28124$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28125      fi
28126      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
28127    fi
28128  fi
28129
28130  # Now new_path has a complete unix path to the binary
28131  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28132    # Keep paths in /bin as-is, but remove trailing .exe if any
28133    new_path="${new_path/%.exe/}"
28134    # Do not save /bin paths to all_fixpath_prefixes!
28135  else
28136    # Not in mixed or Windows style, start by that.
28137    new_path=`cmd //c echo $new_path`
28138
28139  input_path="$new_path"
28140  # Check if we need to convert this using DOS-style short mode. If the path
28141  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28142  # take no chances and rewrite it.
28143  # Note: m4 eats our [], so we need to use [ and ] instead.
28144  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28145  if test "x$has_forbidden_chars" != x; then
28146    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28147    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28148  fi
28149
28150    # Output is in $new_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    # remove trailing .exe if any
28162    new_path="${new_path/%.exe/}"
28163
28164    # Save the first 10 bytes of this path to the storage, so fixpath can work.
28165    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28166  fi
28167
28168  else
28169    # We're on a posix platform. Hooray! :)
28170    # First separate the path from the arguments. This will split at the first
28171    # space.
28172    complete="$OBJDUMP"
28173    path="${complete%% *}"
28174    tmp="$complete EOL"
28175    arguments="${tmp#* }"
28176
28177    # Cannot rely on the command "which" here since it doesn't always work.
28178    is_absolute_path=`$ECHO "$path" | $GREP ^/`
28179    if test -z "$is_absolute_path"; then
28180      # Path to executable is not absolute. Find it.
28181      IFS_save="$IFS"
28182      IFS=:
28183      for p in $PATH; do
28184        if test -f "$p/$path" && test -x "$p/$path"; then
28185          new_path="$p/$path"
28186          break
28187        fi
28188      done
28189      IFS="$IFS_save"
28190    else
28191      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJDUMP (as $path) failed, using $path directly." >&5
28192$as_echo "$as_me: Resolving OBJDUMP (as $path) failed, using $path directly." >&6;}
28193      new_path="$path"
28194    fi
28195
28196    if test "x$new_path" = x; then
28197      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
28198$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
28199      has_space=`$ECHO "$complete" | $GREP " "`
28200      if test "x$has_space" != x; then
28201        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28202$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28203      fi
28204      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
28205    fi
28206  fi
28207
28208  # Now join together the path and the arguments once again
28209  if test "x$arguments" != xEOL; then
28210    new_complete="$new_path ${arguments% *}"
28211  else
28212    new_complete="$new_path"
28213  fi
28214
28215  if test "x$complete" != "x$new_complete"; then
28216    OBJDUMP="$new_complete"
28217    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
28218$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
28219  fi
28220
28221  fi
28222
28223  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
28224    # Extract the first word of "lipo", so it can be a program name with args.
28225set dummy lipo; ac_word=$2
28226{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28227$as_echo_n "checking for $ac_word... " >&6; }
28228if ${ac_cv_path_LIPO+:} false; then :
28229  $as_echo_n "(cached) " >&6
28230else
28231  case $LIPO in
28232  [\\/]* | ?:[\\/]*)
28233  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
28234  ;;
28235  *)
28236  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28237for as_dir in $PATH
28238do
28239  IFS=$as_save_IFS
28240  test -z "$as_dir" && as_dir=.
28241    for ac_exec_ext in '' $ac_executable_extensions; do
28242  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28243    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
28244    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28245    break 2
28246  fi
28247done
28248  done
28249IFS=$as_save_IFS
28250
28251  ;;
28252esac
28253fi
28254LIPO=$ac_cv_path_LIPO
28255if test -n "$LIPO"; then
28256  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
28257$as_echo "$LIPO" >&6; }
28258else
28259  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28260$as_echo "no" >&6; }
28261fi
28262
28263
28264
28265  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28266
28267  # First separate the path from the arguments. This will split at the first
28268  # space.
28269  complete="$LIPO"
28270  path="${complete%% *}"
28271  tmp="$complete EOL"
28272  arguments="${tmp#* }"
28273
28274  # Input might be given as Windows format, start by converting to
28275  # unix format.
28276  new_path=`$CYGPATH -u "$path"`
28277
28278  # Now try to locate executable using which
28279  new_path=`$WHICH "$new_path" 2> /dev/null`
28280  # bat and cmd files are not always considered executable in cygwin causing which
28281  # to not find them
28282  if test "x$new_path" = x \
28283      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28284      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28285    new_path=`$CYGPATH -u "$path"`
28286  fi
28287  if test "x$new_path" = x; then
28288    # Oops. Which didn't find the executable.
28289    # The splitting of arguments from the executable at a space might have been incorrect,
28290    # since paths with space are more likely in Windows. Give it another try with the whole
28291    # argument.
28292    path="$complete"
28293    arguments="EOL"
28294    new_path=`$CYGPATH -u "$path"`
28295    new_path=`$WHICH "$new_path" 2> /dev/null`
28296    # bat and cmd files are not always considered executable in cygwin causing which
28297    # to not find them
28298    if test "x$new_path" = x \
28299        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28300        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28301      new_path=`$CYGPATH -u "$path"`
28302    fi
28303    if test "x$new_path" = x; then
28304      # It's still not found. Now this is an unrecoverable error.
28305      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
28306$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
28307      has_space=`$ECHO "$complete" | $GREP " "`
28308      if test "x$has_space" != x; then
28309        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28310$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28311      fi
28312      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
28313    fi
28314  fi
28315
28316  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28317  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28318  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28319  # "foo.exe" is OK but "foo" is an error.
28320  #
28321  # This test is therefore slightly more accurate than "test -f" to check for file presence.
28322  # It is also a way to make sure we got the proper file name for the real test later on.
28323  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28324  if test "x$test_shortpath" = x; then
28325    # Short path failed, file does not exist as specified.
28326    # Try adding .exe or .cmd
28327    if test -f "${new_path}.exe"; then
28328      input_to_shortpath="${new_path}.exe"
28329    elif test -f "${new_path}.cmd"; then
28330      input_to_shortpath="${new_path}.cmd"
28331    else
28332      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
28333$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
28334      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
28335$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
28336      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
28337    fi
28338  else
28339    input_to_shortpath="$new_path"
28340  fi
28341
28342  # Call helper function which possibly converts this using DOS-style short mode.
28343  # If so, the updated path is stored in $new_path.
28344  new_path="$input_to_shortpath"
28345
28346  input_path="$input_to_shortpath"
28347  # Check if we need to convert this using DOS-style short mode. If the path
28348  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28349  # take no chances and rewrite it.
28350  # Note: m4 eats our [], so we need to use [ and ] instead.
28351  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28352  if test "x$has_forbidden_chars" != x; then
28353    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28354    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28355    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28356    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28357      # Going to short mode and back again did indeed matter. Since short mode is
28358      # case insensitive, let's make it lowercase to improve readability.
28359      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28360      # Now convert it back to Unix-stile (cygpath)
28361      input_path=`$CYGPATH -u "$shortmode_path"`
28362      new_path="$input_path"
28363    fi
28364  fi
28365
28366  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28367  if test "x$test_cygdrive_prefix" = x; then
28368    # As a simple fix, exclude /usr/bin since it's not a real path.
28369    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28370      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28371      # a path prefixed by /cygdrive for fixpath to work.
28372      new_path="$CYGWIN_ROOT_PATH$input_path"
28373    fi
28374  fi
28375
28376  # remove trailing .exe if any
28377  new_path="${new_path/%.exe/}"
28378
28379  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28380
28381  # First separate the path from the arguments. This will split at the first
28382  # space.
28383  complete="$LIPO"
28384  path="${complete%% *}"
28385  tmp="$complete EOL"
28386  arguments="${tmp#* }"
28387
28388  # Input might be given as Windows format, start by converting to
28389  # unix format.
28390  new_path="$path"
28391
28392  windows_path="$new_path"
28393  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28394    unix_path=`$CYGPATH -u "$windows_path"`
28395    new_path="$unix_path"
28396  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28397    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28398    new_path="$unix_path"
28399  fi
28400
28401
28402  # Now try to locate executable using which
28403  new_path=`$WHICH "$new_path" 2> /dev/null`
28404
28405  if test "x$new_path" = x; then
28406    # Oops. Which didn't find the executable.
28407    # The splitting of arguments from the executable at a space might have been incorrect,
28408    # since paths with space are more likely in Windows. Give it another try with the whole
28409    # argument.
28410    path="$complete"
28411    arguments="EOL"
28412    new_path="$path"
28413
28414  windows_path="$new_path"
28415  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28416    unix_path=`$CYGPATH -u "$windows_path"`
28417    new_path="$unix_path"
28418  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28419    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28420    new_path="$unix_path"
28421  fi
28422
28423
28424    new_path=`$WHICH "$new_path" 2> /dev/null`
28425
28426    if test "x$new_path" = x; then
28427      # It's still not found. Now this is an unrecoverable error.
28428      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
28429$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
28430      has_space=`$ECHO "$complete" | $GREP " "`
28431      if test "x$has_space" != x; then
28432        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28433$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28434      fi
28435      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
28436    fi
28437  fi
28438
28439  # Now new_path has a complete unix path to the binary
28440  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28441    # Keep paths in /bin as-is, but remove trailing .exe if any
28442    new_path="${new_path/%.exe/}"
28443    # Do not save /bin paths to all_fixpath_prefixes!
28444  else
28445    # Not in mixed or Windows style, start by that.
28446    new_path=`cmd //c echo $new_path`
28447
28448  input_path="$new_path"
28449  # Check if we need to convert this using DOS-style short mode. If the path
28450  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28451  # take no chances and rewrite it.
28452  # Note: m4 eats our [], so we need to use [ and ] instead.
28453  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28454  if test "x$has_forbidden_chars" != x; then
28455    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28456    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28457  fi
28458
28459    # Output is in $new_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    # remove trailing .exe if any
28471    new_path="${new_path/%.exe/}"
28472
28473    # Save the first 10 bytes of this path to the storage, so fixpath can work.
28474    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28475  fi
28476
28477  else
28478    # We're on a posix platform. Hooray! :)
28479    # First separate the path from the arguments. This will split at the first
28480    # space.
28481    complete="$LIPO"
28482    path="${complete%% *}"
28483    tmp="$complete EOL"
28484    arguments="${tmp#* }"
28485
28486    # Cannot rely on the command "which" here since it doesn't always work.
28487    is_absolute_path=`$ECHO "$path" | $GREP ^/`
28488    if test -z "$is_absolute_path"; then
28489      # Path to executable is not absolute. Find it.
28490      IFS_save="$IFS"
28491      IFS=:
28492      for p in $PATH; do
28493        if test -f "$p/$path" && test -x "$p/$path"; then
28494          new_path="$p/$path"
28495          break
28496        fi
28497      done
28498      IFS="$IFS_save"
28499    else
28500      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving LIPO (as $path) failed, using $path directly." >&5
28501$as_echo "$as_me: Resolving LIPO (as $path) failed, using $path directly." >&6;}
28502      new_path="$path"
28503    fi
28504
28505    if test "x$new_path" = x; then
28506      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
28507$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
28508      has_space=`$ECHO "$complete" | $GREP " "`
28509      if test "x$has_space" != x; then
28510        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28511$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28512      fi
28513      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
28514    fi
28515  fi
28516
28517  # Now join together the path and the arguments once again
28518  if test "x$arguments" != xEOL; then
28519    new_complete="$new_path ${arguments% *}"
28520  else
28521    new_complete="$new_path"
28522  fi
28523
28524  if test "x$complete" != "x$new_complete"; then
28525    LIPO="$new_complete"
28526    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
28527$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
28528  fi
28529
28530  fi
28531
28532
28533
28534  # Restore old path without tools dir
28535  PATH="$OLD_PATH"
28536
28537
28538# FIXME: Currently we must test this after paths but before flags. Fix!
28539
28540# And we can test some aspects on the target using configure macros.
28541
28542
28543{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
28544$as_echo_n "checking for ANSI C header files... " >&6; }
28545if ${ac_cv_header_stdc+:} false; then :
28546  $as_echo_n "(cached) " >&6
28547else
28548  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28549/* end confdefs.h.  */
28550#include <stdlib.h>
28551#include <stdarg.h>
28552#include <string.h>
28553#include <float.h>
28554
28555int
28556main ()
28557{
28558
28559  ;
28560  return 0;
28561}
28562_ACEOF
28563if ac_fn_cxx_try_compile "$LINENO"; then :
28564  ac_cv_header_stdc=yes
28565else
28566  ac_cv_header_stdc=no
28567fi
28568rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28569
28570if test $ac_cv_header_stdc = yes; then
28571  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
28572  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28573/* end confdefs.h.  */
28574#include <string.h>
28575
28576_ACEOF
28577if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28578  $EGREP "memchr" >/dev/null 2>&1; then :
28579
28580else
28581  ac_cv_header_stdc=no
28582fi
28583rm -f conftest*
28584
28585fi
28586
28587if test $ac_cv_header_stdc = yes; then
28588  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
28589  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28590/* end confdefs.h.  */
28591#include <stdlib.h>
28592
28593_ACEOF
28594if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28595  $EGREP "free" >/dev/null 2>&1; then :
28596
28597else
28598  ac_cv_header_stdc=no
28599fi
28600rm -f conftest*
28601
28602fi
28603
28604if test $ac_cv_header_stdc = yes; then
28605  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
28606  if test "$cross_compiling" = yes; then :
28607  :
28608else
28609  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28610/* end confdefs.h.  */
28611#include <ctype.h>
28612#include <stdlib.h>
28613#if ((' ' & 0x0FF) == 0x020)
28614# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
28615# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
28616#else
28617# define ISLOWER(c) \
28618		   (('a' <= (c) && (c) <= 'i') \
28619		     || ('j' <= (c) && (c) <= 'r') \
28620		     || ('s' <= (c) && (c) <= 'z'))
28621# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
28622#endif
28623
28624#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
28625int
28626main ()
28627{
28628  int i;
28629  for (i = 0; i < 256; i++)
28630    if (XOR (islower (i), ISLOWER (i))
28631	|| toupper (i) != TOUPPER (i))
28632      return 2;
28633  return 0;
28634}
28635_ACEOF
28636if ac_fn_cxx_try_run "$LINENO"; then :
28637
28638else
28639  ac_cv_header_stdc=no
28640fi
28641rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28642  conftest.$ac_objext conftest.beam conftest.$ac_ext
28643fi
28644
28645fi
28646fi
28647{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
28648$as_echo "$ac_cv_header_stdc" >&6; }
28649if test $ac_cv_header_stdc = yes; then
28650
28651$as_echo "#define STDC_HEADERS 1" >>confdefs.h
28652
28653fi
28654
28655# On IRIX 5.3, sys/types and inttypes.h are conflicting.
28656for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
28657		  inttypes.h stdint.h unistd.h
28658do :
28659  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
28660ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
28661"
28662if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
28663  cat >>confdefs.h <<_ACEOF
28664#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
28665_ACEOF
28666
28667fi
28668
28669done
28670
28671
28672
28673  ###############################################################################
28674  #
28675  # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
28676  # (The JVM can use 32 or 64 bit Java pointers but that decision
28677  # is made at runtime.)
28678  #
28679
28680  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28681    # Always specify -m flags on Solaris
28682
28683  # When we add flags to the "official" CFLAGS etc, we need to
28684  # keep track of these additions in ADDED_CFLAGS etc. These
28685  # will later be checked to make sure only controlled additions
28686  # have been made to CFLAGS etc.
28687  ADDED_CFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28688  ADDED_CXXFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28689  ADDED_LDFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28690
28691  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
28692  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
28693  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
28694
28695  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
28696  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
28697  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
28698
28699  elif test "x$COMPILE_TYPE" = xreduced; then
28700    if test "x$OPENJDK_TARGET_OS" != xwindows; then
28701      # Specify -m if running reduced on other Posix platforms
28702
28703  # When we add flags to the "official" CFLAGS etc, we need to
28704  # keep track of these additions in ADDED_CFLAGS etc. These
28705  # will later be checked to make sure only controlled additions
28706  # have been made to CFLAGS etc.
28707  ADDED_CFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28708  ADDED_CXXFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28709  ADDED_LDFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28710
28711  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
28712  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
28713  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
28714
28715  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
28716  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
28717  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
28718
28719    fi
28720  fi
28721
28722  # Make compilation sanity check
28723  for ac_header in stdio.h
28724do :
28725  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
28726if test "x$ac_cv_header_stdio_h" = xyes; then :
28727  cat >>confdefs.h <<_ACEOF
28728#define HAVE_STDIO_H 1
28729_ACEOF
28730
28731else
28732
28733    { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
28734$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
28735    if test "x$COMPILE_TYPE" = xreduced; then
28736      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed." >&5
28737$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed." >&6;}
28738    elif test "x$COMPILE_TYPE" = xcross; then
28739      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
28740$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
28741    fi
28742    as_fn_error $? "Cannot continue." "$LINENO" 5
28743
28744fi
28745
28746done
28747
28748
28749  # The cast to long int works around a bug in the HP C Compiler
28750# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
28751# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
28752# This bug is HP SR number 8606223364.
28753{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
28754$as_echo_n "checking size of int *... " >&6; }
28755if ${ac_cv_sizeof_int_p+:} false; then :
28756  $as_echo_n "(cached) " >&6
28757else
28758  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
28759
28760else
28761  if test "$ac_cv_type_int_p" = yes; then
28762     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
28763$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
28764as_fn_error 77 "cannot compute sizeof (int *)
28765See \`config.log' for more details" "$LINENO" 5; }
28766   else
28767     ac_cv_sizeof_int_p=0
28768   fi
28769fi
28770
28771fi
28772{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
28773$as_echo "$ac_cv_sizeof_int_p" >&6; }
28774
28775
28776
28777cat >>confdefs.h <<_ACEOF
28778#define SIZEOF_INT_P $ac_cv_sizeof_int_p
28779_ACEOF
28780
28781
28782
28783  if test "x$SIZEOF_INT_P" != "x$ac_cv_sizeof_int_p"; then
28784    # Workaround autoconf bug, see http://lists.gnu.org/archive/html/autoconf/2010-07/msg00004.html
28785    SIZEOF_INT_P="$ac_cv_sizeof_int_p"
28786  fi
28787
28788  if test "x$SIZEOF_INT_P" = x; then
28789    # The test failed, lets stick to the assumed value.
28790    { $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
28791$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
28792  else
28793    TESTED_TARGET_CPU_BITS=`expr 8 \* $SIZEOF_INT_P`
28794
28795    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
28796      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
28797    fi
28798  fi
28799
28800  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
28801$as_echo_n "checking for target address size... " >&6; }
28802  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
28803$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
28804
28805
28806  ###############################################################################
28807  #
28808  # Is the target little of big endian?
28809  #
28810   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
28811$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
28812if ${ac_cv_c_bigendian+:} false; then :
28813  $as_echo_n "(cached) " >&6
28814else
28815  ac_cv_c_bigendian=unknown
28816    # See if we're dealing with a universal compiler.
28817    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28818/* end confdefs.h.  */
28819#ifndef __APPLE_CC__
28820	       not a universal capable compiler
28821	     #endif
28822	     typedef int dummy;
28823
28824_ACEOF
28825if ac_fn_cxx_try_compile "$LINENO"; then :
28826
28827	# Check for potential -arch flags.  It is not universal unless
28828	# there are at least two -arch flags with different values.
28829	ac_arch=
28830	ac_prev=
28831	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
28832	 if test -n "$ac_prev"; then
28833	   case $ac_word in
28834	     i?86 | x86_64 | ppc | ppc64)
28835	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
28836		 ac_arch=$ac_word
28837	       else
28838		 ac_cv_c_bigendian=universal
28839		 break
28840	       fi
28841	       ;;
28842	   esac
28843	   ac_prev=
28844	 elif test "x$ac_word" = "x-arch"; then
28845	   ac_prev=arch
28846	 fi
28847       done
28848fi
28849rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28850    if test $ac_cv_c_bigendian = unknown; then
28851      # See if sys/param.h defines the BYTE_ORDER macro.
28852      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28853/* end confdefs.h.  */
28854#include <sys/types.h>
28855	     #include <sys/param.h>
28856
28857int
28858main ()
28859{
28860#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
28861		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
28862		     && LITTLE_ENDIAN)
28863	      bogus endian macros
28864	     #endif
28865
28866  ;
28867  return 0;
28868}
28869_ACEOF
28870if ac_fn_cxx_try_compile "$LINENO"; then :
28871  # It does; now see whether it defined to BIG_ENDIAN or not.
28872	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28873/* end confdefs.h.  */
28874#include <sys/types.h>
28875		#include <sys/param.h>
28876
28877int
28878main ()
28879{
28880#if BYTE_ORDER != BIG_ENDIAN
28881		 not big endian
28882		#endif
28883
28884  ;
28885  return 0;
28886}
28887_ACEOF
28888if ac_fn_cxx_try_compile "$LINENO"; then :
28889  ac_cv_c_bigendian=yes
28890else
28891  ac_cv_c_bigendian=no
28892fi
28893rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28894fi
28895rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28896    fi
28897    if test $ac_cv_c_bigendian = unknown; then
28898      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
28899      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28900/* end confdefs.h.  */
28901#include <limits.h>
28902
28903int
28904main ()
28905{
28906#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
28907	      bogus endian macros
28908	     #endif
28909
28910  ;
28911  return 0;
28912}
28913_ACEOF
28914if ac_fn_cxx_try_compile "$LINENO"; then :
28915  # It does; now see whether it defined to _BIG_ENDIAN or not.
28916	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28917/* end confdefs.h.  */
28918#include <limits.h>
28919
28920int
28921main ()
28922{
28923#ifndef _BIG_ENDIAN
28924		 not big endian
28925		#endif
28926
28927  ;
28928  return 0;
28929}
28930_ACEOF
28931if ac_fn_cxx_try_compile "$LINENO"; then :
28932  ac_cv_c_bigendian=yes
28933else
28934  ac_cv_c_bigendian=no
28935fi
28936rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28937fi
28938rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28939    fi
28940    if test $ac_cv_c_bigendian = unknown; then
28941      # Compile a test program.
28942      if test "$cross_compiling" = yes; then :
28943  # Try to guess by grepping values from an object file.
28944	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28945/* end confdefs.h.  */
28946short int ascii_mm[] =
28947		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
28948		short int ascii_ii[] =
28949		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
28950		int use_ascii (int i) {
28951		  return ascii_mm[i] + ascii_ii[i];
28952		}
28953		short int ebcdic_ii[] =
28954		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
28955		short int ebcdic_mm[] =
28956		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
28957		int use_ebcdic (int i) {
28958		  return ebcdic_mm[i] + ebcdic_ii[i];
28959		}
28960		extern int foo;
28961
28962int
28963main ()
28964{
28965return use_ascii (foo) == use_ebcdic (foo);
28966  ;
28967  return 0;
28968}
28969_ACEOF
28970if ac_fn_cxx_try_compile "$LINENO"; then :
28971  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
28972	      ac_cv_c_bigendian=yes
28973	    fi
28974	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
28975	      if test "$ac_cv_c_bigendian" = unknown; then
28976		ac_cv_c_bigendian=no
28977	      else
28978		# finding both strings is unlikely to happen, but who knows?
28979		ac_cv_c_bigendian=unknown
28980	      fi
28981	    fi
28982fi
28983rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28984else
28985  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28986/* end confdefs.h.  */
28987$ac_includes_default
28988int
28989main ()
28990{
28991
28992	     /* Are we little or big endian?  From Harbison&Steele.  */
28993	     union
28994	     {
28995	       long int l;
28996	       char c[sizeof (long int)];
28997	     } u;
28998	     u.l = 1;
28999	     return u.c[sizeof (long int) - 1] == 1;
29000
29001  ;
29002  return 0;
29003}
29004_ACEOF
29005if ac_fn_cxx_try_run "$LINENO"; then :
29006  ac_cv_c_bigendian=no
29007else
29008  ac_cv_c_bigendian=yes
29009fi
29010rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29011  conftest.$ac_objext conftest.beam conftest.$ac_ext
29012fi
29013
29014    fi
29015fi
29016{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
29017$as_echo "$ac_cv_c_bigendian" >&6; }
29018 case $ac_cv_c_bigendian in #(
29019   yes)
29020     ENDIAN="big";; #(
29021   no)
29022     ENDIAN="little" ;; #(
29023   universal)
29024     ENDIAN="universal_endianness"
29025     ;; #(
29026   *)
29027     ENDIAN="unknown" ;;
29028 esac
29029
29030
29031  if test "x$ENDIAN" = xuniversal_endianness; then
29032    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
29033  fi
29034  if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
29035    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
29036  fi
29037
29038
29039# Configure flags for the tools
29040
29041
29042  ###############################################################################
29043  #
29044  # How to compile shared libraries.
29045  #
29046
29047  if test "x$GCC" = xyes; then
29048    COMPILER_NAME=gcc
29049    PICFLAG="-fPIC"
29050    LIBRARY_PREFIX=lib
29051    SHARED_LIBRARY='lib$1.so'
29052    STATIC_LIBRARY='lib$1.a'
29053    SHARED_LIBRARY_FLAGS="-shared"
29054    SHARED_LIBRARY_SUFFIX='.so'
29055    STATIC_LIBRARY_SUFFIX='.a'
29056    OBJ_SUFFIX='.o'
29057    EXE_SUFFIX=''
29058    SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
29059    SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
29060    C_FLAG_REORDER=''
29061    CXX_FLAG_REORDER=''
29062    SET_SHARED_LIBRARY_ORIGIN='-Xlinker -z -Xlinker origin -Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
29063    SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
29064    LD="$CC"
29065    LDEXE="$CC"
29066    LDCXX="$CXX"
29067    LDEXECXX="$CXX"
29068    POST_STRIP_CMD="$STRIP -g"
29069
29070    # Linking is different on MacOSX
29071    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29072      # Might change in the future to clang.
29073      COMPILER_NAME=gcc
29074      SHARED_LIBRARY='lib$1.dylib'
29075      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
29076      SHARED_LIBRARY_SUFFIX='.dylib'
29077      EXE_SUFFIX=''
29078      SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
29079      SET_SHARED_LIBRARY_MAPFILE=''
29080      SET_SHARED_LIBRARY_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
29081      SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
29082      POST_STRIP_CMD="$STRIP -S"
29083    fi
29084  else
29085    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29086      # If it is not gcc, then assume it is the Oracle Solaris Studio Compiler
29087      COMPILER_NAME=ossc
29088      PICFLAG="-KPIC"
29089      LIBRARY_PREFIX=lib
29090      SHARED_LIBRARY='lib$1.so'
29091      STATIC_LIBRARY='lib$1.a'
29092      SHARED_LIBRARY_FLAGS="-G"
29093      SHARED_LIBRARY_SUFFIX='.so'
29094      STATIC_LIBRARY_SUFFIX='.a'
29095      OBJ_SUFFIX='.o'
29096      EXE_SUFFIX=''
29097      SET_SHARED_LIBRARY_NAME=''
29098      SET_SHARED_LIBRARY_MAPFILE='-M$1'
29099      C_FLAG_REORDER='-xF'
29100      CXX_FLAG_REORDER='-xF'
29101      SET_SHARED_LIBRARY_ORIGIN='-R\$$$$ORIGIN$1'
29102      SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
29103      CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
29104      CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
29105      CFLAGS_JDKLIB_EXTRA='-xstrconst'
29106      POST_STRIP_CMD="$STRIP -x"
29107      POST_MCS_CMD="$MCS -d -a \"JDK $FULL_VERSION\""
29108    fi
29109    if test "x$OPENJDK_TARGET_OS" = xwindows; then
29110      # If it is not gcc, then assume it is the MS Visual Studio compiler
29111      COMPILER_NAME=cl
29112      PICFLAG=""
29113      LIBRARY_PREFIX=
29114      SHARED_LIBRARY='$1.dll'
29115      STATIC_LIBRARY='$1.lib'
29116      SHARED_LIBRARY_FLAGS="-LD"
29117      SHARED_LIBRARY_SUFFIX='.dll'
29118      STATIC_LIBRARY_SUFFIX='.lib'
29119      OBJ_SUFFIX='.obj'
29120      EXE_SUFFIX='.exe'
29121      SET_SHARED_LIBRARY_NAME=''
29122      SET_SHARED_LIBRARY_MAPFILE=''
29123      SET_SHARED_LIBRARY_ORIGIN=''
29124      SET_EXECUTABLE_ORIGIN=''
29125    fi
29126  fi
29127
29128
29129
29130
29131
29132
29133
29134
29135
29136
29137
29138
29139
29140
29141
29142
29143
29144
29145
29146  # The (cross) compiler is now configured, we can now test capabilities
29147  # of the target platform.
29148
29149
29150
29151  ###############################################################################
29152  #
29153  # Setup the opt flags for different compilers
29154  # and different operating systems.
29155  #
29156
29157  #
29158  # NOTE: check for -mstackrealign needs to be below potential addition of -m32
29159  #
29160  if test "x$OPENJDK_TARGET_CPU_BITS" = x32 && test "x$OPENJDK_TARGET_OS" = xmacosx; then
29161    # On 32-bit MacOSX the OS requires C-entry points to be 16 byte aligned.
29162    # While waiting for a better solution, the current workaround is to use -mstackrealign.
29163    CFLAGS="$CFLAGS -mstackrealign"
29164    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if 32-bit compiler supports -mstackrealign" >&5
29165$as_echo_n "checking if 32-bit compiler supports -mstackrealign... " >&6; }
29166    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29167/* end confdefs.h.  */
29168int main() { return 0; }
29169_ACEOF
29170if ac_fn_cxx_try_link "$LINENO"; then :
29171
29172          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
29173$as_echo "yes" >&6; }
29174
29175else
29176
29177          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29178$as_echo "no" >&6; }
29179          as_fn_error $? "The selected compiler $CXX does not support -mstackrealign! Try to put another compiler in the path." "$LINENO" 5
29180
29181
29182fi
29183rm -f core conftest.err conftest.$ac_objext \
29184    conftest$ac_exeext conftest.$ac_ext
29185  fi
29186
29187  C_FLAG_DEPS="-MMD -MF"
29188  CXX_FLAG_DEPS="-MMD -MF"
29189
29190  case $COMPILER_TYPE in
29191    CC )
29192      case $COMPILER_NAME in
29193        gcc )
29194          case $OPENJDK_TARGET_OS in
29195            macosx )
29196              # On MacOSX we optimize for size, something
29197              # we should do for all platforms?
29198              C_O_FLAG_HI="-Os"
29199              C_O_FLAG_NORM="-Os"
29200              C_O_FLAG_NONE=""
29201              ;;
29202            *)
29203              C_O_FLAG_HI="-O3"
29204              C_O_FLAG_NORM="-O2"
29205              C_O_FLAG_NONE="-O0"
29206              ;;
29207          esac
29208          CXX_O_FLAG_HI="$C_O_FLAG_HI"
29209          CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
29210          CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
29211          CFLAGS_DEBUG_SYMBOLS="-g"
29212          CXXFLAGS_DEBUG_SYMBOLS="-g"
29213          if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
29214            CFLAGS_DEBUG_SYMBOLS="-g1"
29215            CXXFLAGS_DEBUG_SYMBOLS="-g1"
29216          fi
29217          ;;
29218        ossc )
29219          #
29220          # Forte has different names for this with their C++ compiler...
29221          #
29222          C_FLAG_DEPS="-xMMD -xMF"
29223          CXX_FLAG_DEPS="-xMMD -xMF"
29224
29225          # Extra options used with HIGHEST
29226          #
29227          # WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
29228          #          done with care, there are some assumptions below that need to
29229          #          be understood about the use of pointers, and IEEE behavior.
29230          #
29231          # Use non-standard floating point mode (not IEEE 754)
29232          CC_HIGHEST="$CC_HIGHEST -fns"
29233          # Do some simplification of floating point arithmetic (not IEEE 754)
29234          CC_HIGHEST="$CC_HIGHEST -fsimple"
29235          # Use single precision floating point with 'float'
29236          CC_HIGHEST="$CC_HIGHEST -fsingle"
29237          # Assume memory references via basic pointer types do not alias
29238          #   (Source with excessing pointer casting and data access with mixed
29239          #    pointer types are not recommended)
29240          CC_HIGHEST="$CC_HIGHEST -xalias_level=basic"
29241          # Use intrinsic or inline versions for math/std functions
29242          #   (If you expect perfect errno behavior, do not use this)
29243          CC_HIGHEST="$CC_HIGHEST -xbuiltin=%all"
29244          # Loop data dependency optimizations (need -xO3 or higher)
29245          CC_HIGHEST="$CC_HIGHEST -xdepend"
29246          # Pointer parameters to functions do not overlap
29247          #   (Similar to -xalias_level=basic usage, but less obvious sometimes.
29248          #    If you pass in multiple pointers to the same data, do not use this)
29249          CC_HIGHEST="$CC_HIGHEST -xrestrict"
29250          # Inline some library routines
29251          #   (If you expect perfect errno behavior, do not use this)
29252          CC_HIGHEST="$CC_HIGHEST -xlibmil"
29253          # Use optimized math routines
29254          #   (If you expect perfect errno behavior, do not use this)
29255          #  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
29256          #CC_HIGHEST="$CC_HIGHEST -xlibmopt"
29257
29258          if test "x$OPENJDK_TARGET_CPU" = xsparc; then
29259            CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
29260            CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
29261          fi
29262
29263          case $OPENJDK_TARGET_CPU_ARCH in
29264            x86)
29265              C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xregs=no%frameptr"
29266              C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
29267              C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
29268              C_O_FLAG_NONE="-xregs=no%frameptr"
29269              CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
29270              CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
29271              CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
29272              CXX_O_FLAG_NONE="-xregs=no%frameptr"
29273              if test "x$OPENJDK_TARGET_CPU" = xx86; then
29274                C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
29275                CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
29276              fi
29277              ;;
29278            sparc)
29279              CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
29280              CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
29281              C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
29282              C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
29283              C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
29284              C_O_FLAG_NONE=""
29285              CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
29286              CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
29287              CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
29288              CXX_O_FLAG_NONE=""
29289              ;;
29290          esac
29291
29292          CFLAGS_DEBUG_SYMBOLS="-g -xs"
29293          CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
29294      esac
29295      ;;
29296    CL )
29297      C_O_FLAG_HIGHEST="-O2"
29298      C_O_FLAG_HI="-O1"
29299      C_O_FLAG_NORM="-O1"
29300      C_O_FLAG_NONE="-Od"
29301      CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
29302      CXX_O_FLAG_HI="$C_O_FLAG_HI"
29303      CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
29304      CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
29305      ;;
29306  esac
29307
29308  if test -z "$C_O_FLAG_HIGHEST"; then
29309    C_O_FLAG_HIGHEST="$C_O_FLAG_HI"
29310  fi
29311
29312  if test -z "$CXX_O_FLAG_HIGHEST"; then
29313    CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HI"
29314  fi
29315
29316
29317
29318
29319
29320
29321
29322
29323
29324
29325
29326
29327
29328
29329  if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
29330    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
29331$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
29332  fi
29333
29334  if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
29335    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
29336$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
29337  fi
29338
29339  if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
29340    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
29341$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
29342  fi
29343
29344
29345# Check whether --with-extra-cflags was given.
29346if test "${with_extra_cflags+set}" = set; then :
29347  withval=$with_extra_cflags;
29348fi
29349
29350
29351
29352# Check whether --with-extra-cxxflags was given.
29353if test "${with_extra_cxxflags+set}" = set; then :
29354  withval=$with_extra_cxxflags;
29355fi
29356
29357
29358
29359# Check whether --with-extra-ldflags was given.
29360if test "${with_extra_ldflags+set}" = set; then :
29361  withval=$with_extra_ldflags;
29362fi
29363
29364
29365  CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags"
29366  CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags"
29367  LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags"
29368
29369  # Hotspot needs these set in their legacy form
29370  LEGACY_EXTRA_CFLAGS=$with_extra_cflags
29371  LEGACY_EXTRA_CXXFLAGS=$with_extra_cxxflags
29372  LEGACY_EXTRA_LDFLAGS=$with_extra_ldflags
29373
29374
29375
29376
29377
29378  ###############################################################################
29379  #
29380  # Now setup the CFLAGS and LDFLAGS for the JDK build.
29381  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
29382  #
29383  case $COMPILER_NAME in
29384    gcc )
29385      CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -W -Wall -Wno-unused -Wno-parentheses \
29386      -pipe \
29387      -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
29388      case $OPENJDK_TARGET_CPU_ARCH in
29389        arm )
29390          # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
29391          CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
29392          ;;
29393        ppc )
29394          # on ppc we don't prevent gcc to omit frame pointer nor strict-aliasing
29395          ;;
29396        * )
29397          CCXXFLAGS_JDK="$CCXXFLAGS_JDK -fno-omit-frame-pointer"
29398          CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
29399          ;;
29400      esac
29401      ;;
29402    ossc )
29403      CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
29404      case $OPENJDK_TARGET_CPU_ARCH in
29405        x86 )
29406          CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
29407          CFLAGS_JDK="$CFLAGS_JDK -erroff=E_BAD_PRAGMA_PACK_VALUE"
29408          ;;
29409      esac
29410
29411      CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
29412      CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
29413
29414      LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
29415      LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
29416      ;;
29417    cl )
29418      CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
29419      -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB -DWIN32_LEAN_AND_MEAN \
29420      -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
29421      -DWIN32 -DIAL"
29422      case $OPENJDK_TARGET_CPU in
29423        x86 )
29424          CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_X86_ -Dx86"
29425          ;;
29426        x86_64 )
29427          CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_AMD64_ -Damd64"
29428          ;;
29429      esac
29430      ;;
29431  esac
29432
29433  ###############################################################################
29434
29435  # Adjust flags according to debug level.
29436  case $DEBUG_LEVEL in
29437    fastdebug )
29438      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS"
29439      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS"
29440      C_O_FLAG_HI="$C_O_FLAG_NORM"
29441      C_O_FLAG_NORM="$C_O_FLAG_NORM"
29442      CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
29443      CXX_O_FLAG_NORM="$CXX_O_FLAG_NORM"
29444      JAVAC_FLAGS="$JAVAC_FLAGS -g"
29445      ;;
29446    slowdebug )
29447      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS"
29448      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS"
29449      C_O_FLAG_HI="$C_O_FLAG_NONE"
29450      C_O_FLAG_NORM="$C_O_FLAG_NONE"
29451      CXX_O_FLAG_HI="$CXX_O_FLAG_NONE"
29452      CXX_O_FLAG_NORM="$CXX_O_FLAG_NONE"
29453      JAVAC_FLAGS="$JAVAC_FLAGS -g"
29454      ;;
29455  esac
29456
29457  CCXXFLAGS_JDK="$CCXXFLAGS_JDK $ADD_LP64"
29458
29459  # The package path is used only on macosx?
29460  PACKAGE_PATH=/opt/local
29461
29462
29463  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
29464    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
29465    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
29466    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
29467    #   Note: -Dmacro         is the same as    #define macro 1
29468    #         -Dmacro=        is the same as    #define macro
29469    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29470      CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
29471    else
29472      CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
29473    fi
29474  else
29475    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_BIG_ENDIAN"
29476  fi
29477  if test "x$OPENJDK_TARGET_OS" = xlinux; then
29478    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DLINUX"
29479  fi
29480  if test "x$OPENJDK_TARGET_OS" = xwindows; then
29481    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DWINDOWS"
29482  fi
29483  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29484    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DSOLARIS"
29485  fi
29486  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29487    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMACOSX -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
29488    # Setting these parameters makes it an error to link to macosx APIs that are
29489    # newer than the given OS version and makes the linked binaries compatible even
29490    # if built on a newer version of the OS.
29491    # The expected format is X.Y.Z
29492    MACOSX_VERSION_MIN=10.7.0
29493
29494    # The macro takes the version with no dots, ex: 1070
29495    # Let the flags variables get resolved in make for easier override on make
29496    # command line.
29497    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
29498    LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
29499  fi
29500  if test "x$OPENJDK_TARGET_OS" = xbsd; then
29501    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DBSD -D_ALLBSD_SOURCE"
29502  fi
29503  if test "x$DEBUG_LEVEL" = xrelease; then
29504    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DNDEBUG"
29505  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29506    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DTRIMMED"
29507  fi
29508  else
29509    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DDEBUG"
29510  fi
29511
29512  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
29513  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DRELEASE='\"$RELEASE\"'"
29514
29515  CCXXFLAGS_JDK="$CCXXFLAGS_JDK \
29516      -I${JDK_OUTPUTDIR}/include \
29517      -I${JDK_OUTPUTDIR}/include/$OPENJDK_TARGET_OS \
29518      -I${JDK_TOPDIR}/src/share/javavm/export \
29519      -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/javavm/export \
29520      -I${JDK_TOPDIR}/src/share/native/common \
29521      -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/native/common"
29522
29523  # The shared libraries are compiled using the picflag.
29524  CFLAGS_JDKLIB="$CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
29525  CXXFLAGS_JDKLIB="$CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA "
29526
29527  # Executable flags
29528  CFLAGS_JDKEXE="$CCXXFLAGS_JDK $CFLAGS_JDK"
29529  CXXFLAGS_JDKEXE="$CCXXFLAGS_JDK $CXXFLAGS_JDK"
29530
29531  # Now this is odd. The JDK native libraries have to link against libjvm.so
29532  # On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
29533  # Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
29534  # is identical for client and server? Yes. Which is picked at runtime (client or server)?
29535  # Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
29536  # libraries will link to whatever is in memory. Yuck.
29537  #
29538  # Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
29539  if test "x$COMPILER_NAME" = xcl; then
29540    LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
29541    if test "x$OPENJDK_TARGET_CPU" = xx86; then
29542      LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
29543    fi
29544    # TODO: make -debug optional "--disable-full-debug-symbols"
29545    LDFLAGS_JDK="$LDFLAGS_JDK -debug"
29546    LDFLAGS_JDKLIB="${LDFLAGS_JDK} -dll -libpath:${JDK_OUTPUTDIR}/lib"
29547    LDFLAGS_JDKLIB_SUFFIX=""
29548    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
29549      LDFLAGS_STACK_SIZE=1048576
29550    else
29551      LDFLAGS_STACK_SIZE=327680
29552    fi
29553    LDFLAGS_JDKEXE="${LDFLAGS_JDK} /STACK:$LDFLAGS_STACK_SIZE"
29554  else
29555    if test "x$COMPILER_NAME" = xgcc; then
29556      # If this is a --hash-style=gnu system, use --hash-style=both, why?
29557      HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
29558      if test -n "$HAS_GNU_HASH"; then
29559        LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both "
29560      fi
29561      if test "x$OPENJDK_TARGET_OS" = xlinux; then
29562        # And since we now know that the linker is gnu, then add -z defs, to forbid
29563        # undefined symbols in object files.
29564        LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs"
29565        if test "x$DEBUG_LEVEL" = "xrelease"; then
29566          # When building release libraries, tell the linker optimize them.
29567          # Should this be supplied to the OSS linker as well?
29568          LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
29569        fi
29570      fi
29571    fi
29572    LDFLAGS_JDKLIB="${LDFLAGS_JDK} $SHARED_LIBRARY_FLAGS \
29573        -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}"
29574
29575    # On some platforms (mac) the linker warns about non existing -L dirs.
29576    # Add server first if available. Linking aginst client does not always produce the same results.
29577    # Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
29578    # Default to server for other variants.
29579    if test "x$JVM_VARIANT_SERVER" = xtrue; then
29580      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
29581    elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
29582      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/client"
29583    elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
29584      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
29585    else
29586      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
29587    fi
29588
29589    LDFLAGS_JDKLIB_SUFFIX="-ljava -ljvm"
29590    if test "x$COMPILER_NAME" = xossc; then
29591      LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc"
29592    fi
29593
29594    LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
29595    if test "x$OPENJDK_TARGET_OS" = xlinux; then
29596      LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
29597    fi
29598  fi
29599
29600
29601
29602
29603
29604
29605
29606
29607
29608
29609
29610
29611
29612
29613
29614  # Some Zero and Shark settings.
29615  # ZERO_ARCHFLAG tells the compiler which mode to build for
29616  case "${OPENJDK_TARGET_CPU}" in
29617    s390)
29618      ZERO_ARCHFLAG="-m31"
29619      ;;
29620    *)
29621      ZERO_ARCHFLAG="-m${OPENJDK_TARGET_CPU_BITS}"
29622  esac
29623
29624  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$ZERO_ARCHFLAG\"" >&5
29625$as_echo_n "checking if compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
29626  supports=yes
29627
29628  saved_cflags="$CFLAGS"
29629  CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
29630  ac_ext=c
29631ac_cpp='$CPP $CPPFLAGS'
29632ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29633ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29634ac_compiler_gnu=$ac_cv_c_compiler_gnu
29635
29636  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29637/* end confdefs.h.  */
29638int i;
29639_ACEOF
29640if ac_fn_c_try_compile "$LINENO"; then :
29641
29642else
29643  supports=no
29644fi
29645rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29646  ac_ext=cpp
29647ac_cpp='$CXXCPP $CPPFLAGS'
29648ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29649ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29650ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29651
29652  CFLAGS="$saved_cflags"
29653
29654  saved_cxxflags="$CXXFLAGS"
29655  CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
29656  ac_ext=cpp
29657ac_cpp='$CXXCPP $CPPFLAGS'
29658ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29659ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29660ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29661
29662  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29663/* end confdefs.h.  */
29664int i;
29665_ACEOF
29666if ac_fn_cxx_try_compile "$LINENO"; then :
29667
29668else
29669  supports=no
29670fi
29671rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29672  ac_ext=cpp
29673ac_cpp='$CXXCPP $CPPFLAGS'
29674ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29675ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29676ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29677
29678  CXXFLAGS="$saved_cxxflags"
29679
29680  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
29681$as_echo "$supports" >&6; }
29682  if test "x$supports" = "xyes" ; then
29683    :
29684  else
29685    ZERO_ARCHFLAG=""
29686  fi
29687
29688
29689
29690  # Check that the compiler supports -mX flags
29691  # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
29692
29693  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"-m${OPENJDK_TARGET_CPU_BITS}\"" >&5
29694$as_echo_n "checking if compiler supports \"-m${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
29695  supports=yes
29696
29697  saved_cflags="$CFLAGS"
29698  CFLAGS="$CFLAGS -m${OPENJDK_TARGET_CPU_BITS}"
29699  ac_ext=c
29700ac_cpp='$CPP $CPPFLAGS'
29701ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29702ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29703ac_compiler_gnu=$ac_cv_c_compiler_gnu
29704
29705  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29706/* end confdefs.h.  */
29707int i;
29708_ACEOF
29709if ac_fn_c_try_compile "$LINENO"; then :
29710
29711else
29712  supports=no
29713fi
29714rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29715  ac_ext=cpp
29716ac_cpp='$CXXCPP $CPPFLAGS'
29717ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29718ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29719ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29720
29721  CFLAGS="$saved_cflags"
29722
29723  saved_cxxflags="$CXXFLAGS"
29724  CXXFLAGS="$CXXFLAG -m${OPENJDK_TARGET_CPU_BITS}"
29725  ac_ext=cpp
29726ac_cpp='$CXXCPP $CPPFLAGS'
29727ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29728ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29729ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29730
29731  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29732/* end confdefs.h.  */
29733int i;
29734_ACEOF
29735if ac_fn_cxx_try_compile "$LINENO"; then :
29736
29737else
29738  supports=no
29739fi
29740rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29741  ac_ext=cpp
29742ac_cpp='$CXXCPP $CPPFLAGS'
29743ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29744ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29745ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29746
29747  CXXFLAGS="$saved_cxxflags"
29748
29749  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
29750$as_echo "$supports" >&6; }
29751  if test "x$supports" = "xyes" ; then
29752    COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
29753  else
29754    COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
29755  fi
29756
29757
29758
29759
29760# Setup debug symbols (need objcopy from the toolchain for that)
29761
29762  #
29763  # ENABLE_DEBUG_SYMBOLS
29764  # This must be done after the toolchain is setup, since we're looking at objcopy.
29765  #
29766  # Check whether --enable-debug-symbols was given.
29767if test "${enable_debug_symbols+set}" = set; then :
29768  enableval=$enable_debug_symbols;
29769fi
29770
29771
29772  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should generate debug symbols" >&5
29773$as_echo_n "checking if we should generate debug symbols... " >&6; }
29774
29775  if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then
29776    # explicit enabling of enable-debug-symbols and can't find objcopy
29777    #   this is an error
29778    as_fn_error $? "Unable to find objcopy, cannot enable debug-symbols" "$LINENO" 5
29779  fi
29780
29781  if test "x$enable_debug_symbols" = "xyes"; then
29782    ENABLE_DEBUG_SYMBOLS=true
29783  elif test "x$enable_debug_symbols" = "xno"; then
29784    ENABLE_DEBUG_SYMBOLS=false
29785  else
29786    # default on macosx is false
29787    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29788      ENABLE_DEBUG_SYMBOLS=false
29789      # Default is on if objcopy is found, otherwise off
29790    elif test "x$OBJCOPY" != x || test "x$OPENJDK_TARGET_OS" = xwindows; then
29791      ENABLE_DEBUG_SYMBOLS=true
29792    else
29793      ENABLE_DEBUG_SYMBOLS=false
29794    fi
29795  fi
29796
29797  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_DEBUG_SYMBOLS" >&5
29798$as_echo "$ENABLE_DEBUG_SYMBOLS" >&6; }
29799
29800  #
29801  # ZIP_DEBUGINFO_FILES
29802  #
29803  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should zip debug-info files" >&5
29804$as_echo_n "checking if we should zip debug-info files... " >&6; }
29805  # Check whether --enable-zip-debug-info was given.
29806if test "${enable_zip_debug_info+set}" = set; then :
29807  enableval=$enable_zip_debug_info; enable_zip_debug_info="${enableval}"
29808else
29809  enable_zip_debug_info="yes"
29810fi
29811
29812  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_zip_debug_info}" >&5
29813$as_echo "${enable_zip_debug_info}" >&6; }
29814
29815  if test "x${enable_zip_debug_info}" = "xno"; then
29816    ZIP_DEBUGINFO_FILES=false
29817  else
29818    ZIP_DEBUGINFO_FILES=true
29819  fi
29820
29821
29822
29823
29824
29825
29826
29827###############################################################################
29828#
29829# Check dependencies for external and internal libraries.
29830#
29831###############################################################################
29832
29833
29834
29835  ###############################################################################
29836  #
29837  # OS specific settings that we never will need to probe.
29838  #
29839  if test "x$OPENJDK_TARGET_OS" = xlinux; then
29840    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Linux?" >&5
29841$as_echo_n "checking what is not needed on Linux?... " >&6; }
29842    PULSE_NOT_NEEDED=yes
29843    { $as_echo "$as_me:${as_lineno-$LINENO}: result: pulse" >&5
29844$as_echo "pulse" >&6; }
29845  fi
29846
29847  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29848    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Solaris?" >&5
29849$as_echo_n "checking what is not needed on Solaris?... " >&6; }
29850    ALSA_NOT_NEEDED=yes
29851    PULSE_NOT_NEEDED=yes
29852    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
29853$as_echo "alsa pulse" >&6; }
29854  fi
29855
29856  if test "x$OPENJDK_TARGET_OS" = xwindows; then
29857    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Windows?" >&5
29858$as_echo_n "checking what is not needed on Windows?... " >&6; }
29859    CUPS_NOT_NEEDED=yes
29860    ALSA_NOT_NEEDED=yes
29861    PULSE_NOT_NEEDED=yes
29862    X11_NOT_NEEDED=yes
29863    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa cups pulse x11" >&5
29864$as_echo "alsa cups pulse x11" >&6; }
29865  fi
29866
29867  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29868    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on MacOSX?" >&5
29869$as_echo_n "checking what is not needed on MacOSX?... " >&6; }
29870    ALSA_NOT_NEEDED=yes
29871    PULSE_NOT_NEEDED=yes
29872    X11_NOT_NEEDED=yes
29873    FREETYPE2_NOT_NEEDED=yes
29874    # If the java runtime framework is disabled, then we need X11.
29875    # This will be adjusted below.
29876    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse x11" >&5
29877$as_echo "alsa pulse x11" >&6; }
29878  fi
29879
29880  if test "x$OPENJDK_TARGET_OS" = xbsd; then
29881    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on bsd?" >&5
29882$as_echo_n "checking what is not needed on bsd?... " >&6; }
29883    ALSA_NOT_NEEDED=yes
29884    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa" >&5
29885$as_echo "alsa" >&6; }
29886  fi
29887
29888  if test "x$OPENJDK" = "xfalse"; then
29889    FREETYPE2_NOT_NEEDED=yes
29890  fi
29891
29892  if test "x$SUPPORT_HEADFUL" = xno; then
29893    X11_NOT_NEEDED=yes
29894  fi
29895
29896  ###############################################################################
29897  #
29898  # Check for MacOSX support for OpenJDK. If this exists, try to build a JVM
29899  # that uses this API.
29900  #
29901  # Check whether --enable-macosx-runtime-support was given.
29902if test "${enable_macosx_runtime_support+set}" = set; then :
29903  enableval=$enable_macosx_runtime_support; MACOSX_RUNTIME_SUPPORT="${enableval}"
29904else
29905  MACOSX_RUNTIME_SUPPORT="no"
29906fi
29907
29908
29909  USE_MACOSX_RUNTIME_SUPPORT=no
29910  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for explicit Java runtime support in the OS" >&5
29911$as_echo_n "checking for explicit Java runtime support in the OS... " >&6; }
29912  if test -f /System/Library/Frameworks/JavaVM.framework/Frameworks/JavaRuntimeSupport.framework/Headers/JavaRuntimeSupport.h; then
29913    if test "x$MACOSX_RUNTIME_SUPPORT" != xno; then
29914      MACOSX_RUNTIME_SUPPORT=yes
29915      USE_MACOSX_RUNTIME_SUPPORT=yes
29916      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, does not need alsa freetype2 pulse and X11" >&5
29917$as_echo "yes, does not need alsa freetype2 pulse and X11" >&6; }
29918    else
29919      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, but explicitly disabled." >&5
29920$as_echo "yes, but explicitly disabled." >&6; }
29921    fi
29922  else
29923    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29924$as_echo "no" >&6; }
29925  fi
29926
29927  if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$USE_MACOSX_RUNTIME_SUPPORT" = xno; then
29928    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on an X11 build on MacOSX?" >&5
29929$as_echo_n "checking what is not needed on an X11 build on MacOSX?... " >&6; }
29930    X11_NOT_NEEDED=
29931    FREETYPE2_NOT_NEEDED=
29932    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
29933$as_echo "alsa pulse" >&6; }
29934  fi
29935
29936
29937
29938  ###############################################################################
29939  #
29940  # Check for X Windows
29941  #
29942
29943  # Check if the user has specified sysroot, but not --x-includes or --x-libraries.
29944  # Make a simple check for the libraries at the sysroot, and setup --x-includes and
29945  # --x-libraries for the sysroot, if that seems to be correct.
29946  if test "x$SYS_ROOT" != "x/"; then
29947    if test "x$x_includes" = xNONE; then
29948      if test -f "$SYS_ROOT/usr/X11R6/include/X11/Xlib.h"; then
29949        x_includes="$SYS_ROOT/usr/X11R6/include"
29950      elif test -f "$SYS_ROOT/usr/include/X11/Xlib.h"; then
29951        x_includes="$SYS_ROOT/usr/include"
29952      fi
29953    fi
29954    if test "x$x_libraries" = xNONE; then
29955      if test -f "$SYS_ROOT/usr/X11R6/lib/libX11.so"; then
29956        x_libraries="$SYS_ROOT/usr/X11R6/lib"
29957      elif test "$SYS_ROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
29958        x_libraries="$SYS_ROOT/usr/lib64"
29959      elif test -f "$SYS_ROOT/usr/lib/libX11.so"; then
29960        x_libraries="$SYS_ROOT/usr/lib"
29961      fi
29962    fi
29963  fi
29964
29965  # Now let autoconf do it's magic
29966  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
29967$as_echo_n "checking for X... " >&6; }
29968
29969
29970# Check whether --with-x was given.
29971if test "${with_x+set}" = set; then :
29972  withval=$with_x;
29973fi
29974
29975# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
29976if test "x$with_x" = xno; then
29977  # The user explicitly disabled X.
29978  have_x=disabled
29979else
29980  case $x_includes,$x_libraries in #(
29981    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
29982    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
29983  $as_echo_n "(cached) " >&6
29984else
29985  # One or both of the vars are not set, and there is no cached value.
29986ac_x_includes=no ac_x_libraries=no
29987rm -f -r conftest.dir
29988if mkdir conftest.dir; then
29989  cd conftest.dir
29990  cat >Imakefile <<'_ACEOF'
29991incroot:
29992	@echo incroot='${INCROOT}'
29993usrlibdir:
29994	@echo usrlibdir='${USRLIBDIR}'
29995libdir:
29996	@echo libdir='${LIBDIR}'
29997_ACEOF
29998  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
29999    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
30000    for ac_var in incroot usrlibdir libdir; do
30001      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
30002    done
30003    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
30004    for ac_extension in a so sl dylib la dll; do
30005      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
30006	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
30007	ac_im_usrlibdir=$ac_im_libdir; break
30008      fi
30009    done
30010    # Screen out bogus values from the imake configuration.  They are
30011    # bogus both because they are the default anyway, and because
30012    # using them would break gcc on systems where it needs fixed includes.
30013    case $ac_im_incroot in
30014	/usr/include) ac_x_includes= ;;
30015	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
30016    esac
30017    case $ac_im_usrlibdir in
30018	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
30019	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
30020    esac
30021  fi
30022  cd ..
30023  rm -f -r conftest.dir
30024fi
30025
30026# Standard set of common directories for X headers.
30027# Check X11 before X11Rn because it is often a symlink to the current release.
30028ac_x_header_dirs='
30029/usr/X11/include
30030/usr/X11R7/include
30031/usr/X11R6/include
30032/usr/X11R5/include
30033/usr/X11R4/include
30034
30035/usr/include/X11
30036/usr/include/X11R7
30037/usr/include/X11R6
30038/usr/include/X11R5
30039/usr/include/X11R4
30040
30041/usr/local/X11/include
30042/usr/local/X11R7/include
30043/usr/local/X11R6/include
30044/usr/local/X11R5/include
30045/usr/local/X11R4/include
30046
30047/usr/local/include/X11
30048/usr/local/include/X11R7
30049/usr/local/include/X11R6
30050/usr/local/include/X11R5
30051/usr/local/include/X11R4
30052
30053/usr/X386/include
30054/usr/x386/include
30055/usr/XFree86/include/X11
30056
30057/usr/include
30058/usr/local/include
30059/usr/unsupported/include
30060/usr/athena/include
30061/usr/local/x11r5/include
30062/usr/lpp/Xamples/include
30063
30064/usr/openwin/include
30065/usr/openwin/share/include'
30066
30067if test "$ac_x_includes" = no; then
30068  # Guess where to find include files, by looking for Xlib.h.
30069  # First, try using that file with no special directory specified.
30070  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30071/* end confdefs.h.  */
30072#include <X11/Xlib.h>
30073_ACEOF
30074if ac_fn_cxx_try_cpp "$LINENO"; then :
30075  # We can compile using X headers with no special include directory.
30076ac_x_includes=
30077else
30078  for ac_dir in $ac_x_header_dirs; do
30079  if test -r "$ac_dir/X11/Xlib.h"; then
30080    ac_x_includes=$ac_dir
30081    break
30082  fi
30083done
30084fi
30085rm -f conftest.err conftest.i conftest.$ac_ext
30086fi # $ac_x_includes = no
30087
30088if test "$ac_x_libraries" = no; then
30089  # Check for the libraries.
30090  # See if we find them without any special options.
30091  # Don't add to $LIBS permanently.
30092  ac_save_LIBS=$LIBS
30093  LIBS="-lX11 $LIBS"
30094  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30095/* end confdefs.h.  */
30096#include <X11/Xlib.h>
30097int
30098main ()
30099{
30100XrmInitialize ()
30101  ;
30102  return 0;
30103}
30104_ACEOF
30105if ac_fn_cxx_try_link "$LINENO"; then :
30106  LIBS=$ac_save_LIBS
30107# We can link X programs with no special library path.
30108ac_x_libraries=
30109else
30110  LIBS=$ac_save_LIBS
30111for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
30112do
30113  # Don't even attempt the hair of trying to link an X program!
30114  for ac_extension in a so sl dylib la dll; do
30115    if test -r "$ac_dir/libX11.$ac_extension"; then
30116      ac_x_libraries=$ac_dir
30117      break 2
30118    fi
30119  done
30120done
30121fi
30122rm -f core conftest.err conftest.$ac_objext \
30123    conftest$ac_exeext conftest.$ac_ext
30124fi # $ac_x_libraries = no
30125
30126case $ac_x_includes,$ac_x_libraries in #(
30127  no,* | *,no | *\'*)
30128    # Didn't find X, or a directory has "'" in its name.
30129    ac_cv_have_x="have_x=no";; #(
30130  *)
30131    # Record where we found X for the cache.
30132    ac_cv_have_x="have_x=yes\
30133	ac_x_includes='$ac_x_includes'\
30134	ac_x_libraries='$ac_x_libraries'"
30135esac
30136fi
30137;; #(
30138    *) have_x=yes;;
30139  esac
30140  eval "$ac_cv_have_x"
30141fi # $with_x != no
30142
30143if test "$have_x" != yes; then
30144  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
30145$as_echo "$have_x" >&6; }
30146  no_x=yes
30147else
30148  # If each of the values was on the command line, it overrides each guess.
30149  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
30150  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
30151  # Update the cache value to reflect the command line values.
30152  ac_cv_have_x="have_x=yes\
30153	ac_x_includes='$x_includes'\
30154	ac_x_libraries='$x_libraries'"
30155  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
30156$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
30157fi
30158
30159  if test "$no_x" = yes; then
30160  # Not all programs may use this symbol, but it does not hurt to define it.
30161
30162$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
30163
30164  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
30165else
30166  if test -n "$x_includes"; then
30167    X_CFLAGS="$X_CFLAGS -I$x_includes"
30168  fi
30169
30170  # It would also be nice to do this for all -L options, not just this one.
30171  if test -n "$x_libraries"; then
30172    X_LIBS="$X_LIBS -L$x_libraries"
30173    # For Solaris; some versions of Sun CC require a space after -R and
30174    # others require no space.  Words are not sufficient . . . .
30175    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
30176$as_echo_n "checking whether -R must be followed by a space... " >&6; }
30177    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
30178    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
30179    ac_cxx_werror_flag=yes
30180    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30181/* end confdefs.h.  */
30182
30183int
30184main ()
30185{
30186
30187  ;
30188  return 0;
30189}
30190_ACEOF
30191if ac_fn_cxx_try_link "$LINENO"; then :
30192  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30193$as_echo "no" >&6; }
30194       X_LIBS="$X_LIBS -R$x_libraries"
30195else
30196  LIBS="$ac_xsave_LIBS -R $x_libraries"
30197       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30198/* end confdefs.h.  */
30199
30200int
30201main ()
30202{
30203
30204  ;
30205  return 0;
30206}
30207_ACEOF
30208if ac_fn_cxx_try_link "$LINENO"; then :
30209  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30210$as_echo "yes" >&6; }
30211	  X_LIBS="$X_LIBS -R $x_libraries"
30212else
30213  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
30214$as_echo "neither works" >&6; }
30215fi
30216rm -f core conftest.err conftest.$ac_objext \
30217    conftest$ac_exeext conftest.$ac_ext
30218fi
30219rm -f core conftest.err conftest.$ac_objext \
30220    conftest$ac_exeext conftest.$ac_ext
30221    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
30222    LIBS=$ac_xsave_LIBS
30223  fi
30224
30225  # Check for system-dependent libraries X programs must link with.
30226  # Do this before checking for the system-independent R6 libraries
30227  # (-lICE), since we may need -lsocket or whatever for X linking.
30228
30229  if test "$ISC" = yes; then
30230    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
30231  else
30232    # Martyn Johnson says this is needed for Ultrix, if the X
30233    # libraries were built with DECnet support.  And Karl Berry says
30234    # the Alpha needs dnet_stub (dnet does not exist).
30235    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
30236    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30237/* end confdefs.h.  */
30238
30239/* Override any GCC internal prototype to avoid an error.
30240   Use char because int might match the return type of a GCC
30241   builtin and then its argument prototype would still apply.  */
30242#ifdef __cplusplus
30243extern "C"
30244#endif
30245char XOpenDisplay ();
30246int
30247main ()
30248{
30249return XOpenDisplay ();
30250  ;
30251  return 0;
30252}
30253_ACEOF
30254if ac_fn_cxx_try_link "$LINENO"; then :
30255
30256else
30257  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
30258$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
30259if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
30260  $as_echo_n "(cached) " >&6
30261else
30262  ac_check_lib_save_LIBS=$LIBS
30263LIBS="-ldnet  $LIBS"
30264cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30265/* end confdefs.h.  */
30266
30267/* Override any GCC internal prototype to avoid an error.
30268   Use char because int might match the return type of a GCC
30269   builtin and then its argument prototype would still apply.  */
30270#ifdef __cplusplus
30271extern "C"
30272#endif
30273char dnet_ntoa ();
30274int
30275main ()
30276{
30277return dnet_ntoa ();
30278  ;
30279  return 0;
30280}
30281_ACEOF
30282if ac_fn_cxx_try_link "$LINENO"; then :
30283  ac_cv_lib_dnet_dnet_ntoa=yes
30284else
30285  ac_cv_lib_dnet_dnet_ntoa=no
30286fi
30287rm -f core conftest.err conftest.$ac_objext \
30288    conftest$ac_exeext conftest.$ac_ext
30289LIBS=$ac_check_lib_save_LIBS
30290fi
30291{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
30292$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
30293if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
30294  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
30295fi
30296
30297    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
30298      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
30299$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
30300if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
30301  $as_echo_n "(cached) " >&6
30302else
30303  ac_check_lib_save_LIBS=$LIBS
30304LIBS="-ldnet_stub  $LIBS"
30305cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30306/* end confdefs.h.  */
30307
30308/* Override any GCC internal prototype to avoid an error.
30309   Use char because int might match the return type of a GCC
30310   builtin and then its argument prototype would still apply.  */
30311#ifdef __cplusplus
30312extern "C"
30313#endif
30314char dnet_ntoa ();
30315int
30316main ()
30317{
30318return dnet_ntoa ();
30319  ;
30320  return 0;
30321}
30322_ACEOF
30323if ac_fn_cxx_try_link "$LINENO"; then :
30324  ac_cv_lib_dnet_stub_dnet_ntoa=yes
30325else
30326  ac_cv_lib_dnet_stub_dnet_ntoa=no
30327fi
30328rm -f core conftest.err conftest.$ac_objext \
30329    conftest$ac_exeext conftest.$ac_ext
30330LIBS=$ac_check_lib_save_LIBS
30331fi
30332{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
30333$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
30334if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
30335  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
30336fi
30337
30338    fi
30339fi
30340rm -f core conftest.err conftest.$ac_objext \
30341    conftest$ac_exeext conftest.$ac_ext
30342    LIBS="$ac_xsave_LIBS"
30343
30344    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
30345    # to get the SysV transport functions.
30346    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
30347    # needs -lnsl.
30348    # The nsl library prevents programs from opening the X display
30349    # on Irix 5.2, according to T.E. Dickey.
30350    # The functions gethostbyname, getservbyname, and inet_addr are
30351    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
30352    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
30353if test "x$ac_cv_func_gethostbyname" = xyes; then :
30354
30355fi
30356
30357    if test $ac_cv_func_gethostbyname = no; then
30358      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
30359$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
30360if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
30361  $as_echo_n "(cached) " >&6
30362else
30363  ac_check_lib_save_LIBS=$LIBS
30364LIBS="-lnsl  $LIBS"
30365cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30366/* end confdefs.h.  */
30367
30368/* Override any GCC internal prototype to avoid an error.
30369   Use char because int might match the return type of a GCC
30370   builtin and then its argument prototype would still apply.  */
30371#ifdef __cplusplus
30372extern "C"
30373#endif
30374char gethostbyname ();
30375int
30376main ()
30377{
30378return gethostbyname ();
30379  ;
30380  return 0;
30381}
30382_ACEOF
30383if ac_fn_cxx_try_link "$LINENO"; then :
30384  ac_cv_lib_nsl_gethostbyname=yes
30385else
30386  ac_cv_lib_nsl_gethostbyname=no
30387fi
30388rm -f core conftest.err conftest.$ac_objext \
30389    conftest$ac_exeext conftest.$ac_ext
30390LIBS=$ac_check_lib_save_LIBS
30391fi
30392{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
30393$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
30394if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
30395  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
30396fi
30397
30398      if test $ac_cv_lib_nsl_gethostbyname = no; then
30399	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
30400$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
30401if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
30402  $as_echo_n "(cached) " >&6
30403else
30404  ac_check_lib_save_LIBS=$LIBS
30405LIBS="-lbsd  $LIBS"
30406cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30407/* end confdefs.h.  */
30408
30409/* Override any GCC internal prototype to avoid an error.
30410   Use char because int might match the return type of a GCC
30411   builtin and then its argument prototype would still apply.  */
30412#ifdef __cplusplus
30413extern "C"
30414#endif
30415char gethostbyname ();
30416int
30417main ()
30418{
30419return gethostbyname ();
30420  ;
30421  return 0;
30422}
30423_ACEOF
30424if ac_fn_cxx_try_link "$LINENO"; then :
30425  ac_cv_lib_bsd_gethostbyname=yes
30426else
30427  ac_cv_lib_bsd_gethostbyname=no
30428fi
30429rm -f core conftest.err conftest.$ac_objext \
30430    conftest$ac_exeext conftest.$ac_ext
30431LIBS=$ac_check_lib_save_LIBS
30432fi
30433{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
30434$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
30435if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
30436  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
30437fi
30438
30439      fi
30440    fi
30441
30442    # lieder@skyler.mavd.honeywell.com says without -lsocket,
30443    # socket/setsockopt and other routines are undefined under SCO ODT
30444    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
30445    # on later versions), says Simon Leinen: it contains gethostby*
30446    # variants that don't use the name server (or something).  -lsocket
30447    # must be given before -lnsl if both are needed.  We assume that
30448    # if connect needs -lnsl, so does gethostbyname.
30449    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
30450if test "x$ac_cv_func_connect" = xyes; then :
30451
30452fi
30453
30454    if test $ac_cv_func_connect = no; then
30455      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
30456$as_echo_n "checking for connect in -lsocket... " >&6; }
30457if ${ac_cv_lib_socket_connect+:} false; then :
30458  $as_echo_n "(cached) " >&6
30459else
30460  ac_check_lib_save_LIBS=$LIBS
30461LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
30462cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30463/* end confdefs.h.  */
30464
30465/* Override any GCC internal prototype to avoid an error.
30466   Use char because int might match the return type of a GCC
30467   builtin and then its argument prototype would still apply.  */
30468#ifdef __cplusplus
30469extern "C"
30470#endif
30471char connect ();
30472int
30473main ()
30474{
30475return connect ();
30476  ;
30477  return 0;
30478}
30479_ACEOF
30480if ac_fn_cxx_try_link "$LINENO"; then :
30481  ac_cv_lib_socket_connect=yes
30482else
30483  ac_cv_lib_socket_connect=no
30484fi
30485rm -f core conftest.err conftest.$ac_objext \
30486    conftest$ac_exeext conftest.$ac_ext
30487LIBS=$ac_check_lib_save_LIBS
30488fi
30489{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
30490$as_echo "$ac_cv_lib_socket_connect" >&6; }
30491if test "x$ac_cv_lib_socket_connect" = xyes; then :
30492  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
30493fi
30494
30495    fi
30496
30497    # Guillermo Gomez says -lposix is necessary on A/UX.
30498    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
30499if test "x$ac_cv_func_remove" = xyes; then :
30500
30501fi
30502
30503    if test $ac_cv_func_remove = no; then
30504      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
30505$as_echo_n "checking for remove in -lposix... " >&6; }
30506if ${ac_cv_lib_posix_remove+:} false; then :
30507  $as_echo_n "(cached) " >&6
30508else
30509  ac_check_lib_save_LIBS=$LIBS
30510LIBS="-lposix  $LIBS"
30511cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30512/* end confdefs.h.  */
30513
30514/* Override any GCC internal prototype to avoid an error.
30515   Use char because int might match the return type of a GCC
30516   builtin and then its argument prototype would still apply.  */
30517#ifdef __cplusplus
30518extern "C"
30519#endif
30520char remove ();
30521int
30522main ()
30523{
30524return remove ();
30525  ;
30526  return 0;
30527}
30528_ACEOF
30529if ac_fn_cxx_try_link "$LINENO"; then :
30530  ac_cv_lib_posix_remove=yes
30531else
30532  ac_cv_lib_posix_remove=no
30533fi
30534rm -f core conftest.err conftest.$ac_objext \
30535    conftest$ac_exeext conftest.$ac_ext
30536LIBS=$ac_check_lib_save_LIBS
30537fi
30538{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
30539$as_echo "$ac_cv_lib_posix_remove" >&6; }
30540if test "x$ac_cv_lib_posix_remove" = xyes; then :
30541  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
30542fi
30543
30544    fi
30545
30546    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
30547    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
30548if test "x$ac_cv_func_shmat" = xyes; then :
30549
30550fi
30551
30552    if test $ac_cv_func_shmat = no; then
30553      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
30554$as_echo_n "checking for shmat in -lipc... " >&6; }
30555if ${ac_cv_lib_ipc_shmat+:} false; then :
30556  $as_echo_n "(cached) " >&6
30557else
30558  ac_check_lib_save_LIBS=$LIBS
30559LIBS="-lipc  $LIBS"
30560cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30561/* end confdefs.h.  */
30562
30563/* Override any GCC internal prototype to avoid an error.
30564   Use char because int might match the return type of a GCC
30565   builtin and then its argument prototype would still apply.  */
30566#ifdef __cplusplus
30567extern "C"
30568#endif
30569char shmat ();
30570int
30571main ()
30572{
30573return shmat ();
30574  ;
30575  return 0;
30576}
30577_ACEOF
30578if ac_fn_cxx_try_link "$LINENO"; then :
30579  ac_cv_lib_ipc_shmat=yes
30580else
30581  ac_cv_lib_ipc_shmat=no
30582fi
30583rm -f core conftest.err conftest.$ac_objext \
30584    conftest$ac_exeext conftest.$ac_ext
30585LIBS=$ac_check_lib_save_LIBS
30586fi
30587{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
30588$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
30589if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
30590  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
30591fi
30592
30593    fi
30594  fi
30595
30596  # Check for libraries that X11R6 Xt/Xaw programs need.
30597  ac_save_LDFLAGS=$LDFLAGS
30598  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
30599  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
30600  # check for ICE first), but we must link in the order -lSM -lICE or
30601  # we get undefined symbols.  So assume we have SM if we have ICE.
30602  # These have to be linked with before -lX11, unlike the other
30603  # libraries we check for below, so use a different variable.
30604  # John Interrante, Karl Berry
30605  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
30606$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
30607if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
30608  $as_echo_n "(cached) " >&6
30609else
30610  ac_check_lib_save_LIBS=$LIBS
30611LIBS="-lICE $X_EXTRA_LIBS $LIBS"
30612cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30613/* end confdefs.h.  */
30614
30615/* Override any GCC internal prototype to avoid an error.
30616   Use char because int might match the return type of a GCC
30617   builtin and then its argument prototype would still apply.  */
30618#ifdef __cplusplus
30619extern "C"
30620#endif
30621char IceConnectionNumber ();
30622int
30623main ()
30624{
30625return IceConnectionNumber ();
30626  ;
30627  return 0;
30628}
30629_ACEOF
30630if ac_fn_cxx_try_link "$LINENO"; then :
30631  ac_cv_lib_ICE_IceConnectionNumber=yes
30632else
30633  ac_cv_lib_ICE_IceConnectionNumber=no
30634fi
30635rm -f core conftest.err conftest.$ac_objext \
30636    conftest$ac_exeext conftest.$ac_ext
30637LIBS=$ac_check_lib_save_LIBS
30638fi
30639{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
30640$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
30641if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
30642  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
30643fi
30644
30645  LDFLAGS=$ac_save_LDFLAGS
30646
30647fi
30648
30649
30650  # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
30651  # this doesn't make sense so we remove it.
30652  if test "x$COMPILE_TYPE" = xcross; then
30653    X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
30654  fi
30655
30656  if test "x$no_x" = xyes && test "x$X11_NOT_NEEDED" != xyes; then
30657
30658  # Print a helpful message on how to acquire the necessary build dependency.
30659  # x11 is the help tag: freetyp2, cups, pulse, alsa etc
30660  MISSING_DEPENDENCY=x11
30661  PKGHANDLER_COMMAND=
30662
30663  case $PKGHANDLER in
30664    apt-get)
30665      apt_help     $MISSING_DEPENDENCY ;;
30666    yum)
30667      yum_help     $MISSING_DEPENDENCY ;;
30668    port)
30669      port_help    $MISSING_DEPENDENCY ;;
30670    pkgutil)
30671      pkgutil_help $MISSING_DEPENDENCY ;;
30672    pkgadd)
30673      pkgadd_help  $MISSING_DEPENDENCY ;;
30674    * )
30675      break ;;
30676  esac
30677
30678  if test "x$PKGHANDLER_COMMAND" != x; then
30679    HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30680  fi
30681
30682    as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
30683  fi
30684
30685  # Some of the old makefiles require a setting of OPENWIN_HOME
30686  # Since the X11R6 directory has disappeared on later Linuxes,
30687  # we need to probe for it.
30688  if test "x$OPENJDK_TARGET_OS" = xlinux; then
30689    if test -d "$SYS_ROOT/usr/X11R6"; then
30690      OPENWIN_HOME="$SYS_ROOT/usr/X11R6"
30691    elif test -d "$SYS_ROOT/usr/include/X11"; then
30692      OPENWIN_HOME="$SYS_ROOT/usr"
30693    fi
30694  fi
30695  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
30696    OPENWIN_HOME="/usr/openwin"
30697  fi
30698
30699
30700
30701  #
30702  # Weird Sol10 something check...TODO change to try compile
30703  #
30704  if test "x${OPENJDK_TARGET_OS}" = xsolaris; then
30705    if test "`uname -r`" = "5.10"; then
30706      if test "`${EGREP} -c XLinearGradient ${OPENWIN_HOME}/share/include/X11/extensions/Xrender.h`" = "0"; then
30707        X_CFLAGS="${X_CFLAGS} -DSOLARIS10_NO_XRENDER_STRUCTS"
30708      fi
30709    fi
30710  fi
30711
30712  ac_ext=c
30713ac_cpp='$CPP $CPPFLAGS'
30714ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30715ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30716ac_compiler_gnu=$ac_cv_c_compiler_gnu
30717
30718  OLD_CFLAGS="$CFLAGS"
30719  CFLAGS="$CFLAGS $X_CFLAGS"
30720
30721  # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
30722  for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
30723do :
30724  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
30725ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
30726        # include <X11/Xlib.h>
30727        # include <X11/Xutil.h>
30728
30729
30730"
30731if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
30732  cat >>confdefs.h <<_ACEOF
30733#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
30734_ACEOF
30735 X11_A_OK=yes
30736else
30737  X11_A_OK=no; break
30738fi
30739
30740done
30741
30742
30743  CFLAGS="$OLD_CFLAGS"
30744  ac_ext=cpp
30745ac_cpp='$CXXCPP $CPPFLAGS'
30746ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30747ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30748ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30749
30750
30751  if test "x$X11_A_OK" = xno && test "x$X11_NOT_NEEDED" != xyes; then
30752
30753  # Print a helpful message on how to acquire the necessary build dependency.
30754  # x11 is the help tag: freetyp2, cups, pulse, alsa etc
30755  MISSING_DEPENDENCY=x11
30756  PKGHANDLER_COMMAND=
30757
30758  case $PKGHANDLER in
30759    apt-get)
30760      apt_help     $MISSING_DEPENDENCY ;;
30761    yum)
30762      yum_help     $MISSING_DEPENDENCY ;;
30763    port)
30764      port_help    $MISSING_DEPENDENCY ;;
30765    pkgutil)
30766      pkgutil_help $MISSING_DEPENDENCY ;;
30767    pkgadd)
30768      pkgadd_help  $MISSING_DEPENDENCY ;;
30769    * )
30770      break ;;
30771  esac
30772
30773  if test "x$PKGHANDLER_COMMAND" != x; then
30774    HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30775  fi
30776
30777    as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
30778  fi
30779
30780
30781
30782
30783
30784
30785  ###############################################################################
30786  #
30787  # The common unix printing system cups is used to print from java.
30788  #
30789
30790# Check whether --with-cups was given.
30791if test "${with_cups+set}" = set; then :
30792  withval=$with_cups;
30793fi
30794
30795
30796# Check whether --with-cups-include was given.
30797if test "${with_cups_include+set}" = set; then :
30798  withval=$with_cups_include;
30799fi
30800
30801
30802  if test "x$CUPS_NOT_NEEDED" = xyes; then
30803    if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then
30804      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups is ignored" >&5
30805$as_echo "$as_me: WARNING: cups not used, so --with-cups is ignored" >&2;}
30806    fi
30807    CUPS_CFLAGS=
30808  else
30809    CUPS_FOUND=no
30810
30811    if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
30812      as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
30813    fi
30814
30815    if test "x${with_cups}" != x; then
30816      CUPS_CFLAGS="-I${with_cups}/include"
30817      CUPS_FOUND=yes
30818    fi
30819    if test "x${with_cups_include}" != x; then
30820      CUPS_CFLAGS="-I${with_cups_include}"
30821      CUPS_FOUND=yes
30822    fi
30823    if test "x$CUPS_FOUND" = xno; then
30824
30825
30826  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
30827    # Source the builddeps file again, to make sure it uses the latest variables!
30828    . $builddepsfile
30829    # Look for a target and build machine specific resource!
30830    eval resource=\${builddep_cups_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
30831    if test "x$resource" = x; then
30832      # Ok, lets instead look for a target specific resource
30833      eval resource=\${builddep_cups_TARGET_${rewritten_target_var}}
30834    fi
30835    if test "x$resource" = x; then
30836      # Ok, lets instead look for a build specific resource
30837      eval resource=\${builddep_cups_BUILD_${rewritten_build_var}}
30838    fi
30839    if test "x$resource" = x; then
30840      # Ok, lets instead look for a generic resource
30841      # (The cups comes from M4 and not the shell, thus no need for eval here.)
30842      resource=${builddep_cups}
30843    fi
30844    if test "x$resource" != x; then
30845      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for cups" >&5
30846$as_echo "$as_me: Using builddeps $resource for cups" >&6;}
30847      # If the resource in the builddeps.conf file is an existing directory,
30848      # for example /java/linux/cups
30849      if test -d ${resource}; then
30850        depdir=${resource}
30851      else
30852
30853  # cups is for example mymodule
30854  # $resource is for example libs/general/libmymod_1_2_3.zip
30855  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
30856  # $with_builddeps_dir is for example /localhome/builddeps
30857  # depdir is the name of the variable into which we store the depdir, eg MYMOD
30858  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
30859  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
30860  filename=`basename $resource`
30861  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
30862  filebase=${filename%%.*}
30863  extension=${filename#*.}
30864  installdir=$with_builddeps_dir/$filebase
30865  if test ! -f $installdir/$filename.unpacked; then
30866    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&5
30867$as_echo "$as_me: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&6;}
30868    if test ! -d $installdir; then
30869      mkdir -p $installdir
30870    fi
30871    if test ! -d $installdir; then
30872      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
30873    fi
30874    tmpfile=`mktemp $installdir/cups.XXXXXXXXX`
30875    touch $tmpfile
30876    if test ! -f $tmpfile; then
30877      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
30878    fi
30879
30880  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
30881  # $tmpfile is the local file name for the downloaded file.
30882  VALID_TOOL=no
30883  if test "x$BDEPS_FTP" = xwget; then
30884    VALID_TOOL=yes
30885    wget -O $tmpfile $with_builddeps_server/$resource
30886  fi
30887  if test "x$BDEPS_FTP" = xlftp; then
30888    VALID_TOOL=yes
30889    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
30890  fi
30891  if test "x$BDEPS_FTP" = xftp; then
30892    VALID_TOOL=yes
30893    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
30894    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
30895    FTPUSERPWD=${FTPSERVER%%@*}
30896    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
30897      FTPUSER=${userpwd%%:*}
30898      FTPPWD=${userpwd#*@}
30899      FTPSERVER=${FTPSERVER#*@}
30900    else
30901      FTPUSER=ftp
30902      FTPPWD=ftp
30903    fi
30904    # the "pass" command does not work on some
30905    # ftp clients (read ftp.exe) but if it works,
30906    # passive mode is better!
30907    ( \
30908        echo "user $FTPUSER $FTPPWD"        ; \
30909        echo "pass"                         ; \
30910        echo "bin"                          ; \
30911        echo "get $FTPPATH $tmpfile"              ; \
30912    ) | ftp -in $FTPSERVER
30913  fi
30914  if test "x$VALID_TOOL" != xyes; then
30915    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
30916  fi
30917
30918    mv $tmpfile $installdir/$filename
30919    if test ! -s $installdir/$filename; then
30920      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
30921    fi
30922    case "$extension" in
30923      zip)  echo "Unzipping $installdir/$filename..."
30924        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
30925        ;;
30926      tar.gz) echo "Untaring $installdir/$filename..."
30927        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
30928        ;;
30929      tgz) echo "Untaring $installdir/$filename..."
30930        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
30931        ;;
30932      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
30933        ;;
30934    esac
30935  fi
30936  if test -f $installdir/$filename.unpacked; then
30937    depdir=$installdir
30938  fi
30939
30940      fi
30941      # Source the builddeps file again, because in the previous command, the depdir
30942      # was updated to point at the current build dependency install directory.
30943      . $builddepsfile
30944      # Now extract variables from the builddeps.conf files.
30945      theroot=${builddep_cups_ROOT}
30946      thecflags=${builddep_cups_CFLAGS}
30947      thelibs=${builddep_cups_LIBS}
30948      if test "x$depdir" = x; then
30949        as_fn_error $? "Could not download build dependency cups" "$LINENO" 5
30950      fi
30951      CUPS=$depdir
30952      if test "x$theroot" != x; then
30953        CUPS="$theroot"
30954      fi
30955      if test "x$thecflags" != x; then
30956        CUPS_CFLAGS="$thecflags"
30957      fi
30958      if test "x$thelibs" != x; then
30959        CUPS_LIBS="$thelibs"
30960      fi
30961      CUPS_FOUND=yes
30962
30963    fi
30964
30965  fi
30966
30967    fi
30968    if test "x$CUPS_FOUND" = xno; then
30969      # Are the cups headers installed in the default /usr/include location?
30970      for ac_header in cups/cups.h cups/ppd.h
30971do :
30972  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
30973ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
30974if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
30975  cat >>confdefs.h <<_ACEOF
30976#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
30977_ACEOF
30978
30979            CUPS_FOUND=yes
30980            CUPS_CFLAGS=
30981            DEFAULT_CUPS=yes
30982
30983
30984fi
30985
30986done
30987
30988    fi
30989    if test "x$CUPS_FOUND" = xno; then
30990      # Getting nervous now? Lets poke around for standard Solaris third-party
30991      # package installation locations.
30992      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
30993$as_echo_n "checking for cups headers... " >&6; }
30994      if test -s /opt/sfw/cups/include/cups/cups.h; then
30995        # An SFW package seems to be installed!
30996        CUPS_FOUND=yes
30997        CUPS_CFLAGS="-I/opt/sfw/cups/include"
30998      elif test -s /opt/csw/include/cups/cups.h; then
30999        # A CSW package seems to be installed!
31000        CUPS_FOUND=yes
31001        CUPS_CFLAGS="-I/opt/csw/include"
31002      fi
31003      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
31004$as_echo "$CUPS_FOUND" >&6; }
31005    fi
31006    if test "x$CUPS_FOUND" = xno; then
31007
31008  # Print a helpful message on how to acquire the necessary build dependency.
31009  # cups is the help tag: freetyp2, cups, pulse, alsa etc
31010  MISSING_DEPENDENCY=cups
31011  PKGHANDLER_COMMAND=
31012
31013  case $PKGHANDLER in
31014    apt-get)
31015      apt_help     $MISSING_DEPENDENCY ;;
31016    yum)
31017      yum_help     $MISSING_DEPENDENCY ;;
31018    port)
31019      port_help    $MISSING_DEPENDENCY ;;
31020    pkgutil)
31021      pkgutil_help $MISSING_DEPENDENCY ;;
31022    pkgadd)
31023      pkgadd_help  $MISSING_DEPENDENCY ;;
31024    * )
31025      break ;;
31026  esac
31027
31028  if test "x$PKGHANDLER_COMMAND" != x; then
31029    HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
31030  fi
31031
31032      as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
31033    fi
31034  fi
31035
31036
31037
31038
31039
31040
31041  ###############################################################################
31042  #
31043  # The ubiquitous freetype2 library is used to render fonts.
31044  #
31045
31046# Check whether --with-freetype was given.
31047if test "${with_freetype+set}" = set; then :
31048  withval=$with_freetype;
31049fi
31050
31051
31052  # If we are using the OS installed system lib for freetype, then we do not need to copy it to the build tree
31053  USING_SYSTEM_FT_LIB=false
31054
31055  if test "x$FREETYPE2_NOT_NEEDED" = xyes; then
31056    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
31057      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype is ignored" >&5
31058$as_echo "$as_me: WARNING: freetype not used, so --with-freetype is ignored" >&2;}
31059    fi
31060    FREETYPE2_CFLAGS=
31061    FREETYPE2_LIBS=
31062    FREETYPE2_LIB_PATH=
31063  else
31064    FREETYPE2_FOUND=no
31065
31066    if test "x$with_freetype" != x; then
31067
31068  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31069
31070  # Input might be given as Windows format, start by converting to
31071  # unix format.
31072  path="$with_freetype"
31073  new_path=`$CYGPATH -u "$path"`
31074
31075  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31076  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31077  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31078  # "foo.exe" is OK but "foo" is an error.
31079  #
31080  # This test is therefore slightly more accurate than "test -f" to check for file precense.
31081  # It is also a way to make sure we got the proper file name for the real test later on.
31082  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31083  if test "x$test_shortpath" = x; then
31084    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_freetype, which resolves as \"$path\", is invalid." >&5
31085$as_echo "$as_me: The path of with_freetype, which resolves as \"$path\", is invalid." >&6;}
31086    as_fn_error $? "Cannot locate the the path of with_freetype" "$LINENO" 5
31087  fi
31088
31089  # Call helper function which possibly converts this using DOS-style short mode.
31090  # If so, the updated path is stored in $new_path.
31091
31092  input_path="$new_path"
31093  # Check if we need to convert this using DOS-style short mode. If the path
31094  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31095  # take no chances and rewrite it.
31096  # Note: m4 eats our [], so we need to use [ and ] instead.
31097  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31098  if test "x$has_forbidden_chars" != x; then
31099    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31100    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31101    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31102    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31103      # Going to short mode and back again did indeed matter. Since short mode is
31104      # case insensitive, let's make it lowercase to improve readability.
31105      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31106      # Now convert it back to Unix-stile (cygpath)
31107      input_path=`$CYGPATH -u "$shortmode_path"`
31108      new_path="$input_path"
31109    fi
31110  fi
31111
31112  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31113  if test "x$test_cygdrive_prefix" = x; then
31114    # As a simple fix, exclude /usr/bin since it's not a real path.
31115    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31116      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31117      # a path prefixed by /cygdrive for fixpath to work.
31118      new_path="$CYGWIN_ROOT_PATH$input_path"
31119    fi
31120  fi
31121
31122
31123  if test "x$path" != "x$new_path"; then
31124    with_freetype="$new_path"
31125    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_freetype to \"$new_path\"" >&5
31126$as_echo "$as_me: Rewriting with_freetype to \"$new_path\"" >&6;}
31127  fi
31128
31129  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31130
31131  path="$with_freetype"
31132  has_colon=`$ECHO $path | $GREP ^.:`
31133  new_path="$path"
31134  if test "x$has_colon" = x; then
31135    # Not in mixed or Windows style, start by that.
31136    new_path=`cmd //c echo $path`
31137  fi
31138
31139
31140  input_path="$new_path"
31141  # Check if we need to convert this using DOS-style short mode. If the path
31142  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31143  # take no chances and rewrite it.
31144  # Note: m4 eats our [], so we need to use [ and ] instead.
31145  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31146  if test "x$has_forbidden_chars" != x; then
31147    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31148    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31149  fi
31150
31151
31152  windows_path="$new_path"
31153  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31154    unix_path=`$CYGPATH -u "$windows_path"`
31155    new_path="$unix_path"
31156  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31157    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31158    new_path="$unix_path"
31159  fi
31160
31161  if test "x$path" != "x$new_path"; then
31162    with_freetype="$new_path"
31163    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_freetype to \"$new_path\"" >&5
31164$as_echo "$as_me: Rewriting with_freetype to \"$new_path\"" >&6;}
31165  fi
31166
31167  # Save the first 10 bytes of this path to the storage, so fixpath can work.
31168  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31169
31170  else
31171    # We're on a posix platform. Hooray! :)
31172    path="$with_freetype"
31173    has_space=`$ECHO "$path" | $GREP " "`
31174    if test "x$has_space" != x; then
31175      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_freetype, which resolves as \"$path\", is invalid." >&5
31176$as_echo "$as_me: The path of with_freetype, which resolves as \"$path\", is invalid." >&6;}
31177      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31178    fi
31179
31180    # Use eval to expand a potential ~
31181    eval path="$path"
31182    if test ! -f "$path" && test ! -d "$path"; then
31183      as_fn_error $? "The path of with_freetype, which resolves as \"$path\", is not found." "$LINENO" 5
31184    fi
31185
31186    with_freetype="`cd "$path"; $THEPWDCMD -L`"
31187  fi
31188
31189      FREETYPE2_LIBS="-L$with_freetype/lib -lfreetype"
31190      FREETYPE2_LIB_PATH="$with_freetype/lib"
31191      if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -d "$with_freetype/lib/amd64"; then
31192        FREETYPE2_LIBS="-L$with_freetype/lib/amd64 -lfreetype"
31193        FREETYPE2_LIB_PATH="$with_freetype/lib/amd64"
31194      fi
31195      if test "x$OPENJDK_TARGET_OS" = xwindows; then
31196        FREETYPE2_LIBS="$with_freetype/lib/freetype.lib"
31197      fi
31198      FREETYPE2_CFLAGS="-I$with_freetype/include"
31199      if test -s $with_freetype/include/ft2build.h && test -d $with_freetype/include/freetype2/freetype; then
31200        FREETYPE2_CFLAGS="-I$with_freetype/include/freetype2 -I$with_freetype/include"
31201      fi
31202      FREETYPE2_FOUND=yes
31203      if test "x$FREETYPE2_FOUND" = xyes; then
31204        # Verify that the directories exist
31205        if ! test -d "$with_freetype/lib" || ! test -d "$with_freetype/include"; then
31206          as_fn_error $? "Could not find the expected directories $with_freetype/lib and $with_freetype/include" "$LINENO" 5
31207        fi
31208        # List the contents of the lib.
31209        FREETYPELIB=`ls $with_freetype/lib/libfreetype.so $with_freetype/lib/freetype.dll 2> /dev/null`
31210        if test "x$FREETYPELIB" = x; then
31211          as_fn_error $? "Could not find libfreetype.so nor freetype.dll in $with_freetype/lib" "$LINENO" 5
31212        fi
31213        # Check one h-file
31214        if ! test -s "$with_freetype/include/ft2build.h"; then
31215          as_fn_error $? "Could not find $with_freetype/include/ft2build.h" "$LINENO" 5
31216        fi
31217      fi
31218    fi
31219    if test "x$FREETYPE2_FOUND" = xno; then
31220
31221
31222  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
31223    # Source the builddeps file again, to make sure it uses the latest variables!
31224    . $builddepsfile
31225    # Look for a target and build machine specific resource!
31226    eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
31227    if test "x$resource" = x; then
31228      # Ok, lets instead look for a target specific resource
31229      eval resource=\${builddep_freetype2_TARGET_${rewritten_target_var}}
31230    fi
31231    if test "x$resource" = x; then
31232      # Ok, lets instead look for a build specific resource
31233      eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}}
31234    fi
31235    if test "x$resource" = x; then
31236      # Ok, lets instead look for a generic resource
31237      # (The freetype2 comes from M4 and not the shell, thus no need for eval here.)
31238      resource=${builddep_freetype2}
31239    fi
31240    if test "x$resource" != x; then
31241      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for freetype2" >&5
31242$as_echo "$as_me: Using builddeps $resource for freetype2" >&6;}
31243      # If the resource in the builddeps.conf file is an existing directory,
31244      # for example /java/linux/cups
31245      if test -d ${resource}; then
31246        depdir=${resource}
31247      else
31248
31249  # freetype2 is for example mymodule
31250  # $resource is for example libs/general/libmymod_1_2_3.zip
31251  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
31252  # $with_builddeps_dir is for example /localhome/builddeps
31253  # depdir is the name of the variable into which we store the depdir, eg MYMOD
31254  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
31255  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
31256  filename=`basename $resource`
31257  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
31258  filebase=${filename%%.*}
31259  extension=${filename#*.}
31260  installdir=$with_builddeps_dir/$filebase
31261  if test ! -f $installdir/$filename.unpacked; then
31262    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&5
31263$as_echo "$as_me: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&6;}
31264    if test ! -d $installdir; then
31265      mkdir -p $installdir
31266    fi
31267    if test ! -d $installdir; then
31268      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
31269    fi
31270    tmpfile=`mktemp $installdir/freetype2.XXXXXXXXX`
31271    touch $tmpfile
31272    if test ! -f $tmpfile; then
31273      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
31274    fi
31275
31276  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
31277  # $tmpfile is the local file name for the downloaded file.
31278  VALID_TOOL=no
31279  if test "x$BDEPS_FTP" = xwget; then
31280    VALID_TOOL=yes
31281    wget -O $tmpfile $with_builddeps_server/$resource
31282  fi
31283  if test "x$BDEPS_FTP" = xlftp; then
31284    VALID_TOOL=yes
31285    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
31286  fi
31287  if test "x$BDEPS_FTP" = xftp; then
31288    VALID_TOOL=yes
31289    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
31290    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
31291    FTPUSERPWD=${FTPSERVER%%@*}
31292    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
31293      FTPUSER=${userpwd%%:*}
31294      FTPPWD=${userpwd#*@}
31295      FTPSERVER=${FTPSERVER#*@}
31296    else
31297      FTPUSER=ftp
31298      FTPPWD=ftp
31299    fi
31300    # the "pass" command does not work on some
31301    # ftp clients (read ftp.exe) but if it works,
31302    # passive mode is better!
31303    ( \
31304        echo "user $FTPUSER $FTPPWD"        ; \
31305        echo "pass"                         ; \
31306        echo "bin"                          ; \
31307        echo "get $FTPPATH $tmpfile"              ; \
31308    ) | ftp -in $FTPSERVER
31309  fi
31310  if test "x$VALID_TOOL" != xyes; then
31311    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
31312  fi
31313
31314    mv $tmpfile $installdir/$filename
31315    if test ! -s $installdir/$filename; then
31316      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
31317    fi
31318    case "$extension" in
31319      zip)  echo "Unzipping $installdir/$filename..."
31320        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
31321        ;;
31322      tar.gz) echo "Untaring $installdir/$filename..."
31323        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31324        ;;
31325      tgz) echo "Untaring $installdir/$filename..."
31326        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31327        ;;
31328      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
31329        ;;
31330    esac
31331  fi
31332  if test -f $installdir/$filename.unpacked; then
31333    depdir=$installdir
31334  fi
31335
31336      fi
31337      # Source the builddeps file again, because in the previous command, the depdir
31338      # was updated to point at the current build dependency install directory.
31339      . $builddepsfile
31340      # Now extract variables from the builddeps.conf files.
31341      theroot=${builddep_freetype2_ROOT}
31342      thecflags=${builddep_freetype2_CFLAGS}
31343      thelibs=${builddep_freetype2_LIBS}
31344      if test "x$depdir" = x; then
31345        as_fn_error $? "Could not download build dependency freetype2" "$LINENO" 5
31346      fi
31347      FREETYPE2=$depdir
31348      if test "x$theroot" != x; then
31349        FREETYPE2="$theroot"
31350      fi
31351      if test "x$thecflags" != x; then
31352        FREETYPE2_CFLAGS="$thecflags"
31353      fi
31354      if test "x$thelibs" != x; then
31355        FREETYPE2_LIBS="$thelibs"
31356      fi
31357      FREETYPE2_FOUND=yes
31358      else FREETYPE2_FOUND=no
31359
31360    fi
31361    else FREETYPE2_FOUND=no
31362
31363  fi
31364
31365      USING_SYSTEM_FT_LIB=true
31366    fi
31367    if test "x$FREETYPE2_FOUND" = xno && test "x$OPENJDK_TARGET_OS" = xwindows; then
31368      FREETYPELOCATION="$PROGRAMFILES/GnuWin32"
31369
31370  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31371
31372  # Input might be given as Windows format, start by converting to
31373  # unix format.
31374  path="$FREETYPELOCATION"
31375  new_path=`$CYGPATH -u "$path"`
31376
31377  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31378  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31379  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31380  # "foo.exe" is OK but "foo" is an error.
31381  #
31382  # This test is therefore slightly more accurate than "test -f" to check for file precense.
31383  # It is also a way to make sure we got the proper file name for the real test later on.
31384  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31385  if test "x$test_shortpath" = x; then
31386    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&5
31387$as_echo "$as_me: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&6;}
31388    as_fn_error $? "Cannot locate the the path of FREETYPELOCATION" "$LINENO" 5
31389  fi
31390
31391  # Call helper function which possibly converts this using DOS-style short mode.
31392  # If so, the updated path is stored in $new_path.
31393
31394  input_path="$new_path"
31395  # Check if we need to convert this using DOS-style short mode. If the path
31396  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31397  # take no chances and rewrite it.
31398  # Note: m4 eats our [], so we need to use [ and ] instead.
31399  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31400  if test "x$has_forbidden_chars" != x; then
31401    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31402    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31403    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31404    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31405      # Going to short mode and back again did indeed matter. Since short mode is
31406      # case insensitive, let's make it lowercase to improve readability.
31407      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31408      # Now convert it back to Unix-stile (cygpath)
31409      input_path=`$CYGPATH -u "$shortmode_path"`
31410      new_path="$input_path"
31411    fi
31412  fi
31413
31414  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31415  if test "x$test_cygdrive_prefix" = x; then
31416    # As a simple fix, exclude /usr/bin since it's not a real path.
31417    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31418      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31419      # a path prefixed by /cygdrive for fixpath to work.
31420      new_path="$CYGWIN_ROOT_PATH$input_path"
31421    fi
31422  fi
31423
31424
31425  if test "x$path" != "x$new_path"; then
31426    FREETYPELOCATION="$new_path"
31427    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPELOCATION to \"$new_path\"" >&5
31428$as_echo "$as_me: Rewriting FREETYPELOCATION to \"$new_path\"" >&6;}
31429  fi
31430
31431  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31432
31433  path="$FREETYPELOCATION"
31434  has_colon=`$ECHO $path | $GREP ^.:`
31435  new_path="$path"
31436  if test "x$has_colon" = x; then
31437    # Not in mixed or Windows style, start by that.
31438    new_path=`cmd //c echo $path`
31439  fi
31440
31441
31442  input_path="$new_path"
31443  # Check if we need to convert this using DOS-style short mode. If the path
31444  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31445  # take no chances and rewrite it.
31446  # Note: m4 eats our [], so we need to use [ and ] instead.
31447  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31448  if test "x$has_forbidden_chars" != x; then
31449    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31450    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31451  fi
31452
31453
31454  windows_path="$new_path"
31455  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31456    unix_path=`$CYGPATH -u "$windows_path"`
31457    new_path="$unix_path"
31458  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31459    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31460    new_path="$unix_path"
31461  fi
31462
31463  if test "x$path" != "x$new_path"; then
31464    FREETYPELOCATION="$new_path"
31465    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPELOCATION to \"$new_path\"" >&5
31466$as_echo "$as_me: Rewriting FREETYPELOCATION to \"$new_path\"" >&6;}
31467  fi
31468
31469  # Save the first 10 bytes of this path to the storage, so fixpath can work.
31470  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31471
31472  else
31473    # We're on a posix platform. Hooray! :)
31474    path="$FREETYPELOCATION"
31475    has_space=`$ECHO "$path" | $GREP " "`
31476    if test "x$has_space" != x; then
31477      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&5
31478$as_echo "$as_me: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&6;}
31479      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31480    fi
31481
31482    # Use eval to expand a potential ~
31483    eval path="$path"
31484    if test ! -f "$path" && test ! -d "$path"; then
31485      as_fn_error $? "The path of FREETYPELOCATION, which resolves as \"$path\", is not found." "$LINENO" 5
31486    fi
31487
31488    FREETYPELOCATION="`cd "$path"; $THEPWDCMD -L`"
31489  fi
31490
31491      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype in some standard windows locations" >&5
31492$as_echo_n "checking for freetype in some standard windows locations... " >&6; }
31493      if test -s "$FREETYPELOCATION/include/ft2build.h" && test -d "$FREETYPELOCATION/include/freetype2/freetype"; then
31494        FREETYPE2_CFLAGS="-I$FREETYPELOCATION/include/freetype2 -I$FREETYPELOCATION/include"
31495        FREETYPE2_LIBS="$FREETYPELOCATION/lib/freetype.lib"
31496        FREETYPE2_LIB_PATH="$FREETYPELOCATION/lib"
31497        if ! test -s "$FREETYPE2_LIBS"; then
31498          as_fn_error $? "Could not find $FREETYPE2_LIBS" "$LINENO" 5
31499        fi
31500        if ! test -s "$FREETYPE2_LIB_PATH/freetype.dll"; then
31501          as_fn_error $? "Could not find $FREETYPE2_LIB_PATH/freetype.dll" "$LINENO" 5
31502        fi
31503        USING_SYSTEM_FT_LIB=true
31504        FREETYPE2_FOUND=yes
31505      fi
31506      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE2_FOUND" >&5
31507$as_echo "$FREETYPE2_FOUND" >&6; }
31508    fi
31509    if test "x$FREETYPE2_FOUND" = xno; then
31510
31511pkg_failed=no
31512{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE2" >&5
31513$as_echo_n "checking for FREETYPE2... " >&6; }
31514
31515if test -n "$FREETYPE2_CFLAGS"; then
31516    pkg_cv_FREETYPE2_CFLAGS="$FREETYPE2_CFLAGS"
31517 elif test -n "$PKG_CONFIG"; then
31518    if test -n "$PKG_CONFIG" && \
31519    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
31520  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
31521  ac_status=$?
31522  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31523  test $ac_status = 0; }; then
31524  pkg_cv_FREETYPE2_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
31525else
31526  pkg_failed=yes
31527fi
31528 else
31529    pkg_failed=untried
31530fi
31531if test -n "$FREETYPE2_LIBS"; then
31532    pkg_cv_FREETYPE2_LIBS="$FREETYPE2_LIBS"
31533 elif test -n "$PKG_CONFIG"; then
31534    if test -n "$PKG_CONFIG" && \
31535    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
31536  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
31537  ac_status=$?
31538  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31539  test $ac_status = 0; }; then
31540  pkg_cv_FREETYPE2_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
31541else
31542  pkg_failed=yes
31543fi
31544 else
31545    pkg_failed=untried
31546fi
31547
31548
31549
31550if test $pkg_failed = yes; then
31551
31552if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
31553        _pkg_short_errors_supported=yes
31554else
31555        _pkg_short_errors_supported=no
31556fi
31557        if test $_pkg_short_errors_supported = yes; then
31558	        FREETYPE2_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
31559        else
31560	        FREETYPE2_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
31561        fi
31562	# Put the nasty error message in config.log where it belongs
31563	echo "$FREETYPE2_PKG_ERRORS" >&5
31564
31565	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31566$as_echo "no" >&6; }
31567                FREETYPE2_FOUND=no
31568elif test $pkg_failed = untried; then
31569	FREETYPE2_FOUND=no
31570else
31571	FREETYPE2_CFLAGS=$pkg_cv_FREETYPE2_CFLAGS
31572	FREETYPE2_LIBS=$pkg_cv_FREETYPE2_LIBS
31573        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31574$as_echo "yes" >&6; }
31575	FREETYPE2_FOUND=yes
31576fi
31577      # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
31578      FREETYPE2_LIBS=`$ECHO $FREETYPE2_LIBS | $SED 's/-lz//g'`
31579      USING_SYSTEM_FT_LIB=true
31580      # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
31581      if test "x$FREETYPE2_FOUND" = xyes && test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
31582        FREETYPE2_LIBS=`$ECHO $FREETYPE2_LIBS | $SED 's?/lib?/lib/amd64?g'`
31583      fi
31584    fi
31585    if test "x$FREETYPE2_FOUND" = xno; then
31586      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype in some standard locations" >&5
31587$as_echo_n "checking for freetype in some standard locations... " >&6; }
31588
31589      if test -s $SYS_ROOT/usr/X11/include/ft2build.h && test -d $SYS_ROOT/usr/X11/include/freetype2/freetype; then
31590        DEFAULT_FREETYPE_CFLAGS="-I$SYS_ROOT/usr/X11/include/freetype2 -I$SYS_ROOT/usr/X11/include"
31591        DEFAULT_FREETYPE_LIBS="-L$SYS_ROOT/usr/X11/lib -lfreetype"
31592      fi
31593      if test -s $SYS_ROOT/usr/include/ft2build.h && test -d $SYS_ROOT/usr/include/freetype2/freetype; then
31594        DEFAULT_FREETYPE_CFLAGS="-I$SYS_ROOT/usr/include/freetype2"
31595        DEFAULT_FREETYPE_LIBS="-lfreetype"
31596      fi
31597
31598      PREV_CXXCFLAGS="$CXXFLAGS"
31599      PREV_LDFLAGS="$LDFLAGS"
31600      CXXFLAGS="$CXXFLAGS $DEFAULT_FREETYPE_CFLAGS"
31601      LDFLAGS="$LDFLAGS $DEFAULT_FREETYPE_LIBS"
31602      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31603/* end confdefs.h.  */
31604
31605            #include<ft2build.h>
31606            #include FT_FREETYPE_H
31607            int main() { return 0; }
31608
31609_ACEOF
31610if ac_fn_cxx_try_link "$LINENO"; then :
31611
31612            # Yes, the default cflags and libs did the trick.
31613            FREETYPE2_FOUND=yes
31614            FREETYPE2_CFLAGS="$DEFAULT_FREETYPE_CFLAGS"
31615            FREETYPE2_LIBS="$DEFAULT_FREETYPE_LIBS"
31616
31617else
31618
31619            FREETYPE2_FOUND=no
31620
31621
31622fi
31623rm -f core conftest.err conftest.$ac_objext \
31624    conftest$ac_exeext conftest.$ac_ext
31625      CXXCFLAGS="$PREV_CXXFLAGS"
31626      LDFLAGS="$PREV_LDFLAGS"
31627      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE2_FOUND" >&5
31628$as_echo "$FREETYPE2_FOUND" >&6; }
31629      USING_SYSTEM_FT_LIB=true
31630    fi
31631    if test "x$FREETYPE2_FOUND" = xno; then
31632
31633  # Print a helpful message on how to acquire the necessary build dependency.
31634  # freetype2 is the help tag: freetyp2, cups, pulse, alsa etc
31635  MISSING_DEPENDENCY=freetype2
31636  PKGHANDLER_COMMAND=
31637
31638  case $PKGHANDLER in
31639    apt-get)
31640      apt_help     $MISSING_DEPENDENCY ;;
31641    yum)
31642      yum_help     $MISSING_DEPENDENCY ;;
31643    port)
31644      port_help    $MISSING_DEPENDENCY ;;
31645    pkgutil)
31646      pkgutil_help $MISSING_DEPENDENCY ;;
31647    pkgadd)
31648      pkgadd_help  $MISSING_DEPENDENCY ;;
31649    * )
31650      break ;;
31651  esac
31652
31653  if test "x$PKGHANDLER_COMMAND" != x; then
31654    HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
31655  fi
31656
31657      as_fn_error $? "Could not find freetype2! $HELP_MSG " "$LINENO" 5
31658    fi
31659
31660    if test "x$OPENJDK_TARGET_OS" != xwindows; then
31661      # AC_CHECK_LIB does not support use of cl.exe
31662      PREV_LDFLAGS="$LDFLAGS"
31663      LDFLAGS="$FREETYPE2_LIBS"
31664      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FT_Init_FreeType in -lfreetype" >&5
31665$as_echo_n "checking for FT_Init_FreeType in -lfreetype... " >&6; }
31666if ${ac_cv_lib_freetype_FT_Init_FreeType+:} false; then :
31667  $as_echo_n "(cached) " >&6
31668else
31669  ac_check_lib_save_LIBS=$LIBS
31670LIBS="-lfreetype  $LIBS"
31671cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31672/* end confdefs.h.  */
31673
31674/* Override any GCC internal prototype to avoid an error.
31675   Use char because int might match the return type of a GCC
31676   builtin and then its argument prototype would still apply.  */
31677#ifdef __cplusplus
31678extern "C"
31679#endif
31680char FT_Init_FreeType ();
31681int
31682main ()
31683{
31684return FT_Init_FreeType ();
31685  ;
31686  return 0;
31687}
31688_ACEOF
31689if ac_fn_cxx_try_link "$LINENO"; then :
31690  ac_cv_lib_freetype_FT_Init_FreeType=yes
31691else
31692  ac_cv_lib_freetype_FT_Init_FreeType=no
31693fi
31694rm -f core conftest.err conftest.$ac_objext \
31695    conftest$ac_exeext conftest.$ac_ext
31696LIBS=$ac_check_lib_save_LIBS
31697fi
31698{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_freetype_FT_Init_FreeType" >&5
31699$as_echo "$ac_cv_lib_freetype_FT_Init_FreeType" >&6; }
31700if test "x$ac_cv_lib_freetype_FT_Init_FreeType" = xyes; then :
31701  FREETYPE2_FOUND=true
31702else
31703  as_fn_error $? "Could not find freetype2! $HELP_MSG " "$LINENO" 5
31704fi
31705
31706      LDFLAGS="$PREV_LDFLAGS"
31707    fi
31708  fi
31709
31710
31711
31712
31713
31714
31715
31716
31717  ###############################################################################
31718  #
31719  # Check for alsa headers and libraries. Used on Linux/GNU systems.
31720  #
31721
31722# Check whether --with-alsa was given.
31723if test "${with_alsa+set}" = set; then :
31724  withval=$with_alsa;
31725fi
31726
31727
31728# Check whether --with-alsa-include was given.
31729if test "${with_alsa_include+set}" = set; then :
31730  withval=$with_alsa_include;
31731fi
31732
31733
31734# Check whether --with-alsa-lib was given.
31735if test "${with_alsa_lib+set}" = set; then :
31736  withval=$with_alsa_lib;
31737fi
31738
31739
31740  if test "x$ALSA_NOT_NEEDED" = xyes; then
31741    if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then
31742      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa is ignored" >&5
31743$as_echo "$as_me: WARNING: alsa not used, so --with-alsa is ignored" >&2;}
31744    fi
31745    ALSA_CFLAGS=
31746    ALSA_LIBS=
31747  else
31748    ALSA_FOUND=no
31749
31750    if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
31751      as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
31752    fi
31753
31754    if test "x${with_alsa}" != x; then
31755      ALSA_LIBS="-L${with_alsa}/lib -lalsa"
31756      ALSA_CFLAGS="-I${with_alsa}/include"
31757      ALSA_FOUND=yes
31758    fi
31759    if test "x${with_alsa_include}" != x; then
31760      ALSA_CFLAGS="-I${with_alsa_include}"
31761      ALSA_FOUND=yes
31762    fi
31763    if test "x${with_alsa_lib}" != x; then
31764      ALSA_LIBS="-L${with_alsa_lib} -lalsa"
31765      ALSA_FOUND=yes
31766    fi
31767    if test "x$ALSA_FOUND" = xno; then
31768
31769
31770  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
31771    # Source the builddeps file again, to make sure it uses the latest variables!
31772    . $builddepsfile
31773    # Look for a target and build machine specific resource!
31774    eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
31775    if test "x$resource" = x; then
31776      # Ok, lets instead look for a target specific resource
31777      eval resource=\${builddep_alsa_TARGET_${rewritten_target_var}}
31778    fi
31779    if test "x$resource" = x; then
31780      # Ok, lets instead look for a build specific resource
31781      eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}}
31782    fi
31783    if test "x$resource" = x; then
31784      # Ok, lets instead look for a generic resource
31785      # (The alsa comes from M4 and not the shell, thus no need for eval here.)
31786      resource=${builddep_alsa}
31787    fi
31788    if test "x$resource" != x; then
31789      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for alsa" >&5
31790$as_echo "$as_me: Using builddeps $resource for alsa" >&6;}
31791      # If the resource in the builddeps.conf file is an existing directory,
31792      # for example /java/linux/cups
31793      if test -d ${resource}; then
31794        depdir=${resource}
31795      else
31796
31797  # alsa is for example mymodule
31798  # $resource is for example libs/general/libmymod_1_2_3.zip
31799  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
31800  # $with_builddeps_dir is for example /localhome/builddeps
31801  # depdir is the name of the variable into which we store the depdir, eg MYMOD
31802  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
31803  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
31804  filename=`basename $resource`
31805  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
31806  filebase=${filename%%.*}
31807  extension=${filename#*.}
31808  installdir=$with_builddeps_dir/$filebase
31809  if test ! -f $installdir/$filename.unpacked; then
31810    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&5
31811$as_echo "$as_me: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&6;}
31812    if test ! -d $installdir; then
31813      mkdir -p $installdir
31814    fi
31815    if test ! -d $installdir; then
31816      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
31817    fi
31818    tmpfile=`mktemp $installdir/alsa.XXXXXXXXX`
31819    touch $tmpfile
31820    if test ! -f $tmpfile; then
31821      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
31822    fi
31823
31824  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
31825  # $tmpfile is the local file name for the downloaded file.
31826  VALID_TOOL=no
31827  if test "x$BDEPS_FTP" = xwget; then
31828    VALID_TOOL=yes
31829    wget -O $tmpfile $with_builddeps_server/$resource
31830  fi
31831  if test "x$BDEPS_FTP" = xlftp; then
31832    VALID_TOOL=yes
31833    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
31834  fi
31835  if test "x$BDEPS_FTP" = xftp; then
31836    VALID_TOOL=yes
31837    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
31838    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
31839    FTPUSERPWD=${FTPSERVER%%@*}
31840    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
31841      FTPUSER=${userpwd%%:*}
31842      FTPPWD=${userpwd#*@}
31843      FTPSERVER=${FTPSERVER#*@}
31844    else
31845      FTPUSER=ftp
31846      FTPPWD=ftp
31847    fi
31848    # the "pass" command does not work on some
31849    # ftp clients (read ftp.exe) but if it works,
31850    # passive mode is better!
31851    ( \
31852        echo "user $FTPUSER $FTPPWD"        ; \
31853        echo "pass"                         ; \
31854        echo "bin"                          ; \
31855        echo "get $FTPPATH $tmpfile"              ; \
31856    ) | ftp -in $FTPSERVER
31857  fi
31858  if test "x$VALID_TOOL" != xyes; then
31859    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
31860  fi
31861
31862    mv $tmpfile $installdir/$filename
31863    if test ! -s $installdir/$filename; then
31864      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
31865    fi
31866    case "$extension" in
31867      zip)  echo "Unzipping $installdir/$filename..."
31868        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
31869        ;;
31870      tar.gz) echo "Untaring $installdir/$filename..."
31871        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31872        ;;
31873      tgz) echo "Untaring $installdir/$filename..."
31874        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31875        ;;
31876      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
31877        ;;
31878    esac
31879  fi
31880  if test -f $installdir/$filename.unpacked; then
31881    depdir=$installdir
31882  fi
31883
31884      fi
31885      # Source the builddeps file again, because in the previous command, the depdir
31886      # was updated to point at the current build dependency install directory.
31887      . $builddepsfile
31888      # Now extract variables from the builddeps.conf files.
31889      theroot=${builddep_alsa_ROOT}
31890      thecflags=${builddep_alsa_CFLAGS}
31891      thelibs=${builddep_alsa_LIBS}
31892      if test "x$depdir" = x; then
31893        as_fn_error $? "Could not download build dependency alsa" "$LINENO" 5
31894      fi
31895      ALSA=$depdir
31896      if test "x$theroot" != x; then
31897        ALSA="$theroot"
31898      fi
31899      if test "x$thecflags" != x; then
31900        ALSA_CFLAGS="$thecflags"
31901      fi
31902      if test "x$thelibs" != x; then
31903        ALSA_LIBS="$thelibs"
31904      fi
31905      ALSA_FOUND=yes
31906      else ALSA_FOUND=no
31907
31908    fi
31909    else ALSA_FOUND=no
31910
31911  fi
31912
31913    fi
31914    if test "x$ALSA_FOUND" = xno; then
31915
31916pkg_failed=no
31917{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
31918$as_echo_n "checking for ALSA... " >&6; }
31919
31920if test -n "$ALSA_CFLAGS"; then
31921    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
31922 elif test -n "$PKG_CONFIG"; then
31923    if test -n "$PKG_CONFIG" && \
31924    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
31925  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
31926  ac_status=$?
31927  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31928  test $ac_status = 0; }; then
31929  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
31930else
31931  pkg_failed=yes
31932fi
31933 else
31934    pkg_failed=untried
31935fi
31936if test -n "$ALSA_LIBS"; then
31937    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
31938 elif test -n "$PKG_CONFIG"; then
31939    if test -n "$PKG_CONFIG" && \
31940    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
31941  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
31942  ac_status=$?
31943  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31944  test $ac_status = 0; }; then
31945  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
31946else
31947  pkg_failed=yes
31948fi
31949 else
31950    pkg_failed=untried
31951fi
31952
31953
31954
31955if test $pkg_failed = yes; then
31956
31957if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
31958        _pkg_short_errors_supported=yes
31959else
31960        _pkg_short_errors_supported=no
31961fi
31962        if test $_pkg_short_errors_supported = yes; then
31963	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
31964        else
31965	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
31966        fi
31967	# Put the nasty error message in config.log where it belongs
31968	echo "$ALSA_PKG_ERRORS" >&5
31969
31970	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31971$as_echo "no" >&6; }
31972                ALSA_FOUND=no
31973elif test $pkg_failed = untried; then
31974	ALSA_FOUND=no
31975else
31976	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
31977	ALSA_LIBS=$pkg_cv_ALSA_LIBS
31978        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31979$as_echo "yes" >&6; }
31980	ALSA_FOUND=yes
31981fi
31982    fi
31983    if test "x$ALSA_FOUND" = xno; then
31984      for ac_header in alsa/asoundlib.h
31985do :
31986  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
31987if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
31988  cat >>confdefs.h <<_ACEOF
31989#define HAVE_ALSA_ASOUNDLIB_H 1
31990_ACEOF
31991
31992            ALSA_FOUND=yes
31993            ALSA_CFLAGS=-Iignoreme
31994            ALSA_LIBS=-lasound
31995            DEFAULT_ALSA=yes
31996
31997else
31998  ALSA_FOUND=no
31999fi
32000
32001done
32002
32003    fi
32004    if test "x$ALSA_FOUND" = xno; then
32005
32006  # Print a helpful message on how to acquire the necessary build dependency.
32007  # alsa is the help tag: freetyp2, cups, pulse, alsa etc
32008  MISSING_DEPENDENCY=alsa
32009  PKGHANDLER_COMMAND=
32010
32011  case $PKGHANDLER in
32012    apt-get)
32013      apt_help     $MISSING_DEPENDENCY ;;
32014    yum)
32015      yum_help     $MISSING_DEPENDENCY ;;
32016    port)
32017      port_help    $MISSING_DEPENDENCY ;;
32018    pkgutil)
32019      pkgutil_help $MISSING_DEPENDENCY ;;
32020    pkgadd)
32021      pkgadd_help  $MISSING_DEPENDENCY ;;
32022    * )
32023      break ;;
32024  esac
32025
32026  if test "x$PKGHANDLER_COMMAND" != x; then
32027    HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
32028  fi
32029
32030      as_fn_error $? "Could not find alsa! $HELP_MSG " "$LINENO" 5
32031    fi
32032  fi
32033
32034
32035
32036
32037
32038
32039  ###############################################################################
32040  #
32041  # Check for the jpeg library
32042  #
32043
32044  USE_EXTERNAL_LIBJPEG=true
32045  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -ljpeg" >&5
32046$as_echo_n "checking for main in -ljpeg... " >&6; }
32047if ${ac_cv_lib_jpeg_main+:} false; then :
32048  $as_echo_n "(cached) " >&6
32049else
32050  ac_check_lib_save_LIBS=$LIBS
32051LIBS="-ljpeg  $LIBS"
32052cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32053/* end confdefs.h.  */
32054
32055
32056int
32057main ()
32058{
32059return main ();
32060  ;
32061  return 0;
32062}
32063_ACEOF
32064if ac_fn_cxx_try_link "$LINENO"; then :
32065  ac_cv_lib_jpeg_main=yes
32066else
32067  ac_cv_lib_jpeg_main=no
32068fi
32069rm -f core conftest.err conftest.$ac_objext \
32070    conftest$ac_exeext conftest.$ac_ext
32071LIBS=$ac_check_lib_save_LIBS
32072fi
32073{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_main" >&5
32074$as_echo "$ac_cv_lib_jpeg_main" >&6; }
32075if test "x$ac_cv_lib_jpeg_main" = xyes; then :
32076  cat >>confdefs.h <<_ACEOF
32077#define HAVE_LIBJPEG 1
32078_ACEOF
32079
32080  LIBS="-ljpeg $LIBS"
32081
32082else
32083   USE_EXTERNAL_LIBJPEG=false
32084      { $as_echo "$as_me:${as_lineno-$LINENO}: Will use jpeg decoder bundled with the OpenJDK source" >&5
32085$as_echo "$as_me: Will use jpeg decoder bundled with the OpenJDK source" >&6;}
32086
32087fi
32088
32089
32090
32091  ###############################################################################
32092  #
32093  # Check for the gif library
32094  #
32095
32096
32097# Check whether --with-giflib was given.
32098if test "${with_giflib+set}" = set; then :
32099  withval=$with_giflib;
32100fi
32101
32102
32103
32104  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
32105$as_echo_n "checking for which giflib to use... " >&6; }
32106
32107  # default is bundled
32108  DEFAULT_GIFLIB=bundled
32109
32110  #
32111  # if user didn't specify, use DEFAULT_GIFLIB
32112  #
32113  if test "x${with_giflib}" = "x"; then
32114    with_giflib=${DEFAULT_GIFLIB}
32115  fi
32116
32117  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
32118$as_echo "${with_giflib}" >&6; }
32119
32120  if test "x${with_giflib}" = "xbundled"; then
32121    USE_EXTERNAL_LIBGIF=false
32122  elif test "x${with_giflib}" = "xsystem"; then
32123    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
32124if test "x$ac_cv_header_gif_lib_h" = xyes; then :
32125
32126else
32127   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
32128fi
32129
32130
32131    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
32132$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
32133if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
32134  $as_echo_n "(cached) " >&6
32135else
32136  ac_check_lib_save_LIBS=$LIBS
32137LIBS="-lgif  $LIBS"
32138cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32139/* end confdefs.h.  */
32140
32141/* Override any GCC internal prototype to avoid an error.
32142   Use char because int might match the return type of a GCC
32143   builtin and then its argument prototype would still apply.  */
32144#ifdef __cplusplus
32145extern "C"
32146#endif
32147char DGifGetCode ();
32148int
32149main ()
32150{
32151return DGifGetCode ();
32152  ;
32153  return 0;
32154}
32155_ACEOF
32156if ac_fn_cxx_try_link "$LINENO"; then :
32157  ac_cv_lib_gif_DGifGetCode=yes
32158else
32159  ac_cv_lib_gif_DGifGetCode=no
32160fi
32161rm -f core conftest.err conftest.$ac_objext \
32162    conftest$ac_exeext conftest.$ac_ext
32163LIBS=$ac_check_lib_save_LIBS
32164fi
32165{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
32166$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
32167if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
32168  cat >>confdefs.h <<_ACEOF
32169#define HAVE_LIBGIF 1
32170_ACEOF
32171
32172  LIBS="-lgif $LIBS"
32173
32174else
32175   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
32176fi
32177
32178
32179    USE_EXTERNAL_LIBGIF=true
32180  else
32181    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
32182  fi
32183
32184
32185  ###############################################################################
32186  #
32187  # Check for the zlib library
32188  #
32189
32190
32191# Check whether --with-zlib was given.
32192if test "${with_zlib+set}" = set; then :
32193  withval=$with_zlib;
32194fi
32195
32196
32197  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
32198$as_echo_n "checking for compress in -lz... " >&6; }
32199if ${ac_cv_lib_z_compress+:} false; then :
32200  $as_echo_n "(cached) " >&6
32201else
32202  ac_check_lib_save_LIBS=$LIBS
32203LIBS="-lz  $LIBS"
32204cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32205/* end confdefs.h.  */
32206
32207/* Override any GCC internal prototype to avoid an error.
32208   Use char because int might match the return type of a GCC
32209   builtin and then its argument prototype would still apply.  */
32210#ifdef __cplusplus
32211extern "C"
32212#endif
32213char compress ();
32214int
32215main ()
32216{
32217return compress ();
32218  ;
32219  return 0;
32220}
32221_ACEOF
32222if ac_fn_cxx_try_link "$LINENO"; then :
32223  ac_cv_lib_z_compress=yes
32224else
32225  ac_cv_lib_z_compress=no
32226fi
32227rm -f core conftest.err conftest.$ac_objext \
32228    conftest$ac_exeext conftest.$ac_ext
32229LIBS=$ac_check_lib_save_LIBS
32230fi
32231{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
32232$as_echo "$ac_cv_lib_z_compress" >&6; }
32233if test "x$ac_cv_lib_z_compress" = xyes; then :
32234   ZLIB_FOUND=yes
32235else
32236   ZLIB_FOUND=no
32237fi
32238
32239
32240  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
32241$as_echo_n "checking for which zlib to use... " >&6; }
32242
32243  DEFAULT_ZLIB=bundled
32244  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
32245    #
32246    # On macosx default is system...on others default is
32247    #
32248    DEFAULT_ZLIB=system
32249  fi
32250
32251  if test "x${ZLIB_FOUND}" != "xyes"; then
32252    #
32253    # If we don't find any system...set default to bundled
32254    #
32255    DEFAULT_ZLIB=bundled
32256  fi
32257
32258  #
32259  # If user didn't specify, use DEFAULT_ZLIB
32260  #
32261  if test "x${with_zlib}" = "x"; then
32262    with_zlib=${DEFAULT_ZLIB}
32263  fi
32264
32265  if test "x${with_zlib}" = "xbundled"; then
32266    USE_EXTERNAL_LIBZ=false
32267    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
32268$as_echo "bundled" >&6; }
32269  elif test "x${with_zlib}" = "xsystem"; then
32270    if test "x${ZLIB_FOUND}" = "xyes"; then
32271      USE_EXTERNAL_LIBZ=true
32272      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
32273$as_echo "system" >&6; }
32274    else
32275      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
32276$as_echo "system not found" >&6; }
32277      as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
32278    fi
32279  else
32280    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
32281  fi
32282
32283
32284
32285  ###############################################################################
32286  LIBZIP_CAN_USE_MMAP=true
32287
32288
32289
32290  ###############################################################################
32291  #
32292  # Check if altzone exists in time.h
32293  #
32294
32295  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32296/* end confdefs.h.  */
32297#include <time.h>
32298int
32299main ()
32300{
32301return (int)altzone;
32302  ;
32303  return 0;
32304}
32305_ACEOF
32306if ac_fn_cxx_try_link "$LINENO"; then :
32307  has_altzone=yes
32308else
32309  has_altzone=no
32310fi
32311rm -f core conftest.err conftest.$ac_objext \
32312    conftest$ac_exeext conftest.$ac_ext
32313  if test "x$has_altzone" = xyes; then
32314
32315$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
32316
32317  fi
32318
32319  ###############################################################################
32320  #
32321  # Check the maths library
32322  #
32323
32324  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
32325$as_echo_n "checking for cos in -lm... " >&6; }
32326if ${ac_cv_lib_m_cos+:} false; then :
32327  $as_echo_n "(cached) " >&6
32328else
32329  ac_check_lib_save_LIBS=$LIBS
32330LIBS="-lm  $LIBS"
32331cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32332/* end confdefs.h.  */
32333
32334/* Override any GCC internal prototype to avoid an error.
32335   Use char because int might match the return type of a GCC
32336   builtin and then its argument prototype would still apply.  */
32337#ifdef __cplusplus
32338extern "C"
32339#endif
32340char cos ();
32341int
32342main ()
32343{
32344return cos ();
32345  ;
32346  return 0;
32347}
32348_ACEOF
32349if ac_fn_cxx_try_link "$LINENO"; then :
32350  ac_cv_lib_m_cos=yes
32351else
32352  ac_cv_lib_m_cos=no
32353fi
32354rm -f core conftest.err conftest.$ac_objext \
32355    conftest$ac_exeext conftest.$ac_ext
32356LIBS=$ac_check_lib_save_LIBS
32357fi
32358{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
32359$as_echo "$ac_cv_lib_m_cos" >&6; }
32360if test "x$ac_cv_lib_m_cos" = xyes; then :
32361  cat >>confdefs.h <<_ACEOF
32362#define HAVE_LIBM 1
32363_ACEOF
32364
32365  LIBS="-lm $LIBS"
32366
32367else
32368
32369        { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
32370$as_echo "$as_me: Maths library was not found" >&6;}
32371
32372
32373fi
32374
32375
32376
32377  ###############################################################################
32378  #
32379  # Check for libdl.so
32380
32381  save_LIBS="$LIBS"
32382  LIBS=""
32383  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
32384$as_echo_n "checking for dlopen in -ldl... " >&6; }
32385if ${ac_cv_lib_dl_dlopen+:} false; then :
32386  $as_echo_n "(cached) " >&6
32387else
32388  ac_check_lib_save_LIBS=$LIBS
32389LIBS="-ldl  $LIBS"
32390cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32391/* end confdefs.h.  */
32392
32393/* Override any GCC internal prototype to avoid an error.
32394   Use char because int might match the return type of a GCC
32395   builtin and then its argument prototype would still apply.  */
32396#ifdef __cplusplus
32397extern "C"
32398#endif
32399char dlopen ();
32400int
32401main ()
32402{
32403return dlopen ();
32404  ;
32405  return 0;
32406}
32407_ACEOF
32408if ac_fn_cxx_try_link "$LINENO"; then :
32409  ac_cv_lib_dl_dlopen=yes
32410else
32411  ac_cv_lib_dl_dlopen=no
32412fi
32413rm -f core conftest.err conftest.$ac_objext \
32414    conftest$ac_exeext conftest.$ac_ext
32415LIBS=$ac_check_lib_save_LIBS
32416fi
32417{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
32418$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
32419if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
32420  cat >>confdefs.h <<_ACEOF
32421#define HAVE_LIBDL 1
32422_ACEOF
32423
32424  LIBS="-ldl $LIBS"
32425
32426fi
32427
32428  LIBDL="$LIBS"
32429
32430  LIBS="$save_LIBS"
32431
32432
32433  ###############################################################################
32434  #
32435  # statically link libstdc++ before C++ ABI is stablized on Linux unless
32436  # dynamic build is configured on command line.
32437  #
32438
32439# Check whether --with-stdc++lib was given.
32440if test "${with_stdc__lib+set}" = set; then :
32441  withval=$with_stdc__lib;
32442        if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
32443                && test "x$with_stdc__lib" != xdefault; then
32444          as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
32445        fi
32446
32447else
32448  with_stdc__lib=default
32449
32450fi
32451
32452
32453  if test "x$OPENJDK_TARGET_OS" = xlinux; then
32454    # Test if -lstdc++ works.
32455    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
32456$as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
32457    ac_ext=cpp
32458ac_cpp='$CXXCPP $CPPFLAGS'
32459ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32460ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32461ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32462
32463    OLD_CXXFLAGS="$CXXFLAGS"
32464    CXXFLAGS="$CXXFLAGS -lstdc++"
32465    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32466/* end confdefs.h.  */
32467
32468int
32469main ()
32470{
32471return 0;
32472  ;
32473  return 0;
32474}
32475_ACEOF
32476if ac_fn_cxx_try_link "$LINENO"; then :
32477  has_dynamic_libstdcxx=yes
32478else
32479  has_dynamic_libstdcxx=no
32480fi
32481rm -f core conftest.err conftest.$ac_objext \
32482    conftest$ac_exeext conftest.$ac_ext
32483    CXXFLAGS="$OLD_CXXFLAGS"
32484    ac_ext=cpp
32485ac_cpp='$CXXCPP $CPPFLAGS'
32486ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32487ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32488ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32489
32490    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
32491$as_echo "$has_dynamic_libstdcxx" >&6; }
32492
32493    # Test if stdc++ can be linked statically.
32494    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
32495$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
32496    STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
32497    ac_ext=cpp
32498ac_cpp='$CXXCPP $CPPFLAGS'
32499ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32500ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32501ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32502
32503    OLD_LIBS="$LIBS"
32504    OLD_CXX="$CXX"
32505    LIBS="$STATIC_STDCXX_FLAGS"
32506    CXX="$CC"
32507    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32508/* end confdefs.h.  */
32509
32510int
32511main ()
32512{
32513return 0;
32514  ;
32515  return 0;
32516}
32517_ACEOF
32518if ac_fn_cxx_try_link "$LINENO"; then :
32519  has_static_libstdcxx=yes
32520else
32521  has_static_libstdcxx=no
32522fi
32523rm -f core conftest.err conftest.$ac_objext \
32524    conftest$ac_exeext conftest.$ac_ext
32525    LIBS="$OLD_LIBS"
32526    CXX="$OLD_CXX"
32527    ac_ext=cpp
32528ac_cpp='$CXXCPP $CPPFLAGS'
32529ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32530ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32531ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32532
32533    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
32534$as_echo "$has_static_libstdcxx" >&6; }
32535
32536    if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
32537      as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
32538    fi
32539
32540    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
32541      as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
32542    fi
32543
32544    if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
32545      as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
32546    fi
32547
32548    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
32549$as_echo_n "checking how to link with libstdc++... " >&6; }
32550    # If dynamic was requested, it's available since it would fail above otherwise.
32551    # If dynamic wasn't requested, go with static unless it isn't available.
32552    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
32553      LIBCXX="$LIBCXX -lstdc++"
32554      LDCXX="$CXX"
32555      STATIC_CXX_SETTING="STATIC_CXX=false"
32556      { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
32557$as_echo "dynamic" >&6; }
32558    else
32559      LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
32560      LDCXX="$CC"
32561      STATIC_CXX_SETTING="STATIC_CXX=true"
32562      { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
32563$as_echo "static" >&6; }
32564    fi
32565  fi
32566
32567
32568  if test "x$JVM_VARIANT_ZERO" = xtrue || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
32569    # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
32570
32571pkg_failed=no
32572{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
32573$as_echo_n "checking for LIBFFI... " >&6; }
32574
32575if test -n "$LIBFFI_CFLAGS"; then
32576    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
32577 elif test -n "$PKG_CONFIG"; then
32578    if test -n "$PKG_CONFIG" && \
32579    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
32580  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
32581  ac_status=$?
32582  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32583  test $ac_status = 0; }; then
32584  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
32585else
32586  pkg_failed=yes
32587fi
32588 else
32589    pkg_failed=untried
32590fi
32591if test -n "$LIBFFI_LIBS"; then
32592    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
32593 elif test -n "$PKG_CONFIG"; then
32594    if test -n "$PKG_CONFIG" && \
32595    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
32596  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
32597  ac_status=$?
32598  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32599  test $ac_status = 0; }; then
32600  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
32601else
32602  pkg_failed=yes
32603fi
32604 else
32605    pkg_failed=untried
32606fi
32607
32608
32609
32610if test $pkg_failed = yes; then
32611
32612if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
32613        _pkg_short_errors_supported=yes
32614else
32615        _pkg_short_errors_supported=no
32616fi
32617        if test $_pkg_short_errors_supported = yes; then
32618	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
32619        else
32620	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
32621        fi
32622	# Put the nasty error message in config.log where it belongs
32623	echo "$LIBFFI_PKG_ERRORS" >&5
32624
32625	as_fn_error $? "Package requirements (libffi) were not met:
32626
32627$LIBFFI_PKG_ERRORS
32628
32629Consider adjusting the PKG_CONFIG_PATH environment variable if you
32630installed software in a non-standard prefix.
32631
32632Alternatively, you may set the environment variables LIBFFI_CFLAGS
32633and LIBFFI_LIBS to avoid the need to call pkg-config.
32634See the pkg-config man page for more details.
32635" "$LINENO" 5
32636elif test $pkg_failed = untried; then
32637	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32638$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32639as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
32640is in your PATH or set the PKG_CONFIG environment variable to the full
32641path to pkg-config.
32642
32643Alternatively, you may set the environment variables LIBFFI_CFLAGS
32644and LIBFFI_LIBS to avoid the need to call pkg-config.
32645See the pkg-config man page for more details.
32646
32647To get pkg-config, see <http://pkg-config.freedesktop.org/>.
32648See \`config.log' for more details" "$LINENO" 5; }
32649else
32650	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
32651	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
32652        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32653$as_echo "yes" >&6; }
32654	:
32655fi
32656
32657  fi
32658
32659  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
32660    # Extract the first word of "llvm-config", so it can be a program name with args.
32661set dummy llvm-config; ac_word=$2
32662{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32663$as_echo_n "checking for $ac_word... " >&6; }
32664if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
32665  $as_echo_n "(cached) " >&6
32666else
32667  if test -n "$LLVM_CONFIG"; then
32668  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
32669else
32670as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32671for as_dir in $PATH
32672do
32673  IFS=$as_save_IFS
32674  test -z "$as_dir" && as_dir=.
32675    for ac_exec_ext in '' $ac_executable_extensions; do
32676  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32677    ac_cv_prog_LLVM_CONFIG="llvm-config"
32678    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32679    break 2
32680  fi
32681done
32682  done
32683IFS=$as_save_IFS
32684
32685fi
32686fi
32687LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
32688if test -n "$LLVM_CONFIG"; then
32689  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
32690$as_echo "$LLVM_CONFIG" >&6; }
32691else
32692  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32693$as_echo "no" >&6; }
32694fi
32695
32696
32697
32698    if test "x$LLVM_CONFIG" != xllvm-config; then
32699      as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
32700    fi
32701
32702    llvm_components="jit mcjit engine nativecodegen native"
32703    unset LLVM_CFLAGS
32704    for flag in $("$LLVM_CONFIG" --cxxflags); do
32705      if echo "${flag}" | grep -q '^-[ID]'; then
32706        if test "${flag}" != "-D_DEBUG" ; then
32707          if test "${LLVM_CFLAGS}" != "" ; then
32708            LLVM_CFLAGS="${LLVM_CFLAGS} "
32709          fi
32710          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
32711        fi
32712      fi
32713    done
32714    llvm_version=$("${LLVM_CONFIG}" --version | sed 's/\.//; s/svn.*//')
32715    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
32716
32717    unset LLVM_LDFLAGS
32718    for flag in $("${LLVM_CONFIG}" --ldflags); do
32719      if echo "${flag}" | grep -q '^-L'; then
32720        if test "${LLVM_LDFLAGS}" != ""; then
32721          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
32722        fi
32723        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
32724      fi
32725    done
32726
32727    unset LLVM_LIBS
32728    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
32729      if echo "${flag}" | grep -q '^-l'; then
32730        if test "${LLVM_LIBS}" != ""; then
32731          LLVM_LIBS="${LLVM_LIBS} "
32732        fi
32733        LLVM_LIBS="${LLVM_LIBS}${flag}"
32734      fi
32735    done
32736
32737
32738
32739
32740  fi
32741
32742  # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
32743  if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$LIBCXX" = x; then
32744    LIBCXX="/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
32745  fi
32746
32747  # TODO better (platform agnostic) test
32748  if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$GCC" = xyes; then
32749    LIBCXX="-lstdc++"
32750  fi
32751
32752
32753
32754
32755# After we have toolchain and the paths to all libraries (needed by msys), we can compile the fixpath helper
32756
32757  # When using cygwin or msys, we need a wrapper binary that renames
32758  # /cygdrive/c/ arguments into c:/ arguments and peeks into
32759  # @files and rewrites these too! This wrapper binary is
32760  # called fixpath.
32761  FIXPATH=
32762  if test "x$OPENJDK_BUILD_OS" = xwindows; then
32763    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
32764$as_echo_n "checking if fixpath can be created... " >&6; }
32765    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
32766    FIXPATH_BIN="$OUTPUT_ROOT/fixpath.exe"
32767    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
32768      FIXPATH_SRC=`$CYGPATH -m $FIXPATH_SRC`
32769      FIXPATH_BIN=`$CYGPATH -m $FIXPATH_BIN`
32770      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
32771      FIXPATH="$OUTPUT_ROOT/fixpath.exe -c"
32772    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
32773      FIXPATH_SRC=`cmd //c echo $FIXPATH_SRC`
32774      FIXPATH_BIN=`cmd //c echo $FIXPATH_BIN`
32775
32776      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
32777      # @ was chosen as separator to minimize risk of other tools messing around with it
32778      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" | tr ' ' '\n' | grep '^/./' | sort | uniq`
32779      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
32780
32781      FIXPATH="$OUTPUT_ROOT/fixpath -m$fixpath_argument_list"
32782    fi
32783    rm -f $OUTPUT_ROOT/fixpath*
32784    cd $OUTPUT_ROOT
32785    $CC $FIXPATH_SRC -Fe$FIXPATH_BIN > $OUTPUT_ROOT/fixpath1.log 2>&1
32786    cd $CURDIR
32787
32788    if test ! -x $OUTPUT_ROOT/fixpath.exe; then
32789      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32790$as_echo "no" >&6; }
32791      cat $OUTPUT_ROOT/fixpath1.log
32792      as_fn_error $? "Could not create $OUTPUT_ROOT/fixpath.exe" "$LINENO" 5
32793    fi
32794    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32795$as_echo "yes" >&6; }
32796    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
32797$as_echo_n "checking if fixpath.exe works... " >&6; }
32798    cd $OUTPUT_ROOT
32799    $FIXPATH $CC $SRC_ROOT/common/src/fixpath.c -Fe$OUTPUT_ROOT/fixpath2.exe > $OUTPUT_ROOT/fixpath2.log 2>&1
32800    cd $CURDIR
32801    if test ! -x $OUTPUT_ROOT/fixpath2.exe; then
32802      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32803$as_echo "no" >&6; }
32804      cat $OUTPUT_ROOT/fixpath2.log
32805      as_fn_error $? "fixpath did not work!" "$LINENO" 5
32806    fi
32807    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32808$as_echo "yes" >&6; }
32809    rm -f $OUTPUT_ROOT/fixpath?.??? $OUTPUT_ROOT/fixpath.obj
32810  fi
32811
32812
32813
32814
32815###############################################################################
32816#
32817# We need to do some final tweaking, when everything else is done.
32818#
32819###############################################################################
32820
32821
32822  HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
32823
32824
32825  # The name of the Service Agent jar.
32826  SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
32827  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
32828    SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
32829  fi
32830
32831
32832
32833    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
32834$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
32835
32836    if test -d "${SRC_ROOT}/jdk/src/share/native/sun/security/ec/impl"; then
32837      ENABLE_INTREE_EC=yes
32838      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32839$as_echo "yes" >&6; }
32840    else
32841      ENABLE_INTREE_EC=no
32842      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32843$as_echo "no" >&6; }
32844    fi
32845
32846
32847
32848
32849###############################################################################
32850#
32851# Configure parts of the build that only affect the build performance,
32852# not the result.
32853#
32854###############################################################################
32855
32856
32857  # How many cores do we have on this build system?
32858
32859# Check whether --with-num-cores was given.
32860if test "${with_num_cores+set}" = set; then :
32861  withval=$with_num_cores;
32862fi
32863
32864  if test "x$with_num_cores" = x; then
32865    # The number of cores were not specified, try to probe them.
32866
32867  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
32868$as_echo_n "checking for number of cores... " >&6; }
32869  NUM_CORES=1
32870  FOUND_CORES=no
32871
32872  if test -f /proc/cpuinfo; then
32873    # Looks like a Linux (or cygwin) system
32874    NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
32875    FOUND_CORES=yes
32876  elif test -x /usr/sbin/psrinfo; then
32877    # Looks like a Solaris system
32878    NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
32879    FOUND_CORES=yes
32880  elif test -x /usr/sbin/system_profiler; then
32881    # Looks like a MacOSX system
32882    NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print $5}'`
32883    FOUND_CORES=yes
32884  elif test -n "$NUMBER_OF_PROCESSORS"; then
32885    # On windows, look in the env
32886    NUM_CORES=$NUMBER_OF_PROCESSORS
32887    FOUND_CORES=yes
32888  fi
32889
32890  if test "x$FOUND_CORES" = xyes; then
32891    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
32892$as_echo "$NUM_CORES" >&6; }
32893  else
32894    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
32895$as_echo "could not detect number of cores, defaulting to 1" >&6; }
32896    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
32897$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
32898  fi
32899
32900  else
32901    NUM_CORES=$with_num_cores
32902  fi
32903
32904
32905
32906  # How much memory do we have on this build system?
32907
32908# Check whether --with-memory-size was given.
32909if test "${with_memory_size+set}" = set; then :
32910  withval=$with_memory_size;
32911fi
32912
32913  if test "x$with_memory_size" = x; then
32914    # The memory size was not specified, try to probe it.
32915
32916  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
32917$as_echo_n "checking for memory size... " >&6; }
32918  # Default to 1024 MB
32919  MEMORY_SIZE=1024
32920  FOUND_MEM=no
32921
32922  if test -f /proc/meminfo; then
32923    # Looks like a Linux (or cygwin) system
32924    MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
32925    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
32926    FOUND_MEM=yes
32927  elif test -x /usr/sbin/prtconf; then
32928    # Looks like a Solaris system
32929    MEMORY_SIZE=`/usr/sbin/prtconf | grep "Memory size" | awk '{ print $3 }'`
32930    FOUND_MEM=yes
32931  elif test -x /usr/sbin/system_profiler; then
32932    # Looks like a MacOSX system
32933    MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print $2}'`
32934    MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
32935    FOUND_MEM=yes
32936  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
32937    # Windows, but without cygwin
32938    MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
32939    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
32940    FOUND_MEM=yes
32941  fi
32942
32943  if test "x$FOUND_MEM" = xyes; then
32944    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
32945$as_echo "$MEMORY_SIZE MB" >&6; }
32946  else
32947    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to 1024 MB" >&5
32948$as_echo "could not detect memory size, defaulting to 1024 MB" >&6; }
32949    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
32950$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
32951  fi
32952
32953  else
32954    MEMORY_SIZE=$with_memory_size
32955  fi
32956
32957
32958
32959  # Provide a decent default number of parallel jobs for make depending on
32960  # number of cores, amount of memory and machine architecture.
32961
32962# Check whether --with-jobs was given.
32963if test "${with_jobs+set}" = set; then :
32964  withval=$with_jobs;
32965fi
32966
32967  if test "x$with_jobs" = x; then
32968    # Number of jobs was not specified, calculate.
32969    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
32970$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
32971    # Approximate memory in GB, rounding up a bit.
32972    memory_gb=`expr $MEMORY_SIZE / 1100`
32973    # Pick the lowest of memory in gb and number of cores.
32974    if test "$memory_gb" -lt "$NUM_CORES"; then
32975      JOBS="$memory_gb"
32976    else
32977      JOBS="$NUM_CORES"
32978      # On bigger machines, leave some room for other processes to run
32979      if test "$JOBS" -gt "4"; then
32980        JOBS=`expr $JOBS '*' 90 / 100`
32981      fi
32982    fi
32983    # Cap number of jobs to 16
32984    if test "$JOBS" -gt "16"; then
32985      JOBS=16
32986    fi
32987    if test "$JOBS" -eq "0"; then
32988      JOBS=1
32989    fi
32990    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
32991$as_echo "$JOBS" >&6; }
32992  else
32993    JOBS=$with_jobs
32994  fi
32995
32996
32997
32998# Setup smart javac (after cores and memory have been setup)
32999
33000
33001# Check whether --with-sjavac-server-java was given.
33002if test "${with_sjavac_server_java+set}" = set; then :
33003  withval=$with_sjavac_server_java;
33004fi
33005
33006
33007  if test "x$with_sjavac_server_java" != x; then
33008    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
33009    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
33010    if test "x$FOUND_VERSION" = x; then
33011      as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
33012    fi
33013  else
33014    SJAVAC_SERVER_JAVA=""
33015    # Hotspot specific options.
33016
33017  $ECHO "Check if jvm arg is ok: -verbosegc" >&5
33018  $ECHO "Command: $JAVA -verbosegc -version" >&5
33019  OUTPUT=`$JAVA -verbosegc -version 2>&1`
33020  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33021  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33022  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33023    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -verbosegc"
33024    JVM_ARG_OK=true
33025  else
33026    $ECHO "Arg failed:" >&5
33027    $ECHO "$OUTPUT" >&5
33028    JVM_ARG_OK=false
33029  fi
33030
33031    # JRockit specific options.
33032
33033  $ECHO "Check if jvm arg is ok: -Xverbose:gc" >&5
33034  $ECHO "Command: $JAVA -Xverbose:gc -version" >&5
33035  OUTPUT=`$JAVA -Xverbose:gc -version 2>&1`
33036  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33037  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33038  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33039    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xverbose:gc"
33040    JVM_ARG_OK=true
33041  else
33042    $ECHO "Arg failed:" >&5
33043    $ECHO "$OUTPUT" >&5
33044    JVM_ARG_OK=false
33045  fi
33046
33047    SJAVAC_SERVER_JAVA="$JAVA $SJAVAC_SERVER_JAVA"
33048  fi
33049
33050
33051  if test "$MEMORY_SIZE" -gt "2500"; then
33052
33053  $ECHO "Check if jvm arg is ok: -d64" >&5
33054  $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
33055  OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
33056  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33057  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33058  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33059    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
33060    JVM_ARG_OK=true
33061  else
33062    $ECHO "Arg failed:" >&5
33063    $ECHO "$OUTPUT" >&5
33064    JVM_ARG_OK=false
33065  fi
33066
33067    if test "$JVM_ARG_OK" = true; then
33068      JVM_64BIT=true
33069      JVM_ARG_OK=false
33070    fi
33071  fi
33072
33073  if test "$JVM_64BIT" = true; then
33074    if test "$MEMORY_SIZE" -gt "17000"; then
33075
33076  $ECHO "Check if jvm arg is ok: -Xms10G -Xmx10G" >&5
33077  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version" >&5
33078  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version 2>&1`
33079  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33080  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33081  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33082    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G"
33083    JVM_ARG_OK=true
33084  else
33085    $ECHO "Arg failed:" >&5
33086    $ECHO "$OUTPUT" >&5
33087    JVM_ARG_OK=false
33088  fi
33089
33090    fi
33091    if test "$MEMORY_SIZE" -gt "10000" && test "$JVM_ARG_OK" = false; then
33092
33093  $ECHO "Check if jvm arg is ok: -Xms6G -Xmx6G" >&5
33094  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version" >&5
33095  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version 2>&1`
33096  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33097  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33098  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33099    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G"
33100    JVM_ARG_OK=true
33101  else
33102    $ECHO "Arg failed:" >&5
33103    $ECHO "$OUTPUT" >&5
33104    JVM_ARG_OK=false
33105  fi
33106
33107    fi
33108    if test "$MEMORY_SIZE" -gt "5000" && test "$JVM_ARG_OK" = false; then
33109
33110  $ECHO "Check if jvm arg is ok: -Xms1G -Xmx3G" >&5
33111  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version" >&5
33112  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version 2>&1`
33113  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33114  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33115  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33116    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G"
33117    JVM_ARG_OK=true
33118  else
33119    $ECHO "Arg failed:" >&5
33120    $ECHO "$OUTPUT" >&5
33121    JVM_ARG_OK=false
33122  fi
33123
33124    fi
33125    if test "$MEMORY_SIZE" -gt "3800" && test "$JVM_ARG_OK" = false; then
33126
33127  $ECHO "Check if jvm arg is ok: -Xms1G -Xmx2500M" >&5
33128  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version" >&5
33129  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version 2>&1`
33130  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33131  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33132  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33133    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M"
33134    JVM_ARG_OK=true
33135  else
33136    $ECHO "Arg failed:" >&5
33137    $ECHO "$OUTPUT" >&5
33138    JVM_ARG_OK=false
33139  fi
33140
33141    fi
33142  fi
33143  if test "$MEMORY_SIZE" -gt "2500" && test "$JVM_ARG_OK" = false; then
33144
33145  $ECHO "Check if jvm arg is ok: -Xms1000M -Xmx1500M" >&5
33146  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M -version" >&5
33147  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M -version 2>&1`
33148  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33149  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33150  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33151    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M"
33152    JVM_ARG_OK=true
33153  else
33154    $ECHO "Arg failed:" >&5
33155    $ECHO "$OUTPUT" >&5
33156    JVM_ARG_OK=false
33157  fi
33158
33159  fi
33160  if test "$MEMORY_SIZE" -gt "1000" && test "$JVM_ARG_OK" = false; then
33161
33162  $ECHO "Check if jvm arg is ok: -Xms400M -Xmx1100M" >&5
33163  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version" >&5
33164  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version 2>&1`
33165  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33166  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33167  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33168    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M"
33169    JVM_ARG_OK=true
33170  else
33171    $ECHO "Arg failed:" >&5
33172    $ECHO "$OUTPUT" >&5
33173    JVM_ARG_OK=false
33174  fi
33175
33176  fi
33177  if test "$JVM_ARG_OK" = false; then
33178
33179  $ECHO "Check if jvm arg is ok: -Xms256M -Xmx512M" >&5
33180  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version" >&5
33181  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version 2>&1`
33182  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33183  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33184  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33185    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M"
33186    JVM_ARG_OK=true
33187  else
33188    $ECHO "Arg failed:" >&5
33189    $ECHO "$OUTPUT" >&5
33190    JVM_ARG_OK=false
33191  fi
33192
33193  fi
33194
33195  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
33196$as_echo_n "checking whether to use sjavac... " >&6; }
33197  # Check whether --enable-sjavac was given.
33198if test "${enable_sjavac+set}" = set; then :
33199  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
33200else
33201  ENABLE_SJAVAC='no'
33202fi
33203
33204  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
33205$as_echo "$ENABLE_SJAVAC" >&6; }
33206
33207
33208  if test "x$ENABLE_SJAVAC" = xyes; then
33209    SJAVAC_SERVER_DIR="$OUTPUT_ROOT/javacservers"
33210  else
33211    SJAVAC_SERVER_DIR=
33212  fi
33213
33214
33215
33216# Can the C/C++ compiler use precompiled headers?
33217
33218
33219  ###############################################################################
33220  #
33221  # Can the C/C++ compiler use precompiled headers?
33222  #
33223  # Check whether --enable-precompiled-headers was given.
33224if test "${enable_precompiled_headers+set}" = set; then :
33225  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
33226else
33227  ENABLE_PRECOMPH=yes
33228fi
33229
33230
33231  USE_PRECOMPILED_HEADER=1
33232  if test "x$ENABLE_PRECOMPH" = xno; then
33233    USE_PRECOMPILED_HEADER=0
33234  fi
33235
33236  if test "x$ENABLE_PRECOMPH" = xyes; then
33237    # Check that the compiler actually supports precomp headers.
33238    if test "x$GCC" = xyes; then
33239      { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
33240$as_echo_n "checking that precompiled headers work... " >&6; }
33241      echo "int alfa();" > conftest.h
33242      $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
33243      if test ! -f conftest.hpp.gch; then
33244        USE_PRECOMPILED_HEADER=0
33245        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33246$as_echo "no" >&6; }
33247      else
33248        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
33249$as_echo "yes" >&6; }
33250      fi
33251      rm -f conftest.h conftest.hpp.gch
33252    fi
33253  fi
33254
33255
33256
33257
33258# Setup use of ccache, if available
33259
33260  # Check whether --enable-ccache was given.
33261if test "${enable_ccache+set}" = set; then :
33262  enableval=$enable_ccache; ENABLE_CCACHE=${enable_ccache}
33263else
33264  ENABLE_CCACHE=yes
33265fi
33266
33267  if test "x$ENABLE_CCACHE" = xyes; then
33268    OLD_PATH="$PATH"
33269    if test "x$TOOLS_DIR" != x; then
33270      PATH=$TOOLS_DIR:$PATH
33271    fi
33272    # Extract the first word of "ccache", so it can be a program name with args.
33273set dummy ccache; ac_word=$2
33274{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33275$as_echo_n "checking for $ac_word... " >&6; }
33276if ${ac_cv_path_CCACHE+:} false; then :
33277  $as_echo_n "(cached) " >&6
33278else
33279  case $CCACHE in
33280  [\\/]* | ?:[\\/]*)
33281  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
33282  ;;
33283  *)
33284  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33285for as_dir in $PATH
33286do
33287  IFS=$as_save_IFS
33288  test -z "$as_dir" && as_dir=.
33289    for ac_exec_ext in '' $ac_executable_extensions; do
33290  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33291    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
33292    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33293    break 2
33294  fi
33295done
33296  done
33297IFS=$as_save_IFS
33298
33299  ;;
33300esac
33301fi
33302CCACHE=$ac_cv_path_CCACHE
33303if test -n "$CCACHE"; then
33304  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
33305$as_echo "$CCACHE" >&6; }
33306else
33307  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33308$as_echo "no" >&6; }
33309fi
33310
33311
33312    PATH="$OLD_PATH"
33313  else
33314    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ccache" >&5
33315$as_echo_n "checking for ccache... " >&6; }
33316    { $as_echo "$as_me:${as_lineno-$LINENO}: result: explicitly disabled" >&5
33317$as_echo "explicitly disabled" >&6; }
33318    CCACHE=
33319  fi
33320
33321
33322
33323# Check whether --with-ccache-dir was given.
33324if test "${with_ccache_dir+set}" = set; then :
33325  withval=$with_ccache_dir;
33326fi
33327
33328
33329  if test "x$with_ccache_dir" != x; then
33330    # When using a non home ccache directory, assume the use is to share ccache files
33331    # with other users. Thus change the umask.
33332    SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
33333  fi
33334  CCACHE_FOUND=""
33335  if test "x$CCACHE" != x; then
33336
33337  if test "x$CCACHE" != x; then
33338    CCACHE_FOUND="true"
33339    # Only use ccache if it is 3.1.4 or later, which supports
33340    # precompiled headers.
33341    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ccache supports precompiled headers" >&5
33342$as_echo_n "checking if ccache supports precompiled headers... " >&6; }
33343    HAS_GOOD_CCACHE=`($CCACHE --version | head -n 1 | grep -E 3.1.[456789]) 2> /dev/null`
33344    if test "x$HAS_GOOD_CCACHE" = x; then
33345      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccache" >&5
33346$as_echo "no, disabling ccache" >&6; }
33347      CCACHE=
33348    else
33349      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
33350$as_echo "yes" >&6; }
33351      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
33352$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
33353      PUSHED_FLAGS="$CXXFLAGS"
33354      CXXFLAGS="-fpch-preprocess $CXXFLAGS"
33355      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33356/* end confdefs.h.  */
33357
33358int
33359main ()
33360{
33361
33362  ;
33363  return 0;
33364}
33365_ACEOF
33366if ac_fn_cxx_try_compile "$LINENO"; then :
33367  CC_KNOWS_CCACHE_TRICK=yes
33368else
33369  CC_KNOWS_CCACHE_TRICK=no
33370fi
33371rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33372      CXXFLAGS="$PUSHED_FLAGS"
33373      if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
33374        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
33375$as_echo "yes" >&6; }
33376      else
33377        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccaching of precompiled headers" >&5
33378$as_echo "no, disabling ccaching of precompiled headers" >&6; }
33379        CCACHE=
33380      fi
33381    fi
33382  fi
33383
33384  if test "x$CCACHE" != x; then
33385    CCACHE_SLOPPINESS=time_macros
33386    CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS $CCACHE"
33387    CCACHE_FLAGS=-fpch-preprocess
33388
33389    if test "x$SET_CCACHE_DIR" != x; then
33390      mkdir -p $CCACHE_DIR > /dev/null 2>&1
33391      chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
33392    fi
33393  fi
33394
33395  fi
33396
33397
33398###############################################################################
33399#
33400# And now the finish...
33401#
33402###############################################################################
33403
33404# Check for some common pitfalls
33405
33406  if test x"$OPENJDK_BUILD_OS" = xwindows; then
33407    file_to_test="$SRC_ROOT/LICENSE"
33408    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
33409      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
33410    fi
33411  fi
33412
33413
33414  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
33415$as_echo_n "checking if build directory is on local disk... " >&6; }
33416
33417  # df -l lists only local disks; if the given directory is not found then
33418  # a non-zero exit code is given
33419  if test "x$DF" = x; then
33420    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33421      # msys does not have df; use Windows "net use" instead.
33422      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
33423      if test "x$IS_NETWORK_DISK" = x; then
33424        OUTPUT_DIR_IS_LOCAL="yes"
33425      else
33426        OUTPUT_DIR_IS_LOCAL="no"
33427      fi
33428    else
33429      # No df here, say it's local
33430      OUTPUT_DIR_IS_LOCAL="yes"
33431    fi
33432  else
33433    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
33434      OUTPUT_DIR_IS_LOCAL="yes"
33435    else
33436      OUTPUT_DIR_IS_LOCAL="no"
33437    fi
33438  fi
33439
33440  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
33441$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
33442
33443
33444
33445  # Check if the user has any old-style ALT_ variables set.
33446  FOUND_ALT_VARIABLES=`env | grep ^ALT_`
33447
33448  # Before generating output files, test if they exist. If they do, this is a reconfigure.
33449  # Since we can't properly handle the dependencies for this, warn the user about the situation
33450  if test -e $OUTPUT_ROOT/spec.gmk; then
33451    IS_RECONFIGURE=yes
33452  else
33453    IS_RECONFIGURE=no
33454  fi
33455
33456  if test -e $SRC_ROOT/build/.hide-configure-performance-hints; then
33457    HIDE_PERFORMANCE_HINTS=yes
33458  else
33459    HIDE_PERFORMANCE_HINTS=no
33460    # Hide it the next time around...
33461    $TOUCH $SRC_ROOT/build/.hide-configure-performance-hints > /dev/null 2>&1
33462  fi
33463
33464
33465# At the end, call the custom hook. (Dummy macro if no custom sources available)
33466
33467
33468# We're messing a bit with internal autoconf variables to put the config.status
33469# in the output directory instead of the current directory.
33470CONFIG_STATUS="$OUTPUT_ROOT/config.status"
33471
33472# Create the actual output files. Now the main work of configure is done.
33473cat >confcache <<\_ACEOF
33474# This file is a shell script that caches the results of configure
33475# tests run on this system so they can be shared between configure
33476# scripts and configure runs, see configure's option --config-cache.
33477# It is not useful on other systems.  If it contains results you don't
33478# want to keep, you may remove or edit it.
33479#
33480# config.status only pays attention to the cache file if you give it
33481# the --recheck option to rerun configure.
33482#
33483# `ac_cv_env_foo' variables (set or unset) will be overridden when
33484# loading this file, other *unset* `ac_cv_foo' will be assigned the
33485# following values.
33486
33487_ACEOF
33488
33489# The following way of writing the cache mishandles newlines in values,
33490# but we know of no workaround that is simple, portable, and efficient.
33491# So, we kill variables containing newlines.
33492# Ultrix sh set writes to stderr and can't be redirected directly,
33493# and sets the high bit in the cache file unless we assign to the vars.
33494(
33495  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
33496    eval ac_val=\$$ac_var
33497    case $ac_val in #(
33498    *${as_nl}*)
33499      case $ac_var in #(
33500      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
33501$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
33502      esac
33503      case $ac_var in #(
33504      _ | IFS | as_nl) ;; #(
33505      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
33506      *) { eval $ac_var=; unset $ac_var;} ;;
33507      esac ;;
33508    esac
33509  done
33510
33511  (set) 2>&1 |
33512    case $as_nl`(ac_space=' '; set) 2>&1` in #(
33513    *${as_nl}ac_space=\ *)
33514      # `set' does not quote correctly, so add quotes: double-quote
33515      # substitution turns \\\\ into \\, and sed turns \\ into \.
33516      sed -n \
33517	"s/'/'\\\\''/g;
33518	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
33519      ;; #(
33520    *)
33521      # `set' quotes correctly as required by POSIX, so do not add quotes.
33522      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
33523      ;;
33524    esac |
33525    sort
33526) |
33527  sed '
33528     /^ac_cv_env_/b end
33529     t clear
33530     :clear
33531     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
33532     t end
33533     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
33534     :end' >>confcache
33535if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
33536  if test -w "$cache_file"; then
33537    if test "x$cache_file" != "x/dev/null"; then
33538      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
33539$as_echo "$as_me: updating cache $cache_file" >&6;}
33540      if test ! -f "$cache_file" || test -h "$cache_file"; then
33541	cat confcache >"$cache_file"
33542      else
33543        case $cache_file in #(
33544        */* | ?:*)
33545	  mv -f confcache "$cache_file"$$ &&
33546	  mv -f "$cache_file"$$ "$cache_file" ;; #(
33547        *)
33548	  mv -f confcache "$cache_file" ;;
33549	esac
33550      fi
33551    fi
33552  else
33553    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
33554$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
33555  fi
33556fi
33557rm -f confcache
33558
33559test "x$prefix" = xNONE && prefix=$ac_default_prefix
33560# Let make expand exec_prefix.
33561test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
33562
33563DEFS=-DHAVE_CONFIG_H
33564
33565ac_libobjs=
33566ac_ltlibobjs=
33567U=
33568for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
33569  # 1. Remove the extension, and $U if already installed.
33570  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
33571  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
33572  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
33573  #    will be set to the directory where LIBOBJS objects are built.
33574  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
33575  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
33576done
33577LIBOBJS=$ac_libobjs
33578
33579LTLIBOBJS=$ac_ltlibobjs
33580
33581
33582
33583: "${CONFIG_STATUS=./config.status}"
33584ac_write_fail=0
33585ac_clean_files_save=$ac_clean_files
33586ac_clean_files="$ac_clean_files $CONFIG_STATUS"
33587{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
33588$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
33589as_write_fail=0
33590cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
33591#! $SHELL
33592# Generated by $as_me.
33593# Run this file to recreate the current configuration.
33594# Compiler output produced by configure, useful for debugging
33595# configure, is in config.log if it exists.
33596
33597debug=false
33598ac_cs_recheck=false
33599ac_cs_silent=false
33600
33601SHELL=\${CONFIG_SHELL-$SHELL}
33602export SHELL
33603_ASEOF
33604cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
33605## -------------------- ##
33606## M4sh Initialization. ##
33607## -------------------- ##
33608
33609# Be more Bourne compatible
33610DUALCASE=1; export DUALCASE # for MKS sh
33611if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
33612  emulate sh
33613  NULLCMD=:
33614  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
33615  # is contrary to our usage.  Disable this feature.
33616  alias -g '${1+"$@"}'='"$@"'
33617  setopt NO_GLOB_SUBST
33618else
33619  case `(set -o) 2>/dev/null` in #(
33620  *posix*) :
33621    set -o posix ;; #(
33622  *) :
33623     ;;
33624esac
33625fi
33626
33627
33628as_nl='
33629'
33630export as_nl
33631# Printing a long string crashes Solaris 7 /usr/bin/printf.
33632as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
33633as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
33634as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
33635# Prefer a ksh shell builtin over an external printf program on Solaris,
33636# but without wasting forks for bash or zsh.
33637if test -z "$BASH_VERSION$ZSH_VERSION" \
33638    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
33639  as_echo='print -r --'
33640  as_echo_n='print -rn --'
33641elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
33642  as_echo='printf %s\n'
33643  as_echo_n='printf %s'
33644else
33645  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
33646    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
33647    as_echo_n='/usr/ucb/echo -n'
33648  else
33649    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
33650    as_echo_n_body='eval
33651      arg=$1;
33652      case $arg in #(
33653      *"$as_nl"*)
33654	expr "X$arg" : "X\\(.*\\)$as_nl";
33655	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
33656      esac;
33657      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
33658    '
33659    export as_echo_n_body
33660    as_echo_n='sh -c $as_echo_n_body as_echo'
33661  fi
33662  export as_echo_body
33663  as_echo='sh -c $as_echo_body as_echo'
33664fi
33665
33666# The user is always right.
33667if test "${PATH_SEPARATOR+set}" != set; then
33668  PATH_SEPARATOR=:
33669  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
33670    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
33671      PATH_SEPARATOR=';'
33672  }
33673fi
33674
33675
33676# IFS
33677# We need space, tab and new line, in precisely that order.  Quoting is
33678# there to prevent editors from complaining about space-tab.
33679# (If _AS_PATH_WALK were called with IFS unset, it would disable word
33680# splitting by setting IFS to empty value.)
33681IFS=" ""	$as_nl"
33682
33683# Find who we are.  Look in the path if we contain no directory separator.
33684as_myself=
33685case $0 in #((
33686  *[\\/]* ) as_myself=$0 ;;
33687  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33688for as_dir in $PATH
33689do
33690  IFS=$as_save_IFS
33691  test -z "$as_dir" && as_dir=.
33692    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
33693  done
33694IFS=$as_save_IFS
33695
33696     ;;
33697esac
33698# We did not find ourselves, most probably we were run as `sh COMMAND'
33699# in which case we are not to be found in the path.
33700if test "x$as_myself" = x; then
33701  as_myself=$0
33702fi
33703if test ! -f "$as_myself"; then
33704  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
33705  exit 1
33706fi
33707
33708# Unset variables that we do not need and which cause bugs (e.g. in
33709# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
33710# suppresses any "Segmentation fault" message there.  '((' could
33711# trigger a bug in pdksh 5.2.14.
33712for as_var in BASH_ENV ENV MAIL MAILPATH
33713do eval test x\${$as_var+set} = xset \
33714  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
33715done
33716PS1='$ '
33717PS2='> '
33718PS4='+ '
33719
33720# NLS nuisances.
33721LC_ALL=C
33722export LC_ALL
33723LANGUAGE=C
33724export LANGUAGE
33725
33726# CDPATH.
33727(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
33728
33729
33730# as_fn_error STATUS ERROR [LINENO LOG_FD]
33731# ----------------------------------------
33732# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
33733# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
33734# script with STATUS, using 1 if that was 0.
33735as_fn_error ()
33736{
33737  as_status=$1; test $as_status -eq 0 && as_status=1
33738  if test "$4"; then
33739    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
33740    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
33741  fi
33742  $as_echo "$as_me: error: $2" >&2
33743  as_fn_exit $as_status
33744} # as_fn_error
33745
33746
33747# as_fn_set_status STATUS
33748# -----------------------
33749# Set $? to STATUS, without forking.
33750as_fn_set_status ()
33751{
33752  return $1
33753} # as_fn_set_status
33754
33755# as_fn_exit STATUS
33756# -----------------
33757# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
33758as_fn_exit ()
33759{
33760  set +e
33761  as_fn_set_status $1
33762  exit $1
33763} # as_fn_exit
33764
33765# as_fn_unset VAR
33766# ---------------
33767# Portably unset VAR.
33768as_fn_unset ()
33769{
33770  { eval $1=; unset $1;}
33771}
33772as_unset=as_fn_unset
33773# as_fn_append VAR VALUE
33774# ----------------------
33775# Append the text in VALUE to the end of the definition contained in VAR. Take
33776# advantage of any shell optimizations that allow amortized linear growth over
33777# repeated appends, instead of the typical quadratic growth present in naive
33778# implementations.
33779if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
33780  eval 'as_fn_append ()
33781  {
33782    eval $1+=\$2
33783  }'
33784else
33785  as_fn_append ()
33786  {
33787    eval $1=\$$1\$2
33788  }
33789fi # as_fn_append
33790
33791# as_fn_arith ARG...
33792# ------------------
33793# Perform arithmetic evaluation on the ARGs, and store the result in the
33794# global $as_val. Take advantage of shells that can avoid forks. The arguments
33795# must be portable across $(()) and expr.
33796if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
33797  eval 'as_fn_arith ()
33798  {
33799    as_val=$(( $* ))
33800  }'
33801else
33802  as_fn_arith ()
33803  {
33804    as_val=`expr "$@" || test $? -eq 1`
33805  }
33806fi # as_fn_arith
33807
33808
33809if expr a : '\(a\)' >/dev/null 2>&1 &&
33810   test "X`expr 00001 : '.*\(...\)'`" = X001; then
33811  as_expr=expr
33812else
33813  as_expr=false
33814fi
33815
33816if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
33817  as_basename=basename
33818else
33819  as_basename=false
33820fi
33821
33822if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
33823  as_dirname=dirname
33824else
33825  as_dirname=false
33826fi
33827
33828as_me=`$as_basename -- "$0" ||
33829$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
33830	 X"$0" : 'X\(//\)$' \| \
33831	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
33832$as_echo X/"$0" |
33833    sed '/^.*\/\([^/][^/]*\)\/*$/{
33834	    s//\1/
33835	    q
33836	  }
33837	  /^X\/\(\/\/\)$/{
33838	    s//\1/
33839	    q
33840	  }
33841	  /^X\/\(\/\).*/{
33842	    s//\1/
33843	    q
33844	  }
33845	  s/.*/./; q'`
33846
33847# Avoid depending upon Character Ranges.
33848as_cr_letters='abcdefghijklmnopqrstuvwxyz'
33849as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
33850as_cr_Letters=$as_cr_letters$as_cr_LETTERS
33851as_cr_digits='0123456789'
33852as_cr_alnum=$as_cr_Letters$as_cr_digits
33853
33854ECHO_C= ECHO_N= ECHO_T=
33855case `echo -n x` in #(((((
33856-n*)
33857  case `echo 'xy\c'` in
33858  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
33859  xy)  ECHO_C='\c';;
33860  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
33861       ECHO_T='	';;
33862  esac;;
33863*)
33864  ECHO_N='-n';;
33865esac
33866
33867rm -f conf$$ conf$$.exe conf$$.file
33868if test -d conf$$.dir; then
33869  rm -f conf$$.dir/conf$$.file
33870else
33871  rm -f conf$$.dir
33872  mkdir conf$$.dir 2>/dev/null
33873fi
33874if (echo >conf$$.file) 2>/dev/null; then
33875  if ln -s conf$$.file conf$$ 2>/dev/null; then
33876    as_ln_s='ln -s'
33877    # ... but there are two gotchas:
33878    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
33879    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
33880    # In both cases, we have to default to `cp -pR'.
33881    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
33882      as_ln_s='cp -pR'
33883  elif ln conf$$.file conf$$ 2>/dev/null; then
33884    as_ln_s=ln
33885  else
33886    as_ln_s='cp -pR'
33887  fi
33888else
33889  as_ln_s='cp -pR'
33890fi
33891rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
33892rmdir conf$$.dir 2>/dev/null
33893
33894
33895# as_fn_mkdir_p
33896# -------------
33897# Create "$as_dir" as a directory, including parents if necessary.
33898as_fn_mkdir_p ()
33899{
33900
33901  case $as_dir in #(
33902  -*) as_dir=./$as_dir;;
33903  esac
33904  test -d "$as_dir" || eval $as_mkdir_p || {
33905    as_dirs=
33906    while :; do
33907      case $as_dir in #(
33908      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
33909      *) as_qdir=$as_dir;;
33910      esac
33911      as_dirs="'$as_qdir' $as_dirs"
33912      as_dir=`$as_dirname -- "$as_dir" ||
33913$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
33914	 X"$as_dir" : 'X\(//\)[^/]' \| \
33915	 X"$as_dir" : 'X\(//\)$' \| \
33916	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
33917$as_echo X"$as_dir" |
33918    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
33919	    s//\1/
33920	    q
33921	  }
33922	  /^X\(\/\/\)[^/].*/{
33923	    s//\1/
33924	    q
33925	  }
33926	  /^X\(\/\/\)$/{
33927	    s//\1/
33928	    q
33929	  }
33930	  /^X\(\/\).*/{
33931	    s//\1/
33932	    q
33933	  }
33934	  s/.*/./; q'`
33935      test -d "$as_dir" && break
33936    done
33937    test -z "$as_dirs" || eval "mkdir $as_dirs"
33938  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
33939
33940
33941} # as_fn_mkdir_p
33942if mkdir -p . 2>/dev/null; then
33943  as_mkdir_p='mkdir -p "$as_dir"'
33944else
33945  test -d ./-p && rmdir ./-p
33946  as_mkdir_p=false
33947fi
33948
33949
33950# as_fn_executable_p FILE
33951# -----------------------
33952# Test if FILE is an executable regular file.
33953as_fn_executable_p ()
33954{
33955  test -f "$1" && test -x "$1"
33956} # as_fn_executable_p
33957as_test_x='test -x'
33958as_executable_p=as_fn_executable_p
33959
33960# Sed expression to map a string onto a valid CPP name.
33961as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
33962
33963# Sed expression to map a string onto a valid variable name.
33964as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
33965
33966
33967exec 6>&1
33968## ----------------------------------- ##
33969## Main body of $CONFIG_STATUS script. ##
33970## ----------------------------------- ##
33971_ASEOF
33972test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
33973
33974cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
33975# Save the log message, to keep $0 and so on meaningful, and to
33976# report actual input values of CONFIG_FILES etc. instead of their
33977# values after options handling.
33978ac_log="
33979This file was extended by OpenJDK $as_me jdk8, which was
33980generated by GNU Autoconf 2.69.  Invocation command line was
33981
33982  CONFIG_FILES    = $CONFIG_FILES
33983  CONFIG_HEADERS  = $CONFIG_HEADERS
33984  CONFIG_LINKS    = $CONFIG_LINKS
33985  CONFIG_COMMANDS = $CONFIG_COMMANDS
33986  $ $0 $@
33987
33988on `(hostname || uname -n) 2>/dev/null | sed 1q`
33989"
33990
33991_ACEOF
33992
33993case $ac_config_files in *"
33994"*) set x $ac_config_files; shift; ac_config_files=$*;;
33995esac
33996
33997case $ac_config_headers in *"
33998"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
33999esac
34000
34001
34002cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34003# Files that config.status was made for.
34004config_files="$ac_config_files"
34005config_headers="$ac_config_headers"
34006
34007_ACEOF
34008
34009cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34010ac_cs_usage="\
34011\`$as_me' instantiates files and other configuration actions
34012from templates according to the current configuration.  Unless the files
34013and actions are specified as TAGs, all are instantiated by default.
34014
34015Usage: $0 [OPTION]... [TAG]...
34016
34017  -h, --help       print this help, then exit
34018  -V, --version    print version number and configuration settings, then exit
34019      --config     print configuration, then exit
34020  -q, --quiet, --silent
34021                   do not print progress messages
34022  -d, --debug      don't remove temporary files
34023      --recheck    update $as_me by reconfiguring in the same conditions
34024      --file=FILE[:TEMPLATE]
34025                   instantiate the configuration file FILE
34026      --header=FILE[:TEMPLATE]
34027                   instantiate the configuration header FILE
34028
34029Configuration files:
34030$config_files
34031
34032Configuration headers:
34033$config_headers
34034
34035Report bugs to <build-dev@openjdk.java.net>.
34036OpenJDK home page: <http://openjdk.java.net>."
34037
34038_ACEOF
34039cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34040ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
34041ac_cs_version="\\
34042OpenJDK config.status jdk8
34043configured by $0, generated by GNU Autoconf 2.69,
34044  with options \\"\$ac_cs_config\\"
34045
34046Copyright (C) 2012 Free Software Foundation, Inc.
34047This config.status script is free software; the Free Software Foundation
34048gives unlimited permission to copy, distribute and modify it."
34049
34050ac_pwd='$ac_pwd'
34051srcdir='$srcdir'
34052AWK='$AWK'
34053test -n "\$AWK" || AWK=awk
34054_ACEOF
34055
34056cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34057# The default lists apply if the user does not specify any file.
34058ac_need_defaults=:
34059while test $# != 0
34060do
34061  case $1 in
34062  --*=?*)
34063    ac_option=`expr "X$1" : 'X\([^=]*\)='`
34064    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
34065    ac_shift=:
34066    ;;
34067  --*=)
34068    ac_option=`expr "X$1" : 'X\([^=]*\)='`
34069    ac_optarg=
34070    ac_shift=:
34071    ;;
34072  *)
34073    ac_option=$1
34074    ac_optarg=$2
34075    ac_shift=shift
34076    ;;
34077  esac
34078
34079  case $ac_option in
34080  # Handling of the options.
34081  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
34082    ac_cs_recheck=: ;;
34083  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
34084    $as_echo "$ac_cs_version"; exit ;;
34085  --config | --confi | --conf | --con | --co | --c )
34086    $as_echo "$ac_cs_config"; exit ;;
34087  --debug | --debu | --deb | --de | --d | -d )
34088    debug=: ;;
34089  --file | --fil | --fi | --f )
34090    $ac_shift
34091    case $ac_optarg in
34092    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
34093    '') as_fn_error $? "missing file argument" ;;
34094    esac
34095    as_fn_append CONFIG_FILES " '$ac_optarg'"
34096    ac_need_defaults=false;;
34097  --header | --heade | --head | --hea )
34098    $ac_shift
34099    case $ac_optarg in
34100    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
34101    esac
34102    as_fn_append CONFIG_HEADERS " '$ac_optarg'"
34103    ac_need_defaults=false;;
34104  --he | --h)
34105    # Conflict between --help and --header
34106    as_fn_error $? "ambiguous option: \`$1'
34107Try \`$0 --help' for more information.";;
34108  --help | --hel | -h )
34109    $as_echo "$ac_cs_usage"; exit ;;
34110  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
34111  | -silent | --silent | --silen | --sile | --sil | --si | --s)
34112    ac_cs_silent=: ;;
34113
34114  # This is an error.
34115  -*) as_fn_error $? "unrecognized option: \`$1'
34116Try \`$0 --help' for more information." ;;
34117
34118  *) as_fn_append ac_config_targets " $1"
34119     ac_need_defaults=false ;;
34120
34121  esac
34122  shift
34123done
34124
34125ac_configure_extra_args=
34126
34127if $ac_cs_silent; then
34128  exec 6>/dev/null
34129  ac_configure_extra_args="$ac_configure_extra_args --silent"
34130fi
34131
34132_ACEOF
34133cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34134if \$ac_cs_recheck; then
34135  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
34136  shift
34137  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
34138  CONFIG_SHELL='$SHELL'
34139  export CONFIG_SHELL
34140  exec "\$@"
34141fi
34142
34143_ACEOF
34144cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34145exec 5>>config.log
34146{
34147  echo
34148  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
34149## Running $as_me. ##
34150_ASBOX
34151  $as_echo "$ac_log"
34152} >&5
34153
34154_ACEOF
34155cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34156_ACEOF
34157
34158cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34159
34160# Handling of arguments.
34161for ac_config_target in $ac_config_targets
34162do
34163  case $ac_config_target in
34164    "$OUTPUT_ROOT/config.h") CONFIG_HEADERS="$CONFIG_HEADERS $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in" ;;
34165    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
34166    "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
34167    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
34168    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
34169    "$OUTPUT_ROOT/spec.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in" ;;
34170    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
34171
34172  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
34173  esac
34174done
34175
34176
34177# If the user did not use the arguments to specify the items to instantiate,
34178# then the envvar interface is used.  Set only those that are not.
34179# We use the long form for the default assignment because of an extremely
34180# bizarre bug on SunOS 4.1.3.
34181if $ac_need_defaults; then
34182  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
34183  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
34184fi
34185
34186# Have a temporary directory for convenience.  Make it in the build tree
34187# simply because there is no reason against having it here, and in addition,
34188# creating and moving files from /tmp can sometimes cause problems.
34189# Hook for its removal unless debugging.
34190# Note that there is a small window in which the directory will not be cleaned:
34191# after its creation but before its name has been assigned to `$tmp'.
34192$debug ||
34193{
34194  tmp= ac_tmp=
34195  trap 'exit_status=$?
34196  : "${ac_tmp:=$tmp}"
34197  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
34198' 0
34199  trap 'as_fn_exit 1' 1 2 13 15
34200}
34201# Create a (secure) tmp directory for tmp files.
34202
34203{
34204  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
34205  test -d "$tmp"
34206}  ||
34207{
34208  tmp=./conf$$-$RANDOM
34209  (umask 077 && mkdir "$tmp")
34210} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
34211ac_tmp=$tmp
34212
34213# Set up the scripts for CONFIG_FILES section.
34214# No need to generate them if there are no CONFIG_FILES.
34215# This happens for instance with `./config.status config.h'.
34216if test -n "$CONFIG_FILES"; then
34217
34218
34219ac_cr=`echo X | tr X '\015'`
34220# On cygwin, bash can eat \r inside `` if the user requested igncr.
34221# But we know of no other shell where ac_cr would be empty at this
34222# point, so we can use a bashism as a fallback.
34223if test "x$ac_cr" = x; then
34224  eval ac_cr=\$\'\\r\'
34225fi
34226ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
34227if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
34228  ac_cs_awk_cr='\\r'
34229else
34230  ac_cs_awk_cr=$ac_cr
34231fi
34232
34233echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
34234_ACEOF
34235
34236
34237{
34238  echo "cat >conf$$subs.awk <<_ACEOF" &&
34239  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
34240  echo "_ACEOF"
34241} >conf$$subs.sh ||
34242  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
34243ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
34244ac_delim='%!_!# '
34245for ac_last_try in false false false false false :; do
34246  . ./conf$$subs.sh ||
34247    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
34248
34249  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
34250  if test $ac_delim_n = $ac_delim_num; then
34251    break
34252  elif $ac_last_try; then
34253    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
34254  else
34255    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
34256  fi
34257done
34258rm -f conf$$subs.sh
34259
34260cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34261cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
34262_ACEOF
34263sed -n '
34264h
34265s/^/S["/; s/!.*/"]=/
34266p
34267g
34268s/^[^!]*!//
34269:repl
34270t repl
34271s/'"$ac_delim"'$//
34272t delim
34273:nl
34274h
34275s/\(.\{148\}\)..*/\1/
34276t more1
34277s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
34278p
34279n
34280b repl
34281:more1
34282s/["\\]/\\&/g; s/^/"/; s/$/"\\/
34283p
34284g
34285s/.\{148\}//
34286t nl
34287:delim
34288h
34289s/\(.\{148\}\)..*/\1/
34290t more2
34291s/["\\]/\\&/g; s/^/"/; s/$/"/
34292p
34293b
34294:more2
34295s/["\\]/\\&/g; s/^/"/; s/$/"\\/
34296p
34297g
34298s/.\{148\}//
34299t delim
34300' <conf$$subs.awk | sed '
34301/^[^""]/{
34302  N
34303  s/\n//
34304}
34305' >>$CONFIG_STATUS || ac_write_fail=1
34306rm -f conf$$subs.awk
34307cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34308_ACAWK
34309cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
34310  for (key in S) S_is_set[key] = 1
34311  FS = ""
34312
34313}
34314{
34315  line = $ 0
34316  nfields = split(line, field, "@")
34317  substed = 0
34318  len = length(field[1])
34319  for (i = 2; i < nfields; i++) {
34320    key = field[i]
34321    keylen = length(key)
34322    if (S_is_set[key]) {
34323      value = S[key]
34324      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
34325      len += length(value) + length(field[++i])
34326      substed = 1
34327    } else
34328      len += 1 + keylen
34329  }
34330
34331  print line
34332}
34333
34334_ACAWK
34335_ACEOF
34336cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34337if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
34338  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
34339else
34340  cat
34341fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
34342  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
34343_ACEOF
34344
34345# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
34346# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
34347# trailing colons and then remove the whole line if VPATH becomes empty
34348# (actually we leave an empty line to preserve line numbers).
34349if test "x$srcdir" = x.; then
34350  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
34351h
34352s///
34353s/^/:/
34354s/[	 ]*$/:/
34355s/:\$(srcdir):/:/g
34356s/:\${srcdir}:/:/g
34357s/:@srcdir@:/:/g
34358s/^:*//
34359s/:*$//
34360x
34361s/\(=[	 ]*\).*/\1/
34362G
34363s/\n//
34364s/^[^=]*=[	 ]*$//
34365}'
34366fi
34367
34368cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34369fi # test -n "$CONFIG_FILES"
34370
34371# Set up the scripts for CONFIG_HEADERS section.
34372# No need to generate them if there are no CONFIG_HEADERS.
34373# This happens for instance with `./config.status Makefile'.
34374if test -n "$CONFIG_HEADERS"; then
34375cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
34376BEGIN {
34377_ACEOF
34378
34379# Transform confdefs.h into an awk script `defines.awk', embedded as
34380# here-document in config.status, that substitutes the proper values into
34381# config.h.in to produce config.h.
34382
34383# Create a delimiter string that does not exist in confdefs.h, to ease
34384# handling of long lines.
34385ac_delim='%!_!# '
34386for ac_last_try in false false :; do
34387  ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
34388  if test -z "$ac_tt"; then
34389    break
34390  elif $ac_last_try; then
34391    as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
34392  else
34393    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
34394  fi
34395done
34396
34397# For the awk script, D is an array of macro values keyed by name,
34398# likewise P contains macro parameters if any.  Preserve backslash
34399# newline sequences.
34400
34401ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
34402sed -n '
34403s/.\{148\}/&'"$ac_delim"'/g
34404t rset
34405:rset
34406s/^[	 ]*#[	 ]*define[	 ][	 ]*/ /
34407t def
34408d
34409:def
34410s/\\$//
34411t bsnl
34412s/["\\]/\\&/g
34413s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
34414D["\1"]=" \3"/p
34415s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2"/p
34416d
34417:bsnl
34418s/["\\]/\\&/g
34419s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
34420D["\1"]=" \3\\\\\\n"\\/p
34421t cont
34422s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
34423t cont
34424d
34425:cont
34426n
34427s/.\{148\}/&'"$ac_delim"'/g
34428t clear
34429:clear
34430s/\\$//
34431t bsnlc
34432s/["\\]/\\&/g; s/^/"/; s/$/"/p
34433d
34434:bsnlc
34435s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
34436b cont
34437' <confdefs.h | sed '
34438s/'"$ac_delim"'/"\\\
34439"/g' >>$CONFIG_STATUS || ac_write_fail=1
34440
34441cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34442  for (key in D) D_is_set[key] = 1
34443  FS = ""
34444}
34445/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
34446  line = \$ 0
34447  split(line, arg, " ")
34448  if (arg[1] == "#") {
34449    defundef = arg[2]
34450    mac1 = arg[3]
34451  } else {
34452    defundef = substr(arg[1], 2)
34453    mac1 = arg[2]
34454  }
34455  split(mac1, mac2, "(") #)
34456  macro = mac2[1]
34457  prefix = substr(line, 1, index(line, defundef) - 1)
34458  if (D_is_set[macro]) {
34459    # Preserve the white space surrounding the "#".
34460    print prefix "define", macro P[macro] D[macro]
34461    next
34462  } else {
34463    # Replace #undef with comments.  This is necessary, for example,
34464    # in the case of _POSIX_SOURCE, which is predefined and required
34465    # on some systems where configure will not decide to define it.
34466    if (defundef == "undef") {
34467      print "/*", prefix defundef, macro, "*/"
34468      next
34469    }
34470  }
34471}
34472{ print }
34473_ACAWK
34474_ACEOF
34475cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34476  as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
34477fi # test -n "$CONFIG_HEADERS"
34478
34479
34480eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    "
34481shift
34482for ac_tag
34483do
34484  case $ac_tag in
34485  :[FHLC]) ac_mode=$ac_tag; continue;;
34486  esac
34487  case $ac_mode$ac_tag in
34488  :[FHL]*:*);;
34489  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
34490  :[FH]-) ac_tag=-:-;;
34491  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
34492  esac
34493  ac_save_IFS=$IFS
34494  IFS=:
34495  set x $ac_tag
34496  IFS=$ac_save_IFS
34497  shift
34498  ac_file=$1
34499  shift
34500
34501  case $ac_mode in
34502  :L) ac_source=$1;;
34503  :[FH])
34504    ac_file_inputs=
34505    for ac_f
34506    do
34507      case $ac_f in
34508      -) ac_f="$ac_tmp/stdin";;
34509      *) # Look for the file first in the build tree, then in the source tree
34510	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
34511	 # because $ac_f cannot contain `:'.
34512	 test -f "$ac_f" ||
34513	   case $ac_f in
34514	   [\\/$]*) false;;
34515	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
34516	   esac ||
34517	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
34518      esac
34519      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
34520      as_fn_append ac_file_inputs " '$ac_f'"
34521    done
34522
34523    # Let's still pretend it is `configure' which instantiates (i.e., don't
34524    # use $as_me), people would be surprised to read:
34525    #    /* config.h.  Generated by config.status.  */
34526    configure_input='Generated from '`
34527	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
34528	`' by configure.'
34529    if test x"$ac_file" != x-; then
34530      configure_input="$ac_file.  $configure_input"
34531      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
34532$as_echo "$as_me: creating $ac_file" >&6;}
34533    fi
34534    # Neutralize special characters interpreted by sed in replacement strings.
34535    case $configure_input in #(
34536    *\&* | *\|* | *\\* )
34537       ac_sed_conf_input=`$as_echo "$configure_input" |
34538       sed 's/[\\\\&|]/\\\\&/g'`;; #(
34539    *) ac_sed_conf_input=$configure_input;;
34540    esac
34541
34542    case $ac_tag in
34543    *:-:* | *:-) cat >"$ac_tmp/stdin" \
34544      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
34545    esac
34546    ;;
34547  esac
34548
34549  ac_dir=`$as_dirname -- "$ac_file" ||
34550$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
34551	 X"$ac_file" : 'X\(//\)[^/]' \| \
34552	 X"$ac_file" : 'X\(//\)$' \| \
34553	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
34554$as_echo X"$ac_file" |
34555    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
34556	    s//\1/
34557	    q
34558	  }
34559	  /^X\(\/\/\)[^/].*/{
34560	    s//\1/
34561	    q
34562	  }
34563	  /^X\(\/\/\)$/{
34564	    s//\1/
34565	    q
34566	  }
34567	  /^X\(\/\).*/{
34568	    s//\1/
34569	    q
34570	  }
34571	  s/.*/./; q'`
34572  as_dir="$ac_dir"; as_fn_mkdir_p
34573  ac_builddir=.
34574
34575case "$ac_dir" in
34576.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
34577*)
34578  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
34579  # A ".." for each directory in $ac_dir_suffix.
34580  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
34581  case $ac_top_builddir_sub in
34582  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
34583  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
34584  esac ;;
34585esac
34586ac_abs_top_builddir=$ac_pwd
34587ac_abs_builddir=$ac_pwd$ac_dir_suffix
34588# for backward compatibility:
34589ac_top_builddir=$ac_top_build_prefix
34590
34591case $srcdir in
34592  .)  # We are building in place.
34593    ac_srcdir=.
34594    ac_top_srcdir=$ac_top_builddir_sub
34595    ac_abs_top_srcdir=$ac_pwd ;;
34596  [\\/]* | ?:[\\/]* )  # Absolute name.
34597    ac_srcdir=$srcdir$ac_dir_suffix;
34598    ac_top_srcdir=$srcdir
34599    ac_abs_top_srcdir=$srcdir ;;
34600  *) # Relative name.
34601    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
34602    ac_top_srcdir=$ac_top_build_prefix$srcdir
34603    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
34604esac
34605ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
34606
34607
34608  case $ac_mode in
34609  :F)
34610  #
34611  # CONFIG_FILE
34612  #
34613
34614_ACEOF
34615
34616cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34617# If the template does not know about datarootdir, expand it.
34618# FIXME: This hack should be removed a few years after 2.60.
34619ac_datarootdir_hack=; ac_datarootdir_seen=
34620ac_sed_dataroot='
34621/datarootdir/ {
34622  p
34623  q
34624}
34625/@datadir@/p
34626/@docdir@/p
34627/@infodir@/p
34628/@localedir@/p
34629/@mandir@/p'
34630case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
34631*datarootdir*) ac_datarootdir_seen=yes;;
34632*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
34633  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
34634$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
34635_ACEOF
34636cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34637  ac_datarootdir_hack='
34638  s&@datadir@&$datadir&g
34639  s&@docdir@&$docdir&g
34640  s&@infodir@&$infodir&g
34641  s&@localedir@&$localedir&g
34642  s&@mandir@&$mandir&g
34643  s&\\\${datarootdir}&$datarootdir&g' ;;
34644esac
34645_ACEOF
34646
34647# Neutralize VPATH when `$srcdir' = `.'.
34648# Shell code in configure.ac might set extrasub.
34649# FIXME: do we really want to maintain this feature?
34650cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34651ac_sed_extra="$ac_vpsub
34652$extrasub
34653_ACEOF
34654cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34655:t
34656/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
34657s|@configure_input@|$ac_sed_conf_input|;t t
34658s&@top_builddir@&$ac_top_builddir_sub&;t t
34659s&@top_build_prefix@&$ac_top_build_prefix&;t t
34660s&@srcdir@&$ac_srcdir&;t t
34661s&@abs_srcdir@&$ac_abs_srcdir&;t t
34662s&@top_srcdir@&$ac_top_srcdir&;t t
34663s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
34664s&@builddir@&$ac_builddir&;t t
34665s&@abs_builddir@&$ac_abs_builddir&;t t
34666s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
34667$ac_datarootdir_hack
34668"
34669eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
34670  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
34671
34672test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
34673  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
34674  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
34675      "$ac_tmp/out"`; test -z "$ac_out"; } &&
34676  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
34677which seems to be undefined.  Please make sure it is defined" >&5
34678$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
34679which seems to be undefined.  Please make sure it is defined" >&2;}
34680
34681  rm -f "$ac_tmp/stdin"
34682  case $ac_file in
34683  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
34684  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
34685  esac \
34686  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
34687 ;;
34688  :H)
34689  #
34690  # CONFIG_HEADER
34691  #
34692  if test x"$ac_file" != x-; then
34693    {
34694      $as_echo "/* $configure_input  */" \
34695      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
34696    } >"$ac_tmp/config.h" \
34697      || as_fn_error $? "could not create $ac_file" "$LINENO" 5
34698    if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
34699      { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
34700$as_echo "$as_me: $ac_file is unchanged" >&6;}
34701    else
34702      rm -f "$ac_file"
34703      mv "$ac_tmp/config.h" "$ac_file" \
34704	|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
34705    fi
34706  else
34707    $as_echo "/* $configure_input  */" \
34708      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
34709      || as_fn_error $? "could not create -" "$LINENO" 5
34710  fi
34711 ;;
34712
34713
34714  esac
34715
34716done # for ac_tag
34717
34718
34719as_fn_exit 0
34720_ACEOF
34721ac_clean_files=$ac_clean_files_save
34722
34723test $ac_write_fail = 0 ||
34724  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
34725
34726
34727# configure is writing to config.log, and then calls config.status.
34728# config.status does its own redirection, appending to config.log.
34729# Unfortunately, on DOS this fails, as config.log is still kept open
34730# by configure, so config.status won't be able to write to it; its
34731# output is simply discarded.  So we exec the FD to /dev/null,
34732# effectively closing config.log, so it can be properly (re)opened and
34733# appended to by config.status.  When coming back to configure, we
34734# need to make the FD available again.
34735if test "$no_create" != yes; then
34736  ac_cs_success=:
34737  ac_config_status_args=
34738  test "$silent" = yes &&
34739    ac_config_status_args="$ac_config_status_args --quiet"
34740  exec 5>/dev/null
34741  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
34742  exec 5>>config.log
34743  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
34744  # would make configure fail if this is the last instruction.
34745  $ac_cs_success || as_fn_exit 1
34746fi
34747if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
34748  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
34749$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
34750fi
34751
34752
34753# Try to move the config.log file to the output directory.
34754if test -e ./config.log; then
34755  $MV -f ./config.log "$OUTPUT_ROOT/config.log" 2> /dev/null
34756fi
34757
34758# Make the compare script executable
34759$CHMOD +x $OUTPUT_ROOT/compare.sh
34760
34761# Finally output some useful information to the user
34762
34763  # Finally output some useful information to the user
34764
34765  if test "x$CCACHE_FOUND" != x; then
34766    if  test "x$HAS_GOOD_CCACHE" = x; then
34767      CCACHE_STATUS="installed, but disabled (version older than 3.1.4)"
34768      CCACHE_HELP_MSG="You have ccache installed, but it is a version prior to 3.1.4. Try upgrading."
34769    else
34770      CCACHE_STATUS="installed and in use"
34771    fi
34772  else
34773    if test "x$GCC" = xyes; then
34774      CCACHE_STATUS="not installed (consider installing)"
34775      CCACHE_HELP_MSG="You do not have ccache installed. Try installing it."
34776    else
34777      CCACHE_STATUS="not available for your system"
34778    fi
34779  fi
34780
34781  printf "\n"
34782  printf "====================================================\n"
34783  printf "A new configuration has been successfully created in\n"
34784  printf "$OUTPUT_ROOT\n"
34785  if test "x$CONFIGURE_COMMAND_LINE" != x; then
34786    printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
34787  else
34788    printf "using default settings.\n"
34789  fi
34790
34791  printf "\n"
34792  printf "Configuration summary:\n"
34793  printf "* Debug level:    $DEBUG_LEVEL\n"
34794  printf "* JDK variant:    $JDK_VARIANT\n"
34795  printf "* JVM variants:   $with_jvm_variants\n"
34796  printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
34797
34798  printf "\n"
34799  printf "Tools summary:\n"
34800  if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
34801    printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
34802  fi
34803  printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
34804  printf "* C Compiler:     $CC_VENDOR version $CC_VERSION (at $CC)\n"
34805  printf "* C++ Compiler:   $CXX_VENDOR version $CXX_VERSION (at $CXX)\n"
34806
34807  printf "\n"
34808  printf "Build performance summary:\n"
34809  printf "* Cores to use:   $JOBS\n"
34810  printf "* Memory limit:   $MEMORY_SIZE MB\n"
34811  printf "* ccache status:  $CCACHE_STATUS\n"
34812  printf "\n"
34813
34814  if test "x$CCACHE_HELP_MSG" != x && test "x$HIDE_PERFORMANCE_HINTS" = "xno"; then
34815    printf "Build performance tip: ccache gives a tremendous speedup for C++ recompilations.\n"
34816    printf "$CCACHE_HELP_MSG\n"
34817
34818  # Print a helpful message on how to acquire the necessary build dependency.
34819  # ccache is the help tag: freetyp2, cups, pulse, alsa etc
34820  MISSING_DEPENDENCY=ccache
34821  PKGHANDLER_COMMAND=
34822
34823  case $PKGHANDLER in
34824    apt-get)
34825      apt_help     $MISSING_DEPENDENCY ;;
34826    yum)
34827      yum_help     $MISSING_DEPENDENCY ;;
34828    port)
34829      port_help    $MISSING_DEPENDENCY ;;
34830    pkgutil)
34831      pkgutil_help $MISSING_DEPENDENCY ;;
34832    pkgadd)
34833      pkgadd_help  $MISSING_DEPENDENCY ;;
34834    * )
34835      break ;;
34836  esac
34837
34838  if test "x$PKGHANDLER_COMMAND" != x; then
34839    HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
34840  fi
34841
34842    printf "$HELP_MSG\n"
34843    printf "\n"
34844  fi
34845
34846  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
34847    printf "NOTE: You have requested to build more than one version of the JVM, which\n"
34848    printf "will result in longer build times.\n"
34849    printf "\n"
34850  fi
34851
34852  if test "x$FOUND_ALT_VARIABLES" != "x"; then
34853    printf "WARNING: You have old-style ALT_ environment variables set.\n"
34854    printf "These are not respected, and will be ignored. It is recommended\n"
34855    printf "that you clean your environment. The following variables are set:\n"
34856    printf "$FOUND_ALT_VARIABLES\n"
34857    printf "\n"
34858  fi
34859
34860  if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
34861    printf "WARNING: Your build output directory is not on a local disk.\n"
34862    printf "This will severely degrade build performance!\n"
34863    printf "It is recommended that you create an output directory on a local disk,\n"
34864    printf "and run the configure script again from that directory.\n"
34865    printf "\n"
34866  fi
34867
34868  if test "x$IS_RECONFIGURE" = "xyes"; then
34869    printf "WARNING: The result of this configuration has overridden an older\n"
34870    printf "configuration. You *should* run 'make clean' to make sure you get a\n"
34871    printf "proper build. Failure to do so might result in strange build problems.\n"
34872    printf "\n"
34873  fi
34874
34875