generated-configure.sh revision 795:69da99676239
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
712TARGET_BITS_FLAG
713JT_HOME
714JTREGEXE
715LIPO
716ac_ct_OBJDUMP
717OBJDUMP
718ac_ct_OBJCOPY
719OBJCOPY
720MCS
721STRIP
722GNM
723NM
724AS
725CXXCPP
726CPP
727COMPILER_TYPE
728RC_FLAGS
729DUMPBIN
730WINAR
731HOTSPOT_RC
732HOTSPOT_MT
733RC
734MT
735WINLD
736HOTSPOT_LD
737HOTSPOT_CXX
738ARFLAGS
739AR
740LDEXECXX
741LDCXX
742LDEXE
743LD
744ac_ct_OBJC
745OBJCFLAGS
746OBJC
747ac_ct_CXX
748CXXFLAGS
749CXX
750ac_ct_PROPER_COMPILER_CXX
751PROPER_COMPILER_CXX
752POTENTIAL_CXX
753TOOLS_DIR_CXX
754OBJEXT
755EXEEXT
756ac_ct_CC
757CPPFLAGS
758LDFLAGS
759CFLAGS
760CC
761ac_ct_PROPER_COMPILER_CC
762PROPER_COMPILER_CC
763POTENTIAL_CC
764TOOLS_DIR_CC
765BUILD_LD
766BUILD_CXX
767BUILD_CC
768MSVCR_DLL
769VS_PATH
770VS_LIB
771VS_INCLUDE
772CYGWIN_LINK
773AR_OUT_OPTION
774LD_OUT_OPTION
775EXE_OUT_OPTION
776CC_OUT_OPTION
777BUILD_HOTSPOT
778HOTSPOT_DIST
779BUILD_OUTPUT
780OVERRIDE_SRC_ROOT
781ADD_SRC_ROOT
782JDK_TOPDIR
783NASHORN_TOPDIR
784HOTSPOT_TOPDIR
785JAXWS_TOPDIR
786JAXP_TOPDIR
787CORBA_TOPDIR
788LANGTOOLS_TOPDIR
789BOOT_JDK_JVMARGS
790JAVAC_FLAGS
791BOOT_JDK_SOURCETARGET
792BOOT_JDK
793BOOT_TOOLSJAR
794BOOT_RTJAR
795JAVA_CHECK
796JAVAC_CHECK
797COOKED_BUILD_NUMBER
798JDK_VERSION
799COPYRIGHT_YEAR
800MACOSX_BUNDLE_ID_BASE
801MACOSX_BUNDLE_NAME_BASE
802COMPANY_NAME
803JDK_RC_PLATFORM_NAME
804PRODUCT_SUFFIX
805PRODUCT_NAME
806LAUNCHER_NAME
807MILESTONE
808JDK_BUILD_NUMBER
809JDK_UPDATE_VERSION
810JDK_MICRO_VERSION
811JDK_MINOR_VERSION
812JDK_MAJOR_VERSION
813USER_RELEASE_SUFFIX
814COMPRESS_JARS
815UNLIMITED_CRYPTO
816CACERTS_FILE
817TEST_IN_BUILD
818BUILD_HEADLESS
819SUPPORT_HEADFUL
820SUPPORT_HEADLESS
821BDEPS_FTP
822BDEPS_UNZIP
823OS_VERSION_MICRO
824OS_VERSION_MINOR
825OS_VERSION_MAJOR
826PKG_CONFIG
827CODESIGN
828XATTR
829IS_GNU_TIME
830TIME
831STAT
832HG
833READELF
834OTOOL
835LDD
836ZIP
837UNZIP
838FIND_DELETE
839MAKE
840CHECK_TOOLSDIR_MAKE
841CHECK_TOOLSDIR_GMAKE
842CHECK_MAKE
843CHECK_GMAKE
844PKGHANDLER
845OUTPUT_ROOT
846CONF_NAME
847SPEC
848BUILD_VARIANT_RELEASE
849DEBUG_CLASSFILES
850FASTDEBUG
851VARIANT
852DEBUG_LEVEL
853MACOSX_UNIVERSAL
854INCLUDE_SA
855JVM_VARIANT_ZEROSHARK
856JVM_VARIANT_ZERO
857JVM_VARIANT_KERNEL
858JVM_VARIANT_MINIMAL1
859JVM_VARIANT_CLIENT
860JVM_VARIANT_SERVER
861JVM_VARIANTS
862JDK_VARIANT
863SET_OPENJDK
864BUILD_LOG_WRAPPER
865BUILD_LOG_PREVIOUS
866BUILD_LOG
867SYS_ROOT
868PATH_SEP
869SRC_ROOT
870ZERO_ARCHDEF
871DEFINE_CROSS_COMPILE_ARCH
872LP64
873OPENJDK_TARGET_OS_API_DIR
874OPENJDK_TARGET_CPU_JLI_CFLAGS
875OPENJDK_TARGET_CPU_OSARCH
876OPENJDK_TARGET_CPU_ISADIR
877OPENJDK_TARGET_CPU_LIBDIR
878OPENJDK_TARGET_CPU_LEGACY_LIB
879OPENJDK_TARGET_CPU_LEGACY
880REQUIRED_OS_VERSION
881REQUIRED_OS_NAME
882COMPILE_TYPE
883OPENJDK_TARGET_CPU_ENDIAN
884OPENJDK_TARGET_CPU_BITS
885OPENJDK_TARGET_CPU_ARCH
886OPENJDK_TARGET_CPU
887OPENJDK_TARGET_OS_API
888OPENJDK_TARGET_OS
889OPENJDK_BUILD_CPU_ENDIAN
890OPENJDK_BUILD_CPU_BITS
891OPENJDK_BUILD_CPU_ARCH
892OPENJDK_BUILD_CPU
893OPENJDK_BUILD_OS_API
894OPENJDK_BUILD_OS
895OPENJDK_BUILD_AUTOCONF_NAME
896OPENJDK_TARGET_AUTOCONF_NAME
897target_os
898target_vendor
899target_cpu
900target
901host_os
902host_vendor
903host_cpu
904host
905build_os
906build_vendor
907build_cpu
908build
909SETFILE
910DF
911READLINK
912CYGPATH
913NAWK
914SED
915FGREP
916EGREP
917GREP
918AWK
919XARGS
920WHICH
921WC
922UNIQ
923UNAME
924TR
925TOUCH
926TEE
927TAR
928TAIL
929SORT
930SH
931RM
932PRINTF
933MV
934MKTEMP
935MKDIR
936LS
937LN
938HEAD
939FIND
940FILE
941EXPR
942ECHO
943DIRNAME
944DIFF
945DATE
946CUT
947CPIO
948CP
949COMM
950CMP
951CHMOD
952CAT
953BASH
954BASENAME
955DATE_WHEN_CONFIGURED
956CONFIGURE_COMMAND_LINE
957CUSTOM_MAKE_DIR
958target_alias
959host_alias
960build_alias
961LIBS
962ECHO_T
963ECHO_N
964ECHO_C
965DEFS
966mandir
967localedir
968libdir
969psdir
970pdfdir
971dvidir
972htmldir
973infodir
974docdir
975oldincludedir
976includedir
977localstatedir
978sharedstatedir
979sysconfdir
980datadir
981datarootdir
982libexecdir
983sbindir
984bindir
985program_transform_name
986prefix
987exec_prefix
988PACKAGE_URL
989PACKAGE_BUGREPORT
990PACKAGE_STRING
991PACKAGE_VERSION
992PACKAGE_TARNAME
993PACKAGE_NAME
994PATH_SEPARATOR
995SHELL'
996ac_subst_files=''
997ac_user_opts='
998enable_option_checking
999with_custom_make_dir
1000with_target_bits
1001with_sys_root
1002with_tools_dir
1003with_devkit
1004enable_openjdk_only
1005with_jdk_variant
1006with_jvm_variants
1007enable_debug
1008with_debug_level
1009with_conf_name
1010with_builddeps_conf
1011with_builddeps_server
1012with_builddeps_dir
1013with_builddeps_group
1014enable_headful
1015enable_hotspot_test_in_build
1016with_cacerts_file
1017enable_unlimited_crypto
1018with_milestone
1019with_update_version
1020with_build_number
1021with_user_release_suffix
1022with_boot_jdk
1023with_boot_jdk_jvmargs
1024with_add_source_root
1025with_override_source_root
1026with_adds_and_overrides
1027with_override_langtools
1028with_override_corba
1029with_override_jaxp
1030with_override_jaxws
1031with_override_hotspot
1032with_override_nashorn
1033with_override_jdk
1034with_import_hotspot
1035with_msvcr_dll
1036with_jtreg
1037with_extra_cflags
1038with_extra_cxxflags
1039with_extra_ldflags
1040enable_debug_symbols
1041enable_zip_debug_info
1042enable_macosx_runtime_support
1043with_x
1044with_cups
1045with_cups_include
1046with_freetype
1047with_alsa
1048with_alsa_include
1049with_alsa_lib
1050with_giflib
1051with_zlib
1052with_stdc__lib
1053with_num_cores
1054with_memory_size
1055with_jobs
1056with_sjavac_server_java
1057enable_sjavac
1058enable_precompiled_headers
1059enable_ccache
1060with_ccache_dir
1061'
1062      ac_precious_vars='build_alias
1063host_alias
1064target_alias
1065PKG_CONFIG
1066CC
1067CFLAGS
1068LDFLAGS
1069LIBS
1070CPPFLAGS
1071CXX
1072CXXFLAGS
1073CCC
1074OBJC
1075OBJCFLAGS
1076CPP
1077CXXCPP
1078XMKMF
1079FREETYPE2_CFLAGS
1080FREETYPE2_LIBS
1081ALSA_CFLAGS
1082ALSA_LIBS
1083LIBFFI_CFLAGS
1084LIBFFI_LIBS'
1085
1086
1087# Initialize some variables set by options.
1088ac_init_help=
1089ac_init_version=false
1090ac_unrecognized_opts=
1091ac_unrecognized_sep=
1092# The variables have the same names as the options, with
1093# dashes changed to underlines.
1094cache_file=/dev/null
1095exec_prefix=NONE
1096no_create=
1097no_recursion=
1098prefix=NONE
1099program_prefix=NONE
1100program_suffix=NONE
1101program_transform_name=s,x,x,
1102silent=
1103site=
1104srcdir=
1105verbose=
1106x_includes=NONE
1107x_libraries=NONE
1108
1109# Installation directory options.
1110# These are left unexpanded so users can "make install exec_prefix=/foo"
1111# and all the variables that are supposed to be based on exec_prefix
1112# by default will actually change.
1113# Use braces instead of parens because sh, perl, etc. also accept them.
1114# (The list follows the same order as the GNU Coding Standards.)
1115bindir='${exec_prefix}/bin'
1116sbindir='${exec_prefix}/sbin'
1117libexecdir='${exec_prefix}/libexec'
1118datarootdir='${prefix}/share'
1119datadir='${datarootdir}'
1120sysconfdir='${prefix}/etc'
1121sharedstatedir='${prefix}/com'
1122localstatedir='${prefix}/var'
1123includedir='${prefix}/include'
1124oldincludedir='/usr/include'
1125docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1126infodir='${datarootdir}/info'
1127htmldir='${docdir}'
1128dvidir='${docdir}'
1129pdfdir='${docdir}'
1130psdir='${docdir}'
1131libdir='${exec_prefix}/lib'
1132localedir='${datarootdir}/locale'
1133mandir='${datarootdir}/man'
1134
1135ac_prev=
1136ac_dashdash=
1137for ac_option
1138do
1139  # If the previous option needs an argument, assign it.
1140  if test -n "$ac_prev"; then
1141    eval $ac_prev=\$ac_option
1142    ac_prev=
1143    continue
1144  fi
1145
1146  case $ac_option in
1147  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1148  *=)   ac_optarg= ;;
1149  *)    ac_optarg=yes ;;
1150  esac
1151
1152  # Accept the important Cygnus configure options, so we can diagnose typos.
1153
1154  case $ac_dashdash$ac_option in
1155  --)
1156    ac_dashdash=yes ;;
1157
1158  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1159    ac_prev=bindir ;;
1160  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1161    bindir=$ac_optarg ;;
1162
1163  -build | --build | --buil | --bui | --bu)
1164    ac_prev=build_alias ;;
1165  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1166    build_alias=$ac_optarg ;;
1167
1168  -cache-file | --cache-file | --cache-fil | --cache-fi \
1169  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1170    ac_prev=cache_file ;;
1171  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1172  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1173    cache_file=$ac_optarg ;;
1174
1175  --config-cache | -C)
1176    cache_file=config.cache ;;
1177
1178  -datadir | --datadir | --datadi | --datad)
1179    ac_prev=datadir ;;
1180  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1181    datadir=$ac_optarg ;;
1182
1183  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1184  | --dataroo | --dataro | --datar)
1185    ac_prev=datarootdir ;;
1186  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1187  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1188    datarootdir=$ac_optarg ;;
1189
1190  -disable-* | --disable-*)
1191    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1192    # Reject names that are not valid shell variable names.
1193    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1194      as_fn_error $? "invalid feature name: $ac_useropt"
1195    ac_useropt_orig=$ac_useropt
1196    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1197    case $ac_user_opts in
1198      *"
1199"enable_$ac_useropt"
1200"*) ;;
1201      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1202	 ac_unrecognized_sep=', ';;
1203    esac
1204    eval enable_$ac_useropt=no ;;
1205
1206  -docdir | --docdir | --docdi | --doc | --do)
1207    ac_prev=docdir ;;
1208  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1209    docdir=$ac_optarg ;;
1210
1211  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1212    ac_prev=dvidir ;;
1213  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1214    dvidir=$ac_optarg ;;
1215
1216  -enable-* | --enable-*)
1217    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1218    # Reject names that are not valid shell variable names.
1219    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1220      as_fn_error $? "invalid feature name: $ac_useropt"
1221    ac_useropt_orig=$ac_useropt
1222    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1223    case $ac_user_opts in
1224      *"
1225"enable_$ac_useropt"
1226"*) ;;
1227      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1228	 ac_unrecognized_sep=', ';;
1229    esac
1230    eval enable_$ac_useropt=\$ac_optarg ;;
1231
1232  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1233  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1234  | --exec | --exe | --ex)
1235    ac_prev=exec_prefix ;;
1236  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1237  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1238  | --exec=* | --exe=* | --ex=*)
1239    exec_prefix=$ac_optarg ;;
1240
1241  -gas | --gas | --ga | --g)
1242    # Obsolete; use --with-gas.
1243    with_gas=yes ;;
1244
1245  -help | --help | --hel | --he | -h)
1246    ac_init_help=long ;;
1247  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1248    ac_init_help=recursive ;;
1249  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1250    ac_init_help=short ;;
1251
1252  -host | --host | --hos | --ho)
1253    ac_prev=host_alias ;;
1254  -host=* | --host=* | --hos=* | --ho=*)
1255    host_alias=$ac_optarg ;;
1256
1257  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1258    ac_prev=htmldir ;;
1259  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1260  | --ht=*)
1261    htmldir=$ac_optarg ;;
1262
1263  -includedir | --includedir | --includedi | --included | --include \
1264  | --includ | --inclu | --incl | --inc)
1265    ac_prev=includedir ;;
1266  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1267  | --includ=* | --inclu=* | --incl=* | --inc=*)
1268    includedir=$ac_optarg ;;
1269
1270  -infodir | --infodir | --infodi | --infod | --info | --inf)
1271    ac_prev=infodir ;;
1272  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1273    infodir=$ac_optarg ;;
1274
1275  -libdir | --libdir | --libdi | --libd)
1276    ac_prev=libdir ;;
1277  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1278    libdir=$ac_optarg ;;
1279
1280  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1281  | --libexe | --libex | --libe)
1282    ac_prev=libexecdir ;;
1283  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1284  | --libexe=* | --libex=* | --libe=*)
1285    libexecdir=$ac_optarg ;;
1286
1287  -localedir | --localedir | --localedi | --localed | --locale)
1288    ac_prev=localedir ;;
1289  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1290    localedir=$ac_optarg ;;
1291
1292  -localstatedir | --localstatedir | --localstatedi | --localstated \
1293  | --localstate | --localstat | --localsta | --localst | --locals)
1294    ac_prev=localstatedir ;;
1295  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1296  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1297    localstatedir=$ac_optarg ;;
1298
1299  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1300    ac_prev=mandir ;;
1301  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1302    mandir=$ac_optarg ;;
1303
1304  -nfp | --nfp | --nf)
1305    # Obsolete; use --without-fp.
1306    with_fp=no ;;
1307
1308  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1309  | --no-cr | --no-c | -n)
1310    no_create=yes ;;
1311
1312  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1313  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1314    no_recursion=yes ;;
1315
1316  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1317  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1318  | --oldin | --oldi | --old | --ol | --o)
1319    ac_prev=oldincludedir ;;
1320  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1321  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1322  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1323    oldincludedir=$ac_optarg ;;
1324
1325  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1326    ac_prev=prefix ;;
1327  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1328    prefix=$ac_optarg ;;
1329
1330  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1331  | --program-pre | --program-pr | --program-p)
1332    ac_prev=program_prefix ;;
1333  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1334  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1335    program_prefix=$ac_optarg ;;
1336
1337  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1338  | --program-suf | --program-su | --program-s)
1339    ac_prev=program_suffix ;;
1340  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1341  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1342    program_suffix=$ac_optarg ;;
1343
1344  -program-transform-name | --program-transform-name \
1345  | --program-transform-nam | --program-transform-na \
1346  | --program-transform-n | --program-transform- \
1347  | --program-transform | --program-transfor \
1348  | --program-transfo | --program-transf \
1349  | --program-trans | --program-tran \
1350  | --progr-tra | --program-tr | --program-t)
1351    ac_prev=program_transform_name ;;
1352  -program-transform-name=* | --program-transform-name=* \
1353  | --program-transform-nam=* | --program-transform-na=* \
1354  | --program-transform-n=* | --program-transform-=* \
1355  | --program-transform=* | --program-transfor=* \
1356  | --program-transfo=* | --program-transf=* \
1357  | --program-trans=* | --program-tran=* \
1358  | --progr-tra=* | --program-tr=* | --program-t=*)
1359    program_transform_name=$ac_optarg ;;
1360
1361  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1362    ac_prev=pdfdir ;;
1363  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1364    pdfdir=$ac_optarg ;;
1365
1366  -psdir | --psdir | --psdi | --psd | --ps)
1367    ac_prev=psdir ;;
1368  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1369    psdir=$ac_optarg ;;
1370
1371  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1372  | -silent | --silent | --silen | --sile | --sil)
1373    silent=yes ;;
1374
1375  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1376    ac_prev=sbindir ;;
1377  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1378  | --sbi=* | --sb=*)
1379    sbindir=$ac_optarg ;;
1380
1381  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1382  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1383  | --sharedst | --shareds | --shared | --share | --shar \
1384  | --sha | --sh)
1385    ac_prev=sharedstatedir ;;
1386  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1387  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1388  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1389  | --sha=* | --sh=*)
1390    sharedstatedir=$ac_optarg ;;
1391
1392  -site | --site | --sit)
1393    ac_prev=site ;;
1394  -site=* | --site=* | --sit=*)
1395    site=$ac_optarg ;;
1396
1397  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1398    ac_prev=srcdir ;;
1399  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1400    srcdir=$ac_optarg ;;
1401
1402  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1403  | --syscon | --sysco | --sysc | --sys | --sy)
1404    ac_prev=sysconfdir ;;
1405  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1406  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1407    sysconfdir=$ac_optarg ;;
1408
1409  -target | --target | --targe | --targ | --tar | --ta | --t)
1410    ac_prev=target_alias ;;
1411  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1412    target_alias=$ac_optarg ;;
1413
1414  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1415    verbose=yes ;;
1416
1417  -version | --version | --versio | --versi | --vers | -V)
1418    ac_init_version=: ;;
1419
1420  -with-* | --with-*)
1421    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1422    # Reject names that are not valid shell variable names.
1423    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1424      as_fn_error $? "invalid package name: $ac_useropt"
1425    ac_useropt_orig=$ac_useropt
1426    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1427    case $ac_user_opts in
1428      *"
1429"with_$ac_useropt"
1430"*) ;;
1431      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1432	 ac_unrecognized_sep=', ';;
1433    esac
1434    eval with_$ac_useropt=\$ac_optarg ;;
1435
1436  -without-* | --without-*)
1437    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1438    # Reject names that are not valid shell variable names.
1439    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1440      as_fn_error $? "invalid package name: $ac_useropt"
1441    ac_useropt_orig=$ac_useropt
1442    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1443    case $ac_user_opts in
1444      *"
1445"with_$ac_useropt"
1446"*) ;;
1447      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1448	 ac_unrecognized_sep=', ';;
1449    esac
1450    eval with_$ac_useropt=no ;;
1451
1452  --x)
1453    # Obsolete; use --with-x.
1454    with_x=yes ;;
1455
1456  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1457  | --x-incl | --x-inc | --x-in | --x-i)
1458    ac_prev=x_includes ;;
1459  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1460  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1461    x_includes=$ac_optarg ;;
1462
1463  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1464  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1465    ac_prev=x_libraries ;;
1466  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1467  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1468    x_libraries=$ac_optarg ;;
1469
1470  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1471Try \`$0 --help' for more information"
1472    ;;
1473
1474  *=*)
1475    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1476    # Reject names that are not valid shell variable names.
1477    case $ac_envvar in #(
1478      '' | [0-9]* | *[!_$as_cr_alnum]* )
1479      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1480    esac
1481    eval $ac_envvar=\$ac_optarg
1482    export $ac_envvar ;;
1483
1484  *)
1485    # FIXME: should be removed in autoconf 3.0.
1486    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1487    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1488      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1489    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1490    ;;
1491
1492  esac
1493done
1494
1495if test -n "$ac_prev"; then
1496  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1497  as_fn_error $? "missing argument to $ac_option"
1498fi
1499
1500if test -n "$ac_unrecognized_opts"; then
1501  case $enable_option_checking in
1502    no) ;;
1503    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1504    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1505  esac
1506fi
1507
1508# Check all directory arguments for consistency.
1509for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1510		datadir sysconfdir sharedstatedir localstatedir includedir \
1511		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1512		libdir localedir mandir
1513do
1514  eval ac_val=\$$ac_var
1515  # Remove trailing slashes.
1516  case $ac_val in
1517    */ )
1518      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1519      eval $ac_var=\$ac_val;;
1520  esac
1521  # Be sure to have absolute directory names.
1522  case $ac_val in
1523    [\\/$]* | ?:[\\/]* )  continue;;
1524    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1525  esac
1526  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1527done
1528
1529# There might be people who depend on the old broken behavior: `$host'
1530# used to hold the argument of --host etc.
1531# FIXME: To remove some day.
1532build=$build_alias
1533host=$host_alias
1534target=$target_alias
1535
1536# FIXME: To remove some day.
1537if test "x$host_alias" != x; then
1538  if test "x$build_alias" = x; then
1539    cross_compiling=maybe
1540  elif test "x$build_alias" != "x$host_alias"; then
1541    cross_compiling=yes
1542  fi
1543fi
1544
1545ac_tool_prefix=
1546test -n "$host_alias" && ac_tool_prefix=$host_alias-
1547
1548test "$silent" = yes && exec 6>/dev/null
1549
1550
1551ac_pwd=`pwd` && test -n "$ac_pwd" &&
1552ac_ls_di=`ls -di .` &&
1553ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1554  as_fn_error $? "working directory cannot be determined"
1555test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1556  as_fn_error $? "pwd does not report name of working directory"
1557
1558
1559# Find the source files, if location was not specified.
1560if test -z "$srcdir"; then
1561  ac_srcdir_defaulted=yes
1562  # Try the directory containing this script, then the parent directory.
1563  ac_confdir=`$as_dirname -- "$as_myself" ||
1564$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1565	 X"$as_myself" : 'X\(//\)[^/]' \| \
1566	 X"$as_myself" : 'X\(//\)$' \| \
1567	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1568$as_echo X"$as_myself" |
1569    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1570	    s//\1/
1571	    q
1572	  }
1573	  /^X\(\/\/\)[^/].*/{
1574	    s//\1/
1575	    q
1576	  }
1577	  /^X\(\/\/\)$/{
1578	    s//\1/
1579	    q
1580	  }
1581	  /^X\(\/\).*/{
1582	    s//\1/
1583	    q
1584	  }
1585	  s/.*/./; q'`
1586  srcdir=$ac_confdir
1587  if test ! -r "$srcdir/$ac_unique_file"; then
1588    srcdir=..
1589  fi
1590else
1591  ac_srcdir_defaulted=no
1592fi
1593if test ! -r "$srcdir/$ac_unique_file"; then
1594  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1595  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1596fi
1597ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1598ac_abs_confdir=`(
1599	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1600	pwd)`
1601# When building in place, set srcdir=.
1602if test "$ac_abs_confdir" = "$ac_pwd"; then
1603  srcdir=.
1604fi
1605# Remove unnecessary trailing slashes from srcdir.
1606# Double slashes in file names in object file debugging info
1607# mess up M-x gdb in Emacs.
1608case $srcdir in
1609*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1610esac
1611for ac_var in $ac_precious_vars; do
1612  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1613  eval ac_env_${ac_var}_value=\$${ac_var}
1614  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1615  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1616done
1617
1618#
1619# Report the --help message.
1620#
1621if test "$ac_init_help" = "long"; then
1622  # Omit some internal or obsolete options to make the list less imposing.
1623  # This message is too long to be a string in the A/UX 3.1 sh.
1624  cat <<_ACEOF
1625\`configure' configures OpenJDK jdk8 to adapt to many kinds of systems.
1626
1627Usage: $0 [OPTION]... [VAR=VALUE]...
1628
1629To assign environment variables (e.g., CC, CFLAGS...), specify them as
1630VAR=VALUE.  See below for descriptions of some of the useful variables.
1631
1632Defaults for the options are specified in brackets.
1633
1634Configuration:
1635  -h, --help              display this help and exit
1636      --help=short        display options specific to this package
1637      --help=recursive    display the short help of all the included packages
1638  -V, --version           display version information and exit
1639  -q, --quiet, --silent   do not print \`checking ...' messages
1640      --cache-file=FILE   cache test results in FILE [disabled]
1641  -C, --config-cache      alias for \`--cache-file=config.cache'
1642  -n, --no-create         do not create output files
1643      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1644
1645Installation directories:
1646  --prefix=PREFIX         install architecture-independent files in PREFIX
1647                          [$ac_default_prefix]
1648  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1649                          [PREFIX]
1650
1651By default, \`make install' will install all the files in
1652\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1653an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1654for instance \`--prefix=\$HOME'.
1655
1656For better control, use the options below.
1657
1658Fine tuning of the installation directories:
1659  --bindir=DIR            user executables [EPREFIX/bin]
1660  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1661  --libexecdir=DIR        program executables [EPREFIX/libexec]
1662  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1663  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1664  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1665  --libdir=DIR            object code libraries [EPREFIX/lib]
1666  --includedir=DIR        C header files [PREFIX/include]
1667  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1668  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1669  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1670  --infodir=DIR           info documentation [DATAROOTDIR/info]
1671  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1672  --mandir=DIR            man documentation [DATAROOTDIR/man]
1673  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1674  --htmldir=DIR           html documentation [DOCDIR]
1675  --dvidir=DIR            dvi documentation [DOCDIR]
1676  --pdfdir=DIR            pdf documentation [DOCDIR]
1677  --psdir=DIR             ps documentation [DOCDIR]
1678_ACEOF
1679
1680  cat <<\_ACEOF
1681
1682X features:
1683  --x-includes=DIR    X include files are in DIR
1684  --x-libraries=DIR   X library files are in DIR
1685
1686System types:
1687  --build=BUILD     configure for building on BUILD [guessed]
1688  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1689  --target=TARGET   configure for building compilers for TARGET [HOST]
1690_ACEOF
1691fi
1692
1693if test -n "$ac_init_help"; then
1694  case $ac_init_help in
1695     short | recursive ) echo "Configuration of OpenJDK jdk8:";;
1696   esac
1697  cat <<\_ACEOF
1698
1699Optional Features:
1700  --disable-option-checking  ignore unrecognized --enable/--with options
1701  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1702  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1703  --enable-openjdk-only   suppress building custom source even if present
1704                          [disabled]
1705  --enable-debug          set the debug level to fastdebug (shorthand for
1706                          --with-debug-level=fastdebug) [disabled]
1707  --disable-headful       disable building headful support (graphical UI
1708                          support) [enabled]
1709  --enable-hotspot-test-in-build
1710                          run the Queens test after Hotspot build [disabled]
1711  --enable-unlimited-crypto
1712                          Enable unlimited crypto policy [disabled]
1713  --disable-debug-symbols disable generation of debug symbols [enabled]
1714  --disable-zip-debug-info
1715                          disable zipping of debug-info files [enabled]
1716  --disable-macosx-runtime-support
1717                          disable the use of MacOSX Java runtime support
1718                          framework [enabled]
1719  --enable-sjavac         use sjavac to do fast incremental compiles
1720                          [disabled]
1721  --disable-precompiled-headers
1722                          disable using precompiled headers when compiling C++
1723                          [enabled]
1724  --disable-ccache        disable using ccache to speed up recompilations
1725                          [enabled]
1726
1727Optional Packages:
1728  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1729  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1730  --with-custom-make-dir  use this directory for custom build/make files
1731  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
1732                          support it), e.g. --with-target-bits=32 [guessed]
1733  --with-sys-root         pass this sys-root to the compilers and tools (for
1734                          cross-compiling)
1735  --with-tools-dir        search this directory for compilers and tools (for
1736                          cross-compiling)
1737  --with-devkit           use this directory as base for tools-dir and
1738                          sys-root (for cross-compiling)
1739  --with-jdk-variant      JDK variant to build (normal) [normal]
1740  --with-jvm-variants     JVM variants (separated by commas) to build (server,
1741                          client, minimal1, kernel, zero, zeroshark) [server]
1742  --with-debug-level      set the debug level (release, fastdebug, slowdebug)
1743                          [release]
1744  --with-conf-name        use this as the name of the configuration [generated
1745                          from important configuration options]
1746  --with-builddeps-conf   use this configuration file for the builddeps
1747  --with-builddeps-server download and use build dependencies from this server
1748                          url
1749  --with-builddeps-dir    store downloaded build dependencies here
1750                          [/localhome/builddeps]
1751  --with-builddeps-group  chgrp the downloaded build dependencies to this
1752                          group
1753  --with-cacerts-file     specify alternative cacerts file
1754  --with-milestone        Set milestone value for build [internal]
1755  --with-update-version   Set update version value for build [b00]
1756  --with-build-number     Set build number value for build [b00]
1757  --with-user-release-suffix
1758                          Add a custom string to the version string if build
1759                          number isn't set.[username_builddateb00]
1760  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
1761  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all
1762                          invocations of the Boot JDK, overriding the default
1763                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
1764                          -enableassertions"
1765  --with-add-source-root  for each and every source directory, look in this
1766                          additional source root for the same directory; if it
1767                          exists and have files in it, include it in the build
1768  --with-override-source-root
1769                          for each and every source directory, look in this
1770                          override source root for the same directory; if it
1771                          exists, use that directory instead and ignore the
1772                          directory in the original source root
1773  --with-adds-and-overrides
1774                          use the subdirs 'adds' and 'overrides' in the
1775                          specified directory as add-source-root and
1776                          override-source-root
1777  --with-override-langtools
1778                          use this langtools dir for the build
1779  --with-override-corba   use this corba dir for the build
1780  --with-override-jaxp    use this jaxp dir for the build
1781  --with-override-jaxws   use this jaxws dir for the build
1782  --with-override-hotspot use this hotspot dir for the build
1783  --with-override-nashorn use this nashorn dir for the build
1784  --with-override-jdk     use this jdk dir for the build
1785  --with-import-hotspot   import hotspot binaries from this jdk image or
1786                          hotspot build dist dir instead of building from
1787                          source
1788  --with-msvcr-dll        copy this msvcr100.dll into the built JDK (Windows
1789                          only) [probed]
1790  --with-jtreg            Regression Test Harness [probed]
1791  --with-extra-cflags     extra flags to be used when compiling jdk c-files
1792  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
1793  --with-extra-ldflags    extra flags to be used when linking jdk
1794  --with-x                use the X Window System
1795  --with-cups             specify prefix directory for the cups package
1796                          (expecting the headers under PATH/include)
1797  --with-cups-include     specify directory for the cups include files
1798  --with-freetype         specify prefix directory for the freetype2 package
1799                          (expecting the libraries under PATH/lib and the
1800                          headers under PATH/include)
1801  --with-alsa             specify prefix directory for the alsa package
1802                          (expecting the libraries under PATH/lib and the
1803                          headers under PATH/include)
1804  --with-alsa-include     specify directory for the alsa include files
1805  --with-alsa-lib         specify directory for the alsa library
1806  --with-giflib           use giflib from build system or OpenJDK source
1807                          (system, bundled) [bundled]
1808  --with-zlib             use zlib from build system or OpenJDK source
1809                          (system, bundled) [bundled]
1810  --with-stdc++lib=<static>,<dynamic>,<default>
1811                          force linking of the C++ runtime on Linux to either
1812                          static or dynamic, default is static with dynamic as
1813                          fallback
1814  --with-num-cores        number of cores in the build system, e.g.
1815                          --with-num-cores=8 [probed]
1816  --with-memory-size      memory (in MB) available in the build system, e.g.
1817                          --with-memory-size=1024 [probed]
1818  --with-jobs             number of parallel jobs to let make run [calculated
1819                          based on cores and memory]
1820  --with-sjavac-server-java
1821                          use this java binary for running the sjavac
1822                          background server [Boot JDK java]
1823  --with-ccache-dir       where to store ccache files [~/.ccache]
1824
1825Some influential environment variables:
1826  PKG_CONFIG  path to pkg-config utility
1827  CC          C compiler command
1828  CFLAGS      C compiler flags
1829  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1830              nonstandard directory <lib dir>
1831  LIBS        libraries to pass to the linker, e.g. -l<library>
1832  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1833              you have headers in a nonstandard directory <include dir>
1834  CXX         C++ compiler command
1835  CXXFLAGS    C++ compiler flags
1836  OBJC        Objective C compiler command
1837  OBJCFLAGS   Objective C compiler flags
1838  CPP         C preprocessor
1839  CXXCPP      C++ preprocessor
1840  XMKMF       Path to xmkmf, Makefile generator for X Window System
1841  FREETYPE2_CFLAGS
1842              C compiler flags for FREETYPE2, overriding pkg-config
1843  FREETYPE2_LIBS
1844              linker flags for FREETYPE2, overriding pkg-config
1845  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
1846  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
1847  LIBFFI_CFLAGS
1848              C compiler flags for LIBFFI, overriding pkg-config
1849  LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
1850
1851Use these variables to override the choices made by `configure' or to help
1852it to find libraries and programs with nonstandard names/locations.
1853
1854Report bugs to <build-dev@openjdk.java.net>.
1855OpenJDK home page: <http://openjdk.java.net>.
1856_ACEOF
1857ac_status=$?
1858fi
1859
1860if test "$ac_init_help" = "recursive"; then
1861  # If there are subdirs, report their specific --help.
1862  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1863    test -d "$ac_dir" ||
1864      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1865      continue
1866    ac_builddir=.
1867
1868case "$ac_dir" in
1869.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1870*)
1871  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1872  # A ".." for each directory in $ac_dir_suffix.
1873  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1874  case $ac_top_builddir_sub in
1875  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1876  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1877  esac ;;
1878esac
1879ac_abs_top_builddir=$ac_pwd
1880ac_abs_builddir=$ac_pwd$ac_dir_suffix
1881# for backward compatibility:
1882ac_top_builddir=$ac_top_build_prefix
1883
1884case $srcdir in
1885  .)  # We are building in place.
1886    ac_srcdir=.
1887    ac_top_srcdir=$ac_top_builddir_sub
1888    ac_abs_top_srcdir=$ac_pwd ;;
1889  [\\/]* | ?:[\\/]* )  # Absolute name.
1890    ac_srcdir=$srcdir$ac_dir_suffix;
1891    ac_top_srcdir=$srcdir
1892    ac_abs_top_srcdir=$srcdir ;;
1893  *) # Relative name.
1894    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1895    ac_top_srcdir=$ac_top_build_prefix$srcdir
1896    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1897esac
1898ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1899
1900    cd "$ac_dir" || { ac_status=$?; continue; }
1901    # Check for guested configure.
1902    if test -f "$ac_srcdir/configure.gnu"; then
1903      echo &&
1904      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1905    elif test -f "$ac_srcdir/configure"; then
1906      echo &&
1907      $SHELL "$ac_srcdir/configure" --help=recursive
1908    else
1909      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1910    fi || ac_status=$?
1911    cd "$ac_pwd" || { ac_status=$?; break; }
1912  done
1913fi
1914
1915test -n "$ac_init_help" && exit $ac_status
1916if $ac_init_version; then
1917  cat <<\_ACEOF
1918OpenJDK configure jdk8
1919generated by GNU Autoconf 2.69
1920
1921Copyright (C) 2012 Free Software Foundation, Inc.
1922This configure script is free software; the Free Software Foundation
1923gives unlimited permission to copy, distribute and modify it.
1924_ACEOF
1925  exit
1926fi
1927
1928## ------------------------ ##
1929## Autoconf initialization. ##
1930## ------------------------ ##
1931
1932# ac_fn_c_try_compile LINENO
1933# --------------------------
1934# Try to compile conftest.$ac_ext, and return whether this succeeded.
1935ac_fn_c_try_compile ()
1936{
1937  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1938  rm -f conftest.$ac_objext
1939  if { { ac_try="$ac_compile"
1940case "(($ac_try" in
1941  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1942  *) ac_try_echo=$ac_try;;
1943esac
1944eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1945$as_echo "$ac_try_echo"; } >&5
1946  (eval "$ac_compile") 2>conftest.err
1947  ac_status=$?
1948  if test -s conftest.err; then
1949    grep -v '^ *+' conftest.err >conftest.er1
1950    cat conftest.er1 >&5
1951    mv -f conftest.er1 conftest.err
1952  fi
1953  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1954  test $ac_status = 0; } && {
1955	 test -z "$ac_c_werror_flag" ||
1956	 test ! -s conftest.err
1957       } && test -s conftest.$ac_objext; then :
1958  ac_retval=0
1959else
1960  $as_echo "$as_me: failed program was:" >&5
1961sed 's/^/| /' conftest.$ac_ext >&5
1962
1963	ac_retval=1
1964fi
1965  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1966  as_fn_set_status $ac_retval
1967
1968} # ac_fn_c_try_compile
1969
1970# ac_fn_cxx_try_compile LINENO
1971# ----------------------------
1972# Try to compile conftest.$ac_ext, and return whether this succeeded.
1973ac_fn_cxx_try_compile ()
1974{
1975  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1976  rm -f conftest.$ac_objext
1977  if { { ac_try="$ac_compile"
1978case "(($ac_try" in
1979  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1980  *) ac_try_echo=$ac_try;;
1981esac
1982eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1983$as_echo "$ac_try_echo"; } >&5
1984  (eval "$ac_compile") 2>conftest.err
1985  ac_status=$?
1986  if test -s conftest.err; then
1987    grep -v '^ *+' conftest.err >conftest.er1
1988    cat conftest.er1 >&5
1989    mv -f conftest.er1 conftest.err
1990  fi
1991  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1992  test $ac_status = 0; } && {
1993	 test -z "$ac_cxx_werror_flag" ||
1994	 test ! -s conftest.err
1995       } && test -s conftest.$ac_objext; then :
1996  ac_retval=0
1997else
1998  $as_echo "$as_me: failed program was:" >&5
1999sed 's/^/| /' conftest.$ac_ext >&5
2000
2001	ac_retval=1
2002fi
2003  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2004  as_fn_set_status $ac_retval
2005
2006} # ac_fn_cxx_try_compile
2007
2008# ac_fn_objc_try_compile LINENO
2009# -----------------------------
2010# Try to compile conftest.$ac_ext, and return whether this succeeded.
2011ac_fn_objc_try_compile ()
2012{
2013  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2014  rm -f conftest.$ac_objext
2015  if { { ac_try="$ac_compile"
2016case "(($ac_try" in
2017  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2018  *) ac_try_echo=$ac_try;;
2019esac
2020eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2021$as_echo "$ac_try_echo"; } >&5
2022  (eval "$ac_compile") 2>conftest.err
2023  ac_status=$?
2024  if test -s conftest.err; then
2025    grep -v '^ *+' conftest.err >conftest.er1
2026    cat conftest.er1 >&5
2027    mv -f conftest.er1 conftest.err
2028  fi
2029  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2030  test $ac_status = 0; } && {
2031	 test -z "$ac_objc_werror_flag" ||
2032	 test ! -s conftest.err
2033       } && test -s conftest.$ac_objext; then :
2034  ac_retval=0
2035else
2036  $as_echo "$as_me: failed program was:" >&5
2037sed 's/^/| /' conftest.$ac_ext >&5
2038
2039	ac_retval=1
2040fi
2041  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2042  as_fn_set_status $ac_retval
2043
2044} # ac_fn_objc_try_compile
2045
2046# ac_fn_c_try_cpp LINENO
2047# ----------------------
2048# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2049ac_fn_c_try_cpp ()
2050{
2051  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2052  if { { ac_try="$ac_cpp conftest.$ac_ext"
2053case "(($ac_try" in
2054  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2055  *) ac_try_echo=$ac_try;;
2056esac
2057eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2058$as_echo "$ac_try_echo"; } >&5
2059  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2060  ac_status=$?
2061  if test -s conftest.err; then
2062    grep -v '^ *+' conftest.err >conftest.er1
2063    cat conftest.er1 >&5
2064    mv -f conftest.er1 conftest.err
2065  fi
2066  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2067  test $ac_status = 0; } > conftest.i && {
2068	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2069	 test ! -s conftest.err
2070       }; then :
2071  ac_retval=0
2072else
2073  $as_echo "$as_me: failed program was:" >&5
2074sed 's/^/| /' conftest.$ac_ext >&5
2075
2076    ac_retval=1
2077fi
2078  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2079  as_fn_set_status $ac_retval
2080
2081} # ac_fn_c_try_cpp
2082
2083# ac_fn_cxx_try_cpp LINENO
2084# ------------------------
2085# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2086ac_fn_cxx_try_cpp ()
2087{
2088  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2089  if { { ac_try="$ac_cpp conftest.$ac_ext"
2090case "(($ac_try" in
2091  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2092  *) ac_try_echo=$ac_try;;
2093esac
2094eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2095$as_echo "$ac_try_echo"; } >&5
2096  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2097  ac_status=$?
2098  if test -s conftest.err; then
2099    grep -v '^ *+' conftest.err >conftest.er1
2100    cat conftest.er1 >&5
2101    mv -f conftest.er1 conftest.err
2102  fi
2103  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2104  test $ac_status = 0; } > conftest.i && {
2105	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2106	 test ! -s conftest.err
2107       }; then :
2108  ac_retval=0
2109else
2110  $as_echo "$as_me: failed program was:" >&5
2111sed 's/^/| /' conftest.$ac_ext >&5
2112
2113    ac_retval=1
2114fi
2115  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2116  as_fn_set_status $ac_retval
2117
2118} # ac_fn_cxx_try_cpp
2119
2120# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2121# ---------------------------------------------------------
2122# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2123# the include files in INCLUDES and setting the cache variable VAR
2124# accordingly.
2125ac_fn_cxx_check_header_mongrel ()
2126{
2127  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2128  if eval \${$3+:} false; then :
2129  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2130$as_echo_n "checking for $2... " >&6; }
2131if eval \${$3+:} false; then :
2132  $as_echo_n "(cached) " >&6
2133fi
2134eval ac_res=\$$3
2135	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2136$as_echo "$ac_res" >&6; }
2137else
2138  # Is the header compilable?
2139{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2140$as_echo_n "checking $2 usability... " >&6; }
2141cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2142/* end confdefs.h.  */
2143$4
2144#include <$2>
2145_ACEOF
2146if ac_fn_cxx_try_compile "$LINENO"; then :
2147  ac_header_compiler=yes
2148else
2149  ac_header_compiler=no
2150fi
2151rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2152{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2153$as_echo "$ac_header_compiler" >&6; }
2154
2155# Is the header present?
2156{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2157$as_echo_n "checking $2 presence... " >&6; }
2158cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2159/* end confdefs.h.  */
2160#include <$2>
2161_ACEOF
2162if ac_fn_cxx_try_cpp "$LINENO"; then :
2163  ac_header_preproc=yes
2164else
2165  ac_header_preproc=no
2166fi
2167rm -f conftest.err conftest.i conftest.$ac_ext
2168{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2169$as_echo "$ac_header_preproc" >&6; }
2170
2171# So?  What about this header?
2172case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2173  yes:no: )
2174    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2175$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2176    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2177$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2178    ;;
2179  no:yes:* )
2180    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2181$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2182    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2183$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2184    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2185$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2186    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2187$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2188    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2189$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2190( $as_echo "## ----------------------------------------- ##
2191## Report this to build-dev@openjdk.java.net ##
2192## ----------------------------------------- ##"
2193     ) | sed "s/^/$as_me: WARNING:     /" >&2
2194    ;;
2195esac
2196  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2197$as_echo_n "checking for $2... " >&6; }
2198if eval \${$3+:} false; then :
2199  $as_echo_n "(cached) " >&6
2200else
2201  eval "$3=\$ac_header_compiler"
2202fi
2203eval ac_res=\$$3
2204	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2205$as_echo "$ac_res" >&6; }
2206fi
2207  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2208
2209} # ac_fn_cxx_check_header_mongrel
2210
2211# ac_fn_cxx_try_run LINENO
2212# ------------------------
2213# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2214# that executables *can* be run.
2215ac_fn_cxx_try_run ()
2216{
2217  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2218  if { { ac_try="$ac_link"
2219case "(($ac_try" in
2220  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2221  *) ac_try_echo=$ac_try;;
2222esac
2223eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2224$as_echo "$ac_try_echo"; } >&5
2225  (eval "$ac_link") 2>&5
2226  ac_status=$?
2227  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2228  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2229  { { case "(($ac_try" in
2230  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2231  *) ac_try_echo=$ac_try;;
2232esac
2233eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2234$as_echo "$ac_try_echo"; } >&5
2235  (eval "$ac_try") 2>&5
2236  ac_status=$?
2237  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2238  test $ac_status = 0; }; }; then :
2239  ac_retval=0
2240else
2241  $as_echo "$as_me: program exited with status $ac_status" >&5
2242       $as_echo "$as_me: failed program was:" >&5
2243sed 's/^/| /' conftest.$ac_ext >&5
2244
2245       ac_retval=$ac_status
2246fi
2247  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2248  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2249  as_fn_set_status $ac_retval
2250
2251} # ac_fn_cxx_try_run
2252
2253# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2254# ---------------------------------------------------------
2255# Tests whether HEADER exists and can be compiled using the include files in
2256# INCLUDES, setting the cache variable VAR accordingly.
2257ac_fn_cxx_check_header_compile ()
2258{
2259  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2260  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2261$as_echo_n "checking for $2... " >&6; }
2262if eval \${$3+:} false; then :
2263  $as_echo_n "(cached) " >&6
2264else
2265  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2266/* end confdefs.h.  */
2267$4
2268#include <$2>
2269_ACEOF
2270if ac_fn_cxx_try_compile "$LINENO"; then :
2271  eval "$3=yes"
2272else
2273  eval "$3=no"
2274fi
2275rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2276fi
2277eval ac_res=\$$3
2278	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2279$as_echo "$ac_res" >&6; }
2280  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2281
2282} # ac_fn_cxx_check_header_compile
2283
2284# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2285# ----------------------------------------------
2286# Tries to find the compile-time value of EXPR in a program that includes
2287# INCLUDES, setting VAR accordingly. Returns whether the value could be
2288# computed
2289ac_fn_cxx_compute_int ()
2290{
2291  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2292  if test "$cross_compiling" = yes; then
2293    # Depending upon the size, compute the lo and hi bounds.
2294cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2295/* end confdefs.h.  */
2296$4
2297int
2298main ()
2299{
2300static int test_array [1 - 2 * !(($2) >= 0)];
2301test_array [0] = 0;
2302return test_array [0];
2303
2304  ;
2305  return 0;
2306}
2307_ACEOF
2308if ac_fn_cxx_try_compile "$LINENO"; then :
2309  ac_lo=0 ac_mid=0
2310  while :; do
2311    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2312/* end confdefs.h.  */
2313$4
2314int
2315main ()
2316{
2317static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2318test_array [0] = 0;
2319return test_array [0];
2320
2321  ;
2322  return 0;
2323}
2324_ACEOF
2325if ac_fn_cxx_try_compile "$LINENO"; then :
2326  ac_hi=$ac_mid; break
2327else
2328  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2329			if test $ac_lo -le $ac_mid; then
2330			  ac_lo= ac_hi=
2331			  break
2332			fi
2333			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2334fi
2335rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2336  done
2337else
2338  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2339/* end confdefs.h.  */
2340$4
2341int
2342main ()
2343{
2344static int test_array [1 - 2 * !(($2) < 0)];
2345test_array [0] = 0;
2346return test_array [0];
2347
2348  ;
2349  return 0;
2350}
2351_ACEOF
2352if ac_fn_cxx_try_compile "$LINENO"; then :
2353  ac_hi=-1 ac_mid=-1
2354  while :; do
2355    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2356/* end confdefs.h.  */
2357$4
2358int
2359main ()
2360{
2361static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2362test_array [0] = 0;
2363return test_array [0];
2364
2365  ;
2366  return 0;
2367}
2368_ACEOF
2369if ac_fn_cxx_try_compile "$LINENO"; then :
2370  ac_lo=$ac_mid; break
2371else
2372  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2373			if test $ac_mid -le $ac_hi; then
2374			  ac_lo= ac_hi=
2375			  break
2376			fi
2377			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2378fi
2379rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2380  done
2381else
2382  ac_lo= ac_hi=
2383fi
2384rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2385fi
2386rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2387# Binary search between lo and hi bounds.
2388while test "x$ac_lo" != "x$ac_hi"; do
2389  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2390  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2391/* end confdefs.h.  */
2392$4
2393int
2394main ()
2395{
2396static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2397test_array [0] = 0;
2398return test_array [0];
2399
2400  ;
2401  return 0;
2402}
2403_ACEOF
2404if ac_fn_cxx_try_compile "$LINENO"; then :
2405  ac_hi=$ac_mid
2406else
2407  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2408fi
2409rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2410done
2411case $ac_lo in #((
2412?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2413'') ac_retval=1 ;;
2414esac
2415  else
2416    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2417/* end confdefs.h.  */
2418$4
2419static long int longval () { return $2; }
2420static unsigned long int ulongval () { return $2; }
2421#include <stdio.h>
2422#include <stdlib.h>
2423int
2424main ()
2425{
2426
2427  FILE *f = fopen ("conftest.val", "w");
2428  if (! f)
2429    return 1;
2430  if (($2) < 0)
2431    {
2432      long int i = longval ();
2433      if (i != ($2))
2434	return 1;
2435      fprintf (f, "%ld", i);
2436    }
2437  else
2438    {
2439      unsigned long int i = ulongval ();
2440      if (i != ($2))
2441	return 1;
2442      fprintf (f, "%lu", i);
2443    }
2444  /* Do not output a trailing newline, as this causes \r\n confusion
2445     on some platforms.  */
2446  return ferror (f) || fclose (f) != 0;
2447
2448  ;
2449  return 0;
2450}
2451_ACEOF
2452if ac_fn_cxx_try_run "$LINENO"; then :
2453  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2454else
2455  ac_retval=1
2456fi
2457rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2458  conftest.$ac_objext conftest.beam conftest.$ac_ext
2459rm -f conftest.val
2460
2461  fi
2462  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2463  as_fn_set_status $ac_retval
2464
2465} # ac_fn_cxx_compute_int
2466
2467# ac_fn_cxx_try_link LINENO
2468# -------------------------
2469# Try to link conftest.$ac_ext, and return whether this succeeded.
2470ac_fn_cxx_try_link ()
2471{
2472  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2473  rm -f conftest.$ac_objext conftest$ac_exeext
2474  if { { ac_try="$ac_link"
2475case "(($ac_try" in
2476  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2477  *) ac_try_echo=$ac_try;;
2478esac
2479eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2480$as_echo "$ac_try_echo"; } >&5
2481  (eval "$ac_link") 2>conftest.err
2482  ac_status=$?
2483  if test -s conftest.err; then
2484    grep -v '^ *+' conftest.err >conftest.er1
2485    cat conftest.er1 >&5
2486    mv -f conftest.er1 conftest.err
2487  fi
2488  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2489  test $ac_status = 0; } && {
2490	 test -z "$ac_cxx_werror_flag" ||
2491	 test ! -s conftest.err
2492       } && test -s conftest$ac_exeext && {
2493	 test "$cross_compiling" = yes ||
2494	 test -x conftest$ac_exeext
2495       }; then :
2496  ac_retval=0
2497else
2498  $as_echo "$as_me: failed program was:" >&5
2499sed 's/^/| /' conftest.$ac_ext >&5
2500
2501	ac_retval=1
2502fi
2503  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2504  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2505  # interfere with the next link command; also delete a directory that is
2506  # left behind by Apple's compiler.  We do this before executing the actions.
2507  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2508  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2509  as_fn_set_status $ac_retval
2510
2511} # ac_fn_cxx_try_link
2512
2513# ac_fn_cxx_check_func LINENO FUNC VAR
2514# ------------------------------------
2515# Tests whether FUNC exists, setting the cache variable VAR accordingly
2516ac_fn_cxx_check_func ()
2517{
2518  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2519  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2520$as_echo_n "checking for $2... " >&6; }
2521if eval \${$3+:} false; then :
2522  $as_echo_n "(cached) " >&6
2523else
2524  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2525/* end confdefs.h.  */
2526/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2527   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2528#define $2 innocuous_$2
2529
2530/* System header to define __stub macros and hopefully few prototypes,
2531    which can conflict with char $2 (); below.
2532    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2533    <limits.h> exists even on freestanding compilers.  */
2534
2535#ifdef __STDC__
2536# include <limits.h>
2537#else
2538# include <assert.h>
2539#endif
2540
2541#undef $2
2542
2543/* Override any GCC internal prototype to avoid an error.
2544   Use char because int might match the return type of a GCC
2545   builtin and then its argument prototype would still apply.  */
2546#ifdef __cplusplus
2547extern "C"
2548#endif
2549char $2 ();
2550/* The GNU C library defines this for functions which it implements
2551    to always fail with ENOSYS.  Some functions are actually named
2552    something starting with __ and the normal name is an alias.  */
2553#if defined __stub_$2 || defined __stub___$2
2554choke me
2555#endif
2556
2557int
2558main ()
2559{
2560return $2 ();
2561  ;
2562  return 0;
2563}
2564_ACEOF
2565if ac_fn_cxx_try_link "$LINENO"; then :
2566  eval "$3=yes"
2567else
2568  eval "$3=no"
2569fi
2570rm -f core conftest.err conftest.$ac_objext \
2571    conftest$ac_exeext conftest.$ac_ext
2572fi
2573eval ac_res=\$$3
2574	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2575$as_echo "$ac_res" >&6; }
2576  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2577
2578} # ac_fn_cxx_check_func
2579
2580# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2581# -------------------------------------------------------
2582# Tests whether HEADER exists and can be compiled using the include files in
2583# INCLUDES, setting the cache variable VAR accordingly.
2584ac_fn_c_check_header_compile ()
2585{
2586  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2587  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2588$as_echo_n "checking for $2... " >&6; }
2589if eval \${$3+:} false; then :
2590  $as_echo_n "(cached) " >&6
2591else
2592  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2593/* end confdefs.h.  */
2594$4
2595#include <$2>
2596_ACEOF
2597if ac_fn_c_try_compile "$LINENO"; then :
2598  eval "$3=yes"
2599else
2600  eval "$3=no"
2601fi
2602rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2603fi
2604eval ac_res=\$$3
2605	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2606$as_echo "$ac_res" >&6; }
2607  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2608
2609} # ac_fn_c_check_header_compile
2610cat >config.log <<_ACEOF
2611This file contains any messages produced by compilers while
2612running configure, to aid debugging if configure makes a mistake.
2613
2614It was created by OpenJDK $as_me jdk8, which was
2615generated by GNU Autoconf 2.69.  Invocation command line was
2616
2617  $ $0 $@
2618
2619_ACEOF
2620exec 5>>config.log
2621{
2622cat <<_ASUNAME
2623## --------- ##
2624## Platform. ##
2625## --------- ##
2626
2627hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2628uname -m = `(uname -m) 2>/dev/null || echo unknown`
2629uname -r = `(uname -r) 2>/dev/null || echo unknown`
2630uname -s = `(uname -s) 2>/dev/null || echo unknown`
2631uname -v = `(uname -v) 2>/dev/null || echo unknown`
2632
2633/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2634/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2635
2636/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2637/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2638/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2639/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2640/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2641/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2642/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2643
2644_ASUNAME
2645
2646as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2647for as_dir in $PATH
2648do
2649  IFS=$as_save_IFS
2650  test -z "$as_dir" && as_dir=.
2651    $as_echo "PATH: $as_dir"
2652  done
2653IFS=$as_save_IFS
2654
2655} >&5
2656
2657cat >&5 <<_ACEOF
2658
2659
2660## ----------- ##
2661## Core tests. ##
2662## ----------- ##
2663
2664_ACEOF
2665
2666
2667# Keep a trace of the command line.
2668# Strip out --no-create and --no-recursion so they do not pile up.
2669# Strip out --silent because we don't want to record it for future runs.
2670# Also quote any args containing shell meta-characters.
2671# Make two passes to allow for proper duplicate-argument suppression.
2672ac_configure_args=
2673ac_configure_args0=
2674ac_configure_args1=
2675ac_must_keep_next=false
2676for ac_pass in 1 2
2677do
2678  for ac_arg
2679  do
2680    case $ac_arg in
2681    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2682    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2683    | -silent | --silent | --silen | --sile | --sil)
2684      continue ;;
2685    *\'*)
2686      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2687    esac
2688    case $ac_pass in
2689    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2690    2)
2691      as_fn_append ac_configure_args1 " '$ac_arg'"
2692      if test $ac_must_keep_next = true; then
2693	ac_must_keep_next=false # Got value, back to normal.
2694      else
2695	case $ac_arg in
2696	  *=* | --config-cache | -C | -disable-* | --disable-* \
2697	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2698	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2699	  | -with-* | --with-* | -without-* | --without-* | --x)
2700	    case "$ac_configure_args0 " in
2701	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2702	    esac
2703	    ;;
2704	  -* ) ac_must_keep_next=true ;;
2705	esac
2706      fi
2707      as_fn_append ac_configure_args " '$ac_arg'"
2708      ;;
2709    esac
2710  done
2711done
2712{ ac_configure_args0=; unset ac_configure_args0;}
2713{ ac_configure_args1=; unset ac_configure_args1;}
2714
2715# When interrupted or exit'd, cleanup temporary files, and complete
2716# config.log.  We remove comments because anyway the quotes in there
2717# would cause problems or look ugly.
2718# WARNING: Use '\'' to represent an apostrophe within the trap.
2719# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2720trap 'exit_status=$?
2721  # Save into config.log some information that might help in debugging.
2722  {
2723    echo
2724
2725    $as_echo "## ---------------- ##
2726## Cache variables. ##
2727## ---------------- ##"
2728    echo
2729    # The following way of writing the cache mishandles newlines in values,
2730(
2731  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2732    eval ac_val=\$$ac_var
2733    case $ac_val in #(
2734    *${as_nl}*)
2735      case $ac_var in #(
2736      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2737$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2738      esac
2739      case $ac_var in #(
2740      _ | IFS | as_nl) ;; #(
2741      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2742      *) { eval $ac_var=; unset $ac_var;} ;;
2743      esac ;;
2744    esac
2745  done
2746  (set) 2>&1 |
2747    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2748    *${as_nl}ac_space=\ *)
2749      sed -n \
2750	"s/'\''/'\''\\\\'\'''\''/g;
2751	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2752      ;; #(
2753    *)
2754      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2755      ;;
2756    esac |
2757    sort
2758)
2759    echo
2760
2761    $as_echo "## ----------------- ##
2762## Output variables. ##
2763## ----------------- ##"
2764    echo
2765    for ac_var in $ac_subst_vars
2766    do
2767      eval ac_val=\$$ac_var
2768      case $ac_val in
2769      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2770      esac
2771      $as_echo "$ac_var='\''$ac_val'\''"
2772    done | sort
2773    echo
2774
2775    if test -n "$ac_subst_files"; then
2776      $as_echo "## ------------------- ##
2777## File substitutions. ##
2778## ------------------- ##"
2779      echo
2780      for ac_var in $ac_subst_files
2781      do
2782	eval ac_val=\$$ac_var
2783	case $ac_val in
2784	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2785	esac
2786	$as_echo "$ac_var='\''$ac_val'\''"
2787      done | sort
2788      echo
2789    fi
2790
2791    if test -s confdefs.h; then
2792      $as_echo "## ----------- ##
2793## confdefs.h. ##
2794## ----------- ##"
2795      echo
2796      cat confdefs.h
2797      echo
2798    fi
2799    test "$ac_signal" != 0 &&
2800      $as_echo "$as_me: caught signal $ac_signal"
2801    $as_echo "$as_me: exit $exit_status"
2802  } >&5
2803  rm -f core *.core core.conftest.* &&
2804    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2805    exit $exit_status
2806' 0
2807for ac_signal in 1 2 13 15; do
2808  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2809done
2810ac_signal=0
2811
2812# confdefs.h avoids OS command line length limits that DEFS can exceed.
2813rm -f -r conftest* confdefs.h
2814
2815$as_echo "/* confdefs.h */" > confdefs.h
2816
2817# Predefined preprocessor variables.
2818
2819cat >>confdefs.h <<_ACEOF
2820#define PACKAGE_NAME "$PACKAGE_NAME"
2821_ACEOF
2822
2823cat >>confdefs.h <<_ACEOF
2824#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2825_ACEOF
2826
2827cat >>confdefs.h <<_ACEOF
2828#define PACKAGE_VERSION "$PACKAGE_VERSION"
2829_ACEOF
2830
2831cat >>confdefs.h <<_ACEOF
2832#define PACKAGE_STRING "$PACKAGE_STRING"
2833_ACEOF
2834
2835cat >>confdefs.h <<_ACEOF
2836#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2837_ACEOF
2838
2839cat >>confdefs.h <<_ACEOF
2840#define PACKAGE_URL "$PACKAGE_URL"
2841_ACEOF
2842
2843
2844# Let the site file select an alternate cache file if it wants to.
2845# Prefer an explicitly selected file to automatically selected ones.
2846ac_site_file1=NONE
2847ac_site_file2=NONE
2848if test -n "$CONFIG_SITE"; then
2849  # We do not want a PATH search for config.site.
2850  case $CONFIG_SITE in #((
2851    -*)  ac_site_file1=./$CONFIG_SITE;;
2852    */*) ac_site_file1=$CONFIG_SITE;;
2853    *)   ac_site_file1=./$CONFIG_SITE;;
2854  esac
2855elif test "x$prefix" != xNONE; then
2856  ac_site_file1=$prefix/share/config.site
2857  ac_site_file2=$prefix/etc/config.site
2858else
2859  ac_site_file1=$ac_default_prefix/share/config.site
2860  ac_site_file2=$ac_default_prefix/etc/config.site
2861fi
2862for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2863do
2864  test "x$ac_site_file" = xNONE && continue
2865  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2866    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2867$as_echo "$as_me: loading site script $ac_site_file" >&6;}
2868    sed 's/^/| /' "$ac_site_file" >&5
2869    . "$ac_site_file" \
2870      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2871$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2872as_fn_error $? "failed to load site script $ac_site_file
2873See \`config.log' for more details" "$LINENO" 5; }
2874  fi
2875done
2876
2877if test -r "$cache_file"; then
2878  # Some versions of bash will fail to source /dev/null (special files
2879  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
2880  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2881    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2882$as_echo "$as_me: loading cache $cache_file" >&6;}
2883    case $cache_file in
2884      [\\/]* | ?:[\\/]* ) . "$cache_file";;
2885      *)                      . "./$cache_file";;
2886    esac
2887  fi
2888else
2889  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2890$as_echo "$as_me: creating cache $cache_file" >&6;}
2891  >$cache_file
2892fi
2893
2894# Check that the precious variables saved in the cache have kept the same
2895# value.
2896ac_cache_corrupted=false
2897for ac_var in $ac_precious_vars; do
2898  eval ac_old_set=\$ac_cv_env_${ac_var}_set
2899  eval ac_new_set=\$ac_env_${ac_var}_set
2900  eval ac_old_val=\$ac_cv_env_${ac_var}_value
2901  eval ac_new_val=\$ac_env_${ac_var}_value
2902  case $ac_old_set,$ac_new_set in
2903    set,)
2904      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2905$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2906      ac_cache_corrupted=: ;;
2907    ,set)
2908      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2909$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2910      ac_cache_corrupted=: ;;
2911    ,);;
2912    *)
2913      if test "x$ac_old_val" != "x$ac_new_val"; then
2914	# differences in whitespace do not lead to failure.
2915	ac_old_val_w=`echo x $ac_old_val`
2916	ac_new_val_w=`echo x $ac_new_val`
2917	if test "$ac_old_val_w" != "$ac_new_val_w"; then
2918	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2919$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2920	  ac_cache_corrupted=:
2921	else
2922	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2923$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2924	  eval $ac_var=\$ac_old_val
2925	fi
2926	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
2927$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
2928	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
2929$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
2930      fi;;
2931  esac
2932  # Pass precious variables to config.status.
2933  if test "$ac_new_set" = set; then
2934    case $ac_new_val in
2935    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2936    *) ac_arg=$ac_var=$ac_new_val ;;
2937    esac
2938    case " $ac_configure_args " in
2939      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
2940      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2941    esac
2942  fi
2943done
2944if $ac_cache_corrupted; then
2945  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2946$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2947  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2948$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2949  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2950fi
2951## -------------------- ##
2952## Main body of script. ##
2953## -------------------- ##
2954
2955ac_ext=c
2956ac_cpp='$CPP $CPPFLAGS'
2957ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2958ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2959ac_compiler_gnu=$ac_cv_c_compiler_gnu
2960
2961
2962
2963ac_aux_dir=
2964for ac_dir in build-aux "$srcdir"/build-aux; do
2965  if test -f "$ac_dir/install-sh"; then
2966    ac_aux_dir=$ac_dir
2967    ac_install_sh="$ac_aux_dir/install-sh -c"
2968    break
2969  elif test -f "$ac_dir/install.sh"; then
2970    ac_aux_dir=$ac_dir
2971    ac_install_sh="$ac_aux_dir/install.sh -c"
2972    break
2973  elif test -f "$ac_dir/shtool"; then
2974    ac_aux_dir=$ac_dir
2975    ac_install_sh="$ac_aux_dir/shtool install -c"
2976    break
2977  fi
2978done
2979if test -z "$ac_aux_dir"; then
2980  as_fn_error $? "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5
2981fi
2982
2983# These three variables are undocumented and unsupported,
2984# and are intended to be withdrawn in a future Autoconf release.
2985# They can cause serious problems if a builder's source tree is in a directory
2986# whose full name contains unusual characters.
2987ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
2988ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
2989ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
2990
2991
2992# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
2993
2994#
2995# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
2996# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
2997#
2998# This code is free software; you can redistribute it and/or modify it
2999# under the terms of the GNU General Public License version 2 only, as
3000# published by the Free Software Foundation.  Oracle designates this
3001# particular file as subject to the "Classpath" exception as provided
3002# by Oracle in the LICENSE file that accompanied this code.
3003#
3004# This code is distributed in the hope that it will be useful, but WITHOUT
3005# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3006# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3007# version 2 for more details (a copy is included in the LICENSE file that
3008# accompanied this code).
3009#
3010# You should have received a copy of the GNU General Public License version
3011# 2 along with this work; if not, write to the Free Software Foundation,
3012# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3013#
3014# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3015# or visit www.oracle.com if you need additional information or have any
3016# questions.
3017#
3018
3019#
3020# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
3021#
3022# This program is free software; you can redistribute it and/or modify
3023# it under the terms of the GNU General Public License as published by
3024# the Free Software Foundation; either version 2 of the License, or
3025# (at your option) any later version.
3026#
3027# This program is distributed in the hope that it will be useful, but
3028# WITHOUT ANY WARRANTY; without even the implied warranty of
3029# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3030# General Public License for more details.
3031#
3032# You should have received a copy of the GNU General Public License
3033# along with this program; if not, write to the Free Software
3034# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3035#
3036# As a special exception to the GNU General Public License, if you
3037# distribute this file as part of a program that contains a
3038# configuration script generated by Autoconf, you may include it under
3039# the same distribution terms that you use for the rest of that program.
3040
3041# PKG_PROG_PKG_CONFIG([MIN-VERSION])
3042# ----------------------------------
3043# PKG_PROG_PKG_CONFIG
3044
3045# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3046#
3047# Check to see whether a particular set of modules exists.  Similar
3048# to PKG_CHECK_MODULES(), but does not set variables or print errors.
3049#
3050#
3051# Similar to PKG_CHECK_MODULES, make sure that the first instance of
3052# this or PKG_CHECK_MODULES is called, or make sure to call
3053# PKG_CHECK_EXISTS manually
3054# --------------------------------------------------------------
3055
3056
3057
3058# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3059# ---------------------------------------------
3060# _PKG_CONFIG
3061
3062# _PKG_SHORT_ERRORS_SUPPORTED
3063# -----------------------------
3064# _PKG_SHORT_ERRORS_SUPPORTED
3065
3066
3067# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3068# [ACTION-IF-NOT-FOUND])
3069#
3070#
3071# Note that if there is a possibility the first call to
3072# PKG_CHECK_MODULES might not happen, you should be sure to include an
3073# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3074#
3075#
3076# --------------------------------------------------------------
3077# PKG_CHECK_MODULES
3078
3079
3080# Include these first...
3081#
3082# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
3083# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3084#
3085# This code is free software; you can redistribute it and/or modify it
3086# under the terms of the GNU General Public License version 2 only, as
3087# published by the Free Software Foundation.  Oracle designates this
3088# particular file as subject to the "Classpath" exception as provided
3089# by Oracle in the LICENSE file that accompanied this code.
3090#
3091# This code is distributed in the hope that it will be useful, but WITHOUT
3092# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3093# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3094# version 2 for more details (a copy is included in the LICENSE file that
3095# accompanied this code).
3096#
3097# You should have received a copy of the GNU General Public License version
3098# 2 along with this work; if not, write to the Free Software Foundation,
3099# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3100#
3101# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3102# or visit www.oracle.com if you need additional information or have any
3103# questions.
3104#
3105
3106# Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3107# If so, then append $1 to $2\
3108# Also set JVM_ARG_OK to true/false depending on outcome.
3109
3110
3111# Appends a string to a path variable, only adding the : when needed.
3112
3113
3114# This will make sure the given variable points to a full and proper
3115# path. This means:
3116# 1) There will be no spaces in the path. On posix platforms,
3117#    spaces in the path will result in an error. On Windows,
3118#    the path will be rewritten using short-style to be space-free.
3119# 2) The path will be absolute, and it will be in unix-style (on
3120#     cygwin).
3121# $1: The name of the variable to fix
3122
3123
3124# This will make sure the given variable points to a executable
3125# with a full and proper path. This means:
3126# 1) There will be no spaces in the path. On posix platforms,
3127#    spaces in the path will result in an error. On Windows,
3128#    the path will be rewritten using short-style to be space-free.
3129# 2) The path will be absolute, and it will be in unix-style (on
3130#     cygwin).
3131# Any arguments given to the executable is preserved.
3132# If the input variable does not have a directory specification, then
3133# it need to be in the PATH.
3134# $1: The name of the variable to fix
3135
3136
3137
3138
3139
3140
3141# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3142# $1: variable to check
3143# $2: executable name to print in warning (optional)
3144
3145
3146# Does AC_PATH_PROG followed by BASIC_CHECK_NONEMPTY.
3147# Arguments as AC_PATH_PROG:
3148# $1: variable to set
3149# $2: executable name to look for
3150
3151
3152# Setup the most fundamental tools that relies on not much else to set up,
3153# but is used by much of the early bootstrap code.
3154
3155
3156# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3157
3158
3159
3160
3161
3162
3163
3164#%%% Simple tools %%%
3165
3166# Check if we have found a usable version of make
3167# $1: the path to a potential make binary (or empty)
3168# $2: the description on how we found this
3169
3170
3171# Goes looking for a usable version of GNU make.
3172
3173
3174
3175
3176
3177
3178# Check if build directory is on local disk. If not possible to determine,
3179# we prefer to claim it's local.
3180# Argument 1: directory to test
3181# Argument 2: what to do if it is on local disk
3182# Argument 3: what to do otherwise (remote disk or failure)
3183
3184
3185# Check that source files have basic read permissions set. This might
3186# not be the case in cygwin in certain conditions.
3187
3188
3189
3190
3191#
3192# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3193# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3194#
3195# This code is free software; you can redistribute it and/or modify it
3196# under the terms of the GNU General Public License version 2 only, as
3197# published by the Free Software Foundation.  Oracle designates this
3198# particular file as subject to the "Classpath" exception as provided
3199# by Oracle in the LICENSE file that accompanied this code.
3200#
3201# This code is distributed in the hope that it will be useful, but WITHOUT
3202# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3203# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3204# version 2 for more details (a copy is included in the LICENSE file that
3205# accompanied this code).
3206#
3207# You should have received a copy of the GNU General Public License version
3208# 2 along with this work; if not, write to the Free Software Foundation,
3209# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3210#
3211# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3212# or visit www.oracle.com if you need additional information or have any
3213# questions.
3214#
3215
3216
3217
3218
3219
3220# Helper function which possibly converts a path using DOS-style short mode.
3221# If so, the updated path is stored in $new_path.
3222# $1: The path to check
3223
3224
3225# Helper function which possibly converts a path using DOS-style short mode.
3226# If so, the updated path is stored in $new_path.
3227# $1: The path to check
3228
3229
3230# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3231# and could probably be heavily simplified. However, all changes in this
3232# area tend to need lot of testing in different scenarios, and in lack of
3233# proper unit testing, cleaning this up has not been deemed worth the effort
3234# at the moment.
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3245
3246
3247
3248
3249#
3250# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3251# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3252#
3253# This code is free software; you can redistribute it and/or modify it
3254# under the terms of the GNU General Public License version 2 only, as
3255# published by the Free Software Foundation.  Oracle designates this
3256# particular file as subject to the "Classpath" exception as provided
3257# by Oracle in the LICENSE file that accompanied this code.
3258#
3259# This code is distributed in the hope that it will be useful, but WITHOUT
3260# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3261# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3262# version 2 for more details (a copy is included in the LICENSE file that
3263# accompanied this code).
3264#
3265# You should have received a copy of the GNU General Public License version
3266# 2 along with this work; if not, write to the Free Software Foundation,
3267# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3268#
3269# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3270# or visit www.oracle.com if you need additional information or have any
3271# questions.
3272#
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284# ... then the rest
3285#
3286# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3287# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3288#
3289# This code is free software; you can redistribute it and/or modify it
3290# under the terms of the GNU General Public License version 2 only, as
3291# published by the Free Software Foundation.  Oracle designates this
3292# particular file as subject to the "Classpath" exception as provided
3293# by Oracle in the LICENSE file that accompanied this code.
3294#
3295# This code is distributed in the hope that it will be useful, but WITHOUT
3296# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3297# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3298# version 2 for more details (a copy is included in the LICENSE file that
3299# accompanied this code).
3300#
3301# You should have received a copy of the GNU General Public License version
3302# 2 along with this work; if not, write to the Free Software Foundation,
3303# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3304#
3305# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3306# or visit www.oracle.com if you need additional information or have any
3307# questions.
3308#
3309
3310# Execute the check given as argument, and verify the result
3311# If the Boot JDK was previously found, do nothing
3312# $1 A command line (typically autoconf macro) to execute
3313
3314
3315# Test: Is bootjdk explicitely set by command line arguments?
3316
3317
3318# Test: Is bootjdk available from builddeps?
3319
3320
3321# Test: Is $JAVA_HOME set?
3322
3323
3324# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3325
3326
3327# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3328
3329
3330# Look for a jdk in the given path. If there are multiple, try to select the newest.
3331# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3332# $1 = Path to directory containing jdk installations.
3333# $2 = String to append to the found JDK directory to get the proper JDK home
3334
3335
3336# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3337# environmental variable as base for where to look.
3338# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3339
3340
3341# Test: Is there a JDK installed in default, well-known locations?
3342
3343
3344# Check that a command-line tool in the Boot JDK is correct
3345# $1 = name of variable to assign
3346# $2 = name of binary
3347
3348
3349###############################################################################
3350#
3351# We need a Boot JDK to bootstrap the build.
3352#
3353
3354
3355
3356
3357
3358#
3359# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3360# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3361#
3362# This code is free software; you can redistribute it and/or modify it
3363# under the terms of the GNU General Public License version 2 only, as
3364# published by the Free Software Foundation.  Oracle designates this
3365# particular file as subject to the "Classpath" exception as provided
3366# by Oracle in the LICENSE file that accompanied this code.
3367#
3368# This code is distributed in the hope that it will be useful, but WITHOUT
3369# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3370# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3371# version 2 for more details (a copy is included in the LICENSE file that
3372# accompanied this code).
3373#
3374# You should have received a copy of the GNU General Public License version
3375# 2 along with this work; if not, write to the Free Software Foundation,
3376# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3377#
3378# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3379# or visit www.oracle.com if you need additional information or have any
3380# questions.
3381#
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402#
3403# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3404# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3405#
3406# This code is free software; you can redistribute it and/or modify it
3407# under the terms of the GNU General Public License version 2 only, as
3408# published by the Free Software Foundation.  Oracle designates this
3409# particular file as subject to the "Classpath" exception as provided
3410# by Oracle in the LICENSE file that accompanied this code.
3411#
3412# This code is distributed in the hope that it will be useful, but WITHOUT
3413# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3414# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3415# version 2 for more details (a copy is included in the LICENSE file that
3416# accompanied this code).
3417#
3418# You should have received a copy of the GNU General Public License version
3419# 2 along with this work; if not, write to the Free Software Foundation,
3420# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3421#
3422# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3423# or visit www.oracle.com if you need additional information or have any
3424# questions.
3425#
3426
3427
3428
3429
3430
3431cygwin_help() {
3432    case $1 in
3433    unzip)
3434        PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip" ;;
3435    zip)
3436        PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P zip" ;;
3437    make)
3438        PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P make" ;;
3439    * )
3440       break ;;
3441    esac
3442}
3443
3444apt_help() {
3445    case $1 in
3446    devkit)
3447        PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
3448    openjdk)
3449        PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
3450    alsa)
3451        PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
3452    cups)
3453        PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
3454    freetype2)
3455        PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
3456    pulse)
3457        PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;;
3458    x11)
3459        PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
3460    ccache)
3461        PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
3462    * )
3463       break ;;
3464    esac
3465}
3466
3467yum_help() {
3468    case $1 in
3469    devkit)
3470        PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
3471    openjdk)
3472        PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
3473    alsa)
3474        PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
3475    cups)
3476        PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
3477    freetype2)
3478        PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
3479    pulse)
3480        PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;;
3481    x11)
3482        PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel" ;;
3483    ccache)
3484        PKGHANDLER_COMMAND="sudo yum install ccache" ;;
3485    * )
3486       break ;;
3487    esac
3488}
3489
3490port_help() {
3491    PKGHANDLER_COMMAND=""
3492}
3493
3494pkgutil_help() {
3495    PKGHANDLER_COMMAND=""
3496}
3497
3498pkgadd_help() {
3499    PKGHANDLER_COMMAND=""
3500}
3501
3502
3503
3504#
3505# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
3506# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3507#
3508# This code is free software; you can redistribute it and/or modify it
3509# under the terms of the GNU General Public License version 2 only, as
3510# published by the Free Software Foundation.  Oracle designates this
3511# particular file as subject to the "Classpath" exception as provided
3512# by Oracle in the LICENSE file that accompanied this code.
3513#
3514# This code is distributed in the hope that it will be useful, but WITHOUT
3515# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3516# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3517# version 2 for more details (a copy is included in the LICENSE file that
3518# accompanied this code).
3519#
3520# You should have received a copy of the GNU General Public License version
3521# 2 along with this work; if not, write to the Free Software Foundation,
3522# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3523#
3524# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3525# or visit www.oracle.com if you need additional information or have any
3526# questions.
3527#
3528
3529
3530
3531
3532
3533
3534
3535
3536###############################################################################
3537#
3538# Should we build only OpenJDK even if closed sources are present?
3539#
3540
3541
3542
3543
3544###############################################################################
3545#
3546# Setup version numbers
3547#
3548
3549
3550
3551
3552
3553
3554# Support for customization of the build process. Some build files
3555# will include counterparts from this location, if they exist. This allows
3556# for a degree of customization of the build targets and the rules/recipes
3557# to create them
3558
3559# Check whether --with-custom-make-dir was given.
3560if test "${with_custom_make_dir+set}" = set; then :
3561  withval=$with_custom_make_dir; CUSTOM_MAKE_DIR=$with_custom_make_dir
3562fi
3563
3564
3565
3566#
3567# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3568# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3569#
3570# This code is free software; you can redistribute it and/or modify it
3571# under the terms of the GNU General Public License version 2 only, as
3572# published by the Free Software Foundation.  Oracle designates this
3573# particular file as subject to the "Classpath" exception as provided
3574# by Oracle in the LICENSE file that accompanied this code.
3575#
3576# This code is distributed in the hope that it will be useful, but WITHOUT
3577# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3578# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3579# version 2 for more details (a copy is included in the LICENSE file that
3580# accompanied this code).
3581#
3582# You should have received a copy of the GNU General Public License version
3583# 2 along with this work; if not, write to the Free Software Foundation,
3584# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3585#
3586# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3587# or visit www.oracle.com if you need additional information or have any
3588# questions.
3589#
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605#
3606# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3607# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3608#
3609# This code is free software; you can redistribute it and/or modify it
3610# under the terms of the GNU General Public License version 2 only, as
3611# published by the Free Software Foundation.  Oracle designates this
3612# particular file as subject to the "Classpath" exception as provided
3613# by Oracle in the LICENSE file that accompanied this code.
3614#
3615# This code is distributed in the hope that it will be useful, but WITHOUT
3616# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3617# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3618# version 2 for more details (a copy is included in the LICENSE file that
3619# accompanied this code).
3620#
3621# You should have received a copy of the GNU General Public License version
3622# 2 along with this work; if not, write to the Free Software Foundation,
3623# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3624#
3625# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3626# or visit www.oracle.com if you need additional information or have any
3627# questions.
3628#
3629
3630# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
3631# Converts autoconf style CPU name to OpenJDK style, into
3632# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
3633
3634
3635# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
3636# Converts autoconf style OS name to OpenJDK style, into
3637# VAR_OS and VAR_OS_API.
3638
3639
3640# Expects $host_os $host_cpu $build_os and $build_cpu
3641# and $with_target_bits to have been setup!
3642#
3643# Translate the standard triplet(quadruplet) definition
3644# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
3645# OPENJDK_BUILD_OS, etc.
3646
3647
3648# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
3649# accordingly. Must be done after setting up build and target system, but before
3650# doing anything else with these values.
3651
3652
3653    # Setup the legacy variables, for controlling the old makefiles.
3654    #
3655
3656
3657
3658
3659#%%% Build and target systems %%%
3660
3661
3662
3663
3664# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
3665# Add -mX to various FLAGS variables.
3666
3667
3668
3669
3670
3671
3672#
3673# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3674# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3675#
3676# This code is free software; you can redistribute it and/or modify it
3677# under the terms of the GNU General Public License version 2 only, as
3678# published by the Free Software Foundation.  Oracle designates this
3679# particular file as subject to the "Classpath" exception as provided
3680# by Oracle in the LICENSE file that accompanied this code.
3681#
3682# This code is distributed in the hope that it will be useful, but WITHOUT
3683# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3684# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3685# version 2 for more details (a copy is included in the LICENSE file that
3686# accompanied this code).
3687#
3688# You should have received a copy of the GNU General Public License version
3689# 2 along with this work; if not, write to the Free Software Foundation,
3690# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3691#
3692# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3693# or visit www.oracle.com if you need additional information or have any
3694# questions.
3695#
3696
3697
3698
3699
3700
3701
3702
3703
3704#
3705# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3706# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3707#
3708# This code is free software; you can redistribute it and/or modify it
3709# under the terms of the GNU General Public License version 2 only, as
3710# published by the Free Software Foundation.  Oracle designates this
3711# particular file as subject to the "Classpath" exception as provided
3712# by Oracle in the LICENSE file that accompanied this code.
3713#
3714# This code is distributed in the hope that it will be useful, but WITHOUT
3715# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3716# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3717# version 2 for more details (a copy is included in the LICENSE file that
3718# accompanied this code).
3719#
3720# You should have received a copy of the GNU General Public License version
3721# 2 along with this work; if not, write to the Free Software Foundation,
3722# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3723#
3724# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3725# or visit www.oracle.com if you need additional information or have any
3726# questions.
3727#
3728
3729# $1 = compiler to test (CC or CXX)
3730# $2 = human readable name of compiler (C or C++)
3731
3732
3733
3734
3735
3736# $1 = compiler to test (CC or CXX)
3737# $2 = human readable name of compiler (C or C++)
3738# $3 = list of compiler names to search for
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752# TOOLCHAIN_COMPILER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3753#                                   [RUN-IF-FALSE])
3754# ------------------------------------------------------------
3755# Check that the c and c++ compilers support an argument
3756
3757
3758
3759
3760# Setup the JTREG paths
3761
3762
3763#
3764# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3765# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3766#
3767# This code is free software; you can redistribute it and/or modify it
3768# under the terms of the GNU General Public License version 2 only, as
3769# published by the Free Software Foundation.  Oracle designates this
3770# particular file as subject to the "Classpath" exception as provided
3771# by Oracle in the LICENSE file that accompanied this code.
3772#
3773# This code is distributed in the hope that it will be useful, but WITHOUT
3774# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3775# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3776# version 2 for more details (a copy is included in the LICENSE file that
3777# accompanied this code).
3778#
3779# You should have received a copy of the GNU General Public License version
3780# 2 along with this work; if not, write to the Free Software Foundation,
3781# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3782#
3783# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3784# or visit www.oracle.com if you need additional information or have any
3785# questions.
3786#
3787
3788
3789
3790
3791
3792
3793
3794# Check if the VS env variables were setup prior to running configure.
3795# If not, then find vcvarsall.bat and run it automatically, and integrate
3796# the set env variables into the spec file.
3797
3798
3799
3800
3801
3802
3803# This line needs to be here, verbatim, after all includes and the dummy hook
3804# definitions. It is replaced with custom functionality when building
3805# custom sources.
3806#CUSTOM_AUTOCONF_INCLUDE
3807
3808# Do not change or remove the following line, it is needed for consistency checks:
3809DATE_WHEN_GENERATED=1379070243
3810
3811###############################################################################
3812#
3813# Initialization / Boot-strapping
3814#
3815# The bootstrapping process needs to solve the "chicken or the egg" problem,
3816# thus it jumps back and forth, each time gaining something needed later on.
3817#
3818###############################################################################
3819
3820# Basic initialization that must happen first of all
3821
3822# Save the original command line. This is passed to us by the wrapper configure script.
3823
3824DATE_WHEN_CONFIGURED=`LANG=C date`
3825
3826{ $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
3827$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
3828{ $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
3829$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
3830
3831
3832
3833# Start with tools that do not need have cross compilation support
3834# and can be expected to be found in the default PATH. These tools are
3835# used by configure. Nor are these tools expected to be found in the
3836# devkit from the builddeps server either, since they are
3837# needed to download the devkit.
3838
3839# First are all the simple required tools.
3840
3841    for ac_prog in basename
3842do
3843  # Extract the first word of "$ac_prog", so it can be a program name with args.
3844set dummy $ac_prog; ac_word=$2
3845{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3846$as_echo_n "checking for $ac_word... " >&6; }
3847if ${ac_cv_path_BASENAME+:} false; then :
3848  $as_echo_n "(cached) " >&6
3849else
3850  case $BASENAME in
3851  [\\/]* | ?:[\\/]*)
3852  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
3853  ;;
3854  *)
3855  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3856for as_dir in $PATH
3857do
3858  IFS=$as_save_IFS
3859  test -z "$as_dir" && as_dir=.
3860    for ac_exec_ext in '' $ac_executable_extensions; do
3861  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3862    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
3863    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3864    break 2
3865  fi
3866done
3867  done
3868IFS=$as_save_IFS
3869
3870  ;;
3871esac
3872fi
3873BASENAME=$ac_cv_path_BASENAME
3874if test -n "$BASENAME"; then
3875  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
3876$as_echo "$BASENAME" >&6; }
3877else
3878  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3879$as_echo "no" >&6; }
3880fi
3881
3882
3883  test -n "$BASENAME" && break
3884done
3885
3886
3887    if test "x$BASENAME" = x; then
3888        if test "xbasename" = x; then
3889          PROG_NAME=basename
3890        else
3891          PROG_NAME=basename
3892        fi
3893        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3894$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3895        as_fn_error $? "Cannot continue" "$LINENO" 5
3896    fi
3897
3898
3899
3900    for ac_prog in bash
3901do
3902  # Extract the first word of "$ac_prog", so it can be a program name with args.
3903set dummy $ac_prog; ac_word=$2
3904{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3905$as_echo_n "checking for $ac_word... " >&6; }
3906if ${ac_cv_path_BASH+:} false; then :
3907  $as_echo_n "(cached) " >&6
3908else
3909  case $BASH in
3910  [\\/]* | ?:[\\/]*)
3911  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
3912  ;;
3913  *)
3914  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3915for as_dir in $PATH
3916do
3917  IFS=$as_save_IFS
3918  test -z "$as_dir" && as_dir=.
3919    for ac_exec_ext in '' $ac_executable_extensions; do
3920  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3921    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
3922    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3923    break 2
3924  fi
3925done
3926  done
3927IFS=$as_save_IFS
3928
3929  ;;
3930esac
3931fi
3932BASH=$ac_cv_path_BASH
3933if test -n "$BASH"; then
3934  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
3935$as_echo "$BASH" >&6; }
3936else
3937  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3938$as_echo "no" >&6; }
3939fi
3940
3941
3942  test -n "$BASH" && break
3943done
3944
3945
3946    if test "x$BASH" = x; then
3947        if test "xbash" = x; then
3948          PROG_NAME=bash
3949        else
3950          PROG_NAME=bash
3951        fi
3952        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3953$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3954        as_fn_error $? "Cannot continue" "$LINENO" 5
3955    fi
3956
3957
3958
3959    for ac_prog in cat
3960do
3961  # Extract the first word of "$ac_prog", so it can be a program name with args.
3962set dummy $ac_prog; ac_word=$2
3963{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3964$as_echo_n "checking for $ac_word... " >&6; }
3965if ${ac_cv_path_CAT+:} false; then :
3966  $as_echo_n "(cached) " >&6
3967else
3968  case $CAT in
3969  [\\/]* | ?:[\\/]*)
3970  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
3971  ;;
3972  *)
3973  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3974for as_dir in $PATH
3975do
3976  IFS=$as_save_IFS
3977  test -z "$as_dir" && as_dir=.
3978    for ac_exec_ext in '' $ac_executable_extensions; do
3979  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3980    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
3981    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3982    break 2
3983  fi
3984done
3985  done
3986IFS=$as_save_IFS
3987
3988  ;;
3989esac
3990fi
3991CAT=$ac_cv_path_CAT
3992if test -n "$CAT"; then
3993  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
3994$as_echo "$CAT" >&6; }
3995else
3996  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3997$as_echo "no" >&6; }
3998fi
3999
4000
4001  test -n "$CAT" && break
4002done
4003
4004
4005    if test "x$CAT" = x; then
4006        if test "xcat" = x; then
4007          PROG_NAME=cat
4008        else
4009          PROG_NAME=cat
4010        fi
4011        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4012$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4013        as_fn_error $? "Cannot continue" "$LINENO" 5
4014    fi
4015
4016
4017
4018    for ac_prog in chmod
4019do
4020  # Extract the first word of "$ac_prog", so it can be a program name with args.
4021set dummy $ac_prog; ac_word=$2
4022{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4023$as_echo_n "checking for $ac_word... " >&6; }
4024if ${ac_cv_path_CHMOD+:} false; then :
4025  $as_echo_n "(cached) " >&6
4026else
4027  case $CHMOD in
4028  [\\/]* | ?:[\\/]*)
4029  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
4030  ;;
4031  *)
4032  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4033for as_dir in $PATH
4034do
4035  IFS=$as_save_IFS
4036  test -z "$as_dir" && as_dir=.
4037    for ac_exec_ext in '' $ac_executable_extensions; do
4038  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4039    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
4040    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4041    break 2
4042  fi
4043done
4044  done
4045IFS=$as_save_IFS
4046
4047  ;;
4048esac
4049fi
4050CHMOD=$ac_cv_path_CHMOD
4051if test -n "$CHMOD"; then
4052  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
4053$as_echo "$CHMOD" >&6; }
4054else
4055  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4056$as_echo "no" >&6; }
4057fi
4058
4059
4060  test -n "$CHMOD" && break
4061done
4062
4063
4064    if test "x$CHMOD" = x; then
4065        if test "xchmod" = x; then
4066          PROG_NAME=chmod
4067        else
4068          PROG_NAME=chmod
4069        fi
4070        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4071$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4072        as_fn_error $? "Cannot continue" "$LINENO" 5
4073    fi
4074
4075
4076
4077    for ac_prog in cmp
4078do
4079  # Extract the first word of "$ac_prog", so it can be a program name with args.
4080set dummy $ac_prog; ac_word=$2
4081{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4082$as_echo_n "checking for $ac_word... " >&6; }
4083if ${ac_cv_path_CMP+:} false; then :
4084  $as_echo_n "(cached) " >&6
4085else
4086  case $CMP in
4087  [\\/]* | ?:[\\/]*)
4088  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
4089  ;;
4090  *)
4091  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4092for as_dir in $PATH
4093do
4094  IFS=$as_save_IFS
4095  test -z "$as_dir" && as_dir=.
4096    for ac_exec_ext in '' $ac_executable_extensions; do
4097  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4098    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
4099    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4100    break 2
4101  fi
4102done
4103  done
4104IFS=$as_save_IFS
4105
4106  ;;
4107esac
4108fi
4109CMP=$ac_cv_path_CMP
4110if test -n "$CMP"; then
4111  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
4112$as_echo "$CMP" >&6; }
4113else
4114  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4115$as_echo "no" >&6; }
4116fi
4117
4118
4119  test -n "$CMP" && break
4120done
4121
4122
4123    if test "x$CMP" = x; then
4124        if test "xcmp" = x; then
4125          PROG_NAME=cmp
4126        else
4127          PROG_NAME=cmp
4128        fi
4129        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4130$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4131        as_fn_error $? "Cannot continue" "$LINENO" 5
4132    fi
4133
4134
4135
4136    for ac_prog in comm
4137do
4138  # Extract the first word of "$ac_prog", so it can be a program name with args.
4139set dummy $ac_prog; ac_word=$2
4140{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4141$as_echo_n "checking for $ac_word... " >&6; }
4142if ${ac_cv_path_COMM+:} false; then :
4143  $as_echo_n "(cached) " >&6
4144else
4145  case $COMM in
4146  [\\/]* | ?:[\\/]*)
4147  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
4148  ;;
4149  *)
4150  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4151for as_dir in $PATH
4152do
4153  IFS=$as_save_IFS
4154  test -z "$as_dir" && as_dir=.
4155    for ac_exec_ext in '' $ac_executable_extensions; do
4156  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4157    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
4158    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4159    break 2
4160  fi
4161done
4162  done
4163IFS=$as_save_IFS
4164
4165  ;;
4166esac
4167fi
4168COMM=$ac_cv_path_COMM
4169if test -n "$COMM"; then
4170  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
4171$as_echo "$COMM" >&6; }
4172else
4173  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4174$as_echo "no" >&6; }
4175fi
4176
4177
4178  test -n "$COMM" && break
4179done
4180
4181
4182    if test "x$COMM" = x; then
4183        if test "xcomm" = x; then
4184          PROG_NAME=comm
4185        else
4186          PROG_NAME=comm
4187        fi
4188        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4189$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4190        as_fn_error $? "Cannot continue" "$LINENO" 5
4191    fi
4192
4193
4194
4195    for ac_prog in cp
4196do
4197  # Extract the first word of "$ac_prog", so it can be a program name with args.
4198set dummy $ac_prog; ac_word=$2
4199{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4200$as_echo_n "checking for $ac_word... " >&6; }
4201if ${ac_cv_path_CP+:} false; then :
4202  $as_echo_n "(cached) " >&6
4203else
4204  case $CP in
4205  [\\/]* | ?:[\\/]*)
4206  ac_cv_path_CP="$CP" # Let the user override the test with a path.
4207  ;;
4208  *)
4209  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4210for as_dir in $PATH
4211do
4212  IFS=$as_save_IFS
4213  test -z "$as_dir" && as_dir=.
4214    for ac_exec_ext in '' $ac_executable_extensions; do
4215  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4216    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
4217    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4218    break 2
4219  fi
4220done
4221  done
4222IFS=$as_save_IFS
4223
4224  ;;
4225esac
4226fi
4227CP=$ac_cv_path_CP
4228if test -n "$CP"; then
4229  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
4230$as_echo "$CP" >&6; }
4231else
4232  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4233$as_echo "no" >&6; }
4234fi
4235
4236
4237  test -n "$CP" && break
4238done
4239
4240
4241    if test "x$CP" = x; then
4242        if test "xcp" = x; then
4243          PROG_NAME=cp
4244        else
4245          PROG_NAME=cp
4246        fi
4247        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4248$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4249        as_fn_error $? "Cannot continue" "$LINENO" 5
4250    fi
4251
4252
4253
4254    for ac_prog in cpio
4255do
4256  # Extract the first word of "$ac_prog", so it can be a program name with args.
4257set dummy $ac_prog; ac_word=$2
4258{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4259$as_echo_n "checking for $ac_word... " >&6; }
4260if ${ac_cv_path_CPIO+:} false; then :
4261  $as_echo_n "(cached) " >&6
4262else
4263  case $CPIO in
4264  [\\/]* | ?:[\\/]*)
4265  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
4266  ;;
4267  *)
4268  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4269for as_dir in $PATH
4270do
4271  IFS=$as_save_IFS
4272  test -z "$as_dir" && as_dir=.
4273    for ac_exec_ext in '' $ac_executable_extensions; do
4274  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4275    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
4276    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4277    break 2
4278  fi
4279done
4280  done
4281IFS=$as_save_IFS
4282
4283  ;;
4284esac
4285fi
4286CPIO=$ac_cv_path_CPIO
4287if test -n "$CPIO"; then
4288  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
4289$as_echo "$CPIO" >&6; }
4290else
4291  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4292$as_echo "no" >&6; }
4293fi
4294
4295
4296  test -n "$CPIO" && break
4297done
4298
4299
4300    if test "x$CPIO" = x; then
4301        if test "xcpio" = x; then
4302          PROG_NAME=cpio
4303        else
4304          PROG_NAME=cpio
4305        fi
4306        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4307$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4308        as_fn_error $? "Cannot continue" "$LINENO" 5
4309    fi
4310
4311
4312
4313    for ac_prog in cut
4314do
4315  # Extract the first word of "$ac_prog", so it can be a program name with args.
4316set dummy $ac_prog; ac_word=$2
4317{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4318$as_echo_n "checking for $ac_word... " >&6; }
4319if ${ac_cv_path_CUT+:} false; then :
4320  $as_echo_n "(cached) " >&6
4321else
4322  case $CUT in
4323  [\\/]* | ?:[\\/]*)
4324  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
4325  ;;
4326  *)
4327  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4328for as_dir in $PATH
4329do
4330  IFS=$as_save_IFS
4331  test -z "$as_dir" && as_dir=.
4332    for ac_exec_ext in '' $ac_executable_extensions; do
4333  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4334    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
4335    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4336    break 2
4337  fi
4338done
4339  done
4340IFS=$as_save_IFS
4341
4342  ;;
4343esac
4344fi
4345CUT=$ac_cv_path_CUT
4346if test -n "$CUT"; then
4347  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
4348$as_echo "$CUT" >&6; }
4349else
4350  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4351$as_echo "no" >&6; }
4352fi
4353
4354
4355  test -n "$CUT" && break
4356done
4357
4358
4359    if test "x$CUT" = x; then
4360        if test "xcut" = x; then
4361          PROG_NAME=cut
4362        else
4363          PROG_NAME=cut
4364        fi
4365        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4366$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4367        as_fn_error $? "Cannot continue" "$LINENO" 5
4368    fi
4369
4370
4371
4372    for ac_prog in date
4373do
4374  # Extract the first word of "$ac_prog", so it can be a program name with args.
4375set dummy $ac_prog; ac_word=$2
4376{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4377$as_echo_n "checking for $ac_word... " >&6; }
4378if ${ac_cv_path_DATE+:} false; then :
4379  $as_echo_n "(cached) " >&6
4380else
4381  case $DATE in
4382  [\\/]* | ?:[\\/]*)
4383  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
4384  ;;
4385  *)
4386  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4387for as_dir in $PATH
4388do
4389  IFS=$as_save_IFS
4390  test -z "$as_dir" && as_dir=.
4391    for ac_exec_ext in '' $ac_executable_extensions; do
4392  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4393    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
4394    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4395    break 2
4396  fi
4397done
4398  done
4399IFS=$as_save_IFS
4400
4401  ;;
4402esac
4403fi
4404DATE=$ac_cv_path_DATE
4405if test -n "$DATE"; then
4406  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
4407$as_echo "$DATE" >&6; }
4408else
4409  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4410$as_echo "no" >&6; }
4411fi
4412
4413
4414  test -n "$DATE" && break
4415done
4416
4417
4418    if test "x$DATE" = x; then
4419        if test "xdate" = x; then
4420          PROG_NAME=date
4421        else
4422          PROG_NAME=date
4423        fi
4424        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4425$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4426        as_fn_error $? "Cannot continue" "$LINENO" 5
4427    fi
4428
4429
4430
4431    for ac_prog in gdiff diff
4432do
4433  # Extract the first word of "$ac_prog", so it can be a program name with args.
4434set dummy $ac_prog; ac_word=$2
4435{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4436$as_echo_n "checking for $ac_word... " >&6; }
4437if ${ac_cv_path_DIFF+:} false; then :
4438  $as_echo_n "(cached) " >&6
4439else
4440  case $DIFF in
4441  [\\/]* | ?:[\\/]*)
4442  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
4443  ;;
4444  *)
4445  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4446for as_dir in $PATH
4447do
4448  IFS=$as_save_IFS
4449  test -z "$as_dir" && as_dir=.
4450    for ac_exec_ext in '' $ac_executable_extensions; do
4451  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4452    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
4453    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4454    break 2
4455  fi
4456done
4457  done
4458IFS=$as_save_IFS
4459
4460  ;;
4461esac
4462fi
4463DIFF=$ac_cv_path_DIFF
4464if test -n "$DIFF"; then
4465  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
4466$as_echo "$DIFF" >&6; }
4467else
4468  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4469$as_echo "no" >&6; }
4470fi
4471
4472
4473  test -n "$DIFF" && break
4474done
4475
4476
4477    if test "x$DIFF" = x; then
4478        if test "xgdiff diff" = x; then
4479          PROG_NAME=diff
4480        else
4481          PROG_NAME=gdiff diff
4482        fi
4483        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4484$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4485        as_fn_error $? "Cannot continue" "$LINENO" 5
4486    fi
4487
4488
4489
4490    for ac_prog in dirname
4491do
4492  # Extract the first word of "$ac_prog", so it can be a program name with args.
4493set dummy $ac_prog; ac_word=$2
4494{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4495$as_echo_n "checking for $ac_word... " >&6; }
4496if ${ac_cv_path_DIRNAME+:} false; then :
4497  $as_echo_n "(cached) " >&6
4498else
4499  case $DIRNAME in
4500  [\\/]* | ?:[\\/]*)
4501  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
4502  ;;
4503  *)
4504  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4505for as_dir in $PATH
4506do
4507  IFS=$as_save_IFS
4508  test -z "$as_dir" && as_dir=.
4509    for ac_exec_ext in '' $ac_executable_extensions; do
4510  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4511    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
4512    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4513    break 2
4514  fi
4515done
4516  done
4517IFS=$as_save_IFS
4518
4519  ;;
4520esac
4521fi
4522DIRNAME=$ac_cv_path_DIRNAME
4523if test -n "$DIRNAME"; then
4524  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
4525$as_echo "$DIRNAME" >&6; }
4526else
4527  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4528$as_echo "no" >&6; }
4529fi
4530
4531
4532  test -n "$DIRNAME" && break
4533done
4534
4535
4536    if test "x$DIRNAME" = x; then
4537        if test "xdirname" = x; then
4538          PROG_NAME=dirname
4539        else
4540          PROG_NAME=dirname
4541        fi
4542        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4543$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4544        as_fn_error $? "Cannot continue" "$LINENO" 5
4545    fi
4546
4547
4548
4549    for ac_prog in echo
4550do
4551  # Extract the first word of "$ac_prog", so it can be a program name with args.
4552set dummy $ac_prog; ac_word=$2
4553{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4554$as_echo_n "checking for $ac_word... " >&6; }
4555if ${ac_cv_path_ECHO+:} false; then :
4556  $as_echo_n "(cached) " >&6
4557else
4558  case $ECHO in
4559  [\\/]* | ?:[\\/]*)
4560  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
4561  ;;
4562  *)
4563  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4564for as_dir in $PATH
4565do
4566  IFS=$as_save_IFS
4567  test -z "$as_dir" && as_dir=.
4568    for ac_exec_ext in '' $ac_executable_extensions; do
4569  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4570    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
4571    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4572    break 2
4573  fi
4574done
4575  done
4576IFS=$as_save_IFS
4577
4578  ;;
4579esac
4580fi
4581ECHO=$ac_cv_path_ECHO
4582if test -n "$ECHO"; then
4583  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
4584$as_echo "$ECHO" >&6; }
4585else
4586  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4587$as_echo "no" >&6; }
4588fi
4589
4590
4591  test -n "$ECHO" && break
4592done
4593
4594
4595    if test "x$ECHO" = x; then
4596        if test "xecho" = x; then
4597          PROG_NAME=echo
4598        else
4599          PROG_NAME=echo
4600        fi
4601        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4602$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4603        as_fn_error $? "Cannot continue" "$LINENO" 5
4604    fi
4605
4606
4607
4608    for ac_prog in expr
4609do
4610  # Extract the first word of "$ac_prog", so it can be a program name with args.
4611set dummy $ac_prog; ac_word=$2
4612{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4613$as_echo_n "checking for $ac_word... " >&6; }
4614if ${ac_cv_path_EXPR+:} false; then :
4615  $as_echo_n "(cached) " >&6
4616else
4617  case $EXPR in
4618  [\\/]* | ?:[\\/]*)
4619  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
4620  ;;
4621  *)
4622  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4623for as_dir in $PATH
4624do
4625  IFS=$as_save_IFS
4626  test -z "$as_dir" && as_dir=.
4627    for ac_exec_ext in '' $ac_executable_extensions; do
4628  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4629    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
4630    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4631    break 2
4632  fi
4633done
4634  done
4635IFS=$as_save_IFS
4636
4637  ;;
4638esac
4639fi
4640EXPR=$ac_cv_path_EXPR
4641if test -n "$EXPR"; then
4642  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
4643$as_echo "$EXPR" >&6; }
4644else
4645  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4646$as_echo "no" >&6; }
4647fi
4648
4649
4650  test -n "$EXPR" && break
4651done
4652
4653
4654    if test "x$EXPR" = x; then
4655        if test "xexpr" = x; then
4656          PROG_NAME=expr
4657        else
4658          PROG_NAME=expr
4659        fi
4660        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4661$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4662        as_fn_error $? "Cannot continue" "$LINENO" 5
4663    fi
4664
4665
4666
4667    for ac_prog in file
4668do
4669  # Extract the first word of "$ac_prog", so it can be a program name with args.
4670set dummy $ac_prog; ac_word=$2
4671{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4672$as_echo_n "checking for $ac_word... " >&6; }
4673if ${ac_cv_path_FILE+:} false; then :
4674  $as_echo_n "(cached) " >&6
4675else
4676  case $FILE in
4677  [\\/]* | ?:[\\/]*)
4678  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
4679  ;;
4680  *)
4681  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4682for as_dir in $PATH
4683do
4684  IFS=$as_save_IFS
4685  test -z "$as_dir" && as_dir=.
4686    for ac_exec_ext in '' $ac_executable_extensions; do
4687  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4688    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
4689    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4690    break 2
4691  fi
4692done
4693  done
4694IFS=$as_save_IFS
4695
4696  ;;
4697esac
4698fi
4699FILE=$ac_cv_path_FILE
4700if test -n "$FILE"; then
4701  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
4702$as_echo "$FILE" >&6; }
4703else
4704  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4705$as_echo "no" >&6; }
4706fi
4707
4708
4709  test -n "$FILE" && break
4710done
4711
4712
4713    if test "x$FILE" = x; then
4714        if test "xfile" = x; then
4715          PROG_NAME=file
4716        else
4717          PROG_NAME=file
4718        fi
4719        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4720$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4721        as_fn_error $? "Cannot continue" "$LINENO" 5
4722    fi
4723
4724
4725
4726    for ac_prog in find
4727do
4728  # Extract the first word of "$ac_prog", so it can be a program name with args.
4729set dummy $ac_prog; ac_word=$2
4730{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4731$as_echo_n "checking for $ac_word... " >&6; }
4732if ${ac_cv_path_FIND+:} false; then :
4733  $as_echo_n "(cached) " >&6
4734else
4735  case $FIND in
4736  [\\/]* | ?:[\\/]*)
4737  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
4738  ;;
4739  *)
4740  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4741for as_dir in $PATH
4742do
4743  IFS=$as_save_IFS
4744  test -z "$as_dir" && as_dir=.
4745    for ac_exec_ext in '' $ac_executable_extensions; do
4746  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4747    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
4748    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4749    break 2
4750  fi
4751done
4752  done
4753IFS=$as_save_IFS
4754
4755  ;;
4756esac
4757fi
4758FIND=$ac_cv_path_FIND
4759if test -n "$FIND"; then
4760  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
4761$as_echo "$FIND" >&6; }
4762else
4763  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4764$as_echo "no" >&6; }
4765fi
4766
4767
4768  test -n "$FIND" && break
4769done
4770
4771
4772    if test "x$FIND" = x; then
4773        if test "xfind" = x; then
4774          PROG_NAME=find
4775        else
4776          PROG_NAME=find
4777        fi
4778        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4779$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4780        as_fn_error $? "Cannot continue" "$LINENO" 5
4781    fi
4782
4783
4784
4785    for ac_prog in head
4786do
4787  # Extract the first word of "$ac_prog", so it can be a program name with args.
4788set dummy $ac_prog; ac_word=$2
4789{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4790$as_echo_n "checking for $ac_word... " >&6; }
4791if ${ac_cv_path_HEAD+:} false; then :
4792  $as_echo_n "(cached) " >&6
4793else
4794  case $HEAD in
4795  [\\/]* | ?:[\\/]*)
4796  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
4797  ;;
4798  *)
4799  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4800for as_dir in $PATH
4801do
4802  IFS=$as_save_IFS
4803  test -z "$as_dir" && as_dir=.
4804    for ac_exec_ext in '' $ac_executable_extensions; do
4805  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4806    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
4807    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4808    break 2
4809  fi
4810done
4811  done
4812IFS=$as_save_IFS
4813
4814  ;;
4815esac
4816fi
4817HEAD=$ac_cv_path_HEAD
4818if test -n "$HEAD"; then
4819  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
4820$as_echo "$HEAD" >&6; }
4821else
4822  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4823$as_echo "no" >&6; }
4824fi
4825
4826
4827  test -n "$HEAD" && break
4828done
4829
4830
4831    if test "x$HEAD" = x; then
4832        if test "xhead" = x; then
4833          PROG_NAME=head
4834        else
4835          PROG_NAME=head
4836        fi
4837        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4838$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4839        as_fn_error $? "Cannot continue" "$LINENO" 5
4840    fi
4841
4842
4843
4844    for ac_prog in ln
4845do
4846  # Extract the first word of "$ac_prog", so it can be a program name with args.
4847set dummy $ac_prog; ac_word=$2
4848{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4849$as_echo_n "checking for $ac_word... " >&6; }
4850if ${ac_cv_path_LN+:} false; then :
4851  $as_echo_n "(cached) " >&6
4852else
4853  case $LN in
4854  [\\/]* | ?:[\\/]*)
4855  ac_cv_path_LN="$LN" # Let the user override the test with a path.
4856  ;;
4857  *)
4858  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4859for as_dir in $PATH
4860do
4861  IFS=$as_save_IFS
4862  test -z "$as_dir" && as_dir=.
4863    for ac_exec_ext in '' $ac_executable_extensions; do
4864  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4865    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
4866    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4867    break 2
4868  fi
4869done
4870  done
4871IFS=$as_save_IFS
4872
4873  ;;
4874esac
4875fi
4876LN=$ac_cv_path_LN
4877if test -n "$LN"; then
4878  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
4879$as_echo "$LN" >&6; }
4880else
4881  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4882$as_echo "no" >&6; }
4883fi
4884
4885
4886  test -n "$LN" && break
4887done
4888
4889
4890    if test "x$LN" = x; then
4891        if test "xln" = x; then
4892          PROG_NAME=ln
4893        else
4894          PROG_NAME=ln
4895        fi
4896        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4897$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4898        as_fn_error $? "Cannot continue" "$LINENO" 5
4899    fi
4900
4901
4902
4903    for ac_prog in ls
4904do
4905  # Extract the first word of "$ac_prog", so it can be a program name with args.
4906set dummy $ac_prog; ac_word=$2
4907{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4908$as_echo_n "checking for $ac_word... " >&6; }
4909if ${ac_cv_path_LS+:} false; then :
4910  $as_echo_n "(cached) " >&6
4911else
4912  case $LS in
4913  [\\/]* | ?:[\\/]*)
4914  ac_cv_path_LS="$LS" # Let the user override the test with a path.
4915  ;;
4916  *)
4917  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4918for as_dir in $PATH
4919do
4920  IFS=$as_save_IFS
4921  test -z "$as_dir" && as_dir=.
4922    for ac_exec_ext in '' $ac_executable_extensions; do
4923  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4924    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
4925    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4926    break 2
4927  fi
4928done
4929  done
4930IFS=$as_save_IFS
4931
4932  ;;
4933esac
4934fi
4935LS=$ac_cv_path_LS
4936if test -n "$LS"; then
4937  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
4938$as_echo "$LS" >&6; }
4939else
4940  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4941$as_echo "no" >&6; }
4942fi
4943
4944
4945  test -n "$LS" && break
4946done
4947
4948
4949    if test "x$LS" = x; then
4950        if test "xls" = x; then
4951          PROG_NAME=ls
4952        else
4953          PROG_NAME=ls
4954        fi
4955        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4956$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4957        as_fn_error $? "Cannot continue" "$LINENO" 5
4958    fi
4959
4960
4961
4962    for ac_prog in mkdir
4963do
4964  # Extract the first word of "$ac_prog", so it can be a program name with args.
4965set dummy $ac_prog; ac_word=$2
4966{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4967$as_echo_n "checking for $ac_word... " >&6; }
4968if ${ac_cv_path_MKDIR+:} false; then :
4969  $as_echo_n "(cached) " >&6
4970else
4971  case $MKDIR in
4972  [\\/]* | ?:[\\/]*)
4973  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
4974  ;;
4975  *)
4976  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4977for as_dir in $PATH
4978do
4979  IFS=$as_save_IFS
4980  test -z "$as_dir" && as_dir=.
4981    for ac_exec_ext in '' $ac_executable_extensions; do
4982  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4983    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
4984    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4985    break 2
4986  fi
4987done
4988  done
4989IFS=$as_save_IFS
4990
4991  ;;
4992esac
4993fi
4994MKDIR=$ac_cv_path_MKDIR
4995if test -n "$MKDIR"; then
4996  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
4997$as_echo "$MKDIR" >&6; }
4998else
4999  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5000$as_echo "no" >&6; }
5001fi
5002
5003
5004  test -n "$MKDIR" && break
5005done
5006
5007
5008    if test "x$MKDIR" = x; then
5009        if test "xmkdir" = x; then
5010          PROG_NAME=mkdir
5011        else
5012          PROG_NAME=mkdir
5013        fi
5014        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5015$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5016        as_fn_error $? "Cannot continue" "$LINENO" 5
5017    fi
5018
5019
5020
5021    for ac_prog in mktemp
5022do
5023  # Extract the first word of "$ac_prog", so it can be a program name with args.
5024set dummy $ac_prog; ac_word=$2
5025{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5026$as_echo_n "checking for $ac_word... " >&6; }
5027if ${ac_cv_path_MKTEMP+:} false; then :
5028  $as_echo_n "(cached) " >&6
5029else
5030  case $MKTEMP in
5031  [\\/]* | ?:[\\/]*)
5032  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
5033  ;;
5034  *)
5035  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5036for as_dir in $PATH
5037do
5038  IFS=$as_save_IFS
5039  test -z "$as_dir" && as_dir=.
5040    for ac_exec_ext in '' $ac_executable_extensions; do
5041  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5042    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
5043    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5044    break 2
5045  fi
5046done
5047  done
5048IFS=$as_save_IFS
5049
5050  ;;
5051esac
5052fi
5053MKTEMP=$ac_cv_path_MKTEMP
5054if test -n "$MKTEMP"; then
5055  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
5056$as_echo "$MKTEMP" >&6; }
5057else
5058  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5059$as_echo "no" >&6; }
5060fi
5061
5062
5063  test -n "$MKTEMP" && break
5064done
5065
5066
5067    if test "x$MKTEMP" = x; then
5068        if test "xmktemp" = x; then
5069          PROG_NAME=mktemp
5070        else
5071          PROG_NAME=mktemp
5072        fi
5073        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5074$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5075        as_fn_error $? "Cannot continue" "$LINENO" 5
5076    fi
5077
5078
5079
5080    for ac_prog in mv
5081do
5082  # Extract the first word of "$ac_prog", so it can be a program name with args.
5083set dummy $ac_prog; ac_word=$2
5084{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5085$as_echo_n "checking for $ac_word... " >&6; }
5086if ${ac_cv_path_MV+:} false; then :
5087  $as_echo_n "(cached) " >&6
5088else
5089  case $MV in
5090  [\\/]* | ?:[\\/]*)
5091  ac_cv_path_MV="$MV" # Let the user override the test with a path.
5092  ;;
5093  *)
5094  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5095for as_dir in $PATH
5096do
5097  IFS=$as_save_IFS
5098  test -z "$as_dir" && as_dir=.
5099    for ac_exec_ext in '' $ac_executable_extensions; do
5100  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5101    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
5102    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5103    break 2
5104  fi
5105done
5106  done
5107IFS=$as_save_IFS
5108
5109  ;;
5110esac
5111fi
5112MV=$ac_cv_path_MV
5113if test -n "$MV"; then
5114  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
5115$as_echo "$MV" >&6; }
5116else
5117  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5118$as_echo "no" >&6; }
5119fi
5120
5121
5122  test -n "$MV" && break
5123done
5124
5125
5126    if test "x$MV" = x; then
5127        if test "xmv" = x; then
5128          PROG_NAME=mv
5129        else
5130          PROG_NAME=mv
5131        fi
5132        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5133$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5134        as_fn_error $? "Cannot continue" "$LINENO" 5
5135    fi
5136
5137
5138
5139    for ac_prog in printf
5140do
5141  # Extract the first word of "$ac_prog", so it can be a program name with args.
5142set dummy $ac_prog; ac_word=$2
5143{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5144$as_echo_n "checking for $ac_word... " >&6; }
5145if ${ac_cv_path_PRINTF+:} false; then :
5146  $as_echo_n "(cached) " >&6
5147else
5148  case $PRINTF in
5149  [\\/]* | ?:[\\/]*)
5150  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
5151  ;;
5152  *)
5153  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5154for as_dir in $PATH
5155do
5156  IFS=$as_save_IFS
5157  test -z "$as_dir" && as_dir=.
5158    for ac_exec_ext in '' $ac_executable_extensions; do
5159  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5160    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
5161    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5162    break 2
5163  fi
5164done
5165  done
5166IFS=$as_save_IFS
5167
5168  ;;
5169esac
5170fi
5171PRINTF=$ac_cv_path_PRINTF
5172if test -n "$PRINTF"; then
5173  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
5174$as_echo "$PRINTF" >&6; }
5175else
5176  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5177$as_echo "no" >&6; }
5178fi
5179
5180
5181  test -n "$PRINTF" && break
5182done
5183
5184
5185    if test "x$PRINTF" = x; then
5186        if test "xprintf" = x; then
5187          PROG_NAME=printf
5188        else
5189          PROG_NAME=printf
5190        fi
5191        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5192$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5193        as_fn_error $? "Cannot continue" "$LINENO" 5
5194    fi
5195
5196
5197
5198    for ac_prog in rm
5199do
5200  # Extract the first word of "$ac_prog", so it can be a program name with args.
5201set dummy $ac_prog; ac_word=$2
5202{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5203$as_echo_n "checking for $ac_word... " >&6; }
5204if ${ac_cv_path_RM+:} false; then :
5205  $as_echo_n "(cached) " >&6
5206else
5207  case $RM in
5208  [\\/]* | ?:[\\/]*)
5209  ac_cv_path_RM="$RM" # Let the user override the test with a path.
5210  ;;
5211  *)
5212  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5213for as_dir in $PATH
5214do
5215  IFS=$as_save_IFS
5216  test -z "$as_dir" && as_dir=.
5217    for ac_exec_ext in '' $ac_executable_extensions; do
5218  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5219    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
5220    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5221    break 2
5222  fi
5223done
5224  done
5225IFS=$as_save_IFS
5226
5227  ;;
5228esac
5229fi
5230RM=$ac_cv_path_RM
5231if test -n "$RM"; then
5232  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
5233$as_echo "$RM" >&6; }
5234else
5235  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5236$as_echo "no" >&6; }
5237fi
5238
5239
5240  test -n "$RM" && break
5241done
5242
5243
5244    if test "x$RM" = x; then
5245        if test "xrm" = x; then
5246          PROG_NAME=rm
5247        else
5248          PROG_NAME=rm
5249        fi
5250        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5251$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5252        as_fn_error $? "Cannot continue" "$LINENO" 5
5253    fi
5254
5255
5256
5257    for ac_prog in sh
5258do
5259  # Extract the first word of "$ac_prog", so it can be a program name with args.
5260set dummy $ac_prog; ac_word=$2
5261{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5262$as_echo_n "checking for $ac_word... " >&6; }
5263if ${ac_cv_path_SH+:} false; then :
5264  $as_echo_n "(cached) " >&6
5265else
5266  case $SH in
5267  [\\/]* | ?:[\\/]*)
5268  ac_cv_path_SH="$SH" # Let the user override the test with a path.
5269  ;;
5270  *)
5271  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5272for as_dir in $PATH
5273do
5274  IFS=$as_save_IFS
5275  test -z "$as_dir" && as_dir=.
5276    for ac_exec_ext in '' $ac_executable_extensions; do
5277  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5278    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
5279    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5280    break 2
5281  fi
5282done
5283  done
5284IFS=$as_save_IFS
5285
5286  ;;
5287esac
5288fi
5289SH=$ac_cv_path_SH
5290if test -n "$SH"; then
5291  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
5292$as_echo "$SH" >&6; }
5293else
5294  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5295$as_echo "no" >&6; }
5296fi
5297
5298
5299  test -n "$SH" && break
5300done
5301
5302
5303    if test "x$SH" = x; then
5304        if test "xsh" = x; then
5305          PROG_NAME=sh
5306        else
5307          PROG_NAME=sh
5308        fi
5309        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5310$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5311        as_fn_error $? "Cannot continue" "$LINENO" 5
5312    fi
5313
5314
5315
5316    for ac_prog in sort
5317do
5318  # Extract the first word of "$ac_prog", so it can be a program name with args.
5319set dummy $ac_prog; ac_word=$2
5320{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5321$as_echo_n "checking for $ac_word... " >&6; }
5322if ${ac_cv_path_SORT+:} false; then :
5323  $as_echo_n "(cached) " >&6
5324else
5325  case $SORT in
5326  [\\/]* | ?:[\\/]*)
5327  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
5328  ;;
5329  *)
5330  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5331for as_dir in $PATH
5332do
5333  IFS=$as_save_IFS
5334  test -z "$as_dir" && as_dir=.
5335    for ac_exec_ext in '' $ac_executable_extensions; do
5336  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5337    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
5338    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5339    break 2
5340  fi
5341done
5342  done
5343IFS=$as_save_IFS
5344
5345  ;;
5346esac
5347fi
5348SORT=$ac_cv_path_SORT
5349if test -n "$SORT"; then
5350  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
5351$as_echo "$SORT" >&6; }
5352else
5353  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5354$as_echo "no" >&6; }
5355fi
5356
5357
5358  test -n "$SORT" && break
5359done
5360
5361
5362    if test "x$SORT" = x; then
5363        if test "xsort" = x; then
5364          PROG_NAME=sort
5365        else
5366          PROG_NAME=sort
5367        fi
5368        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5369$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5370        as_fn_error $? "Cannot continue" "$LINENO" 5
5371    fi
5372
5373
5374
5375    for ac_prog in tail
5376do
5377  # Extract the first word of "$ac_prog", so it can be a program name with args.
5378set dummy $ac_prog; ac_word=$2
5379{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5380$as_echo_n "checking for $ac_word... " >&6; }
5381if ${ac_cv_path_TAIL+:} false; then :
5382  $as_echo_n "(cached) " >&6
5383else
5384  case $TAIL in
5385  [\\/]* | ?:[\\/]*)
5386  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
5387  ;;
5388  *)
5389  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5390for as_dir in $PATH
5391do
5392  IFS=$as_save_IFS
5393  test -z "$as_dir" && as_dir=.
5394    for ac_exec_ext in '' $ac_executable_extensions; do
5395  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5396    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
5397    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5398    break 2
5399  fi
5400done
5401  done
5402IFS=$as_save_IFS
5403
5404  ;;
5405esac
5406fi
5407TAIL=$ac_cv_path_TAIL
5408if test -n "$TAIL"; then
5409  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
5410$as_echo "$TAIL" >&6; }
5411else
5412  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5413$as_echo "no" >&6; }
5414fi
5415
5416
5417  test -n "$TAIL" && break
5418done
5419
5420
5421    if test "x$TAIL" = x; then
5422        if test "xtail" = x; then
5423          PROG_NAME=tail
5424        else
5425          PROG_NAME=tail
5426        fi
5427        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5428$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5429        as_fn_error $? "Cannot continue" "$LINENO" 5
5430    fi
5431
5432
5433
5434    for ac_prog in tar
5435do
5436  # Extract the first word of "$ac_prog", so it can be a program name with args.
5437set dummy $ac_prog; ac_word=$2
5438{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5439$as_echo_n "checking for $ac_word... " >&6; }
5440if ${ac_cv_path_TAR+:} false; then :
5441  $as_echo_n "(cached) " >&6
5442else
5443  case $TAR in
5444  [\\/]* | ?:[\\/]*)
5445  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
5446  ;;
5447  *)
5448  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5449for as_dir in $PATH
5450do
5451  IFS=$as_save_IFS
5452  test -z "$as_dir" && as_dir=.
5453    for ac_exec_ext in '' $ac_executable_extensions; do
5454  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5455    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
5456    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5457    break 2
5458  fi
5459done
5460  done
5461IFS=$as_save_IFS
5462
5463  ;;
5464esac
5465fi
5466TAR=$ac_cv_path_TAR
5467if test -n "$TAR"; then
5468  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
5469$as_echo "$TAR" >&6; }
5470else
5471  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5472$as_echo "no" >&6; }
5473fi
5474
5475
5476  test -n "$TAR" && break
5477done
5478
5479
5480    if test "x$TAR" = x; then
5481        if test "xtar" = x; then
5482          PROG_NAME=tar
5483        else
5484          PROG_NAME=tar
5485        fi
5486        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5487$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5488        as_fn_error $? "Cannot continue" "$LINENO" 5
5489    fi
5490
5491
5492
5493    for ac_prog in tee
5494do
5495  # Extract the first word of "$ac_prog", so it can be a program name with args.
5496set dummy $ac_prog; ac_word=$2
5497{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5498$as_echo_n "checking for $ac_word... " >&6; }
5499if ${ac_cv_path_TEE+:} false; then :
5500  $as_echo_n "(cached) " >&6
5501else
5502  case $TEE in
5503  [\\/]* | ?:[\\/]*)
5504  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
5505  ;;
5506  *)
5507  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5508for as_dir in $PATH
5509do
5510  IFS=$as_save_IFS
5511  test -z "$as_dir" && as_dir=.
5512    for ac_exec_ext in '' $ac_executable_extensions; do
5513  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5514    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
5515    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5516    break 2
5517  fi
5518done
5519  done
5520IFS=$as_save_IFS
5521
5522  ;;
5523esac
5524fi
5525TEE=$ac_cv_path_TEE
5526if test -n "$TEE"; then
5527  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
5528$as_echo "$TEE" >&6; }
5529else
5530  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5531$as_echo "no" >&6; }
5532fi
5533
5534
5535  test -n "$TEE" && break
5536done
5537
5538
5539    if test "x$TEE" = x; then
5540        if test "xtee" = x; then
5541          PROG_NAME=tee
5542        else
5543          PROG_NAME=tee
5544        fi
5545        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5546$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5547        as_fn_error $? "Cannot continue" "$LINENO" 5
5548    fi
5549
5550
5551
5552    for ac_prog in touch
5553do
5554  # Extract the first word of "$ac_prog", so it can be a program name with args.
5555set dummy $ac_prog; ac_word=$2
5556{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5557$as_echo_n "checking for $ac_word... " >&6; }
5558if ${ac_cv_path_TOUCH+:} false; then :
5559  $as_echo_n "(cached) " >&6
5560else
5561  case $TOUCH in
5562  [\\/]* | ?:[\\/]*)
5563  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
5564  ;;
5565  *)
5566  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5567for as_dir in $PATH
5568do
5569  IFS=$as_save_IFS
5570  test -z "$as_dir" && as_dir=.
5571    for ac_exec_ext in '' $ac_executable_extensions; do
5572  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5573    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
5574    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5575    break 2
5576  fi
5577done
5578  done
5579IFS=$as_save_IFS
5580
5581  ;;
5582esac
5583fi
5584TOUCH=$ac_cv_path_TOUCH
5585if test -n "$TOUCH"; then
5586  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
5587$as_echo "$TOUCH" >&6; }
5588else
5589  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5590$as_echo "no" >&6; }
5591fi
5592
5593
5594  test -n "$TOUCH" && break
5595done
5596
5597
5598    if test "x$TOUCH" = x; then
5599        if test "xtouch" = x; then
5600          PROG_NAME=touch
5601        else
5602          PROG_NAME=touch
5603        fi
5604        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5605$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5606        as_fn_error $? "Cannot continue" "$LINENO" 5
5607    fi
5608
5609
5610
5611    for ac_prog in tr
5612do
5613  # Extract the first word of "$ac_prog", so it can be a program name with args.
5614set dummy $ac_prog; ac_word=$2
5615{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5616$as_echo_n "checking for $ac_word... " >&6; }
5617if ${ac_cv_path_TR+:} false; then :
5618  $as_echo_n "(cached) " >&6
5619else
5620  case $TR in
5621  [\\/]* | ?:[\\/]*)
5622  ac_cv_path_TR="$TR" # Let the user override the test with a path.
5623  ;;
5624  *)
5625  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5626for as_dir in $PATH
5627do
5628  IFS=$as_save_IFS
5629  test -z "$as_dir" && as_dir=.
5630    for ac_exec_ext in '' $ac_executable_extensions; do
5631  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5632    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
5633    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5634    break 2
5635  fi
5636done
5637  done
5638IFS=$as_save_IFS
5639
5640  ;;
5641esac
5642fi
5643TR=$ac_cv_path_TR
5644if test -n "$TR"; then
5645  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
5646$as_echo "$TR" >&6; }
5647else
5648  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5649$as_echo "no" >&6; }
5650fi
5651
5652
5653  test -n "$TR" && break
5654done
5655
5656
5657    if test "x$TR" = x; then
5658        if test "xtr" = x; then
5659          PROG_NAME=tr
5660        else
5661          PROG_NAME=tr
5662        fi
5663        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5664$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5665        as_fn_error $? "Cannot continue" "$LINENO" 5
5666    fi
5667
5668
5669
5670    for ac_prog in uname
5671do
5672  # Extract the first word of "$ac_prog", so it can be a program name with args.
5673set dummy $ac_prog; ac_word=$2
5674{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5675$as_echo_n "checking for $ac_word... " >&6; }
5676if ${ac_cv_path_UNAME+:} false; then :
5677  $as_echo_n "(cached) " >&6
5678else
5679  case $UNAME in
5680  [\\/]* | ?:[\\/]*)
5681  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
5682  ;;
5683  *)
5684  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5685for as_dir in $PATH
5686do
5687  IFS=$as_save_IFS
5688  test -z "$as_dir" && as_dir=.
5689    for ac_exec_ext in '' $ac_executable_extensions; do
5690  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5691    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
5692    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5693    break 2
5694  fi
5695done
5696  done
5697IFS=$as_save_IFS
5698
5699  ;;
5700esac
5701fi
5702UNAME=$ac_cv_path_UNAME
5703if test -n "$UNAME"; then
5704  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
5705$as_echo "$UNAME" >&6; }
5706else
5707  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5708$as_echo "no" >&6; }
5709fi
5710
5711
5712  test -n "$UNAME" && break
5713done
5714
5715
5716    if test "x$UNAME" = x; then
5717        if test "xuname" = x; then
5718          PROG_NAME=uname
5719        else
5720          PROG_NAME=uname
5721        fi
5722        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5723$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5724        as_fn_error $? "Cannot continue" "$LINENO" 5
5725    fi
5726
5727
5728
5729    for ac_prog in uniq
5730do
5731  # Extract the first word of "$ac_prog", so it can be a program name with args.
5732set dummy $ac_prog; ac_word=$2
5733{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5734$as_echo_n "checking for $ac_word... " >&6; }
5735if ${ac_cv_path_UNIQ+:} false; then :
5736  $as_echo_n "(cached) " >&6
5737else
5738  case $UNIQ in
5739  [\\/]* | ?:[\\/]*)
5740  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
5741  ;;
5742  *)
5743  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5744for as_dir in $PATH
5745do
5746  IFS=$as_save_IFS
5747  test -z "$as_dir" && as_dir=.
5748    for ac_exec_ext in '' $ac_executable_extensions; do
5749  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5750    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
5751    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5752    break 2
5753  fi
5754done
5755  done
5756IFS=$as_save_IFS
5757
5758  ;;
5759esac
5760fi
5761UNIQ=$ac_cv_path_UNIQ
5762if test -n "$UNIQ"; then
5763  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
5764$as_echo "$UNIQ" >&6; }
5765else
5766  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5767$as_echo "no" >&6; }
5768fi
5769
5770
5771  test -n "$UNIQ" && break
5772done
5773
5774
5775    if test "x$UNIQ" = x; then
5776        if test "xuniq" = x; then
5777          PROG_NAME=uniq
5778        else
5779          PROG_NAME=uniq
5780        fi
5781        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5782$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5783        as_fn_error $? "Cannot continue" "$LINENO" 5
5784    fi
5785
5786
5787
5788    for ac_prog in wc
5789do
5790  # Extract the first word of "$ac_prog", so it can be a program name with args.
5791set dummy $ac_prog; ac_word=$2
5792{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5793$as_echo_n "checking for $ac_word... " >&6; }
5794if ${ac_cv_path_WC+:} false; then :
5795  $as_echo_n "(cached) " >&6
5796else
5797  case $WC in
5798  [\\/]* | ?:[\\/]*)
5799  ac_cv_path_WC="$WC" # Let the user override the test with a path.
5800  ;;
5801  *)
5802  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5803for as_dir in $PATH
5804do
5805  IFS=$as_save_IFS
5806  test -z "$as_dir" && as_dir=.
5807    for ac_exec_ext in '' $ac_executable_extensions; do
5808  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5809    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
5810    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5811    break 2
5812  fi
5813done
5814  done
5815IFS=$as_save_IFS
5816
5817  ;;
5818esac
5819fi
5820WC=$ac_cv_path_WC
5821if test -n "$WC"; then
5822  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
5823$as_echo "$WC" >&6; }
5824else
5825  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5826$as_echo "no" >&6; }
5827fi
5828
5829
5830  test -n "$WC" && break
5831done
5832
5833
5834    if test "x$WC" = x; then
5835        if test "xwc" = x; then
5836          PROG_NAME=wc
5837        else
5838          PROG_NAME=wc
5839        fi
5840        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5841$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5842        as_fn_error $? "Cannot continue" "$LINENO" 5
5843    fi
5844
5845
5846
5847    for ac_prog in which
5848do
5849  # Extract the first word of "$ac_prog", so it can be a program name with args.
5850set dummy $ac_prog; ac_word=$2
5851{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5852$as_echo_n "checking for $ac_word... " >&6; }
5853if ${ac_cv_path_WHICH+:} false; then :
5854  $as_echo_n "(cached) " >&6
5855else
5856  case $WHICH in
5857  [\\/]* | ?:[\\/]*)
5858  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
5859  ;;
5860  *)
5861  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5862for as_dir in $PATH
5863do
5864  IFS=$as_save_IFS
5865  test -z "$as_dir" && as_dir=.
5866    for ac_exec_ext in '' $ac_executable_extensions; do
5867  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5868    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
5869    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5870    break 2
5871  fi
5872done
5873  done
5874IFS=$as_save_IFS
5875
5876  ;;
5877esac
5878fi
5879WHICH=$ac_cv_path_WHICH
5880if test -n "$WHICH"; then
5881  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
5882$as_echo "$WHICH" >&6; }
5883else
5884  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5885$as_echo "no" >&6; }
5886fi
5887
5888
5889  test -n "$WHICH" && break
5890done
5891
5892
5893    if test "x$WHICH" = x; then
5894        if test "xwhich" = x; then
5895          PROG_NAME=which
5896        else
5897          PROG_NAME=which
5898        fi
5899        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5900$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5901        as_fn_error $? "Cannot continue" "$LINENO" 5
5902    fi
5903
5904
5905
5906    for ac_prog in xargs
5907do
5908  # Extract the first word of "$ac_prog", so it can be a program name with args.
5909set dummy $ac_prog; ac_word=$2
5910{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5911$as_echo_n "checking for $ac_word... " >&6; }
5912if ${ac_cv_path_XARGS+:} false; then :
5913  $as_echo_n "(cached) " >&6
5914else
5915  case $XARGS in
5916  [\\/]* | ?:[\\/]*)
5917  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
5918  ;;
5919  *)
5920  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5921for as_dir in $PATH
5922do
5923  IFS=$as_save_IFS
5924  test -z "$as_dir" && as_dir=.
5925    for ac_exec_ext in '' $ac_executable_extensions; do
5926  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5927    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
5928    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5929    break 2
5930  fi
5931done
5932  done
5933IFS=$as_save_IFS
5934
5935  ;;
5936esac
5937fi
5938XARGS=$ac_cv_path_XARGS
5939if test -n "$XARGS"; then
5940  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
5941$as_echo "$XARGS" >&6; }
5942else
5943  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5944$as_echo "no" >&6; }
5945fi
5946
5947
5948  test -n "$XARGS" && break
5949done
5950
5951
5952    if test "x$XARGS" = x; then
5953        if test "xxargs" = x; then
5954          PROG_NAME=xargs
5955        else
5956          PROG_NAME=xargs
5957        fi
5958        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5959$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5960        as_fn_error $? "Cannot continue" "$LINENO" 5
5961    fi
5962
5963
5964
5965# Then required tools that require some special treatment.
5966for ac_prog in gawk mawk nawk awk
5967do
5968  # Extract the first word of "$ac_prog", so it can be a program name with args.
5969set dummy $ac_prog; ac_word=$2
5970{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5971$as_echo_n "checking for $ac_word... " >&6; }
5972if ${ac_cv_prog_AWK+:} false; then :
5973  $as_echo_n "(cached) " >&6
5974else
5975  if test -n "$AWK"; then
5976  ac_cv_prog_AWK="$AWK" # Let the user override the test.
5977else
5978as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5979for as_dir in $PATH
5980do
5981  IFS=$as_save_IFS
5982  test -z "$as_dir" && as_dir=.
5983    for ac_exec_ext in '' $ac_executable_extensions; do
5984  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5985    ac_cv_prog_AWK="$ac_prog"
5986    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5987    break 2
5988  fi
5989done
5990  done
5991IFS=$as_save_IFS
5992
5993fi
5994fi
5995AWK=$ac_cv_prog_AWK
5996if test -n "$AWK"; then
5997  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
5998$as_echo "$AWK" >&6; }
5999else
6000  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6001$as_echo "no" >&6; }
6002fi
6003
6004
6005  test -n "$AWK" && break
6006done
6007
6008
6009    if test "x$AWK" = x; then
6010        if test "x" = x; then
6011          PROG_NAME=awk
6012        else
6013          PROG_NAME=
6014        fi
6015        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6016$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6017        as_fn_error $? "Cannot continue" "$LINENO" 5
6018    fi
6019
6020{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
6021$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
6022if ${ac_cv_path_GREP+:} false; then :
6023  $as_echo_n "(cached) " >&6
6024else
6025  if test -z "$GREP"; then
6026  ac_path_GREP_found=false
6027  # Loop through the user's path and test for each of PROGNAME-LIST
6028  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6029for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6030do
6031  IFS=$as_save_IFS
6032  test -z "$as_dir" && as_dir=.
6033    for ac_prog in grep ggrep; do
6034    for ac_exec_ext in '' $ac_executable_extensions; do
6035      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
6036      as_fn_executable_p "$ac_path_GREP" || continue
6037# Check for GNU ac_path_GREP and select it if it is found.
6038  # Check for GNU $ac_path_GREP
6039case `"$ac_path_GREP" --version 2>&1` in
6040*GNU*)
6041  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
6042*)
6043  ac_count=0
6044  $as_echo_n 0123456789 >"conftest.in"
6045  while :
6046  do
6047    cat "conftest.in" "conftest.in" >"conftest.tmp"
6048    mv "conftest.tmp" "conftest.in"
6049    cp "conftest.in" "conftest.nl"
6050    $as_echo 'GREP' >> "conftest.nl"
6051    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6052    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6053    as_fn_arith $ac_count + 1 && ac_count=$as_val
6054    if test $ac_count -gt ${ac_path_GREP_max-0}; then
6055      # Best one so far, save it but keep looking for a better one
6056      ac_cv_path_GREP="$ac_path_GREP"
6057      ac_path_GREP_max=$ac_count
6058    fi
6059    # 10*(2^10) chars as input seems more than enough
6060    test $ac_count -gt 10 && break
6061  done
6062  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6063esac
6064
6065      $ac_path_GREP_found && break 3
6066    done
6067  done
6068  done
6069IFS=$as_save_IFS
6070  if test -z "$ac_cv_path_GREP"; then
6071    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6072  fi
6073else
6074  ac_cv_path_GREP=$GREP
6075fi
6076
6077fi
6078{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
6079$as_echo "$ac_cv_path_GREP" >&6; }
6080 GREP="$ac_cv_path_GREP"
6081
6082
6083
6084    if test "x$GREP" = x; then
6085        if test "x" = x; then
6086          PROG_NAME=grep
6087        else
6088          PROG_NAME=
6089        fi
6090        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6091$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6092        as_fn_error $? "Cannot continue" "$LINENO" 5
6093    fi
6094
6095{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
6096$as_echo_n "checking for egrep... " >&6; }
6097if ${ac_cv_path_EGREP+:} false; then :
6098  $as_echo_n "(cached) " >&6
6099else
6100  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
6101   then ac_cv_path_EGREP="$GREP -E"
6102   else
6103     if test -z "$EGREP"; then
6104  ac_path_EGREP_found=false
6105  # Loop through the user's path and test for each of PROGNAME-LIST
6106  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6107for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6108do
6109  IFS=$as_save_IFS
6110  test -z "$as_dir" && as_dir=.
6111    for ac_prog in egrep; do
6112    for ac_exec_ext in '' $ac_executable_extensions; do
6113      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
6114      as_fn_executable_p "$ac_path_EGREP" || continue
6115# Check for GNU ac_path_EGREP and select it if it is found.
6116  # Check for GNU $ac_path_EGREP
6117case `"$ac_path_EGREP" --version 2>&1` in
6118*GNU*)
6119  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
6120*)
6121  ac_count=0
6122  $as_echo_n 0123456789 >"conftest.in"
6123  while :
6124  do
6125    cat "conftest.in" "conftest.in" >"conftest.tmp"
6126    mv "conftest.tmp" "conftest.in"
6127    cp "conftest.in" "conftest.nl"
6128    $as_echo 'EGREP' >> "conftest.nl"
6129    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6130    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6131    as_fn_arith $ac_count + 1 && ac_count=$as_val
6132    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
6133      # Best one so far, save it but keep looking for a better one
6134      ac_cv_path_EGREP="$ac_path_EGREP"
6135      ac_path_EGREP_max=$ac_count
6136    fi
6137    # 10*(2^10) chars as input seems more than enough
6138    test $ac_count -gt 10 && break
6139  done
6140  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6141esac
6142
6143      $ac_path_EGREP_found && break 3
6144    done
6145  done
6146  done
6147IFS=$as_save_IFS
6148  if test -z "$ac_cv_path_EGREP"; then
6149    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6150  fi
6151else
6152  ac_cv_path_EGREP=$EGREP
6153fi
6154
6155   fi
6156fi
6157{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
6158$as_echo "$ac_cv_path_EGREP" >&6; }
6159 EGREP="$ac_cv_path_EGREP"
6160
6161
6162
6163    if test "x$EGREP" = x; then
6164        if test "x" = x; then
6165          PROG_NAME=egrep
6166        else
6167          PROG_NAME=
6168        fi
6169        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6170$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6171        as_fn_error $? "Cannot continue" "$LINENO" 5
6172    fi
6173
6174{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
6175$as_echo_n "checking for fgrep... " >&6; }
6176if ${ac_cv_path_FGREP+:} false; then :
6177  $as_echo_n "(cached) " >&6
6178else
6179  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
6180   then ac_cv_path_FGREP="$GREP -F"
6181   else
6182     if test -z "$FGREP"; then
6183  ac_path_FGREP_found=false
6184  # Loop through the user's path and test for each of PROGNAME-LIST
6185  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6186for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6187do
6188  IFS=$as_save_IFS
6189  test -z "$as_dir" && as_dir=.
6190    for ac_prog in fgrep; do
6191    for ac_exec_ext in '' $ac_executable_extensions; do
6192      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
6193      as_fn_executable_p "$ac_path_FGREP" || continue
6194# Check for GNU ac_path_FGREP and select it if it is found.
6195  # Check for GNU $ac_path_FGREP
6196case `"$ac_path_FGREP" --version 2>&1` in
6197*GNU*)
6198  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
6199*)
6200  ac_count=0
6201  $as_echo_n 0123456789 >"conftest.in"
6202  while :
6203  do
6204    cat "conftest.in" "conftest.in" >"conftest.tmp"
6205    mv "conftest.tmp" "conftest.in"
6206    cp "conftest.in" "conftest.nl"
6207    $as_echo 'FGREP' >> "conftest.nl"
6208    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
6209    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6210    as_fn_arith $ac_count + 1 && ac_count=$as_val
6211    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
6212      # Best one so far, save it but keep looking for a better one
6213      ac_cv_path_FGREP="$ac_path_FGREP"
6214      ac_path_FGREP_max=$ac_count
6215    fi
6216    # 10*(2^10) chars as input seems more than enough
6217    test $ac_count -gt 10 && break
6218  done
6219  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6220esac
6221
6222      $ac_path_FGREP_found && break 3
6223    done
6224  done
6225  done
6226IFS=$as_save_IFS
6227  if test -z "$ac_cv_path_FGREP"; then
6228    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6229  fi
6230else
6231  ac_cv_path_FGREP=$FGREP
6232fi
6233
6234   fi
6235fi
6236{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
6237$as_echo "$ac_cv_path_FGREP" >&6; }
6238 FGREP="$ac_cv_path_FGREP"
6239
6240
6241
6242    if test "x$FGREP" = x; then
6243        if test "x" = x; then
6244          PROG_NAME=fgrep
6245        else
6246          PROG_NAME=
6247        fi
6248        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6249$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6250        as_fn_error $? "Cannot continue" "$LINENO" 5
6251    fi
6252
6253{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
6254$as_echo_n "checking for a sed that does not truncate output... " >&6; }
6255if ${ac_cv_path_SED+:} false; then :
6256  $as_echo_n "(cached) " >&6
6257else
6258            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
6259     for ac_i in 1 2 3 4 5 6 7; do
6260       ac_script="$ac_script$as_nl$ac_script"
6261     done
6262     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
6263     { ac_script=; unset ac_script;}
6264     if test -z "$SED"; then
6265  ac_path_SED_found=false
6266  # Loop through the user's path and test for each of PROGNAME-LIST
6267  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6268for as_dir in $PATH
6269do
6270  IFS=$as_save_IFS
6271  test -z "$as_dir" && as_dir=.
6272    for ac_prog in sed gsed; do
6273    for ac_exec_ext in '' $ac_executable_extensions; do
6274      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
6275      as_fn_executable_p "$ac_path_SED" || continue
6276# Check for GNU ac_path_SED and select it if it is found.
6277  # Check for GNU $ac_path_SED
6278case `"$ac_path_SED" --version 2>&1` in
6279*GNU*)
6280  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
6281*)
6282  ac_count=0
6283  $as_echo_n 0123456789 >"conftest.in"
6284  while :
6285  do
6286    cat "conftest.in" "conftest.in" >"conftest.tmp"
6287    mv "conftest.tmp" "conftest.in"
6288    cp "conftest.in" "conftest.nl"
6289    $as_echo '' >> "conftest.nl"
6290    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
6291    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6292    as_fn_arith $ac_count + 1 && ac_count=$as_val
6293    if test $ac_count -gt ${ac_path_SED_max-0}; then
6294      # Best one so far, save it but keep looking for a better one
6295      ac_cv_path_SED="$ac_path_SED"
6296      ac_path_SED_max=$ac_count
6297    fi
6298    # 10*(2^10) chars as input seems more than enough
6299    test $ac_count -gt 10 && break
6300  done
6301  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6302esac
6303
6304      $ac_path_SED_found && break 3
6305    done
6306  done
6307  done
6308IFS=$as_save_IFS
6309  if test -z "$ac_cv_path_SED"; then
6310    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
6311  fi
6312else
6313  ac_cv_path_SED=$SED
6314fi
6315
6316fi
6317{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
6318$as_echo "$ac_cv_path_SED" >&6; }
6319 SED="$ac_cv_path_SED"
6320  rm -f conftest.sed
6321
6322
6323    if test "x$SED" = x; then
6324        if test "x" = x; then
6325          PROG_NAME=sed
6326        else
6327          PROG_NAME=
6328        fi
6329        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6330$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6331        as_fn_error $? "Cannot continue" "$LINENO" 5
6332    fi
6333
6334
6335for ac_prog in nawk gawk awk
6336do
6337  # Extract the first word of "$ac_prog", so it can be a program name with args.
6338set dummy $ac_prog; ac_word=$2
6339{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6340$as_echo_n "checking for $ac_word... " >&6; }
6341if ${ac_cv_path_NAWK+:} false; then :
6342  $as_echo_n "(cached) " >&6
6343else
6344  case $NAWK in
6345  [\\/]* | ?:[\\/]*)
6346  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
6347  ;;
6348  *)
6349  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6350for as_dir in $PATH
6351do
6352  IFS=$as_save_IFS
6353  test -z "$as_dir" && as_dir=.
6354    for ac_exec_ext in '' $ac_executable_extensions; do
6355  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6356    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
6357    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6358    break 2
6359  fi
6360done
6361  done
6362IFS=$as_save_IFS
6363
6364  ;;
6365esac
6366fi
6367NAWK=$ac_cv_path_NAWK
6368if test -n "$NAWK"; then
6369  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
6370$as_echo "$NAWK" >&6; }
6371else
6372  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6373$as_echo "no" >&6; }
6374fi
6375
6376
6377  test -n "$NAWK" && break
6378done
6379
6380
6381    if test "x$NAWK" = x; then
6382        if test "x" = x; then
6383          PROG_NAME=nawk
6384        else
6385          PROG_NAME=
6386        fi
6387        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6388$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6389        as_fn_error $? "Cannot continue" "$LINENO" 5
6390    fi
6391
6392
6393# Always force rm.
6394RM="$RM -f"
6395
6396# pwd behaves differently on various platforms and some don't support the -L flag.
6397# Always use the bash builtin pwd to get uniform behavior.
6398THEPWDCMD=pwd
6399
6400# These are not required on all platforms
6401# Extract the first word of "cygpath", so it can be a program name with args.
6402set dummy cygpath; ac_word=$2
6403{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6404$as_echo_n "checking for $ac_word... " >&6; }
6405if ${ac_cv_path_CYGPATH+:} false; then :
6406  $as_echo_n "(cached) " >&6
6407else
6408  case $CYGPATH in
6409  [\\/]* | ?:[\\/]*)
6410  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
6411  ;;
6412  *)
6413  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6414for as_dir in $PATH
6415do
6416  IFS=$as_save_IFS
6417  test -z "$as_dir" && as_dir=.
6418    for ac_exec_ext in '' $ac_executable_extensions; do
6419  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6420    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
6421    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6422    break 2
6423  fi
6424done
6425  done
6426IFS=$as_save_IFS
6427
6428  ;;
6429esac
6430fi
6431CYGPATH=$ac_cv_path_CYGPATH
6432if test -n "$CYGPATH"; then
6433  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
6434$as_echo "$CYGPATH" >&6; }
6435else
6436  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6437$as_echo "no" >&6; }
6438fi
6439
6440
6441# Extract the first word of "readlink", so it can be a program name with args.
6442set dummy readlink; ac_word=$2
6443{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6444$as_echo_n "checking for $ac_word... " >&6; }
6445if ${ac_cv_path_READLINK+:} false; then :
6446  $as_echo_n "(cached) " >&6
6447else
6448  case $READLINK in
6449  [\\/]* | ?:[\\/]*)
6450  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
6451  ;;
6452  *)
6453  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6454for as_dir in $PATH
6455do
6456  IFS=$as_save_IFS
6457  test -z "$as_dir" && as_dir=.
6458    for ac_exec_ext in '' $ac_executable_extensions; do
6459  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6460    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
6461    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6462    break 2
6463  fi
6464done
6465  done
6466IFS=$as_save_IFS
6467
6468  ;;
6469esac
6470fi
6471READLINK=$ac_cv_path_READLINK
6472if test -n "$READLINK"; then
6473  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
6474$as_echo "$READLINK" >&6; }
6475else
6476  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6477$as_echo "no" >&6; }
6478fi
6479
6480
6481# Extract the first word of "df", so it can be a program name with args.
6482set dummy df; ac_word=$2
6483{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6484$as_echo_n "checking for $ac_word... " >&6; }
6485if ${ac_cv_path_DF+:} false; then :
6486  $as_echo_n "(cached) " >&6
6487else
6488  case $DF in
6489  [\\/]* | ?:[\\/]*)
6490  ac_cv_path_DF="$DF" # Let the user override the test with a path.
6491  ;;
6492  *)
6493  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6494for as_dir in $PATH
6495do
6496  IFS=$as_save_IFS
6497  test -z "$as_dir" && as_dir=.
6498    for ac_exec_ext in '' $ac_executable_extensions; do
6499  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6500    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
6501    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6502    break 2
6503  fi
6504done
6505  done
6506IFS=$as_save_IFS
6507
6508  ;;
6509esac
6510fi
6511DF=$ac_cv_path_DF
6512if test -n "$DF"; then
6513  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
6514$as_echo "$DF" >&6; }
6515else
6516  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6517$as_echo "no" >&6; }
6518fi
6519
6520
6521# Extract the first word of "SetFile", so it can be a program name with args.
6522set dummy SetFile; ac_word=$2
6523{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6524$as_echo_n "checking for $ac_word... " >&6; }
6525if ${ac_cv_path_SETFILE+:} false; then :
6526  $as_echo_n "(cached) " >&6
6527else
6528  case $SETFILE in
6529  [\\/]* | ?:[\\/]*)
6530  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
6531  ;;
6532  *)
6533  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6534for as_dir in $PATH
6535do
6536  IFS=$as_save_IFS
6537  test -z "$as_dir" && as_dir=.
6538    for ac_exec_ext in '' $ac_executable_extensions; do
6539  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6540    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
6541    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6542    break 2
6543  fi
6544done
6545  done
6546IFS=$as_save_IFS
6547
6548  ;;
6549esac
6550fi
6551SETFILE=$ac_cv_path_SETFILE
6552if test -n "$SETFILE"; then
6553  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
6554$as_echo "$SETFILE" >&6; }
6555else
6556  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6557$as_echo "no" >&6; }
6558fi
6559
6560
6561
6562
6563# Now we can determine OpenJDK build and target platforms. This is required to
6564# have early on.
6565# Make sure we can run config.sub.
6566$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
6567  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
6568
6569{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
6570$as_echo_n "checking build system type... " >&6; }
6571if ${ac_cv_build+:} false; then :
6572  $as_echo_n "(cached) " >&6
6573else
6574  ac_build_alias=$build_alias
6575test "x$ac_build_alias" = x &&
6576  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
6577test "x$ac_build_alias" = x &&
6578  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
6579ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
6580  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
6581
6582fi
6583{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
6584$as_echo "$ac_cv_build" >&6; }
6585case $ac_cv_build in
6586*-*-*) ;;
6587*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
6588esac
6589build=$ac_cv_build
6590ac_save_IFS=$IFS; IFS='-'
6591set x $ac_cv_build
6592shift
6593build_cpu=$1
6594build_vendor=$2
6595shift; shift
6596# Remember, the first character of IFS is used to create $*,
6597# except with old shells:
6598build_os=$*
6599IFS=$ac_save_IFS
6600case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
6601
6602
6603{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
6604$as_echo_n "checking host system type... " >&6; }
6605if ${ac_cv_host+:} false; then :
6606  $as_echo_n "(cached) " >&6
6607else
6608  if test "x$host_alias" = x; then
6609  ac_cv_host=$ac_cv_build
6610else
6611  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
6612    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
6613fi
6614
6615fi
6616{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
6617$as_echo "$ac_cv_host" >&6; }
6618case $ac_cv_host in
6619*-*-*) ;;
6620*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
6621esac
6622host=$ac_cv_host
6623ac_save_IFS=$IFS; IFS='-'
6624set x $ac_cv_host
6625shift
6626host_cpu=$1
6627host_vendor=$2
6628shift; shift
6629# Remember, the first character of IFS is used to create $*,
6630# except with old shells:
6631host_os=$*
6632IFS=$ac_save_IFS
6633case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
6634
6635
6636{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
6637$as_echo_n "checking target system type... " >&6; }
6638if ${ac_cv_target+:} false; then :
6639  $as_echo_n "(cached) " >&6
6640else
6641  if test "x$target_alias" = x; then
6642  ac_cv_target=$ac_cv_host
6643else
6644  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
6645    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
6646fi
6647
6648fi
6649{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
6650$as_echo "$ac_cv_target" >&6; }
6651case $ac_cv_target in
6652*-*-*) ;;
6653*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
6654esac
6655target=$ac_cv_target
6656ac_save_IFS=$IFS; IFS='-'
6657set x $ac_cv_target
6658shift
6659target_cpu=$1
6660target_vendor=$2
6661shift; shift
6662# Remember, the first character of IFS is used to create $*,
6663# except with old shells:
6664target_os=$*
6665IFS=$ac_save_IFS
6666case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
6667
6668
6669# The aliases save the names the user supplied, while $host etc.
6670# will get canonicalized.
6671test -n "$target_alias" &&
6672  test "$program_prefix$program_suffix$program_transform_name" = \
6673    NONENONEs,x,x, &&
6674  program_prefix=${target_alias}-
6675
6676# Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
6677# is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
6678# product you're building. The target of this build is called "host". Since this is confusing to most people, we
6679# have not adopted that system, but use "target" as the platform we are building for. In some places though we need
6680# to use the configure naming style.
6681
6682
6683
6684
6685
6686    # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
6687    # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
6688    # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
6689    # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
6690    OPENJDK_TARGET_AUTOCONF_NAME="$host"
6691    OPENJDK_BUILD_AUTOCONF_NAME="$build"
6692
6693
6694
6695    # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
6696
6697  case "$build_os" in
6698    *linux*)
6699      VAR_OS=linux
6700      VAR_OS_API=posix
6701      VAR_OS_ENV=linux
6702      ;;
6703    *solaris*)
6704      VAR_OS=solaris
6705      VAR_OS_API=posix
6706      VAR_OS_ENV=solaris
6707      ;;
6708    *darwin*)
6709      VAR_OS=macosx
6710      VAR_OS_API=posix
6711      VAR_OS_ENV=macosx
6712      ;;
6713    *bsd*)
6714      VAR_OS=bsd
6715      VAR_OS_API=posix
6716      VAR_OS_ENV=bsd
6717      ;;
6718    *cygwin*)
6719      VAR_OS=windows
6720      VAR_OS_API=winapi
6721      VAR_OS_ENV=windows.cygwin
6722      ;;
6723    *mingw*)
6724      VAR_OS=windows
6725      VAR_OS_API=winapi
6726      VAR_OS_ENV=windows.msys
6727      ;;
6728    *)
6729      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
6730      ;;
6731  esac
6732
6733
6734  # First argument is the cpu name from the trip/quad
6735  case "$build_cpu" in
6736    x86_64)
6737      VAR_CPU=x86_64
6738      VAR_CPU_ARCH=x86
6739      VAR_CPU_BITS=64
6740      VAR_CPU_ENDIAN=little
6741      ;;
6742    i?86)
6743      VAR_CPU=x86
6744      VAR_CPU_ARCH=x86
6745      VAR_CPU_BITS=32
6746      VAR_CPU_ENDIAN=little
6747      ;;
6748    arm*)
6749      VAR_CPU=arm
6750      VAR_CPU_ARCH=arm
6751      VAR_CPU_BITS=32
6752      VAR_CPU_ENDIAN=little
6753      ;;
6754    powerpc)
6755      VAR_CPU=ppc
6756      VAR_CPU_ARCH=ppc
6757      VAR_CPU_BITS=32
6758      VAR_CPU_ENDIAN=big
6759       ;;
6760    powerpc64)
6761      VAR_CPU=ppc64
6762      VAR_CPU_ARCH=ppc
6763      VAR_CPU_BITS=64
6764      VAR_CPU_ENDIAN=big
6765       ;;
6766    s390)
6767      VAR_CPU=s390
6768      VAR_CPU_ARCH=s390
6769      VAR_CPU_BITS=32
6770      VAR_CPU_ENDIAN=big
6771       ;;
6772    s390x)
6773      VAR_CPU=s390x
6774      VAR_CPU_ARCH=s390
6775      VAR_CPU_BITS=64
6776      VAR_CPU_ENDIAN=big
6777       ;;
6778    sparc)
6779      VAR_CPU=sparc
6780      VAR_CPU_ARCH=sparc
6781      VAR_CPU_BITS=32
6782      VAR_CPU_ENDIAN=big
6783       ;;
6784    sparcv9)
6785      VAR_CPU=sparcv9
6786      VAR_CPU_ARCH=sparc
6787      VAR_CPU_BITS=64
6788      VAR_CPU_ENDIAN=big
6789       ;;
6790    *)
6791      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
6792      ;;
6793  esac
6794
6795    # ..and setup our own variables. (Do this explicitely to facilitate searching)
6796    OPENJDK_BUILD_OS="$VAR_OS"
6797    OPENJDK_BUILD_OS_API="$VAR_OS_API"
6798    OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
6799    OPENJDK_BUILD_CPU="$VAR_CPU"
6800    OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
6801    OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
6802    OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
6803
6804
6805
6806
6807
6808
6809
6810    { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
6811$as_echo_n "checking openjdk-build os-cpu... " >&6; }
6812    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
6813$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
6814
6815    # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
6816
6817  case "$host_os" in
6818    *linux*)
6819      VAR_OS=linux
6820      VAR_OS_API=posix
6821      VAR_OS_ENV=linux
6822      ;;
6823    *solaris*)
6824      VAR_OS=solaris
6825      VAR_OS_API=posix
6826      VAR_OS_ENV=solaris
6827      ;;
6828    *darwin*)
6829      VAR_OS=macosx
6830      VAR_OS_API=posix
6831      VAR_OS_ENV=macosx
6832      ;;
6833    *bsd*)
6834      VAR_OS=bsd
6835      VAR_OS_API=posix
6836      VAR_OS_ENV=bsd
6837      ;;
6838    *cygwin*)
6839      VAR_OS=windows
6840      VAR_OS_API=winapi
6841      VAR_OS_ENV=windows.cygwin
6842      ;;
6843    *mingw*)
6844      VAR_OS=windows
6845      VAR_OS_API=winapi
6846      VAR_OS_ENV=windows.msys
6847      ;;
6848    *)
6849      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
6850      ;;
6851  esac
6852
6853
6854  # First argument is the cpu name from the trip/quad
6855  case "$host_cpu" in
6856    x86_64)
6857      VAR_CPU=x86_64
6858      VAR_CPU_ARCH=x86
6859      VAR_CPU_BITS=64
6860      VAR_CPU_ENDIAN=little
6861      ;;
6862    i?86)
6863      VAR_CPU=x86
6864      VAR_CPU_ARCH=x86
6865      VAR_CPU_BITS=32
6866      VAR_CPU_ENDIAN=little
6867      ;;
6868    arm*)
6869      VAR_CPU=arm
6870      VAR_CPU_ARCH=arm
6871      VAR_CPU_BITS=32
6872      VAR_CPU_ENDIAN=little
6873      ;;
6874    powerpc)
6875      VAR_CPU=ppc
6876      VAR_CPU_ARCH=ppc
6877      VAR_CPU_BITS=32
6878      VAR_CPU_ENDIAN=big
6879       ;;
6880    powerpc64)
6881      VAR_CPU=ppc64
6882      VAR_CPU_ARCH=ppc
6883      VAR_CPU_BITS=64
6884      VAR_CPU_ENDIAN=big
6885       ;;
6886    s390)
6887      VAR_CPU=s390
6888      VAR_CPU_ARCH=s390
6889      VAR_CPU_BITS=32
6890      VAR_CPU_ENDIAN=big
6891       ;;
6892    s390x)
6893      VAR_CPU=s390x
6894      VAR_CPU_ARCH=s390
6895      VAR_CPU_BITS=64
6896      VAR_CPU_ENDIAN=big
6897       ;;
6898    sparc)
6899      VAR_CPU=sparc
6900      VAR_CPU_ARCH=sparc
6901      VAR_CPU_BITS=32
6902      VAR_CPU_ENDIAN=big
6903       ;;
6904    sparcv9)
6905      VAR_CPU=sparcv9
6906      VAR_CPU_ARCH=sparc
6907      VAR_CPU_BITS=64
6908      VAR_CPU_ENDIAN=big
6909       ;;
6910    *)
6911      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
6912      ;;
6913  esac
6914
6915    # ... and setup our own variables. (Do this explicitely to facilitate searching)
6916    OPENJDK_TARGET_OS="$VAR_OS"
6917    OPENJDK_TARGET_OS_API="$VAR_OS_API"
6918    OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
6919    OPENJDK_TARGET_CPU="$VAR_CPU"
6920    OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
6921    OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
6922    OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
6923
6924
6925
6926
6927
6928
6929
6930    { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
6931$as_echo_n "checking openjdk-target os-cpu... " >&6; }
6932    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
6933$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
6934
6935
6936
6937# Check whether --with-target-bits was given.
6938if test "${with_target_bits+set}" = set; then :
6939  withval=$with_target_bits;
6940fi
6941
6942
6943  # We have three types of compiles:
6944  # native  == normal compilation, target system == build system
6945  # cross   == traditional cross compilation, target system != build system; special toolchain needed
6946  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
6947  #
6948  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
6949    # We're doing a proper cross-compilation
6950    COMPILE_TYPE="cross"
6951  else
6952    COMPILE_TYPE="native"
6953  fi
6954
6955  if test "x$with_target_bits" != x; then
6956    if test "x$COMPILE_TYPE" = "xcross"; then
6957      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
6958    fi
6959
6960    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
6961      # A reduced build is requested
6962      COMPILE_TYPE="reduced"
6963      OPENJDK_TARGET_CPU_BITS=32
6964      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
6965        OPENJDK_TARGET_CPU=x86
6966      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
6967        OPENJDK_TARGET_CPU=sparc
6968      else
6969        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
6970      fi
6971    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
6972      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
6973    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
6974      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
6975$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
6976    else
6977      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
6978    fi
6979  fi
6980
6981
6982{ $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
6983$as_echo_n "checking compilation type... " >&6; }
6984{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
6985$as_echo "$COMPILE_TYPE" >&6; }
6986
6987
6988    if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
6989       REQUIRED_OS_NAME=SunOS
6990       REQUIRED_OS_VERSION=5.10
6991    fi
6992    if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
6993       REQUIRED_OS_NAME=Linux
6994       REQUIRED_OS_VERSION=2.6
6995    fi
6996    if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
6997        REQUIRED_OS_NAME=Windows
6998        if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
6999            REQUIRED_OS_VERSION=5.2
7000        else
7001            REQUIRED_OS_VERSION=5.1
7002        fi
7003    fi
7004    if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
7005        REQUIRED_OS_NAME=Darwin
7006        REQUIRED_OS_VERSION=11.2
7007    fi
7008
7009
7010
7011
7012
7013    # Also store the legacy naming of the cpu.
7014    # Ie i586 and amd64 instead of x86 and x86_64
7015    OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
7016    if test "x$OPENJDK_TARGET_CPU" = xx86; then
7017      OPENJDK_TARGET_CPU_LEGACY="i586"
7018    elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7019      # On all platforms except MacOSX replace x86_64 with amd64.
7020      OPENJDK_TARGET_CPU_LEGACY="amd64"
7021    fi
7022
7023
7024    # And the second legacy naming of the cpu.
7025    # Ie i386 and amd64 instead of x86 and x86_64.
7026    OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
7027    if test "x$OPENJDK_TARGET_CPU" = xx86; then
7028      OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
7029    elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7030      OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
7031    fi
7032
7033
7034    # This is the name of the cpu (but using i386 and amd64 instead of
7035    # x86 and x86_64, respectively), preceeded by a /, to be used when
7036    # locating libraries. On macosx, it's empty, though.
7037    OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
7038    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
7039        OPENJDK_TARGET_CPU_LIBDIR=""
7040    fi
7041
7042
7043    # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
7044    # /amd64 or /sparcv9. This string is appended to some library paths, like this:
7045    # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
7046    OPENJDK_TARGET_CPU_ISADIR=""
7047    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
7048      if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7049          OPENJDK_TARGET_CPU_ISADIR="/amd64"
7050      elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
7051          OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
7052      fi
7053    fi
7054
7055
7056    # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
7057    OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
7058    if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
7059      # On linux only, we replace x86 with i386.
7060      OPENJDK_TARGET_CPU_OSARCH="i386"
7061    elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7062      # On all platforms except macosx, we replace x86_64 with amd64.
7063      OPENJDK_TARGET_CPU_OSARCH="amd64"
7064    fi
7065
7066
7067    OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
7068    if test "x$OPENJDK_TARGET_CPU" = xx86; then
7069      OPENJDK_TARGET_CPU_JLI="i386"
7070    elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7071      # On all platforms except macosx, we replace x86_64 with amd64.
7072      OPENJDK_TARGET_CPU_JLI="amd64"
7073    fi
7074    # Now setup the -D flags for building libjli.
7075    OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
7076    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
7077      if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
7078        OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
7079      elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
7080        OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
7081      fi
7082    fi
7083
7084
7085    # Setup OPENJDK_TARGET_OS_API_DIR, used in source paths.
7086    if test "x$OPENJDK_TARGET_OS_API" = xposix; then
7087        OPENJDK_TARGET_OS_API_DIR="solaris"
7088    fi
7089    if test "x$OPENJDK_TARGET_OS_API" = xwinapi; then
7090        OPENJDK_TARGET_OS_API_DIR="windows"
7091    fi
7092
7093
7094    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7095        A_LP64="LP64:="
7096        # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
7097        # unpack200.exe
7098        if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
7099            ADD_LP64="-D_LP64=1"
7100        fi
7101    fi
7102    LP64=$A_LP64
7103
7104
7105    if test "x$COMPILE_TYPE" = "xcross"; then
7106      # FIXME: ... or should this include reduced builds..?
7107      DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
7108    else
7109      DEFINE_CROSS_COMPILE_ARCH=""
7110    fi
7111
7112
7113    # ZERO_ARCHDEF is used to enable architecture-specific code
7114    case "${OPENJDK_TARGET_CPU}" in
7115      ppc*)    ZERO_ARCHDEF=PPC   ;;
7116      s390*)   ZERO_ARCHDEF=S390  ;;
7117      sparc*)  ZERO_ARCHDEF=SPARC ;;
7118      x86_64*) ZERO_ARCHDEF=AMD64 ;;
7119      x86)     ZERO_ARCHDEF=IA32  ;;
7120      *)      ZERO_ARCHDEF=$(echo "${OPENJDK_TARGET_CPU_LEGACY_LIB}" | tr a-z A-Z)
7121    esac
7122
7123
7124
7125
7126
7127# Continue setting up basic stuff. Most remaining code require fundamental tools.
7128
7129# Locate the directory of this script.
7130SCRIPT="$0"
7131AUTOCONF_DIR=`cd \`$DIRNAME $SCRIPT\`; $THEPWDCMD -L`
7132
7133# Where is the source? It is located two levels above the configure script.
7134CURDIR="$PWD"
7135cd "$AUTOCONF_DIR/../.."
7136SRC_ROOT="`$THEPWDCMD -L`"
7137
7138if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
7139  PATH_SEP=";"
7140
7141  SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
7142  if test $SRC_ROOT_LENGTH -gt 100; then
7143      as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
7144  fi
7145
7146  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7147    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
7148$as_echo_n "checking cygwin release... " >&6; }
7149    CYGWIN_VERSION=`$UNAME -r`
7150    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
7151$as_echo "$CYGWIN_VERSION" >&6; }
7152    WINDOWS_ENV_VENDOR='cygwin'
7153    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
7154
7155    CYGWIN_VERSION_OK=`$ECHO $CYGWIN_VERSION | $GREP ^1.7.`
7156    if test "x$CYGWIN_VERSION_OK" = x; then
7157      { $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
7158$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;}
7159      as_fn_error $? "Cannot continue" "$LINENO" 5
7160    fi
7161    if test "x$CYGPATH" = x; then
7162        as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
7163    fi
7164    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
7165$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
7166    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
7167    cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
7168    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
7169    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
7170    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
7171$as_echo "$CYGWIN_ROOT_PATH" >&6; }
7172    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
7173    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
7174    if test "x$test_cygdrive_prefix" = x; then
7175        as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
7176    fi
7177  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7178    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
7179$as_echo_n "checking msys release... " >&6; }
7180    MSYS_VERSION=`$UNAME -r`
7181    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
7182$as_echo "$MSYS_VERSION" >&6; }
7183
7184    WINDOWS_ENV_VENDOR='msys'
7185    WINDOWS_ENV_VERSION="$MSYS_VERSION"
7186
7187    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
7188$as_echo_n "checking msys root directory as unix-style path... " >&6; }
7189    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
7190    MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
7191
7192  windows_path="$MSYS_ROOT_PATH"
7193  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7194    unix_path=`$CYGPATH -u "$windows_path"`
7195    MSYS_ROOT_PATH="$unix_path"
7196  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7197    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7198    MSYS_ROOT_PATH="$unix_path"
7199  fi
7200
7201    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
7202$as_echo "$MSYS_ROOT_PATH" >&6; }
7203    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
7204  else
7205    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
7206  fi
7207
7208  # Test if windows or unix (cygwin/msys) find is first in path.
7209  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
7210$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
7211  FIND_BINARY_OUTPUT=`find --version 2>&1`
7212  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
7213    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
7214$as_echo "unix style" >&6; }
7215  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
7216    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
7217$as_echo "Windows" >&6; }
7218    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
7219$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
7220    { $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
7221$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
7222    as_fn_error $? "Cannot continue" "$LINENO" 5
7223  else
7224    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
7225$as_echo "unknown" >&6; }
7226    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
7227$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
7228  fi
7229
7230else
7231  PATH_SEP=":"
7232fi
7233
7234
7235
7236cd "$CURDIR"
7237
7238
7239  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7240
7241  # Input might be given as Windows format, start by converting to
7242  # unix format.
7243  path="$SRC_ROOT"
7244  new_path=`$CYGPATH -u "$path"`
7245
7246  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7247  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7248  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7249  # "foo.exe" is OK but "foo" is an error.
7250  #
7251  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7252  # It is also a way to make sure we got the proper file name for the real test later on.
7253  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7254  if test "x$test_shortpath" = x; then
7255    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5
7256$as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;}
7257    as_fn_error $? "Cannot locate the the path of SRC_ROOT" "$LINENO" 5
7258  fi
7259
7260  # Call helper function which possibly converts this using DOS-style short mode.
7261  # If so, the updated path is stored in $new_path.
7262
7263  input_path="$new_path"
7264  # Check if we need to convert this using DOS-style short mode. If the path
7265  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7266  # take no chances and rewrite it.
7267  # Note: m4 eats our [], so we need to use [ and ] instead.
7268  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7269  if test "x$has_forbidden_chars" != x; then
7270    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7271    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7272    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7273    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7274      # Going to short mode and back again did indeed matter. Since short mode is
7275      # case insensitive, let's make it lowercase to improve readability.
7276      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7277      # Now convert it back to Unix-stile (cygpath)
7278      input_path=`$CYGPATH -u "$shortmode_path"`
7279      new_path="$input_path"
7280    fi
7281  fi
7282
7283  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7284  if test "x$test_cygdrive_prefix" = x; then
7285    # As a simple fix, exclude /usr/bin since it's not a real path.
7286    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7287      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7288      # a path prefixed by /cygdrive for fixpath to work.
7289      new_path="$CYGWIN_ROOT_PATH$input_path"
7290    fi
7291  fi
7292
7293
7294  if test "x$path" != "x$new_path"; then
7295    SRC_ROOT="$new_path"
7296    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5
7297$as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;}
7298  fi
7299
7300  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7301
7302  path="$SRC_ROOT"
7303  has_colon=`$ECHO $path | $GREP ^.:`
7304  new_path="$path"
7305  if test "x$has_colon" = x; then
7306    # Not in mixed or Windows style, start by that.
7307    new_path=`cmd //c echo $path`
7308  fi
7309
7310
7311  input_path="$new_path"
7312  # Check if we need to convert this using DOS-style short mode. If the path
7313  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7314  # take no chances and rewrite it.
7315  # Note: m4 eats our [], so we need to use [ and ] instead.
7316  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7317  if test "x$has_forbidden_chars" != x; then
7318    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7319    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7320  fi
7321
7322
7323  windows_path="$new_path"
7324  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7325    unix_path=`$CYGPATH -u "$windows_path"`
7326    new_path="$unix_path"
7327  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7328    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7329    new_path="$unix_path"
7330  fi
7331
7332  if test "x$path" != "x$new_path"; then
7333    SRC_ROOT="$new_path"
7334    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5
7335$as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;}
7336  fi
7337
7338  # Save the first 10 bytes of this path to the storage, so fixpath can work.
7339  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7340
7341  else
7342    # We're on a posix platform. Hooray! :)
7343    path="$SRC_ROOT"
7344    has_space=`$ECHO "$path" | $GREP " "`
7345    if test "x$has_space" != x; then
7346      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5
7347$as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;}
7348      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7349    fi
7350
7351    # Use eval to expand a potential ~
7352    eval path="$path"
7353    if test ! -f "$path" && test ! -d "$path"; then
7354      as_fn_error $? "The path of SRC_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
7355    fi
7356
7357    SRC_ROOT="`cd "$path"; $THEPWDCMD -L`"
7358  fi
7359
7360
7361  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7362
7363  # Input might be given as Windows format, start by converting to
7364  # unix format.
7365  path="$CURDIR"
7366  new_path=`$CYGPATH -u "$path"`
7367
7368  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7369  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7370  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7371  # "foo.exe" is OK but "foo" is an error.
7372  #
7373  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7374  # It is also a way to make sure we got the proper file name for the real test later on.
7375  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7376  if test "x$test_shortpath" = x; then
7377    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
7378$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
7379    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
7380  fi
7381
7382  # Call helper function which possibly converts this using DOS-style short mode.
7383  # If so, the updated path is stored in $new_path.
7384
7385  input_path="$new_path"
7386  # Check if we need to convert this using DOS-style short mode. If the path
7387  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7388  # take no chances and rewrite it.
7389  # Note: m4 eats our [], so we need to use [ and ] instead.
7390  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7391  if test "x$has_forbidden_chars" != x; then
7392    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7393    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7394    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7395    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7396      # Going to short mode and back again did indeed matter. Since short mode is
7397      # case insensitive, let's make it lowercase to improve readability.
7398      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7399      # Now convert it back to Unix-stile (cygpath)
7400      input_path=`$CYGPATH -u "$shortmode_path"`
7401      new_path="$input_path"
7402    fi
7403  fi
7404
7405  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7406  if test "x$test_cygdrive_prefix" = x; then
7407    # As a simple fix, exclude /usr/bin since it's not a real path.
7408    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7409      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7410      # a path prefixed by /cygdrive for fixpath to work.
7411      new_path="$CYGWIN_ROOT_PATH$input_path"
7412    fi
7413  fi
7414
7415
7416  if test "x$path" != "x$new_path"; then
7417    CURDIR="$new_path"
7418    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
7419$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
7420  fi
7421
7422  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7423
7424  path="$CURDIR"
7425  has_colon=`$ECHO $path | $GREP ^.:`
7426  new_path="$path"
7427  if test "x$has_colon" = x; then
7428    # Not in mixed or Windows style, start by that.
7429    new_path=`cmd //c echo $path`
7430  fi
7431
7432
7433  input_path="$new_path"
7434  # Check if we need to convert this using DOS-style short mode. If the path
7435  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7436  # take no chances and rewrite it.
7437  # Note: m4 eats our [], so we need to use [ and ] instead.
7438  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7439  if test "x$has_forbidden_chars" != x; then
7440    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7441    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7442  fi
7443
7444
7445  windows_path="$new_path"
7446  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7447    unix_path=`$CYGPATH -u "$windows_path"`
7448    new_path="$unix_path"
7449  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7450    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7451    new_path="$unix_path"
7452  fi
7453
7454  if test "x$path" != "x$new_path"; then
7455    CURDIR="$new_path"
7456    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
7457$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
7458  fi
7459
7460  # Save the first 10 bytes of this path to the storage, so fixpath can work.
7461  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7462
7463  else
7464    # We're on a posix platform. Hooray! :)
7465    path="$CURDIR"
7466    has_space=`$ECHO "$path" | $GREP " "`
7467    if test "x$has_space" != x; then
7468      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
7469$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
7470      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7471    fi
7472
7473    # Use eval to expand a potential ~
7474    eval path="$path"
7475    if test ! -f "$path" && test ! -d "$path"; then
7476      as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
7477    fi
7478
7479    CURDIR="`cd "$path"; $THEPWDCMD -L`"
7480  fi
7481
7482
7483if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
7484    # Add extra search paths on solaris for utilities like ar and as etc...
7485    PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
7486fi
7487
7488# You can force the sys-root if the sys-root encoded into the cross compiler tools
7489# is not correct.
7490
7491# Check whether --with-sys-root was given.
7492if test "${with_sys_root+set}" = set; then :
7493  withval=$with_sys_root;
7494fi
7495
7496
7497if test "x$with_sys_root" != x; then
7498  SYS_ROOT=$with_sys_root
7499else
7500  SYS_ROOT=/
7501fi
7502
7503
7504
7505# Check whether --with-tools-dir was given.
7506if test "${with_tools_dir+set}" = set; then :
7507  withval=$with_tools_dir; TOOLS_DIR=$with_tools_dir
7508
7509fi
7510
7511
7512
7513# Check whether --with-devkit was given.
7514if test "${with_devkit+set}" = set; then :
7515  withval=$with_devkit;
7516    if test "x$with_sys_root" != x; then
7517      as_fn_error $? "Cannot specify both --with-devkit and --with-sys-root at the same time" "$LINENO" 5
7518    fi
7519
7520  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7521
7522  # Input might be given as Windows format, start by converting to
7523  # unix format.
7524  path="$with_devkit"
7525  new_path=`$CYGPATH -u "$path"`
7526
7527  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7528  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7529  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7530  # "foo.exe" is OK but "foo" is an error.
7531  #
7532  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7533  # It is also a way to make sure we got the proper file name for the real test later on.
7534  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7535  if test "x$test_shortpath" = x; then
7536    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
7537$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
7538    as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
7539  fi
7540
7541  # Call helper function which possibly converts this using DOS-style short mode.
7542  # If so, the updated path is stored in $new_path.
7543
7544  input_path="$new_path"
7545  # Check if we need to convert this using DOS-style short mode. If the path
7546  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7547  # take no chances and rewrite it.
7548  # Note: m4 eats our [], so we need to use [ and ] instead.
7549  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7550  if test "x$has_forbidden_chars" != x; then
7551    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7552    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7553    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7554    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7555      # Going to short mode and back again did indeed matter. Since short mode is
7556      # case insensitive, let's make it lowercase to improve readability.
7557      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7558      # Now convert it back to Unix-stile (cygpath)
7559      input_path=`$CYGPATH -u "$shortmode_path"`
7560      new_path="$input_path"
7561    fi
7562  fi
7563
7564  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7565  if test "x$test_cygdrive_prefix" = x; then
7566    # As a simple fix, exclude /usr/bin since it's not a real path.
7567    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7568      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7569      # a path prefixed by /cygdrive for fixpath to work.
7570      new_path="$CYGWIN_ROOT_PATH$input_path"
7571    fi
7572  fi
7573
7574
7575  if test "x$path" != "x$new_path"; then
7576    with_devkit="$new_path"
7577    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
7578$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
7579  fi
7580
7581  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7582
7583  path="$with_devkit"
7584  has_colon=`$ECHO $path | $GREP ^.:`
7585  new_path="$path"
7586  if test "x$has_colon" = x; then
7587    # Not in mixed or Windows style, start by that.
7588    new_path=`cmd //c echo $path`
7589  fi
7590
7591
7592  input_path="$new_path"
7593  # Check if we need to convert this using DOS-style short mode. If the path
7594  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7595  # take no chances and rewrite it.
7596  # Note: m4 eats our [], so we need to use [ and ] instead.
7597  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7598  if test "x$has_forbidden_chars" != x; then
7599    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7600    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7601  fi
7602
7603
7604  windows_path="$new_path"
7605  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7606    unix_path=`$CYGPATH -u "$windows_path"`
7607    new_path="$unix_path"
7608  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7609    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7610    new_path="$unix_path"
7611  fi
7612
7613  if test "x$path" != "x$new_path"; then
7614    with_devkit="$new_path"
7615    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
7616$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
7617  fi
7618
7619  # Save the first 10 bytes of this path to the storage, so fixpath can work.
7620  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7621
7622  else
7623    # We're on a posix platform. Hooray! :)
7624    path="$with_devkit"
7625    has_space=`$ECHO "$path" | $GREP " "`
7626    if test "x$has_space" != x; then
7627      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
7628$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
7629      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7630    fi
7631
7632    # Use eval to expand a potential ~
7633    eval path="$path"
7634    if test ! -f "$path" && test ! -d "$path"; then
7635      as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
7636    fi
7637
7638    with_devkit="`cd "$path"; $THEPWDCMD -L`"
7639  fi
7640
7641
7642  if test "x$TOOLS_DIR" = x; then
7643    TOOLS_DIR="$with_devkit/bin"
7644  else
7645    TOOLS_DIR="$TOOLS_DIR:$with_devkit/bin"
7646  fi
7647
7648    if test -d "$with_devkit/$host_alias/libc"; then
7649      SYS_ROOT=$with_devkit/$host_alias/libc
7650    elif test -d "$with_devkit/$host/sys-root"; then
7651      SYS_ROOT=$with_devkit/$host/sys-root
7652    fi
7653
7654fi
7655
7656
7657
7658# Setup default logging of stdout and stderr to build.log in the output root.
7659BUILD_LOG='$(OUTPUT_ROOT)/build.log'
7660BUILD_LOG_PREVIOUS='$(OUTPUT_ROOT)/build.log.old'
7661BUILD_LOG_WRAPPER='$(BASH) $(SRC_ROOT)/common/bin/logger.sh $(BUILD_LOG)'
7662
7663
7664
7665
7666
7667# Check if it's a pure open build or if custom sources are to be used.
7668
7669  # Check whether --enable-openjdk-only was given.
7670if test "${enable_openjdk_only+set}" = set; then :
7671  enableval=$enable_openjdk_only;
7672else
7673  enable_openjdk_only="no"
7674fi
7675
7676
7677  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
7678$as_echo_n "checking for presence of closed sources... " >&6; }
7679  if test -d "$SRC_ROOT/jdk/src/closed"; then
7680    CLOSED_SOURCE_PRESENT=yes
7681  else
7682    CLOSED_SOURCE_PRESENT=no
7683  fi
7684  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
7685$as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
7686
7687  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
7688$as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
7689  SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
7690  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
7691$as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
7692
7693  if test "x$CLOSED_SOURCE_PRESENT" = xno; then
7694    OPENJDK=true
7695    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
7696      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
7697$as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
7698    fi
7699  else
7700    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
7701      OPENJDK=true
7702    else
7703      OPENJDK=false
7704    fi
7705  fi
7706
7707  if test "x$OPENJDK" = "xtrue"; then
7708    SET_OPENJDK="OPENJDK=true"
7709  fi
7710
7711
7712
7713
7714# These are needed to be able to create a configuration name (and thus the output directory)
7715
7716###############################################################################
7717#
7718# Check which variant of the JDK that we want to build.
7719# Currently we have:
7720#    normal:   standard edition
7721# but the custom make system may add other variants
7722#
7723# Effectively the JDK variant gives a name to a specific set of
7724# modules to compile into the JDK. In the future, these modules
7725# might even be Jigsaw modules.
7726#
7727{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
7728$as_echo_n "checking which variant of the JDK to build... " >&6; }
7729
7730# Check whether --with-jdk-variant was given.
7731if test "${with_jdk_variant+set}" = set; then :
7732  withval=$with_jdk_variant;
7733fi
7734
7735
7736if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
7737    JDK_VARIANT="normal"
7738else
7739    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
7740fi
7741
7742
7743
7744{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
7745$as_echo "$JDK_VARIANT" >&6; }
7746
7747
7748
7749###############################################################################
7750#
7751# Check which variants of the JVM that we want to build.
7752# Currently we have:
7753#    server: normal interpreter and a tiered C1/C2 compiler
7754#    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
7755#    minimal1: reduced form of client with optional VM services and features stripped out
7756#    kernel: kernel footprint JVM that passes the TCK without major performance problems,
7757#             ie normal interpreter and C1, only the serial GC, kernel jvmti etc
7758#    zero: no machine code interpreter, no compiler
7759#    zeroshark: zero interpreter and shark/llvm compiler backend
7760{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
7761$as_echo_n "checking which variants of the JVM to build... " >&6; }
7762
7763# Check whether --with-jvm-variants was given.
7764if test "${with_jvm_variants+set}" = set; then :
7765  withval=$with_jvm_variants;
7766fi
7767
7768
7769if test "x$with_jvm_variants" = x; then
7770     with_jvm_variants="server"
7771fi
7772
7773JVM_VARIANTS=",$with_jvm_variants,"
7774TEST_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,//' -e 's/client,//'  -e 's/minimal1,//' -e 's/kernel,//' -e 's/zero,//' -e 's/zeroshark,//'`
7775
7776if test "x$TEST_VARIANTS" != "x,"; then
7777   as_fn_error $? "The available JVM variants are: server, client, minimal1, kernel, zero, zeroshark" "$LINENO" 5
7778fi
7779{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
7780$as_echo "$with_jvm_variants" >&6; }
7781
7782JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
7783JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
7784JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
7785JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
7786JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
7787JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
7788
7789if test "x$JVM_VARIANT_CLIENT" = xtrue; then
7790    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7791        as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
7792    fi
7793fi
7794if test "x$JVM_VARIANT_KERNEL" = xtrue; then
7795    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7796        as_fn_error $? "You cannot build a kernel JVM for a 64-bit machine." "$LINENO" 5
7797    fi
7798fi
7799if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
7800    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7801        as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
7802    fi
7803fi
7804
7805# Replace the commas with AND for use in the build directory name.
7806ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/'`
7807COUNT_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/'`
7808if test "x$COUNT_VARIANTS" != "x,1"; then
7809    BUILDING_MULTIPLE_JVM_VARIANTS=yes
7810else
7811    BUILDING_MULTIPLE_JVM_VARIANTS=no
7812fi
7813
7814
7815
7816
7817
7818
7819
7820
7821
7822INCLUDE_SA=true
7823if test "x$JVM_VARIANT_ZERO" = xtrue ; then
7824    INCLUDE_SA=false
7825fi
7826if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then
7827    INCLUDE_SA=false
7828fi
7829
7830
7831if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
7832   MACOSX_UNIVERSAL="true"
7833fi
7834
7835
7836
7837
7838
7839###############################################################################
7840#
7841# Set the debug level
7842#    release: no debug information, all optimizations, no asserts.
7843#    fastdebug: debug information (-g), all optimizations, all asserts
7844#    slowdebug: debug information (-g), no optimizations, all asserts
7845#
7846DEBUG_LEVEL="release"
7847{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
7848$as_echo_n "checking which debug level to use... " >&6; }
7849# Check whether --enable-debug was given.
7850if test "${enable_debug+set}" = set; then :
7851  enableval=$enable_debug;
7852        ENABLE_DEBUG="${enableval}"
7853        DEBUG_LEVEL="fastdebug"
7854
7855else
7856  ENABLE_DEBUG="no"
7857fi
7858
7859
7860
7861# Check whether --with-debug-level was given.
7862if test "${with_debug_level+set}" = set; then :
7863  withval=$with_debug_level;
7864        DEBUG_LEVEL="${withval}"
7865        if test "x$ENABLE_DEBUG" = xyes; then
7866			as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
7867        fi
7868
7869fi
7870
7871{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
7872$as_echo "$DEBUG_LEVEL" >&6; }
7873
7874if test "x$DEBUG_LEVEL" != xrelease && \
7875   test "x$DEBUG_LEVEL" != xfastdebug && \
7876   test "x$DEBUG_LEVEL" != xslowdebug; then
7877   as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
7878fi
7879
7880
7881###############################################################################
7882#
7883# Setup legacy vars/targets and new vars to deal with different debug levels.
7884#
7885
7886case $DEBUG_LEVEL in
7887      release )
7888          VARIANT="OPT"
7889          FASTDEBUG="false"
7890          DEBUG_CLASSFILES="false"
7891          BUILD_VARIANT_RELEASE=""
7892          HOTSPOT_DEBUG_LEVEL="product"
7893          HOTSPOT_EXPORT="product"
7894           ;;
7895      fastdebug )
7896          VARIANT="DBG"
7897          FASTDEBUG="true"
7898          DEBUG_CLASSFILES="true"
7899          BUILD_VARIANT_RELEASE="-fastdebug"
7900          HOTSPOT_DEBUG_LEVEL="fastdebug"
7901          HOTSPOT_EXPORT="fastdebug"
7902           ;;
7903      slowdebug )
7904          VARIANT="DBG"
7905          FASTDEBUG="false"
7906          DEBUG_CLASSFILES="true"
7907          BUILD_VARIANT_RELEASE="-debug"
7908          HOTSPOT_DEBUG_LEVEL="jvmg"
7909          HOTSPOT_EXPORT="debug"
7910           ;;
7911esac
7912
7913#####
7914# Generate the legacy makefile targets for hotspot.
7915# The hotspot api for selecting the build artifacts, really, needs to be improved.
7916# JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
7917# determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
7918# But until then ...
7919HOTSPOT_TARGET=""
7920
7921if test "x$JVM_VARIANT_SERVER" = xtrue; then
7922    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
7923fi
7924
7925if test "x$JVM_VARIANT_CLIENT" = xtrue; then
7926    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
7927fi
7928
7929if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
7930    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
7931fi
7932
7933if test "x$JVM_VARIANT_KERNEL" = xtrue; then
7934    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
7935fi
7936
7937if test "x$JVM_VARIANT_ZERO" = xtrue; then
7938    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
7939fi
7940
7941if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
7942    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
7943fi
7944
7945HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
7946
7947# On Macosx universal binaries are produced, but they only contain
7948# 64 bit intel. This invalidates control of which jvms are built
7949# from configure, but only server is valid anyway. Fix this
7950# when hotspot makefiles are rewritten.
7951if test "x$MACOSX_UNIVERSAL" = xtrue; then
7952    HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
7953fi
7954
7955#####
7956
7957
7958
7959
7960
7961
7962
7963
7964# With basic setup done, call the custom early hook.
7965
7966
7967# To properly create a configuration name, we need to have the OpenJDK target
7968# and options (variants and debug level) parsed.
7969
7970
7971
7972# Check whether --with-conf-name was given.
7973if test "${with_conf_name+set}" = set; then :
7974  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
7975fi
7976
7977
7978# Test from where we are running configure, in or outside of src root.
7979if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
7980        || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
7981        || test "x$CURDIR" = "x$SRC_ROOT/common/makefiles" ; then
7982    # We are running configure from the src root.
7983    # Create a default ./build/target-variant-debuglevel output root.
7984    if test "x${CONF_NAME}" = x; then
7985        CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
7986    fi
7987    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
7988    $MKDIR -p "$OUTPUT_ROOT"
7989    if test ! -d "$OUTPUT_ROOT"; then
7990        as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
7991    fi
7992else
7993    # We are running configure from outside of the src dir.
7994    # Then use the current directory as output dir!
7995    # If configuration is situated in normal build directory, just use the build
7996    # directory name as configuration name, otherwise use the complete path.
7997    if test "x${CONF_NAME}" = x; then
7998        CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
7999    fi
8000    OUTPUT_ROOT="$CURDIR"
8001
8002    # WARNING: This might be a bad thing to do. You need to be sure you want to
8003    # have a configuration in this directory. Do some sanity checks!
8004
8005    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
8006      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
8007      # other files
8008      files_present=`$LS $OUTPUT_ROOT`
8009      # Configure has already touched config.log and confdefs.h in the current dir when this check
8010      # is performed.
8011      filtered_files=`$ECHO "$files_present" | $SED -e 's/config.log//g' -e 's/confdefs.h//g' -e 's/ //g' \
8012                                             | $TR -d '\n'`
8013      if test "x$filtered_files" != x; then
8014        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
8015$as_echo "$as_me: Current directory is $CURDIR." >&6;}
8016        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
8017$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
8018        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
8019$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
8020        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
8021$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
8022        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
8023$as_echo "$as_me: seriously mess up just about everything." >&6;}
8024        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
8025$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
8026        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
8027$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
8028        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
8029      fi
8030    fi
8031fi
8032{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
8033$as_echo_n "checking what configuration name to use... " >&6; }
8034{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
8035$as_echo "$CONF_NAME" >&6; }
8036
8037
8038  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8039
8040  # Input might be given as Windows format, start by converting to
8041  # unix format.
8042  path="$OUTPUT_ROOT"
8043  new_path=`$CYGPATH -u "$path"`
8044
8045  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8046  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8047  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8048  # "foo.exe" is OK but "foo" is an error.
8049  #
8050  # This test is therefore slightly more accurate than "test -f" to check for file precense.
8051  # It is also a way to make sure we got the proper file name for the real test later on.
8052  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8053  if test "x$test_shortpath" = x; then
8054    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
8055$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
8056    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
8057  fi
8058
8059  # Call helper function which possibly converts this using DOS-style short mode.
8060  # If so, the updated path is stored in $new_path.
8061
8062  input_path="$new_path"
8063  # Check if we need to convert this using DOS-style short mode. If the path
8064  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8065  # take no chances and rewrite it.
8066  # Note: m4 eats our [], so we need to use [ and ] instead.
8067  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8068  if test "x$has_forbidden_chars" != x; then
8069    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8070    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8071    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8072    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8073      # Going to short mode and back again did indeed matter. Since short mode is
8074      # case insensitive, let's make it lowercase to improve readability.
8075      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8076      # Now convert it back to Unix-stile (cygpath)
8077      input_path=`$CYGPATH -u "$shortmode_path"`
8078      new_path="$input_path"
8079    fi
8080  fi
8081
8082  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8083  if test "x$test_cygdrive_prefix" = x; then
8084    # As a simple fix, exclude /usr/bin since it's not a real path.
8085    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
8086      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8087      # a path prefixed by /cygdrive for fixpath to work.
8088      new_path="$CYGWIN_ROOT_PATH$input_path"
8089    fi
8090  fi
8091
8092
8093  if test "x$path" != "x$new_path"; then
8094    OUTPUT_ROOT="$new_path"
8095    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
8096$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
8097  fi
8098
8099  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8100
8101  path="$OUTPUT_ROOT"
8102  has_colon=`$ECHO $path | $GREP ^.:`
8103  new_path="$path"
8104  if test "x$has_colon" = x; then
8105    # Not in mixed or Windows style, start by that.
8106    new_path=`cmd //c echo $path`
8107  fi
8108
8109
8110  input_path="$new_path"
8111  # Check if we need to convert this using DOS-style short mode. If the path
8112  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8113  # take no chances and rewrite it.
8114  # Note: m4 eats our [], so we need to use [ and ] instead.
8115  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8116  if test "x$has_forbidden_chars" != x; then
8117    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8118    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8119  fi
8120
8121
8122  windows_path="$new_path"
8123  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8124    unix_path=`$CYGPATH -u "$windows_path"`
8125    new_path="$unix_path"
8126  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8127    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8128    new_path="$unix_path"
8129  fi
8130
8131  if test "x$path" != "x$new_path"; then
8132    OUTPUT_ROOT="$new_path"
8133    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
8134$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
8135  fi
8136
8137  # Save the first 10 bytes of this path to the storage, so fixpath can work.
8138  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8139
8140  else
8141    # We're on a posix platform. Hooray! :)
8142    path="$OUTPUT_ROOT"
8143    has_space=`$ECHO "$path" | $GREP " "`
8144    if test "x$has_space" != x; then
8145      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
8146$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
8147      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
8148    fi
8149
8150    # Use eval to expand a potential ~
8151    eval path="$path"
8152    if test ! -f "$path" && test ! -d "$path"; then
8153      as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
8154    fi
8155
8156    OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
8157  fi
8158
8159
8160SPEC=$OUTPUT_ROOT/spec.gmk
8161
8162CONF_NAME=$CONF_NAME
8163
8164OUTPUT_ROOT=$OUTPUT_ROOT
8165
8166
8167# Most of the probed defines are put into config.h
8168ac_config_headers="$ac_config_headers $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in"
8169
8170# The spec.gmk file contains all variables for the make system.
8171ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
8172
8173# The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
8174ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
8175
8176# The bootcycle-spec.gmk file contains support for boot cycle builds.
8177ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
8178
8179# The compare.sh is used to compare the build output to other builds.
8180ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
8181
8182# Spec.sh is currently used by compare-objects.sh
8183ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in"
8184
8185# The generated Makefile knows where the spec.gmk is and where the source is.
8186# You can run make from the OUTPUT_ROOT, or from the top-level Makefile
8187# which will look for generated configurations
8188ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
8189
8190
8191# Save the arguments given to us
8192echo "$CONFIGURE_COMMAND_LINE" > $OUTPUT_ROOT/configure-arguments
8193
8194
8195# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
8196
8197    for ac_prog in apt-get yum port pkgutil pkgadd
8198do
8199  # Extract the first word of "$ac_prog", so it can be a program name with args.
8200set dummy $ac_prog; ac_word=$2
8201{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8202$as_echo_n "checking for $ac_word... " >&6; }
8203if ${ac_cv_prog_PKGHANDLER+:} false; then :
8204  $as_echo_n "(cached) " >&6
8205else
8206  if test -n "$PKGHANDLER"; then
8207  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
8208else
8209as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8210for as_dir in $PATH
8211do
8212  IFS=$as_save_IFS
8213  test -z "$as_dir" && as_dir=.
8214    for ac_exec_ext in '' $ac_executable_extensions; do
8215  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8216    ac_cv_prog_PKGHANDLER="$ac_prog"
8217    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8218    break 2
8219  fi
8220done
8221  done
8222IFS=$as_save_IFS
8223
8224fi
8225fi
8226PKGHANDLER=$ac_cv_prog_PKGHANDLER
8227if test -n "$PKGHANDLER"; then
8228  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
8229$as_echo "$PKGHANDLER" >&6; }
8230else
8231  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8232$as_echo "no" >&6; }
8233fi
8234
8235
8236  test -n "$PKGHANDLER" && break
8237done
8238
8239
8240
8241# Setup tools that requires more complex handling, or that is not needed by the configure script.
8242
8243
8244  # We need to find a recent version of GNU make. Especially on Solaris, this can be tricky.
8245  if test "x$MAKE" != x; then
8246    # User has supplied a make, test it.
8247    if test ! -f "$MAKE"; then
8248      as_fn_error $? "The specified make (by MAKE=$MAKE) is not found." "$LINENO" 5
8249    fi
8250
8251  MAKE_CANDIDATE=""$MAKE""
8252  DESCRIPTION="user supplied MAKE=$MAKE"
8253  if test "x$MAKE_CANDIDATE" != x; then
8254    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8255$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8256    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8257    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8258    if test "x$IS_GNU_MAKE" = x; then
8259      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8260$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8261    else
8262      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8263      if test "x$IS_MODERN_MAKE" = x; then
8264        { $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
8265$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;}
8266      else
8267        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8268          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8269            MAKE_EXPECTED_ENV='cygwin'
8270          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8271            MAKE_EXPECTED_ENV='msys'
8272          else
8273            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8274          fi
8275          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8276          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8277        else
8278          # Not relevant for non-Windows
8279          IS_MAKE_CORRECT_ENV=true
8280        fi
8281        if test "x$IS_MAKE_CORRECT_ENV" = x; then
8282          { $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
8283$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;}
8284        else
8285          FOUND_MAKE=$MAKE_CANDIDATE
8286
8287  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8288
8289  # First separate the path from the arguments. This will split at the first
8290  # space.
8291  complete="$FOUND_MAKE"
8292  path="${complete%% *}"
8293  tmp="$complete EOL"
8294  arguments="${tmp#* }"
8295
8296  # Input might be given as Windows format, start by converting to
8297  # unix format.
8298  new_path=`$CYGPATH -u "$path"`
8299
8300  # Now try to locate executable using which
8301  new_path=`$WHICH "$new_path" 2> /dev/null`
8302  # bat and cmd files are not always considered executable in cygwin causing which
8303  # to not find them
8304  if test "x$new_path" = x \
8305           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8306           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8307    new_path=`$CYGPATH -u "$path"`
8308  fi
8309  if test "x$new_path" = x; then
8310    # Oops. Which didn't find the executable.
8311    # The splitting of arguments from the executable at a space might have been incorrect,
8312    # since paths with space are more likely in Windows. Give it another try with the whole
8313    # argument.
8314    path="$complete"
8315    arguments="EOL"
8316    new_path=`$CYGPATH -u "$path"`
8317    new_path=`$WHICH "$new_path" 2> /dev/null`
8318    # bat and cmd files are not always considered executable in cygwin causing which
8319    # to not find them
8320    if test "x$new_path" = x \
8321             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8322             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8323      new_path=`$CYGPATH -u "$path"`
8324    fi
8325    if test "x$new_path" = x; then
8326      # It's still not found. Now this is an unrecoverable error.
8327      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8328$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8329      has_space=`$ECHO "$complete" | $GREP " "`
8330      if test "x$has_space" != x; then
8331        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8332$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8333      fi
8334      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8335    fi
8336  fi
8337
8338  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8339  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8340  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8341  # "foo.exe" is OK but "foo" is an error.
8342  #
8343  # This test is therefore slightly more accurate than "test -f" to check for file precense.
8344  # It is also a way to make sure we got the proper file name for the real test later on.
8345  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8346  if test "x$test_shortpath" = x; then
8347    # Short path failed, file does not exist as specified.
8348    # Try adding .exe or .cmd
8349    if test -f "${new_path}.exe"; then
8350       input_to_shortpath="${new_path}.exe"
8351    elif test -f "${new_path}.cmd"; then
8352       input_to_shortpath="${new_path}.cmd"
8353    else
8354      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8355$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8356      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8357$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8358      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8359    fi
8360  else
8361    input_to_shortpath="$new_path"
8362  fi
8363
8364  # Call helper function which possibly converts this using DOS-style short mode.
8365  # If so, the updated path is stored in $new_path.
8366  new_path="$input_to_shortpath"
8367
8368  input_path="$input_to_shortpath"
8369  # Check if we need to convert this using DOS-style short mode. If the path
8370  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8371  # take no chances and rewrite it.
8372  # Note: m4 eats our [], so we need to use [ and ] instead.
8373  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8374  if test "x$has_forbidden_chars" != x; then
8375    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8376    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8377    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8378    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8379      # Going to short mode and back again did indeed matter. Since short mode is
8380      # case insensitive, let's make it lowercase to improve readability.
8381      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8382      # Now convert it back to Unix-stile (cygpath)
8383      input_path=`$CYGPATH -u "$shortmode_path"`
8384      new_path="$input_path"
8385    fi
8386  fi
8387
8388  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8389  if test "x$test_cygdrive_prefix" = x; then
8390    # As a simple fix, exclude /usr/bin since it's not a real path.
8391    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8392      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8393      # a path prefixed by /cygdrive for fixpath to work.
8394      new_path="$CYGWIN_ROOT_PATH$input_path"
8395    fi
8396  fi
8397
8398  # remove trailing .exe if any
8399  new_path="${new_path/%.exe/}"
8400
8401  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8402
8403  # First separate the path from the arguments. This will split at the first
8404  # space.
8405  complete="$FOUND_MAKE"
8406  path="${complete%% *}"
8407  tmp="$complete EOL"
8408  arguments="${tmp#* }"
8409
8410  # Input might be given as Windows format, start by converting to
8411  # unix format.
8412  new_path="$path"
8413
8414  windows_path="$new_path"
8415  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8416    unix_path=`$CYGPATH -u "$windows_path"`
8417    new_path="$unix_path"
8418  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8419    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8420    new_path="$unix_path"
8421  fi
8422
8423
8424  # Now try to locate executable using which
8425  new_path=`$WHICH "$new_path" 2> /dev/null`
8426
8427  if test "x$new_path" = x; then
8428    # Oops. Which didn't find the executable.
8429    # The splitting of arguments from the executable at a space might have been incorrect,
8430    # since paths with space are more likely in Windows. Give it another try with the whole
8431    # argument.
8432    path="$complete"
8433    arguments="EOL"
8434    new_path="$path"
8435
8436  windows_path="$new_path"
8437  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8438    unix_path=`$CYGPATH -u "$windows_path"`
8439    new_path="$unix_path"
8440  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8441    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8442    new_path="$unix_path"
8443  fi
8444
8445
8446    new_path=`$WHICH "$new_path" 2> /dev/null`
8447
8448    if test "x$new_path" = x; then
8449      # It's still not found. Now this is an unrecoverable error.
8450      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8451$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8452      has_space=`$ECHO "$complete" | $GREP " "`
8453      if test "x$has_space" != x; then
8454        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8455$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8456      fi
8457      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8458    fi
8459  fi
8460
8461  # Now new_path has a complete unix path to the binary
8462  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8463    # Keep paths in /bin as-is, but remove trailing .exe if any
8464    new_path="${new_path/%.exe/}"
8465    # Do not save /bin paths to all_fixpath_prefixes!
8466  else
8467    # Not in mixed or Windows style, start by that.
8468    new_path=`cmd //c echo $new_path`
8469
8470  input_path="$new_path"
8471  # Check if we need to convert this using DOS-style short mode. If the path
8472  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8473  # take no chances and rewrite it.
8474  # Note: m4 eats our [], so we need to use [ and ] instead.
8475  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8476  if test "x$has_forbidden_chars" != x; then
8477    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8478    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8479  fi
8480
8481    # Output is in $new_path
8482
8483  windows_path="$new_path"
8484  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8485    unix_path=`$CYGPATH -u "$windows_path"`
8486    new_path="$unix_path"
8487  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8488    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8489    new_path="$unix_path"
8490  fi
8491
8492    # remove trailing .exe if any
8493    new_path="${new_path/%.exe/}"
8494
8495    # Save the first 10 bytes of this path to the storage, so fixpath can work.
8496    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8497  fi
8498
8499  else
8500    # We're on a posix platform. Hooray! :)
8501    # First separate the path from the arguments. This will split at the first
8502    # space.
8503    complete="$FOUND_MAKE"
8504    path="${complete%% *}"
8505    tmp="$complete EOL"
8506    arguments="${tmp#* }"
8507
8508    # Cannot rely on the command "which" here since it doesn't always work.
8509    is_absolute_path=`$ECHO "$path" | $GREP ^/`
8510    if test -z "$is_absolute_path"; then
8511      # Path to executable is not absolute. Find it.
8512      IFS_save="$IFS"
8513      IFS=:
8514      for p in $PATH; do
8515        if test -f "$p/$path" && test -x "$p/$path"; then
8516          new_path="$p/$path"
8517          break
8518        fi
8519      done
8520      IFS="$IFS_save"
8521    else
8522      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
8523$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
8524      new_path="$path"
8525    fi
8526
8527    if test "x$new_path" = x; then
8528        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8529$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8530        has_space=`$ECHO "$complete" | $GREP " "`
8531        if test "x$has_space" != x; then
8532          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
8533$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
8534        fi
8535        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8536      fi
8537  fi
8538
8539      # Now join together the path and the arguments once again
8540      if test "x$arguments" != xEOL; then
8541        new_complete="$new_path ${arguments% *}"
8542      else
8543        new_complete="$new_path"
8544      fi
8545
8546  if test "x$complete" != "x$new_complete"; then
8547      FOUND_MAKE="$new_complete"
8548      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
8549$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
8550    fi
8551
8552        fi
8553      fi
8554    fi
8555  fi
8556
8557    if test "x$FOUND_MAKE" = x; then
8558      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make 3.81 or newer." "$LINENO" 5
8559    fi
8560  else
8561    # Try our hardest to locate a correct version of GNU make
8562    for ac_prog in gmake
8563do
8564  # Extract the first word of "$ac_prog", so it can be a program name with args.
8565set dummy $ac_prog; ac_word=$2
8566{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8567$as_echo_n "checking for $ac_word... " >&6; }
8568if ${ac_cv_path_CHECK_GMAKE+:} false; then :
8569  $as_echo_n "(cached) " >&6
8570else
8571  case $CHECK_GMAKE in
8572  [\\/]* | ?:[\\/]*)
8573  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
8574  ;;
8575  *)
8576  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8577for as_dir in $PATH
8578do
8579  IFS=$as_save_IFS
8580  test -z "$as_dir" && as_dir=.
8581    for ac_exec_ext in '' $ac_executable_extensions; do
8582  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8583    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
8584    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8585    break 2
8586  fi
8587done
8588  done
8589IFS=$as_save_IFS
8590
8591  ;;
8592esac
8593fi
8594CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
8595if test -n "$CHECK_GMAKE"; then
8596  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
8597$as_echo "$CHECK_GMAKE" >&6; }
8598else
8599  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8600$as_echo "no" >&6; }
8601fi
8602
8603
8604  test -n "$CHECK_GMAKE" && break
8605done
8606
8607
8608  MAKE_CANDIDATE=""$CHECK_GMAKE""
8609  DESCRIPTION="gmake in PATH"
8610  if test "x$MAKE_CANDIDATE" != x; then
8611    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8612$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8613    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8614    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8615    if test "x$IS_GNU_MAKE" = x; then
8616      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8617$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8618    else
8619      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8620      if test "x$IS_MODERN_MAKE" = x; then
8621        { $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
8622$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;}
8623      else
8624        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8625          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8626            MAKE_EXPECTED_ENV='cygwin'
8627          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8628            MAKE_EXPECTED_ENV='msys'
8629          else
8630            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8631          fi
8632          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8633          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8634        else
8635          # Not relevant for non-Windows
8636          IS_MAKE_CORRECT_ENV=true
8637        fi
8638        if test "x$IS_MAKE_CORRECT_ENV" = x; then
8639          { $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
8640$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;}
8641        else
8642          FOUND_MAKE=$MAKE_CANDIDATE
8643
8644  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8645
8646  # First separate the path from the arguments. This will split at the first
8647  # space.
8648  complete="$FOUND_MAKE"
8649  path="${complete%% *}"
8650  tmp="$complete EOL"
8651  arguments="${tmp#* }"
8652
8653  # Input might be given as Windows format, start by converting to
8654  # unix format.
8655  new_path=`$CYGPATH -u "$path"`
8656
8657  # Now try to locate executable using which
8658  new_path=`$WHICH "$new_path" 2> /dev/null`
8659  # bat and cmd files are not always considered executable in cygwin causing which
8660  # to not find them
8661  if test "x$new_path" = x \
8662           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8663           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8664    new_path=`$CYGPATH -u "$path"`
8665  fi
8666  if test "x$new_path" = x; then
8667    # Oops. Which didn't find the executable.
8668    # The splitting of arguments from the executable at a space might have been incorrect,
8669    # since paths with space are more likely in Windows. Give it another try with the whole
8670    # argument.
8671    path="$complete"
8672    arguments="EOL"
8673    new_path=`$CYGPATH -u "$path"`
8674    new_path=`$WHICH "$new_path" 2> /dev/null`
8675    # bat and cmd files are not always considered executable in cygwin causing which
8676    # to not find them
8677    if test "x$new_path" = x \
8678             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8679             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8680      new_path=`$CYGPATH -u "$path"`
8681    fi
8682    if test "x$new_path" = x; then
8683      # It's still not found. Now this is an unrecoverable error.
8684      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8685$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8686      has_space=`$ECHO "$complete" | $GREP " "`
8687      if test "x$has_space" != x; then
8688        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8689$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8690      fi
8691      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8692    fi
8693  fi
8694
8695  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8696  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8697  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8698  # "foo.exe" is OK but "foo" is an error.
8699  #
8700  # This test is therefore slightly more accurate than "test -f" to check for file precense.
8701  # It is also a way to make sure we got the proper file name for the real test later on.
8702  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8703  if test "x$test_shortpath" = x; then
8704    # Short path failed, file does not exist as specified.
8705    # Try adding .exe or .cmd
8706    if test -f "${new_path}.exe"; then
8707       input_to_shortpath="${new_path}.exe"
8708    elif test -f "${new_path}.cmd"; then
8709       input_to_shortpath="${new_path}.cmd"
8710    else
8711      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8712$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8713      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8714$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8715      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8716    fi
8717  else
8718    input_to_shortpath="$new_path"
8719  fi
8720
8721  # Call helper function which possibly converts this using DOS-style short mode.
8722  # If so, the updated path is stored in $new_path.
8723  new_path="$input_to_shortpath"
8724
8725  input_path="$input_to_shortpath"
8726  # Check if we need to convert this using DOS-style short mode. If the path
8727  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8728  # take no chances and rewrite it.
8729  # Note: m4 eats our [], so we need to use [ and ] instead.
8730  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8731  if test "x$has_forbidden_chars" != x; then
8732    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8733    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8734    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8735    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8736      # Going to short mode and back again did indeed matter. Since short mode is
8737      # case insensitive, let's make it lowercase to improve readability.
8738      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8739      # Now convert it back to Unix-stile (cygpath)
8740      input_path=`$CYGPATH -u "$shortmode_path"`
8741      new_path="$input_path"
8742    fi
8743  fi
8744
8745  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8746  if test "x$test_cygdrive_prefix" = x; then
8747    # As a simple fix, exclude /usr/bin since it's not a real path.
8748    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8749      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8750      # a path prefixed by /cygdrive for fixpath to work.
8751      new_path="$CYGWIN_ROOT_PATH$input_path"
8752    fi
8753  fi
8754
8755  # remove trailing .exe if any
8756  new_path="${new_path/%.exe/}"
8757
8758  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8759
8760  # First separate the path from the arguments. This will split at the first
8761  # space.
8762  complete="$FOUND_MAKE"
8763  path="${complete%% *}"
8764  tmp="$complete EOL"
8765  arguments="${tmp#* }"
8766
8767  # Input might be given as Windows format, start by converting to
8768  # unix format.
8769  new_path="$path"
8770
8771  windows_path="$new_path"
8772  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8773    unix_path=`$CYGPATH -u "$windows_path"`
8774    new_path="$unix_path"
8775  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8776    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8777    new_path="$unix_path"
8778  fi
8779
8780
8781  # Now try to locate executable using which
8782  new_path=`$WHICH "$new_path" 2> /dev/null`
8783
8784  if test "x$new_path" = x; then
8785    # Oops. Which didn't find the executable.
8786    # The splitting of arguments from the executable at a space might have been incorrect,
8787    # since paths with space are more likely in Windows. Give it another try with the whole
8788    # argument.
8789    path="$complete"
8790    arguments="EOL"
8791    new_path="$path"
8792
8793  windows_path="$new_path"
8794  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8795    unix_path=`$CYGPATH -u "$windows_path"`
8796    new_path="$unix_path"
8797  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8798    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8799    new_path="$unix_path"
8800  fi
8801
8802
8803    new_path=`$WHICH "$new_path" 2> /dev/null`
8804
8805    if test "x$new_path" = x; then
8806      # It's still not found. Now this is an unrecoverable error.
8807      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8808$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8809      has_space=`$ECHO "$complete" | $GREP " "`
8810      if test "x$has_space" != x; then
8811        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8812$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8813      fi
8814      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8815    fi
8816  fi
8817
8818  # Now new_path has a complete unix path to the binary
8819  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8820    # Keep paths in /bin as-is, but remove trailing .exe if any
8821    new_path="${new_path/%.exe/}"
8822    # Do not save /bin paths to all_fixpath_prefixes!
8823  else
8824    # Not in mixed or Windows style, start by that.
8825    new_path=`cmd //c echo $new_path`
8826
8827  input_path="$new_path"
8828  # Check if we need to convert this using DOS-style short mode. If the path
8829  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8830  # take no chances and rewrite it.
8831  # Note: m4 eats our [], so we need to use [ and ] instead.
8832  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8833  if test "x$has_forbidden_chars" != x; then
8834    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8835    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8836  fi
8837
8838    # Output is in $new_path
8839
8840  windows_path="$new_path"
8841  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8842    unix_path=`$CYGPATH -u "$windows_path"`
8843    new_path="$unix_path"
8844  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8845    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8846    new_path="$unix_path"
8847  fi
8848
8849    # remove trailing .exe if any
8850    new_path="${new_path/%.exe/}"
8851
8852    # Save the first 10 bytes of this path to the storage, so fixpath can work.
8853    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8854  fi
8855
8856  else
8857    # We're on a posix platform. Hooray! :)
8858    # First separate the path from the arguments. This will split at the first
8859    # space.
8860    complete="$FOUND_MAKE"
8861    path="${complete%% *}"
8862    tmp="$complete EOL"
8863    arguments="${tmp#* }"
8864
8865    # Cannot rely on the command "which" here since it doesn't always work.
8866    is_absolute_path=`$ECHO "$path" | $GREP ^/`
8867    if test -z "$is_absolute_path"; then
8868      # Path to executable is not absolute. Find it.
8869      IFS_save="$IFS"
8870      IFS=:
8871      for p in $PATH; do
8872        if test -f "$p/$path" && test -x "$p/$path"; then
8873          new_path="$p/$path"
8874          break
8875        fi
8876      done
8877      IFS="$IFS_save"
8878    else
8879      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
8880$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
8881      new_path="$path"
8882    fi
8883
8884    if test "x$new_path" = x; then
8885        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8886$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8887        has_space=`$ECHO "$complete" | $GREP " "`
8888        if test "x$has_space" != x; then
8889          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
8890$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
8891        fi
8892        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8893      fi
8894  fi
8895
8896      # Now join together the path and the arguments once again
8897      if test "x$arguments" != xEOL; then
8898        new_complete="$new_path ${arguments% *}"
8899      else
8900        new_complete="$new_path"
8901      fi
8902
8903  if test "x$complete" != "x$new_complete"; then
8904      FOUND_MAKE="$new_complete"
8905      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
8906$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
8907    fi
8908
8909        fi
8910      fi
8911    fi
8912  fi
8913
8914
8915    if test "x$FOUND_MAKE" = x; then
8916      for ac_prog in make
8917do
8918  # Extract the first word of "$ac_prog", so it can be a program name with args.
8919set dummy $ac_prog; ac_word=$2
8920{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8921$as_echo_n "checking for $ac_word... " >&6; }
8922if ${ac_cv_path_CHECK_MAKE+:} false; then :
8923  $as_echo_n "(cached) " >&6
8924else
8925  case $CHECK_MAKE in
8926  [\\/]* | ?:[\\/]*)
8927  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
8928  ;;
8929  *)
8930  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8931for as_dir in $PATH
8932do
8933  IFS=$as_save_IFS
8934  test -z "$as_dir" && as_dir=.
8935    for ac_exec_ext in '' $ac_executable_extensions; do
8936  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8937    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
8938    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8939    break 2
8940  fi
8941done
8942  done
8943IFS=$as_save_IFS
8944
8945  ;;
8946esac
8947fi
8948CHECK_MAKE=$ac_cv_path_CHECK_MAKE
8949if test -n "$CHECK_MAKE"; then
8950  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
8951$as_echo "$CHECK_MAKE" >&6; }
8952else
8953  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8954$as_echo "no" >&6; }
8955fi
8956
8957
8958  test -n "$CHECK_MAKE" && break
8959done
8960
8961
8962  MAKE_CANDIDATE=""$CHECK_MAKE""
8963  DESCRIPTION="make in PATH"
8964  if test "x$MAKE_CANDIDATE" != x; then
8965    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8966$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8967    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8968    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8969    if test "x$IS_GNU_MAKE" = x; then
8970      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8971$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8972    else
8973      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8974      if test "x$IS_MODERN_MAKE" = x; then
8975        { $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
8976$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;}
8977      else
8978        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8979          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8980            MAKE_EXPECTED_ENV='cygwin'
8981          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8982            MAKE_EXPECTED_ENV='msys'
8983          else
8984            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8985          fi
8986          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8987          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8988        else
8989          # Not relevant for non-Windows
8990          IS_MAKE_CORRECT_ENV=true
8991        fi
8992        if test "x$IS_MAKE_CORRECT_ENV" = x; then
8993          { $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
8994$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;}
8995        else
8996          FOUND_MAKE=$MAKE_CANDIDATE
8997
8998  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8999
9000  # First separate the path from the arguments. This will split at the first
9001  # space.
9002  complete="$FOUND_MAKE"
9003  path="${complete%% *}"
9004  tmp="$complete EOL"
9005  arguments="${tmp#* }"
9006
9007  # Input might be given as Windows format, start by converting to
9008  # unix format.
9009  new_path=`$CYGPATH -u "$path"`
9010
9011  # Now try to locate executable using which
9012  new_path=`$WHICH "$new_path" 2> /dev/null`
9013  # bat and cmd files are not always considered executable in cygwin causing which
9014  # to not find them
9015  if test "x$new_path" = x \
9016           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9017           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9018    new_path=`$CYGPATH -u "$path"`
9019  fi
9020  if test "x$new_path" = x; then
9021    # Oops. Which didn't find the executable.
9022    # The splitting of arguments from the executable at a space might have been incorrect,
9023    # since paths with space are more likely in Windows. Give it another try with the whole
9024    # argument.
9025    path="$complete"
9026    arguments="EOL"
9027    new_path=`$CYGPATH -u "$path"`
9028    new_path=`$WHICH "$new_path" 2> /dev/null`
9029    # bat and cmd files are not always considered executable in cygwin causing which
9030    # to not find them
9031    if test "x$new_path" = x \
9032             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9033             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9034      new_path=`$CYGPATH -u "$path"`
9035    fi
9036    if test "x$new_path" = x; then
9037      # It's still not found. Now this is an unrecoverable error.
9038      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9039$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9040      has_space=`$ECHO "$complete" | $GREP " "`
9041      if test "x$has_space" != x; then
9042        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9043$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9044      fi
9045      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9046    fi
9047  fi
9048
9049  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9050  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9051  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9052  # "foo.exe" is OK but "foo" is an error.
9053  #
9054  # This test is therefore slightly more accurate than "test -f" to check for file precense.
9055  # It is also a way to make sure we got the proper file name for the real test later on.
9056  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9057  if test "x$test_shortpath" = x; then
9058    # Short path failed, file does not exist as specified.
9059    # Try adding .exe or .cmd
9060    if test -f "${new_path}.exe"; then
9061       input_to_shortpath="${new_path}.exe"
9062    elif test -f "${new_path}.cmd"; then
9063       input_to_shortpath="${new_path}.cmd"
9064    else
9065      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9066$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9067      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9068$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9069      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9070    fi
9071  else
9072    input_to_shortpath="$new_path"
9073  fi
9074
9075  # Call helper function which possibly converts this using DOS-style short mode.
9076  # If so, the updated path is stored in $new_path.
9077  new_path="$input_to_shortpath"
9078
9079  input_path="$input_to_shortpath"
9080  # Check if we need to convert this using DOS-style short mode. If the path
9081  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9082  # take no chances and rewrite it.
9083  # Note: m4 eats our [], so we need to use [ and ] instead.
9084  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9085  if test "x$has_forbidden_chars" != x; then
9086    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9087    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9088    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9089    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9090      # Going to short mode and back again did indeed matter. Since short mode is
9091      # case insensitive, let's make it lowercase to improve readability.
9092      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9093      # Now convert it back to Unix-stile (cygpath)
9094      input_path=`$CYGPATH -u "$shortmode_path"`
9095      new_path="$input_path"
9096    fi
9097  fi
9098
9099  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9100  if test "x$test_cygdrive_prefix" = x; then
9101    # As a simple fix, exclude /usr/bin since it's not a real path.
9102    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9103      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9104      # a path prefixed by /cygdrive for fixpath to work.
9105      new_path="$CYGWIN_ROOT_PATH$input_path"
9106    fi
9107  fi
9108
9109  # remove trailing .exe if any
9110  new_path="${new_path/%.exe/}"
9111
9112  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9113
9114  # First separate the path from the arguments. This will split at the first
9115  # space.
9116  complete="$FOUND_MAKE"
9117  path="${complete%% *}"
9118  tmp="$complete EOL"
9119  arguments="${tmp#* }"
9120
9121  # Input might be given as Windows format, start by converting to
9122  # unix format.
9123  new_path="$path"
9124
9125  windows_path="$new_path"
9126  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9127    unix_path=`$CYGPATH -u "$windows_path"`
9128    new_path="$unix_path"
9129  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9130    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9131    new_path="$unix_path"
9132  fi
9133
9134
9135  # Now try to locate executable using which
9136  new_path=`$WHICH "$new_path" 2> /dev/null`
9137
9138  if test "x$new_path" = x; then
9139    # Oops. Which didn't find the executable.
9140    # The splitting of arguments from the executable at a space might have been incorrect,
9141    # since paths with space are more likely in Windows. Give it another try with the whole
9142    # argument.
9143    path="$complete"
9144    arguments="EOL"
9145    new_path="$path"
9146
9147  windows_path="$new_path"
9148  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9149    unix_path=`$CYGPATH -u "$windows_path"`
9150    new_path="$unix_path"
9151  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9152    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9153    new_path="$unix_path"
9154  fi
9155
9156
9157    new_path=`$WHICH "$new_path" 2> /dev/null`
9158
9159    if test "x$new_path" = x; then
9160      # It's still not found. Now this is an unrecoverable error.
9161      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9162$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9163      has_space=`$ECHO "$complete" | $GREP " "`
9164      if test "x$has_space" != x; then
9165        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9166$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9167      fi
9168      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9169    fi
9170  fi
9171
9172  # Now new_path has a complete unix path to the binary
9173  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9174    # Keep paths in /bin as-is, but remove trailing .exe if any
9175    new_path="${new_path/%.exe/}"
9176    # Do not save /bin paths to all_fixpath_prefixes!
9177  else
9178    # Not in mixed or Windows style, start by that.
9179    new_path=`cmd //c echo $new_path`
9180
9181  input_path="$new_path"
9182  # Check if we need to convert this using DOS-style short mode. If the path
9183  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9184  # take no chances and rewrite it.
9185  # Note: m4 eats our [], so we need to use [ and ] instead.
9186  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9187  if test "x$has_forbidden_chars" != x; then
9188    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9189    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9190  fi
9191
9192    # Output is in $new_path
9193
9194  windows_path="$new_path"
9195  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9196    unix_path=`$CYGPATH -u "$windows_path"`
9197    new_path="$unix_path"
9198  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9199    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9200    new_path="$unix_path"
9201  fi
9202
9203    # remove trailing .exe if any
9204    new_path="${new_path/%.exe/}"
9205
9206    # Save the first 10 bytes of this path to the storage, so fixpath can work.
9207    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9208  fi
9209
9210  else
9211    # We're on a posix platform. Hooray! :)
9212    # First separate the path from the arguments. This will split at the first
9213    # space.
9214    complete="$FOUND_MAKE"
9215    path="${complete%% *}"
9216    tmp="$complete EOL"
9217    arguments="${tmp#* }"
9218
9219    # Cannot rely on the command "which" here since it doesn't always work.
9220    is_absolute_path=`$ECHO "$path" | $GREP ^/`
9221    if test -z "$is_absolute_path"; then
9222      # Path to executable is not absolute. Find it.
9223      IFS_save="$IFS"
9224      IFS=:
9225      for p in $PATH; do
9226        if test -f "$p/$path" && test -x "$p/$path"; then
9227          new_path="$p/$path"
9228          break
9229        fi
9230      done
9231      IFS="$IFS_save"
9232    else
9233      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9234$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9235      new_path="$path"
9236    fi
9237
9238    if test "x$new_path" = x; then
9239        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9240$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9241        has_space=`$ECHO "$complete" | $GREP " "`
9242        if test "x$has_space" != x; then
9243          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9244$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9245        fi
9246        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9247      fi
9248  fi
9249
9250      # Now join together the path and the arguments once again
9251      if test "x$arguments" != xEOL; then
9252        new_complete="$new_path ${arguments% *}"
9253      else
9254        new_complete="$new_path"
9255      fi
9256
9257  if test "x$complete" != "x$new_complete"; then
9258      FOUND_MAKE="$new_complete"
9259      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9260$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9261    fi
9262
9263        fi
9264      fi
9265    fi
9266  fi
9267
9268    fi
9269
9270    if test "x$FOUND_MAKE" = x; then
9271      if test "x$TOOLS_DIR" != x; then
9272        # We have a tools-dir, check that as well before giving up.
9273        OLD_PATH=$PATH
9274        PATH=$TOOLS_DIR:$PATH
9275        for ac_prog in gmake
9276do
9277  # Extract the first word of "$ac_prog", so it can be a program name with args.
9278set dummy $ac_prog; ac_word=$2
9279{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9280$as_echo_n "checking for $ac_word... " >&6; }
9281if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
9282  $as_echo_n "(cached) " >&6
9283else
9284  case $CHECK_TOOLSDIR_GMAKE in
9285  [\\/]* | ?:[\\/]*)
9286  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
9287  ;;
9288  *)
9289  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9290for as_dir in $PATH
9291do
9292  IFS=$as_save_IFS
9293  test -z "$as_dir" && as_dir=.
9294    for ac_exec_ext in '' $ac_executable_extensions; do
9295  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9296    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
9297    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9298    break 2
9299  fi
9300done
9301  done
9302IFS=$as_save_IFS
9303
9304  ;;
9305esac
9306fi
9307CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
9308if test -n "$CHECK_TOOLSDIR_GMAKE"; then
9309  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
9310$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
9311else
9312  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9313$as_echo "no" >&6; }
9314fi
9315
9316
9317  test -n "$CHECK_TOOLSDIR_GMAKE" && break
9318done
9319
9320
9321  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
9322  DESCRIPTION="gmake in tools-dir"
9323  if test "x$MAKE_CANDIDATE" != x; then
9324    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
9325$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
9326    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
9327    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
9328    if test "x$IS_GNU_MAKE" = x; then
9329      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
9330$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
9331    else
9332      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
9333      if test "x$IS_MODERN_MAKE" = x; then
9334        { $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
9335$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;}
9336      else
9337        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9338          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9339            MAKE_EXPECTED_ENV='cygwin'
9340          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9341            MAKE_EXPECTED_ENV='msys'
9342          else
9343            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
9344          fi
9345          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
9346          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
9347        else
9348          # Not relevant for non-Windows
9349          IS_MAKE_CORRECT_ENV=true
9350        fi
9351        if test "x$IS_MAKE_CORRECT_ENV" = x; then
9352          { $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
9353$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;}
9354        else
9355          FOUND_MAKE=$MAKE_CANDIDATE
9356
9357  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9358
9359  # First separate the path from the arguments. This will split at the first
9360  # space.
9361  complete="$FOUND_MAKE"
9362  path="${complete%% *}"
9363  tmp="$complete EOL"
9364  arguments="${tmp#* }"
9365
9366  # Input might be given as Windows format, start by converting to
9367  # unix format.
9368  new_path=`$CYGPATH -u "$path"`
9369
9370  # Now try to locate executable using which
9371  new_path=`$WHICH "$new_path" 2> /dev/null`
9372  # bat and cmd files are not always considered executable in cygwin causing which
9373  # to not find them
9374  if test "x$new_path" = x \
9375           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9376           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9377    new_path=`$CYGPATH -u "$path"`
9378  fi
9379  if test "x$new_path" = x; then
9380    # Oops. Which didn't find the executable.
9381    # The splitting of arguments from the executable at a space might have been incorrect,
9382    # since paths with space are more likely in Windows. Give it another try with the whole
9383    # argument.
9384    path="$complete"
9385    arguments="EOL"
9386    new_path=`$CYGPATH -u "$path"`
9387    new_path=`$WHICH "$new_path" 2> /dev/null`
9388    # bat and cmd files are not always considered executable in cygwin causing which
9389    # to not find them
9390    if test "x$new_path" = x \
9391             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9392             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9393      new_path=`$CYGPATH -u "$path"`
9394    fi
9395    if test "x$new_path" = x; then
9396      # It's still not found. Now this is an unrecoverable error.
9397      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9398$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9399      has_space=`$ECHO "$complete" | $GREP " "`
9400      if test "x$has_space" != x; then
9401        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9402$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9403      fi
9404      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9405    fi
9406  fi
9407
9408  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9409  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9410  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9411  # "foo.exe" is OK but "foo" is an error.
9412  #
9413  # This test is therefore slightly more accurate than "test -f" to check for file precense.
9414  # It is also a way to make sure we got the proper file name for the real test later on.
9415  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9416  if test "x$test_shortpath" = x; then
9417    # Short path failed, file does not exist as specified.
9418    # Try adding .exe or .cmd
9419    if test -f "${new_path}.exe"; then
9420       input_to_shortpath="${new_path}.exe"
9421    elif test -f "${new_path}.cmd"; then
9422       input_to_shortpath="${new_path}.cmd"
9423    else
9424      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9425$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9426      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9427$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9428      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9429    fi
9430  else
9431    input_to_shortpath="$new_path"
9432  fi
9433
9434  # Call helper function which possibly converts this using DOS-style short mode.
9435  # If so, the updated path is stored in $new_path.
9436  new_path="$input_to_shortpath"
9437
9438  input_path="$input_to_shortpath"
9439  # Check if we need to convert this using DOS-style short mode. If the path
9440  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9441  # take no chances and rewrite it.
9442  # Note: m4 eats our [], so we need to use [ and ] instead.
9443  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9444  if test "x$has_forbidden_chars" != x; then
9445    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9446    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9447    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9448    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9449      # Going to short mode and back again did indeed matter. Since short mode is
9450      # case insensitive, let's make it lowercase to improve readability.
9451      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9452      # Now convert it back to Unix-stile (cygpath)
9453      input_path=`$CYGPATH -u "$shortmode_path"`
9454      new_path="$input_path"
9455    fi
9456  fi
9457
9458  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9459  if test "x$test_cygdrive_prefix" = x; then
9460    # As a simple fix, exclude /usr/bin since it's not a real path.
9461    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9462      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9463      # a path prefixed by /cygdrive for fixpath to work.
9464      new_path="$CYGWIN_ROOT_PATH$input_path"
9465    fi
9466  fi
9467
9468  # remove trailing .exe if any
9469  new_path="${new_path/%.exe/}"
9470
9471  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9472
9473  # First separate the path from the arguments. This will split at the first
9474  # space.
9475  complete="$FOUND_MAKE"
9476  path="${complete%% *}"
9477  tmp="$complete EOL"
9478  arguments="${tmp#* }"
9479
9480  # Input might be given as Windows format, start by converting to
9481  # unix format.
9482  new_path="$path"
9483
9484  windows_path="$new_path"
9485  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9486    unix_path=`$CYGPATH -u "$windows_path"`
9487    new_path="$unix_path"
9488  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9489    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9490    new_path="$unix_path"
9491  fi
9492
9493
9494  # Now try to locate executable using which
9495  new_path=`$WHICH "$new_path" 2> /dev/null`
9496
9497  if test "x$new_path" = x; then
9498    # Oops. Which didn't find the executable.
9499    # The splitting of arguments from the executable at a space might have been incorrect,
9500    # since paths with space are more likely in Windows. Give it another try with the whole
9501    # argument.
9502    path="$complete"
9503    arguments="EOL"
9504    new_path="$path"
9505
9506  windows_path="$new_path"
9507  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9508    unix_path=`$CYGPATH -u "$windows_path"`
9509    new_path="$unix_path"
9510  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9511    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9512    new_path="$unix_path"
9513  fi
9514
9515
9516    new_path=`$WHICH "$new_path" 2> /dev/null`
9517
9518    if test "x$new_path" = x; then
9519      # It's still not found. Now this is an unrecoverable error.
9520      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9521$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9522      has_space=`$ECHO "$complete" | $GREP " "`
9523      if test "x$has_space" != x; then
9524        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9525$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9526      fi
9527      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9528    fi
9529  fi
9530
9531  # Now new_path has a complete unix path to the binary
9532  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9533    # Keep paths in /bin as-is, but remove trailing .exe if any
9534    new_path="${new_path/%.exe/}"
9535    # Do not save /bin paths to all_fixpath_prefixes!
9536  else
9537    # Not in mixed or Windows style, start by that.
9538    new_path=`cmd //c echo $new_path`
9539
9540  input_path="$new_path"
9541  # Check if we need to convert this using DOS-style short mode. If the path
9542  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9543  # take no chances and rewrite it.
9544  # Note: m4 eats our [], so we need to use [ and ] instead.
9545  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9546  if test "x$has_forbidden_chars" != x; then
9547    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9548    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9549  fi
9550
9551    # Output is in $new_path
9552
9553  windows_path="$new_path"
9554  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9555    unix_path=`$CYGPATH -u "$windows_path"`
9556    new_path="$unix_path"
9557  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9558    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9559    new_path="$unix_path"
9560  fi
9561
9562    # remove trailing .exe if any
9563    new_path="${new_path/%.exe/}"
9564
9565    # Save the first 10 bytes of this path to the storage, so fixpath can work.
9566    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9567  fi
9568
9569  else
9570    # We're on a posix platform. Hooray! :)
9571    # First separate the path from the arguments. This will split at the first
9572    # space.
9573    complete="$FOUND_MAKE"
9574    path="${complete%% *}"
9575    tmp="$complete EOL"
9576    arguments="${tmp#* }"
9577
9578    # Cannot rely on the command "which" here since it doesn't always work.
9579    is_absolute_path=`$ECHO "$path" | $GREP ^/`
9580    if test -z "$is_absolute_path"; then
9581      # Path to executable is not absolute. Find it.
9582      IFS_save="$IFS"
9583      IFS=:
9584      for p in $PATH; do
9585        if test -f "$p/$path" && test -x "$p/$path"; then
9586          new_path="$p/$path"
9587          break
9588        fi
9589      done
9590      IFS="$IFS_save"
9591    else
9592      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9593$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9594      new_path="$path"
9595    fi
9596
9597    if test "x$new_path" = x; then
9598        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9599$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9600        has_space=`$ECHO "$complete" | $GREP " "`
9601        if test "x$has_space" != x; then
9602          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9603$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9604        fi
9605        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9606      fi
9607  fi
9608
9609      # Now join together the path and the arguments once again
9610      if test "x$arguments" != xEOL; then
9611        new_complete="$new_path ${arguments% *}"
9612      else
9613        new_complete="$new_path"
9614      fi
9615
9616  if test "x$complete" != "x$new_complete"; then
9617      FOUND_MAKE="$new_complete"
9618      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9619$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9620    fi
9621
9622        fi
9623      fi
9624    fi
9625  fi
9626
9627        if test "x$FOUND_MAKE" = x; then
9628          for ac_prog in make
9629do
9630  # Extract the first word of "$ac_prog", so it can be a program name with args.
9631set dummy $ac_prog; ac_word=$2
9632{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9633$as_echo_n "checking for $ac_word... " >&6; }
9634if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
9635  $as_echo_n "(cached) " >&6
9636else
9637  case $CHECK_TOOLSDIR_MAKE in
9638  [\\/]* | ?:[\\/]*)
9639  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
9640  ;;
9641  *)
9642  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9643for as_dir in $PATH
9644do
9645  IFS=$as_save_IFS
9646  test -z "$as_dir" && as_dir=.
9647    for ac_exec_ext in '' $ac_executable_extensions; do
9648  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9649    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
9650    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9651    break 2
9652  fi
9653done
9654  done
9655IFS=$as_save_IFS
9656
9657  ;;
9658esac
9659fi
9660CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
9661if test -n "$CHECK_TOOLSDIR_MAKE"; then
9662  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
9663$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
9664else
9665  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9666$as_echo "no" >&6; }
9667fi
9668
9669
9670  test -n "$CHECK_TOOLSDIR_MAKE" && break
9671done
9672
9673
9674  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
9675  DESCRIPTION="make in tools-dir"
9676  if test "x$MAKE_CANDIDATE" != x; then
9677    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
9678$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
9679    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
9680    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
9681    if test "x$IS_GNU_MAKE" = x; then
9682      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
9683$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
9684    else
9685      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
9686      if test "x$IS_MODERN_MAKE" = x; then
9687        { $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
9688$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;}
9689      else
9690        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9691          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9692            MAKE_EXPECTED_ENV='cygwin'
9693          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9694            MAKE_EXPECTED_ENV='msys'
9695          else
9696            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
9697          fi
9698          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
9699          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
9700        else
9701          # Not relevant for non-Windows
9702          IS_MAKE_CORRECT_ENV=true
9703        fi
9704        if test "x$IS_MAKE_CORRECT_ENV" = x; then
9705          { $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
9706$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;}
9707        else
9708          FOUND_MAKE=$MAKE_CANDIDATE
9709
9710  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9711
9712  # First separate the path from the arguments. This will split at the first
9713  # space.
9714  complete="$FOUND_MAKE"
9715  path="${complete%% *}"
9716  tmp="$complete EOL"
9717  arguments="${tmp#* }"
9718
9719  # Input might be given as Windows format, start by converting to
9720  # unix format.
9721  new_path=`$CYGPATH -u "$path"`
9722
9723  # Now try to locate executable using which
9724  new_path=`$WHICH "$new_path" 2> /dev/null`
9725  # bat and cmd files are not always considered executable in cygwin causing which
9726  # to not find them
9727  if test "x$new_path" = x \
9728           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9729           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9730    new_path=`$CYGPATH -u "$path"`
9731  fi
9732  if test "x$new_path" = x; then
9733    # Oops. Which didn't find the executable.
9734    # The splitting of arguments from the executable at a space might have been incorrect,
9735    # since paths with space are more likely in Windows. Give it another try with the whole
9736    # argument.
9737    path="$complete"
9738    arguments="EOL"
9739    new_path=`$CYGPATH -u "$path"`
9740    new_path=`$WHICH "$new_path" 2> /dev/null`
9741    # bat and cmd files are not always considered executable in cygwin causing which
9742    # to not find them
9743    if test "x$new_path" = x \
9744             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9745             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9746      new_path=`$CYGPATH -u "$path"`
9747    fi
9748    if test "x$new_path" = x; then
9749      # It's still not found. Now this is an unrecoverable error.
9750      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9751$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9752      has_space=`$ECHO "$complete" | $GREP " "`
9753      if test "x$has_space" != x; then
9754        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9755$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9756      fi
9757      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9758    fi
9759  fi
9760
9761  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9762  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9763  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9764  # "foo.exe" is OK but "foo" is an error.
9765  #
9766  # This test is therefore slightly more accurate than "test -f" to check for file precense.
9767  # It is also a way to make sure we got the proper file name for the real test later on.
9768  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9769  if test "x$test_shortpath" = x; then
9770    # Short path failed, file does not exist as specified.
9771    # Try adding .exe or .cmd
9772    if test -f "${new_path}.exe"; then
9773       input_to_shortpath="${new_path}.exe"
9774    elif test -f "${new_path}.cmd"; then
9775       input_to_shortpath="${new_path}.cmd"
9776    else
9777      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9778$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9779      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9780$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9781      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9782    fi
9783  else
9784    input_to_shortpath="$new_path"
9785  fi
9786
9787  # Call helper function which possibly converts this using DOS-style short mode.
9788  # If so, the updated path is stored in $new_path.
9789  new_path="$input_to_shortpath"
9790
9791  input_path="$input_to_shortpath"
9792  # Check if we need to convert this using DOS-style short mode. If the path
9793  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9794  # take no chances and rewrite it.
9795  # Note: m4 eats our [], so we need to use [ and ] instead.
9796  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9797  if test "x$has_forbidden_chars" != x; then
9798    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9799    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9800    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9801    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9802      # Going to short mode and back again did indeed matter. Since short mode is
9803      # case insensitive, let's make it lowercase to improve readability.
9804      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9805      # Now convert it back to Unix-stile (cygpath)
9806      input_path=`$CYGPATH -u "$shortmode_path"`
9807      new_path="$input_path"
9808    fi
9809  fi
9810
9811  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9812  if test "x$test_cygdrive_prefix" = x; then
9813    # As a simple fix, exclude /usr/bin since it's not a real path.
9814    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9815      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9816      # a path prefixed by /cygdrive for fixpath to work.
9817      new_path="$CYGWIN_ROOT_PATH$input_path"
9818    fi
9819  fi
9820
9821  # remove trailing .exe if any
9822  new_path="${new_path/%.exe/}"
9823
9824  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9825
9826  # First separate the path from the arguments. This will split at the first
9827  # space.
9828  complete="$FOUND_MAKE"
9829  path="${complete%% *}"
9830  tmp="$complete EOL"
9831  arguments="${tmp#* }"
9832
9833  # Input might be given as Windows format, start by converting to
9834  # unix format.
9835  new_path="$path"
9836
9837  windows_path="$new_path"
9838  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9839    unix_path=`$CYGPATH -u "$windows_path"`
9840    new_path="$unix_path"
9841  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9842    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9843    new_path="$unix_path"
9844  fi
9845
9846
9847  # Now try to locate executable using which
9848  new_path=`$WHICH "$new_path" 2> /dev/null`
9849
9850  if test "x$new_path" = x; then
9851    # Oops. Which didn't find the executable.
9852    # The splitting of arguments from the executable at a space might have been incorrect,
9853    # since paths with space are more likely in Windows. Give it another try with the whole
9854    # argument.
9855    path="$complete"
9856    arguments="EOL"
9857    new_path="$path"
9858
9859  windows_path="$new_path"
9860  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9861    unix_path=`$CYGPATH -u "$windows_path"`
9862    new_path="$unix_path"
9863  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9864    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9865    new_path="$unix_path"
9866  fi
9867
9868
9869    new_path=`$WHICH "$new_path" 2> /dev/null`
9870
9871    if test "x$new_path" = x; then
9872      # It's still not found. Now this is an unrecoverable error.
9873      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9874$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9875      has_space=`$ECHO "$complete" | $GREP " "`
9876      if test "x$has_space" != x; then
9877        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9878$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9879      fi
9880      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9881    fi
9882  fi
9883
9884  # Now new_path has a complete unix path to the binary
9885  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9886    # Keep paths in /bin as-is, but remove trailing .exe if any
9887    new_path="${new_path/%.exe/}"
9888    # Do not save /bin paths to all_fixpath_prefixes!
9889  else
9890    # Not in mixed or Windows style, start by that.
9891    new_path=`cmd //c echo $new_path`
9892
9893  input_path="$new_path"
9894  # Check if we need to convert this using DOS-style short mode. If the path
9895  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9896  # take no chances and rewrite it.
9897  # Note: m4 eats our [], so we need to use [ and ] instead.
9898  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9899  if test "x$has_forbidden_chars" != x; then
9900    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9901    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9902  fi
9903
9904    # Output is in $new_path
9905
9906  windows_path="$new_path"
9907  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9908    unix_path=`$CYGPATH -u "$windows_path"`
9909    new_path="$unix_path"
9910  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9911    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9912    new_path="$unix_path"
9913  fi
9914
9915    # remove trailing .exe if any
9916    new_path="${new_path/%.exe/}"
9917
9918    # Save the first 10 bytes of this path to the storage, so fixpath can work.
9919    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9920  fi
9921
9922  else
9923    # We're on a posix platform. Hooray! :)
9924    # First separate the path from the arguments. This will split at the first
9925    # space.
9926    complete="$FOUND_MAKE"
9927    path="${complete%% *}"
9928    tmp="$complete EOL"
9929    arguments="${tmp#* }"
9930
9931    # Cannot rely on the command "which" here since it doesn't always work.
9932    is_absolute_path=`$ECHO "$path" | $GREP ^/`
9933    if test -z "$is_absolute_path"; then
9934      # Path to executable is not absolute. Find it.
9935      IFS_save="$IFS"
9936      IFS=:
9937      for p in $PATH; do
9938        if test -f "$p/$path" && test -x "$p/$path"; then
9939          new_path="$p/$path"
9940          break
9941        fi
9942      done
9943      IFS="$IFS_save"
9944    else
9945      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9946$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9947      new_path="$path"
9948    fi
9949
9950    if test "x$new_path" = x; then
9951        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9952$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9953        has_space=`$ECHO "$complete" | $GREP " "`
9954        if test "x$has_space" != x; then
9955          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9956$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9957        fi
9958        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9959      fi
9960  fi
9961
9962      # Now join together the path and the arguments once again
9963      if test "x$arguments" != xEOL; then
9964        new_complete="$new_path ${arguments% *}"
9965      else
9966        new_complete="$new_path"
9967      fi
9968
9969  if test "x$complete" != "x$new_complete"; then
9970      FOUND_MAKE="$new_complete"
9971      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9972$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9973    fi
9974
9975        fi
9976      fi
9977    fi
9978  fi
9979
9980        fi
9981        PATH=$OLD_PATH
9982      fi
9983    fi
9984
9985    if test "x$FOUND_MAKE" = x; then
9986      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
9987    fi
9988  fi
9989
9990  MAKE=$FOUND_MAKE
9991
9992  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
9993$as_echo "$as_me: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
9994
9995
9996
9997    # Test if find supports -delete
9998    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
9999$as_echo_n "checking if find supports -delete... " >&6; }
10000    FIND_DELETE="-delete"
10001
10002    DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
10003
10004    echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
10005
10006    TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
10007    if test -f $DELETEDIR/TestIfFindSupportsDelete; then
10008        # No, it does not.
10009        rm $DELETEDIR/TestIfFindSupportsDelete
10010        FIND_DELETE="-exec rm \{\} \+"
10011        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10012$as_echo "no" >&6; }
10013    else
10014        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10015$as_echo "yes" >&6; }
10016    fi
10017    rmdir $DELETEDIR
10018
10019
10020
10021# These tools might not be installed by default,
10022# need hint on how to install them.
10023
10024    for ac_prog in unzip
10025do
10026  # Extract the first word of "$ac_prog", so it can be a program name with args.
10027set dummy $ac_prog; ac_word=$2
10028{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10029$as_echo_n "checking for $ac_word... " >&6; }
10030if ${ac_cv_path_UNZIP+:} false; then :
10031  $as_echo_n "(cached) " >&6
10032else
10033  case $UNZIP in
10034  [\\/]* | ?:[\\/]*)
10035  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
10036  ;;
10037  *)
10038  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10039for as_dir in $PATH
10040do
10041  IFS=$as_save_IFS
10042  test -z "$as_dir" && as_dir=.
10043    for ac_exec_ext in '' $ac_executable_extensions; do
10044  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10045    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
10046    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10047    break 2
10048  fi
10049done
10050  done
10051IFS=$as_save_IFS
10052
10053  ;;
10054esac
10055fi
10056UNZIP=$ac_cv_path_UNZIP
10057if test -n "$UNZIP"; then
10058  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
10059$as_echo "$UNZIP" >&6; }
10060else
10061  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10062$as_echo "no" >&6; }
10063fi
10064
10065
10066  test -n "$UNZIP" && break
10067done
10068
10069
10070    if test "x$UNZIP" = x; then
10071        if test "xunzip" = x; then
10072          PROG_NAME=unzip
10073        else
10074          PROG_NAME=unzip
10075        fi
10076        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10077$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10078        as_fn_error $? "Cannot continue" "$LINENO" 5
10079    fi
10080
10081
10082
10083    for ac_prog in zip
10084do
10085  # Extract the first word of "$ac_prog", so it can be a program name with args.
10086set dummy $ac_prog; ac_word=$2
10087{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10088$as_echo_n "checking for $ac_word... " >&6; }
10089if ${ac_cv_path_ZIP+:} false; then :
10090  $as_echo_n "(cached) " >&6
10091else
10092  case $ZIP in
10093  [\\/]* | ?:[\\/]*)
10094  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
10095  ;;
10096  *)
10097  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10098for as_dir in $PATH
10099do
10100  IFS=$as_save_IFS
10101  test -z "$as_dir" && as_dir=.
10102    for ac_exec_ext in '' $ac_executable_extensions; do
10103  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10104    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
10105    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10106    break 2
10107  fi
10108done
10109  done
10110IFS=$as_save_IFS
10111
10112  ;;
10113esac
10114fi
10115ZIP=$ac_cv_path_ZIP
10116if test -n "$ZIP"; then
10117  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
10118$as_echo "$ZIP" >&6; }
10119else
10120  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10121$as_echo "no" >&6; }
10122fi
10123
10124
10125  test -n "$ZIP" && break
10126done
10127
10128
10129    if test "x$ZIP" = x; then
10130        if test "xzip" = x; then
10131          PROG_NAME=zip
10132        else
10133          PROG_NAME=zip
10134        fi
10135        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10136$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10137        as_fn_error $? "Cannot continue" "$LINENO" 5
10138    fi
10139
10140
10141
10142# Non-required basic tools
10143
10144# Extract the first word of "ldd", so it can be a program name with args.
10145set dummy ldd; ac_word=$2
10146{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10147$as_echo_n "checking for $ac_word... " >&6; }
10148if ${ac_cv_path_LDD+:} false; then :
10149  $as_echo_n "(cached) " >&6
10150else
10151  case $LDD in
10152  [\\/]* | ?:[\\/]*)
10153  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
10154  ;;
10155  *)
10156  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10157for as_dir in $PATH
10158do
10159  IFS=$as_save_IFS
10160  test -z "$as_dir" && as_dir=.
10161    for ac_exec_ext in '' $ac_executable_extensions; do
10162  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10163    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
10164    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10165    break 2
10166  fi
10167done
10168  done
10169IFS=$as_save_IFS
10170
10171  ;;
10172esac
10173fi
10174LDD=$ac_cv_path_LDD
10175if test -n "$LDD"; then
10176  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
10177$as_echo "$LDD" >&6; }
10178else
10179  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10180$as_echo "no" >&6; }
10181fi
10182
10183
10184if test "x$LDD" = "x"; then
10185    # List shared lib dependencies is used for
10186    # debug output and checking for forbidden dependencies.
10187    # We can build without it.
10188    LDD="true"
10189fi
10190# Extract the first word of "otool", so it can be a program name with args.
10191set dummy otool; ac_word=$2
10192{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10193$as_echo_n "checking for $ac_word... " >&6; }
10194if ${ac_cv_path_OTOOL+:} false; then :
10195  $as_echo_n "(cached) " >&6
10196else
10197  case $OTOOL in
10198  [\\/]* | ?:[\\/]*)
10199  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
10200  ;;
10201  *)
10202  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10203for as_dir in $PATH
10204do
10205  IFS=$as_save_IFS
10206  test -z "$as_dir" && as_dir=.
10207    for ac_exec_ext in '' $ac_executable_extensions; do
10208  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10209    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
10210    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10211    break 2
10212  fi
10213done
10214  done
10215IFS=$as_save_IFS
10216
10217  ;;
10218esac
10219fi
10220OTOOL=$ac_cv_path_OTOOL
10221if test -n "$OTOOL"; then
10222  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
10223$as_echo "$OTOOL" >&6; }
10224else
10225  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10226$as_echo "no" >&6; }
10227fi
10228
10229
10230if test "x$OTOOL" = "x"; then
10231   OTOOL="true"
10232fi
10233for ac_prog in readelf greadelf
10234do
10235  # Extract the first word of "$ac_prog", so it can be a program name with args.
10236set dummy $ac_prog; ac_word=$2
10237{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10238$as_echo_n "checking for $ac_word... " >&6; }
10239if ${ac_cv_path_READELF+:} false; then :
10240  $as_echo_n "(cached) " >&6
10241else
10242  case $READELF in
10243  [\\/]* | ?:[\\/]*)
10244  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
10245  ;;
10246  *)
10247  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10248for as_dir in $PATH
10249do
10250  IFS=$as_save_IFS
10251  test -z "$as_dir" && as_dir=.
10252    for ac_exec_ext in '' $ac_executable_extensions; do
10253  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10254    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
10255    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10256    break 2
10257  fi
10258done
10259  done
10260IFS=$as_save_IFS
10261
10262  ;;
10263esac
10264fi
10265READELF=$ac_cv_path_READELF
10266if test -n "$READELF"; then
10267  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
10268$as_echo "$READELF" >&6; }
10269else
10270  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10271$as_echo "no" >&6; }
10272fi
10273
10274
10275  test -n "$READELF" && break
10276done
10277
10278# Extract the first word of "hg", so it can be a program name with args.
10279set dummy hg; ac_word=$2
10280{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10281$as_echo_n "checking for $ac_word... " >&6; }
10282if ${ac_cv_path_HG+:} false; then :
10283  $as_echo_n "(cached) " >&6
10284else
10285  case $HG in
10286  [\\/]* | ?:[\\/]*)
10287  ac_cv_path_HG="$HG" # Let the user override the test with a path.
10288  ;;
10289  *)
10290  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10291for as_dir in $PATH
10292do
10293  IFS=$as_save_IFS
10294  test -z "$as_dir" && as_dir=.
10295    for ac_exec_ext in '' $ac_executable_extensions; do
10296  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10297    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
10298    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10299    break 2
10300  fi
10301done
10302  done
10303IFS=$as_save_IFS
10304
10305  ;;
10306esac
10307fi
10308HG=$ac_cv_path_HG
10309if test -n "$HG"; then
10310  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
10311$as_echo "$HG" >&6; }
10312else
10313  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10314$as_echo "no" >&6; }
10315fi
10316
10317
10318# Extract the first word of "stat", so it can be a program name with args.
10319set dummy stat; ac_word=$2
10320{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10321$as_echo_n "checking for $ac_word... " >&6; }
10322if ${ac_cv_path_STAT+:} false; then :
10323  $as_echo_n "(cached) " >&6
10324else
10325  case $STAT in
10326  [\\/]* | ?:[\\/]*)
10327  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
10328  ;;
10329  *)
10330  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10331for as_dir in $PATH
10332do
10333  IFS=$as_save_IFS
10334  test -z "$as_dir" && as_dir=.
10335    for ac_exec_ext in '' $ac_executable_extensions; do
10336  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10337    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
10338    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10339    break 2
10340  fi
10341done
10342  done
10343IFS=$as_save_IFS
10344
10345  ;;
10346esac
10347fi
10348STAT=$ac_cv_path_STAT
10349if test -n "$STAT"; then
10350  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
10351$as_echo "$STAT" >&6; }
10352else
10353  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10354$as_echo "no" >&6; }
10355fi
10356
10357
10358# Extract the first word of "time", so it can be a program name with args.
10359set dummy time; ac_word=$2
10360{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10361$as_echo_n "checking for $ac_word... " >&6; }
10362if ${ac_cv_path_TIME+:} false; then :
10363  $as_echo_n "(cached) " >&6
10364else
10365  case $TIME in
10366  [\\/]* | ?:[\\/]*)
10367  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
10368  ;;
10369  *)
10370  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10371for as_dir in $PATH
10372do
10373  IFS=$as_save_IFS
10374  test -z "$as_dir" && as_dir=.
10375    for ac_exec_ext in '' $ac_executable_extensions; do
10376  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10377    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
10378    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10379    break 2
10380  fi
10381done
10382  done
10383IFS=$as_save_IFS
10384
10385  ;;
10386esac
10387fi
10388TIME=$ac_cv_path_TIME
10389if test -n "$TIME"; then
10390  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
10391$as_echo "$TIME" >&6; }
10392else
10393  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10394$as_echo "no" >&6; }
10395fi
10396
10397
10398# Check if it's GNU time
10399IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
10400if test "x$IS_GNU_TIME" != x; then
10401  IS_GNU_TIME=yes
10402else
10403  IS_GNU_TIME=no
10404fi
10405
10406
10407if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
10408
10409    for ac_prog in comm
10410do
10411  # Extract the first word of "$ac_prog", so it can be a program name with args.
10412set dummy $ac_prog; ac_word=$2
10413{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10414$as_echo_n "checking for $ac_word... " >&6; }
10415if ${ac_cv_path_COMM+:} false; then :
10416  $as_echo_n "(cached) " >&6
10417else
10418  case $COMM in
10419  [\\/]* | ?:[\\/]*)
10420  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
10421  ;;
10422  *)
10423  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10424for as_dir in $PATH
10425do
10426  IFS=$as_save_IFS
10427  test -z "$as_dir" && as_dir=.
10428    for ac_exec_ext in '' $ac_executable_extensions; do
10429  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10430    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
10431    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10432    break 2
10433  fi
10434done
10435  done
10436IFS=$as_save_IFS
10437
10438  ;;
10439esac
10440fi
10441COMM=$ac_cv_path_COMM
10442if test -n "$COMM"; then
10443  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
10444$as_echo "$COMM" >&6; }
10445else
10446  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10447$as_echo "no" >&6; }
10448fi
10449
10450
10451  test -n "$COMM" && break
10452done
10453
10454
10455    if test "x$COMM" = x; then
10456        if test "xcomm" = x; then
10457          PROG_NAME=comm
10458        else
10459          PROG_NAME=comm
10460        fi
10461        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10462$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10463        as_fn_error $? "Cannot continue" "$LINENO" 5
10464    fi
10465
10466
10467fi
10468
10469if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
10470
10471    for ac_prog in xattr
10472do
10473  # Extract the first word of "$ac_prog", so it can be a program name with args.
10474set dummy $ac_prog; ac_word=$2
10475{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10476$as_echo_n "checking for $ac_word... " >&6; }
10477if ${ac_cv_path_XATTR+:} false; then :
10478  $as_echo_n "(cached) " >&6
10479else
10480  case $XATTR in
10481  [\\/]* | ?:[\\/]*)
10482  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
10483  ;;
10484  *)
10485  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10486for as_dir in $PATH
10487do
10488  IFS=$as_save_IFS
10489  test -z "$as_dir" && as_dir=.
10490    for ac_exec_ext in '' $ac_executable_extensions; do
10491  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10492    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
10493    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10494    break 2
10495  fi
10496done
10497  done
10498IFS=$as_save_IFS
10499
10500  ;;
10501esac
10502fi
10503XATTR=$ac_cv_path_XATTR
10504if test -n "$XATTR"; then
10505  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
10506$as_echo "$XATTR" >&6; }
10507else
10508  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10509$as_echo "no" >&6; }
10510fi
10511
10512
10513  test -n "$XATTR" && break
10514done
10515
10516
10517    if test "x$XATTR" = x; then
10518        if test "xxattr" = x; then
10519          PROG_NAME=xattr
10520        else
10521          PROG_NAME=xattr
10522        fi
10523        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10524$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10525        as_fn_error $? "Cannot continue" "$LINENO" 5
10526    fi
10527
10528
10529  # Extract the first word of "codesign", so it can be a program name with args.
10530set dummy codesign; ac_word=$2
10531{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10532$as_echo_n "checking for $ac_word... " >&6; }
10533if ${ac_cv_path_CODESIGN+:} false; then :
10534  $as_echo_n "(cached) " >&6
10535else
10536  case $CODESIGN in
10537  [\\/]* | ?:[\\/]*)
10538  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
10539  ;;
10540  *)
10541  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10542for as_dir in $PATH
10543do
10544  IFS=$as_save_IFS
10545  test -z "$as_dir" && as_dir=.
10546    for ac_exec_ext in '' $ac_executable_extensions; do
10547  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10548    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
10549    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10550    break 2
10551  fi
10552done
10553  done
10554IFS=$as_save_IFS
10555
10556  ;;
10557esac
10558fi
10559CODESIGN=$ac_cv_path_CODESIGN
10560if test -n "$CODESIGN"; then
10561  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
10562$as_echo "$CODESIGN" >&6; }
10563else
10564  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10565$as_echo "no" >&6; }
10566fi
10567
10568
10569  if test "x$CODESIGN" != "x"; then
10570    # Verify that the openjdk_codesign certificate is present
10571    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
10572$as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
10573    rm -f codesign-testfile
10574    touch codesign-testfile
10575    codesign -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
10576    rm -f codesign-testfile
10577    if test "x$CODESIGN" = x; then
10578      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10579$as_echo "no" >&6; }
10580    else
10581      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10582$as_echo "yes" >&6; }
10583    fi
10584  fi
10585fi
10586
10587
10588# Check if pkg-config is available.
10589
10590
10591if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
10592	if test -n "$ac_tool_prefix"; then
10593  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
10594set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
10595{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10596$as_echo_n "checking for $ac_word... " >&6; }
10597if ${ac_cv_path_PKG_CONFIG+:} false; then :
10598  $as_echo_n "(cached) " >&6
10599else
10600  case $PKG_CONFIG in
10601  [\\/]* | ?:[\\/]*)
10602  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10603  ;;
10604  *)
10605  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10606for as_dir in $PATH
10607do
10608  IFS=$as_save_IFS
10609  test -z "$as_dir" && as_dir=.
10610    for ac_exec_ext in '' $ac_executable_extensions; do
10611  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10612    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10613    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10614    break 2
10615  fi
10616done
10617  done
10618IFS=$as_save_IFS
10619
10620  ;;
10621esac
10622fi
10623PKG_CONFIG=$ac_cv_path_PKG_CONFIG
10624if test -n "$PKG_CONFIG"; then
10625  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
10626$as_echo "$PKG_CONFIG" >&6; }
10627else
10628  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10629$as_echo "no" >&6; }
10630fi
10631
10632
10633fi
10634if test -z "$ac_cv_path_PKG_CONFIG"; then
10635  ac_pt_PKG_CONFIG=$PKG_CONFIG
10636  # Extract the first word of "pkg-config", so it can be a program name with args.
10637set dummy pkg-config; ac_word=$2
10638{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10639$as_echo_n "checking for $ac_word... " >&6; }
10640if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
10641  $as_echo_n "(cached) " >&6
10642else
10643  case $ac_pt_PKG_CONFIG in
10644  [\\/]* | ?:[\\/]*)
10645  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
10646  ;;
10647  *)
10648  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10649for as_dir in $PATH
10650do
10651  IFS=$as_save_IFS
10652  test -z "$as_dir" && as_dir=.
10653    for ac_exec_ext in '' $ac_executable_extensions; do
10654  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10655    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10656    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10657    break 2
10658  fi
10659done
10660  done
10661IFS=$as_save_IFS
10662
10663  ;;
10664esac
10665fi
10666ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
10667if test -n "$ac_pt_PKG_CONFIG"; then
10668  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
10669$as_echo "$ac_pt_PKG_CONFIG" >&6; }
10670else
10671  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10672$as_echo "no" >&6; }
10673fi
10674
10675  if test "x$ac_pt_PKG_CONFIG" = x; then
10676    PKG_CONFIG=""
10677  else
10678    case $cross_compiling:$ac_tool_warned in
10679yes:)
10680{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10681$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10682ac_tool_warned=yes ;;
10683esac
10684    PKG_CONFIG=$ac_pt_PKG_CONFIG
10685  fi
10686else
10687  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
10688fi
10689
10690fi
10691if test -n "$PKG_CONFIG"; then
10692	_pkg_min_version=0.9.0
10693	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
10694$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
10695	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
10696		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10697$as_echo "yes" >&6; }
10698	else
10699		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10700$as_echo "no" >&6; }
10701		PKG_CONFIG=""
10702	fi
10703
10704fi
10705
10706# After basic tools have been setup, we can check build os specific details.
10707
10708###############################################################################
10709
10710# Note that this is the build platform OS version!
10711
10712OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
10713OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
10714OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
10715OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
10716
10717
10718
10719
10720
10721# Setup builddeps, for automatic downloading of tools we need.
10722# This is needed before we can call BDEPS_CHECK_MODULE, which is done in
10723# boot-jdk setup, but we need to have basic tools setup first.
10724
10725
10726# Check whether --with-builddeps-conf was given.
10727if test "${with_builddeps_conf+set}" = set; then :
10728  withval=$with_builddeps_conf;
10729fi
10730
10731
10732
10733# Check whether --with-builddeps-server was given.
10734if test "${with_builddeps_server+set}" = set; then :
10735  withval=$with_builddeps_server;
10736fi
10737
10738
10739
10740# Check whether --with-builddeps-dir was given.
10741if test "${with_builddeps_dir+set}" = set; then :
10742  withval=$with_builddeps_dir;
10743else
10744  with_builddeps_dir=/localhome/builddeps
10745fi
10746
10747
10748
10749# Check whether --with-builddeps-group was given.
10750if test "${with_builddeps_group+set}" = set; then :
10751  withval=$with_builddeps_group;
10752fi
10753
10754
10755
10756
10757    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
10758        if test "x$with_builddeps_conf" != x; then
10759            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for supplied builddeps configuration file" >&5
10760$as_echo_n "checking for supplied builddeps configuration file... " >&6; }
10761            builddepsfile=$with_builddeps_conf
10762            if test -s $builddepsfile; then
10763                . $builddepsfile
10764                { $as_echo "$as_me:${as_lineno-$LINENO}: result: loaded!" >&5
10765$as_echo "loaded!" >&6; }
10766            else
10767               as_fn_error $? "The given builddeps conf file $with_builddeps_conf could not be loaded!" "$LINENO" 5
10768           fi
10769        else
10770            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builddeps.conf files in sources..." >&5
10771$as_echo_n "checking for builddeps.conf files in sources...... " >&6; }
10772            builddepsfile=`mktemp`
10773            touch $builddepsfile
10774            # Put all found confs into a single file.
10775            find ${SRC_ROOT} -name builddeps.conf -exec cat \{\} \; >> $builddepsfile
10776            # Source the file to acquire the variables
10777            if test -s $builddepsfile; then
10778                . $builddepsfile
10779                { $as_echo "$as_me:${as_lineno-$LINENO}: result: found at least one!" >&5
10780$as_echo "found at least one!" >&6; }
10781            else
10782               as_fn_error $? "Could not find any builddeps.conf at all!" "$LINENO" 5
10783           fi
10784        fi
10785        # Create build and target names that use _ instead of "-" and ".".
10786        # This is necessary to use them in variable names.
10787        build_var=`echo ${OPENJDK_BUILD_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
10788        target_var=`echo ${OPENJDK_TARGET_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
10789        # Extract rewrite information for build and target
10790        eval rewritten_build=\${REWRITE_${build_var}}
10791        if test "x$rewritten_build" = x; then
10792            rewritten_build=${OPENJDK_BUILD_AUTOCONF_NAME}
10793            echo Build stays the same $rewritten_build
10794        else
10795            echo Rewriting build for builddeps into $rewritten_build
10796        fi
10797        eval rewritten_target=\${REWRITE_${target_var}}
10798        if test "x$rewritten_target" = x; then
10799            rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME}
10800            echo Target stays the same $rewritten_target
10801        else
10802            echo Rewriting target for builddeps into $rewritten_target
10803        fi
10804        rewritten_build_var=`echo ${rewritten_build} | tr '-' '_' | tr '.' '_'`
10805        rewritten_target_var=`echo ${rewritten_target} | tr '-' '_' | tr '.' '_'`
10806    fi
10807    for ac_prog in 7z unzip
10808do
10809  # Extract the first word of "$ac_prog", so it can be a program name with args.
10810set dummy $ac_prog; ac_word=$2
10811{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10812$as_echo_n "checking for $ac_word... " >&6; }
10813if ${ac_cv_prog_BDEPS_UNZIP+:} false; then :
10814  $as_echo_n "(cached) " >&6
10815else
10816  if test -n "$BDEPS_UNZIP"; then
10817  ac_cv_prog_BDEPS_UNZIP="$BDEPS_UNZIP" # Let the user override the test.
10818else
10819as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10820for as_dir in $PATH
10821do
10822  IFS=$as_save_IFS
10823  test -z "$as_dir" && as_dir=.
10824    for ac_exec_ext in '' $ac_executable_extensions; do
10825  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10826    ac_cv_prog_BDEPS_UNZIP="$ac_prog"
10827    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10828    break 2
10829  fi
10830done
10831  done
10832IFS=$as_save_IFS
10833
10834fi
10835fi
10836BDEPS_UNZIP=$ac_cv_prog_BDEPS_UNZIP
10837if test -n "$BDEPS_UNZIP"; then
10838  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_UNZIP" >&5
10839$as_echo "$BDEPS_UNZIP" >&6; }
10840else
10841  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10842$as_echo "no" >&6; }
10843fi
10844
10845
10846  test -n "$BDEPS_UNZIP" && break
10847done
10848
10849    if test "x$BDEPS_UNZIP" = x7z; then
10850        BDEPS_UNZIP="7z x"
10851    fi
10852
10853    for ac_prog in wget lftp ftp
10854do
10855  # Extract the first word of "$ac_prog", so it can be a program name with args.
10856set dummy $ac_prog; ac_word=$2
10857{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10858$as_echo_n "checking for $ac_word... " >&6; }
10859if ${ac_cv_prog_BDEPS_FTP+:} false; then :
10860  $as_echo_n "(cached) " >&6
10861else
10862  if test -n "$BDEPS_FTP"; then
10863  ac_cv_prog_BDEPS_FTP="$BDEPS_FTP" # Let the user override the test.
10864else
10865as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10866for as_dir in $PATH
10867do
10868  IFS=$as_save_IFS
10869  test -z "$as_dir" && as_dir=.
10870    for ac_exec_ext in '' $ac_executable_extensions; do
10871  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10872    ac_cv_prog_BDEPS_FTP="$ac_prog"
10873    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10874    break 2
10875  fi
10876done
10877  done
10878IFS=$as_save_IFS
10879
10880fi
10881fi
10882BDEPS_FTP=$ac_cv_prog_BDEPS_FTP
10883if test -n "$BDEPS_FTP"; then
10884  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_FTP" >&5
10885$as_echo "$BDEPS_FTP" >&6; }
10886else
10887  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10888$as_echo "no" >&6; }
10889fi
10890
10891
10892  test -n "$BDEPS_FTP" && break
10893done
10894
10895
10896
10897###############################################################################
10898#
10899# Determine OpenJDK variants, options and version numbers.
10900#
10901###############################################################################
10902
10903# We need build & target for this.
10904
10905
10906###############################################################################
10907#
10908# Should we build a JDK/JVM with headful support (ie a graphical ui)?
10909# We always build headless support.
10910#
10911{ $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
10912$as_echo_n "checking headful support... " >&6; }
10913# Check whether --enable-headful was given.
10914if test "${enable_headful+set}" = set; then :
10915  enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
10916else
10917  SUPPORT_HEADFUL=yes
10918fi
10919
10920
10921SUPPORT_HEADLESS=yes
10922BUILD_HEADLESS="BUILD_HEADLESS:=true"
10923
10924if test "x$SUPPORT_HEADFUL" = xyes; then
10925    # We are building both headful and headless.
10926    headful_msg="inlude support for both headful and headless"
10927fi
10928
10929if test "x$SUPPORT_HEADFUL" = xno; then
10930    # Thus we are building headless only.
10931    BUILD_HEADLESS="BUILD_HEADLESS:=true"
10932    headful_msg="headless only"
10933fi
10934
10935{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
10936$as_echo "$headful_msg" >&6; }
10937
10938
10939
10940
10941
10942# Control wether Hotspot runs Queens test after build.
10943# Check whether --enable-hotspot-test-in-build was given.
10944if test "${enable_hotspot_test_in_build+set}" = set; then :
10945  enableval=$enable_hotspot_test_in_build;
10946else
10947  enable_hotspot_test_in_build=no
10948fi
10949
10950if test "x$enable_hotspot_test_in_build" = "xyes"; then
10951    TEST_IN_BUILD=true
10952else
10953    TEST_IN_BUILD=false
10954fi
10955
10956
10957###############################################################################
10958#
10959# Choose cacerts source file
10960#
10961
10962# Check whether --with-cacerts-file was given.
10963if test "${with_cacerts_file+set}" = set; then :
10964  withval=$with_cacerts_file;
10965fi
10966
10967if test "x$with_cacerts_file" != x; then
10968    CACERTS_FILE=$with_cacerts_file
10969else
10970    CACERTS_FILE=${SRC_ROOT}/jdk/src/share/lib/security/cacerts
10971fi
10972
10973
10974###############################################################################
10975#
10976# Enable or disable unlimited crypto
10977#
10978# Check whether --enable-unlimited-crypto was given.
10979if test "${enable_unlimited_crypto+set}" = set; then :
10980  enableval=$enable_unlimited_crypto;
10981else
10982  enable_unlimited_crypto=no
10983fi
10984
10985if test "x$enable_unlimited_crypto" = "xyes"; then
10986    UNLIMITED_CRYPTO=true
10987else
10988    UNLIMITED_CRYPTO=false
10989fi
10990
10991
10992###############################################################################
10993#
10994# Enable or disable the elliptic curve crypto implementation
10995#
10996
10997
10998###############################################################################
10999#
11000# Compress jars
11001#
11002COMPRESS_JARS=false
11003
11004
11005
11006
11007# Source the version numbers
11008. $AUTOCONF_DIR/version-numbers
11009
11010# Get the settings from parameters
11011
11012# Check whether --with-milestone was given.
11013if test "${with_milestone+set}" = set; then :
11014  withval=$with_milestone;
11015fi
11016
11017if test "x$with_milestone" = xyes; then
11018  as_fn_error $? "Milestone must have a value" "$LINENO" 5
11019elif test "x$with_milestone" != x; then
11020    MILESTONE="$with_milestone"
11021fi
11022if test "x$MILESTONE" = x; then
11023  MILESTONE=internal
11024fi
11025
11026
11027# Check whether --with-update-version was given.
11028if test "${with_update_version+set}" = set; then :
11029  withval=$with_update_version;
11030fi
11031
11032if test "x$with_update_version" = xyes; then
11033  as_fn_error $? "Update version must have a value" "$LINENO" 5
11034elif test "x$with_update_version" != x; then
11035  JDK_UPDATE_VERSION="$with_update_version"
11036fi
11037
11038
11039# Check whether --with-build-number was given.
11040if test "${with_build_number+set}" = set; then :
11041  withval=$with_build_number;
11042fi
11043
11044if test "x$with_build_number" = xyes; then
11045  as_fn_error $? "Build number must have a value" "$LINENO" 5
11046elif test "x$with_build_number" != x; then
11047  JDK_BUILD_NUMBER="$with_build_number"
11048fi
11049if test "x$JDK_BUILD_NUMBER" = x; then
11050  JDK_BUILD_NUMBER=b00
11051fi
11052
11053
11054# Check whether --with-user-release-suffix was given.
11055if test "${with_user_release_suffix+set}" = set; then :
11056  withval=$with_user_release_suffix;
11057fi
11058
11059if test "x$with_user_release_suffix" = xyes; then
11060  as_fn_error $? "Release suffix must have a value" "$LINENO" 5
11061elif test "x$with_user_release_suffix" != x; then
11062  USER_RELEASE_SUFFIX="$with_user_release_suffix"
11063else
11064  BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
11065  # Avoid [:alnum:] since it depends on the locale.
11066  CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvqxyz0123456789'`
11067  USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11068fi
11069
11070
11071# Now set the JDK version, milestone, build number etc.
11072
11073
11074
11075
11076
11077
11078
11079
11080
11081
11082
11083
11084
11085
11086COPYRIGHT_YEAR=`date +'%Y'`
11087
11088
11089if test "x$JDK_UPDATE_VERSION" != x; then
11090  JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
11091else
11092  JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
11093fi
11094
11095
11096COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
11097
11098
11099
11100###############################################################################
11101#
11102# Setup BootJDK, used to bootstrap the build.
11103#
11104###############################################################################
11105
11106
11107BOOT_JDK_FOUND=no
11108
11109# Check whether --with-boot-jdk was given.
11110if test "${with_boot_jdk+set}" = set; then :
11111  withval=$with_boot_jdk;
11112fi
11113
11114
11115# We look for the Boot JDK through various means, going from more certain to
11116# more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
11117# we detected something (if so, the path to the jdk is in BOOT_JDK). But we
11118# must check if this is indeed valid; otherwise we'll continue looking.
11119
11120# Test: Is bootjdk explicitely set by command line arguments?
11121
11122  if test "x$BOOT_JDK_FOUND" = xno; then
11123    # Now execute the test
11124
11125if test "x$with_boot_jdk" != x; then
11126    BOOT_JDK=$with_boot_jdk
11127    BOOT_JDK_FOUND=maybe
11128    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
11129$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
11130fi
11131
11132
11133    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11134    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11135      # Do we have a bin/java?
11136      if test ! -x "$BOOT_JDK/bin/java"; then
11137        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11138$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11139        BOOT_JDK_FOUND=no
11140      else
11141        # Do we have a bin/javac?
11142        if test ! -x "$BOOT_JDK/bin/javac"; then
11143          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11144$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11145          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11146$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11147          BOOT_JDK_FOUND=no
11148        else
11149          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11150          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11151            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11152$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11153            BOOT_JDK_FOUND=no
11154          else
11155            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11156            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11157
11158            # Extra M4 quote needed to protect [] in grep expression.
11159            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11160            if test "x$FOUND_VERSION_78" = x; then
11161              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11162$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11163              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11164$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11165              BOOT_JDK_FOUND=no
11166            else
11167              # We're done! :-)
11168              BOOT_JDK_FOUND=yes
11169
11170  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11171
11172  # Input might be given as Windows format, start by converting to
11173  # unix format.
11174  path="$BOOT_JDK"
11175  new_path=`$CYGPATH -u "$path"`
11176
11177  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11178  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11179  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11180  # "foo.exe" is OK but "foo" is an error.
11181  #
11182  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11183  # It is also a way to make sure we got the proper file name for the real test later on.
11184  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11185  if test "x$test_shortpath" = x; then
11186    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11187$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11188    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11189  fi
11190
11191  # Call helper function which possibly converts this using DOS-style short mode.
11192  # If so, the updated path is stored in $new_path.
11193
11194  input_path="$new_path"
11195  # Check if we need to convert this using DOS-style short mode. If the path
11196  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11197  # take no chances and rewrite it.
11198  # Note: m4 eats our [], so we need to use [ and ] instead.
11199  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11200  if test "x$has_forbidden_chars" != x; then
11201    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11202    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11203    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11204    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11205      # Going to short mode and back again did indeed matter. Since short mode is
11206      # case insensitive, let's make it lowercase to improve readability.
11207      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11208      # Now convert it back to Unix-stile (cygpath)
11209      input_path=`$CYGPATH -u "$shortmode_path"`
11210      new_path="$input_path"
11211    fi
11212  fi
11213
11214  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11215  if test "x$test_cygdrive_prefix" = x; then
11216    # As a simple fix, exclude /usr/bin since it's not a real path.
11217    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11218      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11219      # a path prefixed by /cygdrive for fixpath to work.
11220      new_path="$CYGWIN_ROOT_PATH$input_path"
11221    fi
11222  fi
11223
11224
11225  if test "x$path" != "x$new_path"; then
11226    BOOT_JDK="$new_path"
11227    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11228$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11229  fi
11230
11231  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11232
11233  path="$BOOT_JDK"
11234  has_colon=`$ECHO $path | $GREP ^.:`
11235  new_path="$path"
11236  if test "x$has_colon" = x; then
11237    # Not in mixed or Windows style, start by that.
11238    new_path=`cmd //c echo $path`
11239  fi
11240
11241
11242  input_path="$new_path"
11243  # Check if we need to convert this using DOS-style short mode. If the path
11244  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11245  # take no chances and rewrite it.
11246  # Note: m4 eats our [], so we need to use [ and ] instead.
11247  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11248  if test "x$has_forbidden_chars" != x; then
11249    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11250    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11251  fi
11252
11253
11254  windows_path="$new_path"
11255  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11256    unix_path=`$CYGPATH -u "$windows_path"`
11257    new_path="$unix_path"
11258  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11259    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11260    new_path="$unix_path"
11261  fi
11262
11263  if test "x$path" != "x$new_path"; then
11264    BOOT_JDK="$new_path"
11265    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11266$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11267  fi
11268
11269  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11270  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11271
11272  else
11273    # We're on a posix platform. Hooray! :)
11274    path="$BOOT_JDK"
11275    has_space=`$ECHO "$path" | $GREP " "`
11276    if test "x$has_space" != x; then
11277      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11278$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11279      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11280    fi
11281
11282    # Use eval to expand a potential ~
11283    eval path="$path"
11284    if test ! -f "$path" && test ! -d "$path"; then
11285      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11286    fi
11287
11288    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
11289  fi
11290
11291              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11292$as_echo_n "checking for Boot JDK... " >&6; }
11293              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11294$as_echo "$BOOT_JDK" >&6; }
11295              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11296$as_echo_n "checking Boot JDK version... " >&6; }
11297              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11298              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11299$as_echo "$BOOT_JDK_VERSION" >&6; }
11300            fi # end check jdk version
11301          fi # end check rt.jar
11302        fi # end check javac
11303      fi # end check java
11304    fi # end check boot jdk found
11305  fi
11306
11307if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
11308  # Having specified an argument which is incorrect will produce an instant failure;
11309  # we should not go on looking
11310  as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
11311fi
11312
11313# Test: Is bootjdk available from builddeps?
11314
11315  if test "x$BOOT_JDK_FOUND" = xno; then
11316    # Now execute the test
11317
11318
11319
11320    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
11321        # Source the builddeps file again, to make sure it uses the latest variables!
11322        . $builddepsfile
11323        # Look for a target and build machine specific resource!
11324        eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
11325        if test "x$resource" = x; then
11326            # Ok, lets instead look for a target specific resource
11327            eval resource=\${builddep_bootjdk_TARGET_${rewritten_target_var}}
11328        fi
11329        if test "x$resource" = x; then
11330            # Ok, lets instead look for a build specific resource
11331            eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}}
11332        fi
11333        if test "x$resource" = x; then
11334            # Ok, lets instead look for a generic resource
11335            # (The bootjdk comes from M4 and not the shell, thus no need for eval here.)
11336            resource=${builddep_bootjdk}
11337        fi
11338        if test "x$resource" != x; then
11339            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for bootjdk" >&5
11340$as_echo "$as_me: Using builddeps $resource for bootjdk" >&6;}
11341	    # If the resource in the builddeps.conf file is an existing directory,
11342	    # for example /java/linux/cups
11343	    if test -d ${resource}; then
11344	       depdir=${resource}
11345	    else
11346
11347# bootjdk is for example mymodule
11348# $resource is for example libs/general/libmymod_1_2_3.zip
11349# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
11350# $with_builddeps_dir is for example /localhome/builddeps
11351# depdir is the name of the variable into which we store the depdir, eg MYMOD
11352# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
11353# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
11354    filename=`basename $resource`
11355    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
11356    filebase=${filename%%.*}
11357    extension=${filename#*.}
11358    installdir=$with_builddeps_dir/$filebase
11359    if test ! -f $installdir/$filename.unpacked; then
11360        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&5
11361$as_echo "$as_me: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&6;}
11362        if test ! -d $installdir; then
11363            mkdir -p $installdir
11364        fi
11365        if test ! -d $installdir; then
11366            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
11367        fi
11368        tmpfile=`mktemp $installdir/bootjdk.XXXXXXXXX`
11369        touch $tmpfile
11370        if test ! -f $tmpfile; then
11371            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
11372        fi
11373
11374    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
11375    # $tmpfile is the local file name for the downloaded file.
11376    VALID_TOOL=no
11377    if test "x$BDEPS_FTP" = xwget; then
11378       VALID_TOOL=yes
11379       wget -O $tmpfile $with_builddeps_server/$resource
11380    fi
11381    if test "x$BDEPS_FTP" = xlftp; then
11382       VALID_TOOL=yes
11383       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
11384    fi
11385    if test "x$BDEPS_FTP" = xftp; then
11386        VALID_TOOL=yes
11387        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
11388        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
11389        FTPUSERPWD=${FTPSERVER%%@*}
11390        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
11391            FTPUSER=${userpwd%%:*}
11392            FTPPWD=${userpwd#*@}
11393            FTPSERVER=${FTPSERVER#*@}
11394        else
11395            FTPUSER=ftp
11396            FTPPWD=ftp
11397        fi
11398        # the "pass" command does not work on some
11399        # ftp clients (read ftp.exe) but if it works,
11400        # passive mode is better!
11401        (\
11402            echo "user $FTPUSER $FTPPWD"        ;\
11403            echo "pass"                         ;\
11404            echo "bin"                          ;\
11405            echo "get $FTPPATH $tmpfile"              ;\
11406        ) | ftp -in $FTPSERVER
11407    fi
11408    if test "x$VALID_TOOL" != xyes; then
11409       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
11410    fi
11411
11412        mv $tmpfile $installdir/$filename
11413        if test ! -s $installdir/$filename; then
11414            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
11415        fi
11416        case "$extension" in
11417            zip)  echo "Unzipping $installdir/$filename..."
11418               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
11419            ;;
11420            tar.gz) echo "Untaring $installdir/$filename..."
11421               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
11422            ;;
11423            tgz) echo "Untaring $installdir/$filename..."
11424               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
11425            ;;
11426            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
11427            ;;
11428        esac
11429    fi
11430    if test -f $installdir/$filename.unpacked; then
11431        depdir=$installdir
11432    fi
11433
11434	    fi
11435            # Source the builddeps file again, because in the previous command, the depdir
11436            # was updated to point at the current build dependency install directory.
11437            . $builddepsfile
11438            # Now extract variables from the builddeps.conf files.
11439            theroot=${builddep_bootjdk_ROOT}
11440            thecflags=${builddep_bootjdk_CFLAGS}
11441            thelibs=${builddep_bootjdk_LIBS}
11442            if test "x$depdir" = x; then
11443                as_fn_error $? "Could not download build dependency bootjdk" "$LINENO" 5
11444            fi
11445            BOOT_JDK=$depdir
11446            if test "x$theroot" != x; then
11447               BOOT_JDK="$theroot"
11448            fi
11449            if test "x$thecflags" != x; then
11450               BOOT_JDK_CFLAGS="$thecflags"
11451            fi
11452            if test "x$thelibs" != x; then
11453               BOOT_JDK_LIBS="$thelibs"
11454            fi
11455            BOOT_JDK_FOUND=maybe
11456            else BOOT_JDK_FOUND=no
11457
11458        fi
11459        else BOOT_JDK_FOUND=no
11460
11461    fi
11462
11463
11464
11465    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11466    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11467      # Do we have a bin/java?
11468      if test ! -x "$BOOT_JDK/bin/java"; then
11469        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11470$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11471        BOOT_JDK_FOUND=no
11472      else
11473        # Do we have a bin/javac?
11474        if test ! -x "$BOOT_JDK/bin/javac"; then
11475          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11476$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11477          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11478$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11479          BOOT_JDK_FOUND=no
11480        else
11481          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11482          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11483            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11484$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11485            BOOT_JDK_FOUND=no
11486          else
11487            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11488            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11489
11490            # Extra M4 quote needed to protect [] in grep expression.
11491            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11492            if test "x$FOUND_VERSION_78" = x; then
11493              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11494$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11495              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11496$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11497              BOOT_JDK_FOUND=no
11498            else
11499              # We're done! :-)
11500              BOOT_JDK_FOUND=yes
11501
11502  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11503
11504  # Input might be given as Windows format, start by converting to
11505  # unix format.
11506  path="$BOOT_JDK"
11507  new_path=`$CYGPATH -u "$path"`
11508
11509  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11510  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11511  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11512  # "foo.exe" is OK but "foo" is an error.
11513  #
11514  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11515  # It is also a way to make sure we got the proper file name for the real test later on.
11516  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11517  if test "x$test_shortpath" = x; then
11518    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11519$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11520    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11521  fi
11522
11523  # Call helper function which possibly converts this using DOS-style short mode.
11524  # If so, the updated path is stored in $new_path.
11525
11526  input_path="$new_path"
11527  # Check if we need to convert this using DOS-style short mode. If the path
11528  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11529  # take no chances and rewrite it.
11530  # Note: m4 eats our [], so we need to use [ and ] instead.
11531  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11532  if test "x$has_forbidden_chars" != x; then
11533    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11534    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11535    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11536    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11537      # Going to short mode and back again did indeed matter. Since short mode is
11538      # case insensitive, let's make it lowercase to improve readability.
11539      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11540      # Now convert it back to Unix-stile (cygpath)
11541      input_path=`$CYGPATH -u "$shortmode_path"`
11542      new_path="$input_path"
11543    fi
11544  fi
11545
11546  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11547  if test "x$test_cygdrive_prefix" = x; then
11548    # As a simple fix, exclude /usr/bin since it's not a real path.
11549    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11550      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11551      # a path prefixed by /cygdrive for fixpath to work.
11552      new_path="$CYGWIN_ROOT_PATH$input_path"
11553    fi
11554  fi
11555
11556
11557  if test "x$path" != "x$new_path"; then
11558    BOOT_JDK="$new_path"
11559    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11560$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11561  fi
11562
11563  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11564
11565  path="$BOOT_JDK"
11566  has_colon=`$ECHO $path | $GREP ^.:`
11567  new_path="$path"
11568  if test "x$has_colon" = x; then
11569    # Not in mixed or Windows style, start by that.
11570    new_path=`cmd //c echo $path`
11571  fi
11572
11573
11574  input_path="$new_path"
11575  # Check if we need to convert this using DOS-style short mode. If the path
11576  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11577  # take no chances and rewrite it.
11578  # Note: m4 eats our [], so we need to use [ and ] instead.
11579  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11580  if test "x$has_forbidden_chars" != x; then
11581    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11582    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11583  fi
11584
11585
11586  windows_path="$new_path"
11587  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11588    unix_path=`$CYGPATH -u "$windows_path"`
11589    new_path="$unix_path"
11590  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11591    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11592    new_path="$unix_path"
11593  fi
11594
11595  if test "x$path" != "x$new_path"; then
11596    BOOT_JDK="$new_path"
11597    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11598$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11599  fi
11600
11601  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11602  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11603
11604  else
11605    # We're on a posix platform. Hooray! :)
11606    path="$BOOT_JDK"
11607    has_space=`$ECHO "$path" | $GREP " "`
11608    if test "x$has_space" != x; then
11609      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11610$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11611      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11612    fi
11613
11614    # Use eval to expand a potential ~
11615    eval path="$path"
11616    if test ! -f "$path" && test ! -d "$path"; then
11617      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11618    fi
11619
11620    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
11621  fi
11622
11623              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11624$as_echo_n "checking for Boot JDK... " >&6; }
11625              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11626$as_echo "$BOOT_JDK" >&6; }
11627              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11628$as_echo_n "checking Boot JDK version... " >&6; }
11629              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11630              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11631$as_echo "$BOOT_JDK_VERSION" >&6; }
11632            fi # end check jdk version
11633          fi # end check rt.jar
11634        fi # end check javac
11635      fi # end check java
11636    fi # end check boot jdk found
11637  fi
11638
11639
11640# Test: Is $JAVA_HOME set?
11641
11642  if test "x$BOOT_JDK_FOUND" = xno; then
11643    # Now execute the test
11644
11645    if test "x$JAVA_HOME" != x; then
11646        JAVA_HOME_PROCESSED="$JAVA_HOME"
11647
11648  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11649
11650  # Input might be given as Windows format, start by converting to
11651  # unix format.
11652  path="$JAVA_HOME_PROCESSED"
11653  new_path=`$CYGPATH -u "$path"`
11654
11655  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11656  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11657  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11658  # "foo.exe" is OK but "foo" is an error.
11659  #
11660  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11661  # It is also a way to make sure we got the proper file name for the real test later on.
11662  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11663  if test "x$test_shortpath" = x; then
11664    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
11665$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
11666    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
11667  fi
11668
11669  # Call helper function which possibly converts this using DOS-style short mode.
11670  # If so, the updated path is stored in $new_path.
11671
11672  input_path="$new_path"
11673  # Check if we need to convert this using DOS-style short mode. If the path
11674  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11675  # take no chances and rewrite it.
11676  # Note: m4 eats our [], so we need to use [ and ] instead.
11677  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11678  if test "x$has_forbidden_chars" != x; then
11679    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11680    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11681    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11682    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11683      # Going to short mode and back again did indeed matter. Since short mode is
11684      # case insensitive, let's make it lowercase to improve readability.
11685      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11686      # Now convert it back to Unix-stile (cygpath)
11687      input_path=`$CYGPATH -u "$shortmode_path"`
11688      new_path="$input_path"
11689    fi
11690  fi
11691
11692  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11693  if test "x$test_cygdrive_prefix" = x; then
11694    # As a simple fix, exclude /usr/bin since it's not a real path.
11695    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11696      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11697      # a path prefixed by /cygdrive for fixpath to work.
11698      new_path="$CYGWIN_ROOT_PATH$input_path"
11699    fi
11700  fi
11701
11702
11703  if test "x$path" != "x$new_path"; then
11704    JAVA_HOME_PROCESSED="$new_path"
11705    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
11706$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
11707  fi
11708
11709  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11710
11711  path="$JAVA_HOME_PROCESSED"
11712  has_colon=`$ECHO $path | $GREP ^.:`
11713  new_path="$path"
11714  if test "x$has_colon" = x; then
11715    # Not in mixed or Windows style, start by that.
11716    new_path=`cmd //c echo $path`
11717  fi
11718
11719
11720  input_path="$new_path"
11721  # Check if we need to convert this using DOS-style short mode. If the path
11722  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11723  # take no chances and rewrite it.
11724  # Note: m4 eats our [], so we need to use [ and ] instead.
11725  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11726  if test "x$has_forbidden_chars" != x; then
11727    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11728    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11729  fi
11730
11731
11732  windows_path="$new_path"
11733  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11734    unix_path=`$CYGPATH -u "$windows_path"`
11735    new_path="$unix_path"
11736  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11737    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11738    new_path="$unix_path"
11739  fi
11740
11741  if test "x$path" != "x$new_path"; then
11742    JAVA_HOME_PROCESSED="$new_path"
11743    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
11744$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
11745  fi
11746
11747  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11748  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11749
11750  else
11751    # We're on a posix platform. Hooray! :)
11752    path="$JAVA_HOME_PROCESSED"
11753    has_space=`$ECHO "$path" | $GREP " "`
11754    if test "x$has_space" != x; then
11755      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
11756$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
11757      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11758    fi
11759
11760    # Use eval to expand a potential ~
11761    eval path="$path"
11762    if test ! -f "$path" && test ! -d "$path"; then
11763      as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
11764    fi
11765
11766    JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
11767  fi
11768
11769        if test ! -d "$JAVA_HOME_PROCESSED"; then
11770            { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
11771$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
11772        else
11773          # Aha, the user has set a JAVA_HOME
11774          # let us use that as the Boot JDK.
11775          BOOT_JDK="$JAVA_HOME_PROCESSED"
11776          BOOT_JDK_FOUND=maybe
11777          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
11778$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
11779        fi
11780    fi
11781
11782
11783    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11784    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11785      # Do we have a bin/java?
11786      if test ! -x "$BOOT_JDK/bin/java"; then
11787        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11788$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11789        BOOT_JDK_FOUND=no
11790      else
11791        # Do we have a bin/javac?
11792        if test ! -x "$BOOT_JDK/bin/javac"; then
11793          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11794$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11795          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11796$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11797          BOOT_JDK_FOUND=no
11798        else
11799          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11800          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11801            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11802$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11803            BOOT_JDK_FOUND=no
11804          else
11805            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11806            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11807
11808            # Extra M4 quote needed to protect [] in grep expression.
11809            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11810            if test "x$FOUND_VERSION_78" = x; then
11811              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11812$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11813              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11814$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11815              BOOT_JDK_FOUND=no
11816            else
11817              # We're done! :-)
11818              BOOT_JDK_FOUND=yes
11819
11820  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11821
11822  # Input might be given as Windows format, start by converting to
11823  # unix format.
11824  path="$BOOT_JDK"
11825  new_path=`$CYGPATH -u "$path"`
11826
11827  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11828  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11829  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11830  # "foo.exe" is OK but "foo" is an error.
11831  #
11832  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11833  # It is also a way to make sure we got the proper file name for the real test later on.
11834  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11835  if test "x$test_shortpath" = x; then
11836    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11837$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11838    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11839  fi
11840
11841  # Call helper function which possibly converts this using DOS-style short mode.
11842  # If so, the updated path is stored in $new_path.
11843
11844  input_path="$new_path"
11845  # Check if we need to convert this using DOS-style short mode. If the path
11846  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11847  # take no chances and rewrite it.
11848  # Note: m4 eats our [], so we need to use [ and ] instead.
11849  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11850  if test "x$has_forbidden_chars" != x; then
11851    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11852    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11853    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11854    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11855      # Going to short mode and back again did indeed matter. Since short mode is
11856      # case insensitive, let's make it lowercase to improve readability.
11857      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11858      # Now convert it back to Unix-stile (cygpath)
11859      input_path=`$CYGPATH -u "$shortmode_path"`
11860      new_path="$input_path"
11861    fi
11862  fi
11863
11864  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11865  if test "x$test_cygdrive_prefix" = x; then
11866    # As a simple fix, exclude /usr/bin since it's not a real path.
11867    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11868      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11869      # a path prefixed by /cygdrive for fixpath to work.
11870      new_path="$CYGWIN_ROOT_PATH$input_path"
11871    fi
11872  fi
11873
11874
11875  if test "x$path" != "x$new_path"; then
11876    BOOT_JDK="$new_path"
11877    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11878$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11879  fi
11880
11881  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11882
11883  path="$BOOT_JDK"
11884  has_colon=`$ECHO $path | $GREP ^.:`
11885  new_path="$path"
11886  if test "x$has_colon" = x; then
11887    # Not in mixed or Windows style, start by that.
11888    new_path=`cmd //c echo $path`
11889  fi
11890
11891
11892  input_path="$new_path"
11893  # Check if we need to convert this using DOS-style short mode. If the path
11894  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11895  # take no chances and rewrite it.
11896  # Note: m4 eats our [], so we need to use [ and ] instead.
11897  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11898  if test "x$has_forbidden_chars" != x; then
11899    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11900    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11901  fi
11902
11903
11904  windows_path="$new_path"
11905  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11906    unix_path=`$CYGPATH -u "$windows_path"`
11907    new_path="$unix_path"
11908  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11909    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11910    new_path="$unix_path"
11911  fi
11912
11913  if test "x$path" != "x$new_path"; then
11914    BOOT_JDK="$new_path"
11915    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11916$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11917  fi
11918
11919  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11920  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11921
11922  else
11923    # We're on a posix platform. Hooray! :)
11924    path="$BOOT_JDK"
11925    has_space=`$ECHO "$path" | $GREP " "`
11926    if test "x$has_space" != x; then
11927      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11928$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11929      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11930    fi
11931
11932    # Use eval to expand a potential ~
11933    eval path="$path"
11934    if test ! -f "$path" && test ! -d "$path"; then
11935      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11936    fi
11937
11938    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
11939  fi
11940
11941              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11942$as_echo_n "checking for Boot JDK... " >&6; }
11943              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11944$as_echo "$BOOT_JDK" >&6; }
11945              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11946$as_echo_n "checking Boot JDK version... " >&6; }
11947              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11948              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11949$as_echo "$BOOT_JDK_VERSION" >&6; }
11950            fi # end check jdk version
11951          fi # end check rt.jar
11952        fi # end check javac
11953      fi # end check java
11954    fi # end check boot jdk found
11955  fi
11956
11957
11958# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
11959
11960  if test "x$BOOT_JDK_FOUND" = xno; then
11961    # Now execute the test
11962
11963    if test -x /usr/libexec/java_home; then
11964        BOOT_JDK=`/usr/libexec/java_home`
11965        BOOT_JDK_FOUND=maybe
11966        { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home" >&5
11967$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home" >&6;}
11968    fi
11969
11970
11971    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11972    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11973      # Do we have a bin/java?
11974      if test ! -x "$BOOT_JDK/bin/java"; then
11975        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11976$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11977        BOOT_JDK_FOUND=no
11978      else
11979        # Do we have a bin/javac?
11980        if test ! -x "$BOOT_JDK/bin/javac"; then
11981          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11982$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11983          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11984$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11985          BOOT_JDK_FOUND=no
11986        else
11987          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11988          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11989            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11990$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11991            BOOT_JDK_FOUND=no
11992          else
11993            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11994            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11995
11996            # Extra M4 quote needed to protect [] in grep expression.
11997            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11998            if test "x$FOUND_VERSION_78" = x; then
11999              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12000$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12001              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12002$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12003              BOOT_JDK_FOUND=no
12004            else
12005              # We're done! :-)
12006              BOOT_JDK_FOUND=yes
12007
12008  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12009
12010  # Input might be given as Windows format, start by converting to
12011  # unix format.
12012  path="$BOOT_JDK"
12013  new_path=`$CYGPATH -u "$path"`
12014
12015  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12016  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12017  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12018  # "foo.exe" is OK but "foo" is an error.
12019  #
12020  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12021  # It is also a way to make sure we got the proper file name for the real test later on.
12022  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12023  if test "x$test_shortpath" = x; then
12024    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12025$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12026    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12027  fi
12028
12029  # Call helper function which possibly converts this using DOS-style short mode.
12030  # If so, the updated path is stored in $new_path.
12031
12032  input_path="$new_path"
12033  # Check if we need to convert this using DOS-style short mode. If the path
12034  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12035  # take no chances and rewrite it.
12036  # Note: m4 eats our [], so we need to use [ and ] instead.
12037  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12038  if test "x$has_forbidden_chars" != x; then
12039    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12040    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12041    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12042    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12043      # Going to short mode and back again did indeed matter. Since short mode is
12044      # case insensitive, let's make it lowercase to improve readability.
12045      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12046      # Now convert it back to Unix-stile (cygpath)
12047      input_path=`$CYGPATH -u "$shortmode_path"`
12048      new_path="$input_path"
12049    fi
12050  fi
12051
12052  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12053  if test "x$test_cygdrive_prefix" = x; then
12054    # As a simple fix, exclude /usr/bin since it's not a real path.
12055    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12056      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12057      # a path prefixed by /cygdrive for fixpath to work.
12058      new_path="$CYGWIN_ROOT_PATH$input_path"
12059    fi
12060  fi
12061
12062
12063  if test "x$path" != "x$new_path"; then
12064    BOOT_JDK="$new_path"
12065    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12066$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12067  fi
12068
12069  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12070
12071  path="$BOOT_JDK"
12072  has_colon=`$ECHO $path | $GREP ^.:`
12073  new_path="$path"
12074  if test "x$has_colon" = x; then
12075    # Not in mixed or Windows style, start by that.
12076    new_path=`cmd //c echo $path`
12077  fi
12078
12079
12080  input_path="$new_path"
12081  # Check if we need to convert this using DOS-style short mode. If the path
12082  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12083  # take no chances and rewrite it.
12084  # Note: m4 eats our [], so we need to use [ and ] instead.
12085  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12086  if test "x$has_forbidden_chars" != x; then
12087    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12088    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12089  fi
12090
12091
12092  windows_path="$new_path"
12093  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12094    unix_path=`$CYGPATH -u "$windows_path"`
12095    new_path="$unix_path"
12096  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12097    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12098    new_path="$unix_path"
12099  fi
12100
12101  if test "x$path" != "x$new_path"; then
12102    BOOT_JDK="$new_path"
12103    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12104$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12105  fi
12106
12107  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12108  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12109
12110  else
12111    # We're on a posix platform. Hooray! :)
12112    path="$BOOT_JDK"
12113    has_space=`$ECHO "$path" | $GREP " "`
12114    if test "x$has_space" != x; then
12115      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12116$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12117      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12118    fi
12119
12120    # Use eval to expand a potential ~
12121    eval path="$path"
12122    if test ! -f "$path" && test ! -d "$path"; then
12123      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12124    fi
12125
12126    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
12127  fi
12128
12129              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12130$as_echo_n "checking for Boot JDK... " >&6; }
12131              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12132$as_echo "$BOOT_JDK" >&6; }
12133              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12134$as_echo_n "checking Boot JDK version... " >&6; }
12135              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12136              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12137$as_echo "$BOOT_JDK_VERSION" >&6; }
12138            fi # end check jdk version
12139          fi # end check rt.jar
12140        fi # end check javac
12141      fi # end check java
12142    fi # end check boot jdk found
12143  fi
12144
12145
12146# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
12147
12148  if test "x$BOOT_JDK_FOUND" = xno; then
12149    # Now execute the test
12150
12151    # Extract the first word of "javac", so it can be a program name with args.
12152set dummy javac; ac_word=$2
12153{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12154$as_echo_n "checking for $ac_word... " >&6; }
12155if ${ac_cv_path_JAVAC_CHECK+:} false; then :
12156  $as_echo_n "(cached) " >&6
12157else
12158  case $JAVAC_CHECK in
12159  [\\/]* | ?:[\\/]*)
12160  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
12161  ;;
12162  *)
12163  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12164for as_dir in $PATH
12165do
12166  IFS=$as_save_IFS
12167  test -z "$as_dir" && as_dir=.
12168    for ac_exec_ext in '' $ac_executable_extensions; do
12169  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12170    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
12171    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12172    break 2
12173  fi
12174done
12175  done
12176IFS=$as_save_IFS
12177
12178  ;;
12179esac
12180fi
12181JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
12182if test -n "$JAVAC_CHECK"; then
12183  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
12184$as_echo "$JAVAC_CHECK" >&6; }
12185else
12186  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12187$as_echo "no" >&6; }
12188fi
12189
12190
12191    # Extract the first word of "java", so it can be a program name with args.
12192set dummy java; ac_word=$2
12193{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12194$as_echo_n "checking for $ac_word... " >&6; }
12195if ${ac_cv_path_JAVA_CHECK+:} false; then :
12196  $as_echo_n "(cached) " >&6
12197else
12198  case $JAVA_CHECK in
12199  [\\/]* | ?:[\\/]*)
12200  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
12201  ;;
12202  *)
12203  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12204for as_dir in $PATH
12205do
12206  IFS=$as_save_IFS
12207  test -z "$as_dir" && as_dir=.
12208    for ac_exec_ext in '' $ac_executable_extensions; do
12209  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12210    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
12211    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12212    break 2
12213  fi
12214done
12215  done
12216IFS=$as_save_IFS
12217
12218  ;;
12219esac
12220fi
12221JAVA_CHECK=$ac_cv_path_JAVA_CHECK
12222if test -n "$JAVA_CHECK"; then
12223  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
12224$as_echo "$JAVA_CHECK" >&6; }
12225else
12226  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12227$as_echo "no" >&6; }
12228fi
12229
12230
12231    BINARY="$JAVAC_CHECK"
12232    if test "x$JAVAC_CHECK" = x; then
12233        BINARY="$JAVA_CHECK"
12234    fi
12235    if test "x$BINARY" != x; then
12236        # So there is a java(c) binary, it might be part of a JDK.
12237        # Lets find the JDK/JRE directory by following symbolic links.
12238        # Linux/GNU systems often have links from /usr/bin/java to
12239        # /etc/alternatives/java to the real JDK binary.
12240
12241    if test "x$OPENJDK_BUILD_OS" != xwindows; then
12242        # Follow a chain of symbolic links. Use readlink
12243        # where it exists, else fall back to horribly
12244        # complicated shell code.
12245        if test "x$READLINK_TESTED" != yes; then
12246            # On MacOSX there is a readlink tool with a different
12247            # purpose than the GNU readlink tool. Check the found readlink.
12248            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
12249            if test "x$ISGNU" = x; then
12250                 # A readlink that we do not know how to use.
12251                 # Are there other non-GNU readlinks out there?
12252                 READLINK_TESTED=yes
12253                 READLINK=
12254            fi
12255        fi
12256
12257        if test "x$READLINK" != x; then
12258            BINARY=`$READLINK -f $BINARY`
12259        else
12260            # Save the current directory for restoring afterwards
12261            STARTDIR=$PWD
12262            COUNTER=0
12263            sym_link_dir=`$DIRNAME $BINARY`
12264            sym_link_file=`$BASENAME $BINARY`
12265            cd $sym_link_dir
12266            # Use -P flag to resolve symlinks in directories.
12267            cd `$THEPWDCMD -P`
12268            sym_link_dir=`$THEPWDCMD -P`
12269            # Resolve file symlinks
12270            while test $COUNTER -lt 20; do
12271                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
12272                if test "x$ISLINK" == x; then
12273                    # This is not a symbolic link! We are done!
12274                    break
12275                fi
12276                # Again resolve directory symlinks since the target of the just found
12277                # link could be in a different directory
12278                cd `$DIRNAME $ISLINK`
12279                sym_link_dir=`$THEPWDCMD -P`
12280                sym_link_file=`$BASENAME $ISLINK`
12281                let COUNTER=COUNTER+1
12282            done
12283            cd $STARTDIR
12284            BINARY=$sym_link_dir/$sym_link_file
12285        fi
12286    fi
12287
12288        BOOT_JDK=`dirname "$BINARY"`
12289        BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
12290        if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
12291            # Looks like we found ourselves an JDK
12292            BOOT_JDK_FOUND=maybe
12293            { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
12294$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
12295        fi
12296    fi
12297
12298
12299    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12300    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12301      # Do we have a bin/java?
12302      if test ! -x "$BOOT_JDK/bin/java"; then
12303        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12304$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12305        BOOT_JDK_FOUND=no
12306      else
12307        # Do we have a bin/javac?
12308        if test ! -x "$BOOT_JDK/bin/javac"; then
12309          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12310$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12311          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12312$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12313          BOOT_JDK_FOUND=no
12314        else
12315          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12316          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12317            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12318$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12319            BOOT_JDK_FOUND=no
12320          else
12321            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12322            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12323
12324            # Extra M4 quote needed to protect [] in grep expression.
12325            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12326            if test "x$FOUND_VERSION_78" = x; then
12327              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12328$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12329              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12330$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12331              BOOT_JDK_FOUND=no
12332            else
12333              # We're done! :-)
12334              BOOT_JDK_FOUND=yes
12335
12336  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12337
12338  # Input might be given as Windows format, start by converting to
12339  # unix format.
12340  path="$BOOT_JDK"
12341  new_path=`$CYGPATH -u "$path"`
12342
12343  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12344  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12345  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12346  # "foo.exe" is OK but "foo" is an error.
12347  #
12348  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12349  # It is also a way to make sure we got the proper file name for the real test later on.
12350  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12351  if test "x$test_shortpath" = x; then
12352    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12353$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12354    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12355  fi
12356
12357  # Call helper function which possibly converts this using DOS-style short mode.
12358  # If so, the updated path is stored in $new_path.
12359
12360  input_path="$new_path"
12361  # Check if we need to convert this using DOS-style short mode. If the path
12362  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12363  # take no chances and rewrite it.
12364  # Note: m4 eats our [], so we need to use [ and ] instead.
12365  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12366  if test "x$has_forbidden_chars" != x; then
12367    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12368    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12369    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12370    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12371      # Going to short mode and back again did indeed matter. Since short mode is
12372      # case insensitive, let's make it lowercase to improve readability.
12373      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12374      # Now convert it back to Unix-stile (cygpath)
12375      input_path=`$CYGPATH -u "$shortmode_path"`
12376      new_path="$input_path"
12377    fi
12378  fi
12379
12380  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12381  if test "x$test_cygdrive_prefix" = x; then
12382    # As a simple fix, exclude /usr/bin since it's not a real path.
12383    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12384      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12385      # a path prefixed by /cygdrive for fixpath to work.
12386      new_path="$CYGWIN_ROOT_PATH$input_path"
12387    fi
12388  fi
12389
12390
12391  if test "x$path" != "x$new_path"; then
12392    BOOT_JDK="$new_path"
12393    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12394$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12395  fi
12396
12397  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12398
12399  path="$BOOT_JDK"
12400  has_colon=`$ECHO $path | $GREP ^.:`
12401  new_path="$path"
12402  if test "x$has_colon" = x; then
12403    # Not in mixed or Windows style, start by that.
12404    new_path=`cmd //c echo $path`
12405  fi
12406
12407
12408  input_path="$new_path"
12409  # Check if we need to convert this using DOS-style short mode. If the path
12410  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12411  # take no chances and rewrite it.
12412  # Note: m4 eats our [], so we need to use [ and ] instead.
12413  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12414  if test "x$has_forbidden_chars" != x; then
12415    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12416    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12417  fi
12418
12419
12420  windows_path="$new_path"
12421  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12422    unix_path=`$CYGPATH -u "$windows_path"`
12423    new_path="$unix_path"
12424  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12425    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12426    new_path="$unix_path"
12427  fi
12428
12429  if test "x$path" != "x$new_path"; then
12430    BOOT_JDK="$new_path"
12431    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12432$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12433  fi
12434
12435  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12436  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12437
12438  else
12439    # We're on a posix platform. Hooray! :)
12440    path="$BOOT_JDK"
12441    has_space=`$ECHO "$path" | $GREP " "`
12442    if test "x$has_space" != x; then
12443      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12444$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12445      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12446    fi
12447
12448    # Use eval to expand a potential ~
12449    eval path="$path"
12450    if test ! -f "$path" && test ! -d "$path"; then
12451      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12452    fi
12453
12454    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
12455  fi
12456
12457              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12458$as_echo_n "checking for Boot JDK... " >&6; }
12459              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12460$as_echo "$BOOT_JDK" >&6; }
12461              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12462$as_echo_n "checking Boot JDK version... " >&6; }
12463              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12464              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12465$as_echo "$BOOT_JDK_VERSION" >&6; }
12466            fi # end check jdk version
12467          fi # end check rt.jar
12468        fi # end check javac
12469      fi # end check java
12470    fi # end check boot jdk found
12471  fi
12472
12473
12474# Test: Is there a JDK installed in default, well-known locations?
12475
12476  if test "x$BOOT_JDK_FOUND" = xno; then
12477    # Now execute the test
12478
12479  if test "x$OPENJDK_TARGET_OS" = xwindows; then
12480
12481  if test "x$BOOT_JDK_FOUND" = xno; then
12482    # Now execute the test
12483
12484  if test "x$ProgramW6432" != x; then
12485    VIRTUAL_DIR="$ProgramW6432/Java"
12486
12487  windows_path="$VIRTUAL_DIR"
12488  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12489    unix_path=`$CYGPATH -u "$windows_path"`
12490    VIRTUAL_DIR="$unix_path"
12491  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12492    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12493    VIRTUAL_DIR="$unix_path"
12494  fi
12495
12496
12497  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
12498  BOOT_JDK_SUFFIX=""
12499  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
12500  if test "x$ALL_JDKS_FOUND" != x; then
12501    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
12502
12503  if test "x$BOOT_JDK_FOUND" = xno; then
12504    # Now execute the test
12505
12506        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
12507        if test -d "$BOOT_JDK"; then
12508          BOOT_JDK_FOUND=maybe
12509          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
12510$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
12511        fi
12512
12513
12514    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12515    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12516      # Do we have a bin/java?
12517      if test ! -x "$BOOT_JDK/bin/java"; then
12518        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12519$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12520        BOOT_JDK_FOUND=no
12521      else
12522        # Do we have a bin/javac?
12523        if test ! -x "$BOOT_JDK/bin/javac"; then
12524          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12525$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12526          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12527$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12528          BOOT_JDK_FOUND=no
12529        else
12530          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12531          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12532            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12533$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12534            BOOT_JDK_FOUND=no
12535          else
12536            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12537            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12538
12539            # Extra M4 quote needed to protect [] in grep expression.
12540            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12541            if test "x$FOUND_VERSION_78" = x; then
12542              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12543$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12544              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12545$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12546              BOOT_JDK_FOUND=no
12547            else
12548              # We're done! :-)
12549              BOOT_JDK_FOUND=yes
12550
12551  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12552
12553  # Input might be given as Windows format, start by converting to
12554  # unix format.
12555  path="$BOOT_JDK"
12556  new_path=`$CYGPATH -u "$path"`
12557
12558  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12559  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12560  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12561  # "foo.exe" is OK but "foo" is an error.
12562  #
12563  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12564  # It is also a way to make sure we got the proper file name for the real test later on.
12565  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12566  if test "x$test_shortpath" = x; then
12567    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12568$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12569    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12570  fi
12571
12572  # Call helper function which possibly converts this using DOS-style short mode.
12573  # If so, the updated path is stored in $new_path.
12574
12575  input_path="$new_path"
12576  # Check if we need to convert this using DOS-style short mode. If the path
12577  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12578  # take no chances and rewrite it.
12579  # Note: m4 eats our [], so we need to use [ and ] instead.
12580  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12581  if test "x$has_forbidden_chars" != x; then
12582    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12583    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12584    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12585    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12586      # Going to short mode and back again did indeed matter. Since short mode is
12587      # case insensitive, let's make it lowercase to improve readability.
12588      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12589      # Now convert it back to Unix-stile (cygpath)
12590      input_path=`$CYGPATH -u "$shortmode_path"`
12591      new_path="$input_path"
12592    fi
12593  fi
12594
12595  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12596  if test "x$test_cygdrive_prefix" = x; then
12597    # As a simple fix, exclude /usr/bin since it's not a real path.
12598    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12599      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12600      # a path prefixed by /cygdrive for fixpath to work.
12601      new_path="$CYGWIN_ROOT_PATH$input_path"
12602    fi
12603  fi
12604
12605
12606  if test "x$path" != "x$new_path"; then
12607    BOOT_JDK="$new_path"
12608    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12609$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12610  fi
12611
12612  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12613
12614  path="$BOOT_JDK"
12615  has_colon=`$ECHO $path | $GREP ^.:`
12616  new_path="$path"
12617  if test "x$has_colon" = x; then
12618    # Not in mixed or Windows style, start by that.
12619    new_path=`cmd //c echo $path`
12620  fi
12621
12622
12623  input_path="$new_path"
12624  # Check if we need to convert this using DOS-style short mode. If the path
12625  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12626  # take no chances and rewrite it.
12627  # Note: m4 eats our [], so we need to use [ and ] instead.
12628  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12629  if test "x$has_forbidden_chars" != x; then
12630    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12631    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12632  fi
12633
12634
12635  windows_path="$new_path"
12636  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12637    unix_path=`$CYGPATH -u "$windows_path"`
12638    new_path="$unix_path"
12639  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12640    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12641    new_path="$unix_path"
12642  fi
12643
12644  if test "x$path" != "x$new_path"; then
12645    BOOT_JDK="$new_path"
12646    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12647$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12648  fi
12649
12650  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12651  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12652
12653  else
12654    # We're on a posix platform. Hooray! :)
12655    path="$BOOT_JDK"
12656    has_space=`$ECHO "$path" | $GREP " "`
12657    if test "x$has_space" != x; then
12658      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12659$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12660      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12661    fi
12662
12663    # Use eval to expand a potential ~
12664    eval path="$path"
12665    if test ! -f "$path" && test ! -d "$path"; then
12666      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12667    fi
12668
12669    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
12670  fi
12671
12672              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12673$as_echo_n "checking for Boot JDK... " >&6; }
12674              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12675$as_echo "$BOOT_JDK" >&6; }
12676              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12677$as_echo_n "checking Boot JDK version... " >&6; }
12678              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12679              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12680$as_echo "$BOOT_JDK_VERSION" >&6; }
12681            fi # end check jdk version
12682          fi # end check rt.jar
12683        fi # end check javac
12684      fi # end check java
12685    fi # end check boot jdk found
12686  fi
12687
12688    done
12689  fi
12690
12691  fi
12692
12693
12694    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12695    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12696      # Do we have a bin/java?
12697      if test ! -x "$BOOT_JDK/bin/java"; then
12698        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12699$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12700        BOOT_JDK_FOUND=no
12701      else
12702        # Do we have a bin/javac?
12703        if test ! -x "$BOOT_JDK/bin/javac"; then
12704          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12705$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12706          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12707$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12708          BOOT_JDK_FOUND=no
12709        else
12710          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12711          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12712            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12713$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12714            BOOT_JDK_FOUND=no
12715          else
12716            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12717            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12718
12719            # Extra M4 quote needed to protect [] in grep expression.
12720            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12721            if test "x$FOUND_VERSION_78" = x; then
12722              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12723$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12724              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12725$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12726              BOOT_JDK_FOUND=no
12727            else
12728              # We're done! :-)
12729              BOOT_JDK_FOUND=yes
12730
12731  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12732
12733  # Input might be given as Windows format, start by converting to
12734  # unix format.
12735  path="$BOOT_JDK"
12736  new_path=`$CYGPATH -u "$path"`
12737
12738  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12739  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12740  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12741  # "foo.exe" is OK but "foo" is an error.
12742  #
12743  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12744  # It is also a way to make sure we got the proper file name for the real test later on.
12745  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12746  if test "x$test_shortpath" = x; then
12747    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12748$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12749    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12750  fi
12751
12752  # Call helper function which possibly converts this using DOS-style short mode.
12753  # If so, the updated path is stored in $new_path.
12754
12755  input_path="$new_path"
12756  # Check if we need to convert this using DOS-style short mode. If the path
12757  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12758  # take no chances and rewrite it.
12759  # Note: m4 eats our [], so we need to use [ and ] instead.
12760  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12761  if test "x$has_forbidden_chars" != x; then
12762    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12763    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12764    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12765    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12766      # Going to short mode and back again did indeed matter. Since short mode is
12767      # case insensitive, let's make it lowercase to improve readability.
12768      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12769      # Now convert it back to Unix-stile (cygpath)
12770      input_path=`$CYGPATH -u "$shortmode_path"`
12771      new_path="$input_path"
12772    fi
12773  fi
12774
12775  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12776  if test "x$test_cygdrive_prefix" = x; then
12777    # As a simple fix, exclude /usr/bin since it's not a real path.
12778    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12779      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12780      # a path prefixed by /cygdrive for fixpath to work.
12781      new_path="$CYGWIN_ROOT_PATH$input_path"
12782    fi
12783  fi
12784
12785
12786  if test "x$path" != "x$new_path"; then
12787    BOOT_JDK="$new_path"
12788    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12789$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12790  fi
12791
12792  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12793
12794  path="$BOOT_JDK"
12795  has_colon=`$ECHO $path | $GREP ^.:`
12796  new_path="$path"
12797  if test "x$has_colon" = x; then
12798    # Not in mixed or Windows style, start by that.
12799    new_path=`cmd //c echo $path`
12800  fi
12801
12802
12803  input_path="$new_path"
12804  # Check if we need to convert this using DOS-style short mode. If the path
12805  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12806  # take no chances and rewrite it.
12807  # Note: m4 eats our [], so we need to use [ and ] instead.
12808  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12809  if test "x$has_forbidden_chars" != x; then
12810    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12811    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12812  fi
12813
12814
12815  windows_path="$new_path"
12816  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12817    unix_path=`$CYGPATH -u "$windows_path"`
12818    new_path="$unix_path"
12819  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12820    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12821    new_path="$unix_path"
12822  fi
12823
12824  if test "x$path" != "x$new_path"; then
12825    BOOT_JDK="$new_path"
12826    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12827$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12828  fi
12829
12830  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12831  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12832
12833  else
12834    # We're on a posix platform. Hooray! :)
12835    path="$BOOT_JDK"
12836    has_space=`$ECHO "$path" | $GREP " "`
12837    if test "x$has_space" != x; then
12838      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12839$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12840      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12841    fi
12842
12843    # Use eval to expand a potential ~
12844    eval path="$path"
12845    if test ! -f "$path" && test ! -d "$path"; then
12846      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12847    fi
12848
12849    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
12850  fi
12851
12852              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12853$as_echo_n "checking for Boot JDK... " >&6; }
12854              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12855$as_echo "$BOOT_JDK" >&6; }
12856              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12857$as_echo_n "checking Boot JDK version... " >&6; }
12858              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12859              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12860$as_echo "$BOOT_JDK_VERSION" >&6; }
12861            fi # end check jdk version
12862          fi # end check rt.jar
12863        fi # end check javac
12864      fi # end check java
12865    fi # end check boot jdk found
12866  fi
12867
12868
12869  if test "x$BOOT_JDK_FOUND" = xno; then
12870    # Now execute the test
12871
12872  if test "x$PROGRAMW6432" != x; then
12873    VIRTUAL_DIR="$PROGRAMW6432/Java"
12874
12875  windows_path="$VIRTUAL_DIR"
12876  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12877    unix_path=`$CYGPATH -u "$windows_path"`
12878    VIRTUAL_DIR="$unix_path"
12879  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12880    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12881    VIRTUAL_DIR="$unix_path"
12882  fi
12883
12884
12885  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
12886  BOOT_JDK_SUFFIX=""
12887  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
12888  if test "x$ALL_JDKS_FOUND" != x; then
12889    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
12890
12891  if test "x$BOOT_JDK_FOUND" = xno; then
12892    # Now execute the test
12893
12894        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
12895        if test -d "$BOOT_JDK"; then
12896          BOOT_JDK_FOUND=maybe
12897          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
12898$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
12899        fi
12900
12901
12902    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12903    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12904      # Do we have a bin/java?
12905      if test ! -x "$BOOT_JDK/bin/java"; then
12906        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12907$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12908        BOOT_JDK_FOUND=no
12909      else
12910        # Do we have a bin/javac?
12911        if test ! -x "$BOOT_JDK/bin/javac"; then
12912          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12913$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12914          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12915$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12916          BOOT_JDK_FOUND=no
12917        else
12918          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12919          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12920            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12921$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12922            BOOT_JDK_FOUND=no
12923          else
12924            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12925            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12926
12927            # Extra M4 quote needed to protect [] in grep expression.
12928            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12929            if test "x$FOUND_VERSION_78" = x; then
12930              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12931$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12932              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12933$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12934              BOOT_JDK_FOUND=no
12935            else
12936              # We're done! :-)
12937              BOOT_JDK_FOUND=yes
12938
12939  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12940
12941  # Input might be given as Windows format, start by converting to
12942  # unix format.
12943  path="$BOOT_JDK"
12944  new_path=`$CYGPATH -u "$path"`
12945
12946  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12947  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12948  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12949  # "foo.exe" is OK but "foo" is an error.
12950  #
12951  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12952  # It is also a way to make sure we got the proper file name for the real test later on.
12953  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12954  if test "x$test_shortpath" = x; then
12955    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12956$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12957    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12958  fi
12959
12960  # Call helper function which possibly converts this using DOS-style short mode.
12961  # If so, the updated path is stored in $new_path.
12962
12963  input_path="$new_path"
12964  # Check if we need to convert this using DOS-style short mode. If the path
12965  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12966  # take no chances and rewrite it.
12967  # Note: m4 eats our [], so we need to use [ and ] instead.
12968  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12969  if test "x$has_forbidden_chars" != x; then
12970    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12971    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12972    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12973    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12974      # Going to short mode and back again did indeed matter. Since short mode is
12975      # case insensitive, let's make it lowercase to improve readability.
12976      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12977      # Now convert it back to Unix-stile (cygpath)
12978      input_path=`$CYGPATH -u "$shortmode_path"`
12979      new_path="$input_path"
12980    fi
12981  fi
12982
12983  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12984  if test "x$test_cygdrive_prefix" = x; then
12985    # As a simple fix, exclude /usr/bin since it's not a real path.
12986    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12987      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12988      # a path prefixed by /cygdrive for fixpath to work.
12989      new_path="$CYGWIN_ROOT_PATH$input_path"
12990    fi
12991  fi
12992
12993
12994  if test "x$path" != "x$new_path"; then
12995    BOOT_JDK="$new_path"
12996    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12997$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12998  fi
12999
13000  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13001
13002  path="$BOOT_JDK"
13003  has_colon=`$ECHO $path | $GREP ^.:`
13004  new_path="$path"
13005  if test "x$has_colon" = x; then
13006    # Not in mixed or Windows style, start by that.
13007    new_path=`cmd //c echo $path`
13008  fi
13009
13010
13011  input_path="$new_path"
13012  # Check if we need to convert this using DOS-style short mode. If the path
13013  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13014  # take no chances and rewrite it.
13015  # Note: m4 eats our [], so we need to use [ and ] instead.
13016  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13017  if test "x$has_forbidden_chars" != x; then
13018    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13019    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13020  fi
13021
13022
13023  windows_path="$new_path"
13024  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13025    unix_path=`$CYGPATH -u "$windows_path"`
13026    new_path="$unix_path"
13027  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13028    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13029    new_path="$unix_path"
13030  fi
13031
13032  if test "x$path" != "x$new_path"; then
13033    BOOT_JDK="$new_path"
13034    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13035$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13036  fi
13037
13038  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13039  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13040
13041  else
13042    # We're on a posix platform. Hooray! :)
13043    path="$BOOT_JDK"
13044    has_space=`$ECHO "$path" | $GREP " "`
13045    if test "x$has_space" != x; then
13046      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13047$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13048      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13049    fi
13050
13051    # Use eval to expand a potential ~
13052    eval path="$path"
13053    if test ! -f "$path" && test ! -d "$path"; then
13054      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13055    fi
13056
13057    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13058  fi
13059
13060              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13061$as_echo_n "checking for Boot JDK... " >&6; }
13062              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13063$as_echo "$BOOT_JDK" >&6; }
13064              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13065$as_echo_n "checking Boot JDK version... " >&6; }
13066              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13067              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13068$as_echo "$BOOT_JDK_VERSION" >&6; }
13069            fi # end check jdk version
13070          fi # end check rt.jar
13071        fi # end check javac
13072      fi # end check java
13073    fi # end check boot jdk found
13074  fi
13075
13076    done
13077  fi
13078
13079  fi
13080
13081
13082    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13083    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13084      # Do we have a bin/java?
13085      if test ! -x "$BOOT_JDK/bin/java"; then
13086        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13087$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13088        BOOT_JDK_FOUND=no
13089      else
13090        # Do we have a bin/javac?
13091        if test ! -x "$BOOT_JDK/bin/javac"; then
13092          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13093$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13094          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13095$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13096          BOOT_JDK_FOUND=no
13097        else
13098          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13099          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13100            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13101$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13102            BOOT_JDK_FOUND=no
13103          else
13104            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13105            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13106
13107            # Extra M4 quote needed to protect [] in grep expression.
13108            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13109            if test "x$FOUND_VERSION_78" = x; then
13110              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13111$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13112              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13113$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13114              BOOT_JDK_FOUND=no
13115            else
13116              # We're done! :-)
13117              BOOT_JDK_FOUND=yes
13118
13119  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13120
13121  # Input might be given as Windows format, start by converting to
13122  # unix format.
13123  path="$BOOT_JDK"
13124  new_path=`$CYGPATH -u "$path"`
13125
13126  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13127  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13128  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13129  # "foo.exe" is OK but "foo" is an error.
13130  #
13131  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13132  # It is also a way to make sure we got the proper file name for the real test later on.
13133  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13134  if test "x$test_shortpath" = x; then
13135    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13136$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13137    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13138  fi
13139
13140  # Call helper function which possibly converts this using DOS-style short mode.
13141  # If so, the updated path is stored in $new_path.
13142
13143  input_path="$new_path"
13144  # Check if we need to convert this using DOS-style short mode. If the path
13145  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13146  # take no chances and rewrite it.
13147  # Note: m4 eats our [], so we need to use [ and ] instead.
13148  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13149  if test "x$has_forbidden_chars" != x; then
13150    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13151    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13152    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13153    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13154      # Going to short mode and back again did indeed matter. Since short mode is
13155      # case insensitive, let's make it lowercase to improve readability.
13156      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13157      # Now convert it back to Unix-stile (cygpath)
13158      input_path=`$CYGPATH -u "$shortmode_path"`
13159      new_path="$input_path"
13160    fi
13161  fi
13162
13163  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13164  if test "x$test_cygdrive_prefix" = x; then
13165    # As a simple fix, exclude /usr/bin since it's not a real path.
13166    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13167      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13168      # a path prefixed by /cygdrive for fixpath to work.
13169      new_path="$CYGWIN_ROOT_PATH$input_path"
13170    fi
13171  fi
13172
13173
13174  if test "x$path" != "x$new_path"; then
13175    BOOT_JDK="$new_path"
13176    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13177$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13178  fi
13179
13180  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13181
13182  path="$BOOT_JDK"
13183  has_colon=`$ECHO $path | $GREP ^.:`
13184  new_path="$path"
13185  if test "x$has_colon" = x; then
13186    # Not in mixed or Windows style, start by that.
13187    new_path=`cmd //c echo $path`
13188  fi
13189
13190
13191  input_path="$new_path"
13192  # Check if we need to convert this using DOS-style short mode. If the path
13193  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13194  # take no chances and rewrite it.
13195  # Note: m4 eats our [], so we need to use [ and ] instead.
13196  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13197  if test "x$has_forbidden_chars" != x; then
13198    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13199    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13200  fi
13201
13202
13203  windows_path="$new_path"
13204  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13205    unix_path=`$CYGPATH -u "$windows_path"`
13206    new_path="$unix_path"
13207  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13208    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13209    new_path="$unix_path"
13210  fi
13211
13212  if test "x$path" != "x$new_path"; then
13213    BOOT_JDK="$new_path"
13214    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13215$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13216  fi
13217
13218  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13219  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13220
13221  else
13222    # We're on a posix platform. Hooray! :)
13223    path="$BOOT_JDK"
13224    has_space=`$ECHO "$path" | $GREP " "`
13225    if test "x$has_space" != x; then
13226      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13227$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13228      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13229    fi
13230
13231    # Use eval to expand a potential ~
13232    eval path="$path"
13233    if test ! -f "$path" && test ! -d "$path"; then
13234      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13235    fi
13236
13237    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13238  fi
13239
13240              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13241$as_echo_n "checking for Boot JDK... " >&6; }
13242              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13243$as_echo "$BOOT_JDK" >&6; }
13244              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13245$as_echo_n "checking Boot JDK version... " >&6; }
13246              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13247              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13248$as_echo "$BOOT_JDK_VERSION" >&6; }
13249            fi # end check jdk version
13250          fi # end check rt.jar
13251        fi # end check javac
13252      fi # end check java
13253    fi # end check boot jdk found
13254  fi
13255
13256
13257  if test "x$BOOT_JDK_FOUND" = xno; then
13258    # Now execute the test
13259
13260  if test "x$PROGRAMFILES" != x; then
13261    VIRTUAL_DIR="$PROGRAMFILES/Java"
13262
13263  windows_path="$VIRTUAL_DIR"
13264  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13265    unix_path=`$CYGPATH -u "$windows_path"`
13266    VIRTUAL_DIR="$unix_path"
13267  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13268    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13269    VIRTUAL_DIR="$unix_path"
13270  fi
13271
13272
13273  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
13274  BOOT_JDK_SUFFIX=""
13275  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13276  if test "x$ALL_JDKS_FOUND" != x; then
13277    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13278
13279  if test "x$BOOT_JDK_FOUND" = xno; then
13280    # Now execute the test
13281
13282        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13283        if test -d "$BOOT_JDK"; then
13284          BOOT_JDK_FOUND=maybe
13285          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13286$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13287        fi
13288
13289
13290    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13291    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13292      # Do we have a bin/java?
13293      if test ! -x "$BOOT_JDK/bin/java"; then
13294        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13295$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13296        BOOT_JDK_FOUND=no
13297      else
13298        # Do we have a bin/javac?
13299        if test ! -x "$BOOT_JDK/bin/javac"; then
13300          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13301$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13302          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13303$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13304          BOOT_JDK_FOUND=no
13305        else
13306          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13307          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13308            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13309$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13310            BOOT_JDK_FOUND=no
13311          else
13312            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13313            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13314
13315            # Extra M4 quote needed to protect [] in grep expression.
13316            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13317            if test "x$FOUND_VERSION_78" = x; then
13318              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13319$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13320              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13321$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13322              BOOT_JDK_FOUND=no
13323            else
13324              # We're done! :-)
13325              BOOT_JDK_FOUND=yes
13326
13327  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13328
13329  # Input might be given as Windows format, start by converting to
13330  # unix format.
13331  path="$BOOT_JDK"
13332  new_path=`$CYGPATH -u "$path"`
13333
13334  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13335  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13336  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13337  # "foo.exe" is OK but "foo" is an error.
13338  #
13339  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13340  # It is also a way to make sure we got the proper file name for the real test later on.
13341  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13342  if test "x$test_shortpath" = x; then
13343    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13344$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13345    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13346  fi
13347
13348  # Call helper function which possibly converts this using DOS-style short mode.
13349  # If so, the updated path is stored in $new_path.
13350
13351  input_path="$new_path"
13352  # Check if we need to convert this using DOS-style short mode. If the path
13353  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13354  # take no chances and rewrite it.
13355  # Note: m4 eats our [], so we need to use [ and ] instead.
13356  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13357  if test "x$has_forbidden_chars" != x; then
13358    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13359    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13360    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13361    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13362      # Going to short mode and back again did indeed matter. Since short mode is
13363      # case insensitive, let's make it lowercase to improve readability.
13364      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13365      # Now convert it back to Unix-stile (cygpath)
13366      input_path=`$CYGPATH -u "$shortmode_path"`
13367      new_path="$input_path"
13368    fi
13369  fi
13370
13371  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13372  if test "x$test_cygdrive_prefix" = x; then
13373    # As a simple fix, exclude /usr/bin since it's not a real path.
13374    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13375      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13376      # a path prefixed by /cygdrive for fixpath to work.
13377      new_path="$CYGWIN_ROOT_PATH$input_path"
13378    fi
13379  fi
13380
13381
13382  if test "x$path" != "x$new_path"; then
13383    BOOT_JDK="$new_path"
13384    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13385$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13386  fi
13387
13388  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13389
13390  path="$BOOT_JDK"
13391  has_colon=`$ECHO $path | $GREP ^.:`
13392  new_path="$path"
13393  if test "x$has_colon" = x; then
13394    # Not in mixed or Windows style, start by that.
13395    new_path=`cmd //c echo $path`
13396  fi
13397
13398
13399  input_path="$new_path"
13400  # Check if we need to convert this using DOS-style short mode. If the path
13401  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13402  # take no chances and rewrite it.
13403  # Note: m4 eats our [], so we need to use [ and ] instead.
13404  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13405  if test "x$has_forbidden_chars" != x; then
13406    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13407    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13408  fi
13409
13410
13411  windows_path="$new_path"
13412  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13413    unix_path=`$CYGPATH -u "$windows_path"`
13414    new_path="$unix_path"
13415  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13416    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13417    new_path="$unix_path"
13418  fi
13419
13420  if test "x$path" != "x$new_path"; then
13421    BOOT_JDK="$new_path"
13422    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13423$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13424  fi
13425
13426  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13427  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13428
13429  else
13430    # We're on a posix platform. Hooray! :)
13431    path="$BOOT_JDK"
13432    has_space=`$ECHO "$path" | $GREP " "`
13433    if test "x$has_space" != x; then
13434      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13435$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13436      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13437    fi
13438
13439    # Use eval to expand a potential ~
13440    eval path="$path"
13441    if test ! -f "$path" && test ! -d "$path"; then
13442      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13443    fi
13444
13445    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13446  fi
13447
13448              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13449$as_echo_n "checking for Boot JDK... " >&6; }
13450              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13451$as_echo "$BOOT_JDK" >&6; }
13452              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13453$as_echo_n "checking Boot JDK version... " >&6; }
13454              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13455              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13456$as_echo "$BOOT_JDK_VERSION" >&6; }
13457            fi # end check jdk version
13458          fi # end check rt.jar
13459        fi # end check javac
13460      fi # end check java
13461    fi # end check boot jdk found
13462  fi
13463
13464    done
13465  fi
13466
13467  fi
13468
13469
13470    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13471    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13472      # Do we have a bin/java?
13473      if test ! -x "$BOOT_JDK/bin/java"; then
13474        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13475$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13476        BOOT_JDK_FOUND=no
13477      else
13478        # Do we have a bin/javac?
13479        if test ! -x "$BOOT_JDK/bin/javac"; then
13480          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13481$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13482          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13483$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13484          BOOT_JDK_FOUND=no
13485        else
13486          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13487          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13488            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13489$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13490            BOOT_JDK_FOUND=no
13491          else
13492            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13493            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13494
13495            # Extra M4 quote needed to protect [] in grep expression.
13496            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13497            if test "x$FOUND_VERSION_78" = x; then
13498              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13499$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13500              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13501$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13502              BOOT_JDK_FOUND=no
13503            else
13504              # We're done! :-)
13505              BOOT_JDK_FOUND=yes
13506
13507  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13508
13509  # Input might be given as Windows format, start by converting to
13510  # unix format.
13511  path="$BOOT_JDK"
13512  new_path=`$CYGPATH -u "$path"`
13513
13514  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13515  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13516  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13517  # "foo.exe" is OK but "foo" is an error.
13518  #
13519  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13520  # It is also a way to make sure we got the proper file name for the real test later on.
13521  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13522  if test "x$test_shortpath" = x; then
13523    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13524$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13525    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13526  fi
13527
13528  # Call helper function which possibly converts this using DOS-style short mode.
13529  # If so, the updated path is stored in $new_path.
13530
13531  input_path="$new_path"
13532  # Check if we need to convert this using DOS-style short mode. If the path
13533  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13534  # take no chances and rewrite it.
13535  # Note: m4 eats our [], so we need to use [ and ] instead.
13536  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13537  if test "x$has_forbidden_chars" != x; then
13538    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13539    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13540    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13541    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13542      # Going to short mode and back again did indeed matter. Since short mode is
13543      # case insensitive, let's make it lowercase to improve readability.
13544      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13545      # Now convert it back to Unix-stile (cygpath)
13546      input_path=`$CYGPATH -u "$shortmode_path"`
13547      new_path="$input_path"
13548    fi
13549  fi
13550
13551  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13552  if test "x$test_cygdrive_prefix" = x; then
13553    # As a simple fix, exclude /usr/bin since it's not a real path.
13554    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13555      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13556      # a path prefixed by /cygdrive for fixpath to work.
13557      new_path="$CYGWIN_ROOT_PATH$input_path"
13558    fi
13559  fi
13560
13561
13562  if test "x$path" != "x$new_path"; then
13563    BOOT_JDK="$new_path"
13564    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13565$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13566  fi
13567
13568  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13569
13570  path="$BOOT_JDK"
13571  has_colon=`$ECHO $path | $GREP ^.:`
13572  new_path="$path"
13573  if test "x$has_colon" = x; then
13574    # Not in mixed or Windows style, start by that.
13575    new_path=`cmd //c echo $path`
13576  fi
13577
13578
13579  input_path="$new_path"
13580  # Check if we need to convert this using DOS-style short mode. If the path
13581  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13582  # take no chances and rewrite it.
13583  # Note: m4 eats our [], so we need to use [ and ] instead.
13584  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13585  if test "x$has_forbidden_chars" != x; then
13586    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13587    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13588  fi
13589
13590
13591  windows_path="$new_path"
13592  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13593    unix_path=`$CYGPATH -u "$windows_path"`
13594    new_path="$unix_path"
13595  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13596    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13597    new_path="$unix_path"
13598  fi
13599
13600  if test "x$path" != "x$new_path"; then
13601    BOOT_JDK="$new_path"
13602    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13603$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13604  fi
13605
13606  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13607  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13608
13609  else
13610    # We're on a posix platform. Hooray! :)
13611    path="$BOOT_JDK"
13612    has_space=`$ECHO "$path" | $GREP " "`
13613    if test "x$has_space" != x; then
13614      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13615$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13616      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13617    fi
13618
13619    # Use eval to expand a potential ~
13620    eval path="$path"
13621    if test ! -f "$path" && test ! -d "$path"; then
13622      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13623    fi
13624
13625    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13626  fi
13627
13628              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13629$as_echo_n "checking for Boot JDK... " >&6; }
13630              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13631$as_echo "$BOOT_JDK" >&6; }
13632              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13633$as_echo_n "checking Boot JDK version... " >&6; }
13634              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13635              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13636$as_echo "$BOOT_JDK_VERSION" >&6; }
13637            fi # end check jdk version
13638          fi # end check rt.jar
13639        fi # end check javac
13640      fi # end check java
13641    fi # end check boot jdk found
13642  fi
13643
13644
13645  if test "x$BOOT_JDK_FOUND" = xno; then
13646    # Now execute the test
13647
13648  if test "x$ProgramFiles" != x; then
13649    VIRTUAL_DIR="$ProgramFiles/Java"
13650
13651  windows_path="$VIRTUAL_DIR"
13652  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13653    unix_path=`$CYGPATH -u "$windows_path"`
13654    VIRTUAL_DIR="$unix_path"
13655  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13656    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13657    VIRTUAL_DIR="$unix_path"
13658  fi
13659
13660
13661  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
13662  BOOT_JDK_SUFFIX=""
13663  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13664  if test "x$ALL_JDKS_FOUND" != x; then
13665    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13666
13667  if test "x$BOOT_JDK_FOUND" = xno; then
13668    # Now execute the test
13669
13670        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13671        if test -d "$BOOT_JDK"; then
13672          BOOT_JDK_FOUND=maybe
13673          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13674$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13675        fi
13676
13677
13678    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13679    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13680      # Do we have a bin/java?
13681      if test ! -x "$BOOT_JDK/bin/java"; then
13682        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13683$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13684        BOOT_JDK_FOUND=no
13685      else
13686        # Do we have a bin/javac?
13687        if test ! -x "$BOOT_JDK/bin/javac"; then
13688          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13689$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13690          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13691$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13692          BOOT_JDK_FOUND=no
13693        else
13694          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13695          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13696            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13697$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13698            BOOT_JDK_FOUND=no
13699          else
13700            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13701            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13702
13703            # Extra M4 quote needed to protect [] in grep expression.
13704            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13705            if test "x$FOUND_VERSION_78" = x; then
13706              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13707$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13708              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13709$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13710              BOOT_JDK_FOUND=no
13711            else
13712              # We're done! :-)
13713              BOOT_JDK_FOUND=yes
13714
13715  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13716
13717  # Input might be given as Windows format, start by converting to
13718  # unix format.
13719  path="$BOOT_JDK"
13720  new_path=`$CYGPATH -u "$path"`
13721
13722  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13723  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13724  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13725  # "foo.exe" is OK but "foo" is an error.
13726  #
13727  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13728  # It is also a way to make sure we got the proper file name for the real test later on.
13729  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13730  if test "x$test_shortpath" = x; then
13731    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13732$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13733    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13734  fi
13735
13736  # Call helper function which possibly converts this using DOS-style short mode.
13737  # If so, the updated path is stored in $new_path.
13738
13739  input_path="$new_path"
13740  # Check if we need to convert this using DOS-style short mode. If the path
13741  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13742  # take no chances and rewrite it.
13743  # Note: m4 eats our [], so we need to use [ and ] instead.
13744  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13745  if test "x$has_forbidden_chars" != x; then
13746    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13747    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13748    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13749    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13750      # Going to short mode and back again did indeed matter. Since short mode is
13751      # case insensitive, let's make it lowercase to improve readability.
13752      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13753      # Now convert it back to Unix-stile (cygpath)
13754      input_path=`$CYGPATH -u "$shortmode_path"`
13755      new_path="$input_path"
13756    fi
13757  fi
13758
13759  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13760  if test "x$test_cygdrive_prefix" = x; then
13761    # As a simple fix, exclude /usr/bin since it's not a real path.
13762    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13763      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13764      # a path prefixed by /cygdrive for fixpath to work.
13765      new_path="$CYGWIN_ROOT_PATH$input_path"
13766    fi
13767  fi
13768
13769
13770  if test "x$path" != "x$new_path"; then
13771    BOOT_JDK="$new_path"
13772    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13773$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13774  fi
13775
13776  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13777
13778  path="$BOOT_JDK"
13779  has_colon=`$ECHO $path | $GREP ^.:`
13780  new_path="$path"
13781  if test "x$has_colon" = x; then
13782    # Not in mixed or Windows style, start by that.
13783    new_path=`cmd //c echo $path`
13784  fi
13785
13786
13787  input_path="$new_path"
13788  # Check if we need to convert this using DOS-style short mode. If the path
13789  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13790  # take no chances and rewrite it.
13791  # Note: m4 eats our [], so we need to use [ and ] instead.
13792  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13793  if test "x$has_forbidden_chars" != x; then
13794    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13795    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13796  fi
13797
13798
13799  windows_path="$new_path"
13800  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13801    unix_path=`$CYGPATH -u "$windows_path"`
13802    new_path="$unix_path"
13803  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13804    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13805    new_path="$unix_path"
13806  fi
13807
13808  if test "x$path" != "x$new_path"; then
13809    BOOT_JDK="$new_path"
13810    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13811$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13812  fi
13813
13814  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13815  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13816
13817  else
13818    # We're on a posix platform. Hooray! :)
13819    path="$BOOT_JDK"
13820    has_space=`$ECHO "$path" | $GREP " "`
13821    if test "x$has_space" != x; then
13822      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13823$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13824      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13825    fi
13826
13827    # Use eval to expand a potential ~
13828    eval path="$path"
13829    if test ! -f "$path" && test ! -d "$path"; then
13830      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13831    fi
13832
13833    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13834  fi
13835
13836              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13837$as_echo_n "checking for Boot JDK... " >&6; }
13838              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13839$as_echo "$BOOT_JDK" >&6; }
13840              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13841$as_echo_n "checking Boot JDK version... " >&6; }
13842              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13843              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13844$as_echo "$BOOT_JDK_VERSION" >&6; }
13845            fi # end check jdk version
13846          fi # end check rt.jar
13847        fi # end check javac
13848      fi # end check java
13849    fi # end check boot jdk found
13850  fi
13851
13852    done
13853  fi
13854
13855  fi
13856
13857
13858    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13859    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13860      # Do we have a bin/java?
13861      if test ! -x "$BOOT_JDK/bin/java"; then
13862        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13863$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13864        BOOT_JDK_FOUND=no
13865      else
13866        # Do we have a bin/javac?
13867        if test ! -x "$BOOT_JDK/bin/javac"; then
13868          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13869$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13870          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13871$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13872          BOOT_JDK_FOUND=no
13873        else
13874          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13875          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13876            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13877$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13878            BOOT_JDK_FOUND=no
13879          else
13880            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13881            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13882
13883            # Extra M4 quote needed to protect [] in grep expression.
13884            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13885            if test "x$FOUND_VERSION_78" = x; then
13886              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13887$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13888              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13889$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13890              BOOT_JDK_FOUND=no
13891            else
13892              # We're done! :-)
13893              BOOT_JDK_FOUND=yes
13894
13895  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13896
13897  # Input might be given as Windows format, start by converting to
13898  # unix format.
13899  path="$BOOT_JDK"
13900  new_path=`$CYGPATH -u "$path"`
13901
13902  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13903  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13904  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13905  # "foo.exe" is OK but "foo" is an error.
13906  #
13907  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13908  # It is also a way to make sure we got the proper file name for the real test later on.
13909  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13910  if test "x$test_shortpath" = x; then
13911    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13912$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13913    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13914  fi
13915
13916  # Call helper function which possibly converts this using DOS-style short mode.
13917  # If so, the updated path is stored in $new_path.
13918
13919  input_path="$new_path"
13920  # Check if we need to convert this using DOS-style short mode. If the path
13921  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13922  # take no chances and rewrite it.
13923  # Note: m4 eats our [], so we need to use [ and ] instead.
13924  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13925  if test "x$has_forbidden_chars" != x; then
13926    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13927    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13928    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13929    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13930      # Going to short mode and back again did indeed matter. Since short mode is
13931      # case insensitive, let's make it lowercase to improve readability.
13932      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13933      # Now convert it back to Unix-stile (cygpath)
13934      input_path=`$CYGPATH -u "$shortmode_path"`
13935      new_path="$input_path"
13936    fi
13937  fi
13938
13939  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13940  if test "x$test_cygdrive_prefix" = x; then
13941    # As a simple fix, exclude /usr/bin since it's not a real path.
13942    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13943      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13944      # a path prefixed by /cygdrive for fixpath to work.
13945      new_path="$CYGWIN_ROOT_PATH$input_path"
13946    fi
13947  fi
13948
13949
13950  if test "x$path" != "x$new_path"; then
13951    BOOT_JDK="$new_path"
13952    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13953$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13954  fi
13955
13956  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13957
13958  path="$BOOT_JDK"
13959  has_colon=`$ECHO $path | $GREP ^.:`
13960  new_path="$path"
13961  if test "x$has_colon" = x; then
13962    # Not in mixed or Windows style, start by that.
13963    new_path=`cmd //c echo $path`
13964  fi
13965
13966
13967  input_path="$new_path"
13968  # Check if we need to convert this using DOS-style short mode. If the path
13969  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13970  # take no chances and rewrite it.
13971  # Note: m4 eats our [], so we need to use [ and ] instead.
13972  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13973  if test "x$has_forbidden_chars" != x; then
13974    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13975    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13976  fi
13977
13978
13979  windows_path="$new_path"
13980  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13981    unix_path=`$CYGPATH -u "$windows_path"`
13982    new_path="$unix_path"
13983  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13984    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13985    new_path="$unix_path"
13986  fi
13987
13988  if test "x$path" != "x$new_path"; then
13989    BOOT_JDK="$new_path"
13990    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13991$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13992  fi
13993
13994  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13995  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13996
13997  else
13998    # We're on a posix platform. Hooray! :)
13999    path="$BOOT_JDK"
14000    has_space=`$ECHO "$path" | $GREP " "`
14001    if test "x$has_space" != x; then
14002      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14003$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14004      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14005    fi
14006
14007    # Use eval to expand a potential ~
14008    eval path="$path"
14009    if test ! -f "$path" && test ! -d "$path"; then
14010      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14011    fi
14012
14013    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14014  fi
14015
14016              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14017$as_echo_n "checking for Boot JDK... " >&6; }
14018              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14019$as_echo "$BOOT_JDK" >&6; }
14020              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14021$as_echo_n "checking Boot JDK version... " >&6; }
14022              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14023              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14024$as_echo "$BOOT_JDK_VERSION" >&6; }
14025            fi # end check jdk version
14026          fi # end check rt.jar
14027        fi # end check javac
14028      fi # end check java
14029    fi # end check boot jdk found
14030  fi
14031
14032
14033  if test "x$BOOT_JDK_FOUND" = xno; then
14034    # Now execute the test
14035
14036  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
14037  BOOT_JDK_SUFFIX=""
14038  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14039  if test "x$ALL_JDKS_FOUND" != x; then
14040    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14041
14042  if test "x$BOOT_JDK_FOUND" = xno; then
14043    # Now execute the test
14044
14045        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14046        if test -d "$BOOT_JDK"; then
14047          BOOT_JDK_FOUND=maybe
14048          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14049$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14050        fi
14051
14052
14053    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14054    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14055      # Do we have a bin/java?
14056      if test ! -x "$BOOT_JDK/bin/java"; then
14057        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14058$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14059        BOOT_JDK_FOUND=no
14060      else
14061        # Do we have a bin/javac?
14062        if test ! -x "$BOOT_JDK/bin/javac"; then
14063          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14064$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14065          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14066$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14067          BOOT_JDK_FOUND=no
14068        else
14069          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14070          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14071            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14072$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14073            BOOT_JDK_FOUND=no
14074          else
14075            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14076            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14077
14078            # Extra M4 quote needed to protect [] in grep expression.
14079            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14080            if test "x$FOUND_VERSION_78" = x; then
14081              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14082$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14083              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14084$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14085              BOOT_JDK_FOUND=no
14086            else
14087              # We're done! :-)
14088              BOOT_JDK_FOUND=yes
14089
14090  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14091
14092  # Input might be given as Windows format, start by converting to
14093  # unix format.
14094  path="$BOOT_JDK"
14095  new_path=`$CYGPATH -u "$path"`
14096
14097  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14098  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14099  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14100  # "foo.exe" is OK but "foo" is an error.
14101  #
14102  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14103  # It is also a way to make sure we got the proper file name for the real test later on.
14104  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14105  if test "x$test_shortpath" = x; then
14106    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14107$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14108    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14109  fi
14110
14111  # Call helper function which possibly converts this using DOS-style short mode.
14112  # If so, the updated path is stored in $new_path.
14113
14114  input_path="$new_path"
14115  # Check if we need to convert this using DOS-style short mode. If the path
14116  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14117  # take no chances and rewrite it.
14118  # Note: m4 eats our [], so we need to use [ and ] instead.
14119  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14120  if test "x$has_forbidden_chars" != x; then
14121    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14122    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14123    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14124    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14125      # Going to short mode and back again did indeed matter. Since short mode is
14126      # case insensitive, let's make it lowercase to improve readability.
14127      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14128      # Now convert it back to Unix-stile (cygpath)
14129      input_path=`$CYGPATH -u "$shortmode_path"`
14130      new_path="$input_path"
14131    fi
14132  fi
14133
14134  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14135  if test "x$test_cygdrive_prefix" = x; then
14136    # As a simple fix, exclude /usr/bin since it's not a real path.
14137    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14138      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14139      # a path prefixed by /cygdrive for fixpath to work.
14140      new_path="$CYGWIN_ROOT_PATH$input_path"
14141    fi
14142  fi
14143
14144
14145  if test "x$path" != "x$new_path"; then
14146    BOOT_JDK="$new_path"
14147    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14148$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14149  fi
14150
14151  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14152
14153  path="$BOOT_JDK"
14154  has_colon=`$ECHO $path | $GREP ^.:`
14155  new_path="$path"
14156  if test "x$has_colon" = x; then
14157    # Not in mixed or Windows style, start by that.
14158    new_path=`cmd //c echo $path`
14159  fi
14160
14161
14162  input_path="$new_path"
14163  # Check if we need to convert this using DOS-style short mode. If the path
14164  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14165  # take no chances and rewrite it.
14166  # Note: m4 eats our [], so we need to use [ and ] instead.
14167  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14168  if test "x$has_forbidden_chars" != x; then
14169    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14170    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14171  fi
14172
14173
14174  windows_path="$new_path"
14175  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14176    unix_path=`$CYGPATH -u "$windows_path"`
14177    new_path="$unix_path"
14178  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14179    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14180    new_path="$unix_path"
14181  fi
14182
14183  if test "x$path" != "x$new_path"; then
14184    BOOT_JDK="$new_path"
14185    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14186$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14187  fi
14188
14189  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14190  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14191
14192  else
14193    # We're on a posix platform. Hooray! :)
14194    path="$BOOT_JDK"
14195    has_space=`$ECHO "$path" | $GREP " "`
14196    if test "x$has_space" != x; then
14197      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14198$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14199      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14200    fi
14201
14202    # Use eval to expand a potential ~
14203    eval path="$path"
14204    if test ! -f "$path" && test ! -d "$path"; then
14205      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14206    fi
14207
14208    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14209  fi
14210
14211              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14212$as_echo_n "checking for Boot JDK... " >&6; }
14213              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14214$as_echo "$BOOT_JDK" >&6; }
14215              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14216$as_echo_n "checking Boot JDK version... " >&6; }
14217              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14218              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14219$as_echo "$BOOT_JDK_VERSION" >&6; }
14220            fi # end check jdk version
14221          fi # end check rt.jar
14222        fi # end check javac
14223      fi # end check java
14224    fi # end check boot jdk found
14225  fi
14226
14227    done
14228  fi
14229
14230
14231    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14232    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14233      # Do we have a bin/java?
14234      if test ! -x "$BOOT_JDK/bin/java"; then
14235        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14236$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14237        BOOT_JDK_FOUND=no
14238      else
14239        # Do we have a bin/javac?
14240        if test ! -x "$BOOT_JDK/bin/javac"; then
14241          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14242$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14243          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14244$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14245          BOOT_JDK_FOUND=no
14246        else
14247          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14248          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14249            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14250$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14251            BOOT_JDK_FOUND=no
14252          else
14253            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14254            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14255
14256            # Extra M4 quote needed to protect [] in grep expression.
14257            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14258            if test "x$FOUND_VERSION_78" = x; then
14259              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14260$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14261              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14262$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14263              BOOT_JDK_FOUND=no
14264            else
14265              # We're done! :-)
14266              BOOT_JDK_FOUND=yes
14267
14268  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14269
14270  # Input might be given as Windows format, start by converting to
14271  # unix format.
14272  path="$BOOT_JDK"
14273  new_path=`$CYGPATH -u "$path"`
14274
14275  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14276  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14277  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14278  # "foo.exe" is OK but "foo" is an error.
14279  #
14280  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14281  # It is also a way to make sure we got the proper file name for the real test later on.
14282  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14283  if test "x$test_shortpath" = x; then
14284    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14285$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14286    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14287  fi
14288
14289  # Call helper function which possibly converts this using DOS-style short mode.
14290  # If so, the updated path is stored in $new_path.
14291
14292  input_path="$new_path"
14293  # Check if we need to convert this using DOS-style short mode. If the path
14294  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14295  # take no chances and rewrite it.
14296  # Note: m4 eats our [], so we need to use [ and ] instead.
14297  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14298  if test "x$has_forbidden_chars" != x; then
14299    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14300    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14301    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14302    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14303      # Going to short mode and back again did indeed matter. Since short mode is
14304      # case insensitive, let's make it lowercase to improve readability.
14305      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14306      # Now convert it back to Unix-stile (cygpath)
14307      input_path=`$CYGPATH -u "$shortmode_path"`
14308      new_path="$input_path"
14309    fi
14310  fi
14311
14312  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14313  if test "x$test_cygdrive_prefix" = x; then
14314    # As a simple fix, exclude /usr/bin since it's not a real path.
14315    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14316      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14317      # a path prefixed by /cygdrive for fixpath to work.
14318      new_path="$CYGWIN_ROOT_PATH$input_path"
14319    fi
14320  fi
14321
14322
14323  if test "x$path" != "x$new_path"; then
14324    BOOT_JDK="$new_path"
14325    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14326$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14327  fi
14328
14329  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14330
14331  path="$BOOT_JDK"
14332  has_colon=`$ECHO $path | $GREP ^.:`
14333  new_path="$path"
14334  if test "x$has_colon" = x; then
14335    # Not in mixed or Windows style, start by that.
14336    new_path=`cmd //c echo $path`
14337  fi
14338
14339
14340  input_path="$new_path"
14341  # Check if we need to convert this using DOS-style short mode. If the path
14342  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14343  # take no chances and rewrite it.
14344  # Note: m4 eats our [], so we need to use [ and ] instead.
14345  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14346  if test "x$has_forbidden_chars" != x; then
14347    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14348    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14349  fi
14350
14351
14352  windows_path="$new_path"
14353  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14354    unix_path=`$CYGPATH -u "$windows_path"`
14355    new_path="$unix_path"
14356  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14357    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14358    new_path="$unix_path"
14359  fi
14360
14361  if test "x$path" != "x$new_path"; then
14362    BOOT_JDK="$new_path"
14363    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14364$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14365  fi
14366
14367  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14368  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14369
14370  else
14371    # We're on a posix platform. Hooray! :)
14372    path="$BOOT_JDK"
14373    has_space=`$ECHO "$path" | $GREP " "`
14374    if test "x$has_space" != x; then
14375      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14376$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14377      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14378    fi
14379
14380    # Use eval to expand a potential ~
14381    eval path="$path"
14382    if test ! -f "$path" && test ! -d "$path"; then
14383      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14384    fi
14385
14386    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14387  fi
14388
14389              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14390$as_echo_n "checking for Boot JDK... " >&6; }
14391              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14392$as_echo "$BOOT_JDK" >&6; }
14393              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14394$as_echo_n "checking Boot JDK version... " >&6; }
14395              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14396              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14397$as_echo "$BOOT_JDK_VERSION" >&6; }
14398            fi # end check jdk version
14399          fi # end check rt.jar
14400        fi # end check javac
14401      fi # end check java
14402    fi # end check boot jdk found
14403  fi
14404
14405  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
14406
14407  if test "x$BOOT_JDK_FOUND" = xno; then
14408    # Now execute the test
14409
14410  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
14411  BOOT_JDK_SUFFIX="/Contents/Home"
14412  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14413  if test "x$ALL_JDKS_FOUND" != x; then
14414    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14415
14416  if test "x$BOOT_JDK_FOUND" = xno; then
14417    # Now execute the test
14418
14419        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14420        if test -d "$BOOT_JDK"; then
14421          BOOT_JDK_FOUND=maybe
14422          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14423$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14424        fi
14425
14426
14427    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14428    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14429      # Do we have a bin/java?
14430      if test ! -x "$BOOT_JDK/bin/java"; then
14431        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14432$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14433        BOOT_JDK_FOUND=no
14434      else
14435        # Do we have a bin/javac?
14436        if test ! -x "$BOOT_JDK/bin/javac"; then
14437          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14438$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14439          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14440$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14441          BOOT_JDK_FOUND=no
14442        else
14443          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14444          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14445            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14446$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14447            BOOT_JDK_FOUND=no
14448          else
14449            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14450            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14451
14452            # Extra M4 quote needed to protect [] in grep expression.
14453            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14454            if test "x$FOUND_VERSION_78" = x; then
14455              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14456$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14457              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14458$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14459              BOOT_JDK_FOUND=no
14460            else
14461              # We're done! :-)
14462              BOOT_JDK_FOUND=yes
14463
14464  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14465
14466  # Input might be given as Windows format, start by converting to
14467  # unix format.
14468  path="$BOOT_JDK"
14469  new_path=`$CYGPATH -u "$path"`
14470
14471  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14472  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14473  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14474  # "foo.exe" is OK but "foo" is an error.
14475  #
14476  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14477  # It is also a way to make sure we got the proper file name for the real test later on.
14478  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14479  if test "x$test_shortpath" = x; then
14480    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14481$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14482    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14483  fi
14484
14485  # Call helper function which possibly converts this using DOS-style short mode.
14486  # If so, the updated path is stored in $new_path.
14487
14488  input_path="$new_path"
14489  # Check if we need to convert this using DOS-style short mode. If the path
14490  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14491  # take no chances and rewrite it.
14492  # Note: m4 eats our [], so we need to use [ and ] instead.
14493  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14494  if test "x$has_forbidden_chars" != x; then
14495    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14496    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14497    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14498    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14499      # Going to short mode and back again did indeed matter. Since short mode is
14500      # case insensitive, let's make it lowercase to improve readability.
14501      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14502      # Now convert it back to Unix-stile (cygpath)
14503      input_path=`$CYGPATH -u "$shortmode_path"`
14504      new_path="$input_path"
14505    fi
14506  fi
14507
14508  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14509  if test "x$test_cygdrive_prefix" = x; then
14510    # As a simple fix, exclude /usr/bin since it's not a real path.
14511    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14512      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14513      # a path prefixed by /cygdrive for fixpath to work.
14514      new_path="$CYGWIN_ROOT_PATH$input_path"
14515    fi
14516  fi
14517
14518
14519  if test "x$path" != "x$new_path"; then
14520    BOOT_JDK="$new_path"
14521    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14522$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14523  fi
14524
14525  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14526
14527  path="$BOOT_JDK"
14528  has_colon=`$ECHO $path | $GREP ^.:`
14529  new_path="$path"
14530  if test "x$has_colon" = x; then
14531    # Not in mixed or Windows style, start by that.
14532    new_path=`cmd //c echo $path`
14533  fi
14534
14535
14536  input_path="$new_path"
14537  # Check if we need to convert this using DOS-style short mode. If the path
14538  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14539  # take no chances and rewrite it.
14540  # Note: m4 eats our [], so we need to use [ and ] instead.
14541  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14542  if test "x$has_forbidden_chars" != x; then
14543    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14544    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14545  fi
14546
14547
14548  windows_path="$new_path"
14549  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14550    unix_path=`$CYGPATH -u "$windows_path"`
14551    new_path="$unix_path"
14552  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14553    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14554    new_path="$unix_path"
14555  fi
14556
14557  if test "x$path" != "x$new_path"; then
14558    BOOT_JDK="$new_path"
14559    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14560$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14561  fi
14562
14563  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14564  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14565
14566  else
14567    # We're on a posix platform. Hooray! :)
14568    path="$BOOT_JDK"
14569    has_space=`$ECHO "$path" | $GREP " "`
14570    if test "x$has_space" != x; then
14571      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14572$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14573      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14574    fi
14575
14576    # Use eval to expand a potential ~
14577    eval path="$path"
14578    if test ! -f "$path" && test ! -d "$path"; then
14579      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14580    fi
14581
14582    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14583  fi
14584
14585              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14586$as_echo_n "checking for Boot JDK... " >&6; }
14587              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14588$as_echo "$BOOT_JDK" >&6; }
14589              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14590$as_echo_n "checking Boot JDK version... " >&6; }
14591              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14592              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14593$as_echo "$BOOT_JDK_VERSION" >&6; }
14594            fi # end check jdk version
14595          fi # end check rt.jar
14596        fi # end check javac
14597      fi # end check java
14598    fi # end check boot jdk found
14599  fi
14600
14601    done
14602  fi
14603
14604
14605    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14606    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14607      # Do we have a bin/java?
14608      if test ! -x "$BOOT_JDK/bin/java"; then
14609        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14610$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14611        BOOT_JDK_FOUND=no
14612      else
14613        # Do we have a bin/javac?
14614        if test ! -x "$BOOT_JDK/bin/javac"; then
14615          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14616$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14617          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14618$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14619          BOOT_JDK_FOUND=no
14620        else
14621          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14622          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14623            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14624$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14625            BOOT_JDK_FOUND=no
14626          else
14627            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14628            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14629
14630            # Extra M4 quote needed to protect [] in grep expression.
14631            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14632            if test "x$FOUND_VERSION_78" = x; then
14633              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14634$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14635              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14636$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14637              BOOT_JDK_FOUND=no
14638            else
14639              # We're done! :-)
14640              BOOT_JDK_FOUND=yes
14641
14642  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14643
14644  # Input might be given as Windows format, start by converting to
14645  # unix format.
14646  path="$BOOT_JDK"
14647  new_path=`$CYGPATH -u "$path"`
14648
14649  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14650  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14651  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14652  # "foo.exe" is OK but "foo" is an error.
14653  #
14654  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14655  # It is also a way to make sure we got the proper file name for the real test later on.
14656  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14657  if test "x$test_shortpath" = x; then
14658    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14659$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14660    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14661  fi
14662
14663  # Call helper function which possibly converts this using DOS-style short mode.
14664  # If so, the updated path is stored in $new_path.
14665
14666  input_path="$new_path"
14667  # Check if we need to convert this using DOS-style short mode. If the path
14668  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14669  # take no chances and rewrite it.
14670  # Note: m4 eats our [], so we need to use [ and ] instead.
14671  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14672  if test "x$has_forbidden_chars" != x; then
14673    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14674    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14675    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14676    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14677      # Going to short mode and back again did indeed matter. Since short mode is
14678      # case insensitive, let's make it lowercase to improve readability.
14679      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14680      # Now convert it back to Unix-stile (cygpath)
14681      input_path=`$CYGPATH -u "$shortmode_path"`
14682      new_path="$input_path"
14683    fi
14684  fi
14685
14686  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14687  if test "x$test_cygdrive_prefix" = x; then
14688    # As a simple fix, exclude /usr/bin since it's not a real path.
14689    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14690      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14691      # a path prefixed by /cygdrive for fixpath to work.
14692      new_path="$CYGWIN_ROOT_PATH$input_path"
14693    fi
14694  fi
14695
14696
14697  if test "x$path" != "x$new_path"; then
14698    BOOT_JDK="$new_path"
14699    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14700$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14701  fi
14702
14703  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14704
14705  path="$BOOT_JDK"
14706  has_colon=`$ECHO $path | $GREP ^.:`
14707  new_path="$path"
14708  if test "x$has_colon" = x; then
14709    # Not in mixed or Windows style, start by that.
14710    new_path=`cmd //c echo $path`
14711  fi
14712
14713
14714  input_path="$new_path"
14715  # Check if we need to convert this using DOS-style short mode. If the path
14716  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14717  # take no chances and rewrite it.
14718  # Note: m4 eats our [], so we need to use [ and ] instead.
14719  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14720  if test "x$has_forbidden_chars" != x; then
14721    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14722    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14723  fi
14724
14725
14726  windows_path="$new_path"
14727  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14728    unix_path=`$CYGPATH -u "$windows_path"`
14729    new_path="$unix_path"
14730  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14731    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14732    new_path="$unix_path"
14733  fi
14734
14735  if test "x$path" != "x$new_path"; then
14736    BOOT_JDK="$new_path"
14737    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14738$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14739  fi
14740
14741  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14742  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14743
14744  else
14745    # We're on a posix platform. Hooray! :)
14746    path="$BOOT_JDK"
14747    has_space=`$ECHO "$path" | $GREP " "`
14748    if test "x$has_space" != x; then
14749      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14750$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14751      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14752    fi
14753
14754    # Use eval to expand a potential ~
14755    eval path="$path"
14756    if test ! -f "$path" && test ! -d "$path"; then
14757      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14758    fi
14759
14760    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14761  fi
14762
14763              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14764$as_echo_n "checking for Boot JDK... " >&6; }
14765              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14766$as_echo "$BOOT_JDK" >&6; }
14767              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14768$as_echo_n "checking Boot JDK version... " >&6; }
14769              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14770              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14771$as_echo "$BOOT_JDK_VERSION" >&6; }
14772            fi # end check jdk version
14773          fi # end check rt.jar
14774        fi # end check javac
14775      fi # end check java
14776    fi # end check boot jdk found
14777  fi
14778
14779
14780  if test "x$BOOT_JDK_FOUND" = xno; then
14781    # Now execute the test
14782
14783  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
14784  BOOT_JDK_SUFFIX="/Contents/Home"
14785  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14786  if test "x$ALL_JDKS_FOUND" != x; then
14787    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14788
14789  if test "x$BOOT_JDK_FOUND" = xno; then
14790    # Now execute the test
14791
14792        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14793        if test -d "$BOOT_JDK"; then
14794          BOOT_JDK_FOUND=maybe
14795          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14796$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14797        fi
14798
14799
14800    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14801    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14802      # Do we have a bin/java?
14803      if test ! -x "$BOOT_JDK/bin/java"; then
14804        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14805$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14806        BOOT_JDK_FOUND=no
14807      else
14808        # Do we have a bin/javac?
14809        if test ! -x "$BOOT_JDK/bin/javac"; then
14810          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14811$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14812          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14813$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14814          BOOT_JDK_FOUND=no
14815        else
14816          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14817          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14818            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14819$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14820            BOOT_JDK_FOUND=no
14821          else
14822            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14823            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14824
14825            # Extra M4 quote needed to protect [] in grep expression.
14826            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14827            if test "x$FOUND_VERSION_78" = x; then
14828              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14829$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14830              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14831$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14832              BOOT_JDK_FOUND=no
14833            else
14834              # We're done! :-)
14835              BOOT_JDK_FOUND=yes
14836
14837  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14838
14839  # Input might be given as Windows format, start by converting to
14840  # unix format.
14841  path="$BOOT_JDK"
14842  new_path=`$CYGPATH -u "$path"`
14843
14844  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14845  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14846  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14847  # "foo.exe" is OK but "foo" is an error.
14848  #
14849  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14850  # It is also a way to make sure we got the proper file name for the real test later on.
14851  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14852  if test "x$test_shortpath" = x; then
14853    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14854$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14855    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14856  fi
14857
14858  # Call helper function which possibly converts this using DOS-style short mode.
14859  # If so, the updated path is stored in $new_path.
14860
14861  input_path="$new_path"
14862  # Check if we need to convert this using DOS-style short mode. If the path
14863  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14864  # take no chances and rewrite it.
14865  # Note: m4 eats our [], so we need to use [ and ] instead.
14866  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14867  if test "x$has_forbidden_chars" != x; then
14868    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14869    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14870    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14871    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14872      # Going to short mode and back again did indeed matter. Since short mode is
14873      # case insensitive, let's make it lowercase to improve readability.
14874      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14875      # Now convert it back to Unix-stile (cygpath)
14876      input_path=`$CYGPATH -u "$shortmode_path"`
14877      new_path="$input_path"
14878    fi
14879  fi
14880
14881  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14882  if test "x$test_cygdrive_prefix" = x; then
14883    # As a simple fix, exclude /usr/bin since it's not a real path.
14884    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14885      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14886      # a path prefixed by /cygdrive for fixpath to work.
14887      new_path="$CYGWIN_ROOT_PATH$input_path"
14888    fi
14889  fi
14890
14891
14892  if test "x$path" != "x$new_path"; then
14893    BOOT_JDK="$new_path"
14894    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14895$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14896  fi
14897
14898  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14899
14900  path="$BOOT_JDK"
14901  has_colon=`$ECHO $path | $GREP ^.:`
14902  new_path="$path"
14903  if test "x$has_colon" = x; then
14904    # Not in mixed or Windows style, start by that.
14905    new_path=`cmd //c echo $path`
14906  fi
14907
14908
14909  input_path="$new_path"
14910  # Check if we need to convert this using DOS-style short mode. If the path
14911  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14912  # take no chances and rewrite it.
14913  # Note: m4 eats our [], so we need to use [ and ] instead.
14914  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14915  if test "x$has_forbidden_chars" != x; then
14916    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14917    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14918  fi
14919
14920
14921  windows_path="$new_path"
14922  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14923    unix_path=`$CYGPATH -u "$windows_path"`
14924    new_path="$unix_path"
14925  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14926    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14927    new_path="$unix_path"
14928  fi
14929
14930  if test "x$path" != "x$new_path"; then
14931    BOOT_JDK="$new_path"
14932    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14933$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14934  fi
14935
14936  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14937  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14938
14939  else
14940    # We're on a posix platform. Hooray! :)
14941    path="$BOOT_JDK"
14942    has_space=`$ECHO "$path" | $GREP " "`
14943    if test "x$has_space" != x; then
14944      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14945$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14946      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14947    fi
14948
14949    # Use eval to expand a potential ~
14950    eval path="$path"
14951    if test ! -f "$path" && test ! -d "$path"; then
14952      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14953    fi
14954
14955    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14956  fi
14957
14958              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14959$as_echo_n "checking for Boot JDK... " >&6; }
14960              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14961$as_echo "$BOOT_JDK" >&6; }
14962              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14963$as_echo_n "checking Boot JDK version... " >&6; }
14964              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14965              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14966$as_echo "$BOOT_JDK_VERSION" >&6; }
14967            fi # end check jdk version
14968          fi # end check rt.jar
14969        fi # end check javac
14970      fi # end check java
14971    fi # end check boot jdk found
14972  fi
14973
14974    done
14975  fi
14976
14977
14978    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14979    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14980      # Do we have a bin/java?
14981      if test ! -x "$BOOT_JDK/bin/java"; then
14982        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14983$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14984        BOOT_JDK_FOUND=no
14985      else
14986        # Do we have a bin/javac?
14987        if test ! -x "$BOOT_JDK/bin/javac"; then
14988          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14989$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14990          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14991$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14992          BOOT_JDK_FOUND=no
14993        else
14994          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14995          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14996            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14997$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14998            BOOT_JDK_FOUND=no
14999          else
15000            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15001            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15002
15003            # Extra M4 quote needed to protect [] in grep expression.
15004            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15005            if test "x$FOUND_VERSION_78" = x; then
15006              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15007$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15008              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15009$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15010              BOOT_JDK_FOUND=no
15011            else
15012              # We're done! :-)
15013              BOOT_JDK_FOUND=yes
15014
15015  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15016
15017  # Input might be given as Windows format, start by converting to
15018  # unix format.
15019  path="$BOOT_JDK"
15020  new_path=`$CYGPATH -u "$path"`
15021
15022  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15023  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15024  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15025  # "foo.exe" is OK but "foo" is an error.
15026  #
15027  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15028  # It is also a way to make sure we got the proper file name for the real test later on.
15029  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15030  if test "x$test_shortpath" = x; then
15031    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15032$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15033    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15034  fi
15035
15036  # Call helper function which possibly converts this using DOS-style short mode.
15037  # If so, the updated path is stored in $new_path.
15038
15039  input_path="$new_path"
15040  # Check if we need to convert this using DOS-style short mode. If the path
15041  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15042  # take no chances and rewrite it.
15043  # Note: m4 eats our [], so we need to use [ and ] instead.
15044  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15045  if test "x$has_forbidden_chars" != x; then
15046    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15047    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15048    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15049    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15050      # Going to short mode and back again did indeed matter. Since short mode is
15051      # case insensitive, let's make it lowercase to improve readability.
15052      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15053      # Now convert it back to Unix-stile (cygpath)
15054      input_path=`$CYGPATH -u "$shortmode_path"`
15055      new_path="$input_path"
15056    fi
15057  fi
15058
15059  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15060  if test "x$test_cygdrive_prefix" = x; then
15061    # As a simple fix, exclude /usr/bin since it's not a real path.
15062    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15063      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15064      # a path prefixed by /cygdrive for fixpath to work.
15065      new_path="$CYGWIN_ROOT_PATH$input_path"
15066    fi
15067  fi
15068
15069
15070  if test "x$path" != "x$new_path"; then
15071    BOOT_JDK="$new_path"
15072    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15073$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15074  fi
15075
15076  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15077
15078  path="$BOOT_JDK"
15079  has_colon=`$ECHO $path | $GREP ^.:`
15080  new_path="$path"
15081  if test "x$has_colon" = x; then
15082    # Not in mixed or Windows style, start by that.
15083    new_path=`cmd //c echo $path`
15084  fi
15085
15086
15087  input_path="$new_path"
15088  # Check if we need to convert this using DOS-style short mode. If the path
15089  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15090  # take no chances and rewrite it.
15091  # Note: m4 eats our [], so we need to use [ and ] instead.
15092  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15093  if test "x$has_forbidden_chars" != x; then
15094    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15095    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15096  fi
15097
15098
15099  windows_path="$new_path"
15100  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15101    unix_path=`$CYGPATH -u "$windows_path"`
15102    new_path="$unix_path"
15103  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15104    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15105    new_path="$unix_path"
15106  fi
15107
15108  if test "x$path" != "x$new_path"; then
15109    BOOT_JDK="$new_path"
15110    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15111$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15112  fi
15113
15114  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15115  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15116
15117  else
15118    # We're on a posix platform. Hooray! :)
15119    path="$BOOT_JDK"
15120    has_space=`$ECHO "$path" | $GREP " "`
15121    if test "x$has_space" != x; then
15122      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15123$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15124      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15125    fi
15126
15127    # Use eval to expand a potential ~
15128    eval path="$path"
15129    if test ! -f "$path" && test ! -d "$path"; then
15130      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15131    fi
15132
15133    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
15134  fi
15135
15136              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15137$as_echo_n "checking for Boot JDK... " >&6; }
15138              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15139$as_echo "$BOOT_JDK" >&6; }
15140              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15141$as_echo_n "checking Boot JDK version... " >&6; }
15142              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15143              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15144$as_echo "$BOOT_JDK_VERSION" >&6; }
15145            fi # end check jdk version
15146          fi # end check rt.jar
15147        fi # end check javac
15148      fi # end check java
15149    fi # end check boot jdk found
15150  fi
15151
15152  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
15153
15154  if test "x$BOOT_JDK_FOUND" = xno; then
15155    # Now execute the test
15156
15157  BOOT_JDK_PREFIX="/usr/lib/jvm"
15158  BOOT_JDK_SUFFIX=""
15159  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
15160  if test "x$ALL_JDKS_FOUND" != x; then
15161    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
15162
15163  if test "x$BOOT_JDK_FOUND" = xno; then
15164    # Now execute the test
15165
15166        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
15167        if test -d "$BOOT_JDK"; then
15168          BOOT_JDK_FOUND=maybe
15169          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
15170$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
15171        fi
15172
15173
15174    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15175    if test "x$BOOT_JDK_FOUND" = xmaybe; then
15176      # Do we have a bin/java?
15177      if test ! -x "$BOOT_JDK/bin/java"; then
15178        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15179$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15180        BOOT_JDK_FOUND=no
15181      else
15182        # Do we have a bin/javac?
15183        if test ! -x "$BOOT_JDK/bin/javac"; then
15184          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15185$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15186          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15187$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15188          BOOT_JDK_FOUND=no
15189        else
15190          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15191          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15192            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15193$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15194            BOOT_JDK_FOUND=no
15195          else
15196            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15197            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15198
15199            # Extra M4 quote needed to protect [] in grep expression.
15200            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15201            if test "x$FOUND_VERSION_78" = x; then
15202              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15203$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15204              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15205$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15206              BOOT_JDK_FOUND=no
15207            else
15208              # We're done! :-)
15209              BOOT_JDK_FOUND=yes
15210
15211  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15212
15213  # Input might be given as Windows format, start by converting to
15214  # unix format.
15215  path="$BOOT_JDK"
15216  new_path=`$CYGPATH -u "$path"`
15217
15218  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15219  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15220  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15221  # "foo.exe" is OK but "foo" is an error.
15222  #
15223  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15224  # It is also a way to make sure we got the proper file name for the real test later on.
15225  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15226  if test "x$test_shortpath" = x; then
15227    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15228$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15229    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15230  fi
15231
15232  # Call helper function which possibly converts this using DOS-style short mode.
15233  # If so, the updated path is stored in $new_path.
15234
15235  input_path="$new_path"
15236  # Check if we need to convert this using DOS-style short mode. If the path
15237  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15238  # take no chances and rewrite it.
15239  # Note: m4 eats our [], so we need to use [ and ] instead.
15240  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15241  if test "x$has_forbidden_chars" != x; then
15242    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15243    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15244    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15245    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15246      # Going to short mode and back again did indeed matter. Since short mode is
15247      # case insensitive, let's make it lowercase to improve readability.
15248      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15249      # Now convert it back to Unix-stile (cygpath)
15250      input_path=`$CYGPATH -u "$shortmode_path"`
15251      new_path="$input_path"
15252    fi
15253  fi
15254
15255  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15256  if test "x$test_cygdrive_prefix" = x; then
15257    # As a simple fix, exclude /usr/bin since it's not a real path.
15258    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15259      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15260      # a path prefixed by /cygdrive for fixpath to work.
15261      new_path="$CYGWIN_ROOT_PATH$input_path"
15262    fi
15263  fi
15264
15265
15266  if test "x$path" != "x$new_path"; then
15267    BOOT_JDK="$new_path"
15268    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15269$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15270  fi
15271
15272  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15273
15274  path="$BOOT_JDK"
15275  has_colon=`$ECHO $path | $GREP ^.:`
15276  new_path="$path"
15277  if test "x$has_colon" = x; then
15278    # Not in mixed or Windows style, start by that.
15279    new_path=`cmd //c echo $path`
15280  fi
15281
15282
15283  input_path="$new_path"
15284  # Check if we need to convert this using DOS-style short mode. If the path
15285  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15286  # take no chances and rewrite it.
15287  # Note: m4 eats our [], so we need to use [ and ] instead.
15288  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15289  if test "x$has_forbidden_chars" != x; then
15290    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15291    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15292  fi
15293
15294
15295  windows_path="$new_path"
15296  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15297    unix_path=`$CYGPATH -u "$windows_path"`
15298    new_path="$unix_path"
15299  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15300    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15301    new_path="$unix_path"
15302  fi
15303
15304  if test "x$path" != "x$new_path"; then
15305    BOOT_JDK="$new_path"
15306    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15307$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15308  fi
15309
15310  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15311  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15312
15313  else
15314    # We're on a posix platform. Hooray! :)
15315    path="$BOOT_JDK"
15316    has_space=`$ECHO "$path" | $GREP " "`
15317    if test "x$has_space" != x; then
15318      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15319$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15320      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15321    fi
15322
15323    # Use eval to expand a potential ~
15324    eval path="$path"
15325    if test ! -f "$path" && test ! -d "$path"; then
15326      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15327    fi
15328
15329    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
15330  fi
15331
15332              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15333$as_echo_n "checking for Boot JDK... " >&6; }
15334              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15335$as_echo "$BOOT_JDK" >&6; }
15336              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15337$as_echo_n "checking Boot JDK version... " >&6; }
15338              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15339              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15340$as_echo "$BOOT_JDK_VERSION" >&6; }
15341            fi # end check jdk version
15342          fi # end check rt.jar
15343        fi # end check javac
15344      fi # end check java
15345    fi # end check boot jdk found
15346  fi
15347
15348    done
15349  fi
15350
15351
15352    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15353    if test "x$BOOT_JDK_FOUND" = xmaybe; then
15354      # Do we have a bin/java?
15355      if test ! -x "$BOOT_JDK/bin/java"; then
15356        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15357$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15358        BOOT_JDK_FOUND=no
15359      else
15360        # Do we have a bin/javac?
15361        if test ! -x "$BOOT_JDK/bin/javac"; then
15362          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15363$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15364          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15365$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15366          BOOT_JDK_FOUND=no
15367        else
15368          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15369          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15370            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15371$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15372            BOOT_JDK_FOUND=no
15373          else
15374            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15375            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15376
15377            # Extra M4 quote needed to protect [] in grep expression.
15378            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15379            if test "x$FOUND_VERSION_78" = x; then
15380              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15381$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15382              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15383$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15384              BOOT_JDK_FOUND=no
15385            else
15386              # We're done! :-)
15387              BOOT_JDK_FOUND=yes
15388
15389  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15390
15391  # Input might be given as Windows format, start by converting to
15392  # unix format.
15393  path="$BOOT_JDK"
15394  new_path=`$CYGPATH -u "$path"`
15395
15396  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15397  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15398  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15399  # "foo.exe" is OK but "foo" is an error.
15400  #
15401  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15402  # It is also a way to make sure we got the proper file name for the real test later on.
15403  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15404  if test "x$test_shortpath" = x; then
15405    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15406$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15407    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15408  fi
15409
15410  # Call helper function which possibly converts this using DOS-style short mode.
15411  # If so, the updated path is stored in $new_path.
15412
15413  input_path="$new_path"
15414  # Check if we need to convert this using DOS-style short mode. If the path
15415  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15416  # take no chances and rewrite it.
15417  # Note: m4 eats our [], so we need to use [ and ] instead.
15418  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15419  if test "x$has_forbidden_chars" != x; then
15420    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15421    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15422    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15423    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15424      # Going to short mode and back again did indeed matter. Since short mode is
15425      # case insensitive, let's make it lowercase to improve readability.
15426      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15427      # Now convert it back to Unix-stile (cygpath)
15428      input_path=`$CYGPATH -u "$shortmode_path"`
15429      new_path="$input_path"
15430    fi
15431  fi
15432
15433  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15434  if test "x$test_cygdrive_prefix" = x; then
15435    # As a simple fix, exclude /usr/bin since it's not a real path.
15436    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15437      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15438      # a path prefixed by /cygdrive for fixpath to work.
15439      new_path="$CYGWIN_ROOT_PATH$input_path"
15440    fi
15441  fi
15442
15443
15444  if test "x$path" != "x$new_path"; then
15445    BOOT_JDK="$new_path"
15446    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15447$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15448  fi
15449
15450  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15451
15452  path="$BOOT_JDK"
15453  has_colon=`$ECHO $path | $GREP ^.:`
15454  new_path="$path"
15455  if test "x$has_colon" = x; then
15456    # Not in mixed or Windows style, start by that.
15457    new_path=`cmd //c echo $path`
15458  fi
15459
15460
15461  input_path="$new_path"
15462  # Check if we need to convert this using DOS-style short mode. If the path
15463  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15464  # take no chances and rewrite it.
15465  # Note: m4 eats our [], so we need to use [ and ] instead.
15466  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15467  if test "x$has_forbidden_chars" != x; then
15468    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15469    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15470  fi
15471
15472
15473  windows_path="$new_path"
15474  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15475    unix_path=`$CYGPATH -u "$windows_path"`
15476    new_path="$unix_path"
15477  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15478    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15479    new_path="$unix_path"
15480  fi
15481
15482  if test "x$path" != "x$new_path"; then
15483    BOOT_JDK="$new_path"
15484    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15485$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15486  fi
15487
15488  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15489  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15490
15491  else
15492    # We're on a posix platform. Hooray! :)
15493    path="$BOOT_JDK"
15494    has_space=`$ECHO "$path" | $GREP " "`
15495    if test "x$has_space" != x; then
15496      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15497$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15498      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15499    fi
15500
15501    # Use eval to expand a potential ~
15502    eval path="$path"
15503    if test ! -f "$path" && test ! -d "$path"; then
15504      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15505    fi
15506
15507    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
15508  fi
15509
15510              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15511$as_echo_n "checking for Boot JDK... " >&6; }
15512              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15513$as_echo "$BOOT_JDK" >&6; }
15514              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15515$as_echo_n "checking Boot JDK version... " >&6; }
15516              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15517              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15518$as_echo "$BOOT_JDK_VERSION" >&6; }
15519            fi # end check jdk version
15520          fi # end check rt.jar
15521        fi # end check javac
15522      fi # end check java
15523    fi # end check boot jdk found
15524  fi
15525
15526  fi
15527
15528
15529    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15530    if test "x$BOOT_JDK_FOUND" = xmaybe; then
15531      # Do we have a bin/java?
15532      if test ! -x "$BOOT_JDK/bin/java"; then
15533        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15534$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15535        BOOT_JDK_FOUND=no
15536      else
15537        # Do we have a bin/javac?
15538        if test ! -x "$BOOT_JDK/bin/javac"; then
15539          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15540$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15541          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15542$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15543          BOOT_JDK_FOUND=no
15544        else
15545          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15546          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15547            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15548$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15549            BOOT_JDK_FOUND=no
15550          else
15551            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15552            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15553
15554            # Extra M4 quote needed to protect [] in grep expression.
15555            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15556            if test "x$FOUND_VERSION_78" = x; then
15557              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15558$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15559              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15560$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15561              BOOT_JDK_FOUND=no
15562            else
15563              # We're done! :-)
15564              BOOT_JDK_FOUND=yes
15565
15566  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15567
15568  # Input might be given as Windows format, start by converting to
15569  # unix format.
15570  path="$BOOT_JDK"
15571  new_path=`$CYGPATH -u "$path"`
15572
15573  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15574  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15575  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15576  # "foo.exe" is OK but "foo" is an error.
15577  #
15578  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15579  # It is also a way to make sure we got the proper file name for the real test later on.
15580  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15581  if test "x$test_shortpath" = x; then
15582    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15583$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15584    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15585  fi
15586
15587  # Call helper function which possibly converts this using DOS-style short mode.
15588  # If so, the updated path is stored in $new_path.
15589
15590  input_path="$new_path"
15591  # Check if we need to convert this using DOS-style short mode. If the path
15592  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15593  # take no chances and rewrite it.
15594  # Note: m4 eats our [], so we need to use [ and ] instead.
15595  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15596  if test "x$has_forbidden_chars" != x; then
15597    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15598    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15599    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15600    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15601      # Going to short mode and back again did indeed matter. Since short mode is
15602      # case insensitive, let's make it lowercase to improve readability.
15603      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15604      # Now convert it back to Unix-stile (cygpath)
15605      input_path=`$CYGPATH -u "$shortmode_path"`
15606      new_path="$input_path"
15607    fi
15608  fi
15609
15610  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15611  if test "x$test_cygdrive_prefix" = x; then
15612    # As a simple fix, exclude /usr/bin since it's not a real path.
15613    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15614      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15615      # a path prefixed by /cygdrive for fixpath to work.
15616      new_path="$CYGWIN_ROOT_PATH$input_path"
15617    fi
15618  fi
15619
15620
15621  if test "x$path" != "x$new_path"; then
15622    BOOT_JDK="$new_path"
15623    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15624$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15625  fi
15626
15627  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15628
15629  path="$BOOT_JDK"
15630  has_colon=`$ECHO $path | $GREP ^.:`
15631  new_path="$path"
15632  if test "x$has_colon" = x; then
15633    # Not in mixed or Windows style, start by that.
15634    new_path=`cmd //c echo $path`
15635  fi
15636
15637
15638  input_path="$new_path"
15639  # Check if we need to convert this using DOS-style short mode. If the path
15640  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15641  # take no chances and rewrite it.
15642  # Note: m4 eats our [], so we need to use [ and ] instead.
15643  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15644  if test "x$has_forbidden_chars" != x; then
15645    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15646    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15647  fi
15648
15649
15650  windows_path="$new_path"
15651  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15652    unix_path=`$CYGPATH -u "$windows_path"`
15653    new_path="$unix_path"
15654  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15655    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15656    new_path="$unix_path"
15657  fi
15658
15659  if test "x$path" != "x$new_path"; then
15660    BOOT_JDK="$new_path"
15661    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15662$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15663  fi
15664
15665  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15666  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15667
15668  else
15669    # We're on a posix platform. Hooray! :)
15670    path="$BOOT_JDK"
15671    has_space=`$ECHO "$path" | $GREP " "`
15672    if test "x$has_space" != x; then
15673      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15674$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15675      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15676    fi
15677
15678    # Use eval to expand a potential ~
15679    eval path="$path"
15680    if test ! -f "$path" && test ! -d "$path"; then
15681      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15682    fi
15683
15684    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
15685  fi
15686
15687              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15688$as_echo_n "checking for Boot JDK... " >&6; }
15689              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15690$as_echo "$BOOT_JDK" >&6; }
15691              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15692$as_echo_n "checking Boot JDK version... " >&6; }
15693              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15694              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15695$as_echo "$BOOT_JDK_VERSION" >&6; }
15696            fi # end check jdk version
15697          fi # end check rt.jar
15698        fi # end check javac
15699      fi # end check java
15700    fi # end check boot jdk found
15701  fi
15702
15703
15704# If we haven't found anything yet, we've truly lost. Give up.
15705if test "x$BOOT_JDK_FOUND" = xno; then
15706
15707    # Print a helpful message on how to acquire the necessary build dependency.
15708    # openjdk is the help tag: freetyp2, cups, pulse, alsa etc
15709    MISSING_DEPENDENCY=openjdk
15710    PKGHANDLER_COMMAND=
15711
15712    case $PKGHANDLER in
15713	apt-get)
15714                apt_help     $MISSING_DEPENDENCY ;;
15715    yum)
15716                yum_help     $MISSING_DEPENDENCY ;;
15717	port)
15718                port_help    $MISSING_DEPENDENCY ;;
15719	pkgutil)
15720                pkgutil_help $MISSING_DEPENDENCY ;;
15721	pkgadd)
15722                pkgadd_help  $MISSING_DEPENDENCY ;;
15723    * )
15724      break ;;
15725    esac
15726
15727    if test "x$PKGHANDLER_COMMAND" != x; then
15728        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
15729    fi
15730
15731  { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
15732$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
15733  { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
15734$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15735  as_fn_error $? "Cannot continue" "$LINENO" 5
15736fi
15737
15738# Setup proper paths for what we found
15739BOOT_RTJAR="$BOOT_JDK/jre/lib/rt.jar"
15740if test ! -f "$BOOT_RTJAR"; then
15741    # On MacOSX it is called classes.jar
15742    BOOT_RTJAR="$BOOT_JDK/../Classes/classes.jar"
15743    if test -f "$BOOT_RTJAR"; then
15744      # Remove the ..
15745      BOOT_RTJAR="`cd ${BOOT_RTJAR%/*} && pwd`/${BOOT_RTJAR##*/}"
15746    fi
15747fi
15748BOOT_TOOLSJAR="$BOOT_JDK/lib/tools.jar"
15749BOOT_JDK="$BOOT_JDK"
15750
15751
15752
15753
15754# Setup tools from the Boot JDK.
15755
15756  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
15757$as_echo_n "checking for java in Boot JDK... " >&6; }
15758  JAVA=$BOOT_JDK/bin/java
15759  if test ! -x $JAVA; then
15760      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15761$as_echo "not found" >&6; }
15762      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15763$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15764      as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
15765  fi
15766  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15767$as_echo "ok" >&6; }
15768
15769
15770  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
15771$as_echo_n "checking for javac in Boot JDK... " >&6; }
15772  JAVAC=$BOOT_JDK/bin/javac
15773  if test ! -x $JAVAC; then
15774      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15775$as_echo "not found" >&6; }
15776      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15777$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15778      as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
15779  fi
15780  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15781$as_echo "ok" >&6; }
15782
15783
15784  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
15785$as_echo_n "checking for javah in Boot JDK... " >&6; }
15786  JAVAH=$BOOT_JDK/bin/javah
15787  if test ! -x $JAVAH; then
15788      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15789$as_echo "not found" >&6; }
15790      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15791$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15792      as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
15793  fi
15794  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15795$as_echo "ok" >&6; }
15796
15797
15798  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javap in Boot JDK" >&5
15799$as_echo_n "checking for javap in Boot JDK... " >&6; }
15800  JAVAP=$BOOT_JDK/bin/javap
15801  if test ! -x $JAVAP; then
15802      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15803$as_echo "not found" >&6; }
15804      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15805$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15806      as_fn_error $? "Could not find javap in the Boot JDK" "$LINENO" 5
15807  fi
15808  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15809$as_echo "ok" >&6; }
15810
15811
15812  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
15813$as_echo_n "checking for jar in Boot JDK... " >&6; }
15814  JAR=$BOOT_JDK/bin/jar
15815  if test ! -x $JAR; then
15816      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15817$as_echo "not found" >&6; }
15818      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15819$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15820      as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
15821  fi
15822  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15823$as_echo "ok" >&6; }
15824
15825
15826  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rmic in Boot JDK" >&5
15827$as_echo_n "checking for rmic in Boot JDK... " >&6; }
15828  RMIC=$BOOT_JDK/bin/rmic
15829  if test ! -x $RMIC; then
15830      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15831$as_echo "not found" >&6; }
15832      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15833$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15834      as_fn_error $? "Could not find rmic in the Boot JDK" "$LINENO" 5
15835  fi
15836  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15837$as_echo "ok" >&6; }
15838
15839
15840  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5
15841$as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
15842  NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
15843  if test ! -x $NATIVE2ASCII; then
15844      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15845$as_echo "not found" >&6; }
15846      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15847$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15848      as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5
15849  fi
15850  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15851$as_echo "ok" >&6; }
15852
15853
15854# Finally, set some other options...
15855
15856# When compiling code to be executed by the Boot JDK, force jdk7 compatibility.
15857BOOT_JDK_SOURCETARGET="-source 7 -target 7"
15858
15859
15860
15861
15862##############################################################################
15863#
15864# Specify options for anything that is run with the Boot JDK.
15865#
15866
15867# Check whether --with-boot-jdk-jvmargs was given.
15868if test "${with_boot_jdk_jvmargs+set}" = set; then :
15869  withval=$with_boot_jdk_jvmargs;
15870fi
15871
15872
15873if test "x$with_boot_jdk_jvmargs" = x; then
15874    # Not all JVM:s accept the same arguments on the command line.
15875    # OpenJDK specific increase in thread stack for JDK build,
15876    # well more specifically, when running javac.
15877    if test "x$BUILD_NUM_BITS" = x32; then
15878       STACK_SIZE=768
15879    else
15880       # Running Javac on a JVM on a 64-bit machine, the stack takes more space
15881       # since 64-bit pointers are pushed on the stach. Apparently, we need
15882       # to increase the stack space when javacing the JDK....
15883       STACK_SIZE=1536
15884    fi
15885
15886    # Minimum amount of heap memory.
15887
15888    $ECHO "Check if jvm arg is ok: -Xms64M" >&5
15889    $ECHO "Command: $JAVA -Xms64M -version" >&5
15890    OUTPUT=`$JAVA -Xms64M -version 2>&1`
15891    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
15892    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
15893    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15894        boot_jdk_jvmargs="$boot_jdk_jvmargs -Xms64M"
15895	JVM_ARG_OK=true
15896    else
15897	$ECHO "Arg failed:" >&5
15898	$ECHO "$OUTPUT" >&5
15899	JVM_ARG_OK=false
15900    fi
15901
15902    if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
15903        # Why does macosx need more heap? Its the huge JDK batch.
15904
15905    $ECHO "Check if jvm arg is ok: -Xmx1600M" >&5
15906    $ECHO "Command: $JAVA -Xmx1600M -version" >&5
15907    OUTPUT=`$JAVA -Xmx1600M -version 2>&1`
15908    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
15909    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
15910    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15911        boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1600M"
15912	JVM_ARG_OK=true
15913    else
15914	$ECHO "Arg failed:" >&5
15915	$ECHO "$OUTPUT" >&5
15916	JVM_ARG_OK=false
15917    fi
15918
15919    else
15920
15921    $ECHO "Check if jvm arg is ok: -Xmx1100M" >&5
15922    $ECHO "Command: $JAVA -Xmx1100M -version" >&5
15923    OUTPUT=`$JAVA -Xmx1100M -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 -Xmx1100M"
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    fi
15936    # When is adding -client something that speeds up the JVM?
15937    # ADD_JVM_ARG_IF_OK([-client],boot_jdk_jvmargs,[$JAVA])
15938
15939    $ECHO "Check if jvm arg is ok: -XX:PermSize=32m" >&5
15940    $ECHO "Command: $JAVA -XX:PermSize=32m -version" >&5
15941    OUTPUT=`$JAVA -XX:PermSize=32m -version 2>&1`
15942    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
15943    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
15944    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15945        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:PermSize=32m"
15946	JVM_ARG_OK=true
15947    else
15948	$ECHO "Arg failed:" >&5
15949	$ECHO "$OUTPUT" >&5
15950	JVM_ARG_OK=false
15951    fi
15952
15953
15954    $ECHO "Check if jvm arg is ok: -XX:MaxPermSize=160m" >&5
15955    $ECHO "Command: $JAVA -XX:MaxPermSize=160m -version" >&5
15956    OUTPUT=`$JAVA -XX:MaxPermSize=160m -version 2>&1`
15957    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
15958    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
15959    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15960        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:MaxPermSize=160m"
15961	JVM_ARG_OK=true
15962    else
15963	$ECHO "Arg failed:" >&5
15964	$ECHO "$OUTPUT" >&5
15965	JVM_ARG_OK=false
15966    fi
15967
15968
15969    $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
15970    $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
15971    OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
15972    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
15973    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
15974    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15975        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:ThreadStackSize=$STACK_SIZE"
15976	JVM_ARG_OK=true
15977    else
15978	$ECHO "Arg failed:" >&5
15979	$ECHO "$OUTPUT" >&5
15980	JVM_ARG_OK=false
15981    fi
15982
15983    # Disable special log output when a debug build is used as Boot JDK...
15984
15985    $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
15986    $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
15987    OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -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:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
15992	JVM_ARG_OK=true
15993    else
15994	$ECHO "Arg failed:" >&5
15995	$ECHO "$OUTPUT" >&5
15996	JVM_ARG_OK=false
15997    fi
15998
15999fi
16000
16001BOOT_JDK_JVMARGS=$boot_jdk_jvmargs
16002
16003
16004
16005###############################################################################
16006#
16007# Configure the sources to use. We can add or override individual directories.
16008#
16009###############################################################################
16010
16011
16012
16013# Where are the sources. Any of these can be overridden
16014# using --with-override-corba and the likes.
16015LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
16016CORBA_TOPDIR="$SRC_ROOT/corba"
16017JAXP_TOPDIR="$SRC_ROOT/jaxp"
16018JAXWS_TOPDIR="$SRC_ROOT/jaxws"
16019HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
16020NASHORN_TOPDIR="$SRC_ROOT/nashorn"
16021JDK_TOPDIR="$SRC_ROOT/jdk"
16022
16023
16024
16025
16026
16027
16028
16029
16030
16031
16032###############################################################################
16033#
16034# Pickup additional source for a component from outside of the source root
16035# or override source for a component.
16036#
16037
16038# Check whether --with-add-source-root was given.
16039if test "${with_add_source_root+set}" = set; then :
16040  withval=$with_add_source_root;
16041fi
16042
16043
16044
16045# Check whether --with-override-source-root was given.
16046if test "${with_override_source_root+set}" = set; then :
16047  withval=$with_override_source_root;
16048fi
16049
16050
16051
16052# Check whether --with-adds-and-overrides was given.
16053if test "${with_adds_and_overrides+set}" = set; then :
16054  withval=$with_adds_and_overrides;
16055fi
16056
16057
16058if test "x$with_adds_and_overrides" != x; then
16059    with_add_source_root="$with_adds_and_overrides/adds"
16060    with_override_source_root="$with_adds_and_overrides/overrides"
16061fi
16062
16063if test "x$with_add_source_root" != x; then
16064    if ! test -d $with_add_source_root; then
16065       as_fn_error $? "Trying to use a non-existant add-source-root $with_add_source_root" "$LINENO" 5
16066    fi
16067    CURDIR="$PWD"
16068    cd "$with_add_source_root"
16069    ADD_SRC_ROOT="`pwd`"
16070    cd "$CURDIR"
16071    # Verify that the addon source root does not have any root makefiles.
16072    # If it does, then it is usually an error, prevent this.
16073    if test -f $with_add_source_root/langtools/makefiles/Makefile || \
16074       test -f $with_add_source_root/langtools/make/Makefile; then
16075        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
16076    fi
16077    if test -f $with_add_source_root/corba/makefiles/Makefile || \
16078       test -f $with_add_source_root/corba/make/Makefile; then
16079        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
16080    fi
16081    if test -f $with_add_source_root/jaxp/makefiles/Makefile || \
16082       test -f $with_add_source_root/jaxp/make/Makefile; then
16083        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
16084    fi
16085    if test -f $with_add_source_root/jaxws/makefiles/Makefile || \
16086       test -f $with_add_source_root/jaxws/make/Makefile; then
16087        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
16088    fi
16089    if test -f $with_add_source_root/hotspot/makefiles/Makefile || \
16090       test -f $with_add_source_root/hotspot/make/Makefile; then
16091        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
16092    fi
16093    if test -f $with_add_source_root/nashorn/makefiles/Makefile || \
16094       test -f $with_add_source_root/nashorn/make/Makefile; then
16095        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
16096    fi
16097    if test -f $with_add_source_root/jdk/makefiles/Makefile || \
16098       test -f $with_add_source_root/jdk/make/Makefile; then
16099        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
16100    fi
16101fi
16102
16103
16104if test "x$with_override_source_root" != x; then
16105    if ! test -d $with_override_source_root; then
16106       as_fn_error $? "Trying to use a non-existant override-source-root $with_override_source_root" "$LINENO" 5
16107    fi
16108    CURDIR="$PWD"
16109    cd "$with_override_source_root"
16110    OVERRIDE_SRC_ROOT="`pwd`"
16111    cd "$CURDIR"
16112    if test -f $with_override_source_root/langtools/makefiles/Makefile || \
16113       test -f $with_override_source_root/langtools/make/Makefile; then
16114        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
16115    fi
16116    if test -f $with_override_source_root/corba/makefiles/Makefile || \
16117       test -f $with_override_source_root/corba/make/Makefile; then
16118        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
16119    fi
16120    if test -f $with_override_source_root/jaxp/makefiles/Makefile || \
16121       test -f $with_override_source_root/jaxp/make/Makefile; then
16122        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
16123    fi
16124    if test -f $with_override_source_root/jaxws/makefiles/Makefile || \
16125       test -f $with_override_source_root/jaxws/make/Makefile; then
16126        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
16127    fi
16128    if test -f $with_override_source_root/hotspot/makefiles/Makefile || \
16129       test -f $with_override_source_root/hotspot/make/Makefile; then
16130        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
16131    fi
16132    if test -f $with_override_source_root/nashorn/makefiles/Makefile || \
16133       test -f $with_override_source_root/nashorn/make/Makefile; then
16134        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
16135    fi
16136    if test -f $with_override_source_root/jdk/makefiles/Makefile || \
16137       test -f $with_override_source_root/jdk/make/Makefile; then
16138        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
16139    fi
16140fi
16141
16142
16143###############################################################################
16144#
16145# Override a repo completely, this is used for example when you have 3 small
16146# development sandboxes of the langtools sources and want to avoid having 3 full
16147# OpenJDK sources checked out on disk.
16148#
16149# Assuming that the 3 langtools sandboxes are located here:
16150# /home/fredrik/sandbox1/langtools
16151# /home/fredrik/sandbox2/langtools
16152# /home/fredrik/sandbox3/langtools
16153#
16154# From the source root you create build subdirs manually:
16155#     mkdir -p build1 build2 build3
16156# in each build directory run:
16157#     (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make)
16158#     (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make)
16159#     (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make)
16160#
16161
16162
16163# Check whether --with-override-langtools was given.
16164if test "${with_override_langtools+set}" = set; then :
16165  withval=$with_override_langtools;
16166fi
16167
16168
16169
16170# Check whether --with-override-corba was given.
16171if test "${with_override_corba+set}" = set; then :
16172  withval=$with_override_corba;
16173fi
16174
16175
16176
16177# Check whether --with-override-jaxp was given.
16178if test "${with_override_jaxp+set}" = set; then :
16179  withval=$with_override_jaxp;
16180fi
16181
16182
16183
16184# Check whether --with-override-jaxws was given.
16185if test "${with_override_jaxws+set}" = set; then :
16186  withval=$with_override_jaxws;
16187fi
16188
16189
16190
16191# Check whether --with-override-hotspot was given.
16192if test "${with_override_hotspot+set}" = set; then :
16193  withval=$with_override_hotspot;
16194fi
16195
16196
16197
16198# Check whether --with-override-nashorn was given.
16199if test "${with_override_nashorn+set}" = set; then :
16200  withval=$with_override_nashorn;
16201fi
16202
16203
16204
16205# Check whether --with-override-jdk was given.
16206if test "${with_override_jdk+set}" = set; then :
16207  withval=$with_override_jdk;
16208fi
16209
16210
16211if test "x$with_override_langtools" != x; then
16212    CURDIR="$PWD"
16213    cd "$with_override_langtools"
16214    LANGTOOLS_TOPDIR="`pwd`"
16215    cd "$CURDIR"
16216    if ! test -f $LANGTOOLS_TOPDIR/makefiles/Makefile; then
16217        as_fn_error $? "You have to override langtools with a full langtools repo!" "$LINENO" 5
16218    fi
16219    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if langtools should be overridden" >&5
16220$as_echo_n "checking if langtools should be overridden... " >&6; }
16221    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $LANGTOOLS_TOPDIR" >&5
16222$as_echo "yes with $LANGTOOLS_TOPDIR" >&6; }
16223fi
16224if test "x$with_override_corba" != x; then
16225    CURDIR="$PWD"
16226    cd "$with_override_corba"
16227    CORBA_TOPDIR="`pwd`"
16228    cd "$CURDIR"
16229    if ! test -f $CORBA_TOPDIR/makefiles/Makefile; then
16230        as_fn_error $? "You have to override corba with a full corba repo!" "$LINENO" 5
16231    fi
16232    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if corba should be overridden" >&5
16233$as_echo_n "checking if corba should be overridden... " >&6; }
16234    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $CORBA_TOPDIR" >&5
16235$as_echo "yes with $CORBA_TOPDIR" >&6; }
16236fi
16237if test "x$with_override_jaxp" != x; then
16238    CURDIR="$PWD"
16239    cd "$with_override_jaxp"
16240    JAXP_TOPDIR="`pwd`"
16241    cd "$CURDIR"
16242    if ! test -f $JAXP_TOPDIR/makefiles/Makefile; then
16243        as_fn_error $? "You have to override jaxp with a full jaxp repo!" "$LINENO" 5
16244    fi
16245    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxp should be overridden" >&5
16246$as_echo_n "checking if jaxp should be overridden... " >&6; }
16247    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXP_TOPDIR" >&5
16248$as_echo "yes with $JAXP_TOPDIR" >&6; }
16249fi
16250if test "x$with_override_jaxws" != x; then
16251    CURDIR="$PWD"
16252    cd "$with_override_jaxws"
16253    JAXWS_TOPDIR="`pwd`"
16254    cd "$CURDIR"
16255    if ! test -f $JAXWS_TOPDIR/makefiles/Makefile; then
16256        as_fn_error $? "You have to override jaxws with a full jaxws repo!" "$LINENO" 5
16257    fi
16258    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxws should be overridden" >&5
16259$as_echo_n "checking if jaxws should be overridden... " >&6; }
16260    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXWS_TOPDIR" >&5
16261$as_echo "yes with $JAXWS_TOPDIR" >&6; }
16262fi
16263if test "x$with_override_hotspot" != x; then
16264    CURDIR="$PWD"
16265    cd "$with_override_hotspot"
16266    HOTSPOT_TOPDIR="`pwd`"
16267    cd "$CURDIR"
16268    if ! test -f $HOTSPOT_TOPDIR/make/Makefile && \
16269       ! test -f $HOTSPOT_TOPDIR/makefiles/Makefile; then
16270        as_fn_error $? "You have to override hotspot with a full hotspot repo!" "$LINENO" 5
16271    fi
16272    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be overridden" >&5
16273$as_echo_n "checking if hotspot should be overridden... " >&6; }
16274    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $HOTSPOT_TOPDIR" >&5
16275$as_echo "yes with $HOTSPOT_TOPDIR" >&6; }
16276fi
16277if test "x$with_override_nashorn" != x; then
16278    CURDIR="$PWD"
16279    cd "$with_override_nashorn"
16280    NASHORN_TOPDIR="`pwd`"
16281    cd "$CURDIR"
16282    if ! test -f $NASHORN_TOPDIR/makefiles/Makefile; then
16283        as_fn_error $? "You have to override nashorn with a full nashorn repo!" "$LINENO" 5
16284    fi
16285    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if nashorn should be overridden" >&5
16286$as_echo_n "checking if nashorn should be overridden... " >&6; }
16287    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $NASHORN_TOPDIR" >&5
16288$as_echo "yes with $NASHORN_TOPDIR" >&6; }
16289fi
16290if test "x$with_override_jdk" != x; then
16291    CURDIR="$PWD"
16292    cd "$with_override_jdk"
16293    JDK_TOPDIR="`pwd`"
16294    cd "$CURDIR"
16295    if ! test -f $JDK_TOPDIR/makefiles/Makefile; then
16296        as_fn_error $? "You have to override JDK with a full JDK repo!" "$LINENO" 5
16297    fi
16298    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if JDK should be overridden" >&5
16299$as_echo_n "checking if JDK should be overridden... " >&6; }
16300    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JDK_TOPDIR" >&5
16301$as_echo "yes with $JDK_TOPDIR" >&6; }
16302fi
16303
16304
16305
16306BUILD_OUTPUT="$OUTPUT_ROOT"
16307
16308
16309HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
16310BUILD_HOTSPOT=true
16311
16312
16313
16314# Check whether --with-import-hotspot was given.
16315if test "${with_import_hotspot+set}" = set; then :
16316  withval=$with_import_hotspot;
16317fi
16318
16319if test "x$with_import_hotspot" != x; then
16320    CURDIR="$PWD"
16321    cd "$with_import_hotspot"
16322    HOTSPOT_DIST="`pwd`"
16323    cd "$CURDIR"
16324    if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
16325        as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
16326    fi
16327    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
16328$as_echo_n "checking if hotspot should be imported... " >&6; }
16329    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
16330$as_echo "yes from $HOTSPOT_DIST" >&6; }
16331    BUILD_HOTSPOT=false
16332fi
16333
16334JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
16335
16336
16337###############################################################################
16338#
16339# Setup the toolchain (compilers etc), i.e. the tools that need to be
16340# cross-compilation aware.
16341#
16342###############################################################################
16343
16344
16345###############################################################################
16346#
16347# Configure the development tool paths and potential sysroot.
16348#
16349ac_ext=cpp
16350ac_cpp='$CXXCPP $CPPFLAGS'
16351ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16352ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16353ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16354
16355
16356# The option used to specify the target .o,.a or .so file.
16357# When compiling, how to specify the to be created object file.
16358CC_OUT_OPTION='-o$(SPACE)'
16359# When linking, how to specify the to be created executable.
16360EXE_OUT_OPTION='-o$(SPACE)'
16361# When linking, how to specify the to be created dynamically linkable library.
16362LD_OUT_OPTION='-o$(SPACE)'
16363# When archiving, how to specify the to be create static archive for object files.
16364AR_OUT_OPTION='rcs$(SPACE)'
16365
16366
16367
16368
16369
16370# Locate the actual tools
16371
16372
16373# Check whether --with-jtreg was given.
16374if test "${with_jtreg+set}" = set; then :
16375  withval=$with_jtreg;
16376else
16377  with_jtreg=no
16378fi
16379
16380
16381  if test "x$with_jtreg" = xno; then
16382    # jtreg disabled
16383    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
16384$as_echo_n "checking for jtreg... " >&6; }
16385    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16386$as_echo "no" >&6; }
16387  else
16388    if test "x$with_jtreg" != xyes; then
16389      # with path specified.
16390      JT_HOME="$with_jtreg"
16391    fi
16392
16393    if test "x$JT_HOME" != x; then
16394      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
16395$as_echo_n "checking for jtreg... " >&6; }
16396
16397      # use JT_HOME enviroment var.
16398
16399  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16400
16401  # Input might be given as Windows format, start by converting to
16402  # unix format.
16403  path="$JT_HOME"
16404  new_path=`$CYGPATH -u "$path"`
16405
16406  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16407  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16408  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16409  # "foo.exe" is OK but "foo" is an error.
16410  #
16411  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16412  # It is also a way to make sure we got the proper file name for the real test later on.
16413  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16414  if test "x$test_shortpath" = x; then
16415    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
16416$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
16417    as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
16418  fi
16419
16420  # Call helper function which possibly converts this using DOS-style short mode.
16421  # If so, the updated path is stored in $new_path.
16422
16423  input_path="$new_path"
16424  # Check if we need to convert this using DOS-style short mode. If the path
16425  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16426  # take no chances and rewrite it.
16427  # Note: m4 eats our [], so we need to use [ and ] instead.
16428  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16429  if test "x$has_forbidden_chars" != x; then
16430    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16431    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16432    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16433    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16434      # Going to short mode and back again did indeed matter. Since short mode is
16435      # case insensitive, let's make it lowercase to improve readability.
16436      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16437      # Now convert it back to Unix-stile (cygpath)
16438      input_path=`$CYGPATH -u "$shortmode_path"`
16439      new_path="$input_path"
16440    fi
16441  fi
16442
16443  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16444  if test "x$test_cygdrive_prefix" = x; then
16445    # As a simple fix, exclude /usr/bin since it's not a real path.
16446    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16447      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16448      # a path prefixed by /cygdrive for fixpath to work.
16449      new_path="$CYGWIN_ROOT_PATH$input_path"
16450    fi
16451  fi
16452
16453
16454  if test "x$path" != "x$new_path"; then
16455    JT_HOME="$new_path"
16456    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
16457$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
16458  fi
16459
16460  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16461
16462  path="$JT_HOME"
16463  has_colon=`$ECHO $path | $GREP ^.:`
16464  new_path="$path"
16465  if test "x$has_colon" = x; then
16466    # Not in mixed or Windows style, start by that.
16467    new_path=`cmd //c echo $path`
16468  fi
16469
16470
16471  input_path="$new_path"
16472  # Check if we need to convert this using DOS-style short mode. If the path
16473  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16474  # take no chances and rewrite it.
16475  # Note: m4 eats our [], so we need to use [ and ] instead.
16476  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16477  if test "x$has_forbidden_chars" != x; then
16478    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16479    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16480  fi
16481
16482
16483  windows_path="$new_path"
16484  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16485    unix_path=`$CYGPATH -u "$windows_path"`
16486    new_path="$unix_path"
16487  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16488    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16489    new_path="$unix_path"
16490  fi
16491
16492  if test "x$path" != "x$new_path"; then
16493    JT_HOME="$new_path"
16494    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
16495$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
16496  fi
16497
16498  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16499  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16500
16501  else
16502    # We're on a posix platform. Hooray! :)
16503    path="$JT_HOME"
16504    has_space=`$ECHO "$path" | $GREP " "`
16505    if test "x$has_space" != x; then
16506      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
16507$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
16508      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16509    fi
16510
16511    # Use eval to expand a potential ~
16512    eval path="$path"
16513    if test ! -f "$path" && test ! -d "$path"; then
16514      as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
16515    fi
16516
16517    JT_HOME="`cd "$path"; $THEPWDCMD -L`"
16518  fi
16519
16520
16521      # jtreg win32 script works for everybody
16522      JTREGEXE="$JT_HOME/win32/bin/jtreg"
16523
16524      if test ! -f "$JTREGEXE"; then
16525        as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
16526      fi
16527
16528      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
16529$as_echo "$JTREGEXE" >&6; }
16530    else
16531      # try to find jtreg on path
16532
16533    for ac_prog in jtreg
16534do
16535  # Extract the first word of "$ac_prog", so it can be a program name with args.
16536set dummy $ac_prog; ac_word=$2
16537{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16538$as_echo_n "checking for $ac_word... " >&6; }
16539if ${ac_cv_path_JTREGEXE+:} false; then :
16540  $as_echo_n "(cached) " >&6
16541else
16542  case $JTREGEXE in
16543  [\\/]* | ?:[\\/]*)
16544  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
16545  ;;
16546  *)
16547  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16548for as_dir in $PATH
16549do
16550  IFS=$as_save_IFS
16551  test -z "$as_dir" && as_dir=.
16552    for ac_exec_ext in '' $ac_executable_extensions; do
16553  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16554    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
16555    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16556    break 2
16557  fi
16558done
16559  done
16560IFS=$as_save_IFS
16561
16562  ;;
16563esac
16564fi
16565JTREGEXE=$ac_cv_path_JTREGEXE
16566if test -n "$JTREGEXE"; then
16567  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
16568$as_echo "$JTREGEXE" >&6; }
16569else
16570  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16571$as_echo "no" >&6; }
16572fi
16573
16574
16575  test -n "$JTREGEXE" && break
16576done
16577
16578
16579    if test "x$JTREGEXE" = x; then
16580        if test "xjtreg" = x; then
16581          PROG_NAME=jtregexe
16582        else
16583          PROG_NAME=jtreg
16584        fi
16585        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
16586$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
16587        as_fn_error $? "Cannot continue" "$LINENO" 5
16588    fi
16589
16590
16591      JT_HOME="`$DIRNAME $JTREGEXE`"
16592    fi
16593  fi
16594
16595
16596
16597
16598
16599if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
16600
16601  # Store path to cygwin link.exe to help excluding it when searching for
16602  # VS linker. This must be done before changing the PATH when looking for VS.
16603  # Extract the first word of "link", so it can be a program name with args.
16604set dummy link; ac_word=$2
16605{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16606$as_echo_n "checking for $ac_word... " >&6; }
16607if ${ac_cv_path_CYGWIN_LINK+:} false; then :
16608  $as_echo_n "(cached) " >&6
16609else
16610  case $CYGWIN_LINK in
16611  [\\/]* | ?:[\\/]*)
16612  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
16613  ;;
16614  *)
16615  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16616for as_dir in $PATH
16617do
16618  IFS=$as_save_IFS
16619  test -z "$as_dir" && as_dir=.
16620    for ac_exec_ext in '' $ac_executable_extensions; do
16621  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16622    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
16623    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16624    break 2
16625  fi
16626done
16627  done
16628IFS=$as_save_IFS
16629
16630  ;;
16631esac
16632fi
16633CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
16634if test -n "$CYGWIN_LINK"; then
16635  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
16636$as_echo "$CYGWIN_LINK" >&6; }
16637else
16638  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16639$as_echo "no" >&6; }
16640fi
16641
16642
16643  if test "x$CYGWIN_LINK" != x; then
16644    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
16645$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
16646    "$CYGWIN_LINK" --version > /dev/null
16647    if test $? -eq 0 ; then
16648      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16649$as_echo "yes" >&6; }
16650    else
16651      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16652$as_echo "no" >&6; }
16653      # This might be the VS linker. Don't exclude it later on.
16654      CYGWIN_LINK=""
16655    fi
16656  fi
16657
16658  # First-hand choice is to locate and run the vsvars bat file.
16659
16660  if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16661    VCVARSFILE="vc/bin/vcvars32.bat"
16662  else
16663    VCVARSFILE="vc/bin/amd64/vcvars64.bat"
16664  fi
16665
16666  VS_ENV_CMD=""
16667  VS_ENV_ARGS=""
16668  if test "x$with_toolsdir" != x; then
16669
16670  if test "x$VS_ENV_CMD" = x; then
16671    VS100BASE="$with_toolsdir/../.."
16672    METHOD="--with-tools-dir"
16673
16674  windows_path="$VS100BASE"
16675  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16676    unix_path=`$CYGPATH -u "$windows_path"`
16677    VS100BASE="$unix_path"
16678  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16679    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16680    VS100BASE="$unix_path"
16681  fi
16682
16683    if test -d "$VS100BASE"; then
16684      if test -f "$VS100BASE/$VCVARSFILE"; then
16685        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16686$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16687        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16688      else
16689        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16690$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16691        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16692$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16693      fi
16694    fi
16695  fi
16696
16697  fi
16698
16699  if test "x$with_toolsdir" != x && test "x$VS_ENV_CMD" = x; then
16700    # Having specified an argument which is incorrect will produce an instant failure;
16701    # we should not go on looking
16702    { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&5
16703$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&6;}
16704    { $as_echo "$as_me:${as_lineno-$LINENO}: Please point to the VC/bin directory within the Visual Studio installation" >&5
16705$as_echo "$as_me: Please point to the VC/bin directory within the Visual Studio installation" >&6;}
16706    as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
16707  fi
16708
16709  if test "x$VS100COMNTOOLS" != x; then
16710
16711  if test "x$VS_ENV_CMD" = x; then
16712    VS100BASE="$VS100COMNTOOLS/../.."
16713    METHOD="VS100COMNTOOLS variable"
16714
16715  windows_path="$VS100BASE"
16716  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16717    unix_path=`$CYGPATH -u "$windows_path"`
16718    VS100BASE="$unix_path"
16719  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16720    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16721    VS100BASE="$unix_path"
16722  fi
16723
16724    if test -d "$VS100BASE"; then
16725      if test -f "$VS100BASE/$VCVARSFILE"; then
16726        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16727$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16728        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16729      else
16730        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16731$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16732        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16733$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16734      fi
16735    fi
16736  fi
16737
16738  fi
16739  if test "x$PROGRAMFILES" != x; then
16740
16741  if test "x$VS_ENV_CMD" = x; then
16742    VS100BASE="$PROGRAMFILES/Microsoft Visual Studio 10.0"
16743    METHOD="well-known name"
16744
16745  windows_path="$VS100BASE"
16746  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16747    unix_path=`$CYGPATH -u "$windows_path"`
16748    VS100BASE="$unix_path"
16749  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16750    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16751    VS100BASE="$unix_path"
16752  fi
16753
16754    if test -d "$VS100BASE"; then
16755      if test -f "$VS100BASE/$VCVARSFILE"; then
16756        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16757$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16758        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16759      else
16760        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16761$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16762        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16763$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16764      fi
16765    fi
16766  fi
16767
16768  fi
16769
16770  if test "x$VS_ENV_CMD" = x; then
16771    VS100BASE="C:/Program Files/Microsoft Visual Studio 10.0"
16772    METHOD="well-known name"
16773
16774  windows_path="$VS100BASE"
16775  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16776    unix_path=`$CYGPATH -u "$windows_path"`
16777    VS100BASE="$unix_path"
16778  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16779    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16780    VS100BASE="$unix_path"
16781  fi
16782
16783    if test -d "$VS100BASE"; then
16784      if test -f "$VS100BASE/$VCVARSFILE"; then
16785        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16786$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16787        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16788      else
16789        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16790$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16791        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16792$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16793      fi
16794    fi
16795  fi
16796
16797
16798  if test "x$VS_ENV_CMD" = x; then
16799    VS100BASE="C:/Program Files (x86)/Microsoft Visual Studio 10.0"
16800    METHOD="well-known name"
16801
16802  windows_path="$VS100BASE"
16803  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16804    unix_path=`$CYGPATH -u "$windows_path"`
16805    VS100BASE="$unix_path"
16806  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16807    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16808    VS100BASE="$unix_path"
16809  fi
16810
16811    if test -d "$VS100BASE"; then
16812      if test -f "$VS100BASE/$VCVARSFILE"; then
16813        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16814$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16815        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16816      else
16817        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16818$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16819        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16820$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16821      fi
16822    fi
16823  fi
16824
16825
16826  if test "x$ProgramW6432" != x; then
16827
16828  if test "x$VS_ENV_CMD" = x; then
16829    WIN_SDK_BASE="$ProgramW6432/Microsoft SDKs/Windows/v7.1/Bin"
16830    METHOD="well-known name"
16831
16832  windows_path="$WIN_SDK_BASE"
16833  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16834    unix_path=`$CYGPATH -u "$windows_path"`
16835    WIN_SDK_BASE="$unix_path"
16836  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16837    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16838    WIN_SDK_BASE="$unix_path"
16839  fi
16840
16841    if test -d "$WIN_SDK_BASE"; then
16842      # There have been cases of partial or broken SDK installations. A missing
16843      # lib dir is not going to work.
16844      if test ! -d "$WIN_SDK_BASE/../lib"; then
16845        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16846$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16847        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16848$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16849      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16850        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16851$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16852        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16853        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16854          VS_ENV_ARGS="/x86"
16855        else
16856          VS_ENV_ARGS="/x64"
16857        fi
16858      else
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, SetEnv.Cmd is missing. Ignoring" >&5
16862$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16863      fi
16864    fi
16865  fi
16866
16867  fi
16868  if test "x$PROGRAMW6432" != x; then
16869
16870  if test "x$VS_ENV_CMD" = x; then
16871    WIN_SDK_BASE="$PROGRAMW6432/Microsoft SDKs/Windows/v7.1/Bin"
16872    METHOD="well-known name"
16873
16874  windows_path="$WIN_SDK_BASE"
16875  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16876    unix_path=`$CYGPATH -u "$windows_path"`
16877    WIN_SDK_BASE="$unix_path"
16878  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16879    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16880    WIN_SDK_BASE="$unix_path"
16881  fi
16882
16883    if test -d "$WIN_SDK_BASE"; then
16884      # There have been cases of partial or broken SDK installations. A missing
16885      # lib dir is not going to work.
16886      if test ! -d "$WIN_SDK_BASE/../lib"; then
16887        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16888$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16889        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16890$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16891      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16892        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16893$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16894        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16895        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16896          VS_ENV_ARGS="/x86"
16897        else
16898          VS_ENV_ARGS="/x64"
16899        fi
16900      else
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, SetEnv.Cmd is missing. Ignoring" >&5
16904$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16905      fi
16906    fi
16907  fi
16908
16909  fi
16910  if test "x$PROGRAMFILES" != x; then
16911
16912  if test "x$VS_ENV_CMD" = x; then
16913    WIN_SDK_BASE="$PROGRAMFILES/Microsoft SDKs/Windows/v7.1/Bin"
16914    METHOD="well-known name"
16915
16916  windows_path="$WIN_SDK_BASE"
16917  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16918    unix_path=`$CYGPATH -u "$windows_path"`
16919    WIN_SDK_BASE="$unix_path"
16920  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16921    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16922    WIN_SDK_BASE="$unix_path"
16923  fi
16924
16925    if test -d "$WIN_SDK_BASE"; then
16926      # There have been cases of partial or broken SDK installations. A missing
16927      # lib dir is not going to work.
16928      if test ! -d "$WIN_SDK_BASE/../lib"; then
16929        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16930$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16931        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16932$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16933      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16934        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16935$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16936        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16937        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16938          VS_ENV_ARGS="/x86"
16939        else
16940          VS_ENV_ARGS="/x64"
16941        fi
16942      else
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, SetEnv.Cmd is missing. Ignoring" >&5
16946$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16947      fi
16948    fi
16949  fi
16950
16951  fi
16952
16953  if test "x$VS_ENV_CMD" = x; then
16954    WIN_SDK_BASE="C:/Program Files/Microsoft SDKs/Windows/v7.1/Bin"
16955    METHOD="well-known name"
16956
16957  windows_path="$WIN_SDK_BASE"
16958  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16959    unix_path=`$CYGPATH -u "$windows_path"`
16960    WIN_SDK_BASE="$unix_path"
16961  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16962    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16963    WIN_SDK_BASE="$unix_path"
16964  fi
16965
16966    if test -d "$WIN_SDK_BASE"; then
16967      # There have been cases of partial or broken SDK installations. A missing
16968      # lib dir is not going to work.
16969      if test ! -d "$WIN_SDK_BASE/../lib"; then
16970        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16971$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16972        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16973$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16974      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16975        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16976$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16977        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16978        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16979          VS_ENV_ARGS="/x86"
16980        else
16981          VS_ENV_ARGS="/x64"
16982        fi
16983      else
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, SetEnv.Cmd is missing. Ignoring" >&5
16987$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16988      fi
16989    fi
16990  fi
16991
16992
16993  if test "x$VS_ENV_CMD" = x; then
16994    WIN_SDK_BASE="C:/Program Files (x86)/Microsoft SDKs/Windows/v7.1/Bin"
16995    METHOD="well-known name"
16996
16997  windows_path="$WIN_SDK_BASE"
16998  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16999    unix_path=`$CYGPATH -u "$windows_path"`
17000    WIN_SDK_BASE="$unix_path"
17001  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17002    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17003    WIN_SDK_BASE="$unix_path"
17004  fi
17005
17006    if test -d "$WIN_SDK_BASE"; then
17007      # There have been cases of partial or broken SDK installations. A missing
17008      # lib dir is not going to work.
17009      if test ! -d "$WIN_SDK_BASE/../lib"; then
17010        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17011$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17012        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
17013$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
17014      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
17015        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17016$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17017        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
17018        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17019          VS_ENV_ARGS="/x86"
17020        else
17021          VS_ENV_ARGS="/x64"
17022        fi
17023      else
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, SetEnv.Cmd is missing. Ignoring" >&5
17027$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
17028      fi
17029    fi
17030  fi
17031
17032
17033  if test "x$VS_ENV_CMD" != x; then
17034    # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
17035
17036  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17037
17038  # First separate the path from the arguments. This will split at the first
17039  # space.
17040  complete="$VS_ENV_CMD"
17041  path="${complete%% *}"
17042  tmp="$complete EOL"
17043  arguments="${tmp#* }"
17044
17045  # Input might be given as Windows format, start by converting to
17046  # unix format.
17047  new_path=`$CYGPATH -u "$path"`
17048
17049  # Now try to locate executable using which
17050  new_path=`$WHICH "$new_path" 2> /dev/null`
17051  # bat and cmd files are not always considered executable in cygwin causing which
17052  # to not find them
17053  if test "x$new_path" = x \
17054           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17055           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17056    new_path=`$CYGPATH -u "$path"`
17057  fi
17058  if test "x$new_path" = x; then
17059    # Oops. Which didn't find the executable.
17060    # The splitting of arguments from the executable at a space might have been incorrect,
17061    # since paths with space are more likely in Windows. Give it another try with the whole
17062    # argument.
17063    path="$complete"
17064    arguments="EOL"
17065    new_path=`$CYGPATH -u "$path"`
17066    new_path=`$WHICH "$new_path" 2> /dev/null`
17067    # bat and cmd files are not always considered executable in cygwin causing which
17068    # to not find them
17069    if test "x$new_path" = x \
17070             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17071             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17072      new_path=`$CYGPATH -u "$path"`
17073    fi
17074    if test "x$new_path" = x; then
17075      # It's still not found. Now this is an unrecoverable error.
17076      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
17077$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
17078      has_space=`$ECHO "$complete" | $GREP " "`
17079      if test "x$has_space" != x; then
17080        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17081$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17082      fi
17083      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
17084    fi
17085  fi
17086
17087  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17088  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17089  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17090  # "foo.exe" is OK but "foo" is an error.
17091  #
17092  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17093  # It is also a way to make sure we got the proper file name for the real test later on.
17094  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17095  if test "x$test_shortpath" = x; then
17096    # Short path failed, file does not exist as specified.
17097    # Try adding .exe or .cmd
17098    if test -f "${new_path}.exe"; then
17099       input_to_shortpath="${new_path}.exe"
17100    elif test -f "${new_path}.cmd"; then
17101       input_to_shortpath="${new_path}.cmd"
17102    else
17103      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
17104$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
17105      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17106$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17107      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
17108    fi
17109  else
17110    input_to_shortpath="$new_path"
17111  fi
17112
17113  # Call helper function which possibly converts this using DOS-style short mode.
17114  # If so, the updated path is stored in $new_path.
17115  new_path="$input_to_shortpath"
17116
17117  input_path="$input_to_shortpath"
17118  # Check if we need to convert this using DOS-style short mode. If the path
17119  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17120  # take no chances and rewrite it.
17121  # Note: m4 eats our [], so we need to use [ and ] instead.
17122  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17123  if test "x$has_forbidden_chars" != x; then
17124    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17125    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17126    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17127    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17128      # Going to short mode and back again did indeed matter. Since short mode is
17129      # case insensitive, let's make it lowercase to improve readability.
17130      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17131      # Now convert it back to Unix-stile (cygpath)
17132      input_path=`$CYGPATH -u "$shortmode_path"`
17133      new_path="$input_path"
17134    fi
17135  fi
17136
17137  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17138  if test "x$test_cygdrive_prefix" = x; then
17139    # As a simple fix, exclude /usr/bin since it's not a real path.
17140    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17141      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17142      # a path prefixed by /cygdrive for fixpath to work.
17143      new_path="$CYGWIN_ROOT_PATH$input_path"
17144    fi
17145  fi
17146
17147  # remove trailing .exe if any
17148  new_path="${new_path/%.exe/}"
17149
17150  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17151
17152  # First separate the path from the arguments. This will split at the first
17153  # space.
17154  complete="$VS_ENV_CMD"
17155  path="${complete%% *}"
17156  tmp="$complete EOL"
17157  arguments="${tmp#* }"
17158
17159  # Input might be given as Windows format, start by converting to
17160  # unix format.
17161  new_path="$path"
17162
17163  windows_path="$new_path"
17164  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17165    unix_path=`$CYGPATH -u "$windows_path"`
17166    new_path="$unix_path"
17167  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17168    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17169    new_path="$unix_path"
17170  fi
17171
17172
17173  # Now try to locate executable using which
17174  new_path=`$WHICH "$new_path" 2> /dev/null`
17175
17176  if test "x$new_path" = x; then
17177    # Oops. Which didn't find the executable.
17178    # The splitting of arguments from the executable at a space might have been incorrect,
17179    # since paths with space are more likely in Windows. Give it another try with the whole
17180    # argument.
17181    path="$complete"
17182    arguments="EOL"
17183    new_path="$path"
17184
17185  windows_path="$new_path"
17186  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17187    unix_path=`$CYGPATH -u "$windows_path"`
17188    new_path="$unix_path"
17189  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17190    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17191    new_path="$unix_path"
17192  fi
17193
17194
17195    new_path=`$WHICH "$new_path" 2> /dev/null`
17196
17197    if test "x$new_path" = x; then
17198      # It's still not found. Now this is an unrecoverable error.
17199      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
17200$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
17201      has_space=`$ECHO "$complete" | $GREP " "`
17202      if test "x$has_space" != x; then
17203        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17204$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17205      fi
17206      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
17207    fi
17208  fi
17209
17210  # Now new_path has a complete unix path to the binary
17211  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17212    # Keep paths in /bin as-is, but remove trailing .exe if any
17213    new_path="${new_path/%.exe/}"
17214    # Do not save /bin paths to all_fixpath_prefixes!
17215  else
17216    # Not in mixed or Windows style, start by that.
17217    new_path=`cmd //c echo $new_path`
17218
17219  input_path="$new_path"
17220  # Check if we need to convert this using DOS-style short mode. If the path
17221  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17222  # take no chances and rewrite it.
17223  # Note: m4 eats our [], so we need to use [ and ] instead.
17224  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17225  if test "x$has_forbidden_chars" != x; then
17226    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17227    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17228  fi
17229
17230    # Output is in $new_path
17231
17232  windows_path="$new_path"
17233  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17234    unix_path=`$CYGPATH -u "$windows_path"`
17235    new_path="$unix_path"
17236  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17237    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17238    new_path="$unix_path"
17239  fi
17240
17241    # remove trailing .exe if any
17242    new_path="${new_path/%.exe/}"
17243
17244    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17245    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17246  fi
17247
17248  else
17249    # We're on a posix platform. Hooray! :)
17250    # First separate the path from the arguments. This will split at the first
17251    # space.
17252    complete="$VS_ENV_CMD"
17253    path="${complete%% *}"
17254    tmp="$complete EOL"
17255    arguments="${tmp#* }"
17256
17257    # Cannot rely on the command "which" here since it doesn't always work.
17258    is_absolute_path=`$ECHO "$path" | $GREP ^/`
17259    if test -z "$is_absolute_path"; then
17260      # Path to executable is not absolute. Find it.
17261      IFS_save="$IFS"
17262      IFS=:
17263      for p in $PATH; do
17264        if test -f "$p/$path" && test -x "$p/$path"; then
17265          new_path="$p/$path"
17266          break
17267        fi
17268      done
17269      IFS="$IFS_save"
17270    else
17271      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&5
17272$as_echo "$as_me: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&6;}
17273      new_path="$path"
17274    fi
17275
17276    if test "x$new_path" = x; then
17277        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
17278$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
17279        has_space=`$ECHO "$complete" | $GREP " "`
17280        if test "x$has_space" != x; then
17281          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17282$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17283        fi
17284        as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
17285      fi
17286  fi
17287
17288      # Now join together the path and the arguments once again
17289      if test "x$arguments" != xEOL; then
17290        new_complete="$new_path ${arguments% *}"
17291      else
17292        new_complete="$new_path"
17293      fi
17294
17295  if test "x$complete" != "x$new_complete"; then
17296      VS_ENV_CMD="$new_complete"
17297      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
17298$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
17299    fi
17300
17301
17302    # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
17303    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
17304$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
17305    cd $OUTPUT_ROOT
17306    # FIXME: The code betweeen ---- was inlined from a separate script and is not properly adapted
17307    # to autoconf standards.
17308
17309    #----
17310
17311    # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment)
17312    # but calculate the difference in Cygwin environment before/after running it and then
17313    # apply the diff.
17314
17315    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
17316      _vs10varsall=`cygpath -a -m -s "$VS_ENV_CMD"`
17317      _dosvs10varsall=`cygpath -a -w -s $_vs10varsall`
17318      _dosbash=`cygpath -a -w -s \`which bash\`.*`
17319    else
17320      _dosvs10varsall=`cmd //c echo $VS_ENV_CMD`
17321      _dosbash=`cmd //c echo \`which bash\``
17322    fi
17323
17324    # generate the set of exported vars before/after the vs10 setup
17325    $ECHO "@echo off"                                           >  localdevenvtmp.bat
17326    $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export0" >> localdevenvtmp.bat
17327    $ECHO "call $_dosvs10varsall $VS_ENV_ARGS"                  >> localdevenvtmp.bat
17328    $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export1" >> localdevenvtmp.bat
17329
17330    # Now execute the newly created bat file.
17331    # The | cat is to stop SetEnv.Cmd to mess with system colors on msys
17332    cmd /c localdevenvtmp.bat | cat
17333
17334    # apply the diff (less some non-vs10 vars named by "!")
17335    $SORT localdevenvtmp.export0 | $GREP -v "!" > localdevenvtmp.export0.sort
17336    $SORT localdevenvtmp.export1 | $GREP -v "!" > localdevenvtmp.export1.sort
17337    $COMM -1 -3 localdevenvtmp.export0.sort localdevenvtmp.export1.sort > localdevenv.sh
17338
17339    # cleanup
17340    $RM localdevenvtmp*
17341    #----
17342    cd $CURDIR
17343    if test ! -s $OUTPUT_ROOT/localdevenv.sh; then
17344      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17345$as_echo "no" >&6; }
17346      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
17347$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
17348      { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
17349$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
17350      { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
17351$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
17352      as_fn_error $? "Cannot continue" "$LINENO" 5
17353    fi
17354
17355    # Now set all paths and other env variables. This will allow the rest of
17356    # the configure script to find and run the compiler in the proper way.
17357    { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
17358$as_echo "$as_me: Setting extracted environment variables" >&6;}
17359    . $OUTPUT_ROOT/localdevenv.sh
17360  else
17361    # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
17362    { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
17363$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
17364  fi
17365
17366  # At this point, we should have corrent variables in the environment, or we can't continue.
17367  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
17368$as_echo_n "checking for Visual Studio variables... " >&6; }
17369
17370  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x || test "x$WINDOWSSDKDIR" != x; then
17371    if test "x$INCLUDE" = x || test "x$LIB" = x; then
17372      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
17373$as_echo "present but broken" >&6; }
17374      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
17375    else
17376      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
17377$as_echo "ok" >&6; }
17378      # Remove any trailing \ from INCLUDE and LIB to avoid trouble in spec.gmk.
17379      VS_INCLUDE=`$ECHO "$INCLUDE" | $SED 's/\\\\$//'`
17380      VS_LIB=`$ECHO "$LIB" | $SED 's/\\\\$//'`
17381      # Remove any paths containing # (typically F#) as that messes up make
17382      PATH=`$ECHO "$PATH" | $SED 's/[^:#]*#[^:]*://g'`
17383      VS_PATH="$PATH"
17384
17385
17386
17387    fi
17388  else
17389    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17390$as_echo "not found" >&6; }
17391
17392    if test "x$VS_ENV_CMD" = x; then
17393      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
17394$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
17395      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
17396$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
17397    else
17398      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
17399$as_echo "$as_me: Running the extraction script failed." >&6;}
17400    fi
17401    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
17402$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
17403    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
17404$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
17405    as_fn_error $? "Cannot continue" "$LINENO" 5
17406  fi
17407
17408  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
17409$as_echo_n "checking for msvcr100.dll... " >&6; }
17410
17411# Check whether --with-msvcr-dll was given.
17412if test "${with_msvcr_dll+set}" = set; then :
17413  withval=$with_msvcr_dll;
17414fi
17415
17416  if test "x$with_msvcr_dll" != x; then
17417    MSVCR_DLL="$with_msvcr_dll"
17418  else
17419    if test "x$VCINSTALLDIR" != x; then
17420      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
17421        MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | grep x64 | head --lines 1`
17422      else
17423        MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | grep x86 | grep -v ia64 | grep -v x64 | head --lines 1`
17424        if test "x$MSVCR_DLL" = x; then
17425          MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | head --lines 1`
17426        fi
17427      fi
17428      if test "x$MSVCR_DLL" != x; then
17429        { $as_echo "$as_me:${as_lineno-$LINENO}: msvcr100.dll found in VCINSTALLDIR: $VCINSTALLDIR" >&5
17430$as_echo "$as_me: msvcr100.dll found in VCINSTALLDIR: $VCINSTALLDIR" >&6;}
17431      else
17432        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: msvcr100.dll not found in VCINSTALLDIR: $VCINSTALLDIR" >&5
17433$as_echo "$as_me: Warning: msvcr100.dll not found in VCINSTALLDIR: $VCINSTALLDIR" >&6;}
17434      fi
17435    fi
17436    # Try some fallback alternatives
17437    if test "x$MSVCR_DLL" = x; then
17438      # If visual studio express is installed, there is usually one with the debugger
17439      if test "x$VS100COMNTOOLS" != x; then
17440        if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
17441          MSVCR_DLL=`find "$VS100COMNTOOLS/.." -name msvcr100.dll | grep -i x64 | head --lines 1`
17442          { $as_echo "$as_me:${as_lineno-$LINENO}: msvcr100.dll found in $VS100COMNTOOLS..: $VS100COMNTOOLS.." >&5
17443$as_echo "$as_me: msvcr100.dll found in $VS100COMNTOOLS..: $VS100COMNTOOLS.." >&6;}
17444        fi
17445      fi
17446    fi
17447    if test "x$MSVCR_DLL" = x; then
17448      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17449        # Fallback for 32bit builds, look in the windows directory.
17450        if test -f "$SYSTEMROOT/system32/msvcr100.dll"; then
17451          { $as_echo "$as_me:${as_lineno-$LINENO}: msvcr100.dll found in $SYSTEMROOT/system32" >&5
17452$as_echo "$as_me: msvcr100.dll found in $SYSTEMROOT/system32" >&6;}
17453          MSVCR_DLL="$SYSTEMROOT/system32/msvcr100.dll"
17454        fi
17455      fi
17456    fi
17457  fi
17458  if test "x$MSVCR_DLL" = x; then
17459    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17460$as_echo "no" >&6; }
17461    as_fn_error $? "Could not find msvcr100.dll !" "$LINENO" 5
17462  fi
17463  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
17464$as_echo "$MSVCR_DLL" >&6; }
17465
17466  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17467
17468  # Input might be given as Windows format, start by converting to
17469  # unix format.
17470  path="$MSVCR_DLL"
17471  new_path=`$CYGPATH -u "$path"`
17472
17473  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17474  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17475  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17476  # "foo.exe" is OK but "foo" is an error.
17477  #
17478  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17479  # It is also a way to make sure we got the proper file name for the real test later on.
17480  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17481  if test "x$test_shortpath" = x; then
17482    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
17483$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
17484    as_fn_error $? "Cannot locate the the path of MSVCR_DLL" "$LINENO" 5
17485  fi
17486
17487  # Call helper function which possibly converts this using DOS-style short mode.
17488  # If so, the updated path is stored in $new_path.
17489
17490  input_path="$new_path"
17491  # Check if we need to convert this using DOS-style short mode. If the path
17492  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17493  # take no chances and rewrite it.
17494  # Note: m4 eats our [], so we need to use [ and ] instead.
17495  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17496  if test "x$has_forbidden_chars" != x; then
17497    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17498    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17499    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17500    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17501      # Going to short mode and back again did indeed matter. Since short mode is
17502      # case insensitive, let's make it lowercase to improve readability.
17503      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17504      # Now convert it back to Unix-stile (cygpath)
17505      input_path=`$CYGPATH -u "$shortmode_path"`
17506      new_path="$input_path"
17507    fi
17508  fi
17509
17510  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17511  if test "x$test_cygdrive_prefix" = x; then
17512    # As a simple fix, exclude /usr/bin since it's not a real path.
17513    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17514      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17515      # a path prefixed by /cygdrive for fixpath to work.
17516      new_path="$CYGWIN_ROOT_PATH$input_path"
17517    fi
17518  fi
17519
17520
17521  if test "x$path" != "x$new_path"; then
17522    MSVCR_DLL="$new_path"
17523    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
17524$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
17525  fi
17526
17527  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17528
17529  path="$MSVCR_DLL"
17530  has_colon=`$ECHO $path | $GREP ^.:`
17531  new_path="$path"
17532  if test "x$has_colon" = x; then
17533    # Not in mixed or Windows style, start by that.
17534    new_path=`cmd //c echo $path`
17535  fi
17536
17537
17538  input_path="$new_path"
17539  # Check if we need to convert this using DOS-style short mode. If the path
17540  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17541  # take no chances and rewrite it.
17542  # Note: m4 eats our [], so we need to use [ and ] instead.
17543  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17544  if test "x$has_forbidden_chars" != x; then
17545    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17546    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17547  fi
17548
17549
17550  windows_path="$new_path"
17551  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17552    unix_path=`$CYGPATH -u "$windows_path"`
17553    new_path="$unix_path"
17554  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17555    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17556    new_path="$unix_path"
17557  fi
17558
17559  if test "x$path" != "x$new_path"; then
17560    MSVCR_DLL="$new_path"
17561    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
17562$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
17563  fi
17564
17565  # Save the first 10 bytes of this path to the storage, so fixpath can work.
17566  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17567
17568  else
17569    # We're on a posix platform. Hooray! :)
17570    path="$MSVCR_DLL"
17571    has_space=`$ECHO "$path" | $GREP " "`
17572    if test "x$has_space" != x; then
17573      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
17574$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
17575      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17576    fi
17577
17578    # Use eval to expand a potential ~
17579    eval path="$path"
17580    if test ! -f "$path" && test ! -d "$path"; then
17581      as_fn_error $? "The path of MSVCR_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
17582    fi
17583
17584    MSVCR_DLL="`cd "$path"; $THEPWDCMD -L`"
17585  fi
17586
17587
17588fi
17589
17590
17591
17592# If --build AND --host is set, then the configure script will find any
17593# cross compilation tools in the PATH. Cross compilation tools
17594# follows the cross compilation standard where they are prefixed with ${host}.
17595# For example the binary i686-sun-solaris2.10-gcc
17596# will cross compile for i686-sun-solaris2.10
17597# If neither of build and host is not set, then build=host and the
17598# default compiler found in the path will be used.
17599# Setting only --host, does not seem to be really supported.
17600# Please set both --build and --host if you want to cross compile.
17601
17602if test "x$COMPILE_TYPE" = "xcross"; then
17603    # Now we to find a C/C++ compiler that can build executables for the build
17604    # platform. We can't use the AC_PROG_CC macro, since it can only be used
17605    # once. Also, we need to do this before adding a tools dir to the path,
17606    # otherwise we might pick up cross-compilers which don't use standard naming.
17607    # Otherwise, we'll set the BUILD_tools to the native tools, but that'll have
17608    # to wait until they are properly discovered.
17609    for ac_prog in cl cc gcc
17610do
17611  # Extract the first word of "$ac_prog", so it can be a program name with args.
17612set dummy $ac_prog; ac_word=$2
17613{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17614$as_echo_n "checking for $ac_word... " >&6; }
17615if ${ac_cv_path_BUILD_CC+:} false; then :
17616  $as_echo_n "(cached) " >&6
17617else
17618  case $BUILD_CC in
17619  [\\/]* | ?:[\\/]*)
17620  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
17621  ;;
17622  *)
17623  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17624for as_dir in $PATH
17625do
17626  IFS=$as_save_IFS
17627  test -z "$as_dir" && as_dir=.
17628    for ac_exec_ext in '' $ac_executable_extensions; do
17629  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17630    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
17631    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17632    break 2
17633  fi
17634done
17635  done
17636IFS=$as_save_IFS
17637
17638  ;;
17639esac
17640fi
17641BUILD_CC=$ac_cv_path_BUILD_CC
17642if test -n "$BUILD_CC"; then
17643  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
17644$as_echo "$BUILD_CC" >&6; }
17645else
17646  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17647$as_echo "no" >&6; }
17648fi
17649
17650
17651  test -n "$BUILD_CC" && break
17652done
17653
17654
17655  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17656
17657  # First separate the path from the arguments. This will split at the first
17658  # space.
17659  complete="$BUILD_CC"
17660  path="${complete%% *}"
17661  tmp="$complete EOL"
17662  arguments="${tmp#* }"
17663
17664  # Input might be given as Windows format, start by converting to
17665  # unix format.
17666  new_path=`$CYGPATH -u "$path"`
17667
17668  # Now try to locate executable using which
17669  new_path=`$WHICH "$new_path" 2> /dev/null`
17670  # bat and cmd files are not always considered executable in cygwin causing which
17671  # to not find them
17672  if test "x$new_path" = x \
17673           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17674           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17675    new_path=`$CYGPATH -u "$path"`
17676  fi
17677  if test "x$new_path" = x; then
17678    # Oops. Which didn't find the executable.
17679    # The splitting of arguments from the executable at a space might have been incorrect,
17680    # since paths with space are more likely in Windows. Give it another try with the whole
17681    # argument.
17682    path="$complete"
17683    arguments="EOL"
17684    new_path=`$CYGPATH -u "$path"`
17685    new_path=`$WHICH "$new_path" 2> /dev/null`
17686    # bat and cmd files are not always considered executable in cygwin causing which
17687    # to not find them
17688    if test "x$new_path" = x \
17689             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17690             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17691      new_path=`$CYGPATH -u "$path"`
17692    fi
17693    if test "x$new_path" = x; then
17694      # It's still not found. Now this is an unrecoverable error.
17695      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
17696$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
17697      has_space=`$ECHO "$complete" | $GREP " "`
17698      if test "x$has_space" != x; then
17699        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17700$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17701      fi
17702      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
17703    fi
17704  fi
17705
17706  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17707  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17708  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17709  # "foo.exe" is OK but "foo" is an error.
17710  #
17711  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17712  # It is also a way to make sure we got the proper file name for the real test later on.
17713  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17714  if test "x$test_shortpath" = x; then
17715    # Short path failed, file does not exist as specified.
17716    # Try adding .exe or .cmd
17717    if test -f "${new_path}.exe"; then
17718       input_to_shortpath="${new_path}.exe"
17719    elif test -f "${new_path}.cmd"; then
17720       input_to_shortpath="${new_path}.cmd"
17721    else
17722      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
17723$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
17724      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17725$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17726      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
17727    fi
17728  else
17729    input_to_shortpath="$new_path"
17730  fi
17731
17732  # Call helper function which possibly converts this using DOS-style short mode.
17733  # If so, the updated path is stored in $new_path.
17734  new_path="$input_to_shortpath"
17735
17736  input_path="$input_to_shortpath"
17737  # Check if we need to convert this using DOS-style short mode. If the path
17738  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17739  # take no chances and rewrite it.
17740  # Note: m4 eats our [], so we need to use [ and ] instead.
17741  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17742  if test "x$has_forbidden_chars" != x; then
17743    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17744    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17745    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17746    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17747      # Going to short mode and back again did indeed matter. Since short mode is
17748      # case insensitive, let's make it lowercase to improve readability.
17749      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17750      # Now convert it back to Unix-stile (cygpath)
17751      input_path=`$CYGPATH -u "$shortmode_path"`
17752      new_path="$input_path"
17753    fi
17754  fi
17755
17756  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17757  if test "x$test_cygdrive_prefix" = x; then
17758    # As a simple fix, exclude /usr/bin since it's not a real path.
17759    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17760      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17761      # a path prefixed by /cygdrive for fixpath to work.
17762      new_path="$CYGWIN_ROOT_PATH$input_path"
17763    fi
17764  fi
17765
17766  # remove trailing .exe if any
17767  new_path="${new_path/%.exe/}"
17768
17769  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17770
17771  # First separate the path from the arguments. This will split at the first
17772  # space.
17773  complete="$BUILD_CC"
17774  path="${complete%% *}"
17775  tmp="$complete EOL"
17776  arguments="${tmp#* }"
17777
17778  # Input might be given as Windows format, start by converting to
17779  # unix format.
17780  new_path="$path"
17781
17782  windows_path="$new_path"
17783  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17784    unix_path=`$CYGPATH -u "$windows_path"`
17785    new_path="$unix_path"
17786  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17787    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17788    new_path="$unix_path"
17789  fi
17790
17791
17792  # Now try to locate executable using which
17793  new_path=`$WHICH "$new_path" 2> /dev/null`
17794
17795  if test "x$new_path" = x; then
17796    # Oops. Which didn't find the executable.
17797    # The splitting of arguments from the executable at a space might have been incorrect,
17798    # since paths with space are more likely in Windows. Give it another try with the whole
17799    # argument.
17800    path="$complete"
17801    arguments="EOL"
17802    new_path="$path"
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
17814    new_path=`$WHICH "$new_path" 2> /dev/null`
17815
17816    if test "x$new_path" = x; then
17817      # It's still not found. Now this is an unrecoverable error.
17818      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
17819$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
17820      has_space=`$ECHO "$complete" | $GREP " "`
17821      if test "x$has_space" != x; then
17822        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17823$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17824      fi
17825      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
17826    fi
17827  fi
17828
17829  # Now new_path has a complete unix path to the binary
17830  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17831    # Keep paths in /bin as-is, but remove trailing .exe if any
17832    new_path="${new_path/%.exe/}"
17833    # Do not save /bin paths to all_fixpath_prefixes!
17834  else
17835    # Not in mixed or Windows style, start by that.
17836    new_path=`cmd //c echo $new_path`
17837
17838  input_path="$new_path"
17839  # Check if we need to convert this using DOS-style short mode. If the path
17840  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17841  # take no chances and rewrite it.
17842  # Note: m4 eats our [], so we need to use [ and ] instead.
17843  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17844  if test "x$has_forbidden_chars" != x; then
17845    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17846    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17847  fi
17848
17849    # Output is in $new_path
17850
17851  windows_path="$new_path"
17852  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17853    unix_path=`$CYGPATH -u "$windows_path"`
17854    new_path="$unix_path"
17855  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17856    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17857    new_path="$unix_path"
17858  fi
17859
17860    # remove trailing .exe if any
17861    new_path="${new_path/%.exe/}"
17862
17863    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17864    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17865  fi
17866
17867  else
17868    # We're on a posix platform. Hooray! :)
17869    # First separate the path from the arguments. This will split at the first
17870    # space.
17871    complete="$BUILD_CC"
17872    path="${complete%% *}"
17873    tmp="$complete EOL"
17874    arguments="${tmp#* }"
17875
17876    # Cannot rely on the command "which" here since it doesn't always work.
17877    is_absolute_path=`$ECHO "$path" | $GREP ^/`
17878    if test -z "$is_absolute_path"; then
17879      # Path to executable is not absolute. Find it.
17880      IFS_save="$IFS"
17881      IFS=:
17882      for p in $PATH; do
17883        if test -f "$p/$path" && test -x "$p/$path"; then
17884          new_path="$p/$path"
17885          break
17886        fi
17887      done
17888      IFS="$IFS_save"
17889    else
17890      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CC (as $path) failed, using $path directly." >&5
17891$as_echo "$as_me: Resolving BUILD_CC (as $path) failed, using $path directly." >&6;}
17892      new_path="$path"
17893    fi
17894
17895    if test "x$new_path" = x; then
17896        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
17897$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
17898        has_space=`$ECHO "$complete" | $GREP " "`
17899        if test "x$has_space" != x; then
17900          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17901$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17902        fi
17903        as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
17904      fi
17905  fi
17906
17907      # Now join together the path and the arguments once again
17908      if test "x$arguments" != xEOL; then
17909        new_complete="$new_path ${arguments% *}"
17910      else
17911        new_complete="$new_path"
17912      fi
17913
17914  if test "x$complete" != "x$new_complete"; then
17915      BUILD_CC="$new_complete"
17916      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
17917$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
17918    fi
17919
17920    for ac_prog in cl CC g++
17921do
17922  # Extract the first word of "$ac_prog", so it can be a program name with args.
17923set dummy $ac_prog; ac_word=$2
17924{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17925$as_echo_n "checking for $ac_word... " >&6; }
17926if ${ac_cv_path_BUILD_CXX+:} false; then :
17927  $as_echo_n "(cached) " >&6
17928else
17929  case $BUILD_CXX in
17930  [\\/]* | ?:[\\/]*)
17931  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
17932  ;;
17933  *)
17934  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17935for as_dir in $PATH
17936do
17937  IFS=$as_save_IFS
17938  test -z "$as_dir" && as_dir=.
17939    for ac_exec_ext in '' $ac_executable_extensions; do
17940  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17941    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
17942    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17943    break 2
17944  fi
17945done
17946  done
17947IFS=$as_save_IFS
17948
17949  ;;
17950esac
17951fi
17952BUILD_CXX=$ac_cv_path_BUILD_CXX
17953if test -n "$BUILD_CXX"; then
17954  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
17955$as_echo "$BUILD_CXX" >&6; }
17956else
17957  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17958$as_echo "no" >&6; }
17959fi
17960
17961
17962  test -n "$BUILD_CXX" && break
17963done
17964
17965
17966  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17967
17968  # First separate the path from the arguments. This will split at the first
17969  # space.
17970  complete="$BUILD_CXX"
17971  path="${complete%% *}"
17972  tmp="$complete EOL"
17973  arguments="${tmp#* }"
17974
17975  # Input might be given as Windows format, start by converting to
17976  # unix format.
17977  new_path=`$CYGPATH -u "$path"`
17978
17979  # Now try to locate executable using which
17980  new_path=`$WHICH "$new_path" 2> /dev/null`
17981  # bat and cmd files are not always considered executable in cygwin causing which
17982  # to not find them
17983  if test "x$new_path" = x \
17984           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17985           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17986    new_path=`$CYGPATH -u "$path"`
17987  fi
17988  if test "x$new_path" = x; then
17989    # Oops. Which didn't find the executable.
17990    # The splitting of arguments from the executable at a space might have been incorrect,
17991    # since paths with space are more likely in Windows. Give it another try with the whole
17992    # argument.
17993    path="$complete"
17994    arguments="EOL"
17995    new_path=`$CYGPATH -u "$path"`
17996    new_path=`$WHICH "$new_path" 2> /dev/null`
17997    # bat and cmd files are not always considered executable in cygwin causing which
17998    # to not find them
17999    if test "x$new_path" = x \
18000             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18001             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18002      new_path=`$CYGPATH -u "$path"`
18003    fi
18004    if test "x$new_path" = x; then
18005      # It's still not found. Now this is an unrecoverable error.
18006      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
18007$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
18008      has_space=`$ECHO "$complete" | $GREP " "`
18009      if test "x$has_space" != x; then
18010        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18011$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18012      fi
18013      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18014    fi
18015  fi
18016
18017  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18018  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18019  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18020  # "foo.exe" is OK but "foo" is an error.
18021  #
18022  # This test is therefore slightly more accurate than "test -f" to check for file precense.
18023  # It is also a way to make sure we got the proper file name for the real test later on.
18024  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18025  if test "x$test_shortpath" = x; then
18026    # Short path failed, file does not exist as specified.
18027    # Try adding .exe or .cmd
18028    if test -f "${new_path}.exe"; then
18029       input_to_shortpath="${new_path}.exe"
18030    elif test -f "${new_path}.cmd"; then
18031       input_to_shortpath="${new_path}.cmd"
18032    else
18033      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
18034$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
18035      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18036$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18037      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18038    fi
18039  else
18040    input_to_shortpath="$new_path"
18041  fi
18042
18043  # Call helper function which possibly converts this using DOS-style short mode.
18044  # If so, the updated path is stored in $new_path.
18045  new_path="$input_to_shortpath"
18046
18047  input_path="$input_to_shortpath"
18048  # Check if we need to convert this using DOS-style short mode. If the path
18049  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18050  # take no chances and rewrite it.
18051  # Note: m4 eats our [], so we need to use [ and ] instead.
18052  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18053  if test "x$has_forbidden_chars" != x; then
18054    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18055    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18056    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18057    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18058      # Going to short mode and back again did indeed matter. Since short mode is
18059      # case insensitive, let's make it lowercase to improve readability.
18060      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18061      # Now convert it back to Unix-stile (cygpath)
18062      input_path=`$CYGPATH -u "$shortmode_path"`
18063      new_path="$input_path"
18064    fi
18065  fi
18066
18067  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18068  if test "x$test_cygdrive_prefix" = x; then
18069    # As a simple fix, exclude /usr/bin since it's not a real path.
18070    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18071      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18072      # a path prefixed by /cygdrive for fixpath to work.
18073      new_path="$CYGWIN_ROOT_PATH$input_path"
18074    fi
18075  fi
18076
18077  # remove trailing .exe if any
18078  new_path="${new_path/%.exe/}"
18079
18080  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18081
18082  # First separate the path from the arguments. This will split at the first
18083  # space.
18084  complete="$BUILD_CXX"
18085  path="${complete%% *}"
18086  tmp="$complete EOL"
18087  arguments="${tmp#* }"
18088
18089  # Input might be given as Windows format, start by converting to
18090  # unix format.
18091  new_path="$path"
18092
18093  windows_path="$new_path"
18094  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18095    unix_path=`$CYGPATH -u "$windows_path"`
18096    new_path="$unix_path"
18097  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18098    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18099    new_path="$unix_path"
18100  fi
18101
18102
18103  # Now try to locate executable using which
18104  new_path=`$WHICH "$new_path" 2> /dev/null`
18105
18106  if test "x$new_path" = x; then
18107    # Oops. Which didn't find the executable.
18108    # The splitting of arguments from the executable at a space might have been incorrect,
18109    # since paths with space are more likely in Windows. Give it another try with the whole
18110    # argument.
18111    path="$complete"
18112    arguments="EOL"
18113    new_path="$path"
18114
18115  windows_path="$new_path"
18116  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18117    unix_path=`$CYGPATH -u "$windows_path"`
18118    new_path="$unix_path"
18119  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18120    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18121    new_path="$unix_path"
18122  fi
18123
18124
18125    new_path=`$WHICH "$new_path" 2> /dev/null`
18126
18127    if test "x$new_path" = x; then
18128      # It's still not found. Now this is an unrecoverable error.
18129      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
18130$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
18131      has_space=`$ECHO "$complete" | $GREP " "`
18132      if test "x$has_space" != x; then
18133        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18134$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18135      fi
18136      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18137    fi
18138  fi
18139
18140  # Now new_path has a complete unix path to the binary
18141  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18142    # Keep paths in /bin as-is, but remove trailing .exe if any
18143    new_path="${new_path/%.exe/}"
18144    # Do not save /bin paths to all_fixpath_prefixes!
18145  else
18146    # Not in mixed or Windows style, start by that.
18147    new_path=`cmd //c echo $new_path`
18148
18149  input_path="$new_path"
18150  # Check if we need to convert this using DOS-style short mode. If the path
18151  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18152  # take no chances and rewrite it.
18153  # Note: m4 eats our [], so we need to use [ and ] instead.
18154  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18155  if test "x$has_forbidden_chars" != x; then
18156    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18157    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18158  fi
18159
18160    # Output is in $new_path
18161
18162  windows_path="$new_path"
18163  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18164    unix_path=`$CYGPATH -u "$windows_path"`
18165    new_path="$unix_path"
18166  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18167    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18168    new_path="$unix_path"
18169  fi
18170
18171    # remove trailing .exe if any
18172    new_path="${new_path/%.exe/}"
18173
18174    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18175    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18176  fi
18177
18178  else
18179    # We're on a posix platform. Hooray! :)
18180    # First separate the path from the arguments. This will split at the first
18181    # space.
18182    complete="$BUILD_CXX"
18183    path="${complete%% *}"
18184    tmp="$complete EOL"
18185    arguments="${tmp#* }"
18186
18187    # Cannot rely on the command "which" here since it doesn't always work.
18188    is_absolute_path=`$ECHO "$path" | $GREP ^/`
18189    if test -z "$is_absolute_path"; then
18190      # Path to executable is not absolute. Find it.
18191      IFS_save="$IFS"
18192      IFS=:
18193      for p in $PATH; do
18194        if test -f "$p/$path" && test -x "$p/$path"; then
18195          new_path="$p/$path"
18196          break
18197        fi
18198      done
18199      IFS="$IFS_save"
18200    else
18201      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CXX (as $path) failed, using $path directly." >&5
18202$as_echo "$as_me: Resolving BUILD_CXX (as $path) failed, using $path directly." >&6;}
18203      new_path="$path"
18204    fi
18205
18206    if test "x$new_path" = x; then
18207        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
18208$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
18209        has_space=`$ECHO "$complete" | $GREP " "`
18210        if test "x$has_space" != x; then
18211          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18212$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18213        fi
18214        as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18215      fi
18216  fi
18217
18218      # Now join together the path and the arguments once again
18219      if test "x$arguments" != xEOL; then
18220        new_complete="$new_path ${arguments% *}"
18221      else
18222        new_complete="$new_path"
18223      fi
18224
18225  if test "x$complete" != "x$new_complete"; then
18226      BUILD_CXX="$new_complete"
18227      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
18228$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
18229    fi
18230
18231    # Extract the first word of "ld", so it can be a program name with args.
18232set dummy ld; ac_word=$2
18233{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18234$as_echo_n "checking for $ac_word... " >&6; }
18235if ${ac_cv_path_BUILD_LD+:} false; then :
18236  $as_echo_n "(cached) " >&6
18237else
18238  case $BUILD_LD in
18239  [\\/]* | ?:[\\/]*)
18240  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
18241  ;;
18242  *)
18243  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18244for as_dir in $PATH
18245do
18246  IFS=$as_save_IFS
18247  test -z "$as_dir" && as_dir=.
18248    for ac_exec_ext in '' $ac_executable_extensions; do
18249  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18250    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
18251    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18252    break 2
18253  fi
18254done
18255  done
18256IFS=$as_save_IFS
18257
18258  ;;
18259esac
18260fi
18261BUILD_LD=$ac_cv_path_BUILD_LD
18262if test -n "$BUILD_LD"; then
18263  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
18264$as_echo "$BUILD_LD" >&6; }
18265else
18266  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18267$as_echo "no" >&6; }
18268fi
18269
18270
18271
18272  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18273
18274  # First separate the path from the arguments. This will split at the first
18275  # space.
18276  complete="$BUILD_LD"
18277  path="${complete%% *}"
18278  tmp="$complete EOL"
18279  arguments="${tmp#* }"
18280
18281  # Input might be given as Windows format, start by converting to
18282  # unix format.
18283  new_path=`$CYGPATH -u "$path"`
18284
18285  # Now try to locate executable using which
18286  new_path=`$WHICH "$new_path" 2> /dev/null`
18287  # bat and cmd files are not always considered executable in cygwin causing which
18288  # to not find them
18289  if test "x$new_path" = x \
18290           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18291           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18292    new_path=`$CYGPATH -u "$path"`
18293  fi
18294  if test "x$new_path" = x; then
18295    # Oops. Which didn't find the executable.
18296    # The splitting of arguments from the executable at a space might have been incorrect,
18297    # since paths with space are more likely in Windows. Give it another try with the whole
18298    # argument.
18299    path="$complete"
18300    arguments="EOL"
18301    new_path=`$CYGPATH -u "$path"`
18302    new_path=`$WHICH "$new_path" 2> /dev/null`
18303    # bat and cmd files are not always considered executable in cygwin causing which
18304    # to not find them
18305    if test "x$new_path" = x \
18306             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18307             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18308      new_path=`$CYGPATH -u "$path"`
18309    fi
18310    if test "x$new_path" = x; then
18311      # It's still not found. Now this is an unrecoverable error.
18312      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
18313$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
18314      has_space=`$ECHO "$complete" | $GREP " "`
18315      if test "x$has_space" != x; then
18316        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18317$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18318      fi
18319      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18320    fi
18321  fi
18322
18323  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18324  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18325  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18326  # "foo.exe" is OK but "foo" is an error.
18327  #
18328  # This test is therefore slightly more accurate than "test -f" to check for file precense.
18329  # It is also a way to make sure we got the proper file name for the real test later on.
18330  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18331  if test "x$test_shortpath" = x; then
18332    # Short path failed, file does not exist as specified.
18333    # Try adding .exe or .cmd
18334    if test -f "${new_path}.exe"; then
18335       input_to_shortpath="${new_path}.exe"
18336    elif test -f "${new_path}.cmd"; then
18337       input_to_shortpath="${new_path}.cmd"
18338    else
18339      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&5
18340$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&6;}
18341      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18342$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18343      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18344    fi
18345  else
18346    input_to_shortpath="$new_path"
18347  fi
18348
18349  # Call helper function which possibly converts this using DOS-style short mode.
18350  # If so, the updated path is stored in $new_path.
18351  new_path="$input_to_shortpath"
18352
18353  input_path="$input_to_shortpath"
18354  # Check if we need to convert this using DOS-style short mode. If the path
18355  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18356  # take no chances and rewrite it.
18357  # Note: m4 eats our [], so we need to use [ and ] instead.
18358  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18359  if test "x$has_forbidden_chars" != x; then
18360    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18361    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18362    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18363    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18364      # Going to short mode and back again did indeed matter. Since short mode is
18365      # case insensitive, let's make it lowercase to improve readability.
18366      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18367      # Now convert it back to Unix-stile (cygpath)
18368      input_path=`$CYGPATH -u "$shortmode_path"`
18369      new_path="$input_path"
18370    fi
18371  fi
18372
18373  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18374  if test "x$test_cygdrive_prefix" = x; then
18375    # As a simple fix, exclude /usr/bin since it's not a real path.
18376    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18377      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18378      # a path prefixed by /cygdrive for fixpath to work.
18379      new_path="$CYGWIN_ROOT_PATH$input_path"
18380    fi
18381  fi
18382
18383  # remove trailing .exe if any
18384  new_path="${new_path/%.exe/}"
18385
18386  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18387
18388  # First separate the path from the arguments. This will split at the first
18389  # space.
18390  complete="$BUILD_LD"
18391  path="${complete%% *}"
18392  tmp="$complete EOL"
18393  arguments="${tmp#* }"
18394
18395  # Input might be given as Windows format, start by converting to
18396  # unix format.
18397  new_path="$path"
18398
18399  windows_path="$new_path"
18400  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18401    unix_path=`$CYGPATH -u "$windows_path"`
18402    new_path="$unix_path"
18403  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18404    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18405    new_path="$unix_path"
18406  fi
18407
18408
18409  # Now try to locate executable using which
18410  new_path=`$WHICH "$new_path" 2> /dev/null`
18411
18412  if test "x$new_path" = x; then
18413    # Oops. Which didn't find the executable.
18414    # The splitting of arguments from the executable at a space might have been incorrect,
18415    # since paths with space are more likely in Windows. Give it another try with the whole
18416    # argument.
18417    path="$complete"
18418    arguments="EOL"
18419    new_path="$path"
18420
18421  windows_path="$new_path"
18422  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18423    unix_path=`$CYGPATH -u "$windows_path"`
18424    new_path="$unix_path"
18425  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18426    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18427    new_path="$unix_path"
18428  fi
18429
18430
18431    new_path=`$WHICH "$new_path" 2> /dev/null`
18432
18433    if test "x$new_path" = x; then
18434      # It's still not found. Now this is an unrecoverable error.
18435      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
18436$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
18437      has_space=`$ECHO "$complete" | $GREP " "`
18438      if test "x$has_space" != x; then
18439        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18440$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18441      fi
18442      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18443    fi
18444  fi
18445
18446  # Now new_path has a complete unix path to the binary
18447  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18448    # Keep paths in /bin as-is, but remove trailing .exe if any
18449    new_path="${new_path/%.exe/}"
18450    # Do not save /bin paths to all_fixpath_prefixes!
18451  else
18452    # Not in mixed or Windows style, start by that.
18453    new_path=`cmd //c echo $new_path`
18454
18455  input_path="$new_path"
18456  # Check if we need to convert this using DOS-style short mode. If the path
18457  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18458  # take no chances and rewrite it.
18459  # Note: m4 eats our [], so we need to use [ and ] instead.
18460  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18461  if test "x$has_forbidden_chars" != x; then
18462    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18463    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18464  fi
18465
18466    # Output is in $new_path
18467
18468  windows_path="$new_path"
18469  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18470    unix_path=`$CYGPATH -u "$windows_path"`
18471    new_path="$unix_path"
18472  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18473    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18474    new_path="$unix_path"
18475  fi
18476
18477    # remove trailing .exe if any
18478    new_path="${new_path/%.exe/}"
18479
18480    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18481    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18482  fi
18483
18484  else
18485    # We're on a posix platform. Hooray! :)
18486    # First separate the path from the arguments. This will split at the first
18487    # space.
18488    complete="$BUILD_LD"
18489    path="${complete%% *}"
18490    tmp="$complete EOL"
18491    arguments="${tmp#* }"
18492
18493    # Cannot rely on the command "which" here since it doesn't always work.
18494    is_absolute_path=`$ECHO "$path" | $GREP ^/`
18495    if test -z "$is_absolute_path"; then
18496      # Path to executable is not absolute. Find it.
18497      IFS_save="$IFS"
18498      IFS=:
18499      for p in $PATH; do
18500        if test -f "$p/$path" && test -x "$p/$path"; then
18501          new_path="$p/$path"
18502          break
18503        fi
18504      done
18505      IFS="$IFS_save"
18506    else
18507      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_LD (as $path) failed, using $path directly." >&5
18508$as_echo "$as_me: Resolving BUILD_LD (as $path) failed, using $path directly." >&6;}
18509      new_path="$path"
18510    fi
18511
18512    if test "x$new_path" = x; then
18513        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
18514$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
18515        has_space=`$ECHO "$complete" | $GREP " "`
18516        if test "x$has_space" != x; then
18517          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18518$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18519        fi
18520        as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18521      fi
18522  fi
18523
18524      # Now join together the path and the arguments once again
18525      if test "x$arguments" != xEOL; then
18526        new_complete="$new_path ${arguments% *}"
18527      else
18528        new_complete="$new_path"
18529      fi
18530
18531  if test "x$complete" != "x$new_complete"; then
18532      BUILD_LD="$new_complete"
18533      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_LD to \"$new_complete\"" >&5
18534$as_echo "$as_me: Rewriting BUILD_LD to \"$new_complete\"" >&6;}
18535    fi
18536
18537fi
18538
18539
18540
18541
18542# If a devkit is found on the builddeps server, then prepend its path to the
18543# PATH variable. If there are cross compilers available in the devkit, these
18544# will be found by AC_PROG_CC et al.
18545DEVKIT=
18546
18547
18548    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
18549        # Source the builddeps file again, to make sure it uses the latest variables!
18550        . $builddepsfile
18551        # Look for a target and build machine specific resource!
18552        eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
18553        if test "x$resource" = x; then
18554            # Ok, lets instead look for a target specific resource
18555            eval resource=\${builddep_devkit_TARGET_${rewritten_target_var}}
18556        fi
18557        if test "x$resource" = x; then
18558            # Ok, lets instead look for a build specific resource
18559            eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}}
18560        fi
18561        if test "x$resource" = x; then
18562            # Ok, lets instead look for a generic resource
18563            # (The devkit comes from M4 and not the shell, thus no need for eval here.)
18564            resource=${builddep_devkit}
18565        fi
18566        if test "x$resource" != x; then
18567            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for devkit" >&5
18568$as_echo "$as_me: Using builddeps $resource for devkit" >&6;}
18569	    # If the resource in the builddeps.conf file is an existing directory,
18570	    # for example /java/linux/cups
18571	    if test -d ${resource}; then
18572	       depdir=${resource}
18573	    else
18574
18575# devkit is for example mymodule
18576# $resource is for example libs/general/libmymod_1_2_3.zip
18577# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
18578# $with_builddeps_dir is for example /localhome/builddeps
18579# depdir is the name of the variable into which we store the depdir, eg MYMOD
18580# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
18581# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
18582    filename=`basename $resource`
18583    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
18584    filebase=${filename%%.*}
18585    extension=${filename#*.}
18586    installdir=$with_builddeps_dir/$filebase
18587    if test ! -f $installdir/$filename.unpacked; then
18588        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&5
18589$as_echo "$as_me: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&6;}
18590        if test ! -d $installdir; then
18591            mkdir -p $installdir
18592        fi
18593        if test ! -d $installdir; then
18594            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
18595        fi
18596        tmpfile=`mktemp $installdir/devkit.XXXXXXXXX`
18597        touch $tmpfile
18598        if test ! -f $tmpfile; then
18599            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
18600        fi
18601
18602    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
18603    # $tmpfile is the local file name for the downloaded file.
18604    VALID_TOOL=no
18605    if test "x$BDEPS_FTP" = xwget; then
18606       VALID_TOOL=yes
18607       wget -O $tmpfile $with_builddeps_server/$resource
18608    fi
18609    if test "x$BDEPS_FTP" = xlftp; then
18610       VALID_TOOL=yes
18611       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
18612    fi
18613    if test "x$BDEPS_FTP" = xftp; then
18614        VALID_TOOL=yes
18615        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
18616        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
18617        FTPUSERPWD=${FTPSERVER%%@*}
18618        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
18619            FTPUSER=${userpwd%%:*}
18620            FTPPWD=${userpwd#*@}
18621            FTPSERVER=${FTPSERVER#*@}
18622        else
18623            FTPUSER=ftp
18624            FTPPWD=ftp
18625        fi
18626        # the "pass" command does not work on some
18627        # ftp clients (read ftp.exe) but if it works,
18628        # passive mode is better!
18629        (\
18630            echo "user $FTPUSER $FTPPWD"        ;\
18631            echo "pass"                         ;\
18632            echo "bin"                          ;\
18633            echo "get $FTPPATH $tmpfile"              ;\
18634        ) | ftp -in $FTPSERVER
18635    fi
18636    if test "x$VALID_TOOL" != xyes; then
18637       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
18638    fi
18639
18640        mv $tmpfile $installdir/$filename
18641        if test ! -s $installdir/$filename; then
18642            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
18643        fi
18644        case "$extension" in
18645            zip)  echo "Unzipping $installdir/$filename..."
18646               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
18647            ;;
18648            tar.gz) echo "Untaring $installdir/$filename..."
18649               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
18650            ;;
18651            tgz) echo "Untaring $installdir/$filename..."
18652               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
18653            ;;
18654            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
18655            ;;
18656        esac
18657    fi
18658    if test -f $installdir/$filename.unpacked; then
18659        depdir=$installdir
18660    fi
18661
18662	    fi
18663            # Source the builddeps file again, because in the previous command, the depdir
18664            # was updated to point at the current build dependency install directory.
18665            . $builddepsfile
18666            # Now extract variables from the builddeps.conf files.
18667            theroot=${builddep_devkit_ROOT}
18668            thecflags=${builddep_devkit_CFLAGS}
18669            thelibs=${builddep_devkit_LIBS}
18670            if test "x$depdir" = x; then
18671                as_fn_error $? "Could not download build dependency devkit" "$LINENO" 5
18672            fi
18673            DEVKIT=$depdir
18674            if test "x$theroot" != x; then
18675               DEVKIT="$theroot"
18676            fi
18677            if test "x$thecflags" != x; then
18678               DEVKIT_CFLAGS="$thecflags"
18679            fi
18680            if test "x$thelibs" != x; then
18681               DEVKIT_LIBS="$thelibs"
18682            fi
18683            # Found devkit
18684                     PATH="$DEVKIT/bin:$PATH"
18685                     SYS_ROOT="$DEVKIT/${rewritten_target}/sys-root"
18686                     if test "x$x_includes" = "xNONE"; then
18687                         x_includes="$SYS_ROOT/usr/include/X11"
18688                     fi
18689                     if test "x$x_libraries" = "xNONE"; then
18690                         x_libraries="$SYS_ROOT/usr/lib"
18691                     fi
18692
18693
18694        fi
18695
18696    fi
18697
18698
18699# Store the CFLAGS etal passed to the configure script.
18700ORG_CFLAGS="$CFLAGS"
18701ORG_CXXFLAGS="$CXXFLAGS"
18702ORG_OBJCFLAGS="$OBJCFLAGS"
18703
18704# autoconf magic only relies on PATH, so update it if tools dir is specified
18705OLD_PATH="$PATH"
18706if test "x$TOOLS_DIR" != x; then
18707  PATH=$TOOLS_DIR:$PATH
18708fi
18709
18710
18711### Locate C compiler (CC)
18712
18713# On windows, only cl.exe is supported.
18714# On Solaris, cc is preferred to gcc.
18715# Elsewhere, gcc is preferred to cc.
18716
18717if test "x$CC" != x; then
18718  COMPILER_CHECK_LIST="$CC"
18719elif test "x$OPENJDK_TARGET_OS" = "xwindows"; then
18720  COMPILER_CHECK_LIST="cl"
18721elif test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
18722  COMPILER_CHECK_LIST="cc gcc"
18723else
18724  COMPILER_CHECK_LIST="gcc cc"
18725fi
18726
18727
18728  COMPILER_NAME=C
18729
18730  CC=
18731  # If TOOLS_DIR is set, check for all compiler names in there first
18732  # before checking the rest of the PATH.
18733  if test -n "$TOOLS_DIR"; then
18734    PATH_save="$PATH"
18735    PATH="$TOOLS_DIR"
18736    for ac_prog in $COMPILER_CHECK_LIST
18737do
18738  # Extract the first word of "$ac_prog", so it can be a program name with args.
18739set dummy $ac_prog; ac_word=$2
18740{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18741$as_echo_n "checking for $ac_word... " >&6; }
18742if ${ac_cv_path_TOOLS_DIR_CC+:} false; then :
18743  $as_echo_n "(cached) " >&6
18744else
18745  case $TOOLS_DIR_CC in
18746  [\\/]* | ?:[\\/]*)
18747  ac_cv_path_TOOLS_DIR_CC="$TOOLS_DIR_CC" # Let the user override the test with a path.
18748  ;;
18749  *)
18750  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18751for as_dir in $PATH
18752do
18753  IFS=$as_save_IFS
18754  test -z "$as_dir" && as_dir=.
18755    for ac_exec_ext in '' $ac_executable_extensions; do
18756  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18757    ac_cv_path_TOOLS_DIR_CC="$as_dir/$ac_word$ac_exec_ext"
18758    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18759    break 2
18760  fi
18761done
18762  done
18763IFS=$as_save_IFS
18764
18765  ;;
18766esac
18767fi
18768TOOLS_DIR_CC=$ac_cv_path_TOOLS_DIR_CC
18769if test -n "$TOOLS_DIR_CC"; then
18770  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CC" >&5
18771$as_echo "$TOOLS_DIR_CC" >&6; }
18772else
18773  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18774$as_echo "no" >&6; }
18775fi
18776
18777
18778  test -n "$TOOLS_DIR_CC" && break
18779done
18780
18781    CC=$TOOLS_DIR_CC
18782    PATH="$PATH_save"
18783  fi
18784
18785  # AC_PATH_PROGS can't be run multiple times with the same variable,
18786  # so create a new name for this run.
18787  if test "x$CC" = x; then
18788    for ac_prog in $COMPILER_CHECK_LIST
18789do
18790  # Extract the first word of "$ac_prog", so it can be a program name with args.
18791set dummy $ac_prog; ac_word=$2
18792{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18793$as_echo_n "checking for $ac_word... " >&6; }
18794if ${ac_cv_path_POTENTIAL_CC+:} false; then :
18795  $as_echo_n "(cached) " >&6
18796else
18797  case $POTENTIAL_CC in
18798  [\\/]* | ?:[\\/]*)
18799  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
18800  ;;
18801  *)
18802  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18803for as_dir in $PATH
18804do
18805  IFS=$as_save_IFS
18806  test -z "$as_dir" && as_dir=.
18807    for ac_exec_ext in '' $ac_executable_extensions; do
18808  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18809    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
18810    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18811    break 2
18812  fi
18813done
18814  done
18815IFS=$as_save_IFS
18816
18817  ;;
18818esac
18819fi
18820POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
18821if test -n "$POTENTIAL_CC"; then
18822  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
18823$as_echo "$POTENTIAL_CC" >&6; }
18824else
18825  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18826$as_echo "no" >&6; }
18827fi
18828
18829
18830  test -n "$POTENTIAL_CC" && break
18831done
18832
18833    CC=$POTENTIAL_CC
18834  fi
18835
18836  if test "x$CC" = x; then
18837
18838    # Print a helpful message on how to acquire the necessary build dependency.
18839    # devkit is the help tag: freetyp2, cups, pulse, alsa etc
18840    MISSING_DEPENDENCY=devkit
18841    PKGHANDLER_COMMAND=
18842
18843    case $PKGHANDLER in
18844	apt-get)
18845                apt_help     $MISSING_DEPENDENCY ;;
18846    yum)
18847                yum_help     $MISSING_DEPENDENCY ;;
18848	port)
18849                port_help    $MISSING_DEPENDENCY ;;
18850	pkgutil)
18851                pkgutil_help $MISSING_DEPENDENCY ;;
18852	pkgadd)
18853                pkgadd_help  $MISSING_DEPENDENCY ;;
18854    * )
18855      break ;;
18856    esac
18857
18858    if test "x$PKGHANDLER_COMMAND" != x; then
18859        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
18860    fi
18861
18862      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
18863  fi
18864
18865  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18866
18867  # First separate the path from the arguments. This will split at the first
18868  # space.
18869  complete="$CC"
18870  path="${complete%% *}"
18871  tmp="$complete EOL"
18872  arguments="${tmp#* }"
18873
18874  # Input might be given as Windows format, start by converting to
18875  # unix format.
18876  new_path=`$CYGPATH -u "$path"`
18877
18878  # Now try to locate executable using which
18879  new_path=`$WHICH "$new_path" 2> /dev/null`
18880  # bat and cmd files are not always considered executable in cygwin causing which
18881  # to not find them
18882  if test "x$new_path" = x \
18883           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18884           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18885    new_path=`$CYGPATH -u "$path"`
18886  fi
18887  if test "x$new_path" = x; then
18888    # Oops. Which didn't find the executable.
18889    # The splitting of arguments from the executable at a space might have been incorrect,
18890    # since paths with space are more likely in Windows. Give it another try with the whole
18891    # argument.
18892    path="$complete"
18893    arguments="EOL"
18894    new_path=`$CYGPATH -u "$path"`
18895    new_path=`$WHICH "$new_path" 2> /dev/null`
18896    # bat and cmd files are not always considered executable in cygwin causing which
18897    # to not find them
18898    if test "x$new_path" = x \
18899             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18900             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18901      new_path=`$CYGPATH -u "$path"`
18902    fi
18903    if test "x$new_path" = x; then
18904      # It's still not found. Now this is an unrecoverable error.
18905      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
18906$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
18907      has_space=`$ECHO "$complete" | $GREP " "`
18908      if test "x$has_space" != x; then
18909        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18910$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18911      fi
18912      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
18913    fi
18914  fi
18915
18916  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18917  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18918  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18919  # "foo.exe" is OK but "foo" is an error.
18920  #
18921  # This test is therefore slightly more accurate than "test -f" to check for file precense.
18922  # It is also a way to make sure we got the proper file name for the real test later on.
18923  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18924  if test "x$test_shortpath" = x; then
18925    # Short path failed, file does not exist as specified.
18926    # Try adding .exe or .cmd
18927    if test -f "${new_path}.exe"; then
18928       input_to_shortpath="${new_path}.exe"
18929    elif test -f "${new_path}.cmd"; then
18930       input_to_shortpath="${new_path}.cmd"
18931    else
18932      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
18933$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
18934      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18935$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18936      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
18937    fi
18938  else
18939    input_to_shortpath="$new_path"
18940  fi
18941
18942  # Call helper function which possibly converts this using DOS-style short mode.
18943  # If so, the updated path is stored in $new_path.
18944  new_path="$input_to_shortpath"
18945
18946  input_path="$input_to_shortpath"
18947  # Check if we need to convert this using DOS-style short mode. If the path
18948  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18949  # take no chances and rewrite it.
18950  # Note: m4 eats our [], so we need to use [ and ] instead.
18951  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18952  if test "x$has_forbidden_chars" != x; then
18953    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18954    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18955    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18956    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18957      # Going to short mode and back again did indeed matter. Since short mode is
18958      # case insensitive, let's make it lowercase to improve readability.
18959      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18960      # Now convert it back to Unix-stile (cygpath)
18961      input_path=`$CYGPATH -u "$shortmode_path"`
18962      new_path="$input_path"
18963    fi
18964  fi
18965
18966  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18967  if test "x$test_cygdrive_prefix" = x; then
18968    # As a simple fix, exclude /usr/bin since it's not a real path.
18969    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18970      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18971      # a path prefixed by /cygdrive for fixpath to work.
18972      new_path="$CYGWIN_ROOT_PATH$input_path"
18973    fi
18974  fi
18975
18976  # remove trailing .exe if any
18977  new_path="${new_path/%.exe/}"
18978
18979  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18980
18981  # First separate the path from the arguments. This will split at the first
18982  # space.
18983  complete="$CC"
18984  path="${complete%% *}"
18985  tmp="$complete EOL"
18986  arguments="${tmp#* }"
18987
18988  # Input might be given as Windows format, start by converting to
18989  # unix format.
18990  new_path="$path"
18991
18992  windows_path="$new_path"
18993  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18994    unix_path=`$CYGPATH -u "$windows_path"`
18995    new_path="$unix_path"
18996  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18997    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18998    new_path="$unix_path"
18999  fi
19000
19001
19002  # Now try to locate executable using which
19003  new_path=`$WHICH "$new_path" 2> /dev/null`
19004
19005  if test "x$new_path" = x; then
19006    # Oops. Which didn't find the executable.
19007    # The splitting of arguments from the executable at a space might have been incorrect,
19008    # since paths with space are more likely in Windows. Give it another try with the whole
19009    # argument.
19010    path="$complete"
19011    arguments="EOL"
19012    new_path="$path"
19013
19014  windows_path="$new_path"
19015  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19016    unix_path=`$CYGPATH -u "$windows_path"`
19017    new_path="$unix_path"
19018  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19019    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19020    new_path="$unix_path"
19021  fi
19022
19023
19024    new_path=`$WHICH "$new_path" 2> /dev/null`
19025
19026    if test "x$new_path" = x; then
19027      # It's still not found. Now this is an unrecoverable error.
19028      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
19029$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
19030      has_space=`$ECHO "$complete" | $GREP " "`
19031      if test "x$has_space" != x; then
19032        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19033$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19034      fi
19035      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
19036    fi
19037  fi
19038
19039  # Now new_path has a complete unix path to the binary
19040  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19041    # Keep paths in /bin as-is, but remove trailing .exe if any
19042    new_path="${new_path/%.exe/}"
19043    # Do not save /bin paths to all_fixpath_prefixes!
19044  else
19045    # Not in mixed or Windows style, start by that.
19046    new_path=`cmd //c echo $new_path`
19047
19048  input_path="$new_path"
19049  # Check if we need to convert this using DOS-style short mode. If the path
19050  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19051  # take no chances and rewrite it.
19052  # Note: m4 eats our [], so we need to use [ and ] instead.
19053  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19054  if test "x$has_forbidden_chars" != x; then
19055    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19056    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19057  fi
19058
19059    # Output is in $new_path
19060
19061  windows_path="$new_path"
19062  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19063    unix_path=`$CYGPATH -u "$windows_path"`
19064    new_path="$unix_path"
19065  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19066    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19067    new_path="$unix_path"
19068  fi
19069
19070    # remove trailing .exe if any
19071    new_path="${new_path/%.exe/}"
19072
19073    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19074    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19075  fi
19076
19077  else
19078    # We're on a posix platform. Hooray! :)
19079    # First separate the path from the arguments. This will split at the first
19080    # space.
19081    complete="$CC"
19082    path="${complete%% *}"
19083    tmp="$complete EOL"
19084    arguments="${tmp#* }"
19085
19086    # Cannot rely on the command "which" here since it doesn't always work.
19087    is_absolute_path=`$ECHO "$path" | $GREP ^/`
19088    if test -z "$is_absolute_path"; then
19089      # Path to executable is not absolute. Find it.
19090      IFS_save="$IFS"
19091      IFS=:
19092      for p in $PATH; do
19093        if test -f "$p/$path" && test -x "$p/$path"; then
19094          new_path="$p/$path"
19095          break
19096        fi
19097      done
19098      IFS="$IFS_save"
19099    else
19100      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CC (as $path) failed, using $path directly." >&5
19101$as_echo "$as_me: Resolving CC (as $path) failed, using $path directly." >&6;}
19102      new_path="$path"
19103    fi
19104
19105    if test "x$new_path" = x; then
19106        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
19107$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
19108        has_space=`$ECHO "$complete" | $GREP " "`
19109        if test "x$has_space" != x; then
19110          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19111$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19112        fi
19113        as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
19114      fi
19115  fi
19116
19117      # Now join together the path and the arguments once again
19118      if test "x$arguments" != xEOL; then
19119        new_complete="$new_path ${arguments% *}"
19120      else
19121        new_complete="$new_path"
19122      fi
19123
19124  if test "x$complete" != "x$new_complete"; then
19125      CC="$new_complete"
19126      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
19127$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
19128    fi
19129
19130  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
19131$as_echo_n "checking resolved symbolic links for CC... " >&6; }
19132  TEST_COMPILER="$CC"
19133
19134    if test "x$OPENJDK_BUILD_OS" != xwindows; then
19135        # Follow a chain of symbolic links. Use readlink
19136        # where it exists, else fall back to horribly
19137        # complicated shell code.
19138        if test "x$READLINK_TESTED" != yes; then
19139            # On MacOSX there is a readlink tool with a different
19140            # purpose than the GNU readlink tool. Check the found readlink.
19141            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
19142            if test "x$ISGNU" = x; then
19143                 # A readlink that we do not know how to use.
19144                 # Are there other non-GNU readlinks out there?
19145                 READLINK_TESTED=yes
19146                 READLINK=
19147            fi
19148        fi
19149
19150        if test "x$READLINK" != x; then
19151            TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
19152        else
19153            # Save the current directory for restoring afterwards
19154            STARTDIR=$PWD
19155            COUNTER=0
19156            sym_link_dir=`$DIRNAME $TEST_COMPILER`
19157            sym_link_file=`$BASENAME $TEST_COMPILER`
19158            cd $sym_link_dir
19159            # Use -P flag to resolve symlinks in directories.
19160            cd `$THEPWDCMD -P`
19161            sym_link_dir=`$THEPWDCMD -P`
19162            # Resolve file symlinks
19163            while test $COUNTER -lt 20; do
19164                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
19165                if test "x$ISLINK" == x; then
19166                    # This is not a symbolic link! We are done!
19167                    break
19168                fi
19169                # Again resolve directory symlinks since the target of the just found
19170                # link could be in a different directory
19171                cd `$DIRNAME $ISLINK`
19172                sym_link_dir=`$THEPWDCMD -P`
19173                sym_link_file=`$BASENAME $ISLINK`
19174                let COUNTER=COUNTER+1
19175            done
19176            cd $STARTDIR
19177            TEST_COMPILER=$sym_link_dir/$sym_link_file
19178        fi
19179    fi
19180
19181  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
19182$as_echo "$TEST_COMPILER" >&6; }
19183  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
19184$as_echo_n "checking if CC is disguised ccache... " >&6; }
19185
19186  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
19187  if test "x$COMPILER_BASENAME" = "xccache"; then
19188    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
19189$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
19190    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
19191    # We want to control ccache invocation ourselves, so ignore this cc and try
19192    # searching again.
19193
19194    # Remove the path to the fake ccache cc from the PATH
19195    RETRY_COMPILER_SAVED_PATH="$PATH"
19196    COMPILER_DIRNAME=`$DIRNAME $CC`
19197    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
19198
19199    # Try again looking for our compiler
19200    if test -n "$ac_tool_prefix"; then
19201  for ac_prog in $COMPILER_CHECK_LIST
19202  do
19203    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
19204set dummy $ac_tool_prefix$ac_prog; ac_word=$2
19205{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19206$as_echo_n "checking for $ac_word... " >&6; }
19207if ${ac_cv_prog_PROPER_COMPILER_CC+:} false; then :
19208  $as_echo_n "(cached) " >&6
19209else
19210  if test -n "$PROPER_COMPILER_CC"; then
19211  ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
19212else
19213as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19214for as_dir in $PATH
19215do
19216  IFS=$as_save_IFS
19217  test -z "$as_dir" && as_dir=.
19218    for ac_exec_ext in '' $ac_executable_extensions; do
19219  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19220    ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
19221    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19222    break 2
19223  fi
19224done
19225  done
19226IFS=$as_save_IFS
19227
19228fi
19229fi
19230PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
19231if test -n "$PROPER_COMPILER_CC"; then
19232  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
19233$as_echo "$PROPER_COMPILER_CC" >&6; }
19234else
19235  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19236$as_echo "no" >&6; }
19237fi
19238
19239
19240    test -n "$PROPER_COMPILER_CC" && break
19241  done
19242fi
19243if test -z "$PROPER_COMPILER_CC"; then
19244  ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
19245  for ac_prog in $COMPILER_CHECK_LIST
19246do
19247  # Extract the first word of "$ac_prog", so it can be a program name with args.
19248set dummy $ac_prog; ac_word=$2
19249{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19250$as_echo_n "checking for $ac_word... " >&6; }
19251if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+:} false; then :
19252  $as_echo_n "(cached) " >&6
19253else
19254  if test -n "$ac_ct_PROPER_COMPILER_CC"; then
19255  ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
19256else
19257as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19258for as_dir in $PATH
19259do
19260  IFS=$as_save_IFS
19261  test -z "$as_dir" && as_dir=.
19262    for ac_exec_ext in '' $ac_executable_extensions; do
19263  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19264    ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
19265    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19266    break 2
19267  fi
19268done
19269  done
19270IFS=$as_save_IFS
19271
19272fi
19273fi
19274ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
19275if test -n "$ac_ct_PROPER_COMPILER_CC"; then
19276  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
19277$as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
19278else
19279  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19280$as_echo "no" >&6; }
19281fi
19282
19283
19284  test -n "$ac_ct_PROPER_COMPILER_CC" && break
19285done
19286
19287  if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
19288    PROPER_COMPILER_CC=""
19289  else
19290    case $cross_compiling:$ac_tool_warned in
19291yes:)
19292{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19293$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19294ac_tool_warned=yes ;;
19295esac
19296    PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
19297  fi
19298fi
19299
19300
19301  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19302
19303  # First separate the path from the arguments. This will split at the first
19304  # space.
19305  complete="$PROPER_COMPILER_CC"
19306  path="${complete%% *}"
19307  tmp="$complete EOL"
19308  arguments="${tmp#* }"
19309
19310  # Input might be given as Windows format, start by converting to
19311  # unix format.
19312  new_path=`$CYGPATH -u "$path"`
19313
19314  # Now try to locate executable using which
19315  new_path=`$WHICH "$new_path" 2> /dev/null`
19316  # bat and cmd files are not always considered executable in cygwin causing which
19317  # to not find them
19318  if test "x$new_path" = x \
19319           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19320           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19321    new_path=`$CYGPATH -u "$path"`
19322  fi
19323  if test "x$new_path" = x; then
19324    # Oops. Which didn't find the executable.
19325    # The splitting of arguments from the executable at a space might have been incorrect,
19326    # since paths with space are more likely in Windows. Give it another try with the whole
19327    # argument.
19328    path="$complete"
19329    arguments="EOL"
19330    new_path=`$CYGPATH -u "$path"`
19331    new_path=`$WHICH "$new_path" 2> /dev/null`
19332    # bat and cmd files are not always considered executable in cygwin causing which
19333    # to not find them
19334    if test "x$new_path" = x \
19335             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19336             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19337      new_path=`$CYGPATH -u "$path"`
19338    fi
19339    if test "x$new_path" = x; then
19340      # It's still not found. Now this is an unrecoverable error.
19341      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
19342$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
19343      has_space=`$ECHO "$complete" | $GREP " "`
19344      if test "x$has_space" != x; then
19345        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19346$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19347      fi
19348      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19349    fi
19350  fi
19351
19352  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19353  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19354  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19355  # "foo.exe" is OK but "foo" is an error.
19356  #
19357  # This test is therefore slightly more accurate than "test -f" to check for file precense.
19358  # It is also a way to make sure we got the proper file name for the real test later on.
19359  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19360  if test "x$test_shortpath" = x; then
19361    # Short path failed, file does not exist as specified.
19362    # Try adding .exe or .cmd
19363    if test -f "${new_path}.exe"; then
19364       input_to_shortpath="${new_path}.exe"
19365    elif test -f "${new_path}.cmd"; then
19366       input_to_shortpath="${new_path}.cmd"
19367    else
19368      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
19369$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
19370      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19371$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19372      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19373    fi
19374  else
19375    input_to_shortpath="$new_path"
19376  fi
19377
19378  # Call helper function which possibly converts this using DOS-style short mode.
19379  # If so, the updated path is stored in $new_path.
19380  new_path="$input_to_shortpath"
19381
19382  input_path="$input_to_shortpath"
19383  # Check if we need to convert this using DOS-style short mode. If the path
19384  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19385  # take no chances and rewrite it.
19386  # Note: m4 eats our [], so we need to use [ and ] instead.
19387  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19388  if test "x$has_forbidden_chars" != x; then
19389    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19390    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19391    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19392    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19393      # Going to short mode and back again did indeed matter. Since short mode is
19394      # case insensitive, let's make it lowercase to improve readability.
19395      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19396      # Now convert it back to Unix-stile (cygpath)
19397      input_path=`$CYGPATH -u "$shortmode_path"`
19398      new_path="$input_path"
19399    fi
19400  fi
19401
19402  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19403  if test "x$test_cygdrive_prefix" = x; then
19404    # As a simple fix, exclude /usr/bin since it's not a real path.
19405    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19406      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19407      # a path prefixed by /cygdrive for fixpath to work.
19408      new_path="$CYGWIN_ROOT_PATH$input_path"
19409    fi
19410  fi
19411
19412  # remove trailing .exe if any
19413  new_path="${new_path/%.exe/}"
19414
19415  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19416
19417  # First separate the path from the arguments. This will split at the first
19418  # space.
19419  complete="$PROPER_COMPILER_CC"
19420  path="${complete%% *}"
19421  tmp="$complete EOL"
19422  arguments="${tmp#* }"
19423
19424  # Input might be given as Windows format, start by converting to
19425  # unix format.
19426  new_path="$path"
19427
19428  windows_path="$new_path"
19429  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19430    unix_path=`$CYGPATH -u "$windows_path"`
19431    new_path="$unix_path"
19432  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19433    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19434    new_path="$unix_path"
19435  fi
19436
19437
19438  # Now try to locate executable using which
19439  new_path=`$WHICH "$new_path" 2> /dev/null`
19440
19441  if test "x$new_path" = x; then
19442    # Oops. Which didn't find the executable.
19443    # The splitting of arguments from the executable at a space might have been incorrect,
19444    # since paths with space are more likely in Windows. Give it another try with the whole
19445    # argument.
19446    path="$complete"
19447    arguments="EOL"
19448    new_path="$path"
19449
19450  windows_path="$new_path"
19451  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19452    unix_path=`$CYGPATH -u "$windows_path"`
19453    new_path="$unix_path"
19454  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19455    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19456    new_path="$unix_path"
19457  fi
19458
19459
19460    new_path=`$WHICH "$new_path" 2> /dev/null`
19461
19462    if test "x$new_path" = x; then
19463      # It's still not found. Now this is an unrecoverable error.
19464      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
19465$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
19466      has_space=`$ECHO "$complete" | $GREP " "`
19467      if test "x$has_space" != x; then
19468        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19469$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19470      fi
19471      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19472    fi
19473  fi
19474
19475  # Now new_path has a complete unix path to the binary
19476  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19477    # Keep paths in /bin as-is, but remove trailing .exe if any
19478    new_path="${new_path/%.exe/}"
19479    # Do not save /bin paths to all_fixpath_prefixes!
19480  else
19481    # Not in mixed or Windows style, start by that.
19482    new_path=`cmd //c echo $new_path`
19483
19484  input_path="$new_path"
19485  # Check if we need to convert this using DOS-style short mode. If the path
19486  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19487  # take no chances and rewrite it.
19488  # Note: m4 eats our [], so we need to use [ and ] instead.
19489  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19490  if test "x$has_forbidden_chars" != x; then
19491    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19492    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19493  fi
19494
19495    # Output is in $new_path
19496
19497  windows_path="$new_path"
19498  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19499    unix_path=`$CYGPATH -u "$windows_path"`
19500    new_path="$unix_path"
19501  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19502    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19503    new_path="$unix_path"
19504  fi
19505
19506    # remove trailing .exe if any
19507    new_path="${new_path/%.exe/}"
19508
19509    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19510    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19511  fi
19512
19513  else
19514    # We're on a posix platform. Hooray! :)
19515    # First separate the path from the arguments. This will split at the first
19516    # space.
19517    complete="$PROPER_COMPILER_CC"
19518    path="${complete%% *}"
19519    tmp="$complete EOL"
19520    arguments="${tmp#* }"
19521
19522    # Cannot rely on the command "which" here since it doesn't always work.
19523    is_absolute_path=`$ECHO "$path" | $GREP ^/`
19524    if test -z "$is_absolute_path"; then
19525      # Path to executable is not absolute. Find it.
19526      IFS_save="$IFS"
19527      IFS=:
19528      for p in $PATH; do
19529        if test -f "$p/$path" && test -x "$p/$path"; then
19530          new_path="$p/$path"
19531          break
19532        fi
19533      done
19534      IFS="$IFS_save"
19535    else
19536      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&5
19537$as_echo "$as_me: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&6;}
19538      new_path="$path"
19539    fi
19540
19541    if test "x$new_path" = x; then
19542        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
19543$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
19544        has_space=`$ECHO "$complete" | $GREP " "`
19545        if test "x$has_space" != x; then
19546          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19547$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19548        fi
19549        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19550      fi
19551  fi
19552
19553      # Now join together the path and the arguments once again
19554      if test "x$arguments" != xEOL; then
19555        new_complete="$new_path ${arguments% *}"
19556      else
19557        new_complete="$new_path"
19558      fi
19559
19560  if test "x$complete" != "x$new_complete"; then
19561      PROPER_COMPILER_CC="$new_complete"
19562      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
19563$as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
19564    fi
19565
19566    PATH="$RETRY_COMPILER_SAVED_PATH"
19567
19568    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
19569$as_echo_n "checking for resolved symbolic links for CC... " >&6; }
19570
19571    if test "x$OPENJDK_BUILD_OS" != xwindows; then
19572        # Follow a chain of symbolic links. Use readlink
19573        # where it exists, else fall back to horribly
19574        # complicated shell code.
19575        if test "x$READLINK_TESTED" != yes; then
19576            # On MacOSX there is a readlink tool with a different
19577            # purpose than the GNU readlink tool. Check the found readlink.
19578            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
19579            if test "x$ISGNU" = x; then
19580                 # A readlink that we do not know how to use.
19581                 # Are there other non-GNU readlinks out there?
19582                 READLINK_TESTED=yes
19583                 READLINK=
19584            fi
19585        fi
19586
19587        if test "x$READLINK" != x; then
19588            PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
19589        else
19590            # Save the current directory for restoring afterwards
19591            STARTDIR=$PWD
19592            COUNTER=0
19593            sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
19594            sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
19595            cd $sym_link_dir
19596            # Use -P flag to resolve symlinks in directories.
19597            cd `$THEPWDCMD -P`
19598            sym_link_dir=`$THEPWDCMD -P`
19599            # Resolve file symlinks
19600            while test $COUNTER -lt 20; do
19601                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
19602                if test "x$ISLINK" == x; then
19603                    # This is not a symbolic link! We are done!
19604                    break
19605                fi
19606                # Again resolve directory symlinks since the target of the just found
19607                # link could be in a different directory
19608                cd `$DIRNAME $ISLINK`
19609                sym_link_dir=`$THEPWDCMD -P`
19610                sym_link_file=`$BASENAME $ISLINK`
19611                let COUNTER=COUNTER+1
19612            done
19613            cd $STARTDIR
19614            PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
19615        fi
19616    fi
19617
19618    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
19619$as_echo "$PROPER_COMPILER_CC" >&6; }
19620    CC="$PROPER_COMPILER_CC"
19621  else
19622    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
19623$as_echo "no, keeping CC" >&6; }
19624    CC="$TEST_COMPILER"
19625  fi
19626
19627  COMPILER=$CC
19628  COMPILER_NAME=$COMPILER_NAME
19629
19630  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
19631    # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
19632    COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
19633    $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
19634    if test $? -ne 0; then
19635      GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
19636
19637      { $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
19638$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
19639      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
19640$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
19641      as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
19642    else
19643      COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
19644      COMPILER_VENDOR="Sun Studio"
19645    fi
19646  elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
19647    # First line typically looks something like:
19648    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
19649    COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
19650    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
19651    COMPILER_VENDOR="Microsoft CL.EXE"
19652    COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
19653    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
19654      if test "x$COMPILER_CPU_TEST" != "x80x86"; then
19655        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
19656      fi
19657    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
19658      if test "x$COMPILER_CPU_TEST" != "xx64"; then
19659        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
19660      fi
19661    fi
19662  else
19663    COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
19664    # Check that this is likely to be GCC.
19665    $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
19666    if test $? -ne 0; then
19667      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
19668$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
19669      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
19670$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
19671      as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
19672    fi
19673
19674    # First line typically looks something like:
19675    # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
19676    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
19677    COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
19678  fi
19679  # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
19680  CC_VERSION="$COMPILER_VERSION"
19681  # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
19682  CC_VENDOR="$COMPILER_VENDOR"
19683
19684  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
19685$as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
19686
19687
19688# Now that we have resolved CC ourself, let autoconf have its go at it
19689ac_ext=c
19690ac_cpp='$CPP $CPPFLAGS'
19691ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19692ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19693ac_compiler_gnu=$ac_cv_c_compiler_gnu
19694if test -n "$ac_tool_prefix"; then
19695  for ac_prog in $CC
19696  do
19697    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
19698set dummy $ac_tool_prefix$ac_prog; ac_word=$2
19699{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19700$as_echo_n "checking for $ac_word... " >&6; }
19701if ${ac_cv_prog_CC+:} false; then :
19702  $as_echo_n "(cached) " >&6
19703else
19704  if test -n "$CC"; then
19705  ac_cv_prog_CC="$CC" # Let the user override the test.
19706else
19707as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19708for as_dir in $PATH
19709do
19710  IFS=$as_save_IFS
19711  test -z "$as_dir" && as_dir=.
19712    for ac_exec_ext in '' $ac_executable_extensions; do
19713  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19714    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
19715    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19716    break 2
19717  fi
19718done
19719  done
19720IFS=$as_save_IFS
19721
19722fi
19723fi
19724CC=$ac_cv_prog_CC
19725if test -n "$CC"; then
19726  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
19727$as_echo "$CC" >&6; }
19728else
19729  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19730$as_echo "no" >&6; }
19731fi
19732
19733
19734    test -n "$CC" && break
19735  done
19736fi
19737if test -z "$CC"; then
19738  ac_ct_CC=$CC
19739  for ac_prog in $CC
19740do
19741  # Extract the first word of "$ac_prog", so it can be a program name with args.
19742set dummy $ac_prog; ac_word=$2
19743{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19744$as_echo_n "checking for $ac_word... " >&6; }
19745if ${ac_cv_prog_ac_ct_CC+:} false; then :
19746  $as_echo_n "(cached) " >&6
19747else
19748  if test -n "$ac_ct_CC"; then
19749  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
19750else
19751as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19752for as_dir in $PATH
19753do
19754  IFS=$as_save_IFS
19755  test -z "$as_dir" && as_dir=.
19756    for ac_exec_ext in '' $ac_executable_extensions; do
19757  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19758    ac_cv_prog_ac_ct_CC="$ac_prog"
19759    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19760    break 2
19761  fi
19762done
19763  done
19764IFS=$as_save_IFS
19765
19766fi
19767fi
19768ac_ct_CC=$ac_cv_prog_ac_ct_CC
19769if test -n "$ac_ct_CC"; then
19770  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
19771$as_echo "$ac_ct_CC" >&6; }
19772else
19773  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19774$as_echo "no" >&6; }
19775fi
19776
19777
19778  test -n "$ac_ct_CC" && break
19779done
19780
19781  if test "x$ac_ct_CC" = x; then
19782    CC=""
19783  else
19784    case $cross_compiling:$ac_tool_warned in
19785yes:)
19786{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19787$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19788ac_tool_warned=yes ;;
19789esac
19790    CC=$ac_ct_CC
19791  fi
19792fi
19793
19794
19795test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19796$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19797as_fn_error $? "no acceptable C compiler found in \$PATH
19798See \`config.log' for more details" "$LINENO" 5; }
19799
19800# Provide some information about the compiler.
19801$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
19802set X $ac_compile
19803ac_compiler=$2
19804for ac_option in --version -v -V -qversion; do
19805  { { ac_try="$ac_compiler $ac_option >&5"
19806case "(($ac_try" in
19807  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19808  *) ac_try_echo=$ac_try;;
19809esac
19810eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19811$as_echo "$ac_try_echo"; } >&5
19812  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
19813  ac_status=$?
19814  if test -s conftest.err; then
19815    sed '10a\
19816... rest of stderr output deleted ...
19817         10q' conftest.err >conftest.er1
19818    cat conftest.er1 >&5
19819  fi
19820  rm -f conftest.er1 conftest.err
19821  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19822  test $ac_status = 0; }
19823done
19824
19825cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19826/* end confdefs.h.  */
19827
19828int
19829main ()
19830{
19831
19832  ;
19833  return 0;
19834}
19835_ACEOF
19836ac_clean_files_save=$ac_clean_files
19837ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
19838# Try to create an executable without -o first, disregard a.out.
19839# It will help us diagnose broken compilers, and finding out an intuition
19840# of exeext.
19841{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
19842$as_echo_n "checking whether the C compiler works... " >&6; }
19843ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
19844
19845# The possible output files:
19846ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
19847
19848ac_rmfiles=
19849for ac_file in $ac_files
19850do
19851  case $ac_file in
19852    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
19853    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
19854  esac
19855done
19856rm -f $ac_rmfiles
19857
19858if { { ac_try="$ac_link_default"
19859case "(($ac_try" in
19860  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19861  *) ac_try_echo=$ac_try;;
19862esac
19863eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19864$as_echo "$ac_try_echo"; } >&5
19865  (eval "$ac_link_default") 2>&5
19866  ac_status=$?
19867  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19868  test $ac_status = 0; }; then :
19869  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
19870# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
19871# in a Makefile.  We should not override ac_cv_exeext if it was cached,
19872# so that the user can short-circuit this test for compilers unknown to
19873# Autoconf.
19874for ac_file in $ac_files ''
19875do
19876  test -f "$ac_file" || continue
19877  case $ac_file in
19878    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
19879	;;
19880    [ab].out )
19881	# We found the default executable, but exeext='' is most
19882	# certainly right.
19883	break;;
19884    *.* )
19885	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
19886	then :; else
19887	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
19888	fi
19889	# We set ac_cv_exeext here because the later test for it is not
19890	# safe: cross compilers may not add the suffix if given an `-o'
19891	# argument, so we may need to know it at that point already.
19892	# Even if this section looks crufty: it has the advantage of
19893	# actually working.
19894	break;;
19895    * )
19896	break;;
19897  esac
19898done
19899test "$ac_cv_exeext" = no && ac_cv_exeext=
19900
19901else
19902  ac_file=''
19903fi
19904if test -z "$ac_file"; then :
19905  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19906$as_echo "no" >&6; }
19907$as_echo "$as_me: failed program was:" >&5
19908sed 's/^/| /' conftest.$ac_ext >&5
19909
19910{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19911$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19912as_fn_error 77 "C compiler cannot create executables
19913See \`config.log' for more details" "$LINENO" 5; }
19914else
19915  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19916$as_echo "yes" >&6; }
19917fi
19918{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
19919$as_echo_n "checking for C compiler default output file name... " >&6; }
19920{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
19921$as_echo "$ac_file" >&6; }
19922ac_exeext=$ac_cv_exeext
19923
19924rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
19925ac_clean_files=$ac_clean_files_save
19926{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
19927$as_echo_n "checking for suffix of executables... " >&6; }
19928if { { ac_try="$ac_link"
19929case "(($ac_try" in
19930  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19931  *) ac_try_echo=$ac_try;;
19932esac
19933eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19934$as_echo "$ac_try_echo"; } >&5
19935  (eval "$ac_link") 2>&5
19936  ac_status=$?
19937  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19938  test $ac_status = 0; }; then :
19939  # If both `conftest.exe' and `conftest' are `present' (well, observable)
19940# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
19941# work properly (i.e., refer to `conftest.exe'), while it won't with
19942# `rm'.
19943for ac_file in conftest.exe conftest conftest.*; do
19944  test -f "$ac_file" || continue
19945  case $ac_file in
19946    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
19947    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
19948	  break;;
19949    * ) break;;
19950  esac
19951done
19952else
19953  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19954$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19955as_fn_error $? "cannot compute suffix of executables: cannot compile and link
19956See \`config.log' for more details" "$LINENO" 5; }
19957fi
19958rm -f conftest conftest$ac_cv_exeext
19959{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
19960$as_echo "$ac_cv_exeext" >&6; }
19961
19962rm -f conftest.$ac_ext
19963EXEEXT=$ac_cv_exeext
19964ac_exeext=$EXEEXT
19965cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19966/* end confdefs.h.  */
19967#include <stdio.h>
19968int
19969main ()
19970{
19971FILE *f = fopen ("conftest.out", "w");
19972 return ferror (f) || fclose (f) != 0;
19973
19974  ;
19975  return 0;
19976}
19977_ACEOF
19978ac_clean_files="$ac_clean_files conftest.out"
19979# Check that the compiler produces executables we can run.  If not, either
19980# the compiler is broken, or we cross compile.
19981{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
19982$as_echo_n "checking whether we are cross compiling... " >&6; }
19983if test "$cross_compiling" != yes; then
19984  { { ac_try="$ac_link"
19985case "(($ac_try" in
19986  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19987  *) ac_try_echo=$ac_try;;
19988esac
19989eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19990$as_echo "$ac_try_echo"; } >&5
19991  (eval "$ac_link") 2>&5
19992  ac_status=$?
19993  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19994  test $ac_status = 0; }
19995  if { ac_try='./conftest$ac_cv_exeext'
19996  { { case "(($ac_try" in
19997  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19998  *) ac_try_echo=$ac_try;;
19999esac
20000eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20001$as_echo "$ac_try_echo"; } >&5
20002  (eval "$ac_try") 2>&5
20003  ac_status=$?
20004  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20005  test $ac_status = 0; }; }; then
20006    cross_compiling=no
20007  else
20008    if test "$cross_compiling" = maybe; then
20009	cross_compiling=yes
20010    else
20011	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20012$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20013as_fn_error $? "cannot run C compiled programs.
20014If you meant to cross compile, use \`--host'.
20015See \`config.log' for more details" "$LINENO" 5; }
20016    fi
20017  fi
20018fi
20019{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
20020$as_echo "$cross_compiling" >&6; }
20021
20022rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
20023ac_clean_files=$ac_clean_files_save
20024{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
20025$as_echo_n "checking for suffix of object files... " >&6; }
20026if ${ac_cv_objext+:} false; then :
20027  $as_echo_n "(cached) " >&6
20028else
20029  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20030/* end confdefs.h.  */
20031
20032int
20033main ()
20034{
20035
20036  ;
20037  return 0;
20038}
20039_ACEOF
20040rm -f conftest.o conftest.obj
20041if { { ac_try="$ac_compile"
20042case "(($ac_try" in
20043  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20044  *) ac_try_echo=$ac_try;;
20045esac
20046eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20047$as_echo "$ac_try_echo"; } >&5
20048  (eval "$ac_compile") 2>&5
20049  ac_status=$?
20050  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20051  test $ac_status = 0; }; then :
20052  for ac_file in conftest.o conftest.obj conftest.*; do
20053  test -f "$ac_file" || continue;
20054  case $ac_file in
20055    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
20056    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
20057       break;;
20058  esac
20059done
20060else
20061  $as_echo "$as_me: failed program was:" >&5
20062sed 's/^/| /' conftest.$ac_ext >&5
20063
20064{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20065$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20066as_fn_error $? "cannot compute suffix of object files: cannot compile
20067See \`config.log' for more details" "$LINENO" 5; }
20068fi
20069rm -f conftest.$ac_cv_objext conftest.$ac_ext
20070fi
20071{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
20072$as_echo "$ac_cv_objext" >&6; }
20073OBJEXT=$ac_cv_objext
20074ac_objext=$OBJEXT
20075{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
20076$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
20077if ${ac_cv_c_compiler_gnu+:} false; then :
20078  $as_echo_n "(cached) " >&6
20079else
20080  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20081/* end confdefs.h.  */
20082
20083int
20084main ()
20085{
20086#ifndef __GNUC__
20087       choke me
20088#endif
20089
20090  ;
20091  return 0;
20092}
20093_ACEOF
20094if ac_fn_c_try_compile "$LINENO"; then :
20095  ac_compiler_gnu=yes
20096else
20097  ac_compiler_gnu=no
20098fi
20099rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20100ac_cv_c_compiler_gnu=$ac_compiler_gnu
20101
20102fi
20103{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
20104$as_echo "$ac_cv_c_compiler_gnu" >&6; }
20105if test $ac_compiler_gnu = yes; then
20106  GCC=yes
20107else
20108  GCC=
20109fi
20110ac_test_CFLAGS=${CFLAGS+set}
20111ac_save_CFLAGS=$CFLAGS
20112{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
20113$as_echo_n "checking whether $CC accepts -g... " >&6; }
20114if ${ac_cv_prog_cc_g+:} false; then :
20115  $as_echo_n "(cached) " >&6
20116else
20117  ac_save_c_werror_flag=$ac_c_werror_flag
20118   ac_c_werror_flag=yes
20119   ac_cv_prog_cc_g=no
20120   CFLAGS="-g"
20121   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20122/* end confdefs.h.  */
20123
20124int
20125main ()
20126{
20127
20128  ;
20129  return 0;
20130}
20131_ACEOF
20132if ac_fn_c_try_compile "$LINENO"; then :
20133  ac_cv_prog_cc_g=yes
20134else
20135  CFLAGS=""
20136      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20137/* end confdefs.h.  */
20138
20139int
20140main ()
20141{
20142
20143  ;
20144  return 0;
20145}
20146_ACEOF
20147if ac_fn_c_try_compile "$LINENO"; then :
20148
20149else
20150  ac_c_werror_flag=$ac_save_c_werror_flag
20151	 CFLAGS="-g"
20152	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20153/* end confdefs.h.  */
20154
20155int
20156main ()
20157{
20158
20159  ;
20160  return 0;
20161}
20162_ACEOF
20163if ac_fn_c_try_compile "$LINENO"; then :
20164  ac_cv_prog_cc_g=yes
20165fi
20166rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20167fi
20168rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20169fi
20170rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20171   ac_c_werror_flag=$ac_save_c_werror_flag
20172fi
20173{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
20174$as_echo "$ac_cv_prog_cc_g" >&6; }
20175if test "$ac_test_CFLAGS" = set; then
20176  CFLAGS=$ac_save_CFLAGS
20177elif test $ac_cv_prog_cc_g = yes; then
20178  if test "$GCC" = yes; then
20179    CFLAGS="-g -O2"
20180  else
20181    CFLAGS="-g"
20182  fi
20183else
20184  if test "$GCC" = yes; then
20185    CFLAGS="-O2"
20186  else
20187    CFLAGS=
20188  fi
20189fi
20190{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
20191$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
20192if ${ac_cv_prog_cc_c89+:} false; then :
20193  $as_echo_n "(cached) " >&6
20194else
20195  ac_cv_prog_cc_c89=no
20196ac_save_CC=$CC
20197cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20198/* end confdefs.h.  */
20199#include <stdarg.h>
20200#include <stdio.h>
20201struct stat;
20202/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
20203struct buf { int x; };
20204FILE * (*rcsopen) (struct buf *, struct stat *, int);
20205static char *e (p, i)
20206     char **p;
20207     int i;
20208{
20209  return p[i];
20210}
20211static char *f (char * (*g) (char **, int), char **p, ...)
20212{
20213  char *s;
20214  va_list v;
20215  va_start (v,p);
20216  s = g (p, va_arg (v,int));
20217  va_end (v);
20218  return s;
20219}
20220
20221/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
20222   function prototypes and stuff, but not '\xHH' hex character constants.
20223   These don't provoke an error unfortunately, instead are silently treated
20224   as 'x'.  The following induces an error, until -std is added to get
20225   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
20226   array size at least.  It's necessary to write '\x00'==0 to get something
20227   that's true only with -std.  */
20228int osf4_cc_array ['\x00' == 0 ? 1 : -1];
20229
20230/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
20231   inside strings and character constants.  */
20232#define FOO(x) 'x'
20233int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
20234
20235int test (int i, double x);
20236struct s1 {int (*f) (int a);};
20237struct s2 {int (*f) (double a);};
20238int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
20239int argc;
20240char **argv;
20241int
20242main ()
20243{
20244return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
20245  ;
20246  return 0;
20247}
20248_ACEOF
20249for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
20250	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
20251do
20252  CC="$ac_save_CC $ac_arg"
20253  if ac_fn_c_try_compile "$LINENO"; then :
20254  ac_cv_prog_cc_c89=$ac_arg
20255fi
20256rm -f core conftest.err conftest.$ac_objext
20257  test "x$ac_cv_prog_cc_c89" != "xno" && break
20258done
20259rm -f conftest.$ac_ext
20260CC=$ac_save_CC
20261
20262fi
20263# AC_CACHE_VAL
20264case "x$ac_cv_prog_cc_c89" in
20265  x)
20266    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
20267$as_echo "none needed" >&6; } ;;
20268  xno)
20269    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
20270$as_echo "unsupported" >&6; } ;;
20271  *)
20272    CC="$CC $ac_cv_prog_cc_c89"
20273    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
20274$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
20275esac
20276if test "x$ac_cv_prog_cc_c89" != xno; then :
20277
20278fi
20279
20280ac_ext=cpp
20281ac_cpp='$CXXCPP $CPPFLAGS'
20282ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20283ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20284ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20285
20286
20287### Locate C++ compiler (CXX)
20288
20289if test "x$CXX" != x; then
20290  COMPILER_CHECK_LIST="$CXX"
20291elif test "x$OPENJDK_TARGET_OS" = "xwindows"; then
20292  COMPILER_CHECK_LIST="cl"
20293elif test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
20294  COMPILER_CHECK_LIST="CC g++"
20295else
20296  COMPILER_CHECK_LIST="g++ CC"
20297fi
20298
20299
20300  COMPILER_NAME=C++
20301
20302  CXX=
20303  # If TOOLS_DIR is set, check for all compiler names in there first
20304  # before checking the rest of the PATH.
20305  if test -n "$TOOLS_DIR"; then
20306    PATH_save="$PATH"
20307    PATH="$TOOLS_DIR"
20308    for ac_prog in $COMPILER_CHECK_LIST
20309do
20310  # Extract the first word of "$ac_prog", so it can be a program name with args.
20311set dummy $ac_prog; ac_word=$2
20312{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20313$as_echo_n "checking for $ac_word... " >&6; }
20314if ${ac_cv_path_TOOLS_DIR_CXX+:} false; then :
20315  $as_echo_n "(cached) " >&6
20316else
20317  case $TOOLS_DIR_CXX in
20318  [\\/]* | ?:[\\/]*)
20319  ac_cv_path_TOOLS_DIR_CXX="$TOOLS_DIR_CXX" # Let the user override the test with a path.
20320  ;;
20321  *)
20322  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20323for as_dir in $PATH
20324do
20325  IFS=$as_save_IFS
20326  test -z "$as_dir" && as_dir=.
20327    for ac_exec_ext in '' $ac_executable_extensions; do
20328  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20329    ac_cv_path_TOOLS_DIR_CXX="$as_dir/$ac_word$ac_exec_ext"
20330    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20331    break 2
20332  fi
20333done
20334  done
20335IFS=$as_save_IFS
20336
20337  ;;
20338esac
20339fi
20340TOOLS_DIR_CXX=$ac_cv_path_TOOLS_DIR_CXX
20341if test -n "$TOOLS_DIR_CXX"; then
20342  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CXX" >&5
20343$as_echo "$TOOLS_DIR_CXX" >&6; }
20344else
20345  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20346$as_echo "no" >&6; }
20347fi
20348
20349
20350  test -n "$TOOLS_DIR_CXX" && break
20351done
20352
20353    CXX=$TOOLS_DIR_CXX
20354    PATH="$PATH_save"
20355  fi
20356
20357  # AC_PATH_PROGS can't be run multiple times with the same variable,
20358  # so create a new name for this run.
20359  if test "x$CXX" = x; then
20360    for ac_prog in $COMPILER_CHECK_LIST
20361do
20362  # Extract the first word of "$ac_prog", so it can be a program name with args.
20363set dummy $ac_prog; ac_word=$2
20364{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20365$as_echo_n "checking for $ac_word... " >&6; }
20366if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
20367  $as_echo_n "(cached) " >&6
20368else
20369  case $POTENTIAL_CXX in
20370  [\\/]* | ?:[\\/]*)
20371  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
20372  ;;
20373  *)
20374  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20375for as_dir in $PATH
20376do
20377  IFS=$as_save_IFS
20378  test -z "$as_dir" && as_dir=.
20379    for ac_exec_ext in '' $ac_executable_extensions; do
20380  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20381    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
20382    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20383    break 2
20384  fi
20385done
20386  done
20387IFS=$as_save_IFS
20388
20389  ;;
20390esac
20391fi
20392POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
20393if test -n "$POTENTIAL_CXX"; then
20394  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
20395$as_echo "$POTENTIAL_CXX" >&6; }
20396else
20397  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20398$as_echo "no" >&6; }
20399fi
20400
20401
20402  test -n "$POTENTIAL_CXX" && break
20403done
20404
20405    CXX=$POTENTIAL_CXX
20406  fi
20407
20408  if test "x$CXX" = x; then
20409
20410    # Print a helpful message on how to acquire the necessary build dependency.
20411    # devkit is the help tag: freetyp2, cups, pulse, alsa etc
20412    MISSING_DEPENDENCY=devkit
20413    PKGHANDLER_COMMAND=
20414
20415    case $PKGHANDLER in
20416	apt-get)
20417                apt_help     $MISSING_DEPENDENCY ;;
20418    yum)
20419                yum_help     $MISSING_DEPENDENCY ;;
20420	port)
20421                port_help    $MISSING_DEPENDENCY ;;
20422	pkgutil)
20423                pkgutil_help $MISSING_DEPENDENCY ;;
20424	pkgadd)
20425                pkgadd_help  $MISSING_DEPENDENCY ;;
20426    * )
20427      break ;;
20428    esac
20429
20430    if test "x$PKGHANDLER_COMMAND" != x; then
20431        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
20432    fi
20433
20434      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
20435  fi
20436
20437  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20438
20439  # First separate the path from the arguments. This will split at the first
20440  # space.
20441  complete="$CXX"
20442  path="${complete%% *}"
20443  tmp="$complete EOL"
20444  arguments="${tmp#* }"
20445
20446  # Input might be given as Windows format, start by converting to
20447  # unix format.
20448  new_path=`$CYGPATH -u "$path"`
20449
20450  # Now try to locate executable using which
20451  new_path=`$WHICH "$new_path" 2> /dev/null`
20452  # bat and cmd files are not always considered executable in cygwin causing which
20453  # to not find them
20454  if test "x$new_path" = x \
20455           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20456           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20457    new_path=`$CYGPATH -u "$path"`
20458  fi
20459  if test "x$new_path" = x; then
20460    # Oops. Which didn't find the executable.
20461    # The splitting of arguments from the executable at a space might have been incorrect,
20462    # since paths with space are more likely in Windows. Give it another try with the whole
20463    # argument.
20464    path="$complete"
20465    arguments="EOL"
20466    new_path=`$CYGPATH -u "$path"`
20467    new_path=`$WHICH "$new_path" 2> /dev/null`
20468    # bat and cmd files are not always considered executable in cygwin causing which
20469    # to not find them
20470    if test "x$new_path" = x \
20471             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20472             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20473      new_path=`$CYGPATH -u "$path"`
20474    fi
20475    if test "x$new_path" = x; then
20476      # It's still not found. Now this is an unrecoverable error.
20477      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
20478$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
20479      has_space=`$ECHO "$complete" | $GREP " "`
20480      if test "x$has_space" != x; then
20481        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20482$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20483      fi
20484      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20485    fi
20486  fi
20487
20488  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20489  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20490  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20491  # "foo.exe" is OK but "foo" is an error.
20492  #
20493  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20494  # It is also a way to make sure we got the proper file name for the real test later on.
20495  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20496  if test "x$test_shortpath" = x; then
20497    # Short path failed, file does not exist as specified.
20498    # Try adding .exe or .cmd
20499    if test -f "${new_path}.exe"; then
20500       input_to_shortpath="${new_path}.exe"
20501    elif test -f "${new_path}.cmd"; then
20502       input_to_shortpath="${new_path}.cmd"
20503    else
20504      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
20505$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
20506      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20507$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20508      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20509    fi
20510  else
20511    input_to_shortpath="$new_path"
20512  fi
20513
20514  # Call helper function which possibly converts this using DOS-style short mode.
20515  # If so, the updated path is stored in $new_path.
20516  new_path="$input_to_shortpath"
20517
20518  input_path="$input_to_shortpath"
20519  # Check if we need to convert this using DOS-style short mode. If the path
20520  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20521  # take no chances and rewrite it.
20522  # Note: m4 eats our [], so we need to use [ and ] instead.
20523  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20524  if test "x$has_forbidden_chars" != x; then
20525    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20526    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20527    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20528    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20529      # Going to short mode and back again did indeed matter. Since short mode is
20530      # case insensitive, let's make it lowercase to improve readability.
20531      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20532      # Now convert it back to Unix-stile (cygpath)
20533      input_path=`$CYGPATH -u "$shortmode_path"`
20534      new_path="$input_path"
20535    fi
20536  fi
20537
20538  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20539  if test "x$test_cygdrive_prefix" = x; then
20540    # As a simple fix, exclude /usr/bin since it's not a real path.
20541    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20542      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20543      # a path prefixed by /cygdrive for fixpath to work.
20544      new_path="$CYGWIN_ROOT_PATH$input_path"
20545    fi
20546  fi
20547
20548  # remove trailing .exe if any
20549  new_path="${new_path/%.exe/}"
20550
20551  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20552
20553  # First separate the path from the arguments. This will split at the first
20554  # space.
20555  complete="$CXX"
20556  path="${complete%% *}"
20557  tmp="$complete EOL"
20558  arguments="${tmp#* }"
20559
20560  # Input might be given as Windows format, start by converting to
20561  # unix format.
20562  new_path="$path"
20563
20564  windows_path="$new_path"
20565  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20566    unix_path=`$CYGPATH -u "$windows_path"`
20567    new_path="$unix_path"
20568  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20569    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20570    new_path="$unix_path"
20571  fi
20572
20573
20574  # Now try to locate executable using which
20575  new_path=`$WHICH "$new_path" 2> /dev/null`
20576
20577  if test "x$new_path" = x; then
20578    # Oops. Which didn't find the executable.
20579    # The splitting of arguments from the executable at a space might have been incorrect,
20580    # since paths with space are more likely in Windows. Give it another try with the whole
20581    # argument.
20582    path="$complete"
20583    arguments="EOL"
20584    new_path="$path"
20585
20586  windows_path="$new_path"
20587  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20588    unix_path=`$CYGPATH -u "$windows_path"`
20589    new_path="$unix_path"
20590  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20591    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20592    new_path="$unix_path"
20593  fi
20594
20595
20596    new_path=`$WHICH "$new_path" 2> /dev/null`
20597
20598    if test "x$new_path" = x; then
20599      # It's still not found. Now this is an unrecoverable error.
20600      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
20601$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
20602      has_space=`$ECHO "$complete" | $GREP " "`
20603      if test "x$has_space" != x; then
20604        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20605$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20606      fi
20607      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20608    fi
20609  fi
20610
20611  # Now new_path has a complete unix path to the binary
20612  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20613    # Keep paths in /bin as-is, but remove trailing .exe if any
20614    new_path="${new_path/%.exe/}"
20615    # Do not save /bin paths to all_fixpath_prefixes!
20616  else
20617    # Not in mixed or Windows style, start by that.
20618    new_path=`cmd //c echo $new_path`
20619
20620  input_path="$new_path"
20621  # Check if we need to convert this using DOS-style short mode. If the path
20622  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20623  # take no chances and rewrite it.
20624  # Note: m4 eats our [], so we need to use [ and ] instead.
20625  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20626  if test "x$has_forbidden_chars" != x; then
20627    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20628    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20629  fi
20630
20631    # Output is in $new_path
20632
20633  windows_path="$new_path"
20634  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20635    unix_path=`$CYGPATH -u "$windows_path"`
20636    new_path="$unix_path"
20637  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20638    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20639    new_path="$unix_path"
20640  fi
20641
20642    # remove trailing .exe if any
20643    new_path="${new_path/%.exe/}"
20644
20645    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20646    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20647  fi
20648
20649  else
20650    # We're on a posix platform. Hooray! :)
20651    # First separate the path from the arguments. This will split at the first
20652    # space.
20653    complete="$CXX"
20654    path="${complete%% *}"
20655    tmp="$complete EOL"
20656    arguments="${tmp#* }"
20657
20658    # Cannot rely on the command "which" here since it doesn't always work.
20659    is_absolute_path=`$ECHO "$path" | $GREP ^/`
20660    if test -z "$is_absolute_path"; then
20661      # Path to executable is not absolute. Find it.
20662      IFS_save="$IFS"
20663      IFS=:
20664      for p in $PATH; do
20665        if test -f "$p/$path" && test -x "$p/$path"; then
20666          new_path="$p/$path"
20667          break
20668        fi
20669      done
20670      IFS="$IFS_save"
20671    else
20672      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXX (as $path) failed, using $path directly." >&5
20673$as_echo "$as_me: Resolving CXX (as $path) failed, using $path directly." >&6;}
20674      new_path="$path"
20675    fi
20676
20677    if test "x$new_path" = x; then
20678        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
20679$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
20680        has_space=`$ECHO "$complete" | $GREP " "`
20681        if test "x$has_space" != x; then
20682          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20683$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20684        fi
20685        as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20686      fi
20687  fi
20688
20689      # Now join together the path and the arguments once again
20690      if test "x$arguments" != xEOL; then
20691        new_complete="$new_path ${arguments% *}"
20692      else
20693        new_complete="$new_path"
20694      fi
20695
20696  if test "x$complete" != "x$new_complete"; then
20697      CXX="$new_complete"
20698      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
20699$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
20700    fi
20701
20702  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
20703$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
20704  TEST_COMPILER="$CXX"
20705
20706    if test "x$OPENJDK_BUILD_OS" != xwindows; then
20707        # Follow a chain of symbolic links. Use readlink
20708        # where it exists, else fall back to horribly
20709        # complicated shell code.
20710        if test "x$READLINK_TESTED" != yes; then
20711            # On MacOSX there is a readlink tool with a different
20712            # purpose than the GNU readlink tool. Check the found readlink.
20713            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
20714            if test "x$ISGNU" = x; then
20715                 # A readlink that we do not know how to use.
20716                 # Are there other non-GNU readlinks out there?
20717                 READLINK_TESTED=yes
20718                 READLINK=
20719            fi
20720        fi
20721
20722        if test "x$READLINK" != x; then
20723            TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
20724        else
20725            # Save the current directory for restoring afterwards
20726            STARTDIR=$PWD
20727            COUNTER=0
20728            sym_link_dir=`$DIRNAME $TEST_COMPILER`
20729            sym_link_file=`$BASENAME $TEST_COMPILER`
20730            cd $sym_link_dir
20731            # Use -P flag to resolve symlinks in directories.
20732            cd `$THEPWDCMD -P`
20733            sym_link_dir=`$THEPWDCMD -P`
20734            # Resolve file symlinks
20735            while test $COUNTER -lt 20; do
20736                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
20737                if test "x$ISLINK" == x; then
20738                    # This is not a symbolic link! We are done!
20739                    break
20740                fi
20741                # Again resolve directory symlinks since the target of the just found
20742                # link could be in a different directory
20743                cd `$DIRNAME $ISLINK`
20744                sym_link_dir=`$THEPWDCMD -P`
20745                sym_link_file=`$BASENAME $ISLINK`
20746                let COUNTER=COUNTER+1
20747            done
20748            cd $STARTDIR
20749            TEST_COMPILER=$sym_link_dir/$sym_link_file
20750        fi
20751    fi
20752
20753  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
20754$as_echo "$TEST_COMPILER" >&6; }
20755  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
20756$as_echo_n "checking if CXX is disguised ccache... " >&6; }
20757
20758  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
20759  if test "x$COMPILER_BASENAME" = "xccache"; then
20760    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
20761$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
20762    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
20763    # We want to control ccache invocation ourselves, so ignore this cc and try
20764    # searching again.
20765
20766    # Remove the path to the fake ccache cc from the PATH
20767    RETRY_COMPILER_SAVED_PATH="$PATH"
20768    COMPILER_DIRNAME=`$DIRNAME $CXX`
20769    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
20770
20771    # Try again looking for our compiler
20772    if test -n "$ac_tool_prefix"; then
20773  for ac_prog in $COMPILER_CHECK_LIST
20774  do
20775    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
20776set dummy $ac_tool_prefix$ac_prog; ac_word=$2
20777{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20778$as_echo_n "checking for $ac_word... " >&6; }
20779if ${ac_cv_prog_PROPER_COMPILER_CXX+:} false; then :
20780  $as_echo_n "(cached) " >&6
20781else
20782  if test -n "$PROPER_COMPILER_CXX"; then
20783  ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
20784else
20785as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20786for as_dir in $PATH
20787do
20788  IFS=$as_save_IFS
20789  test -z "$as_dir" && as_dir=.
20790    for ac_exec_ext in '' $ac_executable_extensions; do
20791  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20792    ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
20793    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20794    break 2
20795  fi
20796done
20797  done
20798IFS=$as_save_IFS
20799
20800fi
20801fi
20802PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
20803if test -n "$PROPER_COMPILER_CXX"; then
20804  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
20805$as_echo "$PROPER_COMPILER_CXX" >&6; }
20806else
20807  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20808$as_echo "no" >&6; }
20809fi
20810
20811
20812    test -n "$PROPER_COMPILER_CXX" && break
20813  done
20814fi
20815if test -z "$PROPER_COMPILER_CXX"; then
20816  ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
20817  for ac_prog in $COMPILER_CHECK_LIST
20818do
20819  # Extract the first word of "$ac_prog", so it can be a program name with args.
20820set dummy $ac_prog; ac_word=$2
20821{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20822$as_echo_n "checking for $ac_word... " >&6; }
20823if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+:} false; then :
20824  $as_echo_n "(cached) " >&6
20825else
20826  if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
20827  ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
20828else
20829as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20830for as_dir in $PATH
20831do
20832  IFS=$as_save_IFS
20833  test -z "$as_dir" && as_dir=.
20834    for ac_exec_ext in '' $ac_executable_extensions; do
20835  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20836    ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
20837    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20838    break 2
20839  fi
20840done
20841  done
20842IFS=$as_save_IFS
20843
20844fi
20845fi
20846ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
20847if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
20848  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
20849$as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
20850else
20851  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20852$as_echo "no" >&6; }
20853fi
20854
20855
20856  test -n "$ac_ct_PROPER_COMPILER_CXX" && break
20857done
20858
20859  if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
20860    PROPER_COMPILER_CXX=""
20861  else
20862    case $cross_compiling:$ac_tool_warned in
20863yes:)
20864{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
20865$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
20866ac_tool_warned=yes ;;
20867esac
20868    PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
20869  fi
20870fi
20871
20872
20873  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20874
20875  # First separate the path from the arguments. This will split at the first
20876  # space.
20877  complete="$PROPER_COMPILER_CXX"
20878  path="${complete%% *}"
20879  tmp="$complete EOL"
20880  arguments="${tmp#* }"
20881
20882  # Input might be given as Windows format, start by converting to
20883  # unix format.
20884  new_path=`$CYGPATH -u "$path"`
20885
20886  # Now try to locate executable using which
20887  new_path=`$WHICH "$new_path" 2> /dev/null`
20888  # bat and cmd files are not always considered executable in cygwin causing which
20889  # to not find them
20890  if test "x$new_path" = x \
20891           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20892           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20893    new_path=`$CYGPATH -u "$path"`
20894  fi
20895  if test "x$new_path" = x; then
20896    # Oops. Which didn't find the executable.
20897    # The splitting of arguments from the executable at a space might have been incorrect,
20898    # since paths with space are more likely in Windows. Give it another try with the whole
20899    # argument.
20900    path="$complete"
20901    arguments="EOL"
20902    new_path=`$CYGPATH -u "$path"`
20903    new_path=`$WHICH "$new_path" 2> /dev/null`
20904    # bat and cmd files are not always considered executable in cygwin causing which
20905    # to not find them
20906    if test "x$new_path" = x \
20907             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20908             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20909      new_path=`$CYGPATH -u "$path"`
20910    fi
20911    if test "x$new_path" = x; then
20912      # It's still not found. Now this is an unrecoverable error.
20913      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
20914$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
20915      has_space=`$ECHO "$complete" | $GREP " "`
20916      if test "x$has_space" != x; then
20917        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20918$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20919      fi
20920      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
20921    fi
20922  fi
20923
20924  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20925  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20926  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20927  # "foo.exe" is OK but "foo" is an error.
20928  #
20929  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20930  # It is also a way to make sure we got the proper file name for the real test later on.
20931  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20932  if test "x$test_shortpath" = x; then
20933    # Short path failed, file does not exist as specified.
20934    # Try adding .exe or .cmd
20935    if test -f "${new_path}.exe"; then
20936       input_to_shortpath="${new_path}.exe"
20937    elif test -f "${new_path}.cmd"; then
20938       input_to_shortpath="${new_path}.cmd"
20939    else
20940      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
20941$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
20942      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20943$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20944      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
20945    fi
20946  else
20947    input_to_shortpath="$new_path"
20948  fi
20949
20950  # Call helper function which possibly converts this using DOS-style short mode.
20951  # If so, the updated path is stored in $new_path.
20952  new_path="$input_to_shortpath"
20953
20954  input_path="$input_to_shortpath"
20955  # Check if we need to convert this using DOS-style short mode. If the path
20956  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20957  # take no chances and rewrite it.
20958  # Note: m4 eats our [], so we need to use [ and ] instead.
20959  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20960  if test "x$has_forbidden_chars" != x; then
20961    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20962    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20963    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20964    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20965      # Going to short mode and back again did indeed matter. Since short mode is
20966      # case insensitive, let's make it lowercase to improve readability.
20967      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20968      # Now convert it back to Unix-stile (cygpath)
20969      input_path=`$CYGPATH -u "$shortmode_path"`
20970      new_path="$input_path"
20971    fi
20972  fi
20973
20974  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20975  if test "x$test_cygdrive_prefix" = x; then
20976    # As a simple fix, exclude /usr/bin since it's not a real path.
20977    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20978      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20979      # a path prefixed by /cygdrive for fixpath to work.
20980      new_path="$CYGWIN_ROOT_PATH$input_path"
20981    fi
20982  fi
20983
20984  # remove trailing .exe if any
20985  new_path="${new_path/%.exe/}"
20986
20987  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20988
20989  # First separate the path from the arguments. This will split at the first
20990  # space.
20991  complete="$PROPER_COMPILER_CXX"
20992  path="${complete%% *}"
20993  tmp="$complete EOL"
20994  arguments="${tmp#* }"
20995
20996  # Input might be given as Windows format, start by converting to
20997  # unix format.
20998  new_path="$path"
20999
21000  windows_path="$new_path"
21001  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21002    unix_path=`$CYGPATH -u "$windows_path"`
21003    new_path="$unix_path"
21004  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21005    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21006    new_path="$unix_path"
21007  fi
21008
21009
21010  # Now try to locate executable using which
21011  new_path=`$WHICH "$new_path" 2> /dev/null`
21012
21013  if test "x$new_path" = x; then
21014    # Oops. Which didn't find the executable.
21015    # The splitting of arguments from the executable at a space might have been incorrect,
21016    # since paths with space are more likely in Windows. Give it another try with the whole
21017    # argument.
21018    path="$complete"
21019    arguments="EOL"
21020    new_path="$path"
21021
21022  windows_path="$new_path"
21023  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21024    unix_path=`$CYGPATH -u "$windows_path"`
21025    new_path="$unix_path"
21026  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21027    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21028    new_path="$unix_path"
21029  fi
21030
21031
21032    new_path=`$WHICH "$new_path" 2> /dev/null`
21033
21034    if test "x$new_path" = x; then
21035      # It's still not found. Now this is an unrecoverable error.
21036      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
21037$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
21038      has_space=`$ECHO "$complete" | $GREP " "`
21039      if test "x$has_space" != x; then
21040        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21041$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21042      fi
21043      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21044    fi
21045  fi
21046
21047  # Now new_path has a complete unix path to the binary
21048  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21049    # Keep paths in /bin as-is, but remove trailing .exe if any
21050    new_path="${new_path/%.exe/}"
21051    # Do not save /bin paths to all_fixpath_prefixes!
21052  else
21053    # Not in mixed or Windows style, start by that.
21054    new_path=`cmd //c echo $new_path`
21055
21056  input_path="$new_path"
21057  # Check if we need to convert this using DOS-style short mode. If the path
21058  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21059  # take no chances and rewrite it.
21060  # Note: m4 eats our [], so we need to use [ and ] instead.
21061  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21062  if test "x$has_forbidden_chars" != x; then
21063    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21064    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21065  fi
21066
21067    # Output is in $new_path
21068
21069  windows_path="$new_path"
21070  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21071    unix_path=`$CYGPATH -u "$windows_path"`
21072    new_path="$unix_path"
21073  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21074    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21075    new_path="$unix_path"
21076  fi
21077
21078    # remove trailing .exe if any
21079    new_path="${new_path/%.exe/}"
21080
21081    # Save the first 10 bytes of this path to the storage, so fixpath can work.
21082    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21083  fi
21084
21085  else
21086    # We're on a posix platform. Hooray! :)
21087    # First separate the path from the arguments. This will split at the first
21088    # space.
21089    complete="$PROPER_COMPILER_CXX"
21090    path="${complete%% *}"
21091    tmp="$complete EOL"
21092    arguments="${tmp#* }"
21093
21094    # Cannot rely on the command "which" here since it doesn't always work.
21095    is_absolute_path=`$ECHO "$path" | $GREP ^/`
21096    if test -z "$is_absolute_path"; then
21097      # Path to executable is not absolute. Find it.
21098      IFS_save="$IFS"
21099      IFS=:
21100      for p in $PATH; do
21101        if test -f "$p/$path" && test -x "$p/$path"; then
21102          new_path="$p/$path"
21103          break
21104        fi
21105      done
21106      IFS="$IFS_save"
21107    else
21108      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&5
21109$as_echo "$as_me: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&6;}
21110      new_path="$path"
21111    fi
21112
21113    if test "x$new_path" = x; then
21114        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
21115$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
21116        has_space=`$ECHO "$complete" | $GREP " "`
21117        if test "x$has_space" != x; then
21118          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21119$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21120        fi
21121        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21122      fi
21123  fi
21124
21125      # Now join together the path and the arguments once again
21126      if test "x$arguments" != xEOL; then
21127        new_complete="$new_path ${arguments% *}"
21128      else
21129        new_complete="$new_path"
21130      fi
21131
21132  if test "x$complete" != "x$new_complete"; then
21133      PROPER_COMPILER_CXX="$new_complete"
21134      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
21135$as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
21136    fi
21137
21138    PATH="$RETRY_COMPILER_SAVED_PATH"
21139
21140    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
21141$as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
21142
21143    if test "x$OPENJDK_BUILD_OS" != xwindows; then
21144        # Follow a chain of symbolic links. Use readlink
21145        # where it exists, else fall back to horribly
21146        # complicated shell code.
21147        if test "x$READLINK_TESTED" != yes; then
21148            # On MacOSX there is a readlink tool with a different
21149            # purpose than the GNU readlink tool. Check the found readlink.
21150            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
21151            if test "x$ISGNU" = x; then
21152                 # A readlink that we do not know how to use.
21153                 # Are there other non-GNU readlinks out there?
21154                 READLINK_TESTED=yes
21155                 READLINK=
21156            fi
21157        fi
21158
21159        if test "x$READLINK" != x; then
21160            PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
21161        else
21162            # Save the current directory for restoring afterwards
21163            STARTDIR=$PWD
21164            COUNTER=0
21165            sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
21166            sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
21167            cd $sym_link_dir
21168            # Use -P flag to resolve symlinks in directories.
21169            cd `$THEPWDCMD -P`
21170            sym_link_dir=`$THEPWDCMD -P`
21171            # Resolve file symlinks
21172            while test $COUNTER -lt 20; do
21173                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
21174                if test "x$ISLINK" == x; then
21175                    # This is not a symbolic link! We are done!
21176                    break
21177                fi
21178                # Again resolve directory symlinks since the target of the just found
21179                # link could be in a different directory
21180                cd `$DIRNAME $ISLINK`
21181                sym_link_dir=`$THEPWDCMD -P`
21182                sym_link_file=`$BASENAME $ISLINK`
21183                let COUNTER=COUNTER+1
21184            done
21185            cd $STARTDIR
21186            PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
21187        fi
21188    fi
21189
21190    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
21191$as_echo "$PROPER_COMPILER_CXX" >&6; }
21192    CXX="$PROPER_COMPILER_CXX"
21193  else
21194    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
21195$as_echo "no, keeping CXX" >&6; }
21196    CXX="$TEST_COMPILER"
21197  fi
21198
21199  COMPILER=$CXX
21200  COMPILER_NAME=$COMPILER_NAME
21201
21202  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
21203    # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
21204    COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
21205    $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
21206    if test $? -ne 0; then
21207      GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
21208
21209      { $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
21210$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
21211      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
21212$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
21213      as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
21214    else
21215      COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
21216      COMPILER_VENDOR="Sun Studio"
21217    fi
21218  elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
21219    # First line typically looks something like:
21220    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
21221    COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
21222    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
21223    COMPILER_VENDOR="Microsoft CL.EXE"
21224    COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
21225    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
21226      if test "x$COMPILER_CPU_TEST" != "x80x86"; then
21227        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
21228      fi
21229    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
21230      if test "x$COMPILER_CPU_TEST" != "xx64"; then
21231        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
21232      fi
21233    fi
21234  else
21235    COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
21236    # Check that this is likely to be GCC.
21237    $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
21238    if test $? -ne 0; then
21239      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
21240$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
21241      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
21242$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
21243      as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
21244    fi
21245
21246    # First line typically looks something like:
21247    # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
21248    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
21249    COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
21250  fi
21251  # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
21252  CXX_VERSION="$COMPILER_VERSION"
21253  # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
21254  CXX_VENDOR="$COMPILER_VENDOR"
21255
21256  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
21257$as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
21258
21259
21260# Now that we have resolved CXX ourself, let autoconf have its go at it
21261ac_ext=cpp
21262ac_cpp='$CXXCPP $CPPFLAGS'
21263ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21264ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21265ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21266if test -z "$CXX"; then
21267  if test -n "$CCC"; then
21268    CXX=$CCC
21269  else
21270    if test -n "$ac_tool_prefix"; then
21271  for ac_prog in $CXX
21272  do
21273    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
21274set dummy $ac_tool_prefix$ac_prog; ac_word=$2
21275{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21276$as_echo_n "checking for $ac_word... " >&6; }
21277if ${ac_cv_prog_CXX+:} false; then :
21278  $as_echo_n "(cached) " >&6
21279else
21280  if test -n "$CXX"; then
21281  ac_cv_prog_CXX="$CXX" # Let the user override the test.
21282else
21283as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21284for as_dir in $PATH
21285do
21286  IFS=$as_save_IFS
21287  test -z "$as_dir" && as_dir=.
21288    for ac_exec_ext in '' $ac_executable_extensions; do
21289  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21290    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
21291    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21292    break 2
21293  fi
21294done
21295  done
21296IFS=$as_save_IFS
21297
21298fi
21299fi
21300CXX=$ac_cv_prog_CXX
21301if test -n "$CXX"; then
21302  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
21303$as_echo "$CXX" >&6; }
21304else
21305  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21306$as_echo "no" >&6; }
21307fi
21308
21309
21310    test -n "$CXX" && break
21311  done
21312fi
21313if test -z "$CXX"; then
21314  ac_ct_CXX=$CXX
21315  for ac_prog in $CXX
21316do
21317  # Extract the first word of "$ac_prog", so it can be a program name with args.
21318set dummy $ac_prog; ac_word=$2
21319{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21320$as_echo_n "checking for $ac_word... " >&6; }
21321if ${ac_cv_prog_ac_ct_CXX+:} false; then :
21322  $as_echo_n "(cached) " >&6
21323else
21324  if test -n "$ac_ct_CXX"; then
21325  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
21326else
21327as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21328for as_dir in $PATH
21329do
21330  IFS=$as_save_IFS
21331  test -z "$as_dir" && as_dir=.
21332    for ac_exec_ext in '' $ac_executable_extensions; do
21333  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21334    ac_cv_prog_ac_ct_CXX="$ac_prog"
21335    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21336    break 2
21337  fi
21338done
21339  done
21340IFS=$as_save_IFS
21341
21342fi
21343fi
21344ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
21345if test -n "$ac_ct_CXX"; then
21346  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
21347$as_echo "$ac_ct_CXX" >&6; }
21348else
21349  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21350$as_echo "no" >&6; }
21351fi
21352
21353
21354  test -n "$ac_ct_CXX" && break
21355done
21356
21357  if test "x$ac_ct_CXX" = x; then
21358    CXX="g++"
21359  else
21360    case $cross_compiling:$ac_tool_warned in
21361yes:)
21362{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
21363$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
21364ac_tool_warned=yes ;;
21365esac
21366    CXX=$ac_ct_CXX
21367  fi
21368fi
21369
21370  fi
21371fi
21372# Provide some information about the compiler.
21373$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
21374set X $ac_compile
21375ac_compiler=$2
21376for ac_option in --version -v -V -qversion; do
21377  { { ac_try="$ac_compiler $ac_option >&5"
21378case "(($ac_try" in
21379  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21380  *) ac_try_echo=$ac_try;;
21381esac
21382eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
21383$as_echo "$ac_try_echo"; } >&5
21384  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
21385  ac_status=$?
21386  if test -s conftest.err; then
21387    sed '10a\
21388... rest of stderr output deleted ...
21389         10q' conftest.err >conftest.er1
21390    cat conftest.er1 >&5
21391  fi
21392  rm -f conftest.er1 conftest.err
21393  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21394  test $ac_status = 0; }
21395done
21396
21397{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
21398$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
21399if ${ac_cv_cxx_compiler_gnu+:} false; then :
21400  $as_echo_n "(cached) " >&6
21401else
21402  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21403/* end confdefs.h.  */
21404
21405int
21406main ()
21407{
21408#ifndef __GNUC__
21409       choke me
21410#endif
21411
21412  ;
21413  return 0;
21414}
21415_ACEOF
21416if ac_fn_cxx_try_compile "$LINENO"; then :
21417  ac_compiler_gnu=yes
21418else
21419  ac_compiler_gnu=no
21420fi
21421rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21422ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
21423
21424fi
21425{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
21426$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
21427if test $ac_compiler_gnu = yes; then
21428  GXX=yes
21429else
21430  GXX=
21431fi
21432ac_test_CXXFLAGS=${CXXFLAGS+set}
21433ac_save_CXXFLAGS=$CXXFLAGS
21434{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
21435$as_echo_n "checking whether $CXX accepts -g... " >&6; }
21436if ${ac_cv_prog_cxx_g+:} false; then :
21437  $as_echo_n "(cached) " >&6
21438else
21439  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
21440   ac_cxx_werror_flag=yes
21441   ac_cv_prog_cxx_g=no
21442   CXXFLAGS="-g"
21443   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21444/* end confdefs.h.  */
21445
21446int
21447main ()
21448{
21449
21450  ;
21451  return 0;
21452}
21453_ACEOF
21454if ac_fn_cxx_try_compile "$LINENO"; then :
21455  ac_cv_prog_cxx_g=yes
21456else
21457  CXXFLAGS=""
21458      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21459/* end confdefs.h.  */
21460
21461int
21462main ()
21463{
21464
21465  ;
21466  return 0;
21467}
21468_ACEOF
21469if ac_fn_cxx_try_compile "$LINENO"; then :
21470
21471else
21472  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
21473	 CXXFLAGS="-g"
21474	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21475/* end confdefs.h.  */
21476
21477int
21478main ()
21479{
21480
21481  ;
21482  return 0;
21483}
21484_ACEOF
21485if ac_fn_cxx_try_compile "$LINENO"; then :
21486  ac_cv_prog_cxx_g=yes
21487fi
21488rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21489fi
21490rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21491fi
21492rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21493   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
21494fi
21495{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
21496$as_echo "$ac_cv_prog_cxx_g" >&6; }
21497if test "$ac_test_CXXFLAGS" = set; then
21498  CXXFLAGS=$ac_save_CXXFLAGS
21499elif test $ac_cv_prog_cxx_g = yes; then
21500  if test "$GXX" = yes; then
21501    CXXFLAGS="-g -O2"
21502  else
21503    CXXFLAGS="-g"
21504  fi
21505else
21506  if test "$GXX" = yes; then
21507    CXXFLAGS="-O2"
21508  else
21509    CXXFLAGS=
21510  fi
21511fi
21512ac_ext=cpp
21513ac_cpp='$CXXCPP $CPPFLAGS'
21514ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21515ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21516ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21517
21518
21519### Locate other tools
21520
21521if test "x$OPENJDK_TARGET_OS" = xmacosx; then
21522    ac_ext=m
21523ac_cpp='$OBJCPP $CPPFLAGS'
21524ac_compile='$OBJC -c $OBJCFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21525ac_link='$OBJC -o conftest$ac_exeext $OBJCFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21526ac_compiler_gnu=$ac_cv_objc_compiler_gnu
21527if test -n "$ac_tool_prefix"; then
21528  for ac_prog in gcc objcc objc cc CC
21529  do
21530    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
21531set dummy $ac_tool_prefix$ac_prog; ac_word=$2
21532{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21533$as_echo_n "checking for $ac_word... " >&6; }
21534if ${ac_cv_prog_OBJC+:} false; then :
21535  $as_echo_n "(cached) " >&6
21536else
21537  if test -n "$OBJC"; then
21538  ac_cv_prog_OBJC="$OBJC" # Let the user override the test.
21539else
21540as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21541for as_dir in $PATH
21542do
21543  IFS=$as_save_IFS
21544  test -z "$as_dir" && as_dir=.
21545    for ac_exec_ext in '' $ac_executable_extensions; do
21546  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21547    ac_cv_prog_OBJC="$ac_tool_prefix$ac_prog"
21548    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21549    break 2
21550  fi
21551done
21552  done
21553IFS=$as_save_IFS
21554
21555fi
21556fi
21557OBJC=$ac_cv_prog_OBJC
21558if test -n "$OBJC"; then
21559  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJC" >&5
21560$as_echo "$OBJC" >&6; }
21561else
21562  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21563$as_echo "no" >&6; }
21564fi
21565
21566
21567    test -n "$OBJC" && break
21568  done
21569fi
21570if test -z "$OBJC"; then
21571  ac_ct_OBJC=$OBJC
21572  for ac_prog in gcc objcc objc cc CC
21573do
21574  # Extract the first word of "$ac_prog", so it can be a program name with args.
21575set dummy $ac_prog; ac_word=$2
21576{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21577$as_echo_n "checking for $ac_word... " >&6; }
21578if ${ac_cv_prog_ac_ct_OBJC+:} false; then :
21579  $as_echo_n "(cached) " >&6
21580else
21581  if test -n "$ac_ct_OBJC"; then
21582  ac_cv_prog_ac_ct_OBJC="$ac_ct_OBJC" # Let the user override the test.
21583else
21584as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21585for as_dir in $PATH
21586do
21587  IFS=$as_save_IFS
21588  test -z "$as_dir" && as_dir=.
21589    for ac_exec_ext in '' $ac_executable_extensions; do
21590  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21591    ac_cv_prog_ac_ct_OBJC="$ac_prog"
21592    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21593    break 2
21594  fi
21595done
21596  done
21597IFS=$as_save_IFS
21598
21599fi
21600fi
21601ac_ct_OBJC=$ac_cv_prog_ac_ct_OBJC
21602if test -n "$ac_ct_OBJC"; then
21603  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJC" >&5
21604$as_echo "$ac_ct_OBJC" >&6; }
21605else
21606  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21607$as_echo "no" >&6; }
21608fi
21609
21610
21611  test -n "$ac_ct_OBJC" && break
21612done
21613
21614  if test "x$ac_ct_OBJC" = x; then
21615    OBJC="gcc"
21616  else
21617    case $cross_compiling:$ac_tool_warned in
21618yes:)
21619{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
21620$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
21621ac_tool_warned=yes ;;
21622esac
21623    OBJC=$ac_ct_OBJC
21624  fi
21625fi
21626
21627# Provide some information about the compiler.
21628$as_echo "$as_me:${as_lineno-$LINENO}: checking for Objective C compiler version" >&5
21629set X $ac_compile
21630ac_compiler=$2
21631for ac_option in --version -v -V -qversion; do
21632  { { ac_try="$ac_compiler $ac_option >&5"
21633case "(($ac_try" in
21634  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21635  *) ac_try_echo=$ac_try;;
21636esac
21637eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
21638$as_echo "$ac_try_echo"; } >&5
21639  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
21640  ac_status=$?
21641  if test -s conftest.err; then
21642    sed '10a\
21643... rest of stderr output deleted ...
21644         10q' conftest.err >conftest.er1
21645    cat conftest.er1 >&5
21646  fi
21647  rm -f conftest.er1 conftest.err
21648  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21649  test $ac_status = 0; }
21650done
21651
21652{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Objective C compiler" >&5
21653$as_echo_n "checking whether we are using the GNU Objective C compiler... " >&6; }
21654if ${ac_cv_objc_compiler_gnu+:} false; then :
21655  $as_echo_n "(cached) " >&6
21656else
21657  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21658/* end confdefs.h.  */
21659
21660int
21661main ()
21662{
21663#ifndef __GNUC__
21664       choke me
21665#endif
21666
21667  ;
21668  return 0;
21669}
21670_ACEOF
21671if ac_fn_objc_try_compile "$LINENO"; then :
21672  ac_compiler_gnu=yes
21673else
21674  ac_compiler_gnu=no
21675fi
21676rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21677ac_cv_objc_compiler_gnu=$ac_compiler_gnu
21678
21679fi
21680{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objc_compiler_gnu" >&5
21681$as_echo "$ac_cv_objc_compiler_gnu" >&6; }
21682if test $ac_compiler_gnu = yes; then
21683  GOBJC=yes
21684else
21685  GOBJC=
21686fi
21687ac_test_OBJCFLAGS=${OBJCFLAGS+set}
21688ac_save_OBJCFLAGS=$OBJCFLAGS
21689{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $OBJC accepts -g" >&5
21690$as_echo_n "checking whether $OBJC accepts -g... " >&6; }
21691if ${ac_cv_prog_objc_g+:} false; then :
21692  $as_echo_n "(cached) " >&6
21693else
21694  ac_save_objc_werror_flag=$ac_objc_werror_flag
21695   ac_objc_werror_flag=yes
21696   ac_cv_prog_objc_g=no
21697   OBJCFLAGS="-g"
21698   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21699/* end confdefs.h.  */
21700
21701int
21702main ()
21703{
21704
21705  ;
21706  return 0;
21707}
21708_ACEOF
21709if ac_fn_objc_try_compile "$LINENO"; then :
21710  ac_cv_prog_objc_g=yes
21711else
21712  OBJCFLAGS=""
21713      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21714/* end confdefs.h.  */
21715
21716int
21717main ()
21718{
21719
21720  ;
21721  return 0;
21722}
21723_ACEOF
21724if ac_fn_objc_try_compile "$LINENO"; then :
21725
21726else
21727  ac_objc_werror_flag=$ac_save_objc_werror_flag
21728	 OBJCFLAGS="-g"
21729	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21730/* end confdefs.h.  */
21731
21732int
21733main ()
21734{
21735
21736  ;
21737  return 0;
21738}
21739_ACEOF
21740if ac_fn_objc_try_compile "$LINENO"; then :
21741  ac_cv_prog_objc_g=yes
21742fi
21743rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21744fi
21745rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21746fi
21747rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21748   ac_objc_werror_flag=$ac_save_objc_werror_flag
21749fi
21750{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_objc_g" >&5
21751$as_echo "$ac_cv_prog_objc_g" >&6; }
21752if test "$ac_test_OBJCFLAGS" = set; then
21753  OBJCFLAGS=$ac_save_OBJCFLAGS
21754elif test $ac_cv_prog_objc_g = yes; then
21755  if test "$GOBJC" = yes; then
21756    OBJCFLAGS="-g -O2"
21757  else
21758    OBJCFLAGS="-g"
21759  fi
21760else
21761  if test "$GOBJC" = yes; then
21762    OBJCFLAGS="-O2"
21763  else
21764    OBJCFLAGS=
21765  fi
21766fi
21767ac_ext=cpp
21768ac_cpp='$CXXCPP $CPPFLAGS'
21769ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21770ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21771ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21772
21773
21774  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21775
21776  # First separate the path from the arguments. This will split at the first
21777  # space.
21778  complete="$OBJC"
21779  path="${complete%% *}"
21780  tmp="$complete EOL"
21781  arguments="${tmp#* }"
21782
21783  # Input might be given as Windows format, start by converting to
21784  # unix format.
21785  new_path=`$CYGPATH -u "$path"`
21786
21787  # Now try to locate executable using which
21788  new_path=`$WHICH "$new_path" 2> /dev/null`
21789  # bat and cmd files are not always considered executable in cygwin causing which
21790  # to not find them
21791  if test "x$new_path" = x \
21792           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21793           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21794    new_path=`$CYGPATH -u "$path"`
21795  fi
21796  if test "x$new_path" = x; then
21797    # Oops. Which didn't find the executable.
21798    # The splitting of arguments from the executable at a space might have been incorrect,
21799    # since paths with space are more likely in Windows. Give it another try with the whole
21800    # argument.
21801    path="$complete"
21802    arguments="EOL"
21803    new_path=`$CYGPATH -u "$path"`
21804    new_path=`$WHICH "$new_path" 2> /dev/null`
21805    # bat and cmd files are not always considered executable in cygwin causing which
21806    # to not find them
21807    if test "x$new_path" = x \
21808             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21809             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21810      new_path=`$CYGPATH -u "$path"`
21811    fi
21812    if test "x$new_path" = x; then
21813      # It's still not found. Now this is an unrecoverable error.
21814      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
21815$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
21816      has_space=`$ECHO "$complete" | $GREP " "`
21817      if test "x$has_space" != x; then
21818        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21819$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21820      fi
21821      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
21822    fi
21823  fi
21824
21825  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21826  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21827  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21828  # "foo.exe" is OK but "foo" is an error.
21829  #
21830  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21831  # It is also a way to make sure we got the proper file name for the real test later on.
21832  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21833  if test "x$test_shortpath" = x; then
21834    # Short path failed, file does not exist as specified.
21835    # Try adding .exe or .cmd
21836    if test -f "${new_path}.exe"; then
21837       input_to_shortpath="${new_path}.exe"
21838    elif test -f "${new_path}.cmd"; then
21839       input_to_shortpath="${new_path}.cmd"
21840    else
21841      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$new_path\", is invalid." >&5
21842$as_echo "$as_me: The path of OBJC, which resolves as \"$new_path\", is invalid." >&6;}
21843      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21844$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21845      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
21846    fi
21847  else
21848    input_to_shortpath="$new_path"
21849  fi
21850
21851  # Call helper function which possibly converts this using DOS-style short mode.
21852  # If so, the updated path is stored in $new_path.
21853  new_path="$input_to_shortpath"
21854
21855  input_path="$input_to_shortpath"
21856  # Check if we need to convert this using DOS-style short mode. If the path
21857  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21858  # take no chances and rewrite it.
21859  # Note: m4 eats our [], so we need to use [ and ] instead.
21860  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21861  if test "x$has_forbidden_chars" != x; then
21862    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21863    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21864    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21865    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21866      # Going to short mode and back again did indeed matter. Since short mode is
21867      # case insensitive, let's make it lowercase to improve readability.
21868      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21869      # Now convert it back to Unix-stile (cygpath)
21870      input_path=`$CYGPATH -u "$shortmode_path"`
21871      new_path="$input_path"
21872    fi
21873  fi
21874
21875  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21876  if test "x$test_cygdrive_prefix" = x; then
21877    # As a simple fix, exclude /usr/bin since it's not a real path.
21878    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21879      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21880      # a path prefixed by /cygdrive for fixpath to work.
21881      new_path="$CYGWIN_ROOT_PATH$input_path"
21882    fi
21883  fi
21884
21885  # remove trailing .exe if any
21886  new_path="${new_path/%.exe/}"
21887
21888  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21889
21890  # First separate the path from the arguments. This will split at the first
21891  # space.
21892  complete="$OBJC"
21893  path="${complete%% *}"
21894  tmp="$complete EOL"
21895  arguments="${tmp#* }"
21896
21897  # Input might be given as Windows format, start by converting to
21898  # unix format.
21899  new_path="$path"
21900
21901  windows_path="$new_path"
21902  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21903    unix_path=`$CYGPATH -u "$windows_path"`
21904    new_path="$unix_path"
21905  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21906    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21907    new_path="$unix_path"
21908  fi
21909
21910
21911  # Now try to locate executable using which
21912  new_path=`$WHICH "$new_path" 2> /dev/null`
21913
21914  if test "x$new_path" = x; then
21915    # Oops. Which didn't find the executable.
21916    # The splitting of arguments from the executable at a space might have been incorrect,
21917    # since paths with space are more likely in Windows. Give it another try with the whole
21918    # argument.
21919    path="$complete"
21920    arguments="EOL"
21921    new_path="$path"
21922
21923  windows_path="$new_path"
21924  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21925    unix_path=`$CYGPATH -u "$windows_path"`
21926    new_path="$unix_path"
21927  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21928    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21929    new_path="$unix_path"
21930  fi
21931
21932
21933    new_path=`$WHICH "$new_path" 2> /dev/null`
21934
21935    if test "x$new_path" = x; then
21936      # It's still not found. Now this is an unrecoverable error.
21937      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
21938$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
21939      has_space=`$ECHO "$complete" | $GREP " "`
21940      if test "x$has_space" != x; then
21941        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21942$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21943      fi
21944      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
21945    fi
21946  fi
21947
21948  # Now new_path has a complete unix path to the binary
21949  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21950    # Keep paths in /bin as-is, but remove trailing .exe if any
21951    new_path="${new_path/%.exe/}"
21952    # Do not save /bin paths to all_fixpath_prefixes!
21953  else
21954    # Not in mixed or Windows style, start by that.
21955    new_path=`cmd //c echo $new_path`
21956
21957  input_path="$new_path"
21958  # Check if we need to convert this using DOS-style short mode. If the path
21959  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21960  # take no chances and rewrite it.
21961  # Note: m4 eats our [], so we need to use [ and ] instead.
21962  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21963  if test "x$has_forbidden_chars" != x; then
21964    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21965    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21966  fi
21967
21968    # Output is in $new_path
21969
21970  windows_path="$new_path"
21971  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21972    unix_path=`$CYGPATH -u "$windows_path"`
21973    new_path="$unix_path"
21974  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21975    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21976    new_path="$unix_path"
21977  fi
21978
21979    # remove trailing .exe if any
21980    new_path="${new_path/%.exe/}"
21981
21982    # Save the first 10 bytes of this path to the storage, so fixpath can work.
21983    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21984  fi
21985
21986  else
21987    # We're on a posix platform. Hooray! :)
21988    # First separate the path from the arguments. This will split at the first
21989    # space.
21990    complete="$OBJC"
21991    path="${complete%% *}"
21992    tmp="$complete EOL"
21993    arguments="${tmp#* }"
21994
21995    # Cannot rely on the command "which" here since it doesn't always work.
21996    is_absolute_path=`$ECHO "$path" | $GREP ^/`
21997    if test -z "$is_absolute_path"; then
21998      # Path to executable is not absolute. Find it.
21999      IFS_save="$IFS"
22000      IFS=:
22001      for p in $PATH; do
22002        if test -f "$p/$path" && test -x "$p/$path"; then
22003          new_path="$p/$path"
22004          break
22005        fi
22006      done
22007      IFS="$IFS_save"
22008    else
22009      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJC (as $path) failed, using $path directly." >&5
22010$as_echo "$as_me: Resolving OBJC (as $path) failed, using $path directly." >&6;}
22011      new_path="$path"
22012    fi
22013
22014    if test "x$new_path" = x; then
22015        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
22016$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
22017        has_space=`$ECHO "$complete" | $GREP " "`
22018        if test "x$has_space" != x; then
22019          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22020$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22021        fi
22022        as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
22023      fi
22024  fi
22025
22026      # Now join together the path and the arguments once again
22027      if test "x$arguments" != xEOL; then
22028        new_complete="$new_path ${arguments% *}"
22029      else
22030        new_complete="$new_path"
22031      fi
22032
22033  if test "x$complete" != "x$new_complete"; then
22034      OBJC="$new_complete"
22035      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJC to \"$new_complete\"" >&5
22036$as_echo "$as_me: Rewriting OBJC to \"$new_complete\"" >&6;}
22037    fi
22038
22039else
22040    OBJC=
22041fi
22042
22043# Restore the flags to the user specified values.
22044# This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
22045CFLAGS="$ORG_CFLAGS"
22046CXXFLAGS="$ORG_CXXFLAGS"
22047OBJCFLAGS="$ORG_OBJCFLAGS"
22048
22049LD="$CC"
22050LDEXE="$CC"
22051LDCXX="$CXX"
22052LDEXECXX="$CXX"
22053
22054# LDEXE is the linker to use, when creating executables.
22055
22056# Linking C++ libraries.
22057
22058# Linking C++ executables.
22059
22060
22061if test "x$OPENJDK_TARGET_OS" != xwindows; then
22062    if test -n "$ac_tool_prefix"; then
22063  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
22064set dummy ${ac_tool_prefix}ar; ac_word=$2
22065{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22066$as_echo_n "checking for $ac_word... " >&6; }
22067if ${ac_cv_prog_AR+:} false; then :
22068  $as_echo_n "(cached) " >&6
22069else
22070  if test -n "$AR"; then
22071  ac_cv_prog_AR="$AR" # Let the user override the test.
22072else
22073as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22074for as_dir in $PATH
22075do
22076  IFS=$as_save_IFS
22077  test -z "$as_dir" && as_dir=.
22078    for ac_exec_ext in '' $ac_executable_extensions; do
22079  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22080    ac_cv_prog_AR="${ac_tool_prefix}ar"
22081    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22082    break 2
22083  fi
22084done
22085  done
22086IFS=$as_save_IFS
22087
22088fi
22089fi
22090AR=$ac_cv_prog_AR
22091if test -n "$AR"; then
22092  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
22093$as_echo "$AR" >&6; }
22094else
22095  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22096$as_echo "no" >&6; }
22097fi
22098
22099
22100fi
22101if test -z "$ac_cv_prog_AR"; then
22102  ac_ct_AR=$AR
22103  # Extract the first word of "ar", so it can be a program name with args.
22104set dummy ar; ac_word=$2
22105{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22106$as_echo_n "checking for $ac_word... " >&6; }
22107if ${ac_cv_prog_ac_ct_AR+:} false; then :
22108  $as_echo_n "(cached) " >&6
22109else
22110  if test -n "$ac_ct_AR"; then
22111  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
22112else
22113as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22114for as_dir in $PATH
22115do
22116  IFS=$as_save_IFS
22117  test -z "$as_dir" && as_dir=.
22118    for ac_exec_ext in '' $ac_executable_extensions; do
22119  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22120    ac_cv_prog_ac_ct_AR="ar"
22121    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22122    break 2
22123  fi
22124done
22125  done
22126IFS=$as_save_IFS
22127
22128fi
22129fi
22130ac_ct_AR=$ac_cv_prog_ac_ct_AR
22131if test -n "$ac_ct_AR"; then
22132  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
22133$as_echo "$ac_ct_AR" >&6; }
22134else
22135  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22136$as_echo "no" >&6; }
22137fi
22138
22139  if test "x$ac_ct_AR" = x; then
22140    AR=""
22141  else
22142    case $cross_compiling:$ac_tool_warned in
22143yes:)
22144{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
22145$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
22146ac_tool_warned=yes ;;
22147esac
22148    AR=$ac_ct_AR
22149  fi
22150else
22151  AR="$ac_cv_prog_AR"
22152fi
22153
22154
22155  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22156
22157  # First separate the path from the arguments. This will split at the first
22158  # space.
22159  complete="$AR"
22160  path="${complete%% *}"
22161  tmp="$complete EOL"
22162  arguments="${tmp#* }"
22163
22164  # Input might be given as Windows format, start by converting to
22165  # unix format.
22166  new_path=`$CYGPATH -u "$path"`
22167
22168  # Now try to locate executable using which
22169  new_path=`$WHICH "$new_path" 2> /dev/null`
22170  # bat and cmd files are not always considered executable in cygwin causing which
22171  # to not find them
22172  if test "x$new_path" = x \
22173           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22174           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22175    new_path=`$CYGPATH -u "$path"`
22176  fi
22177  if test "x$new_path" = x; then
22178    # Oops. Which didn't find the executable.
22179    # The splitting of arguments from the executable at a space might have been incorrect,
22180    # since paths with space are more likely in Windows. Give it another try with the whole
22181    # argument.
22182    path="$complete"
22183    arguments="EOL"
22184    new_path=`$CYGPATH -u "$path"`
22185    new_path=`$WHICH "$new_path" 2> /dev/null`
22186    # bat and cmd files are not always considered executable in cygwin causing which
22187    # to not find them
22188    if test "x$new_path" = x \
22189             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22190             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22191      new_path=`$CYGPATH -u "$path"`
22192    fi
22193    if test "x$new_path" = x; then
22194      # It's still not found. Now this is an unrecoverable error.
22195      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
22196$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
22197      has_space=`$ECHO "$complete" | $GREP " "`
22198      if test "x$has_space" != x; then
22199        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22200$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22201      fi
22202      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22203    fi
22204  fi
22205
22206  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22207  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22208  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22209  # "foo.exe" is OK but "foo" is an error.
22210  #
22211  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22212  # It is also a way to make sure we got the proper file name for the real test later on.
22213  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22214  if test "x$test_shortpath" = x; then
22215    # Short path failed, file does not exist as specified.
22216    # Try adding .exe or .cmd
22217    if test -f "${new_path}.exe"; then
22218       input_to_shortpath="${new_path}.exe"
22219    elif test -f "${new_path}.cmd"; then
22220       input_to_shortpath="${new_path}.cmd"
22221    else
22222      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
22223$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
22224      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22225$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22226      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22227    fi
22228  else
22229    input_to_shortpath="$new_path"
22230  fi
22231
22232  # Call helper function which possibly converts this using DOS-style short mode.
22233  # If so, the updated path is stored in $new_path.
22234  new_path="$input_to_shortpath"
22235
22236  input_path="$input_to_shortpath"
22237  # Check if we need to convert this using DOS-style short mode. If the path
22238  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22239  # take no chances and rewrite it.
22240  # Note: m4 eats our [], so we need to use [ and ] instead.
22241  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22242  if test "x$has_forbidden_chars" != x; then
22243    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22244    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22245    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22246    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22247      # Going to short mode and back again did indeed matter. Since short mode is
22248      # case insensitive, let's make it lowercase to improve readability.
22249      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22250      # Now convert it back to Unix-stile (cygpath)
22251      input_path=`$CYGPATH -u "$shortmode_path"`
22252      new_path="$input_path"
22253    fi
22254  fi
22255
22256  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22257  if test "x$test_cygdrive_prefix" = x; then
22258    # As a simple fix, exclude /usr/bin since it's not a real path.
22259    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22260      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22261      # a path prefixed by /cygdrive for fixpath to work.
22262      new_path="$CYGWIN_ROOT_PATH$input_path"
22263    fi
22264  fi
22265
22266  # remove trailing .exe if any
22267  new_path="${new_path/%.exe/}"
22268
22269  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22270
22271  # First separate the path from the arguments. This will split at the first
22272  # space.
22273  complete="$AR"
22274  path="${complete%% *}"
22275  tmp="$complete EOL"
22276  arguments="${tmp#* }"
22277
22278  # Input might be given as Windows format, start by converting to
22279  # unix format.
22280  new_path="$path"
22281
22282  windows_path="$new_path"
22283  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22284    unix_path=`$CYGPATH -u "$windows_path"`
22285    new_path="$unix_path"
22286  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22287    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22288    new_path="$unix_path"
22289  fi
22290
22291
22292  # Now try to locate executable using which
22293  new_path=`$WHICH "$new_path" 2> /dev/null`
22294
22295  if test "x$new_path" = x; then
22296    # Oops. Which didn't find the executable.
22297    # The splitting of arguments from the executable at a space might have been incorrect,
22298    # since paths with space are more likely in Windows. Give it another try with the whole
22299    # argument.
22300    path="$complete"
22301    arguments="EOL"
22302    new_path="$path"
22303
22304  windows_path="$new_path"
22305  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22306    unix_path=`$CYGPATH -u "$windows_path"`
22307    new_path="$unix_path"
22308  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22309    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22310    new_path="$unix_path"
22311  fi
22312
22313
22314    new_path=`$WHICH "$new_path" 2> /dev/null`
22315
22316    if test "x$new_path" = x; then
22317      # It's still not found. Now this is an unrecoverable error.
22318      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
22319$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
22320      has_space=`$ECHO "$complete" | $GREP " "`
22321      if test "x$has_space" != x; then
22322        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22323$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22324      fi
22325      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22326    fi
22327  fi
22328
22329  # Now new_path has a complete unix path to the binary
22330  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22331    # Keep paths in /bin as-is, but remove trailing .exe if any
22332    new_path="${new_path/%.exe/}"
22333    # Do not save /bin paths to all_fixpath_prefixes!
22334  else
22335    # Not in mixed or Windows style, start by that.
22336    new_path=`cmd //c echo $new_path`
22337
22338  input_path="$new_path"
22339  # Check if we need to convert this using DOS-style short mode. If the path
22340  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22341  # take no chances and rewrite it.
22342  # Note: m4 eats our [], so we need to use [ and ] instead.
22343  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22344  if test "x$has_forbidden_chars" != x; then
22345    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22346    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22347  fi
22348
22349    # Output is in $new_path
22350
22351  windows_path="$new_path"
22352  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22353    unix_path=`$CYGPATH -u "$windows_path"`
22354    new_path="$unix_path"
22355  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22356    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22357    new_path="$unix_path"
22358  fi
22359
22360    # remove trailing .exe if any
22361    new_path="${new_path/%.exe/}"
22362
22363    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22364    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22365  fi
22366
22367  else
22368    # We're on a posix platform. Hooray! :)
22369    # First separate the path from the arguments. This will split at the first
22370    # space.
22371    complete="$AR"
22372    path="${complete%% *}"
22373    tmp="$complete EOL"
22374    arguments="${tmp#* }"
22375
22376    # Cannot rely on the command "which" here since it doesn't always work.
22377    is_absolute_path=`$ECHO "$path" | $GREP ^/`
22378    if test -z "$is_absolute_path"; then
22379      # Path to executable is not absolute. Find it.
22380      IFS_save="$IFS"
22381      IFS=:
22382      for p in $PATH; do
22383        if test -f "$p/$path" && test -x "$p/$path"; then
22384          new_path="$p/$path"
22385          break
22386        fi
22387      done
22388      IFS="$IFS_save"
22389    else
22390      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AR (as $path) failed, using $path directly." >&5
22391$as_echo "$as_me: Resolving AR (as $path) failed, using $path directly." >&6;}
22392      new_path="$path"
22393    fi
22394
22395    if test "x$new_path" = x; then
22396        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
22397$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
22398        has_space=`$ECHO "$complete" | $GREP " "`
22399        if test "x$has_space" != x; then
22400          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22401$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22402        fi
22403        as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22404      fi
22405  fi
22406
22407      # Now join together the path and the arguments once again
22408      if test "x$arguments" != xEOL; then
22409        new_complete="$new_path ${arguments% *}"
22410      else
22411        new_complete="$new_path"
22412      fi
22413
22414  if test "x$complete" != "x$new_complete"; then
22415      AR="$new_complete"
22416      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
22417$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
22418    fi
22419
22420fi
22421if test "x$OPENJDK_TARGET_OS" = xmacosx; then
22422    ARFLAGS="-r"
22423else
22424    ARFLAGS=""
22425fi
22426
22427
22428# For hotspot, we need these in Windows mixed path; other platforms keep them the same
22429HOTSPOT_CXX="$CXX"
22430HOTSPOT_LD="$LD"
22431
22432
22433
22434COMPILER_NAME=gcc
22435COMPILER_TYPE=CC
22436if test "x$OPENJDK_TARGET_OS" = xwindows; then :
22437
22438    # For now, assume that we are always compiling using cl.exe.
22439    CC_OUT_OPTION=-Fo
22440    EXE_OUT_OPTION=-out:
22441    LD_OUT_OPTION=-out:
22442    AR_OUT_OPTION=-out:
22443    # On Windows, reject /usr/bin/link (as determined in CYGWIN_LINK), which is a cygwin
22444    # program for something completely different.
22445    # Extract the first word of "link", so it can be a program name with args.
22446set dummy link; ac_word=$2
22447{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22448$as_echo_n "checking for $ac_word... " >&6; }
22449if ${ac_cv_prog_WINLD+:} false; then :
22450  $as_echo_n "(cached) " >&6
22451else
22452  if test -n "$WINLD"; then
22453  ac_cv_prog_WINLD="$WINLD" # Let the user override the test.
22454else
22455  ac_prog_rejected=no
22456as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22457for as_dir in $PATH
22458do
22459  IFS=$as_save_IFS
22460  test -z "$as_dir" && as_dir=.
22461    for ac_exec_ext in '' $ac_executable_extensions; do
22462  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22463    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
22464       ac_prog_rejected=yes
22465       continue
22466     fi
22467    ac_cv_prog_WINLD="link"
22468    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22469    break 2
22470  fi
22471done
22472  done
22473IFS=$as_save_IFS
22474
22475if test $ac_prog_rejected = yes; then
22476  # We found a bogon in the path, so make sure we never use it.
22477  set dummy $ac_cv_prog_WINLD
22478  shift
22479  if test $# != 0; then
22480    # We chose a different compiler from the bogus one.
22481    # However, it has the same basename, so the bogon will be chosen
22482    # first if we set WINLD to just the basename; use the full file name.
22483    shift
22484    ac_cv_prog_WINLD="$as_dir/$ac_word${1+' '}$@"
22485  fi
22486fi
22487fi
22488fi
22489WINLD=$ac_cv_prog_WINLD
22490if test -n "$WINLD"; then
22491  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINLD" >&5
22492$as_echo "$WINLD" >&6; }
22493else
22494  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22495$as_echo "no" >&6; }
22496fi
22497
22498
22499    # Since we must ignore the first found link, WINLD will contain
22500    # the full path to the link.exe program.
22501
22502  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22503
22504  # First separate the path from the arguments. This will split at the first
22505  # space.
22506  complete="$WINLD"
22507  path="${complete%% *}"
22508  tmp="$complete EOL"
22509  arguments="${tmp#* }"
22510
22511  # Input might be given as Windows format, start by converting to
22512  # unix format.
22513  new_path=`$CYGPATH -u "$path"`
22514
22515  # Now try to locate executable using which
22516  new_path=`$WHICH "$new_path" 2> /dev/null`
22517  # bat and cmd files are not always considered executable in cygwin causing which
22518  # to not find them
22519  if test "x$new_path" = x \
22520           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22521           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22522    new_path=`$CYGPATH -u "$path"`
22523  fi
22524  if test "x$new_path" = x; then
22525    # Oops. Which didn't find the executable.
22526    # The splitting of arguments from the executable at a space might have been incorrect,
22527    # since paths with space are more likely in Windows. Give it another try with the whole
22528    # argument.
22529    path="$complete"
22530    arguments="EOL"
22531    new_path=`$CYGPATH -u "$path"`
22532    new_path=`$WHICH "$new_path" 2> /dev/null`
22533    # bat and cmd files are not always considered executable in cygwin causing which
22534    # to not find them
22535    if test "x$new_path" = x \
22536             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22537             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22538      new_path=`$CYGPATH -u "$path"`
22539    fi
22540    if test "x$new_path" = x; then
22541      # It's still not found. Now this is an unrecoverable error.
22542      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
22543$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
22544      has_space=`$ECHO "$complete" | $GREP " "`
22545      if test "x$has_space" != x; then
22546        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22547$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22548      fi
22549      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22550    fi
22551  fi
22552
22553  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22554  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22555  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22556  # "foo.exe" is OK but "foo" is an error.
22557  #
22558  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22559  # It is also a way to make sure we got the proper file name for the real test later on.
22560  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22561  if test "x$test_shortpath" = x; then
22562    # Short path failed, file does not exist as specified.
22563    # Try adding .exe or .cmd
22564    if test -f "${new_path}.exe"; then
22565       input_to_shortpath="${new_path}.exe"
22566    elif test -f "${new_path}.cmd"; then
22567       input_to_shortpath="${new_path}.cmd"
22568    else
22569      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$new_path\", is invalid." >&5
22570$as_echo "$as_me: The path of WINLD, which resolves as \"$new_path\", is invalid." >&6;}
22571      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22572$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22573      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22574    fi
22575  else
22576    input_to_shortpath="$new_path"
22577  fi
22578
22579  # Call helper function which possibly converts this using DOS-style short mode.
22580  # If so, the updated path is stored in $new_path.
22581  new_path="$input_to_shortpath"
22582
22583  input_path="$input_to_shortpath"
22584  # Check if we need to convert this using DOS-style short mode. If the path
22585  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22586  # take no chances and rewrite it.
22587  # Note: m4 eats our [], so we need to use [ and ] instead.
22588  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22589  if test "x$has_forbidden_chars" != x; then
22590    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22591    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22592    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22593    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22594      # Going to short mode and back again did indeed matter. Since short mode is
22595      # case insensitive, let's make it lowercase to improve readability.
22596      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22597      # Now convert it back to Unix-stile (cygpath)
22598      input_path=`$CYGPATH -u "$shortmode_path"`
22599      new_path="$input_path"
22600    fi
22601  fi
22602
22603  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22604  if test "x$test_cygdrive_prefix" = x; then
22605    # As a simple fix, exclude /usr/bin since it's not a real path.
22606    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22607      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22608      # a path prefixed by /cygdrive for fixpath to work.
22609      new_path="$CYGWIN_ROOT_PATH$input_path"
22610    fi
22611  fi
22612
22613  # remove trailing .exe if any
22614  new_path="${new_path/%.exe/}"
22615
22616  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22617
22618  # First separate the path from the arguments. This will split at the first
22619  # space.
22620  complete="$WINLD"
22621  path="${complete%% *}"
22622  tmp="$complete EOL"
22623  arguments="${tmp#* }"
22624
22625  # Input might be given as Windows format, start by converting to
22626  # unix format.
22627  new_path="$path"
22628
22629  windows_path="$new_path"
22630  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22631    unix_path=`$CYGPATH -u "$windows_path"`
22632    new_path="$unix_path"
22633  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22634    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22635    new_path="$unix_path"
22636  fi
22637
22638
22639  # Now try to locate executable using which
22640  new_path=`$WHICH "$new_path" 2> /dev/null`
22641
22642  if test "x$new_path" = x; then
22643    # Oops. Which didn't find the executable.
22644    # The splitting of arguments from the executable at a space might have been incorrect,
22645    # since paths with space are more likely in Windows. Give it another try with the whole
22646    # argument.
22647    path="$complete"
22648    arguments="EOL"
22649    new_path="$path"
22650
22651  windows_path="$new_path"
22652  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22653    unix_path=`$CYGPATH -u "$windows_path"`
22654    new_path="$unix_path"
22655  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22656    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22657    new_path="$unix_path"
22658  fi
22659
22660
22661    new_path=`$WHICH "$new_path" 2> /dev/null`
22662
22663    if test "x$new_path" = x; then
22664      # It's still not found. Now this is an unrecoverable error.
22665      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
22666$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
22667      has_space=`$ECHO "$complete" | $GREP " "`
22668      if test "x$has_space" != x; then
22669        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22670$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22671      fi
22672      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22673    fi
22674  fi
22675
22676  # Now new_path has a complete unix path to the binary
22677  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22678    # Keep paths in /bin as-is, but remove trailing .exe if any
22679    new_path="${new_path/%.exe/}"
22680    # Do not save /bin paths to all_fixpath_prefixes!
22681  else
22682    # Not in mixed or Windows style, start by that.
22683    new_path=`cmd //c echo $new_path`
22684
22685  input_path="$new_path"
22686  # Check if we need to convert this using DOS-style short mode. If the path
22687  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22688  # take no chances and rewrite it.
22689  # Note: m4 eats our [], so we need to use [ and ] instead.
22690  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22691  if test "x$has_forbidden_chars" != x; then
22692    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22693    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22694  fi
22695
22696    # Output is in $new_path
22697
22698  windows_path="$new_path"
22699  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22700    unix_path=`$CYGPATH -u "$windows_path"`
22701    new_path="$unix_path"
22702  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22703    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22704    new_path="$unix_path"
22705  fi
22706
22707    # remove trailing .exe if any
22708    new_path="${new_path/%.exe/}"
22709
22710    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22711    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22712  fi
22713
22714  else
22715    # We're on a posix platform. Hooray! :)
22716    # First separate the path from the arguments. This will split at the first
22717    # space.
22718    complete="$WINLD"
22719    path="${complete%% *}"
22720    tmp="$complete EOL"
22721    arguments="${tmp#* }"
22722
22723    # Cannot rely on the command "which" here since it doesn't always work.
22724    is_absolute_path=`$ECHO "$path" | $GREP ^/`
22725    if test -z "$is_absolute_path"; then
22726      # Path to executable is not absolute. Find it.
22727      IFS_save="$IFS"
22728      IFS=:
22729      for p in $PATH; do
22730        if test -f "$p/$path" && test -x "$p/$path"; then
22731          new_path="$p/$path"
22732          break
22733        fi
22734      done
22735      IFS="$IFS_save"
22736    else
22737      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINLD (as $path) failed, using $path directly." >&5
22738$as_echo "$as_me: Resolving WINLD (as $path) failed, using $path directly." >&6;}
22739      new_path="$path"
22740    fi
22741
22742    if test "x$new_path" = x; then
22743        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
22744$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
22745        has_space=`$ECHO "$complete" | $GREP " "`
22746        if test "x$has_space" != x; then
22747          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22748$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22749        fi
22750        as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22751      fi
22752  fi
22753
22754      # Now join together the path and the arguments once again
22755      if test "x$arguments" != xEOL; then
22756        new_complete="$new_path ${arguments% *}"
22757      else
22758        new_complete="$new_path"
22759      fi
22760
22761  if test "x$complete" != "x$new_complete"; then
22762      WINLD="$new_complete"
22763      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINLD to \"$new_complete\"" >&5
22764$as_echo "$as_me: Rewriting WINLD to \"$new_complete\"" >&6;}
22765    fi
22766
22767    printf "Windows linker was found at $WINLD\n"
22768    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
22769$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
22770    "$WINLD" --version > /dev/null
22771    if test $? -eq 0 ; then
22772      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22773$as_echo "no" >&6; }
22774      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
22775    else
22776      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
22777$as_echo "yes" >&6; }
22778    fi
22779    LD="$WINLD"
22780    LDEXE="$WINLD"
22781    LDCXX="$WINLD"
22782    LDEXECXX="$WINLD"
22783
22784    # Extract the first word of "mt", so it can be a program name with args.
22785set dummy mt; ac_word=$2
22786{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22787$as_echo_n "checking for $ac_word... " >&6; }
22788if ${ac_cv_prog_MT+:} false; then :
22789  $as_echo_n "(cached) " >&6
22790else
22791  if test -n "$MT"; then
22792  ac_cv_prog_MT="$MT" # Let the user override the test.
22793else
22794  ac_prog_rejected=no
22795as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22796for as_dir in $PATH
22797do
22798  IFS=$as_save_IFS
22799  test -z "$as_dir" && as_dir=.
22800    for ac_exec_ext in '' $ac_executable_extensions; do
22801  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22802    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
22803       ac_prog_rejected=yes
22804       continue
22805     fi
22806    ac_cv_prog_MT="mt"
22807    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22808    break 2
22809  fi
22810done
22811  done
22812IFS=$as_save_IFS
22813
22814if test $ac_prog_rejected = yes; then
22815  # We found a bogon in the path, so make sure we never use it.
22816  set dummy $ac_cv_prog_MT
22817  shift
22818  if test $# != 0; then
22819    # We chose a different compiler from the bogus one.
22820    # However, it has the same basename, so the bogon will be chosen
22821    # first if we set MT to just the basename; use the full file name.
22822    shift
22823    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
22824  fi
22825fi
22826fi
22827fi
22828MT=$ac_cv_prog_MT
22829if test -n "$MT"; then
22830  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
22831$as_echo "$MT" >&6; }
22832else
22833  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22834$as_echo "no" >&6; }
22835fi
22836
22837
22838
22839  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22840
22841  # First separate the path from the arguments. This will split at the first
22842  # space.
22843  complete="$MT"
22844  path="${complete%% *}"
22845  tmp="$complete EOL"
22846  arguments="${tmp#* }"
22847
22848  # Input might be given as Windows format, start by converting to
22849  # unix format.
22850  new_path=`$CYGPATH -u "$path"`
22851
22852  # Now try to locate executable using which
22853  new_path=`$WHICH "$new_path" 2> /dev/null`
22854  # bat and cmd files are not always considered executable in cygwin causing which
22855  # to not find them
22856  if test "x$new_path" = x \
22857           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22858           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22859    new_path=`$CYGPATH -u "$path"`
22860  fi
22861  if test "x$new_path" = x; then
22862    # Oops. Which didn't find the executable.
22863    # The splitting of arguments from the executable at a space might have been incorrect,
22864    # since paths with space are more likely in Windows. Give it another try with the whole
22865    # argument.
22866    path="$complete"
22867    arguments="EOL"
22868    new_path=`$CYGPATH -u "$path"`
22869    new_path=`$WHICH "$new_path" 2> /dev/null`
22870    # bat and cmd files are not always considered executable in cygwin causing which
22871    # to not find them
22872    if test "x$new_path" = x \
22873             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22874             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22875      new_path=`$CYGPATH -u "$path"`
22876    fi
22877    if test "x$new_path" = x; then
22878      # It's still not found. Now this is an unrecoverable error.
22879      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
22880$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
22881      has_space=`$ECHO "$complete" | $GREP " "`
22882      if test "x$has_space" != x; then
22883        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22884$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22885      fi
22886      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
22887    fi
22888  fi
22889
22890  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22891  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22892  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22893  # "foo.exe" is OK but "foo" is an error.
22894  #
22895  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22896  # It is also a way to make sure we got the proper file name for the real test later on.
22897  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22898  if test "x$test_shortpath" = x; then
22899    # Short path failed, file does not exist as specified.
22900    # Try adding .exe or .cmd
22901    if test -f "${new_path}.exe"; then
22902       input_to_shortpath="${new_path}.exe"
22903    elif test -f "${new_path}.cmd"; then
22904       input_to_shortpath="${new_path}.cmd"
22905    else
22906      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
22907$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
22908      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22909$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22910      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
22911    fi
22912  else
22913    input_to_shortpath="$new_path"
22914  fi
22915
22916  # Call helper function which possibly converts this using DOS-style short mode.
22917  # If so, the updated path is stored in $new_path.
22918  new_path="$input_to_shortpath"
22919
22920  input_path="$input_to_shortpath"
22921  # Check if we need to convert this using DOS-style short mode. If the path
22922  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22923  # take no chances and rewrite it.
22924  # Note: m4 eats our [], so we need to use [ and ] instead.
22925  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22926  if test "x$has_forbidden_chars" != x; then
22927    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22928    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22929    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22930    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22931      # Going to short mode and back again did indeed matter. Since short mode is
22932      # case insensitive, let's make it lowercase to improve readability.
22933      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22934      # Now convert it back to Unix-stile (cygpath)
22935      input_path=`$CYGPATH -u "$shortmode_path"`
22936      new_path="$input_path"
22937    fi
22938  fi
22939
22940  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22941  if test "x$test_cygdrive_prefix" = x; then
22942    # As a simple fix, exclude /usr/bin since it's not a real path.
22943    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22944      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22945      # a path prefixed by /cygdrive for fixpath to work.
22946      new_path="$CYGWIN_ROOT_PATH$input_path"
22947    fi
22948  fi
22949
22950  # remove trailing .exe if any
22951  new_path="${new_path/%.exe/}"
22952
22953  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22954
22955  # First separate the path from the arguments. This will split at the first
22956  # space.
22957  complete="$MT"
22958  path="${complete%% *}"
22959  tmp="$complete EOL"
22960  arguments="${tmp#* }"
22961
22962  # Input might be given as Windows format, start by converting to
22963  # unix format.
22964  new_path="$path"
22965
22966  windows_path="$new_path"
22967  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22968    unix_path=`$CYGPATH -u "$windows_path"`
22969    new_path="$unix_path"
22970  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22971    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22972    new_path="$unix_path"
22973  fi
22974
22975
22976  # Now try to locate executable using which
22977  new_path=`$WHICH "$new_path" 2> /dev/null`
22978
22979  if test "x$new_path" = x; then
22980    # Oops. Which didn't find the executable.
22981    # The splitting of arguments from the executable at a space might have been incorrect,
22982    # since paths with space are more likely in Windows. Give it another try with the whole
22983    # argument.
22984    path="$complete"
22985    arguments="EOL"
22986    new_path="$path"
22987
22988  windows_path="$new_path"
22989  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22990    unix_path=`$CYGPATH -u "$windows_path"`
22991    new_path="$unix_path"
22992  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22993    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22994    new_path="$unix_path"
22995  fi
22996
22997
22998    new_path=`$WHICH "$new_path" 2> /dev/null`
22999
23000    if test "x$new_path" = x; then
23001      # It's still not found. Now this is an unrecoverable error.
23002      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
23003$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
23004      has_space=`$ECHO "$complete" | $GREP " "`
23005      if test "x$has_space" != x; then
23006        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23007$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23008      fi
23009      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
23010    fi
23011  fi
23012
23013  # Now new_path has a complete unix path to the binary
23014  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23015    # Keep paths in /bin as-is, but remove trailing .exe if any
23016    new_path="${new_path/%.exe/}"
23017    # Do not save /bin paths to all_fixpath_prefixes!
23018  else
23019    # Not in mixed or Windows style, start by that.
23020    new_path=`cmd //c echo $new_path`
23021
23022  input_path="$new_path"
23023  # Check if we need to convert this using DOS-style short mode. If the path
23024  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23025  # take no chances and rewrite it.
23026  # Note: m4 eats our [], so we need to use [ and ] instead.
23027  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23028  if test "x$has_forbidden_chars" != x; then
23029    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23030    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23031  fi
23032
23033    # Output is in $new_path
23034
23035  windows_path="$new_path"
23036  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23037    unix_path=`$CYGPATH -u "$windows_path"`
23038    new_path="$unix_path"
23039  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23040    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23041    new_path="$unix_path"
23042  fi
23043
23044    # remove trailing .exe if any
23045    new_path="${new_path/%.exe/}"
23046
23047    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23048    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23049  fi
23050
23051  else
23052    # We're on a posix platform. Hooray! :)
23053    # First separate the path from the arguments. This will split at the first
23054    # space.
23055    complete="$MT"
23056    path="${complete%% *}"
23057    tmp="$complete EOL"
23058    arguments="${tmp#* }"
23059
23060    # Cannot rely on the command "which" here since it doesn't always work.
23061    is_absolute_path=`$ECHO "$path" | $GREP ^/`
23062    if test -z "$is_absolute_path"; then
23063      # Path to executable is not absolute. Find it.
23064      IFS_save="$IFS"
23065      IFS=:
23066      for p in $PATH; do
23067        if test -f "$p/$path" && test -x "$p/$path"; then
23068          new_path="$p/$path"
23069          break
23070        fi
23071      done
23072      IFS="$IFS_save"
23073    else
23074      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MT (as $path) failed, using $path directly." >&5
23075$as_echo "$as_me: Resolving MT (as $path) failed, using $path directly." >&6;}
23076      new_path="$path"
23077    fi
23078
23079    if test "x$new_path" = x; then
23080        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
23081$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
23082        has_space=`$ECHO "$complete" | $GREP " "`
23083        if test "x$has_space" != x; then
23084          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23085$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23086        fi
23087        as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
23088      fi
23089  fi
23090
23091      # Now join together the path and the arguments once again
23092      if test "x$arguments" != xEOL; then
23093        new_complete="$new_path ${arguments% *}"
23094      else
23095        new_complete="$new_path"
23096      fi
23097
23098  if test "x$complete" != "x$new_complete"; then
23099      MT="$new_complete"
23100      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
23101$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
23102    fi
23103
23104    # The resource compiler
23105    # Extract the first word of "rc", so it can be a program name with args.
23106set dummy rc; ac_word=$2
23107{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23108$as_echo_n "checking for $ac_word... " >&6; }
23109if ${ac_cv_prog_RC+:} false; then :
23110  $as_echo_n "(cached) " >&6
23111else
23112  if test -n "$RC"; then
23113  ac_cv_prog_RC="$RC" # Let the user override the test.
23114else
23115  ac_prog_rejected=no
23116as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23117for as_dir in $PATH
23118do
23119  IFS=$as_save_IFS
23120  test -z "$as_dir" && as_dir=.
23121    for ac_exec_ext in '' $ac_executable_extensions; do
23122  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23123    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
23124       ac_prog_rejected=yes
23125       continue
23126     fi
23127    ac_cv_prog_RC="rc"
23128    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23129    break 2
23130  fi
23131done
23132  done
23133IFS=$as_save_IFS
23134
23135if test $ac_prog_rejected = yes; then
23136  # We found a bogon in the path, so make sure we never use it.
23137  set dummy $ac_cv_prog_RC
23138  shift
23139  if test $# != 0; then
23140    # We chose a different compiler from the bogus one.
23141    # However, it has the same basename, so the bogon will be chosen
23142    # first if we set RC to just the basename; use the full file name.
23143    shift
23144    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
23145  fi
23146fi
23147fi
23148fi
23149RC=$ac_cv_prog_RC
23150if test -n "$RC"; then
23151  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
23152$as_echo "$RC" >&6; }
23153else
23154  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23155$as_echo "no" >&6; }
23156fi
23157
23158
23159
23160  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23161
23162  # First separate the path from the arguments. This will split at the first
23163  # space.
23164  complete="$RC"
23165  path="${complete%% *}"
23166  tmp="$complete EOL"
23167  arguments="${tmp#* }"
23168
23169  # Input might be given as Windows format, start by converting to
23170  # unix format.
23171  new_path=`$CYGPATH -u "$path"`
23172
23173  # Now try to locate executable using which
23174  new_path=`$WHICH "$new_path" 2> /dev/null`
23175  # bat and cmd files are not always considered executable in cygwin causing which
23176  # to not find them
23177  if test "x$new_path" = x \
23178           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23179           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23180    new_path=`$CYGPATH -u "$path"`
23181  fi
23182  if test "x$new_path" = x; then
23183    # Oops. Which didn't find the executable.
23184    # The splitting of arguments from the executable at a space might have been incorrect,
23185    # since paths with space are more likely in Windows. Give it another try with the whole
23186    # argument.
23187    path="$complete"
23188    arguments="EOL"
23189    new_path=`$CYGPATH -u "$path"`
23190    new_path=`$WHICH "$new_path" 2> /dev/null`
23191    # bat and cmd files are not always considered executable in cygwin causing which
23192    # to not find them
23193    if test "x$new_path" = x \
23194             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23195             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23196      new_path=`$CYGPATH -u "$path"`
23197    fi
23198    if test "x$new_path" = x; then
23199      # It's still not found. Now this is an unrecoverable error.
23200      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
23201$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
23202      has_space=`$ECHO "$complete" | $GREP " "`
23203      if test "x$has_space" != x; then
23204        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23205$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23206      fi
23207      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23208    fi
23209  fi
23210
23211  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23212  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23213  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23214  # "foo.exe" is OK but "foo" is an error.
23215  #
23216  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23217  # It is also a way to make sure we got the proper file name for the real test later on.
23218  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23219  if test "x$test_shortpath" = x; then
23220    # Short path failed, file does not exist as specified.
23221    # Try adding .exe or .cmd
23222    if test -f "${new_path}.exe"; then
23223       input_to_shortpath="${new_path}.exe"
23224    elif test -f "${new_path}.cmd"; then
23225       input_to_shortpath="${new_path}.cmd"
23226    else
23227      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
23228$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
23229      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23230$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23231      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23232    fi
23233  else
23234    input_to_shortpath="$new_path"
23235  fi
23236
23237  # Call helper function which possibly converts this using DOS-style short mode.
23238  # If so, the updated path is stored in $new_path.
23239  new_path="$input_to_shortpath"
23240
23241  input_path="$input_to_shortpath"
23242  # Check if we need to convert this using DOS-style short mode. If the path
23243  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23244  # take no chances and rewrite it.
23245  # Note: m4 eats our [], so we need to use [ and ] instead.
23246  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23247  if test "x$has_forbidden_chars" != x; then
23248    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23249    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23250    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23251    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23252      # Going to short mode and back again did indeed matter. Since short mode is
23253      # case insensitive, let's make it lowercase to improve readability.
23254      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23255      # Now convert it back to Unix-stile (cygpath)
23256      input_path=`$CYGPATH -u "$shortmode_path"`
23257      new_path="$input_path"
23258    fi
23259  fi
23260
23261  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23262  if test "x$test_cygdrive_prefix" = x; then
23263    # As a simple fix, exclude /usr/bin since it's not a real path.
23264    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23265      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23266      # a path prefixed by /cygdrive for fixpath to work.
23267      new_path="$CYGWIN_ROOT_PATH$input_path"
23268    fi
23269  fi
23270
23271  # remove trailing .exe if any
23272  new_path="${new_path/%.exe/}"
23273
23274  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23275
23276  # First separate the path from the arguments. This will split at the first
23277  # space.
23278  complete="$RC"
23279  path="${complete%% *}"
23280  tmp="$complete EOL"
23281  arguments="${tmp#* }"
23282
23283  # Input might be given as Windows format, start by converting to
23284  # unix format.
23285  new_path="$path"
23286
23287  windows_path="$new_path"
23288  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23289    unix_path=`$CYGPATH -u "$windows_path"`
23290    new_path="$unix_path"
23291  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23292    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23293    new_path="$unix_path"
23294  fi
23295
23296
23297  # Now try to locate executable using which
23298  new_path=`$WHICH "$new_path" 2> /dev/null`
23299
23300  if test "x$new_path" = x; then
23301    # Oops. Which didn't find the executable.
23302    # The splitting of arguments from the executable at a space might have been incorrect,
23303    # since paths with space are more likely in Windows. Give it another try with the whole
23304    # argument.
23305    path="$complete"
23306    arguments="EOL"
23307    new_path="$path"
23308
23309  windows_path="$new_path"
23310  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23311    unix_path=`$CYGPATH -u "$windows_path"`
23312    new_path="$unix_path"
23313  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23314    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23315    new_path="$unix_path"
23316  fi
23317
23318
23319    new_path=`$WHICH "$new_path" 2> /dev/null`
23320
23321    if test "x$new_path" = x; then
23322      # It's still not found. Now this is an unrecoverable error.
23323      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
23324$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
23325      has_space=`$ECHO "$complete" | $GREP " "`
23326      if test "x$has_space" != x; then
23327        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23328$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23329      fi
23330      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23331    fi
23332  fi
23333
23334  # Now new_path has a complete unix path to the binary
23335  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23336    # Keep paths in /bin as-is, but remove trailing .exe if any
23337    new_path="${new_path/%.exe/}"
23338    # Do not save /bin paths to all_fixpath_prefixes!
23339  else
23340    # Not in mixed or Windows style, start by that.
23341    new_path=`cmd //c echo $new_path`
23342
23343  input_path="$new_path"
23344  # Check if we need to convert this using DOS-style short mode. If the path
23345  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23346  # take no chances and rewrite it.
23347  # Note: m4 eats our [], so we need to use [ and ] instead.
23348  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23349  if test "x$has_forbidden_chars" != x; then
23350    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23351    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23352  fi
23353
23354    # Output is in $new_path
23355
23356  windows_path="$new_path"
23357  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23358    unix_path=`$CYGPATH -u "$windows_path"`
23359    new_path="$unix_path"
23360  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23361    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23362    new_path="$unix_path"
23363  fi
23364
23365    # remove trailing .exe if any
23366    new_path="${new_path/%.exe/}"
23367
23368    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23369    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23370  fi
23371
23372  else
23373    # We're on a posix platform. Hooray! :)
23374    # First separate the path from the arguments. This will split at the first
23375    # space.
23376    complete="$RC"
23377    path="${complete%% *}"
23378    tmp="$complete EOL"
23379    arguments="${tmp#* }"
23380
23381    # Cannot rely on the command "which" here since it doesn't always work.
23382    is_absolute_path=`$ECHO "$path" | $GREP ^/`
23383    if test -z "$is_absolute_path"; then
23384      # Path to executable is not absolute. Find it.
23385      IFS_save="$IFS"
23386      IFS=:
23387      for p in $PATH; do
23388        if test -f "$p/$path" && test -x "$p/$path"; then
23389          new_path="$p/$path"
23390          break
23391        fi
23392      done
23393      IFS="$IFS_save"
23394    else
23395      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving RC (as $path) failed, using $path directly." >&5
23396$as_echo "$as_me: Resolving RC (as $path) failed, using $path directly." >&6;}
23397      new_path="$path"
23398    fi
23399
23400    if test "x$new_path" = x; then
23401        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
23402$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
23403        has_space=`$ECHO "$complete" | $GREP " "`
23404        if test "x$has_space" != x; then
23405          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23406$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23407        fi
23408        as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23409      fi
23410  fi
23411
23412      # Now join together the path and the arguments once again
23413      if test "x$arguments" != xEOL; then
23414        new_complete="$new_path ${arguments% *}"
23415      else
23416        new_complete="$new_path"
23417      fi
23418
23419  if test "x$complete" != "x$new_complete"; then
23420      RC="$new_complete"
23421      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
23422$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
23423    fi
23424
23425
23426    # For hotspot, we need these in Windows mixed path,
23427    # so rewrite them all. Need added .exe suffix.
23428    HOTSPOT_CXX="$CXX.exe"
23429    HOTSPOT_LD="$LD.exe"
23430    HOTSPOT_MT="$MT.exe"
23431    HOTSPOT_RC="$RC.exe"
23432
23433  unix_path="$HOTSPOT_CXX"
23434  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23435    windows_path=`$CYGPATH -m "$unix_path"`
23436    HOTSPOT_CXX="$windows_path"
23437  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23438    windows_path=`cmd //c echo $unix_path`
23439    HOTSPOT_CXX="$windows_path"
23440  fi
23441
23442
23443  unix_path="$HOTSPOT_LD"
23444  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23445    windows_path=`$CYGPATH -m "$unix_path"`
23446    HOTSPOT_LD="$windows_path"
23447  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23448    windows_path=`cmd //c echo $unix_path`
23449    HOTSPOT_LD="$windows_path"
23450  fi
23451
23452
23453  unix_path="$HOTSPOT_MT"
23454  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23455    windows_path=`$CYGPATH -m "$unix_path"`
23456    HOTSPOT_MT="$windows_path"
23457  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23458    windows_path=`cmd //c echo $unix_path`
23459    HOTSPOT_MT="$windows_path"
23460  fi
23461
23462
23463  unix_path="$HOTSPOT_RC"
23464  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23465    windows_path=`$CYGPATH -m "$unix_path"`
23466    HOTSPOT_RC="$windows_path"
23467  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23468    windows_path=`cmd //c echo $unix_path`
23469    HOTSPOT_RC="$windows_path"
23470  fi
23471
23472
23473
23474
23475    RC_FLAGS="-nologo -l 0x409 -r"
23476    if test "x$VARIANT" = xOPT; then :
23477
23478        RC_FLAGS="$RC_FLAGS -d NDEBUG"
23479
23480fi
23481
23482    # The version variables used to create RC_FLAGS may be overridden
23483    # in a custom configure script, or possibly the command line.
23484    # Let those variables be expanded at make time in spec.gmk.
23485    # The \$ are escaped to the shell, and the $(...) variables
23486    # are evaluated by make.
23487    RC_FLAGS="$RC_FLAGS \
23488        -d \"JDK_BUILD_ID=\$(FULL_VERSION)\" \
23489        -d \"JDK_COMPANY=\$(COMPANY_NAME)\" \
23490        -d \"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
23491        -d \"JDK_VER=\$(JDK_MINOR_VERSION).\$(JDK_MICRO_VERSION).\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0).\$(COOKED_BUILD_NUMBER)\" \
23492        -d \"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
23493        -d \"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(JDK_MINOR_VERSION) \$(JDK_UPDATE_META_TAG)\" \
23494        -d \"JDK_FVER=\$(JDK_MINOR_VERSION),\$(JDK_MICRO_VERSION),\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0),\$(COOKED_BUILD_NUMBER)\""
23495
23496    # lib.exe is used to create static libraries.
23497    # Extract the first word of "lib", so it can be a program name with args.
23498set dummy lib; ac_word=$2
23499{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23500$as_echo_n "checking for $ac_word... " >&6; }
23501if ${ac_cv_prog_WINAR+:} false; then :
23502  $as_echo_n "(cached) " >&6
23503else
23504  if test -n "$WINAR"; then
23505  ac_cv_prog_WINAR="$WINAR" # Let the user override the test.
23506else
23507as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23508for as_dir in $PATH
23509do
23510  IFS=$as_save_IFS
23511  test -z "$as_dir" && as_dir=.
23512    for ac_exec_ext in '' $ac_executable_extensions; do
23513  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23514    ac_cv_prog_WINAR="lib"
23515    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23516    break 2
23517  fi
23518done
23519  done
23520IFS=$as_save_IFS
23521
23522fi
23523fi
23524WINAR=$ac_cv_prog_WINAR
23525if test -n "$WINAR"; then
23526  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINAR" >&5
23527$as_echo "$WINAR" >&6; }
23528else
23529  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23530$as_echo "no" >&6; }
23531fi
23532
23533
23534
23535  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23536
23537  # First separate the path from the arguments. This will split at the first
23538  # space.
23539  complete="$WINAR"
23540  path="${complete%% *}"
23541  tmp="$complete EOL"
23542  arguments="${tmp#* }"
23543
23544  # Input might be given as Windows format, start by converting to
23545  # unix format.
23546  new_path=`$CYGPATH -u "$path"`
23547
23548  # Now try to locate executable using which
23549  new_path=`$WHICH "$new_path" 2> /dev/null`
23550  # bat and cmd files are not always considered executable in cygwin causing which
23551  # to not find them
23552  if test "x$new_path" = x \
23553           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23554           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23555    new_path=`$CYGPATH -u "$path"`
23556  fi
23557  if test "x$new_path" = x; then
23558    # Oops. Which didn't find the executable.
23559    # The splitting of arguments from the executable at a space might have been incorrect,
23560    # since paths with space are more likely in Windows. Give it another try with the whole
23561    # argument.
23562    path="$complete"
23563    arguments="EOL"
23564    new_path=`$CYGPATH -u "$path"`
23565    new_path=`$WHICH "$new_path" 2> /dev/null`
23566    # bat and cmd files are not always considered executable in cygwin causing which
23567    # to not find them
23568    if test "x$new_path" = x \
23569             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23570             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23571      new_path=`$CYGPATH -u "$path"`
23572    fi
23573    if test "x$new_path" = x; then
23574      # It's still not found. Now this is an unrecoverable error.
23575      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
23576$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
23577      has_space=`$ECHO "$complete" | $GREP " "`
23578      if test "x$has_space" != x; then
23579        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23580$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23581      fi
23582      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
23583    fi
23584  fi
23585
23586  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23587  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23588  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23589  # "foo.exe" is OK but "foo" is an error.
23590  #
23591  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23592  # It is also a way to make sure we got the proper file name for the real test later on.
23593  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23594  if test "x$test_shortpath" = x; then
23595    # Short path failed, file does not exist as specified.
23596    # Try adding .exe or .cmd
23597    if test -f "${new_path}.exe"; then
23598       input_to_shortpath="${new_path}.exe"
23599    elif test -f "${new_path}.cmd"; then
23600       input_to_shortpath="${new_path}.cmd"
23601    else
23602      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$new_path\", is invalid." >&5
23603$as_echo "$as_me: The path of WINAR, which resolves as \"$new_path\", is invalid." >&6;}
23604      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23605$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23606      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
23607    fi
23608  else
23609    input_to_shortpath="$new_path"
23610  fi
23611
23612  # Call helper function which possibly converts this using DOS-style short mode.
23613  # If so, the updated path is stored in $new_path.
23614  new_path="$input_to_shortpath"
23615
23616  input_path="$input_to_shortpath"
23617  # Check if we need to convert this using DOS-style short mode. If the path
23618  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23619  # take no chances and rewrite it.
23620  # Note: m4 eats our [], so we need to use [ and ] instead.
23621  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23622  if test "x$has_forbidden_chars" != x; then
23623    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23624    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23625    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23626    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23627      # Going to short mode and back again did indeed matter. Since short mode is
23628      # case insensitive, let's make it lowercase to improve readability.
23629      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23630      # Now convert it back to Unix-stile (cygpath)
23631      input_path=`$CYGPATH -u "$shortmode_path"`
23632      new_path="$input_path"
23633    fi
23634  fi
23635
23636  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23637  if test "x$test_cygdrive_prefix" = x; then
23638    # As a simple fix, exclude /usr/bin since it's not a real path.
23639    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23640      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23641      # a path prefixed by /cygdrive for fixpath to work.
23642      new_path="$CYGWIN_ROOT_PATH$input_path"
23643    fi
23644  fi
23645
23646  # remove trailing .exe if any
23647  new_path="${new_path/%.exe/}"
23648
23649  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23650
23651  # First separate the path from the arguments. This will split at the first
23652  # space.
23653  complete="$WINAR"
23654  path="${complete%% *}"
23655  tmp="$complete EOL"
23656  arguments="${tmp#* }"
23657
23658  # Input might be given as Windows format, start by converting to
23659  # unix format.
23660  new_path="$path"
23661
23662  windows_path="$new_path"
23663  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23664    unix_path=`$CYGPATH -u "$windows_path"`
23665    new_path="$unix_path"
23666  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23667    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23668    new_path="$unix_path"
23669  fi
23670
23671
23672  # Now try to locate executable using which
23673  new_path=`$WHICH "$new_path" 2> /dev/null`
23674
23675  if test "x$new_path" = x; then
23676    # Oops. Which didn't find the executable.
23677    # The splitting of arguments from the executable at a space might have been incorrect,
23678    # since paths with space are more likely in Windows. Give it another try with the whole
23679    # argument.
23680    path="$complete"
23681    arguments="EOL"
23682    new_path="$path"
23683
23684  windows_path="$new_path"
23685  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23686    unix_path=`$CYGPATH -u "$windows_path"`
23687    new_path="$unix_path"
23688  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23689    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23690    new_path="$unix_path"
23691  fi
23692
23693
23694    new_path=`$WHICH "$new_path" 2> /dev/null`
23695
23696    if test "x$new_path" = x; then
23697      # It's still not found. Now this is an unrecoverable error.
23698      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
23699$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
23700      has_space=`$ECHO "$complete" | $GREP " "`
23701      if test "x$has_space" != x; then
23702        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23703$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23704      fi
23705      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
23706    fi
23707  fi
23708
23709  # Now new_path has a complete unix path to the binary
23710  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23711    # Keep paths in /bin as-is, but remove trailing .exe if any
23712    new_path="${new_path/%.exe/}"
23713    # Do not save /bin paths to all_fixpath_prefixes!
23714  else
23715    # Not in mixed or Windows style, start by that.
23716    new_path=`cmd //c echo $new_path`
23717
23718  input_path="$new_path"
23719  # Check if we need to convert this using DOS-style short mode. If the path
23720  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23721  # take no chances and rewrite it.
23722  # Note: m4 eats our [], so we need to use [ and ] instead.
23723  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23724  if test "x$has_forbidden_chars" != x; then
23725    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23726    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23727  fi
23728
23729    # Output is in $new_path
23730
23731  windows_path="$new_path"
23732  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23733    unix_path=`$CYGPATH -u "$windows_path"`
23734    new_path="$unix_path"
23735  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23736    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23737    new_path="$unix_path"
23738  fi
23739
23740    # remove trailing .exe if any
23741    new_path="${new_path/%.exe/}"
23742
23743    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23744    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23745  fi
23746
23747  else
23748    # We're on a posix platform. Hooray! :)
23749    # First separate the path from the arguments. This will split at the first
23750    # space.
23751    complete="$WINAR"
23752    path="${complete%% *}"
23753    tmp="$complete EOL"
23754    arguments="${tmp#* }"
23755
23756    # Cannot rely on the command "which" here since it doesn't always work.
23757    is_absolute_path=`$ECHO "$path" | $GREP ^/`
23758    if test -z "$is_absolute_path"; then
23759      # Path to executable is not absolute. Find it.
23760      IFS_save="$IFS"
23761      IFS=:
23762      for p in $PATH; do
23763        if test -f "$p/$path" && test -x "$p/$path"; then
23764          new_path="$p/$path"
23765          break
23766        fi
23767      done
23768      IFS="$IFS_save"
23769    else
23770      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINAR (as $path) failed, using $path directly." >&5
23771$as_echo "$as_me: Resolving WINAR (as $path) failed, using $path directly." >&6;}
23772      new_path="$path"
23773    fi
23774
23775    if test "x$new_path" = x; then
23776        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
23777$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
23778        has_space=`$ECHO "$complete" | $GREP " "`
23779        if test "x$has_space" != x; then
23780          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23781$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23782        fi
23783        as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
23784      fi
23785  fi
23786
23787      # Now join together the path and the arguments once again
23788      if test "x$arguments" != xEOL; then
23789        new_complete="$new_path ${arguments% *}"
23790      else
23791        new_complete="$new_path"
23792      fi
23793
23794  if test "x$complete" != "x$new_complete"; then
23795      WINAR="$new_complete"
23796      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINAR to \"$new_complete\"" >&5
23797$as_echo "$as_me: Rewriting WINAR to \"$new_complete\"" >&6;}
23798    fi
23799
23800    AR="$WINAR"
23801    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
23802
23803    # Extract the first word of "dumpbin", so it can be a program name with args.
23804set dummy dumpbin; ac_word=$2
23805{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23806$as_echo_n "checking for $ac_word... " >&6; }
23807if ${ac_cv_prog_DUMPBIN+:} false; then :
23808  $as_echo_n "(cached) " >&6
23809else
23810  if test -n "$DUMPBIN"; then
23811  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
23812else
23813as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23814for as_dir in $PATH
23815do
23816  IFS=$as_save_IFS
23817  test -z "$as_dir" && as_dir=.
23818    for ac_exec_ext in '' $ac_executable_extensions; do
23819  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23820    ac_cv_prog_DUMPBIN="dumpbin"
23821    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23822    break 2
23823  fi
23824done
23825  done
23826IFS=$as_save_IFS
23827
23828fi
23829fi
23830DUMPBIN=$ac_cv_prog_DUMPBIN
23831if test -n "$DUMPBIN"; then
23832  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
23833$as_echo "$DUMPBIN" >&6; }
23834else
23835  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23836$as_echo "no" >&6; }
23837fi
23838
23839
23840
23841  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23842
23843  # First separate the path from the arguments. This will split at the first
23844  # space.
23845  complete="$DUMPBIN"
23846  path="${complete%% *}"
23847  tmp="$complete EOL"
23848  arguments="${tmp#* }"
23849
23850  # Input might be given as Windows format, start by converting to
23851  # unix format.
23852  new_path=`$CYGPATH -u "$path"`
23853
23854  # Now try to locate executable using which
23855  new_path=`$WHICH "$new_path" 2> /dev/null`
23856  # bat and cmd files are not always considered executable in cygwin causing which
23857  # to not find them
23858  if test "x$new_path" = x \
23859           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23860           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23861    new_path=`$CYGPATH -u "$path"`
23862  fi
23863  if test "x$new_path" = x; then
23864    # Oops. Which didn't find the executable.
23865    # The splitting of arguments from the executable at a space might have been incorrect,
23866    # since paths with space are more likely in Windows. Give it another try with the whole
23867    # argument.
23868    path="$complete"
23869    arguments="EOL"
23870    new_path=`$CYGPATH -u "$path"`
23871    new_path=`$WHICH "$new_path" 2> /dev/null`
23872    # bat and cmd files are not always considered executable in cygwin causing which
23873    # to not find them
23874    if test "x$new_path" = x \
23875             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23876             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23877      new_path=`$CYGPATH -u "$path"`
23878    fi
23879    if test "x$new_path" = x; then
23880      # It's still not found. Now this is an unrecoverable error.
23881      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
23882$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
23883      has_space=`$ECHO "$complete" | $GREP " "`
23884      if test "x$has_space" != x; then
23885        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23886$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23887      fi
23888      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
23889    fi
23890  fi
23891
23892  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23893  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23894  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23895  # "foo.exe" is OK but "foo" is an error.
23896  #
23897  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23898  # It is also a way to make sure we got the proper file name for the real test later on.
23899  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23900  if test "x$test_shortpath" = x; then
23901    # Short path failed, file does not exist as specified.
23902    # Try adding .exe or .cmd
23903    if test -f "${new_path}.exe"; then
23904       input_to_shortpath="${new_path}.exe"
23905    elif test -f "${new_path}.cmd"; then
23906       input_to_shortpath="${new_path}.cmd"
23907    else
23908      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
23909$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
23910      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23911$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23912      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
23913    fi
23914  else
23915    input_to_shortpath="$new_path"
23916  fi
23917
23918  # Call helper function which possibly converts this using DOS-style short mode.
23919  # If so, the updated path is stored in $new_path.
23920  new_path="$input_to_shortpath"
23921
23922  input_path="$input_to_shortpath"
23923  # Check if we need to convert this using DOS-style short mode. If the path
23924  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23925  # take no chances and rewrite it.
23926  # Note: m4 eats our [], so we need to use [ and ] instead.
23927  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23928  if test "x$has_forbidden_chars" != x; then
23929    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23930    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23931    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23932    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23933      # Going to short mode and back again did indeed matter. Since short mode is
23934      # case insensitive, let's make it lowercase to improve readability.
23935      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23936      # Now convert it back to Unix-stile (cygpath)
23937      input_path=`$CYGPATH -u "$shortmode_path"`
23938      new_path="$input_path"
23939    fi
23940  fi
23941
23942  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23943  if test "x$test_cygdrive_prefix" = x; then
23944    # As a simple fix, exclude /usr/bin since it's not a real path.
23945    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23946      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23947      # a path prefixed by /cygdrive for fixpath to work.
23948      new_path="$CYGWIN_ROOT_PATH$input_path"
23949    fi
23950  fi
23951
23952  # remove trailing .exe if any
23953  new_path="${new_path/%.exe/}"
23954
23955  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23956
23957  # First separate the path from the arguments. This will split at the first
23958  # space.
23959  complete="$DUMPBIN"
23960  path="${complete%% *}"
23961  tmp="$complete EOL"
23962  arguments="${tmp#* }"
23963
23964  # Input might be given as Windows format, start by converting to
23965  # unix format.
23966  new_path="$path"
23967
23968  windows_path="$new_path"
23969  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23970    unix_path=`$CYGPATH -u "$windows_path"`
23971    new_path="$unix_path"
23972  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23973    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23974    new_path="$unix_path"
23975  fi
23976
23977
23978  # Now try to locate executable using which
23979  new_path=`$WHICH "$new_path" 2> /dev/null`
23980
23981  if test "x$new_path" = x; then
23982    # Oops. Which didn't find the executable.
23983    # The splitting of arguments from the executable at a space might have been incorrect,
23984    # since paths with space are more likely in Windows. Give it another try with the whole
23985    # argument.
23986    path="$complete"
23987    arguments="EOL"
23988    new_path="$path"
23989
23990  windows_path="$new_path"
23991  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23992    unix_path=`$CYGPATH -u "$windows_path"`
23993    new_path="$unix_path"
23994  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23995    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23996    new_path="$unix_path"
23997  fi
23998
23999
24000    new_path=`$WHICH "$new_path" 2> /dev/null`
24001
24002    if test "x$new_path" = x; then
24003      # It's still not found. Now this is an unrecoverable error.
24004      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
24005$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
24006      has_space=`$ECHO "$complete" | $GREP " "`
24007      if test "x$has_space" != x; then
24008        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24009$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24010      fi
24011      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
24012    fi
24013  fi
24014
24015  # Now new_path has a complete unix path to the binary
24016  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24017    # Keep paths in /bin as-is, but remove trailing .exe if any
24018    new_path="${new_path/%.exe/}"
24019    # Do not save /bin paths to all_fixpath_prefixes!
24020  else
24021    # Not in mixed or Windows style, start by that.
24022    new_path=`cmd //c echo $new_path`
24023
24024  input_path="$new_path"
24025  # Check if we need to convert this using DOS-style short mode. If the path
24026  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24027  # take no chances and rewrite it.
24028  # Note: m4 eats our [], so we need to use [ and ] instead.
24029  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24030  if test "x$has_forbidden_chars" != x; then
24031    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24032    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24033  fi
24034
24035    # Output is in $new_path
24036
24037  windows_path="$new_path"
24038  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24039    unix_path=`$CYGPATH -u "$windows_path"`
24040    new_path="$unix_path"
24041  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24042    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24043    new_path="$unix_path"
24044  fi
24045
24046    # remove trailing .exe if any
24047    new_path="${new_path/%.exe/}"
24048
24049    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24050    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24051  fi
24052
24053  else
24054    # We're on a posix platform. Hooray! :)
24055    # First separate the path from the arguments. This will split at the first
24056    # space.
24057    complete="$DUMPBIN"
24058    path="${complete%% *}"
24059    tmp="$complete EOL"
24060    arguments="${tmp#* }"
24061
24062    # Cannot rely on the command "which" here since it doesn't always work.
24063    is_absolute_path=`$ECHO "$path" | $GREP ^/`
24064    if test -z "$is_absolute_path"; then
24065      # Path to executable is not absolute. Find it.
24066      IFS_save="$IFS"
24067      IFS=:
24068      for p in $PATH; do
24069        if test -f "$p/$path" && test -x "$p/$path"; then
24070          new_path="$p/$path"
24071          break
24072        fi
24073      done
24074      IFS="$IFS_save"
24075    else
24076      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving DUMPBIN (as $path) failed, using $path directly." >&5
24077$as_echo "$as_me: Resolving DUMPBIN (as $path) failed, using $path directly." >&6;}
24078      new_path="$path"
24079    fi
24080
24081    if test "x$new_path" = x; then
24082        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
24083$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
24084        has_space=`$ECHO "$complete" | $GREP " "`
24085        if test "x$has_space" != x; then
24086          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24087$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24088        fi
24089        as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
24090      fi
24091  fi
24092
24093      # Now join together the path and the arguments once again
24094      if test "x$arguments" != xEOL; then
24095        new_complete="$new_path ${arguments% *}"
24096      else
24097        new_complete="$new_path"
24098      fi
24099
24100  if test "x$complete" != "x$new_complete"; then
24101      DUMPBIN="$new_complete"
24102      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
24103$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
24104    fi
24105
24106
24107    COMPILER_TYPE=CL
24108    CCXXFLAGS="$CCXXFLAGS -nologo"
24109
24110fi
24111
24112
24113
24114ac_ext=c
24115ac_cpp='$CPP $CPPFLAGS'
24116ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24117ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24118ac_compiler_gnu=$ac_cv_c_compiler_gnu
24119{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
24120$as_echo_n "checking how to run the C preprocessor... " >&6; }
24121# On Suns, sometimes $CPP names a directory.
24122if test -n "$CPP" && test -d "$CPP"; then
24123  CPP=
24124fi
24125if test -z "$CPP"; then
24126  if ${ac_cv_prog_CPP+:} false; then :
24127  $as_echo_n "(cached) " >&6
24128else
24129      # Double quotes because CPP needs to be expanded
24130    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
24131    do
24132      ac_preproc_ok=false
24133for ac_c_preproc_warn_flag in '' yes
24134do
24135  # Use a header file that comes with gcc, so configuring glibc
24136  # with a fresh cross-compiler works.
24137  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24138  # <limits.h> exists even on freestanding compilers.
24139  # On the NeXT, cc -E runs the code through the compiler's parser,
24140  # not just through cpp. "Syntax error" is here to catch this case.
24141  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24142/* end confdefs.h.  */
24143#ifdef __STDC__
24144# include <limits.h>
24145#else
24146# include <assert.h>
24147#endif
24148		     Syntax error
24149_ACEOF
24150if ac_fn_c_try_cpp "$LINENO"; then :
24151
24152else
24153  # Broken: fails on valid input.
24154continue
24155fi
24156rm -f conftest.err conftest.i conftest.$ac_ext
24157
24158  # OK, works on sane cases.  Now check whether nonexistent headers
24159  # can be detected and how.
24160  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24161/* end confdefs.h.  */
24162#include <ac_nonexistent.h>
24163_ACEOF
24164if ac_fn_c_try_cpp "$LINENO"; then :
24165  # Broken: success on invalid input.
24166continue
24167else
24168  # Passes both tests.
24169ac_preproc_ok=:
24170break
24171fi
24172rm -f conftest.err conftest.i conftest.$ac_ext
24173
24174done
24175# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24176rm -f conftest.i conftest.err conftest.$ac_ext
24177if $ac_preproc_ok; then :
24178  break
24179fi
24180
24181    done
24182    ac_cv_prog_CPP=$CPP
24183
24184fi
24185  CPP=$ac_cv_prog_CPP
24186else
24187  ac_cv_prog_CPP=$CPP
24188fi
24189{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
24190$as_echo "$CPP" >&6; }
24191ac_preproc_ok=false
24192for ac_c_preproc_warn_flag in '' yes
24193do
24194  # Use a header file that comes with gcc, so configuring glibc
24195  # with a fresh cross-compiler works.
24196  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24197  # <limits.h> exists even on freestanding compilers.
24198  # On the NeXT, cc -E runs the code through the compiler's parser,
24199  # not just through cpp. "Syntax error" is here to catch this case.
24200  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24201/* end confdefs.h.  */
24202#ifdef __STDC__
24203# include <limits.h>
24204#else
24205# include <assert.h>
24206#endif
24207		     Syntax error
24208_ACEOF
24209if ac_fn_c_try_cpp "$LINENO"; then :
24210
24211else
24212  # Broken: fails on valid input.
24213continue
24214fi
24215rm -f conftest.err conftest.i conftest.$ac_ext
24216
24217  # OK, works on sane cases.  Now check whether nonexistent headers
24218  # can be detected and how.
24219  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24220/* end confdefs.h.  */
24221#include <ac_nonexistent.h>
24222_ACEOF
24223if ac_fn_c_try_cpp "$LINENO"; then :
24224  # Broken: success on invalid input.
24225continue
24226else
24227  # Passes both tests.
24228ac_preproc_ok=:
24229break
24230fi
24231rm -f conftest.err conftest.i conftest.$ac_ext
24232
24233done
24234# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24235rm -f conftest.i conftest.err conftest.$ac_ext
24236if $ac_preproc_ok; then :
24237
24238else
24239  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
24240$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
24241as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
24242See \`config.log' for more details" "$LINENO" 5; }
24243fi
24244
24245ac_ext=cpp
24246ac_cpp='$CXXCPP $CPPFLAGS'
24247ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24248ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24249ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24250
24251
24252  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24253
24254  # First separate the path from the arguments. This will split at the first
24255  # space.
24256  complete="$CPP"
24257  path="${complete%% *}"
24258  tmp="$complete EOL"
24259  arguments="${tmp#* }"
24260
24261  # Input might be given as Windows format, start by converting to
24262  # unix format.
24263  new_path=`$CYGPATH -u "$path"`
24264
24265  # Now try to locate executable using which
24266  new_path=`$WHICH "$new_path" 2> /dev/null`
24267  # bat and cmd files are not always considered executable in cygwin causing which
24268  # to not find them
24269  if test "x$new_path" = x \
24270           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24271           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24272    new_path=`$CYGPATH -u "$path"`
24273  fi
24274  if test "x$new_path" = x; then
24275    # Oops. Which didn't find the executable.
24276    # The splitting of arguments from the executable at a space might have been incorrect,
24277    # since paths with space are more likely in Windows. Give it another try with the whole
24278    # argument.
24279    path="$complete"
24280    arguments="EOL"
24281    new_path=`$CYGPATH -u "$path"`
24282    new_path=`$WHICH "$new_path" 2> /dev/null`
24283    # bat and cmd files are not always considered executable in cygwin causing which
24284    # to not find them
24285    if test "x$new_path" = x \
24286             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24287             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24288      new_path=`$CYGPATH -u "$path"`
24289    fi
24290    if test "x$new_path" = x; then
24291      # It's still not found. Now this is an unrecoverable error.
24292      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
24293$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
24294      has_space=`$ECHO "$complete" | $GREP " "`
24295      if test "x$has_space" != x; then
24296        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24297$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24298      fi
24299      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24300    fi
24301  fi
24302
24303  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24304  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24305  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24306  # "foo.exe" is OK but "foo" is an error.
24307  #
24308  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24309  # It is also a way to make sure we got the proper file name for the real test later on.
24310  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24311  if test "x$test_shortpath" = x; then
24312    # Short path failed, file does not exist as specified.
24313    # Try adding .exe or .cmd
24314    if test -f "${new_path}.exe"; then
24315       input_to_shortpath="${new_path}.exe"
24316    elif test -f "${new_path}.cmd"; then
24317       input_to_shortpath="${new_path}.cmd"
24318    else
24319      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
24320$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
24321      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24322$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24323      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24324    fi
24325  else
24326    input_to_shortpath="$new_path"
24327  fi
24328
24329  # Call helper function which possibly converts this using DOS-style short mode.
24330  # If so, the updated path is stored in $new_path.
24331  new_path="$input_to_shortpath"
24332
24333  input_path="$input_to_shortpath"
24334  # Check if we need to convert this using DOS-style short mode. If the path
24335  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24336  # take no chances and rewrite it.
24337  # Note: m4 eats our [], so we need to use [ and ] instead.
24338  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24339  if test "x$has_forbidden_chars" != x; then
24340    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24341    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24342    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24343    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24344      # Going to short mode and back again did indeed matter. Since short mode is
24345      # case insensitive, let's make it lowercase to improve readability.
24346      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24347      # Now convert it back to Unix-stile (cygpath)
24348      input_path=`$CYGPATH -u "$shortmode_path"`
24349      new_path="$input_path"
24350    fi
24351  fi
24352
24353  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24354  if test "x$test_cygdrive_prefix" = x; then
24355    # As a simple fix, exclude /usr/bin since it's not a real path.
24356    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24357      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24358      # a path prefixed by /cygdrive for fixpath to work.
24359      new_path="$CYGWIN_ROOT_PATH$input_path"
24360    fi
24361  fi
24362
24363  # remove trailing .exe if any
24364  new_path="${new_path/%.exe/}"
24365
24366  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24367
24368  # First separate the path from the arguments. This will split at the first
24369  # space.
24370  complete="$CPP"
24371  path="${complete%% *}"
24372  tmp="$complete EOL"
24373  arguments="${tmp#* }"
24374
24375  # Input might be given as Windows format, start by converting to
24376  # unix format.
24377  new_path="$path"
24378
24379  windows_path="$new_path"
24380  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24381    unix_path=`$CYGPATH -u "$windows_path"`
24382    new_path="$unix_path"
24383  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24384    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24385    new_path="$unix_path"
24386  fi
24387
24388
24389  # Now try to locate executable using which
24390  new_path=`$WHICH "$new_path" 2> /dev/null`
24391
24392  if test "x$new_path" = x; then
24393    # Oops. Which didn't find the executable.
24394    # The splitting of arguments from the executable at a space might have been incorrect,
24395    # since paths with space are more likely in Windows. Give it another try with the whole
24396    # argument.
24397    path="$complete"
24398    arguments="EOL"
24399    new_path="$path"
24400
24401  windows_path="$new_path"
24402  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24403    unix_path=`$CYGPATH -u "$windows_path"`
24404    new_path="$unix_path"
24405  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24406    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24407    new_path="$unix_path"
24408  fi
24409
24410
24411    new_path=`$WHICH "$new_path" 2> /dev/null`
24412
24413    if test "x$new_path" = x; then
24414      # It's still not found. Now this is an unrecoverable error.
24415      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
24416$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
24417      has_space=`$ECHO "$complete" | $GREP " "`
24418      if test "x$has_space" != x; then
24419        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24420$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24421      fi
24422      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24423    fi
24424  fi
24425
24426  # Now new_path has a complete unix path to the binary
24427  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24428    # Keep paths in /bin as-is, but remove trailing .exe if any
24429    new_path="${new_path/%.exe/}"
24430    # Do not save /bin paths to all_fixpath_prefixes!
24431  else
24432    # Not in mixed or Windows style, start by that.
24433    new_path=`cmd //c echo $new_path`
24434
24435  input_path="$new_path"
24436  # Check if we need to convert this using DOS-style short mode. If the path
24437  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24438  # take no chances and rewrite it.
24439  # Note: m4 eats our [], so we need to use [ and ] instead.
24440  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24441  if test "x$has_forbidden_chars" != x; then
24442    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24443    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24444  fi
24445
24446    # Output is in $new_path
24447
24448  windows_path="$new_path"
24449  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24450    unix_path=`$CYGPATH -u "$windows_path"`
24451    new_path="$unix_path"
24452  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24453    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24454    new_path="$unix_path"
24455  fi
24456
24457    # remove trailing .exe if any
24458    new_path="${new_path/%.exe/}"
24459
24460    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24461    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24462  fi
24463
24464  else
24465    # We're on a posix platform. Hooray! :)
24466    # First separate the path from the arguments. This will split at the first
24467    # space.
24468    complete="$CPP"
24469    path="${complete%% *}"
24470    tmp="$complete EOL"
24471    arguments="${tmp#* }"
24472
24473    # Cannot rely on the command "which" here since it doesn't always work.
24474    is_absolute_path=`$ECHO "$path" | $GREP ^/`
24475    if test -z "$is_absolute_path"; then
24476      # Path to executable is not absolute. Find it.
24477      IFS_save="$IFS"
24478      IFS=:
24479      for p in $PATH; do
24480        if test -f "$p/$path" && test -x "$p/$path"; then
24481          new_path="$p/$path"
24482          break
24483        fi
24484      done
24485      IFS="$IFS_save"
24486    else
24487      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CPP (as $path) failed, using $path directly." >&5
24488$as_echo "$as_me: Resolving CPP (as $path) failed, using $path directly." >&6;}
24489      new_path="$path"
24490    fi
24491
24492    if test "x$new_path" = x; then
24493        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
24494$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
24495        has_space=`$ECHO "$complete" | $GREP " "`
24496        if test "x$has_space" != x; then
24497          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24498$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24499        fi
24500        as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24501      fi
24502  fi
24503
24504      # Now join together the path and the arguments once again
24505      if test "x$arguments" != xEOL; then
24506        new_complete="$new_path ${arguments% *}"
24507      else
24508        new_complete="$new_path"
24509      fi
24510
24511  if test "x$complete" != "x$new_complete"; then
24512      CPP="$new_complete"
24513      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
24514$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
24515    fi
24516
24517
24518ac_ext=cpp
24519ac_cpp='$CXXCPP $CPPFLAGS'
24520ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24521ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24522ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24523{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
24524$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
24525if test -z "$CXXCPP"; then
24526  if ${ac_cv_prog_CXXCPP+:} false; then :
24527  $as_echo_n "(cached) " >&6
24528else
24529      # Double quotes because CXXCPP needs to be expanded
24530    for CXXCPP in "$CXX -E" "/lib/cpp"
24531    do
24532      ac_preproc_ok=false
24533for ac_cxx_preproc_warn_flag in '' yes
24534do
24535  # Use a header file that comes with gcc, so configuring glibc
24536  # with a fresh cross-compiler works.
24537  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24538  # <limits.h> exists even on freestanding compilers.
24539  # On the NeXT, cc -E runs the code through the compiler's parser,
24540  # not just through cpp. "Syntax error" is here to catch this case.
24541  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24542/* end confdefs.h.  */
24543#ifdef __STDC__
24544# include <limits.h>
24545#else
24546# include <assert.h>
24547#endif
24548		     Syntax error
24549_ACEOF
24550if ac_fn_cxx_try_cpp "$LINENO"; then :
24551
24552else
24553  # Broken: fails on valid input.
24554continue
24555fi
24556rm -f conftest.err conftest.i conftest.$ac_ext
24557
24558  # OK, works on sane cases.  Now check whether nonexistent headers
24559  # can be detected and how.
24560  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24561/* end confdefs.h.  */
24562#include <ac_nonexistent.h>
24563_ACEOF
24564if ac_fn_cxx_try_cpp "$LINENO"; then :
24565  # Broken: success on invalid input.
24566continue
24567else
24568  # Passes both tests.
24569ac_preproc_ok=:
24570break
24571fi
24572rm -f conftest.err conftest.i conftest.$ac_ext
24573
24574done
24575# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24576rm -f conftest.i conftest.err conftest.$ac_ext
24577if $ac_preproc_ok; then :
24578  break
24579fi
24580
24581    done
24582    ac_cv_prog_CXXCPP=$CXXCPP
24583
24584fi
24585  CXXCPP=$ac_cv_prog_CXXCPP
24586else
24587  ac_cv_prog_CXXCPP=$CXXCPP
24588fi
24589{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
24590$as_echo "$CXXCPP" >&6; }
24591ac_preproc_ok=false
24592for ac_cxx_preproc_warn_flag in '' yes
24593do
24594  # Use a header file that comes with gcc, so configuring glibc
24595  # with a fresh cross-compiler works.
24596  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24597  # <limits.h> exists even on freestanding compilers.
24598  # On the NeXT, cc -E runs the code through the compiler's parser,
24599  # not just through cpp. "Syntax error" is here to catch this case.
24600  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24601/* end confdefs.h.  */
24602#ifdef __STDC__
24603# include <limits.h>
24604#else
24605# include <assert.h>
24606#endif
24607		     Syntax error
24608_ACEOF
24609if ac_fn_cxx_try_cpp "$LINENO"; then :
24610
24611else
24612  # Broken: fails on valid input.
24613continue
24614fi
24615rm -f conftest.err conftest.i conftest.$ac_ext
24616
24617  # OK, works on sane cases.  Now check whether nonexistent headers
24618  # can be detected and how.
24619  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24620/* end confdefs.h.  */
24621#include <ac_nonexistent.h>
24622_ACEOF
24623if ac_fn_cxx_try_cpp "$LINENO"; then :
24624  # Broken: success on invalid input.
24625continue
24626else
24627  # Passes both tests.
24628ac_preproc_ok=:
24629break
24630fi
24631rm -f conftest.err conftest.i conftest.$ac_ext
24632
24633done
24634# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24635rm -f conftest.i conftest.err conftest.$ac_ext
24636if $ac_preproc_ok; then :
24637
24638else
24639  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
24640$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
24641as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
24642See \`config.log' for more details" "$LINENO" 5; }
24643fi
24644
24645ac_ext=cpp
24646ac_cpp='$CXXCPP $CPPFLAGS'
24647ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24648ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24649ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24650
24651
24652  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24653
24654  # First separate the path from the arguments. This will split at the first
24655  # space.
24656  complete="$CXXCPP"
24657  path="${complete%% *}"
24658  tmp="$complete EOL"
24659  arguments="${tmp#* }"
24660
24661  # Input might be given as Windows format, start by converting to
24662  # unix format.
24663  new_path=`$CYGPATH -u "$path"`
24664
24665  # Now try to locate executable using which
24666  new_path=`$WHICH "$new_path" 2> /dev/null`
24667  # bat and cmd files are not always considered executable in cygwin causing which
24668  # to not find them
24669  if test "x$new_path" = x \
24670           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24671           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24672    new_path=`$CYGPATH -u "$path"`
24673  fi
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=`$CYGPATH -u "$path"`
24682    new_path=`$WHICH "$new_path" 2> /dev/null`
24683    # bat and cmd files are not always considered executable in cygwin causing which
24684    # to not find them
24685    if test "x$new_path" = x \
24686             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24687             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24688      new_path=`$CYGPATH -u "$path"`
24689    fi
24690    if test "x$new_path" = x; then
24691      # It's still not found. Now this is an unrecoverable error.
24692      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
24693$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
24694      has_space=`$ECHO "$complete" | $GREP " "`
24695      if test "x$has_space" != x; then
24696        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24697$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24698      fi
24699      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
24700    fi
24701  fi
24702
24703  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24704  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24705  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24706  # "foo.exe" is OK but "foo" is an error.
24707  #
24708  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24709  # It is also a way to make sure we got the proper file name for the real test later on.
24710  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24711  if test "x$test_shortpath" = x; then
24712    # Short path failed, file does not exist as specified.
24713    # Try adding .exe or .cmd
24714    if test -f "${new_path}.exe"; then
24715       input_to_shortpath="${new_path}.exe"
24716    elif test -f "${new_path}.cmd"; then
24717       input_to_shortpath="${new_path}.cmd"
24718    else
24719      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
24720$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
24721      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24722$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24723      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
24724    fi
24725  else
24726    input_to_shortpath="$new_path"
24727  fi
24728
24729  # Call helper function which possibly converts this using DOS-style short mode.
24730  # If so, the updated path is stored in $new_path.
24731  new_path="$input_to_shortpath"
24732
24733  input_path="$input_to_shortpath"
24734  # Check if we need to convert this using DOS-style short mode. If the path
24735  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24736  # take no chances and rewrite it.
24737  # Note: m4 eats our [], so we need to use [ and ] instead.
24738  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24739  if test "x$has_forbidden_chars" != x; then
24740    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24741    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24742    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24743    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24744      # Going to short mode and back again did indeed matter. Since short mode is
24745      # case insensitive, let's make it lowercase to improve readability.
24746      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24747      # Now convert it back to Unix-stile (cygpath)
24748      input_path=`$CYGPATH -u "$shortmode_path"`
24749      new_path="$input_path"
24750    fi
24751  fi
24752
24753  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24754  if test "x$test_cygdrive_prefix" = x; then
24755    # As a simple fix, exclude /usr/bin since it's not a real path.
24756    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24757      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24758      # a path prefixed by /cygdrive for fixpath to work.
24759      new_path="$CYGWIN_ROOT_PATH$input_path"
24760    fi
24761  fi
24762
24763  # remove trailing .exe if any
24764  new_path="${new_path/%.exe/}"
24765
24766  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24767
24768  # First separate the path from the arguments. This will split at the first
24769  # space.
24770  complete="$CXXCPP"
24771  path="${complete%% *}"
24772  tmp="$complete EOL"
24773  arguments="${tmp#* }"
24774
24775  # Input might be given as Windows format, start by converting to
24776  # unix format.
24777  new_path="$path"
24778
24779  windows_path="$new_path"
24780  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24781    unix_path=`$CYGPATH -u "$windows_path"`
24782    new_path="$unix_path"
24783  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24784    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24785    new_path="$unix_path"
24786  fi
24787
24788
24789  # Now try to locate executable using which
24790  new_path=`$WHICH "$new_path" 2> /dev/null`
24791
24792  if test "x$new_path" = x; then
24793    # Oops. Which didn't find the executable.
24794    # The splitting of arguments from the executable at a space might have been incorrect,
24795    # since paths with space are more likely in Windows. Give it another try with the whole
24796    # argument.
24797    path="$complete"
24798    arguments="EOL"
24799    new_path="$path"
24800
24801  windows_path="$new_path"
24802  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24803    unix_path=`$CYGPATH -u "$windows_path"`
24804    new_path="$unix_path"
24805  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24806    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24807    new_path="$unix_path"
24808  fi
24809
24810
24811    new_path=`$WHICH "$new_path" 2> /dev/null`
24812
24813    if test "x$new_path" = x; then
24814      # It's still not found. Now this is an unrecoverable error.
24815      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
24816$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
24817      has_space=`$ECHO "$complete" | $GREP " "`
24818      if test "x$has_space" != x; then
24819        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24820$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24821      fi
24822      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
24823    fi
24824  fi
24825
24826  # Now new_path has a complete unix path to the binary
24827  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24828    # Keep paths in /bin as-is, but remove trailing .exe if any
24829    new_path="${new_path/%.exe/}"
24830    # Do not save /bin paths to all_fixpath_prefixes!
24831  else
24832    # Not in mixed or Windows style, start by that.
24833    new_path=`cmd //c echo $new_path`
24834
24835  input_path="$new_path"
24836  # Check if we need to convert this using DOS-style short mode. If the path
24837  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24838  # take no chances and rewrite it.
24839  # Note: m4 eats our [], so we need to use [ and ] instead.
24840  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24841  if test "x$has_forbidden_chars" != x; then
24842    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24843    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24844  fi
24845
24846    # Output is in $new_path
24847
24848  windows_path="$new_path"
24849  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24850    unix_path=`$CYGPATH -u "$windows_path"`
24851    new_path="$unix_path"
24852  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24853    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24854    new_path="$unix_path"
24855  fi
24856
24857    # remove trailing .exe if any
24858    new_path="${new_path/%.exe/}"
24859
24860    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24861    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24862  fi
24863
24864  else
24865    # We're on a posix platform. Hooray! :)
24866    # First separate the path from the arguments. This will split at the first
24867    # space.
24868    complete="$CXXCPP"
24869    path="${complete%% *}"
24870    tmp="$complete EOL"
24871    arguments="${tmp#* }"
24872
24873    # Cannot rely on the command "which" here since it doesn't always work.
24874    is_absolute_path=`$ECHO "$path" | $GREP ^/`
24875    if test -z "$is_absolute_path"; then
24876      # Path to executable is not absolute. Find it.
24877      IFS_save="$IFS"
24878      IFS=:
24879      for p in $PATH; do
24880        if test -f "$p/$path" && test -x "$p/$path"; then
24881          new_path="$p/$path"
24882          break
24883        fi
24884      done
24885      IFS="$IFS_save"
24886    else
24887      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXXCPP (as $path) failed, using $path directly." >&5
24888$as_echo "$as_me: Resolving CXXCPP (as $path) failed, using $path directly." >&6;}
24889      new_path="$path"
24890    fi
24891
24892    if test "x$new_path" = x; then
24893        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
24894$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
24895        has_space=`$ECHO "$complete" | $GREP " "`
24896        if test "x$has_space" != x; then
24897          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24898$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24899        fi
24900        as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
24901      fi
24902  fi
24903
24904      # Now join together the path and the arguments once again
24905      if test "x$arguments" != xEOL; then
24906        new_complete="$new_path ${arguments% *}"
24907      else
24908        new_complete="$new_path"
24909      fi
24910
24911  if test "x$complete" != "x$new_complete"; then
24912      CXXCPP="$new_complete"
24913      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
24914$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
24915    fi
24916
24917
24918if test "x$COMPILE_TYPE" != "xcross"; then
24919    # If we are not cross compiling, use the same compilers for
24920    # building the build platform executables. The cross-compilation
24921    # case needed to be done earlier, but this can only be done after
24922    # the native tools have been localized.
24923    BUILD_CC="$CC"
24924    BUILD_CXX="$CXX"
24925    BUILD_LD="$LD"
24926fi
24927
24928# for solaris we really need solaris tools, and not gnu equivalent
24929#   these seems to normally reside in /usr/ccs/bin so add that to path before
24930#   starting to probe
24931#
24932#   NOTE: I add this /usr/ccs/bin after TOOLS but before OLD_PATH
24933#         so that it can be overriden --with-tools-dir
24934if test "x$OPENJDK_BUILD_OS" = xsolaris; then
24935    PATH="${TOOLS_DIR}:/usr/ccs/bin:${OLD_PATH}"
24936fi
24937
24938# Find the right assembler.
24939if test "x$OPENJDK_TARGET_OS" = xsolaris; then
24940    # Extract the first word of "as", so it can be a program name with args.
24941set dummy as; ac_word=$2
24942{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24943$as_echo_n "checking for $ac_word... " >&6; }
24944if ${ac_cv_path_AS+:} false; then :
24945  $as_echo_n "(cached) " >&6
24946else
24947  case $AS in
24948  [\\/]* | ?:[\\/]*)
24949  ac_cv_path_AS="$AS" # Let the user override the test with a path.
24950  ;;
24951  *)
24952  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24953for as_dir in $PATH
24954do
24955  IFS=$as_save_IFS
24956  test -z "$as_dir" && as_dir=.
24957    for ac_exec_ext in '' $ac_executable_extensions; do
24958  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24959    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
24960    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24961    break 2
24962  fi
24963done
24964  done
24965IFS=$as_save_IFS
24966
24967  ;;
24968esac
24969fi
24970AS=$ac_cv_path_AS
24971if test -n "$AS"; then
24972  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
24973$as_echo "$AS" >&6; }
24974else
24975  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24976$as_echo "no" >&6; }
24977fi
24978
24979
24980
24981  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24982
24983  # First separate the path from the arguments. This will split at the first
24984  # space.
24985  complete="$AS"
24986  path="${complete%% *}"
24987  tmp="$complete EOL"
24988  arguments="${tmp#* }"
24989
24990  # Input might be given as Windows format, start by converting to
24991  # unix format.
24992  new_path=`$CYGPATH -u "$path"`
24993
24994  # Now try to locate executable using which
24995  new_path=`$WHICH "$new_path" 2> /dev/null`
24996  # bat and cmd files are not always considered executable in cygwin causing which
24997  # to not find them
24998  if test "x$new_path" = x \
24999           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25000           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25001    new_path=`$CYGPATH -u "$path"`
25002  fi
25003  if test "x$new_path" = x; then
25004    # Oops. Which didn't find the executable.
25005    # The splitting of arguments from the executable at a space might have been incorrect,
25006    # since paths with space are more likely in Windows. Give it another try with the whole
25007    # argument.
25008    path="$complete"
25009    arguments="EOL"
25010    new_path=`$CYGPATH -u "$path"`
25011    new_path=`$WHICH "$new_path" 2> /dev/null`
25012    # bat and cmd files are not always considered executable in cygwin causing which
25013    # to not find them
25014    if test "x$new_path" = x \
25015             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25016             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25017      new_path=`$CYGPATH -u "$path"`
25018    fi
25019    if test "x$new_path" = x; then
25020      # It's still not found. Now this is an unrecoverable error.
25021      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
25022$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
25023      has_space=`$ECHO "$complete" | $GREP " "`
25024      if test "x$has_space" != x; then
25025        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25026$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25027      fi
25028      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25029    fi
25030  fi
25031
25032  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25033  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25034  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25035  # "foo.exe" is OK but "foo" is an error.
25036  #
25037  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25038  # It is also a way to make sure we got the proper file name for the real test later on.
25039  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25040  if test "x$test_shortpath" = x; then
25041    # Short path failed, file does not exist as specified.
25042    # Try adding .exe or .cmd
25043    if test -f "${new_path}.exe"; then
25044       input_to_shortpath="${new_path}.exe"
25045    elif test -f "${new_path}.cmd"; then
25046       input_to_shortpath="${new_path}.cmd"
25047    else
25048      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
25049$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
25050      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25051$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25052      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25053    fi
25054  else
25055    input_to_shortpath="$new_path"
25056  fi
25057
25058  # Call helper function which possibly converts this using DOS-style short mode.
25059  # If so, the updated path is stored in $new_path.
25060  new_path="$input_to_shortpath"
25061
25062  input_path="$input_to_shortpath"
25063  # Check if we need to convert this using DOS-style short mode. If the path
25064  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25065  # take no chances and rewrite it.
25066  # Note: m4 eats our [], so we need to use [ and ] instead.
25067  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25068  if test "x$has_forbidden_chars" != x; then
25069    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25070    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25071    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25072    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25073      # Going to short mode and back again did indeed matter. Since short mode is
25074      # case insensitive, let's make it lowercase to improve readability.
25075      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25076      # Now convert it back to Unix-stile (cygpath)
25077      input_path=`$CYGPATH -u "$shortmode_path"`
25078      new_path="$input_path"
25079    fi
25080  fi
25081
25082  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25083  if test "x$test_cygdrive_prefix" = x; then
25084    # As a simple fix, exclude /usr/bin since it's not a real path.
25085    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25086      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25087      # a path prefixed by /cygdrive for fixpath to work.
25088      new_path="$CYGWIN_ROOT_PATH$input_path"
25089    fi
25090  fi
25091
25092  # remove trailing .exe if any
25093  new_path="${new_path/%.exe/}"
25094
25095  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25096
25097  # First separate the path from the arguments. This will split at the first
25098  # space.
25099  complete="$AS"
25100  path="${complete%% *}"
25101  tmp="$complete EOL"
25102  arguments="${tmp#* }"
25103
25104  # Input might be given as Windows format, start by converting to
25105  # unix format.
25106  new_path="$path"
25107
25108  windows_path="$new_path"
25109  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25110    unix_path=`$CYGPATH -u "$windows_path"`
25111    new_path="$unix_path"
25112  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25113    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25114    new_path="$unix_path"
25115  fi
25116
25117
25118  # Now try to locate executable using which
25119  new_path=`$WHICH "$new_path" 2> /dev/null`
25120
25121  if test "x$new_path" = x; then
25122    # Oops. Which didn't find the executable.
25123    # The splitting of arguments from the executable at a space might have been incorrect,
25124    # since paths with space are more likely in Windows. Give it another try with the whole
25125    # argument.
25126    path="$complete"
25127    arguments="EOL"
25128    new_path="$path"
25129
25130  windows_path="$new_path"
25131  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25132    unix_path=`$CYGPATH -u "$windows_path"`
25133    new_path="$unix_path"
25134  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25135    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25136    new_path="$unix_path"
25137  fi
25138
25139
25140    new_path=`$WHICH "$new_path" 2> /dev/null`
25141
25142    if test "x$new_path" = x; then
25143      # It's still not found. Now this is an unrecoverable error.
25144      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
25145$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
25146      has_space=`$ECHO "$complete" | $GREP " "`
25147      if test "x$has_space" != x; then
25148        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25149$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25150      fi
25151      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25152    fi
25153  fi
25154
25155  # Now new_path has a complete unix path to the binary
25156  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25157    # Keep paths in /bin as-is, but remove trailing .exe if any
25158    new_path="${new_path/%.exe/}"
25159    # Do not save /bin paths to all_fixpath_prefixes!
25160  else
25161    # Not in mixed or Windows style, start by that.
25162    new_path=`cmd //c echo $new_path`
25163
25164  input_path="$new_path"
25165  # Check if we need to convert this using DOS-style short mode. If the path
25166  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25167  # take no chances and rewrite it.
25168  # Note: m4 eats our [], so we need to use [ and ] instead.
25169  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25170  if test "x$has_forbidden_chars" != x; then
25171    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25172    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25173  fi
25174
25175    # Output is in $new_path
25176
25177  windows_path="$new_path"
25178  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25179    unix_path=`$CYGPATH -u "$windows_path"`
25180    new_path="$unix_path"
25181  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25182    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25183    new_path="$unix_path"
25184  fi
25185
25186    # remove trailing .exe if any
25187    new_path="${new_path/%.exe/}"
25188
25189    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25190    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25191  fi
25192
25193  else
25194    # We're on a posix platform. Hooray! :)
25195    # First separate the path from the arguments. This will split at the first
25196    # space.
25197    complete="$AS"
25198    path="${complete%% *}"
25199    tmp="$complete EOL"
25200    arguments="${tmp#* }"
25201
25202    # Cannot rely on the command "which" here since it doesn't always work.
25203    is_absolute_path=`$ECHO "$path" | $GREP ^/`
25204    if test -z "$is_absolute_path"; then
25205      # Path to executable is not absolute. Find it.
25206      IFS_save="$IFS"
25207      IFS=:
25208      for p in $PATH; do
25209        if test -f "$p/$path" && test -x "$p/$path"; then
25210          new_path="$p/$path"
25211          break
25212        fi
25213      done
25214      IFS="$IFS_save"
25215    else
25216      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AS (as $path) failed, using $path directly." >&5
25217$as_echo "$as_me: Resolving AS (as $path) failed, using $path directly." >&6;}
25218      new_path="$path"
25219    fi
25220
25221    if test "x$new_path" = x; then
25222        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
25223$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
25224        has_space=`$ECHO "$complete" | $GREP " "`
25225        if test "x$has_space" != x; then
25226          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25227$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25228        fi
25229        as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25230      fi
25231  fi
25232
25233      # Now join together the path and the arguments once again
25234      if test "x$arguments" != xEOL; then
25235        new_complete="$new_path ${arguments% *}"
25236      else
25237        new_complete="$new_path"
25238      fi
25239
25240  if test "x$complete" != "x$new_complete"; then
25241      AS="$new_complete"
25242      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
25243$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
25244    fi
25245
25246else
25247    AS="$CC -c"
25248fi
25249
25250
25251if test "x$OPENJDK_TARGET_OS" = xsolaris; then
25252    # Extract the first word of "nm", so it can be a program name with args.
25253set dummy nm; ac_word=$2
25254{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25255$as_echo_n "checking for $ac_word... " >&6; }
25256if ${ac_cv_path_NM+:} false; then :
25257  $as_echo_n "(cached) " >&6
25258else
25259  case $NM in
25260  [\\/]* | ?:[\\/]*)
25261  ac_cv_path_NM="$NM" # Let the user override the test with a path.
25262  ;;
25263  *)
25264  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25265for as_dir in $PATH
25266do
25267  IFS=$as_save_IFS
25268  test -z "$as_dir" && as_dir=.
25269    for ac_exec_ext in '' $ac_executable_extensions; do
25270  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25271    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
25272    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25273    break 2
25274  fi
25275done
25276  done
25277IFS=$as_save_IFS
25278
25279  ;;
25280esac
25281fi
25282NM=$ac_cv_path_NM
25283if test -n "$NM"; then
25284  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
25285$as_echo "$NM" >&6; }
25286else
25287  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25288$as_echo "no" >&6; }
25289fi
25290
25291
25292
25293  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25294
25295  # First separate the path from the arguments. This will split at the first
25296  # space.
25297  complete="$NM"
25298  path="${complete%% *}"
25299  tmp="$complete EOL"
25300  arguments="${tmp#* }"
25301
25302  # Input might be given as Windows format, start by converting to
25303  # unix format.
25304  new_path=`$CYGPATH -u "$path"`
25305
25306  # Now try to locate executable using which
25307  new_path=`$WHICH "$new_path" 2> /dev/null`
25308  # bat and cmd files are not always considered executable in cygwin causing which
25309  # to not find them
25310  if test "x$new_path" = x \
25311           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25312           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25313    new_path=`$CYGPATH -u "$path"`
25314  fi
25315  if test "x$new_path" = x; then
25316    # Oops. Which didn't find the executable.
25317    # The splitting of arguments from the executable at a space might have been incorrect,
25318    # since paths with space are more likely in Windows. Give it another try with the whole
25319    # argument.
25320    path="$complete"
25321    arguments="EOL"
25322    new_path=`$CYGPATH -u "$path"`
25323    new_path=`$WHICH "$new_path" 2> /dev/null`
25324    # bat and cmd files are not always considered executable in cygwin causing which
25325    # to not find them
25326    if test "x$new_path" = x \
25327             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25328             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25329      new_path=`$CYGPATH -u "$path"`
25330    fi
25331    if test "x$new_path" = x; then
25332      # It's still not found. Now this is an unrecoverable error.
25333      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25334$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25335      has_space=`$ECHO "$complete" | $GREP " "`
25336      if test "x$has_space" != x; then
25337        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25338$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25339      fi
25340      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25341    fi
25342  fi
25343
25344  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25345  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25346  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25347  # "foo.exe" is OK but "foo" is an error.
25348  #
25349  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25350  # It is also a way to make sure we got the proper file name for the real test later on.
25351  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25352  if test "x$test_shortpath" = x; then
25353    # Short path failed, file does not exist as specified.
25354    # Try adding .exe or .cmd
25355    if test -f "${new_path}.exe"; then
25356       input_to_shortpath="${new_path}.exe"
25357    elif test -f "${new_path}.cmd"; then
25358       input_to_shortpath="${new_path}.cmd"
25359    else
25360      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
25361$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
25362      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25363$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25364      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25365    fi
25366  else
25367    input_to_shortpath="$new_path"
25368  fi
25369
25370  # Call helper function which possibly converts this using DOS-style short mode.
25371  # If so, the updated path is stored in $new_path.
25372  new_path="$input_to_shortpath"
25373
25374  input_path="$input_to_shortpath"
25375  # Check if we need to convert this using DOS-style short mode. If the path
25376  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25377  # take no chances and rewrite it.
25378  # Note: m4 eats our [], so we need to use [ and ] instead.
25379  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25380  if test "x$has_forbidden_chars" != x; then
25381    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25382    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25383    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25384    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25385      # Going to short mode and back again did indeed matter. Since short mode is
25386      # case insensitive, let's make it lowercase to improve readability.
25387      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25388      # Now convert it back to Unix-stile (cygpath)
25389      input_path=`$CYGPATH -u "$shortmode_path"`
25390      new_path="$input_path"
25391    fi
25392  fi
25393
25394  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25395  if test "x$test_cygdrive_prefix" = x; then
25396    # As a simple fix, exclude /usr/bin since it's not a real path.
25397    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25398      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25399      # a path prefixed by /cygdrive for fixpath to work.
25400      new_path="$CYGWIN_ROOT_PATH$input_path"
25401    fi
25402  fi
25403
25404  # remove trailing .exe if any
25405  new_path="${new_path/%.exe/}"
25406
25407  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25408
25409  # First separate the path from the arguments. This will split at the first
25410  # space.
25411  complete="$NM"
25412  path="${complete%% *}"
25413  tmp="$complete EOL"
25414  arguments="${tmp#* }"
25415
25416  # Input might be given as Windows format, start by converting to
25417  # unix format.
25418  new_path="$path"
25419
25420  windows_path="$new_path"
25421  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25422    unix_path=`$CYGPATH -u "$windows_path"`
25423    new_path="$unix_path"
25424  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25425    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25426    new_path="$unix_path"
25427  fi
25428
25429
25430  # Now try to locate executable using which
25431  new_path=`$WHICH "$new_path" 2> /dev/null`
25432
25433  if test "x$new_path" = x; then
25434    # Oops. Which didn't find the executable.
25435    # The splitting of arguments from the executable at a space might have been incorrect,
25436    # since paths with space are more likely in Windows. Give it another try with the whole
25437    # argument.
25438    path="$complete"
25439    arguments="EOL"
25440    new_path="$path"
25441
25442  windows_path="$new_path"
25443  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25444    unix_path=`$CYGPATH -u "$windows_path"`
25445    new_path="$unix_path"
25446  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25447    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25448    new_path="$unix_path"
25449  fi
25450
25451
25452    new_path=`$WHICH "$new_path" 2> /dev/null`
25453
25454    if test "x$new_path" = x; then
25455      # It's still not found. Now this is an unrecoverable error.
25456      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25457$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25458      has_space=`$ECHO "$complete" | $GREP " "`
25459      if test "x$has_space" != x; then
25460        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25461$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25462      fi
25463      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25464    fi
25465  fi
25466
25467  # Now new_path has a complete unix path to the binary
25468  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25469    # Keep paths in /bin as-is, but remove trailing .exe if any
25470    new_path="${new_path/%.exe/}"
25471    # Do not save /bin paths to all_fixpath_prefixes!
25472  else
25473    # Not in mixed or Windows style, start by that.
25474    new_path=`cmd //c echo $new_path`
25475
25476  input_path="$new_path"
25477  # Check if we need to convert this using DOS-style short mode. If the path
25478  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25479  # take no chances and rewrite it.
25480  # Note: m4 eats our [], so we need to use [ and ] instead.
25481  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25482  if test "x$has_forbidden_chars" != x; then
25483    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25484    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25485  fi
25486
25487    # Output is in $new_path
25488
25489  windows_path="$new_path"
25490  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25491    unix_path=`$CYGPATH -u "$windows_path"`
25492    new_path="$unix_path"
25493  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25494    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25495    new_path="$unix_path"
25496  fi
25497
25498    # remove trailing .exe if any
25499    new_path="${new_path/%.exe/}"
25500
25501    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25502    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25503  fi
25504
25505  else
25506    # We're on a posix platform. Hooray! :)
25507    # First separate the path from the arguments. This will split at the first
25508    # space.
25509    complete="$NM"
25510    path="${complete%% *}"
25511    tmp="$complete EOL"
25512    arguments="${tmp#* }"
25513
25514    # Cannot rely on the command "which" here since it doesn't always work.
25515    is_absolute_path=`$ECHO "$path" | $GREP ^/`
25516    if test -z "$is_absolute_path"; then
25517      # Path to executable is not absolute. Find it.
25518      IFS_save="$IFS"
25519      IFS=:
25520      for p in $PATH; do
25521        if test -f "$p/$path" && test -x "$p/$path"; then
25522          new_path="$p/$path"
25523          break
25524        fi
25525      done
25526      IFS="$IFS_save"
25527    else
25528      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) failed, using $path directly." >&5
25529$as_echo "$as_me: Resolving NM (as $path) failed, using $path directly." >&6;}
25530      new_path="$path"
25531    fi
25532
25533    if test "x$new_path" = x; then
25534        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25535$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25536        has_space=`$ECHO "$complete" | $GREP " "`
25537        if test "x$has_space" != x; then
25538          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25539$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25540        fi
25541        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25542      fi
25543  fi
25544
25545      # Now join together the path and the arguments once again
25546      if test "x$arguments" != xEOL; then
25547        new_complete="$new_path ${arguments% *}"
25548      else
25549        new_complete="$new_path"
25550      fi
25551
25552  if test "x$complete" != "x$new_complete"; then
25553      NM="$new_complete"
25554      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
25555$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
25556    fi
25557
25558    # Extract the first word of "gnm", so it can be a program name with args.
25559set dummy gnm; ac_word=$2
25560{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25561$as_echo_n "checking for $ac_word... " >&6; }
25562if ${ac_cv_path_GNM+:} false; then :
25563  $as_echo_n "(cached) " >&6
25564else
25565  case $GNM in
25566  [\\/]* | ?:[\\/]*)
25567  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
25568  ;;
25569  *)
25570  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25571for as_dir in $PATH
25572do
25573  IFS=$as_save_IFS
25574  test -z "$as_dir" && as_dir=.
25575    for ac_exec_ext in '' $ac_executable_extensions; do
25576  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25577    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
25578    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25579    break 2
25580  fi
25581done
25582  done
25583IFS=$as_save_IFS
25584
25585  ;;
25586esac
25587fi
25588GNM=$ac_cv_path_GNM
25589if test -n "$GNM"; then
25590  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
25591$as_echo "$GNM" >&6; }
25592else
25593  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25594$as_echo "no" >&6; }
25595fi
25596
25597
25598
25599  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25600
25601  # First separate the path from the arguments. This will split at the first
25602  # space.
25603  complete="$GNM"
25604  path="${complete%% *}"
25605  tmp="$complete EOL"
25606  arguments="${tmp#* }"
25607
25608  # Input might be given as Windows format, start by converting to
25609  # unix format.
25610  new_path=`$CYGPATH -u "$path"`
25611
25612  # Now try to locate executable using which
25613  new_path=`$WHICH "$new_path" 2> /dev/null`
25614  # bat and cmd files are not always considered executable in cygwin causing which
25615  # to not find them
25616  if test "x$new_path" = x \
25617           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25618           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25619    new_path=`$CYGPATH -u "$path"`
25620  fi
25621  if test "x$new_path" = x; then
25622    # Oops. Which didn't find the executable.
25623    # The splitting of arguments from the executable at a space might have been incorrect,
25624    # since paths with space are more likely in Windows. Give it another try with the whole
25625    # argument.
25626    path="$complete"
25627    arguments="EOL"
25628    new_path=`$CYGPATH -u "$path"`
25629    new_path=`$WHICH "$new_path" 2> /dev/null`
25630    # bat and cmd files are not always considered executable in cygwin causing which
25631    # to not find them
25632    if test "x$new_path" = x \
25633             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25634             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25635      new_path=`$CYGPATH -u "$path"`
25636    fi
25637    if test "x$new_path" = x; then
25638      # It's still not found. Now this is an unrecoverable error.
25639      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
25640$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
25641      has_space=`$ECHO "$complete" | $GREP " "`
25642      if test "x$has_space" != x; then
25643        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25644$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25645      fi
25646      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
25647    fi
25648  fi
25649
25650  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25651  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25652  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25653  # "foo.exe" is OK but "foo" is an error.
25654  #
25655  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25656  # It is also a way to make sure we got the proper file name for the real test later on.
25657  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25658  if test "x$test_shortpath" = x; then
25659    # Short path failed, file does not exist as specified.
25660    # Try adding .exe or .cmd
25661    if test -f "${new_path}.exe"; then
25662       input_to_shortpath="${new_path}.exe"
25663    elif test -f "${new_path}.cmd"; then
25664       input_to_shortpath="${new_path}.cmd"
25665    else
25666      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
25667$as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
25668      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25669$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25670      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
25671    fi
25672  else
25673    input_to_shortpath="$new_path"
25674  fi
25675
25676  # Call helper function which possibly converts this using DOS-style short mode.
25677  # If so, the updated path is stored in $new_path.
25678  new_path="$input_to_shortpath"
25679
25680  input_path="$input_to_shortpath"
25681  # Check if we need to convert this using DOS-style short mode. If the path
25682  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25683  # take no chances and rewrite it.
25684  # Note: m4 eats our [], so we need to use [ and ] instead.
25685  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25686  if test "x$has_forbidden_chars" != x; then
25687    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25688    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25689    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25690    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25691      # Going to short mode and back again did indeed matter. Since short mode is
25692      # case insensitive, let's make it lowercase to improve readability.
25693      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25694      # Now convert it back to Unix-stile (cygpath)
25695      input_path=`$CYGPATH -u "$shortmode_path"`
25696      new_path="$input_path"
25697    fi
25698  fi
25699
25700  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25701  if test "x$test_cygdrive_prefix" = x; then
25702    # As a simple fix, exclude /usr/bin since it's not a real path.
25703    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25704      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25705      # a path prefixed by /cygdrive for fixpath to work.
25706      new_path="$CYGWIN_ROOT_PATH$input_path"
25707    fi
25708  fi
25709
25710  # remove trailing .exe if any
25711  new_path="${new_path/%.exe/}"
25712
25713  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25714
25715  # First separate the path from the arguments. This will split at the first
25716  # space.
25717  complete="$GNM"
25718  path="${complete%% *}"
25719  tmp="$complete EOL"
25720  arguments="${tmp#* }"
25721
25722  # Input might be given as Windows format, start by converting to
25723  # unix format.
25724  new_path="$path"
25725
25726  windows_path="$new_path"
25727  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25728    unix_path=`$CYGPATH -u "$windows_path"`
25729    new_path="$unix_path"
25730  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25731    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25732    new_path="$unix_path"
25733  fi
25734
25735
25736  # Now try to locate executable using which
25737  new_path=`$WHICH "$new_path" 2> /dev/null`
25738
25739  if test "x$new_path" = x; then
25740    # Oops. Which didn't find the executable.
25741    # The splitting of arguments from the executable at a space might have been incorrect,
25742    # since paths with space are more likely in Windows. Give it another try with the whole
25743    # argument.
25744    path="$complete"
25745    arguments="EOL"
25746    new_path="$path"
25747
25748  windows_path="$new_path"
25749  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25750    unix_path=`$CYGPATH -u "$windows_path"`
25751    new_path="$unix_path"
25752  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25753    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25754    new_path="$unix_path"
25755  fi
25756
25757
25758    new_path=`$WHICH "$new_path" 2> /dev/null`
25759
25760    if test "x$new_path" = x; then
25761      # It's still not found. Now this is an unrecoverable error.
25762      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
25763$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
25764      has_space=`$ECHO "$complete" | $GREP " "`
25765      if test "x$has_space" != x; then
25766        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25767$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25768      fi
25769      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
25770    fi
25771  fi
25772
25773  # Now new_path has a complete unix path to the binary
25774  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25775    # Keep paths in /bin as-is, but remove trailing .exe if any
25776    new_path="${new_path/%.exe/}"
25777    # Do not save /bin paths to all_fixpath_prefixes!
25778  else
25779    # Not in mixed or Windows style, start by that.
25780    new_path=`cmd //c echo $new_path`
25781
25782  input_path="$new_path"
25783  # Check if we need to convert this using DOS-style short mode. If the path
25784  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25785  # take no chances and rewrite it.
25786  # Note: m4 eats our [], so we need to use [ and ] instead.
25787  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25788  if test "x$has_forbidden_chars" != x; then
25789    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25790    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25791  fi
25792
25793    # Output is in $new_path
25794
25795  windows_path="$new_path"
25796  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25797    unix_path=`$CYGPATH -u "$windows_path"`
25798    new_path="$unix_path"
25799  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25800    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25801    new_path="$unix_path"
25802  fi
25803
25804    # remove trailing .exe if any
25805    new_path="${new_path/%.exe/}"
25806
25807    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25808    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25809  fi
25810
25811  else
25812    # We're on a posix platform. Hooray! :)
25813    # First separate the path from the arguments. This will split at the first
25814    # space.
25815    complete="$GNM"
25816    path="${complete%% *}"
25817    tmp="$complete EOL"
25818    arguments="${tmp#* }"
25819
25820    # Cannot rely on the command "which" here since it doesn't always work.
25821    is_absolute_path=`$ECHO "$path" | $GREP ^/`
25822    if test -z "$is_absolute_path"; then
25823      # Path to executable is not absolute. Find it.
25824      IFS_save="$IFS"
25825      IFS=:
25826      for p in $PATH; do
25827        if test -f "$p/$path" && test -x "$p/$path"; then
25828          new_path="$p/$path"
25829          break
25830        fi
25831      done
25832      IFS="$IFS_save"
25833    else
25834      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving GNM (as $path) failed, using $path directly." >&5
25835$as_echo "$as_me: Resolving GNM (as $path) failed, using $path directly." >&6;}
25836      new_path="$path"
25837    fi
25838
25839    if test "x$new_path" = x; then
25840        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
25841$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
25842        has_space=`$ECHO "$complete" | $GREP " "`
25843        if test "x$has_space" != x; then
25844          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25845$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25846        fi
25847        as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
25848      fi
25849  fi
25850
25851      # Now join together the path and the arguments once again
25852      if test "x$arguments" != xEOL; then
25853        new_complete="$new_path ${arguments% *}"
25854      else
25855        new_complete="$new_path"
25856      fi
25857
25858  if test "x$complete" != "x$new_complete"; then
25859      GNM="$new_complete"
25860      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
25861$as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
25862    fi
25863
25864    # Extract the first word of "strip", so it can be a program name with args.
25865set dummy strip; ac_word=$2
25866{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25867$as_echo_n "checking for $ac_word... " >&6; }
25868if ${ac_cv_path_STRIP+:} false; then :
25869  $as_echo_n "(cached) " >&6
25870else
25871  case $STRIP in
25872  [\\/]* | ?:[\\/]*)
25873  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
25874  ;;
25875  *)
25876  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25877for as_dir in $PATH
25878do
25879  IFS=$as_save_IFS
25880  test -z "$as_dir" && as_dir=.
25881    for ac_exec_ext in '' $ac_executable_extensions; do
25882  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25883    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
25884    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25885    break 2
25886  fi
25887done
25888  done
25889IFS=$as_save_IFS
25890
25891  ;;
25892esac
25893fi
25894STRIP=$ac_cv_path_STRIP
25895if test -n "$STRIP"; then
25896  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
25897$as_echo "$STRIP" >&6; }
25898else
25899  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25900$as_echo "no" >&6; }
25901fi
25902
25903
25904
25905  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25906
25907  # First separate the path from the arguments. This will split at the first
25908  # space.
25909  complete="$STRIP"
25910  path="${complete%% *}"
25911  tmp="$complete EOL"
25912  arguments="${tmp#* }"
25913
25914  # Input might be given as Windows format, start by converting to
25915  # unix format.
25916  new_path=`$CYGPATH -u "$path"`
25917
25918  # Now try to locate executable using which
25919  new_path=`$WHICH "$new_path" 2> /dev/null`
25920  # bat and cmd files are not always considered executable in cygwin causing which
25921  # to not find them
25922  if test "x$new_path" = x \
25923           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25924           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25925    new_path=`$CYGPATH -u "$path"`
25926  fi
25927  if test "x$new_path" = x; then
25928    # Oops. Which didn't find the executable.
25929    # The splitting of arguments from the executable at a space might have been incorrect,
25930    # since paths with space are more likely in Windows. Give it another try with the whole
25931    # argument.
25932    path="$complete"
25933    arguments="EOL"
25934    new_path=`$CYGPATH -u "$path"`
25935    new_path=`$WHICH "$new_path" 2> /dev/null`
25936    # bat and cmd files are not always considered executable in cygwin causing which
25937    # to not find them
25938    if test "x$new_path" = x \
25939             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25940             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25941      new_path=`$CYGPATH -u "$path"`
25942    fi
25943    if test "x$new_path" = x; then
25944      # It's still not found. Now this is an unrecoverable error.
25945      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
25946$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
25947      has_space=`$ECHO "$complete" | $GREP " "`
25948      if test "x$has_space" != x; then
25949        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25950$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25951      fi
25952      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
25953    fi
25954  fi
25955
25956  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25957  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25958  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25959  # "foo.exe" is OK but "foo" is an error.
25960  #
25961  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25962  # It is also a way to make sure we got the proper file name for the real test later on.
25963  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25964  if test "x$test_shortpath" = x; then
25965    # Short path failed, file does not exist as specified.
25966    # Try adding .exe or .cmd
25967    if test -f "${new_path}.exe"; then
25968       input_to_shortpath="${new_path}.exe"
25969    elif test -f "${new_path}.cmd"; then
25970       input_to_shortpath="${new_path}.cmd"
25971    else
25972      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
25973$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
25974      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25975$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25976      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
25977    fi
25978  else
25979    input_to_shortpath="$new_path"
25980  fi
25981
25982  # Call helper function which possibly converts this using DOS-style short mode.
25983  # If so, the updated path is stored in $new_path.
25984  new_path="$input_to_shortpath"
25985
25986  input_path="$input_to_shortpath"
25987  # Check if we need to convert this using DOS-style short mode. If the path
25988  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25989  # take no chances and rewrite it.
25990  # Note: m4 eats our [], so we need to use [ and ] instead.
25991  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25992  if test "x$has_forbidden_chars" != x; then
25993    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25994    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25995    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25996    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25997      # Going to short mode and back again did indeed matter. Since short mode is
25998      # case insensitive, let's make it lowercase to improve readability.
25999      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26000      # Now convert it back to Unix-stile (cygpath)
26001      input_path=`$CYGPATH -u "$shortmode_path"`
26002      new_path="$input_path"
26003    fi
26004  fi
26005
26006  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26007  if test "x$test_cygdrive_prefix" = x; then
26008    # As a simple fix, exclude /usr/bin since it's not a real path.
26009    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26010      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26011      # a path prefixed by /cygdrive for fixpath to work.
26012      new_path="$CYGWIN_ROOT_PATH$input_path"
26013    fi
26014  fi
26015
26016  # remove trailing .exe if any
26017  new_path="${new_path/%.exe/}"
26018
26019  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26020
26021  # First separate the path from the arguments. This will split at the first
26022  # space.
26023  complete="$STRIP"
26024  path="${complete%% *}"
26025  tmp="$complete EOL"
26026  arguments="${tmp#* }"
26027
26028  # Input might be given as Windows format, start by converting to
26029  # unix format.
26030  new_path="$path"
26031
26032  windows_path="$new_path"
26033  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26034    unix_path=`$CYGPATH -u "$windows_path"`
26035    new_path="$unix_path"
26036  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26037    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26038    new_path="$unix_path"
26039  fi
26040
26041
26042  # Now try to locate executable using which
26043  new_path=`$WHICH "$new_path" 2> /dev/null`
26044
26045  if test "x$new_path" = x; then
26046    # Oops. Which didn't find the executable.
26047    # The splitting of arguments from the executable at a space might have been incorrect,
26048    # since paths with space are more likely in Windows. Give it another try with the whole
26049    # argument.
26050    path="$complete"
26051    arguments="EOL"
26052    new_path="$path"
26053
26054  windows_path="$new_path"
26055  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26056    unix_path=`$CYGPATH -u "$windows_path"`
26057    new_path="$unix_path"
26058  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26059    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26060    new_path="$unix_path"
26061  fi
26062
26063
26064    new_path=`$WHICH "$new_path" 2> /dev/null`
26065
26066    if test "x$new_path" = x; then
26067      # It's still not found. Now this is an unrecoverable error.
26068      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26069$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26070      has_space=`$ECHO "$complete" | $GREP " "`
26071      if test "x$has_space" != x; then
26072        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26073$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26074      fi
26075      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26076    fi
26077  fi
26078
26079  # Now new_path has a complete unix path to the binary
26080  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26081    # Keep paths in /bin as-is, but remove trailing .exe if any
26082    new_path="${new_path/%.exe/}"
26083    # Do not save /bin paths to all_fixpath_prefixes!
26084  else
26085    # Not in mixed or Windows style, start by that.
26086    new_path=`cmd //c echo $new_path`
26087
26088  input_path="$new_path"
26089  # Check if we need to convert this using DOS-style short mode. If the path
26090  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26091  # take no chances and rewrite it.
26092  # Note: m4 eats our [], so we need to use [ and ] instead.
26093  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26094  if test "x$has_forbidden_chars" != x; then
26095    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26096    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26097  fi
26098
26099    # Output is in $new_path
26100
26101  windows_path="$new_path"
26102  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26103    unix_path=`$CYGPATH -u "$windows_path"`
26104    new_path="$unix_path"
26105  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26106    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26107    new_path="$unix_path"
26108  fi
26109
26110    # remove trailing .exe if any
26111    new_path="${new_path/%.exe/}"
26112
26113    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26114    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26115  fi
26116
26117  else
26118    # We're on a posix platform. Hooray! :)
26119    # First separate the path from the arguments. This will split at the first
26120    # space.
26121    complete="$STRIP"
26122    path="${complete%% *}"
26123    tmp="$complete EOL"
26124    arguments="${tmp#* }"
26125
26126    # Cannot rely on the command "which" here since it doesn't always work.
26127    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26128    if test -z "$is_absolute_path"; then
26129      # Path to executable is not absolute. Find it.
26130      IFS_save="$IFS"
26131      IFS=:
26132      for p in $PATH; do
26133        if test -f "$p/$path" && test -x "$p/$path"; then
26134          new_path="$p/$path"
26135          break
26136        fi
26137      done
26138      IFS="$IFS_save"
26139    else
26140      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) failed, using $path directly." >&5
26141$as_echo "$as_me: Resolving STRIP (as $path) failed, using $path directly." >&6;}
26142      new_path="$path"
26143    fi
26144
26145    if test "x$new_path" = x; then
26146        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26147$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26148        has_space=`$ECHO "$complete" | $GREP " "`
26149        if test "x$has_space" != x; then
26150          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26151$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26152        fi
26153        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26154      fi
26155  fi
26156
26157      # Now join together the path and the arguments once again
26158      if test "x$arguments" != xEOL; then
26159        new_complete="$new_path ${arguments% *}"
26160      else
26161        new_complete="$new_path"
26162      fi
26163
26164  if test "x$complete" != "x$new_complete"; then
26165      STRIP="$new_complete"
26166      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
26167$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
26168    fi
26169
26170    # Extract the first word of "mcs", so it can be a program name with args.
26171set dummy mcs; ac_word=$2
26172{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26173$as_echo_n "checking for $ac_word... " >&6; }
26174if ${ac_cv_path_MCS+:} false; then :
26175  $as_echo_n "(cached) " >&6
26176else
26177  case $MCS in
26178  [\\/]* | ?:[\\/]*)
26179  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
26180  ;;
26181  *)
26182  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26183for as_dir in $PATH
26184do
26185  IFS=$as_save_IFS
26186  test -z "$as_dir" && as_dir=.
26187    for ac_exec_ext in '' $ac_executable_extensions; do
26188  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26189    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
26190    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26191    break 2
26192  fi
26193done
26194  done
26195IFS=$as_save_IFS
26196
26197  ;;
26198esac
26199fi
26200MCS=$ac_cv_path_MCS
26201if test -n "$MCS"; then
26202  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
26203$as_echo "$MCS" >&6; }
26204else
26205  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26206$as_echo "no" >&6; }
26207fi
26208
26209
26210
26211  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26212
26213  # First separate the path from the arguments. This will split at the first
26214  # space.
26215  complete="$MCS"
26216  path="${complete%% *}"
26217  tmp="$complete EOL"
26218  arguments="${tmp#* }"
26219
26220  # Input might be given as Windows format, start by converting to
26221  # unix format.
26222  new_path=`$CYGPATH -u "$path"`
26223
26224  # Now try to locate executable using which
26225  new_path=`$WHICH "$new_path" 2> /dev/null`
26226  # bat and cmd files are not always considered executable in cygwin causing which
26227  # to not find them
26228  if test "x$new_path" = x \
26229           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26230           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26231    new_path=`$CYGPATH -u "$path"`
26232  fi
26233  if test "x$new_path" = x; then
26234    # Oops. Which didn't find the executable.
26235    # The splitting of arguments from the executable at a space might have been incorrect,
26236    # since paths with space are more likely in Windows. Give it another try with the whole
26237    # argument.
26238    path="$complete"
26239    arguments="EOL"
26240    new_path=`$CYGPATH -u "$path"`
26241    new_path=`$WHICH "$new_path" 2> /dev/null`
26242    # bat and cmd files are not always considered executable in cygwin causing which
26243    # to not find them
26244    if test "x$new_path" = x \
26245             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26246             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26247      new_path=`$CYGPATH -u "$path"`
26248    fi
26249    if test "x$new_path" = x; then
26250      # It's still not found. Now this is an unrecoverable error.
26251      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
26252$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
26253      has_space=`$ECHO "$complete" | $GREP " "`
26254      if test "x$has_space" != x; then
26255        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26256$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26257      fi
26258      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
26259    fi
26260  fi
26261
26262  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26263  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26264  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26265  # "foo.exe" is OK but "foo" is an error.
26266  #
26267  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26268  # It is also a way to make sure we got the proper file name for the real test later on.
26269  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26270  if test "x$test_shortpath" = x; then
26271    # Short path failed, file does not exist as specified.
26272    # Try adding .exe or .cmd
26273    if test -f "${new_path}.exe"; then
26274       input_to_shortpath="${new_path}.exe"
26275    elif test -f "${new_path}.cmd"; then
26276       input_to_shortpath="${new_path}.cmd"
26277    else
26278      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$new_path\", is invalid." >&5
26279$as_echo "$as_me: The path of MCS, which resolves as \"$new_path\", is invalid." >&6;}
26280      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26281$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26282      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
26283    fi
26284  else
26285    input_to_shortpath="$new_path"
26286  fi
26287
26288  # Call helper function which possibly converts this using DOS-style short mode.
26289  # If so, the updated path is stored in $new_path.
26290  new_path="$input_to_shortpath"
26291
26292  input_path="$input_to_shortpath"
26293  # Check if we need to convert this using DOS-style short mode. If the path
26294  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26295  # take no chances and rewrite it.
26296  # Note: m4 eats our [], so we need to use [ and ] instead.
26297  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26298  if test "x$has_forbidden_chars" != x; then
26299    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26300    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26301    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26302    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26303      # Going to short mode and back again did indeed matter. Since short mode is
26304      # case insensitive, let's make it lowercase to improve readability.
26305      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26306      # Now convert it back to Unix-stile (cygpath)
26307      input_path=`$CYGPATH -u "$shortmode_path"`
26308      new_path="$input_path"
26309    fi
26310  fi
26311
26312  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26313  if test "x$test_cygdrive_prefix" = x; then
26314    # As a simple fix, exclude /usr/bin since it's not a real path.
26315    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26316      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26317      # a path prefixed by /cygdrive for fixpath to work.
26318      new_path="$CYGWIN_ROOT_PATH$input_path"
26319    fi
26320  fi
26321
26322  # remove trailing .exe if any
26323  new_path="${new_path/%.exe/}"
26324
26325  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26326
26327  # First separate the path from the arguments. This will split at the first
26328  # space.
26329  complete="$MCS"
26330  path="${complete%% *}"
26331  tmp="$complete EOL"
26332  arguments="${tmp#* }"
26333
26334  # Input might be given as Windows format, start by converting to
26335  # unix format.
26336  new_path="$path"
26337
26338  windows_path="$new_path"
26339  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26340    unix_path=`$CYGPATH -u "$windows_path"`
26341    new_path="$unix_path"
26342  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26343    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26344    new_path="$unix_path"
26345  fi
26346
26347
26348  # Now try to locate executable using which
26349  new_path=`$WHICH "$new_path" 2> /dev/null`
26350
26351  if test "x$new_path" = x; then
26352    # Oops. Which didn't find the executable.
26353    # The splitting of arguments from the executable at a space might have been incorrect,
26354    # since paths with space are more likely in Windows. Give it another try with the whole
26355    # argument.
26356    path="$complete"
26357    arguments="EOL"
26358    new_path="$path"
26359
26360  windows_path="$new_path"
26361  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26362    unix_path=`$CYGPATH -u "$windows_path"`
26363    new_path="$unix_path"
26364  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26365    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26366    new_path="$unix_path"
26367  fi
26368
26369
26370    new_path=`$WHICH "$new_path" 2> /dev/null`
26371
26372    if test "x$new_path" = x; then
26373      # It's still not found. Now this is an unrecoverable error.
26374      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
26375$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
26376      has_space=`$ECHO "$complete" | $GREP " "`
26377      if test "x$has_space" != x; then
26378        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26379$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26380      fi
26381      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
26382    fi
26383  fi
26384
26385  # Now new_path has a complete unix path to the binary
26386  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26387    # Keep paths in /bin as-is, but remove trailing .exe if any
26388    new_path="${new_path/%.exe/}"
26389    # Do not save /bin paths to all_fixpath_prefixes!
26390  else
26391    # Not in mixed or Windows style, start by that.
26392    new_path=`cmd //c echo $new_path`
26393
26394  input_path="$new_path"
26395  # Check if we need to convert this using DOS-style short mode. If the path
26396  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26397  # take no chances and rewrite it.
26398  # Note: m4 eats our [], so we need to use [ and ] instead.
26399  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26400  if test "x$has_forbidden_chars" != x; then
26401    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26402    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26403  fi
26404
26405    # Output is in $new_path
26406
26407  windows_path="$new_path"
26408  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26409    unix_path=`$CYGPATH -u "$windows_path"`
26410    new_path="$unix_path"
26411  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26412    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26413    new_path="$unix_path"
26414  fi
26415
26416    # remove trailing .exe if any
26417    new_path="${new_path/%.exe/}"
26418
26419    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26420    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26421  fi
26422
26423  else
26424    # We're on a posix platform. Hooray! :)
26425    # First separate the path from the arguments. This will split at the first
26426    # space.
26427    complete="$MCS"
26428    path="${complete%% *}"
26429    tmp="$complete EOL"
26430    arguments="${tmp#* }"
26431
26432    # Cannot rely on the command "which" here since it doesn't always work.
26433    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26434    if test -z "$is_absolute_path"; then
26435      # Path to executable is not absolute. Find it.
26436      IFS_save="$IFS"
26437      IFS=:
26438      for p in $PATH; do
26439        if test -f "$p/$path" && test -x "$p/$path"; then
26440          new_path="$p/$path"
26441          break
26442        fi
26443      done
26444      IFS="$IFS_save"
26445    else
26446      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MCS (as $path) failed, using $path directly." >&5
26447$as_echo "$as_me: Resolving MCS (as $path) failed, using $path directly." >&6;}
26448      new_path="$path"
26449    fi
26450
26451    if test "x$new_path" = x; then
26452        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
26453$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
26454        has_space=`$ECHO "$complete" | $GREP " "`
26455        if test "x$has_space" != x; then
26456          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26457$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26458        fi
26459        as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
26460      fi
26461  fi
26462
26463      # Now join together the path and the arguments once again
26464      if test "x$arguments" != xEOL; then
26465        new_complete="$new_path ${arguments% *}"
26466      else
26467        new_complete="$new_path"
26468      fi
26469
26470  if test "x$complete" != "x$new_complete"; then
26471      MCS="$new_complete"
26472      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MCS to \"$new_complete\"" >&5
26473$as_echo "$as_me: Rewriting MCS to \"$new_complete\"" >&6;}
26474    fi
26475
26476elif test "x$OPENJDK_TARGET_OS" != xwindows; then
26477    if test -n "$ac_tool_prefix"; then
26478  # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
26479set dummy ${ac_tool_prefix}nm; ac_word=$2
26480{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26481$as_echo_n "checking for $ac_word... " >&6; }
26482if ${ac_cv_prog_NM+:} false; then :
26483  $as_echo_n "(cached) " >&6
26484else
26485  if test -n "$NM"; then
26486  ac_cv_prog_NM="$NM" # Let the user override the test.
26487else
26488as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26489for as_dir in $PATH
26490do
26491  IFS=$as_save_IFS
26492  test -z "$as_dir" && as_dir=.
26493    for ac_exec_ext in '' $ac_executable_extensions; do
26494  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26495    ac_cv_prog_NM="${ac_tool_prefix}nm"
26496    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26497    break 2
26498  fi
26499done
26500  done
26501IFS=$as_save_IFS
26502
26503fi
26504fi
26505NM=$ac_cv_prog_NM
26506if test -n "$NM"; then
26507  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
26508$as_echo "$NM" >&6; }
26509else
26510  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26511$as_echo "no" >&6; }
26512fi
26513
26514
26515fi
26516if test -z "$ac_cv_prog_NM"; then
26517  ac_ct_NM=$NM
26518  # Extract the first word of "nm", so it can be a program name with args.
26519set dummy nm; ac_word=$2
26520{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26521$as_echo_n "checking for $ac_word... " >&6; }
26522if ${ac_cv_prog_ac_ct_NM+:} false; then :
26523  $as_echo_n "(cached) " >&6
26524else
26525  if test -n "$ac_ct_NM"; then
26526  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
26527else
26528as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26529for as_dir in $PATH
26530do
26531  IFS=$as_save_IFS
26532  test -z "$as_dir" && as_dir=.
26533    for ac_exec_ext in '' $ac_executable_extensions; do
26534  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26535    ac_cv_prog_ac_ct_NM="nm"
26536    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26537    break 2
26538  fi
26539done
26540  done
26541IFS=$as_save_IFS
26542
26543fi
26544fi
26545ac_ct_NM=$ac_cv_prog_ac_ct_NM
26546if test -n "$ac_ct_NM"; then
26547  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
26548$as_echo "$ac_ct_NM" >&6; }
26549else
26550  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26551$as_echo "no" >&6; }
26552fi
26553
26554  if test "x$ac_ct_NM" = x; then
26555    NM=""
26556  else
26557    case $cross_compiling:$ac_tool_warned in
26558yes:)
26559{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
26560$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
26561ac_tool_warned=yes ;;
26562esac
26563    NM=$ac_ct_NM
26564  fi
26565else
26566  NM="$ac_cv_prog_NM"
26567fi
26568
26569
26570  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26571
26572  # First separate the path from the arguments. This will split at the first
26573  # space.
26574  complete="$NM"
26575  path="${complete%% *}"
26576  tmp="$complete EOL"
26577  arguments="${tmp#* }"
26578
26579  # Input might be given as Windows format, start by converting to
26580  # unix format.
26581  new_path=`$CYGPATH -u "$path"`
26582
26583  # Now try to locate executable using which
26584  new_path=`$WHICH "$new_path" 2> /dev/null`
26585  # bat and cmd files are not always considered executable in cygwin causing which
26586  # to not find them
26587  if test "x$new_path" = x \
26588           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26589           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26590    new_path=`$CYGPATH -u "$path"`
26591  fi
26592  if test "x$new_path" = x; then
26593    # Oops. Which didn't find the executable.
26594    # The splitting of arguments from the executable at a space might have been incorrect,
26595    # since paths with space are more likely in Windows. Give it another try with the whole
26596    # argument.
26597    path="$complete"
26598    arguments="EOL"
26599    new_path=`$CYGPATH -u "$path"`
26600    new_path=`$WHICH "$new_path" 2> /dev/null`
26601    # bat and cmd files are not always considered executable in cygwin causing which
26602    # to not find them
26603    if test "x$new_path" = x \
26604             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26605             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26606      new_path=`$CYGPATH -u "$path"`
26607    fi
26608    if test "x$new_path" = x; then
26609      # It's still not found. Now this is an unrecoverable error.
26610      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
26611$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
26612      has_space=`$ECHO "$complete" | $GREP " "`
26613      if test "x$has_space" != x; then
26614        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26615$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26616      fi
26617      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
26618    fi
26619  fi
26620
26621  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26622  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26623  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26624  # "foo.exe" is OK but "foo" is an error.
26625  #
26626  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26627  # It is also a way to make sure we got the proper file name for the real test later on.
26628  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26629  if test "x$test_shortpath" = x; then
26630    # Short path failed, file does not exist as specified.
26631    # Try adding .exe or .cmd
26632    if test -f "${new_path}.exe"; then
26633       input_to_shortpath="${new_path}.exe"
26634    elif test -f "${new_path}.cmd"; then
26635       input_to_shortpath="${new_path}.cmd"
26636    else
26637      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
26638$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
26639      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26640$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26641      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
26642    fi
26643  else
26644    input_to_shortpath="$new_path"
26645  fi
26646
26647  # Call helper function which possibly converts this using DOS-style short mode.
26648  # If so, the updated path is stored in $new_path.
26649  new_path="$input_to_shortpath"
26650
26651  input_path="$input_to_shortpath"
26652  # Check if we need to convert this using DOS-style short mode. If the path
26653  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26654  # take no chances and rewrite it.
26655  # Note: m4 eats our [], so we need to use [ and ] instead.
26656  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26657  if test "x$has_forbidden_chars" != x; then
26658    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26659    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26660    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26661    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26662      # Going to short mode and back again did indeed matter. Since short mode is
26663      # case insensitive, let's make it lowercase to improve readability.
26664      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26665      # Now convert it back to Unix-stile (cygpath)
26666      input_path=`$CYGPATH -u "$shortmode_path"`
26667      new_path="$input_path"
26668    fi
26669  fi
26670
26671  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26672  if test "x$test_cygdrive_prefix" = x; then
26673    # As a simple fix, exclude /usr/bin since it's not a real path.
26674    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26675      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26676      # a path prefixed by /cygdrive for fixpath to work.
26677      new_path="$CYGWIN_ROOT_PATH$input_path"
26678    fi
26679  fi
26680
26681  # remove trailing .exe if any
26682  new_path="${new_path/%.exe/}"
26683
26684  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26685
26686  # First separate the path from the arguments. This will split at the first
26687  # space.
26688  complete="$NM"
26689  path="${complete%% *}"
26690  tmp="$complete EOL"
26691  arguments="${tmp#* }"
26692
26693  # Input might be given as Windows format, start by converting to
26694  # unix format.
26695  new_path="$path"
26696
26697  windows_path="$new_path"
26698  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26699    unix_path=`$CYGPATH -u "$windows_path"`
26700    new_path="$unix_path"
26701  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26702    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26703    new_path="$unix_path"
26704  fi
26705
26706
26707  # Now try to locate executable using which
26708  new_path=`$WHICH "$new_path" 2> /dev/null`
26709
26710  if test "x$new_path" = x; then
26711    # Oops. Which didn't find the executable.
26712    # The splitting of arguments from the executable at a space might have been incorrect,
26713    # since paths with space are more likely in Windows. Give it another try with the whole
26714    # argument.
26715    path="$complete"
26716    arguments="EOL"
26717    new_path="$path"
26718
26719  windows_path="$new_path"
26720  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26721    unix_path=`$CYGPATH -u "$windows_path"`
26722    new_path="$unix_path"
26723  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26724    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26725    new_path="$unix_path"
26726  fi
26727
26728
26729    new_path=`$WHICH "$new_path" 2> /dev/null`
26730
26731    if test "x$new_path" = x; then
26732      # It's still not found. Now this is an unrecoverable error.
26733      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
26734$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
26735      has_space=`$ECHO "$complete" | $GREP " "`
26736      if test "x$has_space" != x; then
26737        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26738$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26739      fi
26740      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
26741    fi
26742  fi
26743
26744  # Now new_path has a complete unix path to the binary
26745  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26746    # Keep paths in /bin as-is, but remove trailing .exe if any
26747    new_path="${new_path/%.exe/}"
26748    # Do not save /bin paths to all_fixpath_prefixes!
26749  else
26750    # Not in mixed or Windows style, start by that.
26751    new_path=`cmd //c echo $new_path`
26752
26753  input_path="$new_path"
26754  # Check if we need to convert this using DOS-style short mode. If the path
26755  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26756  # take no chances and rewrite it.
26757  # Note: m4 eats our [], so we need to use [ and ] instead.
26758  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26759  if test "x$has_forbidden_chars" != x; then
26760    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26761    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26762  fi
26763
26764    # Output is in $new_path
26765
26766  windows_path="$new_path"
26767  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26768    unix_path=`$CYGPATH -u "$windows_path"`
26769    new_path="$unix_path"
26770  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26771    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26772    new_path="$unix_path"
26773  fi
26774
26775    # remove trailing .exe if any
26776    new_path="${new_path/%.exe/}"
26777
26778    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26779    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26780  fi
26781
26782  else
26783    # We're on a posix platform. Hooray! :)
26784    # First separate the path from the arguments. This will split at the first
26785    # space.
26786    complete="$NM"
26787    path="${complete%% *}"
26788    tmp="$complete EOL"
26789    arguments="${tmp#* }"
26790
26791    # Cannot rely on the command "which" here since it doesn't always work.
26792    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26793    if test -z "$is_absolute_path"; then
26794      # Path to executable is not absolute. Find it.
26795      IFS_save="$IFS"
26796      IFS=:
26797      for p in $PATH; do
26798        if test -f "$p/$path" && test -x "$p/$path"; then
26799          new_path="$p/$path"
26800          break
26801        fi
26802      done
26803      IFS="$IFS_save"
26804    else
26805      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) failed, using $path directly." >&5
26806$as_echo "$as_me: Resolving NM (as $path) failed, using $path directly." >&6;}
26807      new_path="$path"
26808    fi
26809
26810    if test "x$new_path" = x; then
26811        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
26812$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
26813        has_space=`$ECHO "$complete" | $GREP " "`
26814        if test "x$has_space" != x; then
26815          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26816$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26817        fi
26818        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
26819      fi
26820  fi
26821
26822      # Now join together the path and the arguments once again
26823      if test "x$arguments" != xEOL; then
26824        new_complete="$new_path ${arguments% *}"
26825      else
26826        new_complete="$new_path"
26827      fi
26828
26829  if test "x$complete" != "x$new_complete"; then
26830      NM="$new_complete"
26831      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
26832$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
26833    fi
26834
26835    GNM="$NM"
26836
26837    if test -n "$ac_tool_prefix"; then
26838  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
26839set dummy ${ac_tool_prefix}strip; ac_word=$2
26840{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26841$as_echo_n "checking for $ac_word... " >&6; }
26842if ${ac_cv_prog_STRIP+:} false; then :
26843  $as_echo_n "(cached) " >&6
26844else
26845  if test -n "$STRIP"; then
26846  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
26847else
26848as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26849for as_dir in $PATH
26850do
26851  IFS=$as_save_IFS
26852  test -z "$as_dir" && as_dir=.
26853    for ac_exec_ext in '' $ac_executable_extensions; do
26854  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26855    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
26856    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26857    break 2
26858  fi
26859done
26860  done
26861IFS=$as_save_IFS
26862
26863fi
26864fi
26865STRIP=$ac_cv_prog_STRIP
26866if test -n "$STRIP"; then
26867  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
26868$as_echo "$STRIP" >&6; }
26869else
26870  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26871$as_echo "no" >&6; }
26872fi
26873
26874
26875fi
26876if test -z "$ac_cv_prog_STRIP"; then
26877  ac_ct_STRIP=$STRIP
26878  # Extract the first word of "strip", so it can be a program name with args.
26879set dummy strip; ac_word=$2
26880{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26881$as_echo_n "checking for $ac_word... " >&6; }
26882if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
26883  $as_echo_n "(cached) " >&6
26884else
26885  if test -n "$ac_ct_STRIP"; then
26886  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
26887else
26888as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26889for as_dir in $PATH
26890do
26891  IFS=$as_save_IFS
26892  test -z "$as_dir" && as_dir=.
26893    for ac_exec_ext in '' $ac_executable_extensions; do
26894  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26895    ac_cv_prog_ac_ct_STRIP="strip"
26896    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26897    break 2
26898  fi
26899done
26900  done
26901IFS=$as_save_IFS
26902
26903fi
26904fi
26905ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
26906if test -n "$ac_ct_STRIP"; then
26907  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
26908$as_echo "$ac_ct_STRIP" >&6; }
26909else
26910  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26911$as_echo "no" >&6; }
26912fi
26913
26914  if test "x$ac_ct_STRIP" = x; then
26915    STRIP=""
26916  else
26917    case $cross_compiling:$ac_tool_warned in
26918yes:)
26919{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
26920$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
26921ac_tool_warned=yes ;;
26922esac
26923    STRIP=$ac_ct_STRIP
26924  fi
26925else
26926  STRIP="$ac_cv_prog_STRIP"
26927fi
26928
26929
26930  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26931
26932  # First separate the path from the arguments. This will split at the first
26933  # space.
26934  complete="$STRIP"
26935  path="${complete%% *}"
26936  tmp="$complete EOL"
26937  arguments="${tmp#* }"
26938
26939  # Input might be given as Windows format, start by converting to
26940  # unix format.
26941  new_path=`$CYGPATH -u "$path"`
26942
26943  # Now try to locate executable using which
26944  new_path=`$WHICH "$new_path" 2> /dev/null`
26945  # bat and cmd files are not always considered executable in cygwin causing which
26946  # to not find them
26947  if test "x$new_path" = x \
26948           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26949           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26950    new_path=`$CYGPATH -u "$path"`
26951  fi
26952  if test "x$new_path" = x; then
26953    # Oops. Which didn't find the executable.
26954    # The splitting of arguments from the executable at a space might have been incorrect,
26955    # since paths with space are more likely in Windows. Give it another try with the whole
26956    # argument.
26957    path="$complete"
26958    arguments="EOL"
26959    new_path=`$CYGPATH -u "$path"`
26960    new_path=`$WHICH "$new_path" 2> /dev/null`
26961    # bat and cmd files are not always considered executable in cygwin causing which
26962    # to not find them
26963    if test "x$new_path" = x \
26964             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26965             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26966      new_path=`$CYGPATH -u "$path"`
26967    fi
26968    if test "x$new_path" = x; then
26969      # It's still not found. Now this is an unrecoverable error.
26970      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26971$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26972      has_space=`$ECHO "$complete" | $GREP " "`
26973      if test "x$has_space" != x; then
26974        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26975$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26976      fi
26977      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26978    fi
26979  fi
26980
26981  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26982  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26983  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26984  # "foo.exe" is OK but "foo" is an error.
26985  #
26986  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26987  # It is also a way to make sure we got the proper file name for the real test later on.
26988  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26989  if test "x$test_shortpath" = x; then
26990    # Short path failed, file does not exist as specified.
26991    # Try adding .exe or .cmd
26992    if test -f "${new_path}.exe"; then
26993       input_to_shortpath="${new_path}.exe"
26994    elif test -f "${new_path}.cmd"; then
26995       input_to_shortpath="${new_path}.cmd"
26996    else
26997      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
26998$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
26999      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27000$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27001      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
27002    fi
27003  else
27004    input_to_shortpath="$new_path"
27005  fi
27006
27007  # Call helper function which possibly converts this using DOS-style short mode.
27008  # If so, the updated path is stored in $new_path.
27009  new_path="$input_to_shortpath"
27010
27011  input_path="$input_to_shortpath"
27012  # Check if we need to convert this using DOS-style short mode. If the path
27013  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27014  # take no chances and rewrite it.
27015  # Note: m4 eats our [], so we need to use [ and ] instead.
27016  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27017  if test "x$has_forbidden_chars" != x; then
27018    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27019    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27020    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27021    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27022      # Going to short mode and back again did indeed matter. Since short mode is
27023      # case insensitive, let's make it lowercase to improve readability.
27024      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27025      # Now convert it back to Unix-stile (cygpath)
27026      input_path=`$CYGPATH -u "$shortmode_path"`
27027      new_path="$input_path"
27028    fi
27029  fi
27030
27031  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27032  if test "x$test_cygdrive_prefix" = x; then
27033    # As a simple fix, exclude /usr/bin since it's not a real path.
27034    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27035      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27036      # a path prefixed by /cygdrive for fixpath to work.
27037      new_path="$CYGWIN_ROOT_PATH$input_path"
27038    fi
27039  fi
27040
27041  # remove trailing .exe if any
27042  new_path="${new_path/%.exe/}"
27043
27044  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27045
27046  # First separate the path from the arguments. This will split at the first
27047  # space.
27048  complete="$STRIP"
27049  path="${complete%% *}"
27050  tmp="$complete EOL"
27051  arguments="${tmp#* }"
27052
27053  # Input might be given as Windows format, start by converting to
27054  # unix format.
27055  new_path="$path"
27056
27057  windows_path="$new_path"
27058  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27059    unix_path=`$CYGPATH -u "$windows_path"`
27060    new_path="$unix_path"
27061  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27062    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27063    new_path="$unix_path"
27064  fi
27065
27066
27067  # Now try to locate executable using which
27068  new_path=`$WHICH "$new_path" 2> /dev/null`
27069
27070  if test "x$new_path" = x; then
27071    # Oops. Which didn't find the executable.
27072    # The splitting of arguments from the executable at a space might have been incorrect,
27073    # since paths with space are more likely in Windows. Give it another try with the whole
27074    # argument.
27075    path="$complete"
27076    arguments="EOL"
27077    new_path="$path"
27078
27079  windows_path="$new_path"
27080  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27081    unix_path=`$CYGPATH -u "$windows_path"`
27082    new_path="$unix_path"
27083  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27084    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27085    new_path="$unix_path"
27086  fi
27087
27088
27089    new_path=`$WHICH "$new_path" 2> /dev/null`
27090
27091    if test "x$new_path" = x; then
27092      # It's still not found. Now this is an unrecoverable error.
27093      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
27094$as_echo "$as_me: The path of STRIP, 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}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27098$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27099      fi
27100      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
27101    fi
27102  fi
27103
27104  # Now new_path has a complete unix path to the binary
27105  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27106    # Keep paths in /bin as-is, but remove trailing .exe if any
27107    new_path="${new_path/%.exe/}"
27108    # Do not save /bin paths to all_fixpath_prefixes!
27109  else
27110    # Not in mixed or Windows style, start by that.
27111    new_path=`cmd //c echo $new_path`
27112
27113  input_path="$new_path"
27114  # Check if we need to convert this using DOS-style short mode. If the path
27115  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27116  # take no chances and rewrite it.
27117  # Note: m4 eats our [], so we need to use [ and ] instead.
27118  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27119  if test "x$has_forbidden_chars" != x; then
27120    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27121    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27122  fi
27123
27124    # Output is in $new_path
27125
27126  windows_path="$new_path"
27127  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27128    unix_path=`$CYGPATH -u "$windows_path"`
27129    new_path="$unix_path"
27130  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27131    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27132    new_path="$unix_path"
27133  fi
27134
27135    # remove trailing .exe if any
27136    new_path="${new_path/%.exe/}"
27137
27138    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27139    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27140  fi
27141
27142  else
27143    # We're on a posix platform. Hooray! :)
27144    # First separate the path from the arguments. This will split at the first
27145    # space.
27146    complete="$STRIP"
27147    path="${complete%% *}"
27148    tmp="$complete EOL"
27149    arguments="${tmp#* }"
27150
27151    # Cannot rely on the command "which" here since it doesn't always work.
27152    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27153    if test -z "$is_absolute_path"; then
27154      # Path to executable is not absolute. Find it.
27155      IFS_save="$IFS"
27156      IFS=:
27157      for p in $PATH; do
27158        if test -f "$p/$path" && test -x "$p/$path"; then
27159          new_path="$p/$path"
27160          break
27161        fi
27162      done
27163      IFS="$IFS_save"
27164    else
27165      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) failed, using $path directly." >&5
27166$as_echo "$as_me: Resolving STRIP (as $path) failed, using $path directly." >&6;}
27167      new_path="$path"
27168    fi
27169
27170    if test "x$new_path" = x; then
27171        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
27172$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
27173        has_space=`$ECHO "$complete" | $GREP " "`
27174        if test "x$has_space" != x; then
27175          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27176$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27177        fi
27178        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
27179      fi
27180  fi
27181
27182      # Now join together the path and the arguments once again
27183      if test "x$arguments" != xEOL; then
27184        new_complete="$new_path ${arguments% *}"
27185      else
27186        new_complete="$new_path"
27187      fi
27188
27189  if test "x$complete" != "x$new_complete"; then
27190      STRIP="$new_complete"
27191      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
27192$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
27193    fi
27194
27195fi
27196
27197# objcopy is used for moving debug symbols to separate files when
27198# full debug symbols are enabled.
27199if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
27200    if test -n "$ac_tool_prefix"; then
27201  for ac_prog in gobjcopy objcopy
27202  do
27203    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
27204set dummy $ac_tool_prefix$ac_prog; ac_word=$2
27205{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27206$as_echo_n "checking for $ac_word... " >&6; }
27207if ${ac_cv_prog_OBJCOPY+:} false; then :
27208  $as_echo_n "(cached) " >&6
27209else
27210  if test -n "$OBJCOPY"; then
27211  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
27212else
27213as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27214for as_dir in $PATH
27215do
27216  IFS=$as_save_IFS
27217  test -z "$as_dir" && as_dir=.
27218    for ac_exec_ext in '' $ac_executable_extensions; do
27219  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27220    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
27221    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27222    break 2
27223  fi
27224done
27225  done
27226IFS=$as_save_IFS
27227
27228fi
27229fi
27230OBJCOPY=$ac_cv_prog_OBJCOPY
27231if test -n "$OBJCOPY"; then
27232  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
27233$as_echo "$OBJCOPY" >&6; }
27234else
27235  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27236$as_echo "no" >&6; }
27237fi
27238
27239
27240    test -n "$OBJCOPY" && break
27241  done
27242fi
27243if test -z "$OBJCOPY"; then
27244  ac_ct_OBJCOPY=$OBJCOPY
27245  for ac_prog in gobjcopy objcopy
27246do
27247  # Extract the first word of "$ac_prog", so it can be a program name with args.
27248set dummy $ac_prog; ac_word=$2
27249{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27250$as_echo_n "checking for $ac_word... " >&6; }
27251if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
27252  $as_echo_n "(cached) " >&6
27253else
27254  if test -n "$ac_ct_OBJCOPY"; then
27255  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
27256else
27257as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27258for as_dir in $PATH
27259do
27260  IFS=$as_save_IFS
27261  test -z "$as_dir" && as_dir=.
27262    for ac_exec_ext in '' $ac_executable_extensions; do
27263  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27264    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
27265    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27266    break 2
27267  fi
27268done
27269  done
27270IFS=$as_save_IFS
27271
27272fi
27273fi
27274ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
27275if test -n "$ac_ct_OBJCOPY"; then
27276  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
27277$as_echo "$ac_ct_OBJCOPY" >&6; }
27278else
27279  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27280$as_echo "no" >&6; }
27281fi
27282
27283
27284  test -n "$ac_ct_OBJCOPY" && break
27285done
27286
27287  if test "x$ac_ct_OBJCOPY" = x; then
27288    OBJCOPY=""
27289  else
27290    case $cross_compiling:$ac_tool_warned in
27291yes:)
27292{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
27293$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
27294ac_tool_warned=yes ;;
27295esac
27296    OBJCOPY=$ac_ct_OBJCOPY
27297  fi
27298fi
27299
27300    # Only call fixup if objcopy was found.
27301    if test -n "$OBJCOPY"; then
27302
27303  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27304
27305  # First separate the path from the arguments. This will split at the first
27306  # space.
27307  complete="$OBJCOPY"
27308  path="${complete%% *}"
27309  tmp="$complete EOL"
27310  arguments="${tmp#* }"
27311
27312  # Input might be given as Windows format, start by converting to
27313  # unix format.
27314  new_path=`$CYGPATH -u "$path"`
27315
27316  # Now try to locate executable using which
27317  new_path=`$WHICH "$new_path" 2> /dev/null`
27318  # bat and cmd files are not always considered executable in cygwin causing which
27319  # to not find them
27320  if test "x$new_path" = x \
27321           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27322           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27323    new_path=`$CYGPATH -u "$path"`
27324  fi
27325  if test "x$new_path" = x; then
27326    # Oops. Which didn't find the executable.
27327    # The splitting of arguments from the executable at a space might have been incorrect,
27328    # since paths with space are more likely in Windows. Give it another try with the whole
27329    # argument.
27330    path="$complete"
27331    arguments="EOL"
27332    new_path=`$CYGPATH -u "$path"`
27333    new_path=`$WHICH "$new_path" 2> /dev/null`
27334    # bat and cmd files are not always considered executable in cygwin causing which
27335    # to not find them
27336    if test "x$new_path" = x \
27337             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27338             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27339      new_path=`$CYGPATH -u "$path"`
27340    fi
27341    if test "x$new_path" = x; then
27342      # It's still not found. Now this is an unrecoverable error.
27343      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
27344$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
27345      has_space=`$ECHO "$complete" | $GREP " "`
27346      if test "x$has_space" != x; then
27347        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27348$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27349      fi
27350      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
27351    fi
27352  fi
27353
27354  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27355  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27356  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27357  # "foo.exe" is OK but "foo" is an error.
27358  #
27359  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27360  # It is also a way to make sure we got the proper file name for the real test later on.
27361  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27362  if test "x$test_shortpath" = x; then
27363    # Short path failed, file does not exist as specified.
27364    # Try adding .exe or .cmd
27365    if test -f "${new_path}.exe"; then
27366       input_to_shortpath="${new_path}.exe"
27367    elif test -f "${new_path}.cmd"; then
27368       input_to_shortpath="${new_path}.cmd"
27369    else
27370      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
27371$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
27372      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27373$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27374      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
27375    fi
27376  else
27377    input_to_shortpath="$new_path"
27378  fi
27379
27380  # Call helper function which possibly converts this using DOS-style short mode.
27381  # If so, the updated path is stored in $new_path.
27382  new_path="$input_to_shortpath"
27383
27384  input_path="$input_to_shortpath"
27385  # Check if we need to convert this using DOS-style short mode. If the path
27386  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27387  # take no chances and rewrite it.
27388  # Note: m4 eats our [], so we need to use [ and ] instead.
27389  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27390  if test "x$has_forbidden_chars" != x; then
27391    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27392    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27393    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27394    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27395      # Going to short mode and back again did indeed matter. Since short mode is
27396      # case insensitive, let's make it lowercase to improve readability.
27397      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27398      # Now convert it back to Unix-stile (cygpath)
27399      input_path=`$CYGPATH -u "$shortmode_path"`
27400      new_path="$input_path"
27401    fi
27402  fi
27403
27404  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27405  if test "x$test_cygdrive_prefix" = x; then
27406    # As a simple fix, exclude /usr/bin since it's not a real path.
27407    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27408      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27409      # a path prefixed by /cygdrive for fixpath to work.
27410      new_path="$CYGWIN_ROOT_PATH$input_path"
27411    fi
27412  fi
27413
27414  # remove trailing .exe if any
27415  new_path="${new_path/%.exe/}"
27416
27417  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27418
27419  # First separate the path from the arguments. This will split at the first
27420  # space.
27421  complete="$OBJCOPY"
27422  path="${complete%% *}"
27423  tmp="$complete EOL"
27424  arguments="${tmp#* }"
27425
27426  # Input might be given as Windows format, start by converting to
27427  # unix format.
27428  new_path="$path"
27429
27430  windows_path="$new_path"
27431  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27432    unix_path=`$CYGPATH -u "$windows_path"`
27433    new_path="$unix_path"
27434  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27435    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27436    new_path="$unix_path"
27437  fi
27438
27439
27440  # Now try to locate executable using which
27441  new_path=`$WHICH "$new_path" 2> /dev/null`
27442
27443  if test "x$new_path" = x; then
27444    # Oops. Which didn't find the executable.
27445    # The splitting of arguments from the executable at a space might have been incorrect,
27446    # since paths with space are more likely in Windows. Give it another try with the whole
27447    # argument.
27448    path="$complete"
27449    arguments="EOL"
27450    new_path="$path"
27451
27452  windows_path="$new_path"
27453  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27454    unix_path=`$CYGPATH -u "$windows_path"`
27455    new_path="$unix_path"
27456  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27457    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27458    new_path="$unix_path"
27459  fi
27460
27461
27462    new_path=`$WHICH "$new_path" 2> /dev/null`
27463
27464    if test "x$new_path" = x; then
27465      # It's still not found. Now this is an unrecoverable error.
27466      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
27467$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
27468      has_space=`$ECHO "$complete" | $GREP " "`
27469      if test "x$has_space" != x; then
27470        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27471$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27472      fi
27473      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
27474    fi
27475  fi
27476
27477  # Now new_path has a complete unix path to the binary
27478  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27479    # Keep paths in /bin as-is, but remove trailing .exe if any
27480    new_path="${new_path/%.exe/}"
27481    # Do not save /bin paths to all_fixpath_prefixes!
27482  else
27483    # Not in mixed or Windows style, start by that.
27484    new_path=`cmd //c echo $new_path`
27485
27486  input_path="$new_path"
27487  # Check if we need to convert this using DOS-style short mode. If the path
27488  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27489  # take no chances and rewrite it.
27490  # Note: m4 eats our [], so we need to use [ and ] instead.
27491  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27492  if test "x$has_forbidden_chars" != x; then
27493    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27494    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27495  fi
27496
27497    # Output is in $new_path
27498
27499  windows_path="$new_path"
27500  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27501    unix_path=`$CYGPATH -u "$windows_path"`
27502    new_path="$unix_path"
27503  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27504    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27505    new_path="$unix_path"
27506  fi
27507
27508    # remove trailing .exe if any
27509    new_path="${new_path/%.exe/}"
27510
27511    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27512    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27513  fi
27514
27515  else
27516    # We're on a posix platform. Hooray! :)
27517    # First separate the path from the arguments. This will split at the first
27518    # space.
27519    complete="$OBJCOPY"
27520    path="${complete%% *}"
27521    tmp="$complete EOL"
27522    arguments="${tmp#* }"
27523
27524    # Cannot rely on the command "which" here since it doesn't always work.
27525    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27526    if test -z "$is_absolute_path"; then
27527      # Path to executable is not absolute. Find it.
27528      IFS_save="$IFS"
27529      IFS=:
27530      for p in $PATH; do
27531        if test -f "$p/$path" && test -x "$p/$path"; then
27532          new_path="$p/$path"
27533          break
27534        fi
27535      done
27536      IFS="$IFS_save"
27537    else
27538      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJCOPY (as $path) failed, using $path directly." >&5
27539$as_echo "$as_me: Resolving OBJCOPY (as $path) failed, using $path directly." >&6;}
27540      new_path="$path"
27541    fi
27542
27543    if test "x$new_path" = x; then
27544        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
27545$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
27546        has_space=`$ECHO "$complete" | $GREP " "`
27547        if test "x$has_space" != x; then
27548          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27549$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27550        fi
27551        as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
27552      fi
27553  fi
27554
27555      # Now join together the path and the arguments once again
27556      if test "x$arguments" != xEOL; then
27557        new_complete="$new_path ${arguments% *}"
27558      else
27559        new_complete="$new_path"
27560      fi
27561
27562  if test "x$complete" != "x$new_complete"; then
27563      OBJCOPY="$new_complete"
27564      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
27565$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
27566    fi
27567
27568    fi
27569fi
27570
27571if test -n "$ac_tool_prefix"; then
27572  for ac_prog in gobjdump objdump
27573  do
27574    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
27575set dummy $ac_tool_prefix$ac_prog; ac_word=$2
27576{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27577$as_echo_n "checking for $ac_word... " >&6; }
27578if ${ac_cv_prog_OBJDUMP+:} false; then :
27579  $as_echo_n "(cached) " >&6
27580else
27581  if test -n "$OBJDUMP"; then
27582  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
27583else
27584as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27585for as_dir in $PATH
27586do
27587  IFS=$as_save_IFS
27588  test -z "$as_dir" && as_dir=.
27589    for ac_exec_ext in '' $ac_executable_extensions; do
27590  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27591    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
27592    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27593    break 2
27594  fi
27595done
27596  done
27597IFS=$as_save_IFS
27598
27599fi
27600fi
27601OBJDUMP=$ac_cv_prog_OBJDUMP
27602if test -n "$OBJDUMP"; then
27603  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
27604$as_echo "$OBJDUMP" >&6; }
27605else
27606  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27607$as_echo "no" >&6; }
27608fi
27609
27610
27611    test -n "$OBJDUMP" && break
27612  done
27613fi
27614if test -z "$OBJDUMP"; then
27615  ac_ct_OBJDUMP=$OBJDUMP
27616  for ac_prog in gobjdump objdump
27617do
27618  # Extract the first word of "$ac_prog", so it can be a program name with args.
27619set dummy $ac_prog; ac_word=$2
27620{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27621$as_echo_n "checking for $ac_word... " >&6; }
27622if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
27623  $as_echo_n "(cached) " >&6
27624else
27625  if test -n "$ac_ct_OBJDUMP"; then
27626  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
27627else
27628as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27629for as_dir in $PATH
27630do
27631  IFS=$as_save_IFS
27632  test -z "$as_dir" && as_dir=.
27633    for ac_exec_ext in '' $ac_executable_extensions; do
27634  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27635    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
27636    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27637    break 2
27638  fi
27639done
27640  done
27641IFS=$as_save_IFS
27642
27643fi
27644fi
27645ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
27646if test -n "$ac_ct_OBJDUMP"; then
27647  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
27648$as_echo "$ac_ct_OBJDUMP" >&6; }
27649else
27650  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27651$as_echo "no" >&6; }
27652fi
27653
27654
27655  test -n "$ac_ct_OBJDUMP" && break
27656done
27657
27658  if test "x$ac_ct_OBJDUMP" = x; then
27659    OBJDUMP=""
27660  else
27661    case $cross_compiling:$ac_tool_warned in
27662yes:)
27663{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
27664$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
27665ac_tool_warned=yes ;;
27666esac
27667    OBJDUMP=$ac_ct_OBJDUMP
27668  fi
27669fi
27670
27671if test "x$OBJDUMP" != x; then
27672  # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE bails if argument is missing.
27673
27674  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27675
27676  # First separate the path from the arguments. This will split at the first
27677  # space.
27678  complete="$OBJDUMP"
27679  path="${complete%% *}"
27680  tmp="$complete EOL"
27681  arguments="${tmp#* }"
27682
27683  # Input might be given as Windows format, start by converting to
27684  # unix format.
27685  new_path=`$CYGPATH -u "$path"`
27686
27687  # Now try to locate executable using which
27688  new_path=`$WHICH "$new_path" 2> /dev/null`
27689  # bat and cmd files are not always considered executable in cygwin causing which
27690  # to not find them
27691  if test "x$new_path" = x \
27692           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27693           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27694    new_path=`$CYGPATH -u "$path"`
27695  fi
27696  if test "x$new_path" = x; then
27697    # Oops. Which didn't find the executable.
27698    # The splitting of arguments from the executable at a space might have been incorrect,
27699    # since paths with space are more likely in Windows. Give it another try with the whole
27700    # argument.
27701    path="$complete"
27702    arguments="EOL"
27703    new_path=`$CYGPATH -u "$path"`
27704    new_path=`$WHICH "$new_path" 2> /dev/null`
27705    # bat and cmd files are not always considered executable in cygwin causing which
27706    # to not find them
27707    if test "x$new_path" = x \
27708             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27709             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27710      new_path=`$CYGPATH -u "$path"`
27711    fi
27712    if test "x$new_path" = x; then
27713      # It's still not found. Now this is an unrecoverable error.
27714      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
27715$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
27716      has_space=`$ECHO "$complete" | $GREP " "`
27717      if test "x$has_space" != x; then
27718        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27719$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27720      fi
27721      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
27722    fi
27723  fi
27724
27725  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27726  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27727  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27728  # "foo.exe" is OK but "foo" is an error.
27729  #
27730  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27731  # It is also a way to make sure we got the proper file name for the real test later on.
27732  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27733  if test "x$test_shortpath" = x; then
27734    # Short path failed, file does not exist as specified.
27735    # Try adding .exe or .cmd
27736    if test -f "${new_path}.exe"; then
27737       input_to_shortpath="${new_path}.exe"
27738    elif test -f "${new_path}.cmd"; then
27739       input_to_shortpath="${new_path}.cmd"
27740    else
27741      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
27742$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
27743      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27744$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27745      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
27746    fi
27747  else
27748    input_to_shortpath="$new_path"
27749  fi
27750
27751  # Call helper function which possibly converts this using DOS-style short mode.
27752  # If so, the updated path is stored in $new_path.
27753  new_path="$input_to_shortpath"
27754
27755  input_path="$input_to_shortpath"
27756  # Check if we need to convert this using DOS-style short mode. If the path
27757  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27758  # take no chances and rewrite it.
27759  # Note: m4 eats our [], so we need to use [ and ] instead.
27760  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27761  if test "x$has_forbidden_chars" != x; then
27762    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27763    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27764    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27765    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27766      # Going to short mode and back again did indeed matter. Since short mode is
27767      # case insensitive, let's make it lowercase to improve readability.
27768      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27769      # Now convert it back to Unix-stile (cygpath)
27770      input_path=`$CYGPATH -u "$shortmode_path"`
27771      new_path="$input_path"
27772    fi
27773  fi
27774
27775  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27776  if test "x$test_cygdrive_prefix" = x; then
27777    # As a simple fix, exclude /usr/bin since it's not a real path.
27778    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27779      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27780      # a path prefixed by /cygdrive for fixpath to work.
27781      new_path="$CYGWIN_ROOT_PATH$input_path"
27782    fi
27783  fi
27784
27785  # remove trailing .exe if any
27786  new_path="${new_path/%.exe/}"
27787
27788  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27789
27790  # First separate the path from the arguments. This will split at the first
27791  # space.
27792  complete="$OBJDUMP"
27793  path="${complete%% *}"
27794  tmp="$complete EOL"
27795  arguments="${tmp#* }"
27796
27797  # Input might be given as Windows format, start by converting to
27798  # unix format.
27799  new_path="$path"
27800
27801  windows_path="$new_path"
27802  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27803    unix_path=`$CYGPATH -u "$windows_path"`
27804    new_path="$unix_path"
27805  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27806    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27807    new_path="$unix_path"
27808  fi
27809
27810
27811  # Now try to locate executable using which
27812  new_path=`$WHICH "$new_path" 2> /dev/null`
27813
27814  if test "x$new_path" = x; then
27815    # Oops. Which didn't find the executable.
27816    # The splitting of arguments from the executable at a space might have been incorrect,
27817    # since paths with space are more likely in Windows. Give it another try with the whole
27818    # argument.
27819    path="$complete"
27820    arguments="EOL"
27821    new_path="$path"
27822
27823  windows_path="$new_path"
27824  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27825    unix_path=`$CYGPATH -u "$windows_path"`
27826    new_path="$unix_path"
27827  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27828    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27829    new_path="$unix_path"
27830  fi
27831
27832
27833    new_path=`$WHICH "$new_path" 2> /dev/null`
27834
27835    if test "x$new_path" = x; then
27836      # It's still not found. Now this is an unrecoverable error.
27837      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
27838$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
27839      has_space=`$ECHO "$complete" | $GREP " "`
27840      if test "x$has_space" != x; then
27841        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27842$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27843      fi
27844      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
27845    fi
27846  fi
27847
27848  # Now new_path has a complete unix path to the binary
27849  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27850    # Keep paths in /bin as-is, but remove trailing .exe if any
27851    new_path="${new_path/%.exe/}"
27852    # Do not save /bin paths to all_fixpath_prefixes!
27853  else
27854    # Not in mixed or Windows style, start by that.
27855    new_path=`cmd //c echo $new_path`
27856
27857  input_path="$new_path"
27858  # Check if we need to convert this using DOS-style short mode. If the path
27859  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27860  # take no chances and rewrite it.
27861  # Note: m4 eats our [], so we need to use [ and ] instead.
27862  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27863  if test "x$has_forbidden_chars" != x; then
27864    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27865    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27866  fi
27867
27868    # Output is in $new_path
27869
27870  windows_path="$new_path"
27871  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27872    unix_path=`$CYGPATH -u "$windows_path"`
27873    new_path="$unix_path"
27874  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27875    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27876    new_path="$unix_path"
27877  fi
27878
27879    # remove trailing .exe if any
27880    new_path="${new_path/%.exe/}"
27881
27882    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27883    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27884  fi
27885
27886  else
27887    # We're on a posix platform. Hooray! :)
27888    # First separate the path from the arguments. This will split at the first
27889    # space.
27890    complete="$OBJDUMP"
27891    path="${complete%% *}"
27892    tmp="$complete EOL"
27893    arguments="${tmp#* }"
27894
27895    # Cannot rely on the command "which" here since it doesn't always work.
27896    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27897    if test -z "$is_absolute_path"; then
27898      # Path to executable is not absolute. Find it.
27899      IFS_save="$IFS"
27900      IFS=:
27901      for p in $PATH; do
27902        if test -f "$p/$path" && test -x "$p/$path"; then
27903          new_path="$p/$path"
27904          break
27905        fi
27906      done
27907      IFS="$IFS_save"
27908    else
27909      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJDUMP (as $path) failed, using $path directly." >&5
27910$as_echo "$as_me: Resolving OBJDUMP (as $path) failed, using $path directly." >&6;}
27911      new_path="$path"
27912    fi
27913
27914    if test "x$new_path" = x; then
27915        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
27916$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
27917        has_space=`$ECHO "$complete" | $GREP " "`
27918        if test "x$has_space" != x; then
27919          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27920$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27921        fi
27922        as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
27923      fi
27924  fi
27925
27926      # Now join together the path and the arguments once again
27927      if test "x$arguments" != xEOL; then
27928        new_complete="$new_path ${arguments% *}"
27929      else
27930        new_complete="$new_path"
27931      fi
27932
27933  if test "x$complete" != "x$new_complete"; then
27934      OBJDUMP="$new_complete"
27935      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
27936$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
27937    fi
27938
27939fi
27940
27941if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
27942   # Extract the first word of "lipo", so it can be a program name with args.
27943set dummy lipo; ac_word=$2
27944{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27945$as_echo_n "checking for $ac_word... " >&6; }
27946if ${ac_cv_path_LIPO+:} false; then :
27947  $as_echo_n "(cached) " >&6
27948else
27949  case $LIPO in
27950  [\\/]* | ?:[\\/]*)
27951  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
27952  ;;
27953  *)
27954  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27955for as_dir in $PATH
27956do
27957  IFS=$as_save_IFS
27958  test -z "$as_dir" && as_dir=.
27959    for ac_exec_ext in '' $ac_executable_extensions; do
27960  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27961    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
27962    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27963    break 2
27964  fi
27965done
27966  done
27967IFS=$as_save_IFS
27968
27969  ;;
27970esac
27971fi
27972LIPO=$ac_cv_path_LIPO
27973if test -n "$LIPO"; then
27974  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
27975$as_echo "$LIPO" >&6; }
27976else
27977  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27978$as_echo "no" >&6; }
27979fi
27980
27981
27982
27983  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27984
27985  # First separate the path from the arguments. This will split at the first
27986  # space.
27987  complete="$LIPO"
27988  path="${complete%% *}"
27989  tmp="$complete EOL"
27990  arguments="${tmp#* }"
27991
27992  # Input might be given as Windows format, start by converting to
27993  # unix format.
27994  new_path=`$CYGPATH -u "$path"`
27995
27996  # Now try to locate executable using which
27997  new_path=`$WHICH "$new_path" 2> /dev/null`
27998  # bat and cmd files are not always considered executable in cygwin causing which
27999  # to not find them
28000  if test "x$new_path" = x \
28001           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28002           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28003    new_path=`$CYGPATH -u "$path"`
28004  fi
28005  if test "x$new_path" = x; then
28006    # Oops. Which didn't find the executable.
28007    # The splitting of arguments from the executable at a space might have been incorrect,
28008    # since paths with space are more likely in Windows. Give it another try with the whole
28009    # argument.
28010    path="$complete"
28011    arguments="EOL"
28012    new_path=`$CYGPATH -u "$path"`
28013    new_path=`$WHICH "$new_path" 2> /dev/null`
28014    # bat and cmd files are not always considered executable in cygwin causing which
28015    # to not find them
28016    if test "x$new_path" = x \
28017             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28018             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28019      new_path=`$CYGPATH -u "$path"`
28020    fi
28021    if test "x$new_path" = x; then
28022      # It's still not found. Now this is an unrecoverable error.
28023      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
28024$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
28025      has_space=`$ECHO "$complete" | $GREP " "`
28026      if test "x$has_space" != x; then
28027        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28028$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28029      fi
28030      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
28031    fi
28032  fi
28033
28034  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28035  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28036  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28037  # "foo.exe" is OK but "foo" is an error.
28038  #
28039  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28040  # It is also a way to make sure we got the proper file name for the real test later on.
28041  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28042  if test "x$test_shortpath" = x; then
28043    # Short path failed, file does not exist as specified.
28044    # Try adding .exe or .cmd
28045    if test -f "${new_path}.exe"; then
28046       input_to_shortpath="${new_path}.exe"
28047    elif test -f "${new_path}.cmd"; then
28048       input_to_shortpath="${new_path}.cmd"
28049    else
28050      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
28051$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
28052      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
28053$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
28054      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
28055    fi
28056  else
28057    input_to_shortpath="$new_path"
28058  fi
28059
28060  # Call helper function which possibly converts this using DOS-style short mode.
28061  # If so, the updated path is stored in $new_path.
28062  new_path="$input_to_shortpath"
28063
28064  input_path="$input_to_shortpath"
28065  # Check if we need to convert this using DOS-style short mode. If the path
28066  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28067  # take no chances and rewrite it.
28068  # Note: m4 eats our [], so we need to use [ and ] instead.
28069  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28070  if test "x$has_forbidden_chars" != x; then
28071    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28072    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28073    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28074    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28075      # Going to short mode and back again did indeed matter. Since short mode is
28076      # case insensitive, let's make it lowercase to improve readability.
28077      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28078      # Now convert it back to Unix-stile (cygpath)
28079      input_path=`$CYGPATH -u "$shortmode_path"`
28080      new_path="$input_path"
28081    fi
28082  fi
28083
28084  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28085  if test "x$test_cygdrive_prefix" = x; then
28086    # As a simple fix, exclude /usr/bin since it's not a real path.
28087    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28088      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28089      # a path prefixed by /cygdrive for fixpath to work.
28090      new_path="$CYGWIN_ROOT_PATH$input_path"
28091    fi
28092  fi
28093
28094  # remove trailing .exe if any
28095  new_path="${new_path/%.exe/}"
28096
28097  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28098
28099  # First separate the path from the arguments. This will split at the first
28100  # space.
28101  complete="$LIPO"
28102  path="${complete%% *}"
28103  tmp="$complete EOL"
28104  arguments="${tmp#* }"
28105
28106  # Input might be given as Windows format, start by converting to
28107  # unix format.
28108  new_path="$path"
28109
28110  windows_path="$new_path"
28111  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28112    unix_path=`$CYGPATH -u "$windows_path"`
28113    new_path="$unix_path"
28114  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28115    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28116    new_path="$unix_path"
28117  fi
28118
28119
28120  # Now try to locate executable using which
28121  new_path=`$WHICH "$new_path" 2> /dev/null`
28122
28123  if test "x$new_path" = x; then
28124    # Oops. Which didn't find the executable.
28125    # The splitting of arguments from the executable at a space might have been incorrect,
28126    # since paths with space are more likely in Windows. Give it another try with the whole
28127    # argument.
28128    path="$complete"
28129    arguments="EOL"
28130    new_path="$path"
28131
28132  windows_path="$new_path"
28133  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28134    unix_path=`$CYGPATH -u "$windows_path"`
28135    new_path="$unix_path"
28136  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28137    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28138    new_path="$unix_path"
28139  fi
28140
28141
28142    new_path=`$WHICH "$new_path" 2> /dev/null`
28143
28144    if test "x$new_path" = x; then
28145      # It's still not found. Now this is an unrecoverable error.
28146      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
28147$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
28148      has_space=`$ECHO "$complete" | $GREP " "`
28149      if test "x$has_space" != x; then
28150        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28151$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28152      fi
28153      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
28154    fi
28155  fi
28156
28157  # Now new_path has a complete unix path to the binary
28158  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28159    # Keep paths in /bin as-is, but remove trailing .exe if any
28160    new_path="${new_path/%.exe/}"
28161    # Do not save /bin paths to all_fixpath_prefixes!
28162  else
28163    # Not in mixed or Windows style, start by that.
28164    new_path=`cmd //c echo $new_path`
28165
28166  input_path="$new_path"
28167  # Check if we need to convert this using DOS-style short mode. If the path
28168  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28169  # take no chances and rewrite it.
28170  # Note: m4 eats our [], so we need to use [ and ] instead.
28171  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28172  if test "x$has_forbidden_chars" != x; then
28173    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28174    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28175  fi
28176
28177    # Output is in $new_path
28178
28179  windows_path="$new_path"
28180  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28181    unix_path=`$CYGPATH -u "$windows_path"`
28182    new_path="$unix_path"
28183  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28184    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28185    new_path="$unix_path"
28186  fi
28187
28188    # remove trailing .exe if any
28189    new_path="${new_path/%.exe/}"
28190
28191    # Save the first 10 bytes of this path to the storage, so fixpath can work.
28192    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28193  fi
28194
28195  else
28196    # We're on a posix platform. Hooray! :)
28197    # First separate the path from the arguments. This will split at the first
28198    # space.
28199    complete="$LIPO"
28200    path="${complete%% *}"
28201    tmp="$complete EOL"
28202    arguments="${tmp#* }"
28203
28204    # Cannot rely on the command "which" here since it doesn't always work.
28205    is_absolute_path=`$ECHO "$path" | $GREP ^/`
28206    if test -z "$is_absolute_path"; then
28207      # Path to executable is not absolute. Find it.
28208      IFS_save="$IFS"
28209      IFS=:
28210      for p in $PATH; do
28211        if test -f "$p/$path" && test -x "$p/$path"; then
28212          new_path="$p/$path"
28213          break
28214        fi
28215      done
28216      IFS="$IFS_save"
28217    else
28218      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving LIPO (as $path) failed, using $path directly." >&5
28219$as_echo "$as_me: Resolving LIPO (as $path) failed, using $path directly." >&6;}
28220      new_path="$path"
28221    fi
28222
28223    if test "x$new_path" = x; then
28224        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
28225$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
28226        has_space=`$ECHO "$complete" | $GREP " "`
28227        if test "x$has_space" != x; then
28228          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28229$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28230        fi
28231        as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
28232      fi
28233  fi
28234
28235      # Now join together the path and the arguments once again
28236      if test "x$arguments" != xEOL; then
28237        new_complete="$new_path ${arguments% *}"
28238      else
28239        new_complete="$new_path"
28240      fi
28241
28242  if test "x$complete" != "x$new_complete"; then
28243      LIPO="$new_complete"
28244      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
28245$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
28246    fi
28247
28248fi
28249
28250
28251
28252# Restore old path without tools dir
28253PATH="$OLD_PATH"
28254
28255
28256# FIXME: Currently we must test this after paths but before flags. Fix!
28257
28258# And we can test some aspects on the target using configure macros.
28259
28260
28261{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
28262$as_echo_n "checking for ANSI C header files... " >&6; }
28263if ${ac_cv_header_stdc+:} false; then :
28264  $as_echo_n "(cached) " >&6
28265else
28266  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28267/* end confdefs.h.  */
28268#include <stdlib.h>
28269#include <stdarg.h>
28270#include <string.h>
28271#include <float.h>
28272
28273int
28274main ()
28275{
28276
28277  ;
28278  return 0;
28279}
28280_ACEOF
28281if ac_fn_cxx_try_compile "$LINENO"; then :
28282  ac_cv_header_stdc=yes
28283else
28284  ac_cv_header_stdc=no
28285fi
28286rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28287
28288if test $ac_cv_header_stdc = yes; then
28289  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
28290  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28291/* end confdefs.h.  */
28292#include <string.h>
28293
28294_ACEOF
28295if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28296  $EGREP "memchr" >/dev/null 2>&1; then :
28297
28298else
28299  ac_cv_header_stdc=no
28300fi
28301rm -f conftest*
28302
28303fi
28304
28305if test $ac_cv_header_stdc = yes; then
28306  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
28307  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28308/* end confdefs.h.  */
28309#include <stdlib.h>
28310
28311_ACEOF
28312if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28313  $EGREP "free" >/dev/null 2>&1; then :
28314
28315else
28316  ac_cv_header_stdc=no
28317fi
28318rm -f conftest*
28319
28320fi
28321
28322if test $ac_cv_header_stdc = yes; then
28323  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
28324  if test "$cross_compiling" = yes; then :
28325  :
28326else
28327  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28328/* end confdefs.h.  */
28329#include <ctype.h>
28330#include <stdlib.h>
28331#if ((' ' & 0x0FF) == 0x020)
28332# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
28333# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
28334#else
28335# define ISLOWER(c) \
28336		   (('a' <= (c) && (c) <= 'i') \
28337		     || ('j' <= (c) && (c) <= 'r') \
28338		     || ('s' <= (c) && (c) <= 'z'))
28339# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
28340#endif
28341
28342#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
28343int
28344main ()
28345{
28346  int i;
28347  for (i = 0; i < 256; i++)
28348    if (XOR (islower (i), ISLOWER (i))
28349	|| toupper (i) != TOUPPER (i))
28350      return 2;
28351  return 0;
28352}
28353_ACEOF
28354if ac_fn_cxx_try_run "$LINENO"; then :
28355
28356else
28357  ac_cv_header_stdc=no
28358fi
28359rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28360  conftest.$ac_objext conftest.beam conftest.$ac_ext
28361fi
28362
28363fi
28364fi
28365{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
28366$as_echo "$ac_cv_header_stdc" >&6; }
28367if test $ac_cv_header_stdc = yes; then
28368
28369$as_echo "#define STDC_HEADERS 1" >>confdefs.h
28370
28371fi
28372
28373# On IRIX 5.3, sys/types and inttypes.h are conflicting.
28374for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
28375		  inttypes.h stdint.h unistd.h
28376do :
28377  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
28378ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
28379"
28380if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
28381  cat >>confdefs.h <<_ACEOF
28382#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
28383_ACEOF
28384
28385fi
28386
28387done
28388
28389
28390
28391###############################################################################
28392#
28393# Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
28394# (The JVM can use 32 or 64 bit Java pointers but that decision
28395# is made at runtime.)
28396#
28397
28398if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28399  # Always specify -m flags on Solaris
28400
28401  # keep track of c/cxx flags that we added outselves...
28402  #   to prevent emitting warning...
28403  TARGET_BITS_FLAG="-m${OPENJDK_TARGET_CPU_BITS}"
28404
28405
28406  CFLAGS="${CFLAGS} ${TARGET_BITS_FLAG}"
28407  CXXFLAGS="${CXXFLAGS} ${TARGET_BITS_FLAG}"
28408  LDFLAGS="${LDFLAGS} ${TARGET_BITS_FLAG}"
28409
28410  CFLAGS_JDK="${CFLAGS_JDK} ${TARGET_BITS_FLAG}"
28411  CXXFLAGS_JDK="${CXXFLAGS_JDK} ${TARGET_BITS_FLAG}"
28412  LDFLAGS_JDK="${LDFLAGS_JDK} ${TARGET_BITS_FLAG}"
28413
28414elif test "x$COMPILE_TYPE" = xreduced; then
28415  if test "x$OPENJDK_TARGET_OS" != xwindows; then
28416    # Specify -m if running reduced on other Posix platforms
28417
28418  # keep track of c/cxx flags that we added outselves...
28419  #   to prevent emitting warning...
28420  TARGET_BITS_FLAG="-m${OPENJDK_TARGET_CPU_BITS}"
28421
28422
28423  CFLAGS="${CFLAGS} ${TARGET_BITS_FLAG}"
28424  CXXFLAGS="${CXXFLAGS} ${TARGET_BITS_FLAG}"
28425  LDFLAGS="${LDFLAGS} ${TARGET_BITS_FLAG}"
28426
28427  CFLAGS_JDK="${CFLAGS_JDK} ${TARGET_BITS_FLAG}"
28428  CXXFLAGS_JDK="${CXXFLAGS_JDK} ${TARGET_BITS_FLAG}"
28429  LDFLAGS_JDK="${LDFLAGS_JDK} ${TARGET_BITS_FLAG}"
28430
28431  fi
28432fi
28433
28434# Make compilation sanity check
28435for ac_header in stdio.h
28436do :
28437  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
28438if test "x$ac_cv_header_stdio_h" = xyes; then :
28439  cat >>confdefs.h <<_ACEOF
28440#define HAVE_STDIO_H 1
28441_ACEOF
28442
28443else
28444
28445  { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
28446$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
28447  if test "x$COMPILE_TYPE" = xreduced; then
28448    { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed." >&5
28449$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed." >&6;}
28450  elif test "x$COMPILE_TYPE" = xcross; then
28451    { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
28452$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
28453  fi
28454  as_fn_error $? "Cannot continue." "$LINENO" 5
28455
28456fi
28457
28458done
28459
28460
28461# The cast to long int works around a bug in the HP C Compiler
28462# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
28463# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
28464# This bug is HP SR number 8606223364.
28465{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
28466$as_echo_n "checking size of int *... " >&6; }
28467if ${ac_cv_sizeof_int_p+:} false; then :
28468  $as_echo_n "(cached) " >&6
28469else
28470  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
28471
28472else
28473  if test "$ac_cv_type_int_p" = yes; then
28474     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
28475$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
28476as_fn_error 77 "cannot compute sizeof (int *)
28477See \`config.log' for more details" "$LINENO" 5; }
28478   else
28479     ac_cv_sizeof_int_p=0
28480   fi
28481fi
28482
28483fi
28484{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
28485$as_echo "$ac_cv_sizeof_int_p" >&6; }
28486
28487
28488
28489cat >>confdefs.h <<_ACEOF
28490#define SIZEOF_INT_P $ac_cv_sizeof_int_p
28491_ACEOF
28492
28493
28494
28495if test "x$SIZEOF_INT_P" != "x$ac_cv_sizeof_int_p"; then
28496  # Workaround autoconf bug, see http://lists.gnu.org/archive/html/autoconf/2010-07/msg00004.html
28497  SIZEOF_INT_P="$ac_cv_sizeof_int_p"
28498fi
28499
28500if test "x$SIZEOF_INT_P" = x; then
28501    # The test failed, lets stick to the assumed value.
28502    { $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
28503$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
28504else
28505    TESTED_TARGET_CPU_BITS=`expr 8 \* $SIZEOF_INT_P`
28506
28507    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
28508        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
28509    fi
28510fi
28511
28512{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
28513$as_echo_n "checking for target address size... " >&6; }
28514{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
28515$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
28516
28517
28518###############################################################################
28519#
28520# Is the target little of big endian?
28521#
28522 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
28523$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
28524if ${ac_cv_c_bigendian+:} false; then :
28525  $as_echo_n "(cached) " >&6
28526else
28527  ac_cv_c_bigendian=unknown
28528    # See if we're dealing with a universal compiler.
28529    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28530/* end confdefs.h.  */
28531#ifndef __APPLE_CC__
28532	       not a universal capable compiler
28533	     #endif
28534	     typedef int dummy;
28535
28536_ACEOF
28537if ac_fn_cxx_try_compile "$LINENO"; then :
28538
28539	# Check for potential -arch flags.  It is not universal unless
28540	# there are at least two -arch flags with different values.
28541	ac_arch=
28542	ac_prev=
28543	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
28544	 if test -n "$ac_prev"; then
28545	   case $ac_word in
28546	     i?86 | x86_64 | ppc | ppc64)
28547	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
28548		 ac_arch=$ac_word
28549	       else
28550		 ac_cv_c_bigendian=universal
28551		 break
28552	       fi
28553	       ;;
28554	   esac
28555	   ac_prev=
28556	 elif test "x$ac_word" = "x-arch"; then
28557	   ac_prev=arch
28558	 fi
28559       done
28560fi
28561rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28562    if test $ac_cv_c_bigendian = unknown; then
28563      # See if sys/param.h defines the BYTE_ORDER macro.
28564      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28565/* end confdefs.h.  */
28566#include <sys/types.h>
28567	     #include <sys/param.h>
28568
28569int
28570main ()
28571{
28572#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
28573		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
28574		     && LITTLE_ENDIAN)
28575	      bogus endian macros
28576	     #endif
28577
28578  ;
28579  return 0;
28580}
28581_ACEOF
28582if ac_fn_cxx_try_compile "$LINENO"; then :
28583  # It does; now see whether it defined to BIG_ENDIAN or not.
28584	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28585/* end confdefs.h.  */
28586#include <sys/types.h>
28587		#include <sys/param.h>
28588
28589int
28590main ()
28591{
28592#if BYTE_ORDER != BIG_ENDIAN
28593		 not big endian
28594		#endif
28595
28596  ;
28597  return 0;
28598}
28599_ACEOF
28600if ac_fn_cxx_try_compile "$LINENO"; then :
28601  ac_cv_c_bigendian=yes
28602else
28603  ac_cv_c_bigendian=no
28604fi
28605rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28606fi
28607rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28608    fi
28609    if test $ac_cv_c_bigendian = unknown; then
28610      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
28611      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28612/* end confdefs.h.  */
28613#include <limits.h>
28614
28615int
28616main ()
28617{
28618#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
28619	      bogus endian macros
28620	     #endif
28621
28622  ;
28623  return 0;
28624}
28625_ACEOF
28626if ac_fn_cxx_try_compile "$LINENO"; then :
28627  # It does; now see whether it defined to _BIG_ENDIAN or not.
28628	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28629/* end confdefs.h.  */
28630#include <limits.h>
28631
28632int
28633main ()
28634{
28635#ifndef _BIG_ENDIAN
28636		 not big endian
28637		#endif
28638
28639  ;
28640  return 0;
28641}
28642_ACEOF
28643if ac_fn_cxx_try_compile "$LINENO"; then :
28644  ac_cv_c_bigendian=yes
28645else
28646  ac_cv_c_bigendian=no
28647fi
28648rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28649fi
28650rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28651    fi
28652    if test $ac_cv_c_bigendian = unknown; then
28653      # Compile a test program.
28654      if test "$cross_compiling" = yes; then :
28655  # Try to guess by grepping values from an object file.
28656	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28657/* end confdefs.h.  */
28658short int ascii_mm[] =
28659		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
28660		short int ascii_ii[] =
28661		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
28662		int use_ascii (int i) {
28663		  return ascii_mm[i] + ascii_ii[i];
28664		}
28665		short int ebcdic_ii[] =
28666		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
28667		short int ebcdic_mm[] =
28668		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
28669		int use_ebcdic (int i) {
28670		  return ebcdic_mm[i] + ebcdic_ii[i];
28671		}
28672		extern int foo;
28673
28674int
28675main ()
28676{
28677return use_ascii (foo) == use_ebcdic (foo);
28678  ;
28679  return 0;
28680}
28681_ACEOF
28682if ac_fn_cxx_try_compile "$LINENO"; then :
28683  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
28684	      ac_cv_c_bigendian=yes
28685	    fi
28686	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
28687	      if test "$ac_cv_c_bigendian" = unknown; then
28688		ac_cv_c_bigendian=no
28689	      else
28690		# finding both strings is unlikely to happen, but who knows?
28691		ac_cv_c_bigendian=unknown
28692	      fi
28693	    fi
28694fi
28695rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28696else
28697  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28698/* end confdefs.h.  */
28699$ac_includes_default
28700int
28701main ()
28702{
28703
28704	     /* Are we little or big endian?  From Harbison&Steele.  */
28705	     union
28706	     {
28707	       long int l;
28708	       char c[sizeof (long int)];
28709	     } u;
28710	     u.l = 1;
28711	     return u.c[sizeof (long int) - 1] == 1;
28712
28713  ;
28714  return 0;
28715}
28716_ACEOF
28717if ac_fn_cxx_try_run "$LINENO"; then :
28718  ac_cv_c_bigendian=no
28719else
28720  ac_cv_c_bigendian=yes
28721fi
28722rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28723  conftest.$ac_objext conftest.beam conftest.$ac_ext
28724fi
28725
28726    fi
28727fi
28728{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
28729$as_echo "$ac_cv_c_bigendian" >&6; }
28730 case $ac_cv_c_bigendian in #(
28731   yes)
28732     ENDIAN="big";; #(
28733   no)
28734     ENDIAN="little" ;; #(
28735   universal)
28736     ENDIAN="universal_endianness"
28737     ;; #(
28738   *)
28739     ENDIAN="unknown" ;;
28740 esac
28741
28742
28743if test "x$ENDIAN" = xuniversal_endianness; then
28744    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
28745fi
28746if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
28747    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
28748fi
28749
28750
28751# Configure flags for the tools
28752
28753
28754###############################################################################
28755#
28756# How to compile shared libraries.
28757#
28758
28759if test "x$GCC" = xyes; then
28760    COMPILER_NAME=gcc
28761    PICFLAG="-fPIC"
28762    LIBRARY_PREFIX=lib
28763    SHARED_LIBRARY='lib$1.so'
28764    STATIC_LIBRARY='lib$1.a'
28765    SHARED_LIBRARY_FLAGS="-shared"
28766    SHARED_LIBRARY_SUFFIX='.so'
28767    STATIC_LIBRARY_SUFFIX='.a'
28768    OBJ_SUFFIX='.o'
28769    EXE_SUFFIX=''
28770    SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
28771    SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
28772    C_FLAG_REORDER=''
28773    CXX_FLAG_REORDER=''
28774    SET_SHARED_LIBRARY_ORIGIN='-Xlinker -z -Xlinker origin -Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
28775    SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
28776    LD="$CC"
28777    LDEXE="$CC"
28778    LDCXX="$CXX"
28779    LDEXECXX="$CXX"
28780    POST_STRIP_CMD="$STRIP -g"
28781
28782    # Linking is different on MacOSX
28783    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
28784        # Might change in the future to clang.
28785        COMPILER_NAME=gcc
28786        SHARED_LIBRARY='lib$1.dylib'
28787        SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
28788        SHARED_LIBRARY_SUFFIX='.dylib'
28789        EXE_SUFFIX=''
28790        SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
28791        SET_SHARED_LIBRARY_MAPFILE=''
28792        SET_SHARED_LIBRARY_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
28793        SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
28794        POST_STRIP_CMD="$STRIP -S"
28795    fi
28796else
28797    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28798        # If it is not gcc, then assume it is the Oracle Solaris Studio Compiler
28799        COMPILER_NAME=ossc
28800        PICFLAG="-KPIC"
28801        LIBRARY_PREFIX=lib
28802        SHARED_LIBRARY='lib$1.so'
28803        STATIC_LIBRARY='lib$1.a'
28804        SHARED_LIBRARY_FLAGS="-G"
28805        SHARED_LIBRARY_SUFFIX='.so'
28806        STATIC_LIBRARY_SUFFIX='.a'
28807        OBJ_SUFFIX='.o'
28808        EXE_SUFFIX=''
28809        SET_SHARED_LIBRARY_NAME=''
28810        SET_SHARED_LIBRARY_MAPFILE='-M$1'
28811	C_FLAG_REORDER='-xF'
28812	CXX_FLAG_REORDER='-xF'
28813        SET_SHARED_LIBRARY_ORIGIN='-R\$$$$ORIGIN$1'
28814        SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
28815        CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
28816        CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
28817        CFLAGS_JDKLIB_EXTRA='-xstrconst'
28818        POST_STRIP_CMD="$STRIP -x"
28819        POST_MCS_CMD="$MCS -d -a \"JDK $FULL_VERSION\""
28820    fi
28821    if test "x$OPENJDK_TARGET_OS" = xwindows; then
28822        # If it is not gcc, then assume it is the MS Visual Studio compiler
28823        COMPILER_NAME=cl
28824        PICFLAG=""
28825        LIBRARY_PREFIX=
28826        SHARED_LIBRARY='$1.dll'
28827        STATIC_LIBRARY='$1.lib'
28828        SHARED_LIBRARY_FLAGS="-LD"
28829        SHARED_LIBRARY_SUFFIX='.dll'
28830        STATIC_LIBRARY_SUFFIX='.lib'
28831        OBJ_SUFFIX='.obj'
28832        EXE_SUFFIX='.exe'
28833        SET_SHARED_LIBRARY_NAME=''
28834        SET_SHARED_LIBRARY_MAPFILE=''
28835        SET_SHARED_LIBRARY_ORIGIN=''
28836        SET_EXECUTABLE_ORIGIN=''
28837    fi
28838fi
28839
28840
28841
28842
28843
28844
28845
28846
28847
28848
28849
28850
28851
28852
28853
28854
28855
28856
28857
28858# The (cross) compiler is now configured, we can now test capabilities
28859# of the target platform.
28860
28861
28862
28863###############################################################################
28864#
28865# Setup the opt flags for different compilers
28866# and different operating systems.
28867#
28868
28869#
28870# NOTE: check for -mstackrealign needs to be below potential addition of -m32
28871#
28872if test "x$OPENJDK_TARGET_CPU_BITS" = x32 && test "x$OPENJDK_TARGET_OS" = xmacosx; then
28873    # On 32-bit MacOSX the OS requires C-entry points to be 16 byte aligned.
28874    # While waiting for a better solution, the current workaround is to use -mstackrealign.
28875    CFLAGS="$CFLAGS -mstackrealign"
28876    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if 32-bit compiler supports -mstackrealign" >&5
28877$as_echo_n "checking if 32-bit compiler supports -mstackrealign... " >&6; }
28878    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28879/* end confdefs.h.  */
28880int main() { return 0; }
28881_ACEOF
28882if ac_fn_cxx_try_link "$LINENO"; then :
28883
28884		        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
28885$as_echo "yes" >&6; }
28886
28887else
28888
28889		        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28890$as_echo "no" >&6; }
28891	                as_fn_error $? "The selected compiler $CXX does not support -mstackrealign! Try to put another compiler in the path." "$LINENO" 5
28892
28893fi
28894rm -f core conftest.err conftest.$ac_objext \
28895    conftest$ac_exeext conftest.$ac_ext
28896fi
28897
28898C_FLAG_DEPS="-MMD -MF"
28899CXX_FLAG_DEPS="-MMD -MF"
28900
28901case $COMPILER_TYPE in
28902  CC )
28903    case $COMPILER_NAME in
28904      gcc )
28905      	case $OPENJDK_TARGET_OS in
28906	  macosx )
28907	    # On MacOSX we optimize for size, something
28908	    # we should do for all platforms?
28909	    C_O_FLAG_HI="-Os"
28910	    C_O_FLAG_NORM="-Os"
28911	    C_O_FLAG_NONE=""
28912	    ;;
28913	  *)
28914	    C_O_FLAG_HI="-O3"
28915	    C_O_FLAG_NORM="-O2"
28916	    C_O_FLAG_NONE="-O0"
28917	    ;;
28918	esac
28919        CXX_O_FLAG_HI="$C_O_FLAG_HI"
28920        CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
28921        CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
28922        CFLAGS_DEBUG_SYMBOLS="-g"
28923        CXXFLAGS_DEBUG_SYMBOLS="-g"
28924        if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
28925            CFLAGS_DEBUG_SYMBOLS="-g1"
28926            CXXFLAGS_DEBUG_SYMBOLS="-g1"
28927        fi
28928        ;;
28929      ossc )
28930        #
28931        # Forte has different names for this with their C++ compiler...
28932        #
28933        C_FLAG_DEPS="-xMMD -xMF"
28934        CXX_FLAG_DEPS="-xMMD -xMF"
28935
28936        # Extra options used with HIGHEST
28937        #
28938        # WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
28939        #          done with care, there are some assumptions below that need to
28940        #          be understood about the use of pointers, and IEEE behavior.
28941        #
28942        # Use non-standard floating point mode (not IEEE 754)
28943        CC_HIGHEST="$CC_HIGHEST -fns"
28944        # Do some simplification of floating point arithmetic (not IEEE 754)
28945        CC_HIGHEST="$CC_HIGHEST -fsimple"
28946        # Use single precision floating point with 'float'
28947        CC_HIGHEST="$CC_HIGHEST -fsingle"
28948        # Assume memory references via basic pointer types do not alias
28949        #   (Source with excessing pointer casting and data access with mixed
28950        #    pointer types are not recommended)
28951        CC_HIGHEST="$CC_HIGHEST -xalias_level=basic"
28952        # Use intrinsic or inline versions for math/std functions
28953        #   (If you expect perfect errno behavior, do not use this)
28954        CC_HIGHEST="$CC_HIGHEST -xbuiltin=%all"
28955        # Loop data dependency optimizations (need -xO3 or higher)
28956        CC_HIGHEST="$CC_HIGHEST -xdepend"
28957        # Pointer parameters to functions do not overlap
28958        #   (Similar to -xalias_level=basic usage, but less obvious sometimes.
28959        #    If you pass in multiple pointers to the same data, do not use this)
28960        CC_HIGHEST="$CC_HIGHEST -xrestrict"
28961        # Inline some library routines
28962        #   (If you expect perfect errno behavior, do not use this)
28963        CC_HIGHEST="$CC_HIGHEST -xlibmil"
28964        # Use optimized math routines
28965        #   (If you expect perfect errno behavior, do not use this)
28966        #  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
28967        #CC_HIGHEST="$CC_HIGHEST -xlibmopt"
28968
28969        if test "x$OPENJDK_TARGET_CPU" = xsparc; then
28970          CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
28971          CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
28972        fi
28973
28974        case $OPENJDK_TARGET_CPU_ARCH in
28975          x86)
28976            C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xregs=no%frameptr"
28977            C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
28978            C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
28979            C_O_FLAG_NONE="-xregs=no%frameptr"
28980            CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
28981            CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
28982            CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
28983            CXX_O_FLAG_NONE="-xregs=no%frameptr"
28984            if test "x$OPENJDK_TARGET_CPU" = xx86; then
28985               C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
28986               CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
28987            fi
28988            ;;
28989          sparc)
28990            CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
28991            CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
28992            C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
28993            C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
28994            C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
28995            C_O_FLAG_NONE=""
28996            CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
28997            CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
28998            CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
28999            CXX_O_FLAG_NONE=""
29000            ;;
29001        esac
29002
29003    CFLAGS_DEBUG_SYMBOLS="-g -xs"
29004    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
29005    esac
29006    ;;
29007  CL )
29008    C_O_FLAG_HIGHEST="-O2"
29009    C_O_FLAG_HI="-O1"
29010    C_O_FLAG_NORM="-O1"
29011    C_O_FLAG_NONE="-Od"
29012    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
29013    CXX_O_FLAG_HI="$C_O_FLAG_HI"
29014    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
29015    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
29016    ;;
29017esac
29018
29019if test -z "$C_O_FLAG_HIGHEST"; then
29020   C_O_FLAG_HIGHEST="$C_O_FLAG_HI"
29021fi
29022
29023if test -z "$CXX_O_FLAG_HIGHEST"; then
29024   CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HI"
29025fi
29026
29027
29028
29029
29030
29031
29032
29033
29034
29035
29036
29037
29038
29039
29040if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
29041   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
29042$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
29043fi
29044
29045if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
29046   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
29047$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
29048fi
29049
29050if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
29051   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
29052$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
29053fi
29054
29055
29056# Check whether --with-extra-cflags was given.
29057if test "${with_extra_cflags+set}" = set; then :
29058  withval=$with_extra_cflags;
29059fi
29060
29061
29062
29063# Check whether --with-extra-cxxflags was given.
29064if test "${with_extra_cxxflags+set}" = set; then :
29065  withval=$with_extra_cxxflags;
29066fi
29067
29068
29069
29070# Check whether --with-extra-ldflags was given.
29071if test "${with_extra_ldflags+set}" = set; then :
29072  withval=$with_extra_ldflags;
29073fi
29074
29075
29076CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags"
29077CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags"
29078LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags"
29079
29080# Hotspot needs these set in their legacy form
29081LEGACY_EXTRA_CFLAGS=$with_extra_cflags
29082LEGACY_EXTRA_CXXFLAGS=$with_extra_cxxflags
29083LEGACY_EXTRA_LDFLAGS=$with_extra_ldflags
29084
29085
29086
29087
29088
29089###############################################################################
29090#
29091# Now setup the CFLAGS and LDFLAGS for the JDK build.
29092# Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
29093#
29094case $COMPILER_NAME in
29095      gcc )
29096      	  CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -W -Wall -Wno-unused -Wno-parentheses \
29097                          -pipe \
29098                          -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
29099	  case $OPENJDK_TARGET_CPU_ARCH in
29100	  arm )
29101            # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
29102	    CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
29103	  ;;
29104	  ppc )
29105            # on ppc we don't prevent gcc to omit frame pointer nor strict-aliasing
29106	  ;;
29107	  * )
29108	    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -fno-omit-frame-pointer"
29109	    CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
29110          ;;
29111	  esac
29112          ;;
29113      ossc )
29114          CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
29115          case $OPENJDK_TARGET_CPU_ARCH in
29116          x86 )
29117            CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
29118       	    CFLAGS_JDK="$CFLAGS_JDK -erroff=E_BAD_PRAGMA_PACK_VALUE"
29119          ;;
29120          esac
29121
29122      	  CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
29123      	  CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
29124
29125          LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
29126          LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
29127          ;;
29128      cl )
29129          CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
29130               -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB -DWIN32_LEAN_AND_MEAN \
29131	       -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
29132	       -DWIN32 -DIAL"
29133          case $OPENJDK_TARGET_CPU in
29134              x86 )
29135                  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_X86_ -Dx86"
29136                  ;;
29137              x86_64 )
29138                  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_AMD64_ -Damd64"
29139                  ;;
29140          esac
29141          ;;
29142esac
29143
29144###############################################################################
29145
29146# Adjust flags according to debug level.
29147case $DEBUG_LEVEL in
29148      fastdebug )
29149              CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS"
29150              CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS"
29151	      C_O_FLAG_HI="$C_O_FLAG_NORM"
29152	      C_O_FLAG_NORM="$C_O_FLAG_NORM"
29153	      CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
29154	      CXX_O_FLAG_NORM="$CXX_O_FLAG_NORM"
29155              JAVAC_FLAGS="$JAVAC_FLAGS -g"
29156              ;;
29157      slowdebug )
29158              CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS"
29159              CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS"
29160	      C_O_FLAG_HI="$C_O_FLAG_NONE"
29161	      C_O_FLAG_NORM="$C_O_FLAG_NONE"
29162	      CXX_O_FLAG_HI="$CXX_O_FLAG_NONE"
29163	      CXX_O_FLAG_NORM="$CXX_O_FLAG_NONE"
29164              JAVAC_FLAGS="$JAVAC_FLAGS -g"
29165              ;;
29166esac
29167
29168CCXXFLAGS_JDK="$CCXXFLAGS_JDK $ADD_LP64"
29169
29170# The package path is used only on macosx?
29171PACKAGE_PATH=/opt/local
29172
29173
29174if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
29175    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
29176    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
29177    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
29178    #   Note: -Dmacro         is the same as    #define macro 1
29179    #         -Dmacro=	    is the same as    #define macro
29180    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29181        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
29182    else
29183        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
29184    fi
29185else
29186    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_BIG_ENDIAN"
29187fi
29188if test "x$OPENJDK_TARGET_OS" = xlinux; then
29189    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DLINUX"
29190fi
29191if test "x$OPENJDK_TARGET_OS" = xwindows; then
29192    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DWINDOWS"
29193fi
29194if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29195    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DSOLARIS"
29196fi
29197if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29198    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMACOSX -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
29199    # Setting these parameters makes it an error to link to macosx APIs that are
29200    # newer than the given OS version and makes the linked binaries compatible even
29201    # if built on a newer version of the OS.
29202    # The expected format is X.Y.Z
29203    MACOSX_VERSION_MIN=10.7.0
29204
29205    # The macro takes the version with no dots, ex: 1070
29206    # Let the flags variables get resolved in make for easier override on make
29207    # command line.
29208    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
29209    LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
29210fi
29211if test "x$OPENJDK_TARGET_OS" = xbsd; then
29212    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DBSD -D_ALLBSD_SOURCE"
29213fi
29214if test "x$DEBUG_LEVEL" = xrelease; then
29215    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DNDEBUG"
29216    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29217        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DTRIMMED"
29218    fi
29219else
29220    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DDEBUG"
29221fi
29222
29223CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
29224CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DRELEASE='\"$RELEASE\"'"
29225
29226CCXXFLAGS_JDK="$CCXXFLAGS_JDK \
29227        -I${JDK_OUTPUTDIR}/include \
29228        -I${JDK_OUTPUTDIR}/include/$OPENJDK_TARGET_OS \
29229        -I${JDK_TOPDIR}/src/share/javavm/export \
29230        -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/javavm/export \
29231        -I${JDK_TOPDIR}/src/share/native/common \
29232        -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/native/common"
29233
29234# The shared libraries are compiled using the picflag.
29235CFLAGS_JDKLIB="$CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
29236CXXFLAGS_JDKLIB="$CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA "
29237
29238# Executable flags
29239CFLAGS_JDKEXE="$CCXXFLAGS_JDK $CFLAGS_JDK"
29240CXXFLAGS_JDKEXE="$CCXXFLAGS_JDK $CXXFLAGS_JDK"
29241
29242# Now this is odd. The JDK native libraries have to link against libjvm.so
29243# On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
29244# Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
29245# is identical for client and server? Yes. Which is picked at runtime (client or server)?
29246# Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
29247# libraries will link to whatever is in memory. Yuck.
29248#
29249# Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
29250if test "x$COMPILER_NAME" = xcl; then
29251    LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
29252    if test "x$OPENJDK_TARGET_CPU" = xx86; then
29253        LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
29254    fi
29255    # TODO: make -debug optional "--disable-full-debug-symbols"
29256    LDFLAGS_JDK="$LDFLAGS_JDK -debug"
29257    LDFLAGS_JDKLIB="${LDFLAGS_JDK} -dll -libpath:${JDK_OUTPUTDIR}/lib"
29258    LDFLAGS_JDKLIB_SUFFIX=""
29259    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
29260        LDFLAGS_STACK_SIZE=1048576
29261    else
29262        LDFLAGS_STACK_SIZE=327680
29263    fi
29264    LDFLAGS_JDKEXE="${LDFLAGS_JDK} /STACK:$LDFLAGS_STACK_SIZE"
29265else
29266    if test "x$COMPILER_NAME" = xgcc; then
29267        # If this is a --hash-style=gnu system, use --hash-style=both, why?
29268        HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
29269        if test -n "$HAS_GNU_HASH"; then
29270            LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both "
29271        fi
29272        if test "x$OPENJDK_TARGET_OS" = xlinux; then
29273          # And since we now know that the linker is gnu, then add -z defs, to forbid
29274          # undefined symbols in object files.
29275          LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs"
29276          if test "x$DEBUG_LEVEL" = "xrelease"; then
29277              # When building release libraries, tell the linker optimize them.
29278              # Should this be supplied to the OSS linker as well?
29279              LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
29280          fi
29281        fi
29282    fi
29283    LDFLAGS_JDKLIB="${LDFLAGS_JDK} $SHARED_LIBRARY_FLAGS \
29284                    -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}"
29285
29286    # On some platforms (mac) the linker warns about non existing -L dirs.
29287    # Add server first if available. Linking aginst client does not always produce the same results.
29288    # Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
29289    # Default to server for other variants.
29290    if test "x$JVM_VARIANT_SERVER" = xtrue; then
29291        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
29292    elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
29293        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/client"
29294    elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
29295        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
29296    else
29297        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
29298    fi
29299
29300    LDFLAGS_JDKLIB_SUFFIX="-ljava -ljvm"
29301    if test "x$COMPILER_NAME" = xossc; then
29302        LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc"
29303    fi
29304
29305    LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
29306    if test "x$OPENJDK_TARGET_OS" = xlinux; then
29307        LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
29308    fi
29309fi
29310
29311
29312
29313
29314
29315
29316
29317
29318
29319
29320
29321
29322
29323
29324
29325  # Some Zero and Shark settings.
29326  # ZERO_ARCHFLAG tells the compiler which mode to build for
29327  case "${OPENJDK_TARGET_CPU}" in
29328    s390)
29329      ZERO_ARCHFLAG="-m31"
29330      ;;
29331    *)
29332      ZERO_ARCHFLAG="-m${OPENJDK_TARGET_CPU_BITS}"
29333  esac
29334
29335  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$ZERO_ARCHFLAG\"" >&5
29336$as_echo_n "checking if compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
29337  supports=yes
29338
29339  saved_cflags="$CFLAGS"
29340  CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
29341  ac_ext=c
29342ac_cpp='$CPP $CPPFLAGS'
29343ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29344ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29345ac_compiler_gnu=$ac_cv_c_compiler_gnu
29346
29347  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29348/* end confdefs.h.  */
29349
29350    int i;
29351
29352_ACEOF
29353if ac_fn_c_try_compile "$LINENO"; then :
29354
29355else
29356  supports=no
29357fi
29358rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29359  ac_ext=cpp
29360ac_cpp='$CXXCPP $CPPFLAGS'
29361ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29362ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29363ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29364
29365  CFLAGS="$saved_cflags"
29366
29367  saved_cxxflags="$CXXFLAGS"
29368  CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
29369  ac_ext=cpp
29370ac_cpp='$CXXCPP $CPPFLAGS'
29371ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29372ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29373ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29374
29375  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29376/* end confdefs.h.  */
29377
29378    int i;
29379
29380_ACEOF
29381if ac_fn_cxx_try_compile "$LINENO"; then :
29382
29383else
29384  supports=no
29385fi
29386rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29387  ac_ext=cpp
29388ac_cpp='$CXXCPP $CPPFLAGS'
29389ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29390ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29391ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29392
29393  CXXFLAGS="$saved_cxxflags"
29394
29395  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
29396$as_echo "$supports" >&6; }
29397  if test "x$supports" = "xyes" ; then
29398    :
29399  else
29400    ZERO_ARCHFLAG=""
29401  fi
29402
29403
29404
29405  # Check that the compiler supports -mX flags
29406  # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
29407
29408  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"-m${OPENJDK_TARGET_CPU_BITS}\"" >&5
29409$as_echo_n "checking if compiler supports \"-m${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
29410  supports=yes
29411
29412  saved_cflags="$CFLAGS"
29413  CFLAGS="$CFLAGS -m${OPENJDK_TARGET_CPU_BITS}"
29414  ac_ext=c
29415ac_cpp='$CPP $CPPFLAGS'
29416ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29417ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29418ac_compiler_gnu=$ac_cv_c_compiler_gnu
29419
29420  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29421/* end confdefs.h.  */
29422
29423    int i;
29424
29425_ACEOF
29426if ac_fn_c_try_compile "$LINENO"; then :
29427
29428else
29429  supports=no
29430fi
29431rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29432  ac_ext=cpp
29433ac_cpp='$CXXCPP $CPPFLAGS'
29434ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29435ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29436ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29437
29438  CFLAGS="$saved_cflags"
29439
29440  saved_cxxflags="$CXXFLAGS"
29441  CXXFLAGS="$CXXFLAG -m${OPENJDK_TARGET_CPU_BITS}"
29442  ac_ext=cpp
29443ac_cpp='$CXXCPP $CPPFLAGS'
29444ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29445ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29446ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29447
29448  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29449/* end confdefs.h.  */
29450
29451    int i;
29452
29453_ACEOF
29454if ac_fn_cxx_try_compile "$LINENO"; then :
29455
29456else
29457  supports=no
29458fi
29459rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29460  ac_ext=cpp
29461ac_cpp='$CXXCPP $CPPFLAGS'
29462ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29463ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29464ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29465
29466  CXXFLAGS="$saved_cxxflags"
29467
29468  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
29469$as_echo "$supports" >&6; }
29470  if test "x$supports" = "xyes" ; then
29471    COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
29472  else
29473    COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
29474  fi
29475
29476
29477
29478
29479# Setup debug symbols (need objcopy from the toolchain for that)
29480
29481#
29482# ENABLE_DEBUG_SYMBOLS
29483# This must be done after the toolchain is setup, since we're looking at objcopy.
29484#
29485# Check whether --enable-debug-symbols was given.
29486if test "${enable_debug_symbols+set}" = set; then :
29487  enableval=$enable_debug_symbols;
29488fi
29489
29490
29491{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should generate debug symbols" >&5
29492$as_echo_n "checking if we should generate debug symbols... " >&6; }
29493
29494if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then
29495   # explicit enabling of enable-debug-symbols and can't find objcopy
29496   #   this is an error
29497   as_fn_error $? "Unable to find objcopy, cannot enable debug-symbols" "$LINENO" 5
29498fi
29499
29500if test "x$enable_debug_symbols" = "xyes"; then
29501  ENABLE_DEBUG_SYMBOLS=true
29502elif test "x$enable_debug_symbols" = "xno"; then
29503  ENABLE_DEBUG_SYMBOLS=false
29504else
29505  # default on macosx is false
29506  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29507    ENABLE_DEBUG_SYMBOLS=false
29508  # Default is on if objcopy is found, otherwise off
29509  elif test "x$OBJCOPY" != x || test "x$OPENJDK_TARGET_OS" = xwindows; then
29510    ENABLE_DEBUG_SYMBOLS=true
29511  else
29512    ENABLE_DEBUG_SYMBOLS=false
29513  fi
29514fi
29515
29516{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_DEBUG_SYMBOLS" >&5
29517$as_echo "$ENABLE_DEBUG_SYMBOLS" >&6; }
29518
29519#
29520# ZIP_DEBUGINFO_FILES
29521#
29522{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should zip debug-info files" >&5
29523$as_echo_n "checking if we should zip debug-info files... " >&6; }
29524# Check whether --enable-zip-debug-info was given.
29525if test "${enable_zip_debug_info+set}" = set; then :
29526  enableval=$enable_zip_debug_info; enable_zip_debug_info="${enableval}"
29527else
29528  enable_zip_debug_info="yes"
29529fi
29530
29531{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_zip_debug_info}" >&5
29532$as_echo "${enable_zip_debug_info}" >&6; }
29533
29534if test "x${enable_zip_debug_info}" = "xno"; then
29535   ZIP_DEBUGINFO_FILES=false
29536else
29537   ZIP_DEBUGINFO_FILES=true
29538fi
29539
29540
29541
29542
29543
29544
29545
29546###############################################################################
29547#
29548# Check dependencies for external and internal libraries.
29549#
29550###############################################################################
29551
29552
29553
29554###############################################################################
29555#
29556# OS specific settings that we never will need to probe.
29557#
29558if test "x$OPENJDK_TARGET_OS" = xlinux; then
29559    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Linux?" >&5
29560$as_echo_n "checking what is not needed on Linux?... " >&6; }
29561    PULSE_NOT_NEEDED=yes
29562    { $as_echo "$as_me:${as_lineno-$LINENO}: result: pulse" >&5
29563$as_echo "pulse" >&6; }
29564fi
29565
29566if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29567    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Solaris?" >&5
29568$as_echo_n "checking what is not needed on Solaris?... " >&6; }
29569    ALSA_NOT_NEEDED=yes
29570    PULSE_NOT_NEEDED=yes
29571    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
29572$as_echo "alsa pulse" >&6; }
29573fi
29574
29575if test "x$OPENJDK_TARGET_OS" = xwindows; then
29576    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Windows?" >&5
29577$as_echo_n "checking what is not needed on Windows?... " >&6; }
29578    CUPS_NOT_NEEDED=yes
29579    ALSA_NOT_NEEDED=yes
29580    PULSE_NOT_NEEDED=yes
29581    X11_NOT_NEEDED=yes
29582    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa cups pulse x11" >&5
29583$as_echo "alsa cups pulse x11" >&6; }
29584fi
29585
29586if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29587    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on MacOSX?" >&5
29588$as_echo_n "checking what is not needed on MacOSX?... " >&6; }
29589    ALSA_NOT_NEEDED=yes
29590    PULSE_NOT_NEEDED=yes
29591    X11_NOT_NEEDED=yes
29592    FREETYPE2_NOT_NEEDED=yes
29593    # If the java runtime framework is disabled, then we need X11.
29594    # This will be adjusted below.
29595    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse x11" >&5
29596$as_echo "alsa pulse x11" >&6; }
29597fi
29598
29599if test "x$OPENJDK_TARGET_OS" = xbsd; then
29600    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on bsd?" >&5
29601$as_echo_n "checking what is not needed on bsd?... " >&6; }
29602    ALSA_NOT_NEEDED=yes
29603    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa" >&5
29604$as_echo "alsa" >&6; }
29605fi
29606
29607if test "x$OPENJDK" = "xfalse"; then
29608    FREETYPE2_NOT_NEEDED=yes
29609fi
29610
29611if test "x$SUPPORT_HEADFUL" = xno; then
29612    X11_NOT_NEEDED=yes
29613fi
29614
29615###############################################################################
29616#
29617# Check for MacOSX support for OpenJDK. If this exists, try to build a JVM
29618# that uses this API.
29619#
29620# Check whether --enable-macosx-runtime-support was given.
29621if test "${enable_macosx_runtime_support+set}" = set; then :
29622  enableval=$enable_macosx_runtime_support; MACOSX_RUNTIME_SUPPORT="${enableval}"
29623else
29624  MACOSX_RUNTIME_SUPPORT="no"
29625fi
29626
29627
29628USE_MACOSX_RUNTIME_SUPPORT=no
29629{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for explicit Java runtime support in the OS" >&5
29630$as_echo_n "checking for explicit Java runtime support in the OS... " >&6; }
29631if test -f /System/Library/Frameworks/JavaVM.framework/Frameworks/JavaRuntimeSupport.framework/Headers/JavaRuntimeSupport.h; then
29632    if test "x$MACOSX_RUNTIME_SUPPORT" != xno; then
29633        MACOSX_RUNTIME_SUPPORT=yes
29634        USE_MACOSX_RUNTIME_SUPPORT=yes
29635        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, does not need alsa freetype2 pulse and X11" >&5
29636$as_echo "yes, does not need alsa freetype2 pulse and X11" >&6; }
29637    else
29638        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, but explicitly disabled." >&5
29639$as_echo "yes, but explicitly disabled." >&6; }
29640    fi
29641else
29642    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29643$as_echo "no" >&6; }
29644fi
29645
29646if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$USE_MACOSX_RUNTIME_SUPPORT" = xno; then
29647    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on an X11 build on MacOSX?" >&5
29648$as_echo_n "checking what is not needed on an X11 build on MacOSX?... " >&6; }
29649    X11_NOT_NEEDED=
29650    FREETYPE2_NOT_NEEDED=
29651    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
29652$as_echo "alsa pulse" >&6; }
29653fi
29654
29655
29656
29657###############################################################################
29658#
29659# Check for X Windows
29660#
29661
29662# Check if the user has specified sysroot, but not --x-includes or --x-libraries.
29663# Make a simple check for the libraries at the sysroot, and setup --x-includes and
29664# --x-libraries for the sysroot, if that seems to be correct.
29665if test "x$SYS_ROOT" != "x/"; then
29666  if test "x$x_includes" = xNONE; then
29667    if test -f "$SYS_ROOT/usr/X11R6/include/X11/Xlib.h"; then
29668      x_includes="$SYS_ROOT/usr/X11R6/include"
29669    elif test -f "$SYS_ROOT/usr/include/X11/Xlib.h"; then
29670      x_includes="$SYS_ROOT/usr/include"
29671    fi
29672  fi
29673  if test "x$x_libraries" = xNONE; then
29674    if test -f "$SYS_ROOT/usr/X11R6/lib/libX11.so"; then
29675      x_libraries="$SYS_ROOT/usr/X11R6/lib"
29676    elif test "$SYS_ROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
29677      x_libraries="$SYS_ROOT/usr/lib64"
29678    elif test -f "$SYS_ROOT/usr/lib/libX11.so"; then
29679      x_libraries="$SYS_ROOT/usr/lib"
29680    fi
29681  fi
29682fi
29683
29684# Now let autoconf do it's magic
29685{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
29686$as_echo_n "checking for X... " >&6; }
29687
29688
29689# Check whether --with-x was given.
29690if test "${with_x+set}" = set; then :
29691  withval=$with_x;
29692fi
29693
29694# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
29695if test "x$with_x" = xno; then
29696  # The user explicitly disabled X.
29697  have_x=disabled
29698else
29699  case $x_includes,$x_libraries in #(
29700    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
29701    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
29702  $as_echo_n "(cached) " >&6
29703else
29704  # One or both of the vars are not set, and there is no cached value.
29705ac_x_includes=no ac_x_libraries=no
29706rm -f -r conftest.dir
29707if mkdir conftest.dir; then
29708  cd conftest.dir
29709  cat >Imakefile <<'_ACEOF'
29710incroot:
29711	@echo incroot='${INCROOT}'
29712usrlibdir:
29713	@echo usrlibdir='${USRLIBDIR}'
29714libdir:
29715	@echo libdir='${LIBDIR}'
29716_ACEOF
29717  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
29718    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
29719    for ac_var in incroot usrlibdir libdir; do
29720      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
29721    done
29722    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
29723    for ac_extension in a so sl dylib la dll; do
29724      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
29725	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
29726	ac_im_usrlibdir=$ac_im_libdir; break
29727      fi
29728    done
29729    # Screen out bogus values from the imake configuration.  They are
29730    # bogus both because they are the default anyway, and because
29731    # using them would break gcc on systems where it needs fixed includes.
29732    case $ac_im_incroot in
29733	/usr/include) ac_x_includes= ;;
29734	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
29735    esac
29736    case $ac_im_usrlibdir in
29737	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
29738	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
29739    esac
29740  fi
29741  cd ..
29742  rm -f -r conftest.dir
29743fi
29744
29745# Standard set of common directories for X headers.
29746# Check X11 before X11Rn because it is often a symlink to the current release.
29747ac_x_header_dirs='
29748/usr/X11/include
29749/usr/X11R7/include
29750/usr/X11R6/include
29751/usr/X11R5/include
29752/usr/X11R4/include
29753
29754/usr/include/X11
29755/usr/include/X11R7
29756/usr/include/X11R6
29757/usr/include/X11R5
29758/usr/include/X11R4
29759
29760/usr/local/X11/include
29761/usr/local/X11R7/include
29762/usr/local/X11R6/include
29763/usr/local/X11R5/include
29764/usr/local/X11R4/include
29765
29766/usr/local/include/X11
29767/usr/local/include/X11R7
29768/usr/local/include/X11R6
29769/usr/local/include/X11R5
29770/usr/local/include/X11R4
29771
29772/usr/X386/include
29773/usr/x386/include
29774/usr/XFree86/include/X11
29775
29776/usr/include
29777/usr/local/include
29778/usr/unsupported/include
29779/usr/athena/include
29780/usr/local/x11r5/include
29781/usr/lpp/Xamples/include
29782
29783/usr/openwin/include
29784/usr/openwin/share/include'
29785
29786if test "$ac_x_includes" = no; then
29787  # Guess where to find include files, by looking for Xlib.h.
29788  # First, try using that file with no special directory specified.
29789  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29790/* end confdefs.h.  */
29791#include <X11/Xlib.h>
29792_ACEOF
29793if ac_fn_cxx_try_cpp "$LINENO"; then :
29794  # We can compile using X headers with no special include directory.
29795ac_x_includes=
29796else
29797  for ac_dir in $ac_x_header_dirs; do
29798  if test -r "$ac_dir/X11/Xlib.h"; then
29799    ac_x_includes=$ac_dir
29800    break
29801  fi
29802done
29803fi
29804rm -f conftest.err conftest.i conftest.$ac_ext
29805fi # $ac_x_includes = no
29806
29807if test "$ac_x_libraries" = no; then
29808  # Check for the libraries.
29809  # See if we find them without any special options.
29810  # Don't add to $LIBS permanently.
29811  ac_save_LIBS=$LIBS
29812  LIBS="-lX11 $LIBS"
29813  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29814/* end confdefs.h.  */
29815#include <X11/Xlib.h>
29816int
29817main ()
29818{
29819XrmInitialize ()
29820  ;
29821  return 0;
29822}
29823_ACEOF
29824if ac_fn_cxx_try_link "$LINENO"; then :
29825  LIBS=$ac_save_LIBS
29826# We can link X programs with no special library path.
29827ac_x_libraries=
29828else
29829  LIBS=$ac_save_LIBS
29830for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
29831do
29832  # Don't even attempt the hair of trying to link an X program!
29833  for ac_extension in a so sl dylib la dll; do
29834    if test -r "$ac_dir/libX11.$ac_extension"; then
29835      ac_x_libraries=$ac_dir
29836      break 2
29837    fi
29838  done
29839done
29840fi
29841rm -f core conftest.err conftest.$ac_objext \
29842    conftest$ac_exeext conftest.$ac_ext
29843fi # $ac_x_libraries = no
29844
29845case $ac_x_includes,$ac_x_libraries in #(
29846  no,* | *,no | *\'*)
29847    # Didn't find X, or a directory has "'" in its name.
29848    ac_cv_have_x="have_x=no";; #(
29849  *)
29850    # Record where we found X for the cache.
29851    ac_cv_have_x="have_x=yes\
29852	ac_x_includes='$ac_x_includes'\
29853	ac_x_libraries='$ac_x_libraries'"
29854esac
29855fi
29856;; #(
29857    *) have_x=yes;;
29858  esac
29859  eval "$ac_cv_have_x"
29860fi # $with_x != no
29861
29862if test "$have_x" != yes; then
29863  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
29864$as_echo "$have_x" >&6; }
29865  no_x=yes
29866else
29867  # If each of the values was on the command line, it overrides each guess.
29868  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
29869  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
29870  # Update the cache value to reflect the command line values.
29871  ac_cv_have_x="have_x=yes\
29872	ac_x_includes='$x_includes'\
29873	ac_x_libraries='$x_libraries'"
29874  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
29875$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
29876fi
29877
29878if test "$no_x" = yes; then
29879  # Not all programs may use this symbol, but it does not hurt to define it.
29880
29881$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
29882
29883  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
29884else
29885  if test -n "$x_includes"; then
29886    X_CFLAGS="$X_CFLAGS -I$x_includes"
29887  fi
29888
29889  # It would also be nice to do this for all -L options, not just this one.
29890  if test -n "$x_libraries"; then
29891    X_LIBS="$X_LIBS -L$x_libraries"
29892    # For Solaris; some versions of Sun CC require a space after -R and
29893    # others require no space.  Words are not sufficient . . . .
29894    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
29895$as_echo_n "checking whether -R must be followed by a space... " >&6; }
29896    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
29897    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
29898    ac_cxx_werror_flag=yes
29899    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29900/* end confdefs.h.  */
29901
29902int
29903main ()
29904{
29905
29906  ;
29907  return 0;
29908}
29909_ACEOF
29910if ac_fn_cxx_try_link "$LINENO"; then :
29911  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29912$as_echo "no" >&6; }
29913       X_LIBS="$X_LIBS -R$x_libraries"
29914else
29915  LIBS="$ac_xsave_LIBS -R $x_libraries"
29916       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29917/* end confdefs.h.  */
29918
29919int
29920main ()
29921{
29922
29923  ;
29924  return 0;
29925}
29926_ACEOF
29927if ac_fn_cxx_try_link "$LINENO"; then :
29928  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
29929$as_echo "yes" >&6; }
29930	  X_LIBS="$X_LIBS -R $x_libraries"
29931else
29932  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
29933$as_echo "neither works" >&6; }
29934fi
29935rm -f core conftest.err conftest.$ac_objext \
29936    conftest$ac_exeext conftest.$ac_ext
29937fi
29938rm -f core conftest.err conftest.$ac_objext \
29939    conftest$ac_exeext conftest.$ac_ext
29940    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
29941    LIBS=$ac_xsave_LIBS
29942  fi
29943
29944  # Check for system-dependent libraries X programs must link with.
29945  # Do this before checking for the system-independent R6 libraries
29946  # (-lICE), since we may need -lsocket or whatever for X linking.
29947
29948  if test "$ISC" = yes; then
29949    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
29950  else
29951    # Martyn Johnson says this is needed for Ultrix, if the X
29952    # libraries were built with DECnet support.  And Karl Berry says
29953    # the Alpha needs dnet_stub (dnet does not exist).
29954    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
29955    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29956/* end confdefs.h.  */
29957
29958/* Override any GCC internal prototype to avoid an error.
29959   Use char because int might match the return type of a GCC
29960   builtin and then its argument prototype would still apply.  */
29961#ifdef __cplusplus
29962extern "C"
29963#endif
29964char XOpenDisplay ();
29965int
29966main ()
29967{
29968return XOpenDisplay ();
29969  ;
29970  return 0;
29971}
29972_ACEOF
29973if ac_fn_cxx_try_link "$LINENO"; then :
29974
29975else
29976  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
29977$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
29978if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
29979  $as_echo_n "(cached) " >&6
29980else
29981  ac_check_lib_save_LIBS=$LIBS
29982LIBS="-ldnet  $LIBS"
29983cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29984/* end confdefs.h.  */
29985
29986/* Override any GCC internal prototype to avoid an error.
29987   Use char because int might match the return type of a GCC
29988   builtin and then its argument prototype would still apply.  */
29989#ifdef __cplusplus
29990extern "C"
29991#endif
29992char dnet_ntoa ();
29993int
29994main ()
29995{
29996return dnet_ntoa ();
29997  ;
29998  return 0;
29999}
30000_ACEOF
30001if ac_fn_cxx_try_link "$LINENO"; then :
30002  ac_cv_lib_dnet_dnet_ntoa=yes
30003else
30004  ac_cv_lib_dnet_dnet_ntoa=no
30005fi
30006rm -f core conftest.err conftest.$ac_objext \
30007    conftest$ac_exeext conftest.$ac_ext
30008LIBS=$ac_check_lib_save_LIBS
30009fi
30010{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
30011$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
30012if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
30013  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
30014fi
30015
30016    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
30017      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
30018$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
30019if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
30020  $as_echo_n "(cached) " >&6
30021else
30022  ac_check_lib_save_LIBS=$LIBS
30023LIBS="-ldnet_stub  $LIBS"
30024cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30025/* end confdefs.h.  */
30026
30027/* Override any GCC internal prototype to avoid an error.
30028   Use char because int might match the return type of a GCC
30029   builtin and then its argument prototype would still apply.  */
30030#ifdef __cplusplus
30031extern "C"
30032#endif
30033char dnet_ntoa ();
30034int
30035main ()
30036{
30037return dnet_ntoa ();
30038  ;
30039  return 0;
30040}
30041_ACEOF
30042if ac_fn_cxx_try_link "$LINENO"; then :
30043  ac_cv_lib_dnet_stub_dnet_ntoa=yes
30044else
30045  ac_cv_lib_dnet_stub_dnet_ntoa=no
30046fi
30047rm -f core conftest.err conftest.$ac_objext \
30048    conftest$ac_exeext conftest.$ac_ext
30049LIBS=$ac_check_lib_save_LIBS
30050fi
30051{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
30052$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
30053if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
30054  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
30055fi
30056
30057    fi
30058fi
30059rm -f core conftest.err conftest.$ac_objext \
30060    conftest$ac_exeext conftest.$ac_ext
30061    LIBS="$ac_xsave_LIBS"
30062
30063    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
30064    # to get the SysV transport functions.
30065    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
30066    # needs -lnsl.
30067    # The nsl library prevents programs from opening the X display
30068    # on Irix 5.2, according to T.E. Dickey.
30069    # The functions gethostbyname, getservbyname, and inet_addr are
30070    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
30071    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
30072if test "x$ac_cv_func_gethostbyname" = xyes; then :
30073
30074fi
30075
30076    if test $ac_cv_func_gethostbyname = no; then
30077      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
30078$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
30079if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
30080  $as_echo_n "(cached) " >&6
30081else
30082  ac_check_lib_save_LIBS=$LIBS
30083LIBS="-lnsl  $LIBS"
30084cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30085/* end confdefs.h.  */
30086
30087/* Override any GCC internal prototype to avoid an error.
30088   Use char because int might match the return type of a GCC
30089   builtin and then its argument prototype would still apply.  */
30090#ifdef __cplusplus
30091extern "C"
30092#endif
30093char gethostbyname ();
30094int
30095main ()
30096{
30097return gethostbyname ();
30098  ;
30099  return 0;
30100}
30101_ACEOF
30102if ac_fn_cxx_try_link "$LINENO"; then :
30103  ac_cv_lib_nsl_gethostbyname=yes
30104else
30105  ac_cv_lib_nsl_gethostbyname=no
30106fi
30107rm -f core conftest.err conftest.$ac_objext \
30108    conftest$ac_exeext conftest.$ac_ext
30109LIBS=$ac_check_lib_save_LIBS
30110fi
30111{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
30112$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
30113if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
30114  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
30115fi
30116
30117      if test $ac_cv_lib_nsl_gethostbyname = no; then
30118	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
30119$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
30120if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
30121  $as_echo_n "(cached) " >&6
30122else
30123  ac_check_lib_save_LIBS=$LIBS
30124LIBS="-lbsd  $LIBS"
30125cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30126/* end confdefs.h.  */
30127
30128/* Override any GCC internal prototype to avoid an error.
30129   Use char because int might match the return type of a GCC
30130   builtin and then its argument prototype would still apply.  */
30131#ifdef __cplusplus
30132extern "C"
30133#endif
30134char gethostbyname ();
30135int
30136main ()
30137{
30138return gethostbyname ();
30139  ;
30140  return 0;
30141}
30142_ACEOF
30143if ac_fn_cxx_try_link "$LINENO"; then :
30144  ac_cv_lib_bsd_gethostbyname=yes
30145else
30146  ac_cv_lib_bsd_gethostbyname=no
30147fi
30148rm -f core conftest.err conftest.$ac_objext \
30149    conftest$ac_exeext conftest.$ac_ext
30150LIBS=$ac_check_lib_save_LIBS
30151fi
30152{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
30153$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
30154if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
30155  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
30156fi
30157
30158      fi
30159    fi
30160
30161    # lieder@skyler.mavd.honeywell.com says without -lsocket,
30162    # socket/setsockopt and other routines are undefined under SCO ODT
30163    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
30164    # on later versions), says Simon Leinen: it contains gethostby*
30165    # variants that don't use the name server (or something).  -lsocket
30166    # must be given before -lnsl if both are needed.  We assume that
30167    # if connect needs -lnsl, so does gethostbyname.
30168    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
30169if test "x$ac_cv_func_connect" = xyes; then :
30170
30171fi
30172
30173    if test $ac_cv_func_connect = no; then
30174      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
30175$as_echo_n "checking for connect in -lsocket... " >&6; }
30176if ${ac_cv_lib_socket_connect+:} false; then :
30177  $as_echo_n "(cached) " >&6
30178else
30179  ac_check_lib_save_LIBS=$LIBS
30180LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
30181cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30182/* end confdefs.h.  */
30183
30184/* Override any GCC internal prototype to avoid an error.
30185   Use char because int might match the return type of a GCC
30186   builtin and then its argument prototype would still apply.  */
30187#ifdef __cplusplus
30188extern "C"
30189#endif
30190char connect ();
30191int
30192main ()
30193{
30194return connect ();
30195  ;
30196  return 0;
30197}
30198_ACEOF
30199if ac_fn_cxx_try_link "$LINENO"; then :
30200  ac_cv_lib_socket_connect=yes
30201else
30202  ac_cv_lib_socket_connect=no
30203fi
30204rm -f core conftest.err conftest.$ac_objext \
30205    conftest$ac_exeext conftest.$ac_ext
30206LIBS=$ac_check_lib_save_LIBS
30207fi
30208{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
30209$as_echo "$ac_cv_lib_socket_connect" >&6; }
30210if test "x$ac_cv_lib_socket_connect" = xyes; then :
30211  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
30212fi
30213
30214    fi
30215
30216    # Guillermo Gomez says -lposix is necessary on A/UX.
30217    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
30218if test "x$ac_cv_func_remove" = xyes; then :
30219
30220fi
30221
30222    if test $ac_cv_func_remove = no; then
30223      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
30224$as_echo_n "checking for remove in -lposix... " >&6; }
30225if ${ac_cv_lib_posix_remove+:} false; then :
30226  $as_echo_n "(cached) " >&6
30227else
30228  ac_check_lib_save_LIBS=$LIBS
30229LIBS="-lposix  $LIBS"
30230cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30231/* end confdefs.h.  */
30232
30233/* Override any GCC internal prototype to avoid an error.
30234   Use char because int might match the return type of a GCC
30235   builtin and then its argument prototype would still apply.  */
30236#ifdef __cplusplus
30237extern "C"
30238#endif
30239char remove ();
30240int
30241main ()
30242{
30243return remove ();
30244  ;
30245  return 0;
30246}
30247_ACEOF
30248if ac_fn_cxx_try_link "$LINENO"; then :
30249  ac_cv_lib_posix_remove=yes
30250else
30251  ac_cv_lib_posix_remove=no
30252fi
30253rm -f core conftest.err conftest.$ac_objext \
30254    conftest$ac_exeext conftest.$ac_ext
30255LIBS=$ac_check_lib_save_LIBS
30256fi
30257{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
30258$as_echo "$ac_cv_lib_posix_remove" >&6; }
30259if test "x$ac_cv_lib_posix_remove" = xyes; then :
30260  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
30261fi
30262
30263    fi
30264
30265    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
30266    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
30267if test "x$ac_cv_func_shmat" = xyes; then :
30268
30269fi
30270
30271    if test $ac_cv_func_shmat = no; then
30272      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
30273$as_echo_n "checking for shmat in -lipc... " >&6; }
30274if ${ac_cv_lib_ipc_shmat+:} false; then :
30275  $as_echo_n "(cached) " >&6
30276else
30277  ac_check_lib_save_LIBS=$LIBS
30278LIBS="-lipc  $LIBS"
30279cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30280/* end confdefs.h.  */
30281
30282/* Override any GCC internal prototype to avoid an error.
30283   Use char because int might match the return type of a GCC
30284   builtin and then its argument prototype would still apply.  */
30285#ifdef __cplusplus
30286extern "C"
30287#endif
30288char shmat ();
30289int
30290main ()
30291{
30292return shmat ();
30293  ;
30294  return 0;
30295}
30296_ACEOF
30297if ac_fn_cxx_try_link "$LINENO"; then :
30298  ac_cv_lib_ipc_shmat=yes
30299else
30300  ac_cv_lib_ipc_shmat=no
30301fi
30302rm -f core conftest.err conftest.$ac_objext \
30303    conftest$ac_exeext conftest.$ac_ext
30304LIBS=$ac_check_lib_save_LIBS
30305fi
30306{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
30307$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
30308if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
30309  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
30310fi
30311
30312    fi
30313  fi
30314
30315  # Check for libraries that X11R6 Xt/Xaw programs need.
30316  ac_save_LDFLAGS=$LDFLAGS
30317  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
30318  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
30319  # check for ICE first), but we must link in the order -lSM -lICE or
30320  # we get undefined symbols.  So assume we have SM if we have ICE.
30321  # These have to be linked with before -lX11, unlike the other
30322  # libraries we check for below, so use a different variable.
30323  # John Interrante, Karl Berry
30324  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
30325$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
30326if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
30327  $as_echo_n "(cached) " >&6
30328else
30329  ac_check_lib_save_LIBS=$LIBS
30330LIBS="-lICE $X_EXTRA_LIBS $LIBS"
30331cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30332/* end confdefs.h.  */
30333
30334/* Override any GCC internal prototype to avoid an error.
30335   Use char because int might match the return type of a GCC
30336   builtin and then its argument prototype would still apply.  */
30337#ifdef __cplusplus
30338extern "C"
30339#endif
30340char IceConnectionNumber ();
30341int
30342main ()
30343{
30344return IceConnectionNumber ();
30345  ;
30346  return 0;
30347}
30348_ACEOF
30349if ac_fn_cxx_try_link "$LINENO"; then :
30350  ac_cv_lib_ICE_IceConnectionNumber=yes
30351else
30352  ac_cv_lib_ICE_IceConnectionNumber=no
30353fi
30354rm -f core conftest.err conftest.$ac_objext \
30355    conftest$ac_exeext conftest.$ac_ext
30356LIBS=$ac_check_lib_save_LIBS
30357fi
30358{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
30359$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
30360if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
30361  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
30362fi
30363
30364  LDFLAGS=$ac_save_LDFLAGS
30365
30366fi
30367
30368
30369# AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
30370# this doesn't make sense so we remove it.
30371if test "x$COMPILE_TYPE" = xcross; then
30372  X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
30373fi
30374
30375if test "x$no_x" = xyes && test "x$X11_NOT_NEEDED" != xyes; then
30376
30377    # Print a helpful message on how to acquire the necessary build dependency.
30378    # x11 is the help tag: freetyp2, cups, pulse, alsa etc
30379    MISSING_DEPENDENCY=x11
30380    PKGHANDLER_COMMAND=
30381
30382    case $PKGHANDLER in
30383	apt-get)
30384                apt_help     $MISSING_DEPENDENCY ;;
30385    yum)
30386                yum_help     $MISSING_DEPENDENCY ;;
30387	port)
30388                port_help    $MISSING_DEPENDENCY ;;
30389	pkgutil)
30390                pkgutil_help $MISSING_DEPENDENCY ;;
30391	pkgadd)
30392                pkgadd_help  $MISSING_DEPENDENCY ;;
30393    * )
30394      break ;;
30395    esac
30396
30397    if test "x$PKGHANDLER_COMMAND" != x; then
30398        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30399    fi
30400
30401    as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
30402fi
30403
30404# Some of the old makefiles require a setting of OPENWIN_HOME
30405# Since the X11R6 directory has disappeared on later Linuxes,
30406# we need to probe for it.
30407if test "x$OPENJDK_TARGET_OS" = xlinux; then
30408    if test -d "$SYS_ROOT/usr/X11R6"; then
30409        OPENWIN_HOME="$SYS_ROOT/usr/X11R6"
30410    elif test -d "$SYS_ROOT/usr/include/X11"; then
30411        OPENWIN_HOME="$SYS_ROOT/usr"
30412    fi
30413fi
30414if test "x$OPENJDK_TARGET_OS" = xsolaris; then
30415    OPENWIN_HOME="/usr/openwin"
30416fi
30417
30418
30419
30420#
30421# Weird Sol10 something check...TODO change to try compile
30422#
30423if test "x${OPENJDK_TARGET_OS}" = xsolaris; then
30424  if test "`uname -r`" = "5.10"; then
30425     if test "`${EGREP} -c XLinearGradient ${OPENWIN_HOME}/share/include/X11/extensions/Xrender.h`" = "0"; then
30426     	X_CFLAGS="${X_CFLAGS} -DSOLARIS10_NO_XRENDER_STRUCTS"
30427     fi
30428  fi
30429fi
30430
30431ac_ext=c
30432ac_cpp='$CPP $CPPFLAGS'
30433ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30434ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30435ac_compiler_gnu=$ac_cv_c_compiler_gnu
30436
30437OLD_CFLAGS="$CFLAGS"
30438CFLAGS="$CFLAGS $X_CFLAGS"
30439
30440# Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
30441for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
30442do :
30443  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
30444ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" " # include <X11/Xlib.h>
30445                   # include <X11/Xutil.h>
30446
30447"
30448if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
30449  cat >>confdefs.h <<_ACEOF
30450#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
30451_ACEOF
30452 X11_A_OK=yes
30453else
30454  X11_A_OK=no; break
30455fi
30456
30457done
30458
30459
30460CFLAGS="$OLD_CFLAGS"
30461ac_ext=cpp
30462ac_cpp='$CXXCPP $CPPFLAGS'
30463ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30464ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30465ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30466
30467
30468if test "x$X11_A_OK" = xno && test "x$X11_NOT_NEEDED" != xyes; then
30469
30470    # Print a helpful message on how to acquire the necessary build dependency.
30471    # x11 is the help tag: freetyp2, cups, pulse, alsa etc
30472    MISSING_DEPENDENCY=x11
30473    PKGHANDLER_COMMAND=
30474
30475    case $PKGHANDLER in
30476	apt-get)
30477                apt_help     $MISSING_DEPENDENCY ;;
30478    yum)
30479                yum_help     $MISSING_DEPENDENCY ;;
30480	port)
30481                port_help    $MISSING_DEPENDENCY ;;
30482	pkgutil)
30483                pkgutil_help $MISSING_DEPENDENCY ;;
30484	pkgadd)
30485                pkgadd_help  $MISSING_DEPENDENCY ;;
30486    * )
30487      break ;;
30488    esac
30489
30490    if test "x$PKGHANDLER_COMMAND" != x; then
30491        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30492    fi
30493
30494    as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
30495fi
30496
30497
30498
30499
30500
30501
30502###############################################################################
30503#
30504# The common unix printing system cups is used to print from java.
30505#
30506
30507# Check whether --with-cups was given.
30508if test "${with_cups+set}" = set; then :
30509  withval=$with_cups;
30510fi
30511
30512
30513# Check whether --with-cups-include was given.
30514if test "${with_cups_include+set}" = set; then :
30515  withval=$with_cups_include;
30516fi
30517
30518
30519if test "x$CUPS_NOT_NEEDED" = xyes; then
30520	if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then
30521		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups is ignored" >&5
30522$as_echo "$as_me: WARNING: cups not used, so --with-cups is ignored" >&2;}
30523	fi
30524	CUPS_CFLAGS=
30525else
30526	CUPS_FOUND=no
30527
30528	if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
30529	    as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
30530	fi
30531
30532	if test "x${with_cups}" != x; then
30533	    CUPS_CFLAGS="-I${with_cups}/include"
30534	    CUPS_FOUND=yes
30535	fi
30536	if test "x${with_cups_include}" != x; then
30537	    CUPS_CFLAGS="-I${with_cups_include}"
30538	    CUPS_FOUND=yes
30539	fi
30540	if test "x$CUPS_FOUND" = xno; then
30541
30542
30543    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
30544        # Source the builddeps file again, to make sure it uses the latest variables!
30545        . $builddepsfile
30546        # Look for a target and build machine specific resource!
30547        eval resource=\${builddep_cups_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
30548        if test "x$resource" = x; then
30549            # Ok, lets instead look for a target specific resource
30550            eval resource=\${builddep_cups_TARGET_${rewritten_target_var}}
30551        fi
30552        if test "x$resource" = x; then
30553            # Ok, lets instead look for a build specific resource
30554            eval resource=\${builddep_cups_BUILD_${rewritten_build_var}}
30555        fi
30556        if test "x$resource" = x; then
30557            # Ok, lets instead look for a generic resource
30558            # (The cups comes from M4 and not the shell, thus no need for eval here.)
30559            resource=${builddep_cups}
30560        fi
30561        if test "x$resource" != x; then
30562            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for cups" >&5
30563$as_echo "$as_me: Using builddeps $resource for cups" >&6;}
30564	    # If the resource in the builddeps.conf file is an existing directory,
30565	    # for example /java/linux/cups
30566	    if test -d ${resource}; then
30567	       depdir=${resource}
30568	    else
30569
30570# cups is for example mymodule
30571# $resource is for example libs/general/libmymod_1_2_3.zip
30572# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
30573# $with_builddeps_dir is for example /localhome/builddeps
30574# depdir is the name of the variable into which we store the depdir, eg MYMOD
30575# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
30576# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
30577    filename=`basename $resource`
30578    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
30579    filebase=${filename%%.*}
30580    extension=${filename#*.}
30581    installdir=$with_builddeps_dir/$filebase
30582    if test ! -f $installdir/$filename.unpacked; then
30583        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&5
30584$as_echo "$as_me: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&6;}
30585        if test ! -d $installdir; then
30586            mkdir -p $installdir
30587        fi
30588        if test ! -d $installdir; then
30589            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
30590        fi
30591        tmpfile=`mktemp $installdir/cups.XXXXXXXXX`
30592        touch $tmpfile
30593        if test ! -f $tmpfile; then
30594            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
30595        fi
30596
30597    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
30598    # $tmpfile is the local file name for the downloaded file.
30599    VALID_TOOL=no
30600    if test "x$BDEPS_FTP" = xwget; then
30601       VALID_TOOL=yes
30602       wget -O $tmpfile $with_builddeps_server/$resource
30603    fi
30604    if test "x$BDEPS_FTP" = xlftp; then
30605       VALID_TOOL=yes
30606       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
30607    fi
30608    if test "x$BDEPS_FTP" = xftp; then
30609        VALID_TOOL=yes
30610        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
30611        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
30612        FTPUSERPWD=${FTPSERVER%%@*}
30613        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
30614            FTPUSER=${userpwd%%:*}
30615            FTPPWD=${userpwd#*@}
30616            FTPSERVER=${FTPSERVER#*@}
30617        else
30618            FTPUSER=ftp
30619            FTPPWD=ftp
30620        fi
30621        # the "pass" command does not work on some
30622        # ftp clients (read ftp.exe) but if it works,
30623        # passive mode is better!
30624        (\
30625            echo "user $FTPUSER $FTPPWD"        ;\
30626            echo "pass"                         ;\
30627            echo "bin"                          ;\
30628            echo "get $FTPPATH $tmpfile"              ;\
30629        ) | ftp -in $FTPSERVER
30630    fi
30631    if test "x$VALID_TOOL" != xyes; then
30632       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
30633    fi
30634
30635        mv $tmpfile $installdir/$filename
30636        if test ! -s $installdir/$filename; then
30637            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
30638        fi
30639        case "$extension" in
30640            zip)  echo "Unzipping $installdir/$filename..."
30641               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
30642            ;;
30643            tar.gz) echo "Untaring $installdir/$filename..."
30644               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
30645            ;;
30646            tgz) echo "Untaring $installdir/$filename..."
30647               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
30648            ;;
30649            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
30650            ;;
30651        esac
30652    fi
30653    if test -f $installdir/$filename.unpacked; then
30654        depdir=$installdir
30655    fi
30656
30657	    fi
30658            # Source the builddeps file again, because in the previous command, the depdir
30659            # was updated to point at the current build dependency install directory.
30660            . $builddepsfile
30661            # Now extract variables from the builddeps.conf files.
30662            theroot=${builddep_cups_ROOT}
30663            thecflags=${builddep_cups_CFLAGS}
30664            thelibs=${builddep_cups_LIBS}
30665            if test "x$depdir" = x; then
30666                as_fn_error $? "Could not download build dependency cups" "$LINENO" 5
30667            fi
30668            CUPS=$depdir
30669            if test "x$theroot" != x; then
30670               CUPS="$theroot"
30671            fi
30672            if test "x$thecflags" != x; then
30673               CUPS_CFLAGS="$thecflags"
30674            fi
30675            if test "x$thelibs" != x; then
30676               CUPS_LIBS="$thelibs"
30677            fi
30678            CUPS_FOUND=yes
30679
30680        fi
30681
30682    fi
30683
30684	fi
30685	if test "x$CUPS_FOUND" = xno; then
30686	    # Are the cups headers installed in the default /usr/include location?
30687	    for ac_header in cups/cups.h cups/ppd.h
30688do :
30689  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
30690ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
30691if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
30692  cat >>confdefs.h <<_ACEOF
30693#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
30694_ACEOF
30695 CUPS_FOUND=yes
30696	                      CUPS_CFLAGS=
30697	                      DEFAULT_CUPS=yes
30698fi
30699
30700done
30701
30702	fi
30703	if test "x$CUPS_FOUND" = xno; then
30704	    # Getting nervous now? Lets poke around for standard Solaris third-party
30705	    # package installation locations.
30706	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
30707$as_echo_n "checking for cups headers... " >&6; }
30708	    if test -s /opt/sfw/cups/include/cups/cups.h; then
30709	       # An SFW package seems to be installed!
30710	       CUPS_FOUND=yes
30711	       CUPS_CFLAGS="-I/opt/sfw/cups/include"
30712	    elif test -s /opt/csw/include/cups/cups.h; then
30713	       # A CSW package seems to be installed!
30714	       CUPS_FOUND=yes
30715	       CUPS_CFLAGS="-I/opt/csw/include"
30716	    fi
30717	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
30718$as_echo "$CUPS_FOUND" >&6; }
30719	fi
30720	if test "x$CUPS_FOUND" = xno; then
30721
30722    # Print a helpful message on how to acquire the necessary build dependency.
30723    # cups is the help tag: freetyp2, cups, pulse, alsa etc
30724    MISSING_DEPENDENCY=cups
30725    PKGHANDLER_COMMAND=
30726
30727    case $PKGHANDLER in
30728	apt-get)
30729                apt_help     $MISSING_DEPENDENCY ;;
30730    yum)
30731                yum_help     $MISSING_DEPENDENCY ;;
30732	port)
30733                port_help    $MISSING_DEPENDENCY ;;
30734	pkgutil)
30735                pkgutil_help $MISSING_DEPENDENCY ;;
30736	pkgadd)
30737                pkgadd_help  $MISSING_DEPENDENCY ;;
30738    * )
30739      break ;;
30740    esac
30741
30742    if test "x$PKGHANDLER_COMMAND" != x; then
30743        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30744    fi
30745
30746	    as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
30747	fi
30748fi
30749
30750
30751
30752
30753
30754
30755###############################################################################
30756#
30757# The ubiquitous freetype2 library is used to render fonts.
30758#
30759
30760# Check whether --with-freetype was given.
30761if test "${with_freetype+set}" = set; then :
30762  withval=$with_freetype;
30763fi
30764
30765
30766# If we are using the OS installed system lib for freetype, then we do not need to copy it to the build tree
30767USING_SYSTEM_FT_LIB=false
30768
30769if test "x$FREETYPE2_NOT_NEEDED" = xyes; then
30770	if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
30771		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype is ignored" >&5
30772$as_echo "$as_me: WARNING: freetype not used, so --with-freetype is ignored" >&2;}
30773	fi
30774	FREETYPE2_CFLAGS=
30775	FREETYPE2_LIBS=
30776        FREETYPE2_LIB_PATH=
30777else
30778	FREETYPE2_FOUND=no
30779
30780	if test "x$with_freetype" != x; then
30781
30782  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30783
30784  # Input might be given as Windows format, start by converting to
30785  # unix format.
30786  path="$with_freetype"
30787  new_path=`$CYGPATH -u "$path"`
30788
30789  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30790  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30791  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30792  # "foo.exe" is OK but "foo" is an error.
30793  #
30794  # This test is therefore slightly more accurate than "test -f" to check for file precense.
30795  # It is also a way to make sure we got the proper file name for the real test later on.
30796  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30797  if test "x$test_shortpath" = x; then
30798    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_freetype, which resolves as \"$path\", is invalid." >&5
30799$as_echo "$as_me: The path of with_freetype, which resolves as \"$path\", is invalid." >&6;}
30800    as_fn_error $? "Cannot locate the the path of with_freetype" "$LINENO" 5
30801  fi
30802
30803  # Call helper function which possibly converts this using DOS-style short mode.
30804  # If so, the updated path is stored in $new_path.
30805
30806  input_path="$new_path"
30807  # Check if we need to convert this using DOS-style short mode. If the path
30808  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30809  # take no chances and rewrite it.
30810  # Note: m4 eats our [], so we need to use [ and ] instead.
30811  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30812  if test "x$has_forbidden_chars" != x; then
30813    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30814    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30815    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30816    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30817      # Going to short mode and back again did indeed matter. Since short mode is
30818      # case insensitive, let's make it lowercase to improve readability.
30819      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30820      # Now convert it back to Unix-stile (cygpath)
30821      input_path=`$CYGPATH -u "$shortmode_path"`
30822      new_path="$input_path"
30823    fi
30824  fi
30825
30826  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30827  if test "x$test_cygdrive_prefix" = x; then
30828    # As a simple fix, exclude /usr/bin since it's not a real path.
30829    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30830      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30831      # a path prefixed by /cygdrive for fixpath to work.
30832      new_path="$CYGWIN_ROOT_PATH$input_path"
30833    fi
30834  fi
30835
30836
30837  if test "x$path" != "x$new_path"; then
30838    with_freetype="$new_path"
30839    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_freetype to \"$new_path\"" >&5
30840$as_echo "$as_me: Rewriting with_freetype to \"$new_path\"" >&6;}
30841  fi
30842
30843  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30844
30845  path="$with_freetype"
30846  has_colon=`$ECHO $path | $GREP ^.:`
30847  new_path="$path"
30848  if test "x$has_colon" = x; then
30849    # Not in mixed or Windows style, start by that.
30850    new_path=`cmd //c echo $path`
30851  fi
30852
30853
30854  input_path="$new_path"
30855  # Check if we need to convert this using DOS-style short mode. If the path
30856  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30857  # take no chances and rewrite it.
30858  # Note: m4 eats our [], so we need to use [ and ] instead.
30859  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30860  if test "x$has_forbidden_chars" != x; then
30861    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30862    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30863  fi
30864
30865
30866  windows_path="$new_path"
30867  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30868    unix_path=`$CYGPATH -u "$windows_path"`
30869    new_path="$unix_path"
30870  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30871    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30872    new_path="$unix_path"
30873  fi
30874
30875  if test "x$path" != "x$new_path"; then
30876    with_freetype="$new_path"
30877    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_freetype to \"$new_path\"" >&5
30878$as_echo "$as_me: Rewriting with_freetype to \"$new_path\"" >&6;}
30879  fi
30880
30881  # Save the first 10 bytes of this path to the storage, so fixpath can work.
30882  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30883
30884  else
30885    # We're on a posix platform. Hooray! :)
30886    path="$with_freetype"
30887    has_space=`$ECHO "$path" | $GREP " "`
30888    if test "x$has_space" != x; then
30889      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_freetype, which resolves as \"$path\", is invalid." >&5
30890$as_echo "$as_me: The path of with_freetype, which resolves as \"$path\", is invalid." >&6;}
30891      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30892    fi
30893
30894    # Use eval to expand a potential ~
30895    eval path="$path"
30896    if test ! -f "$path" && test ! -d "$path"; then
30897      as_fn_error $? "The path of with_freetype, which resolves as \"$path\", is not found." "$LINENO" 5
30898    fi
30899
30900    with_freetype="`cd "$path"; $THEPWDCMD -L`"
30901  fi
30902
30903	    FREETYPE2_LIBS="-L$with_freetype/lib -lfreetype"
30904            FREETYPE2_LIB_PATH="$with_freetype/lib"
30905            if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -d "$with_freetype/lib/amd64"; then
30906                FREETYPE2_LIBS="-L$with_freetype/lib/amd64 -lfreetype"
30907                FREETYPE2_LIB_PATH="$with_freetype/lib/amd64"
30908            fi
30909            if test "x$OPENJDK_TARGET_OS" = xwindows; then
30910                FREETYPE2_LIBS="$with_freetype/lib/freetype.lib"
30911            fi
30912	    FREETYPE2_CFLAGS="-I$with_freetype/include"
30913            if test -s $with_freetype/include/ft2build.h && test -d $with_freetype/include/freetype2/freetype; then
30914                FREETYPE2_CFLAGS="-I$with_freetype/include/freetype2 -I$with_freetype/include"
30915            fi
30916 	    FREETYPE2_FOUND=yes
30917   	    if test "x$FREETYPE2_FOUND" = xyes; then
30918	        # Verify that the directories exist
30919                if ! test -d "$with_freetype/lib" || ! test -d "$with_freetype/include"; then
30920		   as_fn_error $? "Could not find the expected directories $with_freetype/lib and $with_freetype/include" "$LINENO" 5
30921		fi
30922	        # List the contents of the lib.
30923		FREETYPELIB=`ls $with_freetype/lib/libfreetype.so $with_freetype/lib/freetype.dll 2> /dev/null`
30924                if test "x$FREETYPELIB" = x; then
30925		   as_fn_error $? "Could not find libfreetype.so nor freetype.dll in $with_freetype/lib" "$LINENO" 5
30926		fi
30927	        # Check one h-file
30928                if ! test -s "$with_freetype/include/ft2build.h"; then
30929		   as_fn_error $? "Could not find $with_freetype/include/ft2build.h" "$LINENO" 5
30930		fi
30931            fi
30932        fi
30933	if test "x$FREETYPE2_FOUND" = xno; then
30934
30935
30936    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
30937        # Source the builddeps file again, to make sure it uses the latest variables!
30938        . $builddepsfile
30939        # Look for a target and build machine specific resource!
30940        eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
30941        if test "x$resource" = x; then
30942            # Ok, lets instead look for a target specific resource
30943            eval resource=\${builddep_freetype2_TARGET_${rewritten_target_var}}
30944        fi
30945        if test "x$resource" = x; then
30946            # Ok, lets instead look for a build specific resource
30947            eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}}
30948        fi
30949        if test "x$resource" = x; then
30950            # Ok, lets instead look for a generic resource
30951            # (The freetype2 comes from M4 and not the shell, thus no need for eval here.)
30952            resource=${builddep_freetype2}
30953        fi
30954        if test "x$resource" != x; then
30955            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for freetype2" >&5
30956$as_echo "$as_me: Using builddeps $resource for freetype2" >&6;}
30957	    # If the resource in the builddeps.conf file is an existing directory,
30958	    # for example /java/linux/cups
30959	    if test -d ${resource}; then
30960	       depdir=${resource}
30961	    else
30962
30963# freetype2 is for example mymodule
30964# $resource is for example libs/general/libmymod_1_2_3.zip
30965# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
30966# $with_builddeps_dir is for example /localhome/builddeps
30967# depdir is the name of the variable into which we store the depdir, eg MYMOD
30968# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
30969# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
30970    filename=`basename $resource`
30971    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
30972    filebase=${filename%%.*}
30973    extension=${filename#*.}
30974    installdir=$with_builddeps_dir/$filebase
30975    if test ! -f $installdir/$filename.unpacked; then
30976        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&5
30977$as_echo "$as_me: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&6;}
30978        if test ! -d $installdir; then
30979            mkdir -p $installdir
30980        fi
30981        if test ! -d $installdir; then
30982            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
30983        fi
30984        tmpfile=`mktemp $installdir/freetype2.XXXXXXXXX`
30985        touch $tmpfile
30986        if test ! -f $tmpfile; then
30987            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
30988        fi
30989
30990    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
30991    # $tmpfile is the local file name for the downloaded file.
30992    VALID_TOOL=no
30993    if test "x$BDEPS_FTP" = xwget; then
30994       VALID_TOOL=yes
30995       wget -O $tmpfile $with_builddeps_server/$resource
30996    fi
30997    if test "x$BDEPS_FTP" = xlftp; then
30998       VALID_TOOL=yes
30999       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
31000    fi
31001    if test "x$BDEPS_FTP" = xftp; then
31002        VALID_TOOL=yes
31003        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
31004        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
31005        FTPUSERPWD=${FTPSERVER%%@*}
31006        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
31007            FTPUSER=${userpwd%%:*}
31008            FTPPWD=${userpwd#*@}
31009            FTPSERVER=${FTPSERVER#*@}
31010        else
31011            FTPUSER=ftp
31012            FTPPWD=ftp
31013        fi
31014        # the "pass" command does not work on some
31015        # ftp clients (read ftp.exe) but if it works,
31016        # passive mode is better!
31017        (\
31018            echo "user $FTPUSER $FTPPWD"        ;\
31019            echo "pass"                         ;\
31020            echo "bin"                          ;\
31021            echo "get $FTPPATH $tmpfile"              ;\
31022        ) | ftp -in $FTPSERVER
31023    fi
31024    if test "x$VALID_TOOL" != xyes; then
31025       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
31026    fi
31027
31028        mv $tmpfile $installdir/$filename
31029        if test ! -s $installdir/$filename; then
31030            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
31031        fi
31032        case "$extension" in
31033            zip)  echo "Unzipping $installdir/$filename..."
31034               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
31035            ;;
31036            tar.gz) echo "Untaring $installdir/$filename..."
31037               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31038            ;;
31039            tgz) echo "Untaring $installdir/$filename..."
31040               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31041            ;;
31042            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
31043            ;;
31044        esac
31045    fi
31046    if test -f $installdir/$filename.unpacked; then
31047        depdir=$installdir
31048    fi
31049
31050	    fi
31051            # Source the builddeps file again, because in the previous command, the depdir
31052            # was updated to point at the current build dependency install directory.
31053            . $builddepsfile
31054            # Now extract variables from the builddeps.conf files.
31055            theroot=${builddep_freetype2_ROOT}
31056            thecflags=${builddep_freetype2_CFLAGS}
31057            thelibs=${builddep_freetype2_LIBS}
31058            if test "x$depdir" = x; then
31059                as_fn_error $? "Could not download build dependency freetype2" "$LINENO" 5
31060            fi
31061            FREETYPE2=$depdir
31062            if test "x$theroot" != x; then
31063               FREETYPE2="$theroot"
31064            fi
31065            if test "x$thecflags" != x; then
31066               FREETYPE2_CFLAGS="$thecflags"
31067            fi
31068            if test "x$thelibs" != x; then
31069               FREETYPE2_LIBS="$thelibs"
31070            fi
31071            FREETYPE2_FOUND=yes
31072            else FREETYPE2_FOUND=no
31073
31074        fi
31075        else FREETYPE2_FOUND=no
31076
31077    fi
31078
31079            USING_SYSTEM_FT_LIB=true
31080	fi
31081	if test "x$FREETYPE2_FOUND" = xno && test "x$OPENJDK_TARGET_OS" = xwindows; then
31082            FREETYPELOCATION="$PROGRAMFILES/GnuWin32"
31083
31084  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31085
31086  # Input might be given as Windows format, start by converting to
31087  # unix format.
31088  path="$FREETYPELOCATION"
31089  new_path=`$CYGPATH -u "$path"`
31090
31091  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31092  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31093  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31094  # "foo.exe" is OK but "foo" is an error.
31095  #
31096  # This test is therefore slightly more accurate than "test -f" to check for file precense.
31097  # It is also a way to make sure we got the proper file name for the real test later on.
31098  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31099  if test "x$test_shortpath" = x; then
31100    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&5
31101$as_echo "$as_me: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&6;}
31102    as_fn_error $? "Cannot locate the the path of FREETYPELOCATION" "$LINENO" 5
31103  fi
31104
31105  # Call helper function which possibly converts this using DOS-style short mode.
31106  # If so, the updated path is stored in $new_path.
31107
31108  input_path="$new_path"
31109  # Check if we need to convert this using DOS-style short mode. If the path
31110  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31111  # take no chances and rewrite it.
31112  # Note: m4 eats our [], so we need to use [ and ] instead.
31113  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31114  if test "x$has_forbidden_chars" != x; then
31115    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31116    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31117    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31118    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31119      # Going to short mode and back again did indeed matter. Since short mode is
31120      # case insensitive, let's make it lowercase to improve readability.
31121      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31122      # Now convert it back to Unix-stile (cygpath)
31123      input_path=`$CYGPATH -u "$shortmode_path"`
31124      new_path="$input_path"
31125    fi
31126  fi
31127
31128  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31129  if test "x$test_cygdrive_prefix" = x; then
31130    # As a simple fix, exclude /usr/bin since it's not a real path.
31131    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31132      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31133      # a path prefixed by /cygdrive for fixpath to work.
31134      new_path="$CYGWIN_ROOT_PATH$input_path"
31135    fi
31136  fi
31137
31138
31139  if test "x$path" != "x$new_path"; then
31140    FREETYPELOCATION="$new_path"
31141    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPELOCATION to \"$new_path\"" >&5
31142$as_echo "$as_me: Rewriting FREETYPELOCATION to \"$new_path\"" >&6;}
31143  fi
31144
31145  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31146
31147  path="$FREETYPELOCATION"
31148  has_colon=`$ECHO $path | $GREP ^.:`
31149  new_path="$path"
31150  if test "x$has_colon" = x; then
31151    # Not in mixed or Windows style, start by that.
31152    new_path=`cmd //c echo $path`
31153  fi
31154
31155
31156  input_path="$new_path"
31157  # Check if we need to convert this using DOS-style short mode. If the path
31158  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31159  # take no chances and rewrite it.
31160  # Note: m4 eats our [], so we need to use [ and ] instead.
31161  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31162  if test "x$has_forbidden_chars" != x; then
31163    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31164    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31165  fi
31166
31167
31168  windows_path="$new_path"
31169  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31170    unix_path=`$CYGPATH -u "$windows_path"`
31171    new_path="$unix_path"
31172  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31173    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31174    new_path="$unix_path"
31175  fi
31176
31177  if test "x$path" != "x$new_path"; then
31178    FREETYPELOCATION="$new_path"
31179    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPELOCATION to \"$new_path\"" >&5
31180$as_echo "$as_me: Rewriting FREETYPELOCATION to \"$new_path\"" >&6;}
31181  fi
31182
31183  # Save the first 10 bytes of this path to the storage, so fixpath can work.
31184  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31185
31186  else
31187    # We're on a posix platform. Hooray! :)
31188    path="$FREETYPELOCATION"
31189    has_space=`$ECHO "$path" | $GREP " "`
31190    if test "x$has_space" != x; then
31191      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&5
31192$as_echo "$as_me: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&6;}
31193      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31194    fi
31195
31196    # Use eval to expand a potential ~
31197    eval path="$path"
31198    if test ! -f "$path" && test ! -d "$path"; then
31199      as_fn_error $? "The path of FREETYPELOCATION, which resolves as \"$path\", is not found." "$LINENO" 5
31200    fi
31201
31202    FREETYPELOCATION="`cd "$path"; $THEPWDCMD -L`"
31203  fi
31204
31205	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype in some standard windows locations" >&5
31206$as_echo_n "checking for freetype in some standard windows locations... " >&6; }
31207	    if test -s "$FREETYPELOCATION/include/ft2build.h" && test -d "$FREETYPELOCATION/include/freetype2/freetype"; then
31208	        FREETYPE2_CFLAGS="-I$FREETYPELOCATION/include/freetype2 -I$FREETYPELOCATION/include"
31209	        FREETYPE2_LIBS="$FREETYPELOCATION/lib/freetype.lib"
31210 	        FREETYPE2_LIB_PATH="$FREETYPELOCATION/lib"
31211                if ! test -s "$FREETYPE2_LIBS"; then
31212		   as_fn_error $? "Could not find $FREETYPE2_LIBS" "$LINENO" 5
31213		fi
31214                if ! test -s "$FREETYPE2_LIB_PATH/freetype.dll"; then
31215		   as_fn_error $? "Could not find $FREETYPE2_LIB_PATH/freetype.dll" "$LINENO" 5
31216		fi
31217                USING_SYSTEM_FT_LIB=true
31218                FREETYPE2_FOUND=yes
31219	    fi
31220	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE2_FOUND" >&5
31221$as_echo "$FREETYPE2_FOUND" >&6; }
31222        fi
31223	if test "x$FREETYPE2_FOUND" = xno; then
31224
31225pkg_failed=no
31226{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE2" >&5
31227$as_echo_n "checking for FREETYPE2... " >&6; }
31228
31229if test -n "$FREETYPE2_CFLAGS"; then
31230    pkg_cv_FREETYPE2_CFLAGS="$FREETYPE2_CFLAGS"
31231 elif test -n "$PKG_CONFIG"; then
31232    if test -n "$PKG_CONFIG" && \
31233    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
31234  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
31235  ac_status=$?
31236  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31237  test $ac_status = 0; }; then
31238  pkg_cv_FREETYPE2_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
31239else
31240  pkg_failed=yes
31241fi
31242 else
31243    pkg_failed=untried
31244fi
31245if test -n "$FREETYPE2_LIBS"; then
31246    pkg_cv_FREETYPE2_LIBS="$FREETYPE2_LIBS"
31247 elif test -n "$PKG_CONFIG"; then
31248    if test -n "$PKG_CONFIG" && \
31249    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
31250  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
31251  ac_status=$?
31252  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31253  test $ac_status = 0; }; then
31254  pkg_cv_FREETYPE2_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
31255else
31256  pkg_failed=yes
31257fi
31258 else
31259    pkg_failed=untried
31260fi
31261
31262
31263
31264if test $pkg_failed = yes; then
31265
31266if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
31267        _pkg_short_errors_supported=yes
31268else
31269        _pkg_short_errors_supported=no
31270fi
31271        if test $_pkg_short_errors_supported = yes; then
31272	        FREETYPE2_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
31273        else
31274	        FREETYPE2_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
31275        fi
31276	# Put the nasty error message in config.log where it belongs
31277	echo "$FREETYPE2_PKG_ERRORS" >&5
31278
31279	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31280$as_echo "no" >&6; }
31281                FREETYPE2_FOUND=no
31282elif test $pkg_failed = untried; then
31283	FREETYPE2_FOUND=no
31284else
31285	FREETYPE2_CFLAGS=$pkg_cv_FREETYPE2_CFLAGS
31286	FREETYPE2_LIBS=$pkg_cv_FREETYPE2_LIBS
31287        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31288$as_echo "yes" >&6; }
31289	FREETYPE2_FOUND=yes
31290fi
31291            # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
31292            FREETYPE2_LIBS=`$ECHO $FREETYPE2_LIBS | $SED 's/-lz//g'`
31293            USING_SYSTEM_FT_LIB=true
31294            # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
31295            if test "x$FREETYPE2_FOUND" = xyes && test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
31296              FREETYPE2_LIBS=`$ECHO $FREETYPE2_LIBS | $SED 's?/lib?/lib/amd64?g'`
31297            fi
31298	fi
31299	if test "x$FREETYPE2_FOUND" = xno; then
31300	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype in some standard locations" >&5
31301$as_echo_n "checking for freetype in some standard locations... " >&6; }
31302
31303	    if test -s $SYS_ROOT/usr/X11/include/ft2build.h && test -d $SYS_ROOT/usr/X11/include/freetype2/freetype; then
31304	        DEFAULT_FREETYPE_CFLAGS="-I$SYS_ROOT/usr/X11/include/freetype2 -I$SYS_ROOT/usr/X11/include"
31305	        DEFAULT_FREETYPE_LIBS="-L$SYS_ROOT/usr/X11/lib -lfreetype"
31306	    fi
31307	    if test -s $SYS_ROOT/usr/include/ft2build.h && test -d $SYS_ROOT/usr/include/freetype2/freetype; then
31308	        DEFAULT_FREETYPE_CFLAGS="-I$SYS_ROOT/usr/include/freetype2"
31309	        DEFAULT_FREETYPE_LIBS="-lfreetype"
31310	    fi
31311
31312	    PREV_CXXCFLAGS="$CXXFLAGS"
31313	    PREV_LDFLAGS="$LDFLAGS"
31314	    CXXFLAGS="$CXXFLAGS $DEFAULT_FREETYPE_CFLAGS"
31315	    LDFLAGS="$LDFLAGS $DEFAULT_FREETYPE_LIBS"
31316	    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31317/* end confdefs.h.  */
31318#include<ft2build.h>
31319	                    #include FT_FREETYPE_H
31320	                   int main() { return 0; }
31321
31322_ACEOF
31323if ac_fn_cxx_try_link "$LINENO"; then :
31324
31325	                      # Yes, the default cflags and libs did the trick.
31326	                      FREETYPE2_FOUND=yes
31327	                      FREETYPE2_CFLAGS="$DEFAULT_FREETYPE_CFLAGS"
31328	                      FREETYPE2_LIBS="$DEFAULT_FREETYPE_LIBS"
31329
31330else
31331
31332	                      FREETYPE2_FOUND=no
31333
31334fi
31335rm -f core conftest.err conftest.$ac_objext \
31336    conftest$ac_exeext conftest.$ac_ext
31337            CXXCFLAGS="$PREV_CXXFLAGS"
31338	    LDFLAGS="$PREV_LDFLAGS"
31339	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE2_FOUND" >&5
31340$as_echo "$FREETYPE2_FOUND" >&6; }
31341            USING_SYSTEM_FT_LIB=true
31342	fi
31343	if test "x$FREETYPE2_FOUND" = xno; then
31344
31345    # Print a helpful message on how to acquire the necessary build dependency.
31346    # freetype2 is the help tag: freetyp2, cups, pulse, alsa etc
31347    MISSING_DEPENDENCY=freetype2
31348    PKGHANDLER_COMMAND=
31349
31350    case $PKGHANDLER in
31351	apt-get)
31352                apt_help     $MISSING_DEPENDENCY ;;
31353    yum)
31354                yum_help     $MISSING_DEPENDENCY ;;
31355	port)
31356                port_help    $MISSING_DEPENDENCY ;;
31357	pkgutil)
31358                pkgutil_help $MISSING_DEPENDENCY ;;
31359	pkgadd)
31360                pkgadd_help  $MISSING_DEPENDENCY ;;
31361    * )
31362      break ;;
31363    esac
31364
31365    if test "x$PKGHANDLER_COMMAND" != x; then
31366        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
31367    fi
31368
31369		as_fn_error $? "Could not find freetype2! $HELP_MSG " "$LINENO" 5
31370	fi
31371
31372        if test "x$OPENJDK_TARGET_OS" != xwindows; then
31373            # AC_CHECK_LIB does not support use of cl.exe
31374            PREV_LDFLAGS="$LDFLAGS"
31375            LDFLAGS="$FREETYPE2_LIBS"
31376            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FT_Init_FreeType in -lfreetype" >&5
31377$as_echo_n "checking for FT_Init_FreeType in -lfreetype... " >&6; }
31378if ${ac_cv_lib_freetype_FT_Init_FreeType+:} false; then :
31379  $as_echo_n "(cached) " >&6
31380else
31381  ac_check_lib_save_LIBS=$LIBS
31382LIBS="-lfreetype  $LIBS"
31383cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31384/* end confdefs.h.  */
31385
31386/* Override any GCC internal prototype to avoid an error.
31387   Use char because int might match the return type of a GCC
31388   builtin and then its argument prototype would still apply.  */
31389#ifdef __cplusplus
31390extern "C"
31391#endif
31392char FT_Init_FreeType ();
31393int
31394main ()
31395{
31396return FT_Init_FreeType ();
31397  ;
31398  return 0;
31399}
31400_ACEOF
31401if ac_fn_cxx_try_link "$LINENO"; then :
31402  ac_cv_lib_freetype_FT_Init_FreeType=yes
31403else
31404  ac_cv_lib_freetype_FT_Init_FreeType=no
31405fi
31406rm -f core conftest.err conftest.$ac_objext \
31407    conftest$ac_exeext conftest.$ac_ext
31408LIBS=$ac_check_lib_save_LIBS
31409fi
31410{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_freetype_FT_Init_FreeType" >&5
31411$as_echo "$ac_cv_lib_freetype_FT_Init_FreeType" >&6; }
31412if test "x$ac_cv_lib_freetype_FT_Init_FreeType" = xyes; then :
31413  FREETYPE2_FOUND=true
31414else
31415  as_fn_error $? "Could not find freetype2! $HELP_MSG " "$LINENO" 5
31416fi
31417
31418            LDFLAGS="$PREV_LDFLAGS"
31419        fi
31420fi
31421
31422
31423
31424
31425
31426
31427
31428
31429
31430###############################################################################
31431#
31432# Check for alsa headers and libraries. Used on Linux/GNU systems.
31433#
31434
31435# Check whether --with-alsa was given.
31436if test "${with_alsa+set}" = set; then :
31437  withval=$with_alsa;
31438fi
31439
31440
31441# Check whether --with-alsa-include was given.
31442if test "${with_alsa_include+set}" = set; then :
31443  withval=$with_alsa_include;
31444fi
31445
31446
31447# Check whether --with-alsa-lib was given.
31448if test "${with_alsa_lib+set}" = set; then :
31449  withval=$with_alsa_lib;
31450fi
31451
31452
31453if test "x$ALSA_NOT_NEEDED" = xyes; then
31454	if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then
31455		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa is ignored" >&5
31456$as_echo "$as_me: WARNING: alsa not used, so --with-alsa is ignored" >&2;}
31457	fi
31458	ALSA_CFLAGS=
31459	ALSA_LIBS=
31460else
31461	ALSA_FOUND=no
31462
31463	if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
31464	    as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
31465	fi
31466
31467	if test "x${with_alsa}" != x; then
31468	    ALSA_LIBS="-L${with_alsa}/lib -lalsa"
31469	    ALSA_CFLAGS="-I${with_alsa}/include"
31470	    ALSA_FOUND=yes
31471	fi
31472	if test "x${with_alsa_include}" != x; then
31473	    ALSA_CFLAGS="-I${with_alsa_include}"
31474	    ALSA_FOUND=yes
31475	fi
31476	if test "x${with_alsa_lib}" != x; then
31477	    ALSA_LIBS="-L${with_alsa_lib} -lalsa"
31478	    ALSA_FOUND=yes
31479	fi
31480	if test "x$ALSA_FOUND" = xno; then
31481
31482
31483    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
31484        # Source the builddeps file again, to make sure it uses the latest variables!
31485        . $builddepsfile
31486        # Look for a target and build machine specific resource!
31487        eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
31488        if test "x$resource" = x; then
31489            # Ok, lets instead look for a target specific resource
31490            eval resource=\${builddep_alsa_TARGET_${rewritten_target_var}}
31491        fi
31492        if test "x$resource" = x; then
31493            # Ok, lets instead look for a build specific resource
31494            eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}}
31495        fi
31496        if test "x$resource" = x; then
31497            # Ok, lets instead look for a generic resource
31498            # (The alsa comes from M4 and not the shell, thus no need for eval here.)
31499            resource=${builddep_alsa}
31500        fi
31501        if test "x$resource" != x; then
31502            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for alsa" >&5
31503$as_echo "$as_me: Using builddeps $resource for alsa" >&6;}
31504	    # If the resource in the builddeps.conf file is an existing directory,
31505	    # for example /java/linux/cups
31506	    if test -d ${resource}; then
31507	       depdir=${resource}
31508	    else
31509
31510# alsa is for example mymodule
31511# $resource is for example libs/general/libmymod_1_2_3.zip
31512# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
31513# $with_builddeps_dir is for example /localhome/builddeps
31514# depdir is the name of the variable into which we store the depdir, eg MYMOD
31515# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
31516# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
31517    filename=`basename $resource`
31518    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
31519    filebase=${filename%%.*}
31520    extension=${filename#*.}
31521    installdir=$with_builddeps_dir/$filebase
31522    if test ! -f $installdir/$filename.unpacked; then
31523        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&5
31524$as_echo "$as_me: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&6;}
31525        if test ! -d $installdir; then
31526            mkdir -p $installdir
31527        fi
31528        if test ! -d $installdir; then
31529            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
31530        fi
31531        tmpfile=`mktemp $installdir/alsa.XXXXXXXXX`
31532        touch $tmpfile
31533        if test ! -f $tmpfile; then
31534            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
31535        fi
31536
31537    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
31538    # $tmpfile is the local file name for the downloaded file.
31539    VALID_TOOL=no
31540    if test "x$BDEPS_FTP" = xwget; then
31541       VALID_TOOL=yes
31542       wget -O $tmpfile $with_builddeps_server/$resource
31543    fi
31544    if test "x$BDEPS_FTP" = xlftp; then
31545       VALID_TOOL=yes
31546       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
31547    fi
31548    if test "x$BDEPS_FTP" = xftp; then
31549        VALID_TOOL=yes
31550        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
31551        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
31552        FTPUSERPWD=${FTPSERVER%%@*}
31553        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
31554            FTPUSER=${userpwd%%:*}
31555            FTPPWD=${userpwd#*@}
31556            FTPSERVER=${FTPSERVER#*@}
31557        else
31558            FTPUSER=ftp
31559            FTPPWD=ftp
31560        fi
31561        # the "pass" command does not work on some
31562        # ftp clients (read ftp.exe) but if it works,
31563        # passive mode is better!
31564        (\
31565            echo "user $FTPUSER $FTPPWD"        ;\
31566            echo "pass"                         ;\
31567            echo "bin"                          ;\
31568            echo "get $FTPPATH $tmpfile"              ;\
31569        ) | ftp -in $FTPSERVER
31570    fi
31571    if test "x$VALID_TOOL" != xyes; then
31572       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
31573    fi
31574
31575        mv $tmpfile $installdir/$filename
31576        if test ! -s $installdir/$filename; then
31577            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
31578        fi
31579        case "$extension" in
31580            zip)  echo "Unzipping $installdir/$filename..."
31581               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
31582            ;;
31583            tar.gz) echo "Untaring $installdir/$filename..."
31584               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31585            ;;
31586            tgz) echo "Untaring $installdir/$filename..."
31587               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31588            ;;
31589            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
31590            ;;
31591        esac
31592    fi
31593    if test -f $installdir/$filename.unpacked; then
31594        depdir=$installdir
31595    fi
31596
31597	    fi
31598            # Source the builddeps file again, because in the previous command, the depdir
31599            # was updated to point at the current build dependency install directory.
31600            . $builddepsfile
31601            # Now extract variables from the builddeps.conf files.
31602            theroot=${builddep_alsa_ROOT}
31603            thecflags=${builddep_alsa_CFLAGS}
31604            thelibs=${builddep_alsa_LIBS}
31605            if test "x$depdir" = x; then
31606                as_fn_error $? "Could not download build dependency alsa" "$LINENO" 5
31607            fi
31608            ALSA=$depdir
31609            if test "x$theroot" != x; then
31610               ALSA="$theroot"
31611            fi
31612            if test "x$thecflags" != x; then
31613               ALSA_CFLAGS="$thecflags"
31614            fi
31615            if test "x$thelibs" != x; then
31616               ALSA_LIBS="$thelibs"
31617            fi
31618            ALSA_FOUND=yes
31619            else ALSA_FOUND=no
31620
31621        fi
31622        else ALSA_FOUND=no
31623
31624    fi
31625
31626	fi
31627	if test "x$ALSA_FOUND" = xno; then
31628
31629pkg_failed=no
31630{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
31631$as_echo_n "checking for ALSA... " >&6; }
31632
31633if test -n "$ALSA_CFLAGS"; then
31634    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
31635 elif test -n "$PKG_CONFIG"; then
31636    if test -n "$PKG_CONFIG" && \
31637    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
31638  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
31639  ac_status=$?
31640  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31641  test $ac_status = 0; }; then
31642  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
31643else
31644  pkg_failed=yes
31645fi
31646 else
31647    pkg_failed=untried
31648fi
31649if test -n "$ALSA_LIBS"; then
31650    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
31651 elif test -n "$PKG_CONFIG"; then
31652    if test -n "$PKG_CONFIG" && \
31653    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
31654  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
31655  ac_status=$?
31656  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31657  test $ac_status = 0; }; then
31658  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
31659else
31660  pkg_failed=yes
31661fi
31662 else
31663    pkg_failed=untried
31664fi
31665
31666
31667
31668if test $pkg_failed = yes; then
31669
31670if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
31671        _pkg_short_errors_supported=yes
31672else
31673        _pkg_short_errors_supported=no
31674fi
31675        if test $_pkg_short_errors_supported = yes; then
31676	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
31677        else
31678	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
31679        fi
31680	# Put the nasty error message in config.log where it belongs
31681	echo "$ALSA_PKG_ERRORS" >&5
31682
31683	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31684$as_echo "no" >&6; }
31685                ALSA_FOUND=no
31686elif test $pkg_failed = untried; then
31687	ALSA_FOUND=no
31688else
31689	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
31690	ALSA_LIBS=$pkg_cv_ALSA_LIBS
31691        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31692$as_echo "yes" >&6; }
31693	ALSA_FOUND=yes
31694fi
31695	fi
31696	if test "x$ALSA_FOUND" = xno; then
31697	    for ac_header in alsa/asoundlib.h
31698do :
31699  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
31700if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
31701  cat >>confdefs.h <<_ACEOF
31702#define HAVE_ALSA_ASOUNDLIB_H 1
31703_ACEOF
31704 ALSA_FOUND=yes
31705	                      ALSA_CFLAGS=-Iignoreme
31706	                      ALSA_LIBS=-lasound
31707	                      DEFAULT_ALSA=yes
31708else
31709  ALSA_FOUND=no
31710fi
31711
31712done
31713
31714	fi
31715	if test "x$ALSA_FOUND" = xno; then
31716
31717    # Print a helpful message on how to acquire the necessary build dependency.
31718    # alsa is the help tag: freetyp2, cups, pulse, alsa etc
31719    MISSING_DEPENDENCY=alsa
31720    PKGHANDLER_COMMAND=
31721
31722    case $PKGHANDLER in
31723	apt-get)
31724                apt_help     $MISSING_DEPENDENCY ;;
31725    yum)
31726                yum_help     $MISSING_DEPENDENCY ;;
31727	port)
31728                port_help    $MISSING_DEPENDENCY ;;
31729	pkgutil)
31730                pkgutil_help $MISSING_DEPENDENCY ;;
31731	pkgadd)
31732                pkgadd_help  $MISSING_DEPENDENCY ;;
31733    * )
31734      break ;;
31735    esac
31736
31737    if test "x$PKGHANDLER_COMMAND" != x; then
31738        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
31739    fi
31740
31741	    as_fn_error $? "Could not find alsa! $HELP_MSG " "$LINENO" 5
31742	fi
31743fi
31744
31745
31746
31747
31748
31749
31750
31751###############################################################################
31752#
31753# Check for the jpeg library
31754#
31755
31756USE_EXTERNAL_LIBJPEG=true
31757{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -ljpeg" >&5
31758$as_echo_n "checking for main in -ljpeg... " >&6; }
31759if ${ac_cv_lib_jpeg_main+:} false; then :
31760  $as_echo_n "(cached) " >&6
31761else
31762  ac_check_lib_save_LIBS=$LIBS
31763LIBS="-ljpeg  $LIBS"
31764cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31765/* end confdefs.h.  */
31766
31767
31768int
31769main ()
31770{
31771return main ();
31772  ;
31773  return 0;
31774}
31775_ACEOF
31776if ac_fn_cxx_try_link "$LINENO"; then :
31777  ac_cv_lib_jpeg_main=yes
31778else
31779  ac_cv_lib_jpeg_main=no
31780fi
31781rm -f core conftest.err conftest.$ac_objext \
31782    conftest$ac_exeext conftest.$ac_ext
31783LIBS=$ac_check_lib_save_LIBS
31784fi
31785{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_main" >&5
31786$as_echo "$ac_cv_lib_jpeg_main" >&6; }
31787if test "x$ac_cv_lib_jpeg_main" = xyes; then :
31788  cat >>confdefs.h <<_ACEOF
31789#define HAVE_LIBJPEG 1
31790_ACEOF
31791
31792  LIBS="-ljpeg $LIBS"
31793
31794else
31795   USE_EXTERNAL_LIBJPEG=false
31796               { $as_echo "$as_me:${as_lineno-$LINENO}: Will use jpeg decoder bundled with the OpenJDK source" >&5
31797$as_echo "$as_me: Will use jpeg decoder bundled with the OpenJDK source" >&6;}
31798
31799fi
31800
31801
31802
31803###############################################################################
31804#
31805# Check for the gif library
31806#
31807
31808
31809# Check whether --with-giflib was given.
31810if test "${with_giflib+set}" = set; then :
31811  withval=$with_giflib;
31812fi
31813
31814
31815
31816{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
31817$as_echo_n "checking for which giflib to use... " >&6; }
31818
31819# default is bundled
31820DEFAULT_GIFLIB=bundled
31821
31822#
31823# if user didn't specify, use DEFAULT_GIFLIB
31824#
31825if test "x${with_giflib}" = "x"; then
31826    with_giflib=${DEFAULT_GIFLIB}
31827fi
31828
31829{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
31830$as_echo "${with_giflib}" >&6; }
31831
31832if test "x${with_giflib}" = "xbundled"; then
31833    USE_EXTERNAL_LIBGIF=false
31834elif test "x${with_giflib}" = "xsystem"; then
31835    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
31836if test "x$ac_cv_header_gif_lib_h" = xyes; then :
31837
31838else
31839   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
31840fi
31841
31842
31843    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
31844$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
31845if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
31846  $as_echo_n "(cached) " >&6
31847else
31848  ac_check_lib_save_LIBS=$LIBS
31849LIBS="-lgif  $LIBS"
31850cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31851/* end confdefs.h.  */
31852
31853/* Override any GCC internal prototype to avoid an error.
31854   Use char because int might match the return type of a GCC
31855   builtin and then its argument prototype would still apply.  */
31856#ifdef __cplusplus
31857extern "C"
31858#endif
31859char DGifGetCode ();
31860int
31861main ()
31862{
31863return DGifGetCode ();
31864  ;
31865  return 0;
31866}
31867_ACEOF
31868if ac_fn_cxx_try_link "$LINENO"; then :
31869  ac_cv_lib_gif_DGifGetCode=yes
31870else
31871  ac_cv_lib_gif_DGifGetCode=no
31872fi
31873rm -f core conftest.err conftest.$ac_objext \
31874    conftest$ac_exeext conftest.$ac_ext
31875LIBS=$ac_check_lib_save_LIBS
31876fi
31877{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
31878$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
31879if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
31880  cat >>confdefs.h <<_ACEOF
31881#define HAVE_LIBGIF 1
31882_ACEOF
31883
31884  LIBS="-lgif $LIBS"
31885
31886else
31887   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
31888fi
31889
31890
31891    USE_EXTERNAL_LIBGIF=true
31892else
31893    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
31894fi
31895
31896
31897###############################################################################
31898#
31899# Check for the zlib library
31900#
31901
31902
31903# Check whether --with-zlib was given.
31904if test "${with_zlib+set}" = set; then :
31905  withval=$with_zlib;
31906fi
31907
31908
31909{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
31910$as_echo_n "checking for compress in -lz... " >&6; }
31911if ${ac_cv_lib_z_compress+:} false; then :
31912  $as_echo_n "(cached) " >&6
31913else
31914  ac_check_lib_save_LIBS=$LIBS
31915LIBS="-lz  $LIBS"
31916cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31917/* end confdefs.h.  */
31918
31919/* Override any GCC internal prototype to avoid an error.
31920   Use char because int might match the return type of a GCC
31921   builtin and then its argument prototype would still apply.  */
31922#ifdef __cplusplus
31923extern "C"
31924#endif
31925char compress ();
31926int
31927main ()
31928{
31929return compress ();
31930  ;
31931  return 0;
31932}
31933_ACEOF
31934if ac_fn_cxx_try_link "$LINENO"; then :
31935  ac_cv_lib_z_compress=yes
31936else
31937  ac_cv_lib_z_compress=no
31938fi
31939rm -f core conftest.err conftest.$ac_objext \
31940    conftest$ac_exeext conftest.$ac_ext
31941LIBS=$ac_check_lib_save_LIBS
31942fi
31943{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
31944$as_echo "$ac_cv_lib_z_compress" >&6; }
31945if test "x$ac_cv_lib_z_compress" = xyes; then :
31946   ZLIB_FOUND=yes
31947else
31948   ZLIB_FOUND=no
31949fi
31950
31951
31952{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
31953$as_echo_n "checking for which zlib to use... " >&6; }
31954
31955DEFAULT_ZLIB=bundled
31956if test "x$OPENJDK_TARGET_OS" = xmacosx; then
31957#
31958# On macosx default is system...on others default is
31959#
31960    DEFAULT_ZLIB=system
31961fi
31962
31963if test "x${ZLIB_FOUND}" != "xyes"; then
31964#
31965# If we don't find any system...set default to bundled
31966#
31967    DEFAULT_ZLIB=bundled
31968fi
31969
31970#
31971# If user didn't specify, use DEFAULT_ZLIB
31972#
31973if test "x${with_zlib}" = "x"; then
31974    with_zlib=${DEFAULT_ZLIB}
31975fi
31976
31977if test "x${with_zlib}" = "xbundled"; then
31978    USE_EXTERNAL_LIBZ=false
31979    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
31980$as_echo "bundled" >&6; }
31981elif test "x${with_zlib}" = "xsystem"; then
31982    if test "x${ZLIB_FOUND}" = "xyes"; then
31983        USE_EXTERNAL_LIBZ=true
31984        { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
31985$as_echo "system" >&6; }
31986    else
31987        { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
31988$as_echo "system not found" >&6; }
31989        as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
31990    fi
31991else
31992    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
31993fi
31994
31995
31996
31997###############################################################################
31998LIBZIP_CAN_USE_MMAP=true
31999
32000
32001
32002###############################################################################
32003#
32004# Check if altzone exists in time.h
32005#
32006
32007cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32008/* end confdefs.h.  */
32009#include <time.h>
32010int
32011main ()
32012{
32013return (int)altzone;
32014  ;
32015  return 0;
32016}
32017_ACEOF
32018if ac_fn_cxx_try_link "$LINENO"; then :
32019  has_altzone=yes
32020else
32021  has_altzone=no
32022fi
32023rm -f core conftest.err conftest.$ac_objext \
32024    conftest$ac_exeext conftest.$ac_ext
32025if test "x$has_altzone" = xyes; then
32026
32027$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
32028
32029fi
32030
32031###############################################################################
32032#
32033# Check the maths library
32034#
32035
32036{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
32037$as_echo_n "checking for cos in -lm... " >&6; }
32038if ${ac_cv_lib_m_cos+:} false; then :
32039  $as_echo_n "(cached) " >&6
32040else
32041  ac_check_lib_save_LIBS=$LIBS
32042LIBS="-lm  $LIBS"
32043cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32044/* end confdefs.h.  */
32045
32046/* Override any GCC internal prototype to avoid an error.
32047   Use char because int might match the return type of a GCC
32048   builtin and then its argument prototype would still apply.  */
32049#ifdef __cplusplus
32050extern "C"
32051#endif
32052char cos ();
32053int
32054main ()
32055{
32056return cos ();
32057  ;
32058  return 0;
32059}
32060_ACEOF
32061if ac_fn_cxx_try_link "$LINENO"; then :
32062  ac_cv_lib_m_cos=yes
32063else
32064  ac_cv_lib_m_cos=no
32065fi
32066rm -f core conftest.err conftest.$ac_objext \
32067    conftest$ac_exeext conftest.$ac_ext
32068LIBS=$ac_check_lib_save_LIBS
32069fi
32070{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
32071$as_echo "$ac_cv_lib_m_cos" >&6; }
32072if test "x$ac_cv_lib_m_cos" = xyes; then :
32073  cat >>confdefs.h <<_ACEOF
32074#define HAVE_LIBM 1
32075_ACEOF
32076
32077  LIBS="-lm $LIBS"
32078
32079else
32080
32081                  { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
32082$as_echo "$as_me: Maths library was not found" >&6;}
32083
32084fi
32085
32086
32087
32088###############################################################################
32089#
32090# Check for libdl.so
32091
32092save_LIBS="$LIBS"
32093LIBS=""
32094{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
32095$as_echo_n "checking for dlopen in -ldl... " >&6; }
32096if ${ac_cv_lib_dl_dlopen+:} false; then :
32097  $as_echo_n "(cached) " >&6
32098else
32099  ac_check_lib_save_LIBS=$LIBS
32100LIBS="-ldl  $LIBS"
32101cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32102/* end confdefs.h.  */
32103
32104/* Override any GCC internal prototype to avoid an error.
32105   Use char because int might match the return type of a GCC
32106   builtin and then its argument prototype would still apply.  */
32107#ifdef __cplusplus
32108extern "C"
32109#endif
32110char dlopen ();
32111int
32112main ()
32113{
32114return dlopen ();
32115  ;
32116  return 0;
32117}
32118_ACEOF
32119if ac_fn_cxx_try_link "$LINENO"; then :
32120  ac_cv_lib_dl_dlopen=yes
32121else
32122  ac_cv_lib_dl_dlopen=no
32123fi
32124rm -f core conftest.err conftest.$ac_objext \
32125    conftest$ac_exeext conftest.$ac_ext
32126LIBS=$ac_check_lib_save_LIBS
32127fi
32128{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
32129$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
32130if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
32131  cat >>confdefs.h <<_ACEOF
32132#define HAVE_LIBDL 1
32133_ACEOF
32134
32135  LIBS="-ldl $LIBS"
32136
32137fi
32138
32139LIBDL="$LIBS"
32140
32141LIBS="$save_LIBS"
32142
32143
32144
32145###############################################################################
32146#
32147# statically link libstdc++ before C++ ABI is stablized on Linux unless
32148# dynamic build is configured on command line.
32149#
32150
32151# Check whether --with-stdc++lib was given.
32152if test "${with_stdc__lib+set}" = set; then :
32153  withval=$with_stdc__lib;
32154    if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
32155        && test "x$with_stdc__lib" != xdefault; then
32156      as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
32157    fi
32158
32159else
32160  with_stdc__lib=default
32161
32162fi
32163
32164
32165if test "x$OPENJDK_TARGET_OS" = xlinux; then
32166    # Test if -lstdc++ works.
32167    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
32168$as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
32169    ac_ext=cpp
32170ac_cpp='$CXXCPP $CPPFLAGS'
32171ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32172ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32173ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32174
32175    OLD_CXXFLAGS="$CXXFLAGS"
32176    CXXFLAGS="$CXXFLAGS -lstdc++"
32177    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32178/* end confdefs.h.  */
32179
32180int
32181main ()
32182{
32183return 0;
32184  ;
32185  return 0;
32186}
32187_ACEOF
32188if ac_fn_cxx_try_link "$LINENO"; then :
32189  has_dynamic_libstdcxx=yes
32190else
32191  has_dynamic_libstdcxx=no
32192fi
32193rm -f core conftest.err conftest.$ac_objext \
32194    conftest$ac_exeext conftest.$ac_ext
32195    CXXFLAGS="$OLD_CXXFLAGS"
32196    ac_ext=cpp
32197ac_cpp='$CXXCPP $CPPFLAGS'
32198ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32199ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32200ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32201
32202    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
32203$as_echo "$has_dynamic_libstdcxx" >&6; }
32204
32205    # Test if stdc++ can be linked statically.
32206    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
32207$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
32208    STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
32209    ac_ext=cpp
32210ac_cpp='$CXXCPP $CPPFLAGS'
32211ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32212ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32213ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32214
32215    OLD_LIBS="$LIBS"
32216    OLD_CXX="$CXX"
32217    LIBS="$STATIC_STDCXX_FLAGS"
32218    CXX="$CC"
32219    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32220/* end confdefs.h.  */
32221
32222int
32223main ()
32224{
32225return 0;
32226  ;
32227  return 0;
32228}
32229_ACEOF
32230if ac_fn_cxx_try_link "$LINENO"; then :
32231  has_static_libstdcxx=yes
32232else
32233  has_static_libstdcxx=no
32234fi
32235rm -f core conftest.err conftest.$ac_objext \
32236    conftest$ac_exeext conftest.$ac_ext
32237    LIBS="$OLD_LIBS"
32238    CXX="$OLD_CXX"
32239    ac_ext=cpp
32240ac_cpp='$CXXCPP $CPPFLAGS'
32241ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32242ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32243ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32244
32245    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
32246$as_echo "$has_static_libstdcxx" >&6; }
32247
32248    if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
32249        as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
32250    fi
32251
32252    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
32253        as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
32254    fi
32255
32256    if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
32257        as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
32258    fi
32259
32260    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
32261$as_echo_n "checking how to link with libstdc++... " >&6; }
32262    # If dynamic was requested, it's available since it would fail above otherwise.
32263    # If dynamic wasn't requested, go with static unless it isn't available.
32264    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
32265        LIBCXX="$LIBCXX -lstdc++"
32266        LDCXX="$CXX"
32267        STATIC_CXX_SETTING="STATIC_CXX=false"
32268        { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
32269$as_echo "dynamic" >&6; }
32270    else
32271        LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
32272        LDCXX="$CC"
32273        STATIC_CXX_SETTING="STATIC_CXX=true"
32274        { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
32275$as_echo "static" >&6; }
32276    fi
32277fi
32278
32279
32280if test "x$JVM_VARIANT_ZERO" = xtrue || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
32281    # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
32282
32283pkg_failed=no
32284{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
32285$as_echo_n "checking for LIBFFI... " >&6; }
32286
32287if test -n "$LIBFFI_CFLAGS"; then
32288    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
32289 elif test -n "$PKG_CONFIG"; then
32290    if test -n "$PKG_CONFIG" && \
32291    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
32292  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
32293  ac_status=$?
32294  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32295  test $ac_status = 0; }; then
32296  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
32297else
32298  pkg_failed=yes
32299fi
32300 else
32301    pkg_failed=untried
32302fi
32303if test -n "$LIBFFI_LIBS"; then
32304    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
32305 elif test -n "$PKG_CONFIG"; then
32306    if test -n "$PKG_CONFIG" && \
32307    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
32308  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
32309  ac_status=$?
32310  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32311  test $ac_status = 0; }; then
32312  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
32313else
32314  pkg_failed=yes
32315fi
32316 else
32317    pkg_failed=untried
32318fi
32319
32320
32321
32322if test $pkg_failed = yes; then
32323
32324if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
32325        _pkg_short_errors_supported=yes
32326else
32327        _pkg_short_errors_supported=no
32328fi
32329        if test $_pkg_short_errors_supported = yes; then
32330	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
32331        else
32332	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
32333        fi
32334	# Put the nasty error message in config.log where it belongs
32335	echo "$LIBFFI_PKG_ERRORS" >&5
32336
32337	as_fn_error $? "Package requirements (libffi) were not met:
32338
32339$LIBFFI_PKG_ERRORS
32340
32341Consider adjusting the PKG_CONFIG_PATH environment variable if you
32342installed software in a non-standard prefix.
32343
32344Alternatively, you may set the environment variables LIBFFI_CFLAGS
32345and LIBFFI_LIBS to avoid the need to call pkg-config.
32346See the pkg-config man page for more details.
32347" "$LINENO" 5
32348elif test $pkg_failed = untried; then
32349	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32350$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32351as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
32352is in your PATH or set the PKG_CONFIG environment variable to the full
32353path to pkg-config.
32354
32355Alternatively, you may set the environment variables LIBFFI_CFLAGS
32356and LIBFFI_LIBS to avoid the need to call pkg-config.
32357See the pkg-config man page for more details.
32358
32359To get pkg-config, see <http://pkg-config.freedesktop.org/>.
32360See \`config.log' for more details" "$LINENO" 5; }
32361else
32362	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
32363	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
32364        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32365$as_echo "yes" >&6; }
32366	:
32367fi
32368
32369fi
32370
32371if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
32372    # Extract the first word of "llvm-config", so it can be a program name with args.
32373set dummy llvm-config; ac_word=$2
32374{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32375$as_echo_n "checking for $ac_word... " >&6; }
32376if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
32377  $as_echo_n "(cached) " >&6
32378else
32379  if test -n "$LLVM_CONFIG"; then
32380  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
32381else
32382as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32383for as_dir in $PATH
32384do
32385  IFS=$as_save_IFS
32386  test -z "$as_dir" && as_dir=.
32387    for ac_exec_ext in '' $ac_executable_extensions; do
32388  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32389    ac_cv_prog_LLVM_CONFIG="llvm-config"
32390    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32391    break 2
32392  fi
32393done
32394  done
32395IFS=$as_save_IFS
32396
32397fi
32398fi
32399LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
32400if test -n "$LLVM_CONFIG"; then
32401  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
32402$as_echo "$LLVM_CONFIG" >&6; }
32403else
32404  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32405$as_echo "no" >&6; }
32406fi
32407
32408
32409
32410    if test "x$LLVM_CONFIG" != xllvm-config; then
32411        as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
32412    fi
32413
32414    llvm_components="jit mcjit engine nativecodegen native"
32415    unset LLVM_CFLAGS
32416    for flag in $("$LLVM_CONFIG" --cxxflags); do
32417      if echo "${flag}" | grep -q '^-[ID]'; then
32418        if test "${flag}" != "-D_DEBUG" ; then
32419          if test "${LLVM_CFLAGS}" != "" ; then
32420            LLVM_CFLAGS="${LLVM_CFLAGS} "
32421          fi
32422          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
32423        fi
32424      fi
32425    done
32426    llvm_version=$("${LLVM_CONFIG}" --version | sed 's/\.//; s/svn.*//')
32427    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
32428
32429    unset LLVM_LDFLAGS
32430    for flag in $("${LLVM_CONFIG}" --ldflags); do
32431      if echo "${flag}" | grep -q '^-L'; then
32432        if test "${LLVM_LDFLAGS}" != ""; then
32433          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
32434        fi
32435        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
32436      fi
32437    done
32438
32439    unset LLVM_LIBS
32440    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
32441      if echo "${flag}" | grep -q '^-l'; then
32442        if test "${LLVM_LIBS}" != ""; then
32443          LLVM_LIBS="${LLVM_LIBS} "
32444        fi
32445        LLVM_LIBS="${LLVM_LIBS}${flag}"
32446      fi
32447    done
32448
32449
32450
32451
32452fi
32453
32454# libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
32455if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$LIBCXX" = x; then
32456    LIBCXX="/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
32457fi
32458
32459# TODO better (platform agnostic) test
32460if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$GCC" = xyes; then
32461    LIBCXX="-lstdc++"
32462fi
32463
32464
32465
32466
32467
32468# After we have toolchain and the paths to all libraries (needed by msys), we can compile the fixpath helper
32469
32470# When using cygwin or msys, we need a wrapper binary that renames
32471# /cygdrive/c/ arguments into c:/ arguments and peeks into
32472# @files and rewrites these too! This wrapper binary is
32473# called fixpath.
32474FIXPATH=
32475if test "x$OPENJDK_BUILD_OS" = xwindows; then
32476    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
32477$as_echo_n "checking if fixpath can be created... " >&6; }
32478    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
32479    FIXPATH_BIN="$OUTPUT_ROOT/fixpath.exe"
32480    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
32481      FIXPATH_SRC=`$CYGPATH -m $FIXPATH_SRC`
32482      FIXPATH_BIN=`$CYGPATH -m $FIXPATH_BIN`
32483      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
32484      FIXPATH="$OUTPUT_ROOT/fixpath.exe -c"
32485    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
32486      FIXPATH_SRC=`cmd //c echo $FIXPATH_SRC`
32487      FIXPATH_BIN=`cmd //c echo $FIXPATH_BIN`
32488
32489      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
32490      # @ was chosen as separator to minimize risk of other tools messing around with it
32491      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" | tr ' ' '\n' | grep '^/./' | sort | uniq`
32492      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
32493
32494      FIXPATH="$OUTPUT_ROOT/fixpath -m$fixpath_argument_list"
32495    fi
32496    rm -f $OUTPUT_ROOT/fixpath*
32497    cd $OUTPUT_ROOT
32498    $CC $FIXPATH_SRC -Fe$FIXPATH_BIN > $OUTPUT_ROOT/fixpath1.log 2>&1
32499    cd $CURDIR
32500
32501    if test ! -x $OUTPUT_ROOT/fixpath.exe; then
32502        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32503$as_echo "no" >&6; }
32504        cat $OUTPUT_ROOT/fixpath1.log
32505        as_fn_error $? "Could not create $OUTPUT_ROOT/fixpath.exe" "$LINENO" 5
32506    fi
32507    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32508$as_echo "yes" >&6; }
32509    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
32510$as_echo_n "checking if fixpath.exe works... " >&6; }
32511    cd $OUTPUT_ROOT
32512    $FIXPATH $CC $SRC_ROOT/common/src/fixpath.c -Fe$OUTPUT_ROOT/fixpath2.exe > $OUTPUT_ROOT/fixpath2.log 2>&1
32513    cd $CURDIR
32514    if test ! -x $OUTPUT_ROOT/fixpath2.exe; then
32515        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32516$as_echo "no" >&6; }
32517        cat $OUTPUT_ROOT/fixpath2.log
32518        as_fn_error $? "fixpath did not work!" "$LINENO" 5
32519    fi
32520    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32521$as_echo "yes" >&6; }
32522    rm -f $OUTPUT_ROOT/fixpath?.??? $OUTPUT_ROOT/fixpath.obj
32523fi
32524
32525
32526
32527
32528###############################################################################
32529#
32530# We need to do some final tweaking, when everything else is done.
32531#
32532###############################################################################
32533
32534
32535HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
32536
32537
32538# The name of the Service Agent jar.
32539SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
32540if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
32541  SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
32542fi
32543
32544
32545
32546
32547{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
32548$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
32549
32550if test -d "${SRC_ROOT}/jdk/src/share/native/sun/security/ec/impl"; then
32551    ENABLE_INTREE_EC=yes
32552    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32553$as_echo "yes" >&6; }
32554else
32555    ENABLE_INTREE_EC=no
32556    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32557$as_echo "no" >&6; }
32558fi
32559
32560
32561
32562
32563###############################################################################
32564#
32565# Configure parts of the build that only affect the build performance,
32566# not the result.
32567#
32568###############################################################################
32569
32570
32571  # How many cores do we have on this build system?
32572
32573# Check whether --with-num-cores was given.
32574if test "${with_num_cores+set}" = set; then :
32575  withval=$with_num_cores;
32576fi
32577
32578  if test "x$with_num_cores" = x; then
32579    # The number of cores were not specified, try to probe them.
32580
32581    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
32582$as_echo_n "checking for number of cores... " >&6; }
32583    NUM_CORES=1
32584    FOUND_CORES=no
32585
32586    if test -f /proc/cpuinfo; then
32587        # Looks like a Linux (or cygwin) system
32588        NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
32589        FOUND_CORES=yes
32590    elif test -x /usr/sbin/psrinfo; then
32591        # Looks like a Solaris system
32592        NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
32593        FOUND_CORES=yes
32594    elif test -x /usr/sbin/system_profiler; then
32595        # Looks like a MacOSX system
32596        NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print $5}'`
32597        FOUND_CORES=yes
32598    elif test -n "$NUMBER_OF_PROCESSORS"; then
32599        # On windows, look in the env
32600        NUM_CORES=$NUMBER_OF_PROCESSORS
32601        FOUND_CORES=yes
32602    fi
32603
32604    if test "x$FOUND_CORES" = xyes; then
32605        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
32606$as_echo "$NUM_CORES" >&6; }
32607    else
32608        { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
32609$as_echo "could not detect number of cores, defaulting to 1" >&6; }
32610        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
32611$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
32612    fi
32613
32614
32615  else
32616    NUM_CORES=$with_num_cores
32617  fi
32618
32619
32620
32621  # How much memory do we have on this build system?
32622
32623# Check whether --with-memory-size was given.
32624if test "${with_memory_size+set}" = set; then :
32625  withval=$with_memory_size;
32626fi
32627
32628  if test "x$with_memory_size" = x; then
32629    # The memory size was not specified, try to probe it.
32630
32631    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
32632$as_echo_n "checking for memory size... " >&6; }
32633    # Default to 1024 MB
32634    MEMORY_SIZE=1024
32635    FOUND_MEM=no
32636
32637    if test -f /proc/meminfo; then
32638        # Looks like a Linux (or cygwin) system
32639        MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
32640        MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
32641        FOUND_MEM=yes
32642    elif test -x /usr/sbin/prtconf; then
32643        # Looks like a Solaris system
32644        MEMORY_SIZE=`/usr/sbin/prtconf | grep "Memory size" | awk '{ print $3 }'`
32645        FOUND_MEM=yes
32646    elif test -x /usr/sbin/system_profiler; then
32647        # Looks like a MacOSX system
32648        MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print $2}'`
32649        MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
32650        FOUND_MEM=yes
32651    elif test "x$OPENJDK_BUILD_OS" = xwindows; then
32652        # Windows, but without cygwin
32653        MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
32654        MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
32655        FOUND_MEM=yes
32656    fi
32657
32658    if test "x$FOUND_MEM" = xyes; then
32659        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
32660$as_echo "$MEMORY_SIZE MB" >&6; }
32661    else
32662        { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to 1024 MB" >&5
32663$as_echo "could not detect memory size, defaulting to 1024 MB" >&6; }
32664        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
32665$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
32666    fi
32667
32668  else
32669    MEMORY_SIZE=$with_memory_size
32670  fi
32671
32672
32673
32674  # Provide a decent default number of parallel jobs for make depending on
32675  # number of cores, amount of memory and machine architecture.
32676
32677# Check whether --with-jobs was given.
32678if test "${with_jobs+set}" = set; then :
32679  withval=$with_jobs;
32680fi
32681
32682  if test "x$with_jobs" = x; then
32683    # Number of jobs was not specified, calculate.
32684    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
32685$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
32686    # Approximate memory in GB, rounding up a bit.
32687    memory_gb=`expr $MEMORY_SIZE / 1100`
32688    # Pick the lowest of memory in gb and number of cores.
32689    if test "$memory_gb" -lt "$NUM_CORES"; then
32690      JOBS="$memory_gb"
32691    else
32692      JOBS="$NUM_CORES"
32693      # On bigger machines, leave some room for other processes to run
32694      if test "$JOBS" -gt "4"; then
32695        JOBS=`expr $JOBS '*' 90 / 100`
32696      fi
32697    fi
32698    # Cap number of jobs to 16
32699    if test "$JOBS" -gt "16"; then
32700      JOBS=16
32701    fi
32702    if test "$JOBS" -eq "0"; then
32703      JOBS=1
32704    fi
32705    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
32706$as_echo "$JOBS" >&6; }
32707  else
32708    JOBS=$with_jobs
32709  fi
32710
32711
32712
32713# Setup smart javac (after cores and memory have been setup)
32714
32715
32716# Check whether --with-sjavac-server-java was given.
32717if test "${with_sjavac_server_java+set}" = set; then :
32718  withval=$with_sjavac_server_java;
32719fi
32720
32721
32722if test "x$with_sjavac_server_java" != x; then
32723    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
32724    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
32725    if test "x$FOUND_VERSION" = x; then
32726        as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
32727    fi
32728else
32729    SJAVAC_SERVER_JAVA=""
32730    # Hotspot specific options.
32731
32732    $ECHO "Check if jvm arg is ok: -verbosegc" >&5
32733    $ECHO "Command: $JAVA -verbosegc -version" >&5
32734    OUTPUT=`$JAVA -verbosegc -version 2>&1`
32735    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
32736    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
32737    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32738        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -verbosegc"
32739	JVM_ARG_OK=true
32740    else
32741	$ECHO "Arg failed:" >&5
32742	$ECHO "$OUTPUT" >&5
32743	JVM_ARG_OK=false
32744    fi
32745
32746    # JRockit specific options.
32747
32748    $ECHO "Check if jvm arg is ok: -Xverbose:gc" >&5
32749    $ECHO "Command: $JAVA -Xverbose:gc -version" >&5
32750    OUTPUT=`$JAVA -Xverbose:gc -version 2>&1`
32751    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
32752    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
32753    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32754        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xverbose:gc"
32755	JVM_ARG_OK=true
32756    else
32757	$ECHO "Arg failed:" >&5
32758	$ECHO "$OUTPUT" >&5
32759	JVM_ARG_OK=false
32760    fi
32761
32762    SJAVAC_SERVER_JAVA="$JAVA $SJAVAC_SERVER_JAVA"
32763fi
32764
32765
32766if test "$MEMORY_SIZE" -gt "2500"; then
32767
32768    $ECHO "Check if jvm arg is ok: -d64" >&5
32769    $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
32770    OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
32771    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
32772    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
32773    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32774        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
32775	JVM_ARG_OK=true
32776    else
32777	$ECHO "Arg failed:" >&5
32778	$ECHO "$OUTPUT" >&5
32779	JVM_ARG_OK=false
32780    fi
32781
32782    if test "$JVM_ARG_OK" = true; then
32783        JVM_64BIT=true
32784	JVM_ARG_OK=false
32785    fi
32786    fi
32787
32788if test "$JVM_64BIT" = true; then
32789    if test "$MEMORY_SIZE" -gt "17000"; then
32790
32791    $ECHO "Check if jvm arg is ok: -Xms10G -Xmx10G" >&5
32792    $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version" >&5
32793    OUTPUT=`$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version 2>&1`
32794    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
32795    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
32796    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32797        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G"
32798	JVM_ARG_OK=true
32799    else
32800	$ECHO "Arg failed:" >&5
32801	$ECHO "$OUTPUT" >&5
32802	JVM_ARG_OK=false
32803    fi
32804
32805    fi
32806    if test "$MEMORY_SIZE" -gt "10000" && test "$JVM_ARG_OK" = false; then
32807
32808    $ECHO "Check if jvm arg is ok: -Xms6G -Xmx6G" >&5
32809    $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version" >&5
32810    OUTPUT=`$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version 2>&1`
32811    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
32812    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
32813    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32814        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G"
32815	JVM_ARG_OK=true
32816    else
32817	$ECHO "Arg failed:" >&5
32818	$ECHO "$OUTPUT" >&5
32819	JVM_ARG_OK=false
32820    fi
32821
32822    fi
32823    if test "$MEMORY_SIZE" -gt "5000" && test "$JVM_ARG_OK" = false; then
32824
32825    $ECHO "Check if jvm arg is ok: -Xms1G -Xmx3G" >&5
32826    $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version" >&5
32827    OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version 2>&1`
32828    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
32829    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
32830    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32831        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G"
32832	JVM_ARG_OK=true
32833    else
32834	$ECHO "Arg failed:" >&5
32835	$ECHO "$OUTPUT" >&5
32836	JVM_ARG_OK=false
32837    fi
32838
32839    fi
32840    if test "$MEMORY_SIZE" -gt "3800" && test "$JVM_ARG_OK" = false; then
32841
32842    $ECHO "Check if jvm arg is ok: -Xms1G -Xmx2500M" >&5
32843    $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version" >&5
32844    OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version 2>&1`
32845    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
32846    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
32847    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32848        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M"
32849	JVM_ARG_OK=true
32850    else
32851	$ECHO "Arg failed:" >&5
32852	$ECHO "$OUTPUT" >&5
32853	JVM_ARG_OK=false
32854    fi
32855
32856    fi
32857fi
32858if test "$MEMORY_SIZE" -gt "2500" && test "$JVM_ARG_OK" = false; then
32859
32860    $ECHO "Check if jvm arg is ok: -Xms1000M -Xmx1500M" >&5
32861    $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M -version" >&5
32862    OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M -version 2>&1`
32863    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
32864    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
32865    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32866        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M"
32867	JVM_ARG_OK=true
32868    else
32869	$ECHO "Arg failed:" >&5
32870	$ECHO "$OUTPUT" >&5
32871	JVM_ARG_OK=false
32872    fi
32873
32874fi
32875if test "$MEMORY_SIZE" -gt "1000" && test "$JVM_ARG_OK" = false; then
32876
32877    $ECHO "Check if jvm arg is ok: -Xms400M -Xmx1100M" >&5
32878    $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version" >&5
32879    OUTPUT=`$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version 2>&1`
32880    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
32881    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
32882    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32883        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M"
32884	JVM_ARG_OK=true
32885    else
32886	$ECHO "Arg failed:" >&5
32887	$ECHO "$OUTPUT" >&5
32888	JVM_ARG_OK=false
32889    fi
32890
32891fi
32892if test "$JVM_ARG_OK" = false; then
32893
32894    $ECHO "Check if jvm arg is ok: -Xms256M -Xmx512M" >&5
32895    $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version" >&5
32896    OUTPUT=`$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version 2>&1`
32897    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
32898    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
32899    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32900        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M"
32901	JVM_ARG_OK=true
32902    else
32903	$ECHO "Arg failed:" >&5
32904	$ECHO "$OUTPUT" >&5
32905	JVM_ARG_OK=false
32906    fi
32907
32908fi
32909
32910{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
32911$as_echo_n "checking whether to use sjavac... " >&6; }
32912# Check whether --enable-sjavac was given.
32913if test "${enable_sjavac+set}" = set; then :
32914  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
32915else
32916  ENABLE_SJAVAC='no'
32917fi
32918
32919{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
32920$as_echo "$ENABLE_SJAVAC" >&6; }
32921
32922
32923if test "x$ENABLE_SJAVAC" = xyes; then
32924    SJAVAC_SERVER_DIR="$OUTPUT_ROOT/javacservers"
32925else
32926    SJAVAC_SERVER_DIR=
32927fi
32928
32929
32930
32931
32932# Can the C/C++ compiler use precompiled headers?
32933
32934
32935###############################################################################
32936#
32937# Can the C/C++ compiler use precompiled headers?
32938#
32939# Check whether --enable-precompiled-headers was given.
32940if test "${enable_precompiled_headers+set}" = set; then :
32941  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
32942else
32943  ENABLE_PRECOMPH=yes
32944fi
32945
32946
32947USE_PRECOMPILED_HEADER=1
32948if test "x$ENABLE_PRECOMPH" = xno; then
32949    USE_PRECOMPILED_HEADER=0
32950fi
32951
32952if test "x$ENABLE_PRECOMPH" = xyes; then
32953    # Check that the compiler actually supports precomp headers.
32954    if test "x$GCC" = xyes; then
32955         { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
32956$as_echo_n "checking that precompiled headers work... " >&6; }
32957         echo "int alfa();" > conftest.h
32958         $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
32959         if test ! -f conftest.hpp.gch; then
32960             USE_PRECOMPILED_HEADER=0
32961             { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32962$as_echo "no" >&6; }
32963         else
32964             { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32965$as_echo "yes" >&6; }
32966         fi
32967         rm -f conftest.h conftest.hpp.gch
32968    fi
32969fi
32970
32971
32972
32973
32974# Setup use of ccache, if available
32975
32976    # Check whether --enable-ccache was given.
32977if test "${enable_ccache+set}" = set; then :
32978  enableval=$enable_ccache; ENABLE_CCACHE=${enable_ccache}
32979else
32980  ENABLE_CCACHE=yes
32981fi
32982
32983    if test "x$ENABLE_CCACHE" = xyes; then
32984        OLD_PATH="$PATH"
32985        if test "x$TOOLS_DIR" != x; then
32986          PATH=$TOOLS_DIR:$PATH
32987        fi
32988        # Extract the first word of "ccache", so it can be a program name with args.
32989set dummy ccache; ac_word=$2
32990{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32991$as_echo_n "checking for $ac_word... " >&6; }
32992if ${ac_cv_path_CCACHE+:} false; then :
32993  $as_echo_n "(cached) " >&6
32994else
32995  case $CCACHE in
32996  [\\/]* | ?:[\\/]*)
32997  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
32998  ;;
32999  *)
33000  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33001for as_dir in $PATH
33002do
33003  IFS=$as_save_IFS
33004  test -z "$as_dir" && as_dir=.
33005    for ac_exec_ext in '' $ac_executable_extensions; do
33006  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33007    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
33008    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33009    break 2
33010  fi
33011done
33012  done
33013IFS=$as_save_IFS
33014
33015  ;;
33016esac
33017fi
33018CCACHE=$ac_cv_path_CCACHE
33019if test -n "$CCACHE"; then
33020  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
33021$as_echo "$CCACHE" >&6; }
33022else
33023  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33024$as_echo "no" >&6; }
33025fi
33026
33027
33028        PATH="$OLD_PATH"
33029    else
33030        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ccache" >&5
33031$as_echo_n "checking for ccache... " >&6; }
33032        { $as_echo "$as_me:${as_lineno-$LINENO}: result: explicitly disabled" >&5
33033$as_echo "explicitly disabled" >&6; }
33034        CCACHE=
33035    fi
33036
33037
33038
33039# Check whether --with-ccache-dir was given.
33040if test "${with_ccache_dir+set}" = set; then :
33041  withval=$with_ccache_dir;
33042fi
33043
33044
33045    if test "x$with_ccache_dir" != x; then
33046        # When using a non home ccache directory, assume the use is to share ccache files
33047        # with other users. Thus change the umask.
33048        SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
33049    fi
33050    CCACHE_FOUND=""
33051    if test "x$CCACHE" != x; then
33052
33053    if test "x$CCACHE" != x; then
33054        CCACHE_FOUND="true"
33055        # Only use ccache if it is 3.1.4 or later, which supports
33056        # precompiled headers.
33057        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ccache supports precompiled headers" >&5
33058$as_echo_n "checking if ccache supports precompiled headers... " >&6; }
33059        HAS_GOOD_CCACHE=`($CCACHE --version | head -n 1 | grep -E 3.1.[456789]) 2> /dev/null`
33060        if test "x$HAS_GOOD_CCACHE" = x; then
33061            { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccache" >&5
33062$as_echo "no, disabling ccache" >&6; }
33063            CCACHE=
33064        else
33065            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
33066$as_echo "yes" >&6; }
33067            { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
33068$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
33069            PUSHED_FLAGS="$CXXFLAGS"
33070            CXXFLAGS="-fpch-preprocess $CXXFLAGS"
33071            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33072/* end confdefs.h.  */
33073
33074int
33075main ()
33076{
33077
33078  ;
33079  return 0;
33080}
33081_ACEOF
33082if ac_fn_cxx_try_compile "$LINENO"; then :
33083  CC_KNOWS_CCACHE_TRICK=yes
33084else
33085  CC_KNOWS_CCACHE_TRICK=no
33086fi
33087rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33088            CXXFLAGS="$PUSHED_FLAGS"
33089            if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
33090                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
33091$as_echo "yes" >&6; }
33092            else
33093                { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccaching of precompiled headers" >&5
33094$as_echo "no, disabling ccaching of precompiled headers" >&6; }
33095                CCACHE=
33096            fi
33097        fi
33098    fi
33099
33100    if test "x$CCACHE" != x; then
33101        CCACHE_SLOPPINESS=time_macros
33102        CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS $CCACHE"
33103        CCACHE_FLAGS=-fpch-preprocess
33104
33105        if test "x$SET_CCACHE_DIR" != x; then
33106            mkdir -p $CCACHE_DIR > /dev/null 2>&1
33107	    chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
33108        fi
33109    fi
33110
33111    fi
33112
33113
33114###############################################################################
33115#
33116# And now the finish...
33117#
33118###############################################################################
33119
33120# Check for some common pitfalls
33121
33122  if test x"$OPENJDK_BUILD_OS" = xwindows; then
33123    file_to_test="$SRC_ROOT/LICENSE"
33124    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
33125      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
33126    fi
33127  fi
33128
33129
33130
33131{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
33132$as_echo_n "checking if build directory is on local disk... " >&6; }
33133
33134	# df -l lists only local disks; if the given directory is not found then
33135	# a non-zero exit code is given
33136  if test "x$DF" = x; then
33137    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33138      # msys does not have df; use Windows "net use" instead.
33139      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
33140      if test "x$IS_NETWORK_DISK" = x; then
33141        OUTPUT_DIR_IS_LOCAL="yes"
33142      else
33143        OUTPUT_DIR_IS_LOCAL="no"
33144      fi
33145    else
33146      # No df here, say it's local
33147      OUTPUT_DIR_IS_LOCAL="yes"
33148    fi
33149  else
33150    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
33151      OUTPUT_DIR_IS_LOCAL="yes"
33152    else
33153      OUTPUT_DIR_IS_LOCAL="no"
33154    fi
33155  fi
33156
33157{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
33158$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
33159
33160
33161
33162# Check if the user has any old-style ALT_ variables set.
33163FOUND_ALT_VARIABLES=`env | grep ^ALT_`
33164
33165# Before generating output files, test if they exist. If they do, this is a reconfigure.
33166# Since we can't properly handle the dependencies for this, warn the user about the situation
33167if test -e $OUTPUT_ROOT/spec.gmk; then
33168  IS_RECONFIGURE=yes
33169else
33170  IS_RECONFIGURE=no
33171fi
33172
33173if test -e $SRC_ROOT/build/.hide-configure-performance-hints; then
33174  HIDE_PERFORMANCE_HINTS=yes
33175else
33176  HIDE_PERFORMANCE_HINTS=no
33177  # Hide it the next time around...
33178  $TOUCH $SRC_ROOT/build/.hide-configure-performance-hints > /dev/null 2>&1
33179fi
33180
33181
33182
33183# At the end, call the custom hook. (Dummy macro if no custom sources available)
33184
33185
33186# We're messing a bit with internal autoconf variables to put the config.status
33187# in the output directory instead of the current directory.
33188CONFIG_STATUS="$OUTPUT_ROOT/config.status"
33189
33190# Create the actual output files. Now the main work of configure is done.
33191cat >confcache <<\_ACEOF
33192# This file is a shell script that caches the results of configure
33193# tests run on this system so they can be shared between configure
33194# scripts and configure runs, see configure's option --config-cache.
33195# It is not useful on other systems.  If it contains results you don't
33196# want to keep, you may remove or edit it.
33197#
33198# config.status only pays attention to the cache file if you give it
33199# the --recheck option to rerun configure.
33200#
33201# `ac_cv_env_foo' variables (set or unset) will be overridden when
33202# loading this file, other *unset* `ac_cv_foo' will be assigned the
33203# following values.
33204
33205_ACEOF
33206
33207# The following way of writing the cache mishandles newlines in values,
33208# but we know of no workaround that is simple, portable, and efficient.
33209# So, we kill variables containing newlines.
33210# Ultrix sh set writes to stderr and can't be redirected directly,
33211# and sets the high bit in the cache file unless we assign to the vars.
33212(
33213  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
33214    eval ac_val=\$$ac_var
33215    case $ac_val in #(
33216    *${as_nl}*)
33217      case $ac_var in #(
33218      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
33219$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
33220      esac
33221      case $ac_var in #(
33222      _ | IFS | as_nl) ;; #(
33223      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
33224      *) { eval $ac_var=; unset $ac_var;} ;;
33225      esac ;;
33226    esac
33227  done
33228
33229  (set) 2>&1 |
33230    case $as_nl`(ac_space=' '; set) 2>&1` in #(
33231    *${as_nl}ac_space=\ *)
33232      # `set' does not quote correctly, so add quotes: double-quote
33233      # substitution turns \\\\ into \\, and sed turns \\ into \.
33234      sed -n \
33235	"s/'/'\\\\''/g;
33236	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
33237      ;; #(
33238    *)
33239      # `set' quotes correctly as required by POSIX, so do not add quotes.
33240      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
33241      ;;
33242    esac |
33243    sort
33244) |
33245  sed '
33246     /^ac_cv_env_/b end
33247     t clear
33248     :clear
33249     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
33250     t end
33251     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
33252     :end' >>confcache
33253if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
33254  if test -w "$cache_file"; then
33255    if test "x$cache_file" != "x/dev/null"; then
33256      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
33257$as_echo "$as_me: updating cache $cache_file" >&6;}
33258      if test ! -f "$cache_file" || test -h "$cache_file"; then
33259	cat confcache >"$cache_file"
33260      else
33261        case $cache_file in #(
33262        */* | ?:*)
33263	  mv -f confcache "$cache_file"$$ &&
33264	  mv -f "$cache_file"$$ "$cache_file" ;; #(
33265        *)
33266	  mv -f confcache "$cache_file" ;;
33267	esac
33268      fi
33269    fi
33270  else
33271    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
33272$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
33273  fi
33274fi
33275rm -f confcache
33276
33277test "x$prefix" = xNONE && prefix=$ac_default_prefix
33278# Let make expand exec_prefix.
33279test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
33280
33281DEFS=-DHAVE_CONFIG_H
33282
33283ac_libobjs=
33284ac_ltlibobjs=
33285U=
33286for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
33287  # 1. Remove the extension, and $U if already installed.
33288  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
33289  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
33290  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
33291  #    will be set to the directory where LIBOBJS objects are built.
33292  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
33293  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
33294done
33295LIBOBJS=$ac_libobjs
33296
33297LTLIBOBJS=$ac_ltlibobjs
33298
33299
33300
33301: "${CONFIG_STATUS=./config.status}"
33302ac_write_fail=0
33303ac_clean_files_save=$ac_clean_files
33304ac_clean_files="$ac_clean_files $CONFIG_STATUS"
33305{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
33306$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
33307as_write_fail=0
33308cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
33309#! $SHELL
33310# Generated by $as_me.
33311# Run this file to recreate the current configuration.
33312# Compiler output produced by configure, useful for debugging
33313# configure, is in config.log if it exists.
33314
33315debug=false
33316ac_cs_recheck=false
33317ac_cs_silent=false
33318
33319SHELL=\${CONFIG_SHELL-$SHELL}
33320export SHELL
33321_ASEOF
33322cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
33323## -------------------- ##
33324## M4sh Initialization. ##
33325## -------------------- ##
33326
33327# Be more Bourne compatible
33328DUALCASE=1; export DUALCASE # for MKS sh
33329if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
33330  emulate sh
33331  NULLCMD=:
33332  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
33333  # is contrary to our usage.  Disable this feature.
33334  alias -g '${1+"$@"}'='"$@"'
33335  setopt NO_GLOB_SUBST
33336else
33337  case `(set -o) 2>/dev/null` in #(
33338  *posix*) :
33339    set -o posix ;; #(
33340  *) :
33341     ;;
33342esac
33343fi
33344
33345
33346as_nl='
33347'
33348export as_nl
33349# Printing a long string crashes Solaris 7 /usr/bin/printf.
33350as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
33351as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
33352as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
33353# Prefer a ksh shell builtin over an external printf program on Solaris,
33354# but without wasting forks for bash or zsh.
33355if test -z "$BASH_VERSION$ZSH_VERSION" \
33356    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
33357  as_echo='print -r --'
33358  as_echo_n='print -rn --'
33359elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
33360  as_echo='printf %s\n'
33361  as_echo_n='printf %s'
33362else
33363  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
33364    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
33365    as_echo_n='/usr/ucb/echo -n'
33366  else
33367    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
33368    as_echo_n_body='eval
33369      arg=$1;
33370      case $arg in #(
33371      *"$as_nl"*)
33372	expr "X$arg" : "X\\(.*\\)$as_nl";
33373	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
33374      esac;
33375      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
33376    '
33377    export as_echo_n_body
33378    as_echo_n='sh -c $as_echo_n_body as_echo'
33379  fi
33380  export as_echo_body
33381  as_echo='sh -c $as_echo_body as_echo'
33382fi
33383
33384# The user is always right.
33385if test "${PATH_SEPARATOR+set}" != set; then
33386  PATH_SEPARATOR=:
33387  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
33388    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
33389      PATH_SEPARATOR=';'
33390  }
33391fi
33392
33393
33394# IFS
33395# We need space, tab and new line, in precisely that order.  Quoting is
33396# there to prevent editors from complaining about space-tab.
33397# (If _AS_PATH_WALK were called with IFS unset, it would disable word
33398# splitting by setting IFS to empty value.)
33399IFS=" ""	$as_nl"
33400
33401# Find who we are.  Look in the path if we contain no directory separator.
33402as_myself=
33403case $0 in #((
33404  *[\\/]* ) as_myself=$0 ;;
33405  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33406for as_dir in $PATH
33407do
33408  IFS=$as_save_IFS
33409  test -z "$as_dir" && as_dir=.
33410    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
33411  done
33412IFS=$as_save_IFS
33413
33414     ;;
33415esac
33416# We did not find ourselves, most probably we were run as `sh COMMAND'
33417# in which case we are not to be found in the path.
33418if test "x$as_myself" = x; then
33419  as_myself=$0
33420fi
33421if test ! -f "$as_myself"; then
33422  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
33423  exit 1
33424fi
33425
33426# Unset variables that we do not need and which cause bugs (e.g. in
33427# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
33428# suppresses any "Segmentation fault" message there.  '((' could
33429# trigger a bug in pdksh 5.2.14.
33430for as_var in BASH_ENV ENV MAIL MAILPATH
33431do eval test x\${$as_var+set} = xset \
33432  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
33433done
33434PS1='$ '
33435PS2='> '
33436PS4='+ '
33437
33438# NLS nuisances.
33439LC_ALL=C
33440export LC_ALL
33441LANGUAGE=C
33442export LANGUAGE
33443
33444# CDPATH.
33445(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
33446
33447
33448# as_fn_error STATUS ERROR [LINENO LOG_FD]
33449# ----------------------------------------
33450# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
33451# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
33452# script with STATUS, using 1 if that was 0.
33453as_fn_error ()
33454{
33455  as_status=$1; test $as_status -eq 0 && as_status=1
33456  if test "$4"; then
33457    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
33458    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
33459  fi
33460  $as_echo "$as_me: error: $2" >&2
33461  as_fn_exit $as_status
33462} # as_fn_error
33463
33464
33465# as_fn_set_status STATUS
33466# -----------------------
33467# Set $? to STATUS, without forking.
33468as_fn_set_status ()
33469{
33470  return $1
33471} # as_fn_set_status
33472
33473# as_fn_exit STATUS
33474# -----------------
33475# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
33476as_fn_exit ()
33477{
33478  set +e
33479  as_fn_set_status $1
33480  exit $1
33481} # as_fn_exit
33482
33483# as_fn_unset VAR
33484# ---------------
33485# Portably unset VAR.
33486as_fn_unset ()
33487{
33488  { eval $1=; unset $1;}
33489}
33490as_unset=as_fn_unset
33491# as_fn_append VAR VALUE
33492# ----------------------
33493# Append the text in VALUE to the end of the definition contained in VAR. Take
33494# advantage of any shell optimizations that allow amortized linear growth over
33495# repeated appends, instead of the typical quadratic growth present in naive
33496# implementations.
33497if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
33498  eval 'as_fn_append ()
33499  {
33500    eval $1+=\$2
33501  }'
33502else
33503  as_fn_append ()
33504  {
33505    eval $1=\$$1\$2
33506  }
33507fi # as_fn_append
33508
33509# as_fn_arith ARG...
33510# ------------------
33511# Perform arithmetic evaluation on the ARGs, and store the result in the
33512# global $as_val. Take advantage of shells that can avoid forks. The arguments
33513# must be portable across $(()) and expr.
33514if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
33515  eval 'as_fn_arith ()
33516  {
33517    as_val=$(( $* ))
33518  }'
33519else
33520  as_fn_arith ()
33521  {
33522    as_val=`expr "$@" || test $? -eq 1`
33523  }
33524fi # as_fn_arith
33525
33526
33527if expr a : '\(a\)' >/dev/null 2>&1 &&
33528   test "X`expr 00001 : '.*\(...\)'`" = X001; then
33529  as_expr=expr
33530else
33531  as_expr=false
33532fi
33533
33534if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
33535  as_basename=basename
33536else
33537  as_basename=false
33538fi
33539
33540if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
33541  as_dirname=dirname
33542else
33543  as_dirname=false
33544fi
33545
33546as_me=`$as_basename -- "$0" ||
33547$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
33548	 X"$0" : 'X\(//\)$' \| \
33549	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
33550$as_echo X/"$0" |
33551    sed '/^.*\/\([^/][^/]*\)\/*$/{
33552	    s//\1/
33553	    q
33554	  }
33555	  /^X\/\(\/\/\)$/{
33556	    s//\1/
33557	    q
33558	  }
33559	  /^X\/\(\/\).*/{
33560	    s//\1/
33561	    q
33562	  }
33563	  s/.*/./; q'`
33564
33565# Avoid depending upon Character Ranges.
33566as_cr_letters='abcdefghijklmnopqrstuvwxyz'
33567as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
33568as_cr_Letters=$as_cr_letters$as_cr_LETTERS
33569as_cr_digits='0123456789'
33570as_cr_alnum=$as_cr_Letters$as_cr_digits
33571
33572ECHO_C= ECHO_N= ECHO_T=
33573case `echo -n x` in #(((((
33574-n*)
33575  case `echo 'xy\c'` in
33576  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
33577  xy)  ECHO_C='\c';;
33578  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
33579       ECHO_T='	';;
33580  esac;;
33581*)
33582  ECHO_N='-n';;
33583esac
33584
33585rm -f conf$$ conf$$.exe conf$$.file
33586if test -d conf$$.dir; then
33587  rm -f conf$$.dir/conf$$.file
33588else
33589  rm -f conf$$.dir
33590  mkdir conf$$.dir 2>/dev/null
33591fi
33592if (echo >conf$$.file) 2>/dev/null; then
33593  if ln -s conf$$.file conf$$ 2>/dev/null; then
33594    as_ln_s='ln -s'
33595    # ... but there are two gotchas:
33596    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
33597    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
33598    # In both cases, we have to default to `cp -pR'.
33599    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
33600      as_ln_s='cp -pR'
33601  elif ln conf$$.file conf$$ 2>/dev/null; then
33602    as_ln_s=ln
33603  else
33604    as_ln_s='cp -pR'
33605  fi
33606else
33607  as_ln_s='cp -pR'
33608fi
33609rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
33610rmdir conf$$.dir 2>/dev/null
33611
33612
33613# as_fn_mkdir_p
33614# -------------
33615# Create "$as_dir" as a directory, including parents if necessary.
33616as_fn_mkdir_p ()
33617{
33618
33619  case $as_dir in #(
33620  -*) as_dir=./$as_dir;;
33621  esac
33622  test -d "$as_dir" || eval $as_mkdir_p || {
33623    as_dirs=
33624    while :; do
33625      case $as_dir in #(
33626      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
33627      *) as_qdir=$as_dir;;
33628      esac
33629      as_dirs="'$as_qdir' $as_dirs"
33630      as_dir=`$as_dirname -- "$as_dir" ||
33631$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
33632	 X"$as_dir" : 'X\(//\)[^/]' \| \
33633	 X"$as_dir" : 'X\(//\)$' \| \
33634	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
33635$as_echo X"$as_dir" |
33636    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
33637	    s//\1/
33638	    q
33639	  }
33640	  /^X\(\/\/\)[^/].*/{
33641	    s//\1/
33642	    q
33643	  }
33644	  /^X\(\/\/\)$/{
33645	    s//\1/
33646	    q
33647	  }
33648	  /^X\(\/\).*/{
33649	    s//\1/
33650	    q
33651	  }
33652	  s/.*/./; q'`
33653      test -d "$as_dir" && break
33654    done
33655    test -z "$as_dirs" || eval "mkdir $as_dirs"
33656  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
33657
33658
33659} # as_fn_mkdir_p
33660if mkdir -p . 2>/dev/null; then
33661  as_mkdir_p='mkdir -p "$as_dir"'
33662else
33663  test -d ./-p && rmdir ./-p
33664  as_mkdir_p=false
33665fi
33666
33667
33668# as_fn_executable_p FILE
33669# -----------------------
33670# Test if FILE is an executable regular file.
33671as_fn_executable_p ()
33672{
33673  test -f "$1" && test -x "$1"
33674} # as_fn_executable_p
33675as_test_x='test -x'
33676as_executable_p=as_fn_executable_p
33677
33678# Sed expression to map a string onto a valid CPP name.
33679as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
33680
33681# Sed expression to map a string onto a valid variable name.
33682as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
33683
33684
33685exec 6>&1
33686## ----------------------------------- ##
33687## Main body of $CONFIG_STATUS script. ##
33688## ----------------------------------- ##
33689_ASEOF
33690test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
33691
33692cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
33693# Save the log message, to keep $0 and so on meaningful, and to
33694# report actual input values of CONFIG_FILES etc. instead of their
33695# values after options handling.
33696ac_log="
33697This file was extended by OpenJDK $as_me jdk8, which was
33698generated by GNU Autoconf 2.69.  Invocation command line was
33699
33700  CONFIG_FILES    = $CONFIG_FILES
33701  CONFIG_HEADERS  = $CONFIG_HEADERS
33702  CONFIG_LINKS    = $CONFIG_LINKS
33703  CONFIG_COMMANDS = $CONFIG_COMMANDS
33704  $ $0 $@
33705
33706on `(hostname || uname -n) 2>/dev/null | sed 1q`
33707"
33708
33709_ACEOF
33710
33711case $ac_config_files in *"
33712"*) set x $ac_config_files; shift; ac_config_files=$*;;
33713esac
33714
33715case $ac_config_headers in *"
33716"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
33717esac
33718
33719
33720cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
33721# Files that config.status was made for.
33722config_files="$ac_config_files"
33723config_headers="$ac_config_headers"
33724
33725_ACEOF
33726
33727cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
33728ac_cs_usage="\
33729\`$as_me' instantiates files and other configuration actions
33730from templates according to the current configuration.  Unless the files
33731and actions are specified as TAGs, all are instantiated by default.
33732
33733Usage: $0 [OPTION]... [TAG]...
33734
33735  -h, --help       print this help, then exit
33736  -V, --version    print version number and configuration settings, then exit
33737      --config     print configuration, then exit
33738  -q, --quiet, --silent
33739                   do not print progress messages
33740  -d, --debug      don't remove temporary files
33741      --recheck    update $as_me by reconfiguring in the same conditions
33742      --file=FILE[:TEMPLATE]
33743                   instantiate the configuration file FILE
33744      --header=FILE[:TEMPLATE]
33745                   instantiate the configuration header FILE
33746
33747Configuration files:
33748$config_files
33749
33750Configuration headers:
33751$config_headers
33752
33753Report bugs to <build-dev@openjdk.java.net>.
33754OpenJDK home page: <http://openjdk.java.net>."
33755
33756_ACEOF
33757cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
33758ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
33759ac_cs_version="\\
33760OpenJDK config.status jdk8
33761configured by $0, generated by GNU Autoconf 2.69,
33762  with options \\"\$ac_cs_config\\"
33763
33764Copyright (C) 2012 Free Software Foundation, Inc.
33765This config.status script is free software; the Free Software Foundation
33766gives unlimited permission to copy, distribute and modify it."
33767
33768ac_pwd='$ac_pwd'
33769srcdir='$srcdir'
33770AWK='$AWK'
33771test -n "\$AWK" || AWK=awk
33772_ACEOF
33773
33774cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
33775# The default lists apply if the user does not specify any file.
33776ac_need_defaults=:
33777while test $# != 0
33778do
33779  case $1 in
33780  --*=?*)
33781    ac_option=`expr "X$1" : 'X\([^=]*\)='`
33782    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
33783    ac_shift=:
33784    ;;
33785  --*=)
33786    ac_option=`expr "X$1" : 'X\([^=]*\)='`
33787    ac_optarg=
33788    ac_shift=:
33789    ;;
33790  *)
33791    ac_option=$1
33792    ac_optarg=$2
33793    ac_shift=shift
33794    ;;
33795  esac
33796
33797  case $ac_option in
33798  # Handling of the options.
33799  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
33800    ac_cs_recheck=: ;;
33801  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
33802    $as_echo "$ac_cs_version"; exit ;;
33803  --config | --confi | --conf | --con | --co | --c )
33804    $as_echo "$ac_cs_config"; exit ;;
33805  --debug | --debu | --deb | --de | --d | -d )
33806    debug=: ;;
33807  --file | --fil | --fi | --f )
33808    $ac_shift
33809    case $ac_optarg in
33810    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
33811    '') as_fn_error $? "missing file argument" ;;
33812    esac
33813    as_fn_append CONFIG_FILES " '$ac_optarg'"
33814    ac_need_defaults=false;;
33815  --header | --heade | --head | --hea )
33816    $ac_shift
33817    case $ac_optarg in
33818    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
33819    esac
33820    as_fn_append CONFIG_HEADERS " '$ac_optarg'"
33821    ac_need_defaults=false;;
33822  --he | --h)
33823    # Conflict between --help and --header
33824    as_fn_error $? "ambiguous option: \`$1'
33825Try \`$0 --help' for more information.";;
33826  --help | --hel | -h )
33827    $as_echo "$ac_cs_usage"; exit ;;
33828  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
33829  | -silent | --silent | --silen | --sile | --sil | --si | --s)
33830    ac_cs_silent=: ;;
33831
33832  # This is an error.
33833  -*) as_fn_error $? "unrecognized option: \`$1'
33834Try \`$0 --help' for more information." ;;
33835
33836  *) as_fn_append ac_config_targets " $1"
33837     ac_need_defaults=false ;;
33838
33839  esac
33840  shift
33841done
33842
33843ac_configure_extra_args=
33844
33845if $ac_cs_silent; then
33846  exec 6>/dev/null
33847  ac_configure_extra_args="$ac_configure_extra_args --silent"
33848fi
33849
33850_ACEOF
33851cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
33852if \$ac_cs_recheck; then
33853  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
33854  shift
33855  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
33856  CONFIG_SHELL='$SHELL'
33857  export CONFIG_SHELL
33858  exec "\$@"
33859fi
33860
33861_ACEOF
33862cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
33863exec 5>>config.log
33864{
33865  echo
33866  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
33867## Running $as_me. ##
33868_ASBOX
33869  $as_echo "$ac_log"
33870} >&5
33871
33872_ACEOF
33873cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
33874_ACEOF
33875
33876cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
33877
33878# Handling of arguments.
33879for ac_config_target in $ac_config_targets
33880do
33881  case $ac_config_target in
33882    "$OUTPUT_ROOT/config.h") CONFIG_HEADERS="$CONFIG_HEADERS $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in" ;;
33883    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
33884    "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
33885    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
33886    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
33887    "$OUTPUT_ROOT/spec.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in" ;;
33888    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
33889
33890  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
33891  esac
33892done
33893
33894
33895# If the user did not use the arguments to specify the items to instantiate,
33896# then the envvar interface is used.  Set only those that are not.
33897# We use the long form for the default assignment because of an extremely
33898# bizarre bug on SunOS 4.1.3.
33899if $ac_need_defaults; then
33900  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
33901  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
33902fi
33903
33904# Have a temporary directory for convenience.  Make it in the build tree
33905# simply because there is no reason against having it here, and in addition,
33906# creating and moving files from /tmp can sometimes cause problems.
33907# Hook for its removal unless debugging.
33908# Note that there is a small window in which the directory will not be cleaned:
33909# after its creation but before its name has been assigned to `$tmp'.
33910$debug ||
33911{
33912  tmp= ac_tmp=
33913  trap 'exit_status=$?
33914  : "${ac_tmp:=$tmp}"
33915  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
33916' 0
33917  trap 'as_fn_exit 1' 1 2 13 15
33918}
33919# Create a (secure) tmp directory for tmp files.
33920
33921{
33922  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
33923  test -d "$tmp"
33924}  ||
33925{
33926  tmp=./conf$$-$RANDOM
33927  (umask 077 && mkdir "$tmp")
33928} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
33929ac_tmp=$tmp
33930
33931# Set up the scripts for CONFIG_FILES section.
33932# No need to generate them if there are no CONFIG_FILES.
33933# This happens for instance with `./config.status config.h'.
33934if test -n "$CONFIG_FILES"; then
33935
33936
33937ac_cr=`echo X | tr X '\015'`
33938# On cygwin, bash can eat \r inside `` if the user requested igncr.
33939# But we know of no other shell where ac_cr would be empty at this
33940# point, so we can use a bashism as a fallback.
33941if test "x$ac_cr" = x; then
33942  eval ac_cr=\$\'\\r\'
33943fi
33944ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
33945if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
33946  ac_cs_awk_cr='\\r'
33947else
33948  ac_cs_awk_cr=$ac_cr
33949fi
33950
33951echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
33952_ACEOF
33953
33954
33955{
33956  echo "cat >conf$$subs.awk <<_ACEOF" &&
33957  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
33958  echo "_ACEOF"
33959} >conf$$subs.sh ||
33960  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
33961ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
33962ac_delim='%!_!# '
33963for ac_last_try in false false false false false :; do
33964  . ./conf$$subs.sh ||
33965    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
33966
33967  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
33968  if test $ac_delim_n = $ac_delim_num; then
33969    break
33970  elif $ac_last_try; then
33971    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
33972  else
33973    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
33974  fi
33975done
33976rm -f conf$$subs.sh
33977
33978cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
33979cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
33980_ACEOF
33981sed -n '
33982h
33983s/^/S["/; s/!.*/"]=/
33984p
33985g
33986s/^[^!]*!//
33987:repl
33988t repl
33989s/'"$ac_delim"'$//
33990t delim
33991:nl
33992h
33993s/\(.\{148\}\)..*/\1/
33994t more1
33995s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
33996p
33997n
33998b repl
33999:more1
34000s/["\\]/\\&/g; s/^/"/; s/$/"\\/
34001p
34002g
34003s/.\{148\}//
34004t nl
34005:delim
34006h
34007s/\(.\{148\}\)..*/\1/
34008t more2
34009s/["\\]/\\&/g; s/^/"/; s/$/"/
34010p
34011b
34012:more2
34013s/["\\]/\\&/g; s/^/"/; s/$/"\\/
34014p
34015g
34016s/.\{148\}//
34017t delim
34018' <conf$$subs.awk | sed '
34019/^[^""]/{
34020  N
34021  s/\n//
34022}
34023' >>$CONFIG_STATUS || ac_write_fail=1
34024rm -f conf$$subs.awk
34025cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34026_ACAWK
34027cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
34028  for (key in S) S_is_set[key] = 1
34029  FS = ""
34030
34031}
34032{
34033  line = $ 0
34034  nfields = split(line, field, "@")
34035  substed = 0
34036  len = length(field[1])
34037  for (i = 2; i < nfields; i++) {
34038    key = field[i]
34039    keylen = length(key)
34040    if (S_is_set[key]) {
34041      value = S[key]
34042      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
34043      len += length(value) + length(field[++i])
34044      substed = 1
34045    } else
34046      len += 1 + keylen
34047  }
34048
34049  print line
34050}
34051
34052_ACAWK
34053_ACEOF
34054cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34055if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
34056  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
34057else
34058  cat
34059fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
34060  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
34061_ACEOF
34062
34063# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
34064# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
34065# trailing colons and then remove the whole line if VPATH becomes empty
34066# (actually we leave an empty line to preserve line numbers).
34067if test "x$srcdir" = x.; then
34068  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
34069h
34070s///
34071s/^/:/
34072s/[	 ]*$/:/
34073s/:\$(srcdir):/:/g
34074s/:\${srcdir}:/:/g
34075s/:@srcdir@:/:/g
34076s/^:*//
34077s/:*$//
34078x
34079s/\(=[	 ]*\).*/\1/
34080G
34081s/\n//
34082s/^[^=]*=[	 ]*$//
34083}'
34084fi
34085
34086cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34087fi # test -n "$CONFIG_FILES"
34088
34089# Set up the scripts for CONFIG_HEADERS section.
34090# No need to generate them if there are no CONFIG_HEADERS.
34091# This happens for instance with `./config.status Makefile'.
34092if test -n "$CONFIG_HEADERS"; then
34093cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
34094BEGIN {
34095_ACEOF
34096
34097# Transform confdefs.h into an awk script `defines.awk', embedded as
34098# here-document in config.status, that substitutes the proper values into
34099# config.h.in to produce config.h.
34100
34101# Create a delimiter string that does not exist in confdefs.h, to ease
34102# handling of long lines.
34103ac_delim='%!_!# '
34104for ac_last_try in false false :; do
34105  ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
34106  if test -z "$ac_tt"; then
34107    break
34108  elif $ac_last_try; then
34109    as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
34110  else
34111    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
34112  fi
34113done
34114
34115# For the awk script, D is an array of macro values keyed by name,
34116# likewise P contains macro parameters if any.  Preserve backslash
34117# newline sequences.
34118
34119ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
34120sed -n '
34121s/.\{148\}/&'"$ac_delim"'/g
34122t rset
34123:rset
34124s/^[	 ]*#[	 ]*define[	 ][	 ]*/ /
34125t def
34126d
34127:def
34128s/\\$//
34129t bsnl
34130s/["\\]/\\&/g
34131s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
34132D["\1"]=" \3"/p
34133s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2"/p
34134d
34135:bsnl
34136s/["\\]/\\&/g
34137s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
34138D["\1"]=" \3\\\\\\n"\\/p
34139t cont
34140s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
34141t cont
34142d
34143:cont
34144n
34145s/.\{148\}/&'"$ac_delim"'/g
34146t clear
34147:clear
34148s/\\$//
34149t bsnlc
34150s/["\\]/\\&/g; s/^/"/; s/$/"/p
34151d
34152:bsnlc
34153s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
34154b cont
34155' <confdefs.h | sed '
34156s/'"$ac_delim"'/"\\\
34157"/g' >>$CONFIG_STATUS || ac_write_fail=1
34158
34159cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34160  for (key in D) D_is_set[key] = 1
34161  FS = ""
34162}
34163/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
34164  line = \$ 0
34165  split(line, arg, " ")
34166  if (arg[1] == "#") {
34167    defundef = arg[2]
34168    mac1 = arg[3]
34169  } else {
34170    defundef = substr(arg[1], 2)
34171    mac1 = arg[2]
34172  }
34173  split(mac1, mac2, "(") #)
34174  macro = mac2[1]
34175  prefix = substr(line, 1, index(line, defundef) - 1)
34176  if (D_is_set[macro]) {
34177    # Preserve the white space surrounding the "#".
34178    print prefix "define", macro P[macro] D[macro]
34179    next
34180  } else {
34181    # Replace #undef with comments.  This is necessary, for example,
34182    # in the case of _POSIX_SOURCE, which is predefined and required
34183    # on some systems where configure will not decide to define it.
34184    if (defundef == "undef") {
34185      print "/*", prefix defundef, macro, "*/"
34186      next
34187    }
34188  }
34189}
34190{ print }
34191_ACAWK
34192_ACEOF
34193cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34194  as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
34195fi # test -n "$CONFIG_HEADERS"
34196
34197
34198eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    "
34199shift
34200for ac_tag
34201do
34202  case $ac_tag in
34203  :[FHLC]) ac_mode=$ac_tag; continue;;
34204  esac
34205  case $ac_mode$ac_tag in
34206  :[FHL]*:*);;
34207  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
34208  :[FH]-) ac_tag=-:-;;
34209  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
34210  esac
34211  ac_save_IFS=$IFS
34212  IFS=:
34213  set x $ac_tag
34214  IFS=$ac_save_IFS
34215  shift
34216  ac_file=$1
34217  shift
34218
34219  case $ac_mode in
34220  :L) ac_source=$1;;
34221  :[FH])
34222    ac_file_inputs=
34223    for ac_f
34224    do
34225      case $ac_f in
34226      -) ac_f="$ac_tmp/stdin";;
34227      *) # Look for the file first in the build tree, then in the source tree
34228	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
34229	 # because $ac_f cannot contain `:'.
34230	 test -f "$ac_f" ||
34231	   case $ac_f in
34232	   [\\/$]*) false;;
34233	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
34234	   esac ||
34235	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
34236      esac
34237      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
34238      as_fn_append ac_file_inputs " '$ac_f'"
34239    done
34240
34241    # Let's still pretend it is `configure' which instantiates (i.e., don't
34242    # use $as_me), people would be surprised to read:
34243    #    /* config.h.  Generated by config.status.  */
34244    configure_input='Generated from '`
34245	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
34246	`' by configure.'
34247    if test x"$ac_file" != x-; then
34248      configure_input="$ac_file.  $configure_input"
34249      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
34250$as_echo "$as_me: creating $ac_file" >&6;}
34251    fi
34252    # Neutralize special characters interpreted by sed in replacement strings.
34253    case $configure_input in #(
34254    *\&* | *\|* | *\\* )
34255       ac_sed_conf_input=`$as_echo "$configure_input" |
34256       sed 's/[\\\\&|]/\\\\&/g'`;; #(
34257    *) ac_sed_conf_input=$configure_input;;
34258    esac
34259
34260    case $ac_tag in
34261    *:-:* | *:-) cat >"$ac_tmp/stdin" \
34262      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
34263    esac
34264    ;;
34265  esac
34266
34267  ac_dir=`$as_dirname -- "$ac_file" ||
34268$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
34269	 X"$ac_file" : 'X\(//\)[^/]' \| \
34270	 X"$ac_file" : 'X\(//\)$' \| \
34271	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
34272$as_echo X"$ac_file" |
34273    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
34274	    s//\1/
34275	    q
34276	  }
34277	  /^X\(\/\/\)[^/].*/{
34278	    s//\1/
34279	    q
34280	  }
34281	  /^X\(\/\/\)$/{
34282	    s//\1/
34283	    q
34284	  }
34285	  /^X\(\/\).*/{
34286	    s//\1/
34287	    q
34288	  }
34289	  s/.*/./; q'`
34290  as_dir="$ac_dir"; as_fn_mkdir_p
34291  ac_builddir=.
34292
34293case "$ac_dir" in
34294.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
34295*)
34296  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
34297  # A ".." for each directory in $ac_dir_suffix.
34298  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
34299  case $ac_top_builddir_sub in
34300  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
34301  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
34302  esac ;;
34303esac
34304ac_abs_top_builddir=$ac_pwd
34305ac_abs_builddir=$ac_pwd$ac_dir_suffix
34306# for backward compatibility:
34307ac_top_builddir=$ac_top_build_prefix
34308
34309case $srcdir in
34310  .)  # We are building in place.
34311    ac_srcdir=.
34312    ac_top_srcdir=$ac_top_builddir_sub
34313    ac_abs_top_srcdir=$ac_pwd ;;
34314  [\\/]* | ?:[\\/]* )  # Absolute name.
34315    ac_srcdir=$srcdir$ac_dir_suffix;
34316    ac_top_srcdir=$srcdir
34317    ac_abs_top_srcdir=$srcdir ;;
34318  *) # Relative name.
34319    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
34320    ac_top_srcdir=$ac_top_build_prefix$srcdir
34321    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
34322esac
34323ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
34324
34325
34326  case $ac_mode in
34327  :F)
34328  #
34329  # CONFIG_FILE
34330  #
34331
34332_ACEOF
34333
34334cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34335# If the template does not know about datarootdir, expand it.
34336# FIXME: This hack should be removed a few years after 2.60.
34337ac_datarootdir_hack=; ac_datarootdir_seen=
34338ac_sed_dataroot='
34339/datarootdir/ {
34340  p
34341  q
34342}
34343/@datadir@/p
34344/@docdir@/p
34345/@infodir@/p
34346/@localedir@/p
34347/@mandir@/p'
34348case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
34349*datarootdir*) ac_datarootdir_seen=yes;;
34350*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
34351  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
34352$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
34353_ACEOF
34354cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34355  ac_datarootdir_hack='
34356  s&@datadir@&$datadir&g
34357  s&@docdir@&$docdir&g
34358  s&@infodir@&$infodir&g
34359  s&@localedir@&$localedir&g
34360  s&@mandir@&$mandir&g
34361  s&\\\${datarootdir}&$datarootdir&g' ;;
34362esac
34363_ACEOF
34364
34365# Neutralize VPATH when `$srcdir' = `.'.
34366# Shell code in configure.ac might set extrasub.
34367# FIXME: do we really want to maintain this feature?
34368cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34369ac_sed_extra="$ac_vpsub
34370$extrasub
34371_ACEOF
34372cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34373:t
34374/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
34375s|@configure_input@|$ac_sed_conf_input|;t t
34376s&@top_builddir@&$ac_top_builddir_sub&;t t
34377s&@top_build_prefix@&$ac_top_build_prefix&;t t
34378s&@srcdir@&$ac_srcdir&;t t
34379s&@abs_srcdir@&$ac_abs_srcdir&;t t
34380s&@top_srcdir@&$ac_top_srcdir&;t t
34381s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
34382s&@builddir@&$ac_builddir&;t t
34383s&@abs_builddir@&$ac_abs_builddir&;t t
34384s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
34385$ac_datarootdir_hack
34386"
34387eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
34388  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
34389
34390test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
34391  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
34392  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
34393      "$ac_tmp/out"`; test -z "$ac_out"; } &&
34394  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
34395which seems to be undefined.  Please make sure it is defined" >&5
34396$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
34397which seems to be undefined.  Please make sure it is defined" >&2;}
34398
34399  rm -f "$ac_tmp/stdin"
34400  case $ac_file in
34401  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
34402  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
34403  esac \
34404  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
34405 ;;
34406  :H)
34407  #
34408  # CONFIG_HEADER
34409  #
34410  if test x"$ac_file" != x-; then
34411    {
34412      $as_echo "/* $configure_input  */" \
34413      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
34414    } >"$ac_tmp/config.h" \
34415      || as_fn_error $? "could not create $ac_file" "$LINENO" 5
34416    if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
34417      { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
34418$as_echo "$as_me: $ac_file is unchanged" >&6;}
34419    else
34420      rm -f "$ac_file"
34421      mv "$ac_tmp/config.h" "$ac_file" \
34422	|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
34423    fi
34424  else
34425    $as_echo "/* $configure_input  */" \
34426      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
34427      || as_fn_error $? "could not create -" "$LINENO" 5
34428  fi
34429 ;;
34430
34431
34432  esac
34433
34434done # for ac_tag
34435
34436
34437as_fn_exit 0
34438_ACEOF
34439ac_clean_files=$ac_clean_files_save
34440
34441test $ac_write_fail = 0 ||
34442  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
34443
34444
34445# configure is writing to config.log, and then calls config.status.
34446# config.status does its own redirection, appending to config.log.
34447# Unfortunately, on DOS this fails, as config.log is still kept open
34448# by configure, so config.status won't be able to write to it; its
34449# output is simply discarded.  So we exec the FD to /dev/null,
34450# effectively closing config.log, so it can be properly (re)opened and
34451# appended to by config.status.  When coming back to configure, we
34452# need to make the FD available again.
34453if test "$no_create" != yes; then
34454  ac_cs_success=:
34455  ac_config_status_args=
34456  test "$silent" = yes &&
34457    ac_config_status_args="$ac_config_status_args --quiet"
34458  exec 5>/dev/null
34459  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
34460  exec 5>>config.log
34461  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
34462  # would make configure fail if this is the last instruction.
34463  $ac_cs_success || as_fn_exit 1
34464fi
34465if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
34466  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
34467$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
34468fi
34469
34470
34471# Try to move the config.log file to the output directory.
34472if test -e ./config.log; then
34473  $MV -f ./config.log "$OUTPUT_ROOT/config.log" 2> /dev/null
34474fi
34475
34476# Make the compare script executable
34477$CHMOD +x $OUTPUT_ROOT/compare.sh
34478
34479# Finally output some useful information to the user
34480
34481# Finally output some useful information to the user
34482
34483if test "x$CCACHE_FOUND" != x; then
34484	if  test "x$HAS_GOOD_CCACHE" = x; then
34485		CCACHE_STATUS="installed, but disabled (version older than 3.1.4)"
34486		CCACHE_HELP_MSG="You have ccache installed, but it is a version prior to 3.1.4. Try upgrading."
34487	else
34488		CCACHE_STATUS="installed and in use"
34489	fi
34490else
34491	if test "x$GCC" = xyes; then
34492		CCACHE_STATUS="not installed (consider installing)"
34493		CCACHE_HELP_MSG="You do not have ccache installed. Try installing it."
34494	else
34495		CCACHE_STATUS="not available for your system"
34496	fi
34497fi
34498
34499printf "\n"
34500printf "====================================================\n"
34501printf "A new configuration has been successfully created in\n"
34502printf "$OUTPUT_ROOT\n"
34503if test "x$CONFIGURE_COMMAND_LINE" != x; then
34504	printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
34505else
34506	printf "using default settings.\n"
34507fi
34508
34509printf "\n"
34510printf "Configuration summary:\n"
34511printf "* Debug level:    $DEBUG_LEVEL\n"
34512printf "* JDK variant:    $JDK_VARIANT\n"
34513printf "* JVM variants:   $with_jvm_variants\n"
34514printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
34515
34516printf "\n"
34517printf "Tools summary:\n"
34518if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
34519  printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
34520fi
34521printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
34522printf "* C Compiler:     $CC_VENDOR version $CC_VERSION (at $CC)\n"
34523printf "* C++ Compiler:   $CXX_VENDOR version $CXX_VERSION (at $CXX)\n"
34524
34525printf "\n"
34526printf "Build performance summary:\n"
34527printf "* Cores to use:   $JOBS\n"
34528printf "* Memory limit:   $MEMORY_SIZE MB\n"
34529printf "* ccache status:  $CCACHE_STATUS\n"
34530printf "\n"
34531
34532if test "x$CCACHE_HELP_MSG" != x && test "x$HIDE_PERFORMANCE_HINTS" = "xno"; then
34533	printf "Build performance tip: ccache gives a tremendous speedup for C++ recompilations.\n"
34534	printf "$CCACHE_HELP_MSG\n"
34535
34536    # Print a helpful message on how to acquire the necessary build dependency.
34537    # ccache is the help tag: freetyp2, cups, pulse, alsa etc
34538    MISSING_DEPENDENCY=ccache
34539    PKGHANDLER_COMMAND=
34540
34541    case $PKGHANDLER in
34542	apt-get)
34543                apt_help     $MISSING_DEPENDENCY ;;
34544    yum)
34545                yum_help     $MISSING_DEPENDENCY ;;
34546	port)
34547                port_help    $MISSING_DEPENDENCY ;;
34548	pkgutil)
34549                pkgutil_help $MISSING_DEPENDENCY ;;
34550	pkgadd)
34551                pkgadd_help  $MISSING_DEPENDENCY ;;
34552    * )
34553      break ;;
34554    esac
34555
34556    if test "x$PKGHANDLER_COMMAND" != x; then
34557        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
34558    fi
34559
34560	printf "$HELP_MSG\n"
34561	printf "\n"
34562fi
34563
34564if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
34565	printf "NOTE: You have requested to build more than one version of the JVM, which\n"
34566	printf "will result in longer build times.\n"
34567	printf "\n"
34568fi
34569
34570if test "x$FOUND_ALT_VARIABLES" != "x"; then
34571	printf "WARNING: You have old-style ALT_ environment variables set.\n"
34572	printf "These are not respected, and will be ignored. It is recommended\n"
34573	printf "that you clean your environment. The following variables are set:\n"
34574	printf "$FOUND_ALT_VARIABLES\n"
34575	printf "\n"
34576fi
34577
34578if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
34579	printf "WARNING: Your build output directory is not on a local disk.\n"
34580	printf "This will severely degrade build performance!\n"
34581	printf "It is recommended that you create an output directory on a local disk,\n"
34582	printf "and run the configure script again from that directory.\n"
34583	printf "\n"
34584fi
34585
34586if test "x$IS_RECONFIGURE" = "xyes"; then
34587	printf "WARNING: The result of this configuration has overridden an older\n"
34588	printf "configuration. You *should* run 'make clean' to make sure you get a\n"
34589	printf "proper build. Failure to do so might result in strange build problems.\n"
34590	printf "\n"
34591fi
34592
34593