generated-configure.sh revision 853:ac09e62d5e6b
1#! /bin/sh
2# Guess values for system-dependent variables and create Makefiles.
3# Generated by GNU Autoconf 2.69 for OpenJDK jdk8.
4#
5# Report bugs to <build-dev@openjdk.java.net>.
6#
7#
8# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
9#
10#
11# This configure script is free software; the Free Software Foundation
12# gives unlimited permission to copy, distribute and modify it.
13## -------------------- ##
14## M4sh Initialization. ##
15## -------------------- ##
16
17# Be more Bourne compatible
18DUALCASE=1; export DUALCASE # for MKS sh
19if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
20  emulate sh
21  NULLCMD=:
22  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
23  # is contrary to our usage.  Disable this feature.
24  alias -g '${1+"$@"}'='"$@"'
25  setopt NO_GLOB_SUBST
26else
27  case `(set -o) 2>/dev/null` in #(
28  *posix*) :
29    set -o posix ;; #(
30  *) :
31     ;;
32esac
33fi
34
35
36as_nl='
37'
38export as_nl
39# Printing a long string crashes Solaris 7 /usr/bin/printf.
40as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
41as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
42as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
43# Prefer a ksh shell builtin over an external printf program on Solaris,
44# but without wasting forks for bash or zsh.
45if test -z "$BASH_VERSION$ZSH_VERSION" \
46    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
47  as_echo='print -r --'
48  as_echo_n='print -rn --'
49elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
50  as_echo='printf %s\n'
51  as_echo_n='printf %s'
52else
53  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
54    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
55    as_echo_n='/usr/ucb/echo -n'
56  else
57    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
58    as_echo_n_body='eval
59      arg=$1;
60      case $arg in #(
61      *"$as_nl"*)
62	expr "X$arg" : "X\\(.*\\)$as_nl";
63	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
64      esac;
65      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
66    '
67    export as_echo_n_body
68    as_echo_n='sh -c $as_echo_n_body as_echo'
69  fi
70  export as_echo_body
71  as_echo='sh -c $as_echo_body as_echo'
72fi
73
74# The user is always right.
75if test "${PATH_SEPARATOR+set}" != set; then
76  PATH_SEPARATOR=:
77  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
78    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
79      PATH_SEPARATOR=';'
80  }
81fi
82
83
84# IFS
85# We need space, tab and new line, in precisely that order.  Quoting is
86# there to prevent editors from complaining about space-tab.
87# (If _AS_PATH_WALK were called with IFS unset, it would disable word
88# splitting by setting IFS to empty value.)
89IFS=" ""	$as_nl"
90
91# Find who we are.  Look in the path if we contain no directory separator.
92as_myself=
93case $0 in #((
94  *[\\/]* ) as_myself=$0 ;;
95  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
96for as_dir in $PATH
97do
98  IFS=$as_save_IFS
99  test -z "$as_dir" && as_dir=.
100    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
101  done
102IFS=$as_save_IFS
103
104     ;;
105esac
106# We did not find ourselves, most probably we were run as `sh COMMAND'
107# in which case we are not to be found in the path.
108if test "x$as_myself" = x; then
109  as_myself=$0
110fi
111if test ! -f "$as_myself"; then
112  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
113  exit 1
114fi
115
116# Unset variables that we do not need and which cause bugs (e.g. in
117# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
118# suppresses any "Segmentation fault" message there.  '((' could
119# trigger a bug in pdksh 5.2.14.
120for as_var in BASH_ENV ENV MAIL MAILPATH
121do eval test x\${$as_var+set} = xset \
122  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
123done
124PS1='$ '
125PS2='> '
126PS4='+ '
127
128# NLS nuisances.
129LC_ALL=C
130export LC_ALL
131LANGUAGE=C
132export LANGUAGE
133
134# CDPATH.
135(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
136
137# Use a proper internal environment variable to ensure we don't fall
138  # into an infinite loop, continuously re-executing ourselves.
139  if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
140    _as_can_reexec=no; export _as_can_reexec;
141    # We cannot yet assume a decent shell, so we have to provide a
142# neutralization value for shells without unset; and this also
143# works around shells that cannot unset nonexistent variables.
144# Preserve -v and -x to the replacement shell.
145BASH_ENV=/dev/null
146ENV=/dev/null
147(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
148case $- in # ((((
149  *v*x* | *x*v* ) as_opts=-vx ;;
150  *v* ) as_opts=-v ;;
151  *x* ) as_opts=-x ;;
152  * ) as_opts= ;;
153esac
154exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
155# Admittedly, this is quite paranoid, since all the known shells bail
156# out after a failed `exec'.
157$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
158as_fn_exit 255
159  fi
160  # We don't want this to propagate to other subprocesses.
161          { _as_can_reexec=; unset _as_can_reexec;}
162if test "x$CONFIG_SHELL" = x; then
163  as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
164  emulate sh
165  NULLCMD=:
166  # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
167  # is contrary to our usage.  Disable this feature.
168  alias -g '\${1+\"\$@\"}'='\"\$@\"'
169  setopt NO_GLOB_SUBST
170else
171  case \`(set -o) 2>/dev/null\` in #(
172  *posix*) :
173    set -o posix ;; #(
174  *) :
175     ;;
176esac
177fi
178"
179  as_required="as_fn_return () { (exit \$1); }
180as_fn_success () { as_fn_return 0; }
181as_fn_failure () { as_fn_return 1; }
182as_fn_ret_success () { return 0; }
183as_fn_ret_failure () { return 1; }
184
185exitcode=0
186as_fn_success || { exitcode=1; echo as_fn_success failed.; }
187as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
188as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
189as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
190if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
191
192else
193  exitcode=1; echo positional parameters were not saved.
194fi
195test x\$exitcode = x0 || exit 1
196test -x / || exit 1"
197  as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
198  as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
199  eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
200  test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
201test \$(( 1 + 1 )) = 2 || exit 1"
202  if (eval "$as_required") 2>/dev/null; then :
203  as_have_required=yes
204else
205  as_have_required=no
206fi
207  if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
208
209else
210  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
211as_found=false
212for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
213do
214  IFS=$as_save_IFS
215  test -z "$as_dir" && as_dir=.
216  as_found=:
217  case $as_dir in #(
218	 /*)
219	   for as_base in sh bash ksh sh5; do
220	     # Try only shells that exist, to save several forks.
221	     as_shell=$as_dir/$as_base
222	     if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
223		    { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
224  CONFIG_SHELL=$as_shell as_have_required=yes
225		   if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
226  break 2
227fi
228fi
229	   done;;
230       esac
231  as_found=false
232done
233$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
234	      { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
235  CONFIG_SHELL=$SHELL as_have_required=yes
236fi; }
237IFS=$as_save_IFS
238
239
240      if test "x$CONFIG_SHELL" != x; then :
241  export CONFIG_SHELL
242             # We cannot yet assume a decent shell, so we have to provide a
243# neutralization value for shells without unset; and this also
244# works around shells that cannot unset nonexistent variables.
245# Preserve -v and -x to the replacement shell.
246BASH_ENV=/dev/null
247ENV=/dev/null
248(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
249case $- in # ((((
250  *v*x* | *x*v* ) as_opts=-vx ;;
251  *v* ) as_opts=-v ;;
252  *x* ) as_opts=-x ;;
253  * ) as_opts= ;;
254esac
255exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
256# Admittedly, this is quite paranoid, since all the known shells bail
257# out after a failed `exec'.
258$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
259exit 255
260fi
261
262    if test x$as_have_required = xno; then :
263  $as_echo "$0: This script requires a shell more modern than all"
264  $as_echo "$0: the shells that I found on your system."
265  if test x${ZSH_VERSION+set} = xset ; then
266    $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
267    $as_echo "$0: be upgraded to zsh 4.3.4 or later."
268  else
269    $as_echo "$0: Please tell bug-autoconf@gnu.org and
270$0: build-dev@openjdk.java.net about your system, including
271$0: any error possibly output before this message. Then
272$0: install a modern shell, or manually run the script
273$0: under such a shell if you do have one."
274  fi
275  exit 1
276fi
277fi
278fi
279SHELL=${CONFIG_SHELL-/bin/sh}
280export SHELL
281# Unset more variables known to interfere with behavior of common tools.
282CLICOLOR_FORCE= GREP_OPTIONS=
283unset CLICOLOR_FORCE GREP_OPTIONS
284
285## --------------------- ##
286## M4sh Shell Functions. ##
287## --------------------- ##
288# as_fn_unset VAR
289# ---------------
290# Portably unset VAR.
291as_fn_unset ()
292{
293  { eval $1=; unset $1;}
294}
295as_unset=as_fn_unset
296
297# as_fn_set_status STATUS
298# -----------------------
299# Set $? to STATUS, without forking.
300as_fn_set_status ()
301{
302  return $1
303} # as_fn_set_status
304
305# as_fn_exit STATUS
306# -----------------
307# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
308as_fn_exit ()
309{
310  set +e
311  as_fn_set_status $1
312  exit $1
313} # as_fn_exit
314
315# as_fn_mkdir_p
316# -------------
317# Create "$as_dir" as a directory, including parents if necessary.
318as_fn_mkdir_p ()
319{
320
321  case $as_dir in #(
322  -*) as_dir=./$as_dir;;
323  esac
324  test -d "$as_dir" || eval $as_mkdir_p || {
325    as_dirs=
326    while :; do
327      case $as_dir in #(
328      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
329      *) as_qdir=$as_dir;;
330      esac
331      as_dirs="'$as_qdir' $as_dirs"
332      as_dir=`$as_dirname -- "$as_dir" ||
333$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
334	 X"$as_dir" : 'X\(//\)[^/]' \| \
335	 X"$as_dir" : 'X\(//\)$' \| \
336	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
337$as_echo X"$as_dir" |
338    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
339	    s//\1/
340	    q
341	  }
342	  /^X\(\/\/\)[^/].*/{
343	    s//\1/
344	    q
345	  }
346	  /^X\(\/\/\)$/{
347	    s//\1/
348	    q
349	  }
350	  /^X\(\/\).*/{
351	    s//\1/
352	    q
353	  }
354	  s/.*/./; q'`
355      test -d "$as_dir" && break
356    done
357    test -z "$as_dirs" || eval "mkdir $as_dirs"
358  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
359
360
361} # as_fn_mkdir_p
362
363# as_fn_executable_p FILE
364# -----------------------
365# Test if FILE is an executable regular file.
366as_fn_executable_p ()
367{
368  test -f "$1" && test -x "$1"
369} # as_fn_executable_p
370# as_fn_append VAR VALUE
371# ----------------------
372# Append the text in VALUE to the end of the definition contained in VAR. Take
373# advantage of any shell optimizations that allow amortized linear growth over
374# repeated appends, instead of the typical quadratic growth present in naive
375# implementations.
376if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
377  eval 'as_fn_append ()
378  {
379    eval $1+=\$2
380  }'
381else
382  as_fn_append ()
383  {
384    eval $1=\$$1\$2
385  }
386fi # as_fn_append
387
388# as_fn_arith ARG...
389# ------------------
390# Perform arithmetic evaluation on the ARGs, and store the result in the
391# global $as_val. Take advantage of shells that can avoid forks. The arguments
392# must be portable across $(()) and expr.
393if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
394  eval 'as_fn_arith ()
395  {
396    as_val=$(( $* ))
397  }'
398else
399  as_fn_arith ()
400  {
401    as_val=`expr "$@" || test $? -eq 1`
402  }
403fi # as_fn_arith
404
405
406# as_fn_error STATUS ERROR [LINENO LOG_FD]
407# ----------------------------------------
408# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
409# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
410# script with STATUS, using 1 if that was 0.
411as_fn_error ()
412{
413  as_status=$1; test $as_status -eq 0 && as_status=1
414  if test "$4"; then
415    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
416    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
417  fi
418  $as_echo "$as_me: error: $2" >&2
419  as_fn_exit $as_status
420} # as_fn_error
421
422if expr a : '\(a\)' >/dev/null 2>&1 &&
423   test "X`expr 00001 : '.*\(...\)'`" = X001; then
424  as_expr=expr
425else
426  as_expr=false
427fi
428
429if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
430  as_basename=basename
431else
432  as_basename=false
433fi
434
435if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
436  as_dirname=dirname
437else
438  as_dirname=false
439fi
440
441as_me=`$as_basename -- "$0" ||
442$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
443	 X"$0" : 'X\(//\)$' \| \
444	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
445$as_echo X/"$0" |
446    sed '/^.*\/\([^/][^/]*\)\/*$/{
447	    s//\1/
448	    q
449	  }
450	  /^X\/\(\/\/\)$/{
451	    s//\1/
452	    q
453	  }
454	  /^X\/\(\/\).*/{
455	    s//\1/
456	    q
457	  }
458	  s/.*/./; q'`
459
460# Avoid depending upon Character Ranges.
461as_cr_letters='abcdefghijklmnopqrstuvwxyz'
462as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
463as_cr_Letters=$as_cr_letters$as_cr_LETTERS
464as_cr_digits='0123456789'
465as_cr_alnum=$as_cr_Letters$as_cr_digits
466
467
468  as_lineno_1=$LINENO as_lineno_1a=$LINENO
469  as_lineno_2=$LINENO as_lineno_2a=$LINENO
470  eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
471  test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
472  # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
473  sed -n '
474    p
475    /[$]LINENO/=
476  ' <$as_myself |
477    sed '
478      s/[$]LINENO.*/&-/
479      t lineno
480      b
481      :lineno
482      N
483      :loop
484      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
485      t loop
486      s/-\n.*//
487    ' >$as_me.lineno &&
488  chmod +x "$as_me.lineno" ||
489    { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
490
491  # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
492  # already done that, so ensure we don't try to do so again and fall
493  # in an infinite loop.  This has already happened in practice.
494  _as_can_reexec=no; export _as_can_reexec
495  # Don't try to exec as it changes $[0], causing all sort of problems
496  # (the dirname of $[0] is not the place where we might find the
497  # original and so on.  Autoconf is especially sensitive to this).
498  . "./$as_me.lineno"
499  # Exit status is that of the last command.
500  exit
501}
502
503ECHO_C= ECHO_N= ECHO_T=
504case `echo -n x` in #(((((
505-n*)
506  case `echo 'xy\c'` in
507  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
508  xy)  ECHO_C='\c';;
509  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
510       ECHO_T='	';;
511  esac;;
512*)
513  ECHO_N='-n';;
514esac
515
516rm -f conf$$ conf$$.exe conf$$.file
517if test -d conf$$.dir; then
518  rm -f conf$$.dir/conf$$.file
519else
520  rm -f conf$$.dir
521  mkdir conf$$.dir 2>/dev/null
522fi
523if (echo >conf$$.file) 2>/dev/null; then
524  if ln -s conf$$.file conf$$ 2>/dev/null; then
525    as_ln_s='ln -s'
526    # ... but there are two gotchas:
527    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
528    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
529    # In both cases, we have to default to `cp -pR'.
530    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
531      as_ln_s='cp -pR'
532  elif ln conf$$.file conf$$ 2>/dev/null; then
533    as_ln_s=ln
534  else
535    as_ln_s='cp -pR'
536  fi
537else
538  as_ln_s='cp -pR'
539fi
540rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
541rmdir conf$$.dir 2>/dev/null
542
543if mkdir -p . 2>/dev/null; then
544  as_mkdir_p='mkdir -p "$as_dir"'
545else
546  test -d ./-p && rmdir ./-p
547  as_mkdir_p=false
548fi
549
550as_test_x='test -x'
551as_executable_p=as_fn_executable_p
552
553# Sed expression to map a string onto a valid CPP name.
554as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
555
556# Sed expression to map a string onto a valid variable name.
557as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
558
559
560test -n "$DJDIR" || exec 7<&0 </dev/null
561exec 6>&1
562
563# Name of the host.
564# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
565# so uname gets run too.
566ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
567
568#
569# Initializations.
570#
571ac_default_prefix=/usr/local
572ac_clean_files=
573ac_config_libobj_dir=.
574LIBOBJS=
575cross_compiling=no
576subdirs=
577MFLAGS=
578MAKEFLAGS=
579
580# Identity of this package.
581PACKAGE_NAME='OpenJDK'
582PACKAGE_TARNAME='openjdk'
583PACKAGE_VERSION='jdk8'
584PACKAGE_STRING='OpenJDK jdk8'
585PACKAGE_BUGREPORT='build-dev@openjdk.java.net'
586PACKAGE_URL='http://openjdk.java.net'
587
588# Factoring default headers for most tests.
589ac_includes_default="\
590#include <stdio.h>
591#ifdef HAVE_SYS_TYPES_H
592# include <sys/types.h>
593#endif
594#ifdef HAVE_SYS_STAT_H
595# include <sys/stat.h>
596#endif
597#ifdef STDC_HEADERS
598# include <stdlib.h>
599# include <stddef.h>
600#else
601# ifdef HAVE_STDLIB_H
602#  include <stdlib.h>
603# endif
604#endif
605#ifdef HAVE_STRING_H
606# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
607#  include <memory.h>
608# endif
609# include <string.h>
610#endif
611#ifdef HAVE_STRINGS_H
612# include <strings.h>
613#endif
614#ifdef HAVE_INTTYPES_H
615# include <inttypes.h>
616#endif
617#ifdef HAVE_STDINT_H
618# include <stdint.h>
619#endif
620#ifdef HAVE_UNISTD_H
621# include <unistd.h>
622#endif"
623
624ac_subst_vars='LTLIBOBJS
625LIBOBJS
626CCACHE
627USE_PRECOMPILED_HEADER
628SJAVAC_SERVER_DIR
629ENABLE_SJAVAC
630SJAVAC_SERVER_JAVA
631JOBS
632MEMORY_SIZE
633NUM_CORES
634ENABLE_INTREE_EC
635SALIB_NAME
636HOTSPOT_MAKE_ARGS
637FIXPATH
638LIBCXX
639LLVM_LIBS
640LLVM_LDFLAGS
641LLVM_CFLAGS
642LLVM_CONFIG
643LIBFFI_LIBS
644LIBFFI_CFLAGS
645STATIC_CXX_SETTING
646LIBDL
647LIBM
648LIBZIP_CAN_USE_MMAP
649USE_EXTERNAL_LIBZ
650USE_EXTERNAL_LIBGIF
651USE_EXTERNAL_LIBJPEG
652ALSA_LIBS
653ALSA_CFLAGS
654FREETYPE2_LIB_PATH
655USING_SYSTEM_FT_LIB
656FREETYPE2_LIBS
657FREETYPE2_CFLAGS
658CUPS_CFLAGS
659OPENWIN_HOME
660X_EXTRA_LIBS
661X_LIBS
662X_PRE_LIBS
663X_CFLAGS
664XMKMF
665CXXFLAGS_DEBUG_SYMBOLS
666CFLAGS_DEBUG_SYMBOLS
667ZIP_DEBUGINFO_FILES
668ENABLE_DEBUG_SYMBOLS
669COMPILER_SUPPORTS_TARGET_BITS_FLAG
670ZERO_ARCHFLAG
671LDFLAGS_CXX_JDK
672LDFLAGS_JDKEXE_SUFFIX
673LDFLAGS_JDKLIB_SUFFIX
674LDFLAGS_JDKEXE
675LDFLAGS_JDKLIB
676CXXFLAGS_JDKEXE
677CXXFLAGS_JDKLIB
678CFLAGS_JDKEXE
679CFLAGS_JDKLIB
680MACOSX_VERSION_MIN
681PACKAGE_PATH
682LEGACY_EXTRA_LDFLAGS
683LEGACY_EXTRA_CXXFLAGS
684LEGACY_EXTRA_CFLAGS
685CXX_FLAG_DEPS
686C_FLAG_DEPS
687CXX_O_FLAG_NONE
688CXX_O_FLAG_NORM
689CXX_O_FLAG_HI
690CXX_O_FLAG_HIGHEST
691C_O_FLAG_NONE
692C_O_FLAG_NORM
693C_O_FLAG_HI
694C_O_FLAG_HIGHEST
695POST_MCS_CMD
696POST_STRIP_CMD
697SET_EXECUTABLE_ORIGIN
698SET_SHARED_LIBRARY_ORIGIN
699CXX_FLAG_REORDER
700C_FLAG_REORDER
701SET_SHARED_LIBRARY_MAPFILE
702SET_SHARED_LIBRARY_NAME
703SHARED_LIBRARY_FLAGS
704EXE_SUFFIX
705STATIC_LIBRARY_SUFFIX
706SHARED_LIBRARY_SUFFIX
707LIBRARY_PREFIX
708STATIC_LIBRARY
709SHARED_LIBRARY
710OBJ_SUFFIX
711COMPILER_NAME
712JT_HOME
713JTREGEXE
714LIPO
715ac_ct_OBJDUMP
716OBJDUMP
717ac_ct_OBJCOPY
718OBJCOPY
719MCS
720STRIP
721GNM
722NM
723AS
724CXXCPP
725CPP
726COMPILER_TYPE
727RC_FLAGS
728DUMPBIN
729WINAR
730HOTSPOT_RC
731HOTSPOT_MT
732RC
733MT
734WINLD
735HOTSPOT_LD
736HOTSPOT_CXX
737ARFLAGS
738AR
739LDEXECXX
740LDCXX
741LDEXE
742LD
743ac_ct_OBJC
744OBJCFLAGS
745OBJC
746ac_ct_CXX
747CXXFLAGS
748CXX
749ac_ct_PROPER_COMPILER_CXX
750PROPER_COMPILER_CXX
751POTENTIAL_CXX
752TOOLS_DIR_CXX
753OBJEXT
754EXEEXT
755ac_ct_CC
756CPPFLAGS
757LDFLAGS
758CFLAGS
759CC
760ac_ct_PROPER_COMPILER_CC
761PROPER_COMPILER_CC
762POTENTIAL_CC
763TOOLS_DIR_CC
764BUILD_LD
765BUILD_CXX
766BUILD_CC
767MSVCR_DLL
768VS_PATH
769VS_LIB
770VS_INCLUDE
771CYGWIN_LINK
772AR_OUT_OPTION
773LD_OUT_OPTION
774EXE_OUT_OPTION
775CC_OUT_OPTION
776BUILD_HOTSPOT
777HOTSPOT_DIST
778BUILD_OUTPUT
779OVERRIDE_SRC_ROOT
780ADD_SRC_ROOT
781JDK_TOPDIR
782NASHORN_TOPDIR
783HOTSPOT_TOPDIR
784JAXWS_TOPDIR
785JAXP_TOPDIR
786CORBA_TOPDIR
787LANGTOOLS_TOPDIR
788BOOT_JDK_JVMARGS
789JAVAC_FLAGS
790BOOT_JDK_SOURCETARGET
791BOOT_JDK
792BOOT_TOOLSJAR
793BOOT_RTJAR
794JAVA_CHECK
795JAVAC_CHECK
796COOKED_BUILD_NUMBER
797JDK_VERSION
798COPYRIGHT_YEAR
799MACOSX_BUNDLE_ID_BASE
800MACOSX_BUNDLE_NAME_BASE
801COMPANY_NAME
802JDK_RC_PLATFORM_NAME
803PRODUCT_SUFFIX
804PRODUCT_NAME
805LAUNCHER_NAME
806MILESTONE
807JDK_BUILD_NUMBER
808JDK_UPDATE_VERSION
809JDK_MICRO_VERSION
810JDK_MINOR_VERSION
811JDK_MAJOR_VERSION
812USER_RELEASE_SUFFIX
813COMPRESS_JARS
814UNLIMITED_CRYPTO
815CACERTS_FILE
816TEST_IN_BUILD
817BUILD_HEADLESS
818SUPPORT_HEADFUL
819SUPPORT_HEADLESS
820BDEPS_FTP
821BDEPS_UNZIP
822OS_VERSION_MICRO
823OS_VERSION_MINOR
824OS_VERSION_MAJOR
825PKG_CONFIG
826CODESIGN
827DSYMUTIL
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_user_release_suffix
1021with_build_number
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_dxsdk
1037with_dxsdk_lib
1038with_dxsdk_include
1039with_jtreg
1040with_extra_cflags
1041with_extra_cxxflags
1042with_extra_ldflags
1043enable_debug_symbols
1044enable_zip_debug_info
1045enable_macosx_runtime_support
1046with_x
1047with_cups
1048with_cups_include
1049with_freetype
1050with_alsa
1051with_alsa_include
1052with_alsa_lib
1053with_giflib
1054with_zlib
1055with_stdc__lib
1056with_num_cores
1057with_memory_size
1058with_jobs
1059with_sjavac_server_java
1060enable_sjavac
1061enable_precompiled_headers
1062enable_ccache
1063with_ccache_dir
1064'
1065      ac_precious_vars='build_alias
1066host_alias
1067target_alias
1068PKG_CONFIG
1069CC
1070CFLAGS
1071LDFLAGS
1072LIBS
1073CPPFLAGS
1074CXX
1075CXXFLAGS
1076CCC
1077OBJC
1078OBJCFLAGS
1079CPP
1080CXXCPP
1081XMKMF
1082FREETYPE2_CFLAGS
1083FREETYPE2_LIBS
1084ALSA_CFLAGS
1085ALSA_LIBS
1086LIBFFI_CFLAGS
1087LIBFFI_LIBS'
1088
1089
1090# Initialize some variables set by options.
1091ac_init_help=
1092ac_init_version=false
1093ac_unrecognized_opts=
1094ac_unrecognized_sep=
1095# The variables have the same names as the options, with
1096# dashes changed to underlines.
1097cache_file=/dev/null
1098exec_prefix=NONE
1099no_create=
1100no_recursion=
1101prefix=NONE
1102program_prefix=NONE
1103program_suffix=NONE
1104program_transform_name=s,x,x,
1105silent=
1106site=
1107srcdir=
1108verbose=
1109x_includes=NONE
1110x_libraries=NONE
1111
1112# Installation directory options.
1113# These are left unexpanded so users can "make install exec_prefix=/foo"
1114# and all the variables that are supposed to be based on exec_prefix
1115# by default will actually change.
1116# Use braces instead of parens because sh, perl, etc. also accept them.
1117# (The list follows the same order as the GNU Coding Standards.)
1118bindir='${exec_prefix}/bin'
1119sbindir='${exec_prefix}/sbin'
1120libexecdir='${exec_prefix}/libexec'
1121datarootdir='${prefix}/share'
1122datadir='${datarootdir}'
1123sysconfdir='${prefix}/etc'
1124sharedstatedir='${prefix}/com'
1125localstatedir='${prefix}/var'
1126includedir='${prefix}/include'
1127oldincludedir='/usr/include'
1128docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1129infodir='${datarootdir}/info'
1130htmldir='${docdir}'
1131dvidir='${docdir}'
1132pdfdir='${docdir}'
1133psdir='${docdir}'
1134libdir='${exec_prefix}/lib'
1135localedir='${datarootdir}/locale'
1136mandir='${datarootdir}/man'
1137
1138ac_prev=
1139ac_dashdash=
1140for ac_option
1141do
1142  # If the previous option needs an argument, assign it.
1143  if test -n "$ac_prev"; then
1144    eval $ac_prev=\$ac_option
1145    ac_prev=
1146    continue
1147  fi
1148
1149  case $ac_option in
1150  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1151  *=)   ac_optarg= ;;
1152  *)    ac_optarg=yes ;;
1153  esac
1154
1155  # Accept the important Cygnus configure options, so we can diagnose typos.
1156
1157  case $ac_dashdash$ac_option in
1158  --)
1159    ac_dashdash=yes ;;
1160
1161  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1162    ac_prev=bindir ;;
1163  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1164    bindir=$ac_optarg ;;
1165
1166  -build | --build | --buil | --bui | --bu)
1167    ac_prev=build_alias ;;
1168  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1169    build_alias=$ac_optarg ;;
1170
1171  -cache-file | --cache-file | --cache-fil | --cache-fi \
1172  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1173    ac_prev=cache_file ;;
1174  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1175  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1176    cache_file=$ac_optarg ;;
1177
1178  --config-cache | -C)
1179    cache_file=config.cache ;;
1180
1181  -datadir | --datadir | --datadi | --datad)
1182    ac_prev=datadir ;;
1183  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1184    datadir=$ac_optarg ;;
1185
1186  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1187  | --dataroo | --dataro | --datar)
1188    ac_prev=datarootdir ;;
1189  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1190  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1191    datarootdir=$ac_optarg ;;
1192
1193  -disable-* | --disable-*)
1194    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1195    # Reject names that are not valid shell variable names.
1196    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1197      as_fn_error $? "invalid feature name: $ac_useropt"
1198    ac_useropt_orig=$ac_useropt
1199    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1200    case $ac_user_opts in
1201      *"
1202"enable_$ac_useropt"
1203"*) ;;
1204      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1205	 ac_unrecognized_sep=', ';;
1206    esac
1207    eval enable_$ac_useropt=no ;;
1208
1209  -docdir | --docdir | --docdi | --doc | --do)
1210    ac_prev=docdir ;;
1211  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1212    docdir=$ac_optarg ;;
1213
1214  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1215    ac_prev=dvidir ;;
1216  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1217    dvidir=$ac_optarg ;;
1218
1219  -enable-* | --enable-*)
1220    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1221    # Reject names that are not valid shell variable names.
1222    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1223      as_fn_error $? "invalid feature name: $ac_useropt"
1224    ac_useropt_orig=$ac_useropt
1225    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1226    case $ac_user_opts in
1227      *"
1228"enable_$ac_useropt"
1229"*) ;;
1230      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1231	 ac_unrecognized_sep=', ';;
1232    esac
1233    eval enable_$ac_useropt=\$ac_optarg ;;
1234
1235  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1236  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1237  | --exec | --exe | --ex)
1238    ac_prev=exec_prefix ;;
1239  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1240  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1241  | --exec=* | --exe=* | --ex=*)
1242    exec_prefix=$ac_optarg ;;
1243
1244  -gas | --gas | --ga | --g)
1245    # Obsolete; use --with-gas.
1246    with_gas=yes ;;
1247
1248  -help | --help | --hel | --he | -h)
1249    ac_init_help=long ;;
1250  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1251    ac_init_help=recursive ;;
1252  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1253    ac_init_help=short ;;
1254
1255  -host | --host | --hos | --ho)
1256    ac_prev=host_alias ;;
1257  -host=* | --host=* | --hos=* | --ho=*)
1258    host_alias=$ac_optarg ;;
1259
1260  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1261    ac_prev=htmldir ;;
1262  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1263  | --ht=*)
1264    htmldir=$ac_optarg ;;
1265
1266  -includedir | --includedir | --includedi | --included | --include \
1267  | --includ | --inclu | --incl | --inc)
1268    ac_prev=includedir ;;
1269  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1270  | --includ=* | --inclu=* | --incl=* | --inc=*)
1271    includedir=$ac_optarg ;;
1272
1273  -infodir | --infodir | --infodi | --infod | --info | --inf)
1274    ac_prev=infodir ;;
1275  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1276    infodir=$ac_optarg ;;
1277
1278  -libdir | --libdir | --libdi | --libd)
1279    ac_prev=libdir ;;
1280  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1281    libdir=$ac_optarg ;;
1282
1283  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1284  | --libexe | --libex | --libe)
1285    ac_prev=libexecdir ;;
1286  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1287  | --libexe=* | --libex=* | --libe=*)
1288    libexecdir=$ac_optarg ;;
1289
1290  -localedir | --localedir | --localedi | --localed | --locale)
1291    ac_prev=localedir ;;
1292  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1293    localedir=$ac_optarg ;;
1294
1295  -localstatedir | --localstatedir | --localstatedi | --localstated \
1296  | --localstate | --localstat | --localsta | --localst | --locals)
1297    ac_prev=localstatedir ;;
1298  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1299  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1300    localstatedir=$ac_optarg ;;
1301
1302  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1303    ac_prev=mandir ;;
1304  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1305    mandir=$ac_optarg ;;
1306
1307  -nfp | --nfp | --nf)
1308    # Obsolete; use --without-fp.
1309    with_fp=no ;;
1310
1311  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1312  | --no-cr | --no-c | -n)
1313    no_create=yes ;;
1314
1315  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1316  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1317    no_recursion=yes ;;
1318
1319  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1320  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1321  | --oldin | --oldi | --old | --ol | --o)
1322    ac_prev=oldincludedir ;;
1323  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1324  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1325  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1326    oldincludedir=$ac_optarg ;;
1327
1328  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1329    ac_prev=prefix ;;
1330  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1331    prefix=$ac_optarg ;;
1332
1333  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1334  | --program-pre | --program-pr | --program-p)
1335    ac_prev=program_prefix ;;
1336  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1337  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1338    program_prefix=$ac_optarg ;;
1339
1340  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1341  | --program-suf | --program-su | --program-s)
1342    ac_prev=program_suffix ;;
1343  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1344  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1345    program_suffix=$ac_optarg ;;
1346
1347  -program-transform-name | --program-transform-name \
1348  | --program-transform-nam | --program-transform-na \
1349  | --program-transform-n | --program-transform- \
1350  | --program-transform | --program-transfor \
1351  | --program-transfo | --program-transf \
1352  | --program-trans | --program-tran \
1353  | --progr-tra | --program-tr | --program-t)
1354    ac_prev=program_transform_name ;;
1355  -program-transform-name=* | --program-transform-name=* \
1356  | --program-transform-nam=* | --program-transform-na=* \
1357  | --program-transform-n=* | --program-transform-=* \
1358  | --program-transform=* | --program-transfor=* \
1359  | --program-transfo=* | --program-transf=* \
1360  | --program-trans=* | --program-tran=* \
1361  | --progr-tra=* | --program-tr=* | --program-t=*)
1362    program_transform_name=$ac_optarg ;;
1363
1364  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1365    ac_prev=pdfdir ;;
1366  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1367    pdfdir=$ac_optarg ;;
1368
1369  -psdir | --psdir | --psdi | --psd | --ps)
1370    ac_prev=psdir ;;
1371  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1372    psdir=$ac_optarg ;;
1373
1374  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1375  | -silent | --silent | --silen | --sile | --sil)
1376    silent=yes ;;
1377
1378  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1379    ac_prev=sbindir ;;
1380  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1381  | --sbi=* | --sb=*)
1382    sbindir=$ac_optarg ;;
1383
1384  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1385  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1386  | --sharedst | --shareds | --shared | --share | --shar \
1387  | --sha | --sh)
1388    ac_prev=sharedstatedir ;;
1389  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1390  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1391  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1392  | --sha=* | --sh=*)
1393    sharedstatedir=$ac_optarg ;;
1394
1395  -site | --site | --sit)
1396    ac_prev=site ;;
1397  -site=* | --site=* | --sit=*)
1398    site=$ac_optarg ;;
1399
1400  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1401    ac_prev=srcdir ;;
1402  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1403    srcdir=$ac_optarg ;;
1404
1405  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1406  | --syscon | --sysco | --sysc | --sys | --sy)
1407    ac_prev=sysconfdir ;;
1408  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1409  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1410    sysconfdir=$ac_optarg ;;
1411
1412  -target | --target | --targe | --targ | --tar | --ta | --t)
1413    ac_prev=target_alias ;;
1414  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1415    target_alias=$ac_optarg ;;
1416
1417  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1418    verbose=yes ;;
1419
1420  -version | --version | --versio | --versi | --vers | -V)
1421    ac_init_version=: ;;
1422
1423  -with-* | --with-*)
1424    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1425    # Reject names that are not valid shell variable names.
1426    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1427      as_fn_error $? "invalid package name: $ac_useropt"
1428    ac_useropt_orig=$ac_useropt
1429    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1430    case $ac_user_opts in
1431      *"
1432"with_$ac_useropt"
1433"*) ;;
1434      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1435	 ac_unrecognized_sep=', ';;
1436    esac
1437    eval with_$ac_useropt=\$ac_optarg ;;
1438
1439  -without-* | --without-*)
1440    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1441    # Reject names that are not valid shell variable names.
1442    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1443      as_fn_error $? "invalid package name: $ac_useropt"
1444    ac_useropt_orig=$ac_useropt
1445    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1446    case $ac_user_opts in
1447      *"
1448"with_$ac_useropt"
1449"*) ;;
1450      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1451	 ac_unrecognized_sep=', ';;
1452    esac
1453    eval with_$ac_useropt=no ;;
1454
1455  --x)
1456    # Obsolete; use --with-x.
1457    with_x=yes ;;
1458
1459  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1460  | --x-incl | --x-inc | --x-in | --x-i)
1461    ac_prev=x_includes ;;
1462  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1463  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1464    x_includes=$ac_optarg ;;
1465
1466  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1467  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1468    ac_prev=x_libraries ;;
1469  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1470  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1471    x_libraries=$ac_optarg ;;
1472
1473  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1474Try \`$0 --help' for more information"
1475    ;;
1476
1477  *=*)
1478    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1479    # Reject names that are not valid shell variable names.
1480    case $ac_envvar in #(
1481      '' | [0-9]* | *[!_$as_cr_alnum]* )
1482      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1483    esac
1484    eval $ac_envvar=\$ac_optarg
1485    export $ac_envvar ;;
1486
1487  *)
1488    # FIXME: should be removed in autoconf 3.0.
1489    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1490    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1491      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1492    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1493    ;;
1494
1495  esac
1496done
1497
1498if test -n "$ac_prev"; then
1499  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1500  as_fn_error $? "missing argument to $ac_option"
1501fi
1502
1503if test -n "$ac_unrecognized_opts"; then
1504  case $enable_option_checking in
1505    no) ;;
1506    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1507    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1508  esac
1509fi
1510
1511# Check all directory arguments for consistency.
1512for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1513		datadir sysconfdir sharedstatedir localstatedir includedir \
1514		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1515		libdir localedir mandir
1516do
1517  eval ac_val=\$$ac_var
1518  # Remove trailing slashes.
1519  case $ac_val in
1520    */ )
1521      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1522      eval $ac_var=\$ac_val;;
1523  esac
1524  # Be sure to have absolute directory names.
1525  case $ac_val in
1526    [\\/$]* | ?:[\\/]* )  continue;;
1527    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1528  esac
1529  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1530done
1531
1532# There might be people who depend on the old broken behavior: `$host'
1533# used to hold the argument of --host etc.
1534# FIXME: To remove some day.
1535build=$build_alias
1536host=$host_alias
1537target=$target_alias
1538
1539# FIXME: To remove some day.
1540if test "x$host_alias" != x; then
1541  if test "x$build_alias" = x; then
1542    cross_compiling=maybe
1543  elif test "x$build_alias" != "x$host_alias"; then
1544    cross_compiling=yes
1545  fi
1546fi
1547
1548ac_tool_prefix=
1549test -n "$host_alias" && ac_tool_prefix=$host_alias-
1550
1551test "$silent" = yes && exec 6>/dev/null
1552
1553
1554ac_pwd=`pwd` && test -n "$ac_pwd" &&
1555ac_ls_di=`ls -di .` &&
1556ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1557  as_fn_error $? "working directory cannot be determined"
1558test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1559  as_fn_error $? "pwd does not report name of working directory"
1560
1561
1562# Find the source files, if location was not specified.
1563if test -z "$srcdir"; then
1564  ac_srcdir_defaulted=yes
1565  # Try the directory containing this script, then the parent directory.
1566  ac_confdir=`$as_dirname -- "$as_myself" ||
1567$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1568	 X"$as_myself" : 'X\(//\)[^/]' \| \
1569	 X"$as_myself" : 'X\(//\)$' \| \
1570	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1571$as_echo X"$as_myself" |
1572    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1573	    s//\1/
1574	    q
1575	  }
1576	  /^X\(\/\/\)[^/].*/{
1577	    s//\1/
1578	    q
1579	  }
1580	  /^X\(\/\/\)$/{
1581	    s//\1/
1582	    q
1583	  }
1584	  /^X\(\/\).*/{
1585	    s//\1/
1586	    q
1587	  }
1588	  s/.*/./; q'`
1589  srcdir=$ac_confdir
1590  if test ! -r "$srcdir/$ac_unique_file"; then
1591    srcdir=..
1592  fi
1593else
1594  ac_srcdir_defaulted=no
1595fi
1596if test ! -r "$srcdir/$ac_unique_file"; then
1597  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1598  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1599fi
1600ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1601ac_abs_confdir=`(
1602	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1603	pwd)`
1604# When building in place, set srcdir=.
1605if test "$ac_abs_confdir" = "$ac_pwd"; then
1606  srcdir=.
1607fi
1608# Remove unnecessary trailing slashes from srcdir.
1609# Double slashes in file names in object file debugging info
1610# mess up M-x gdb in Emacs.
1611case $srcdir in
1612*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1613esac
1614for ac_var in $ac_precious_vars; do
1615  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1616  eval ac_env_${ac_var}_value=\$${ac_var}
1617  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1618  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1619done
1620
1621#
1622# Report the --help message.
1623#
1624if test "$ac_init_help" = "long"; then
1625  # Omit some internal or obsolete options to make the list less imposing.
1626  # This message is too long to be a string in the A/UX 3.1 sh.
1627  cat <<_ACEOF
1628\`configure' configures OpenJDK jdk8 to adapt to many kinds of systems.
1629
1630Usage: $0 [OPTION]... [VAR=VALUE]...
1631
1632To assign environment variables (e.g., CC, CFLAGS...), specify them as
1633VAR=VALUE.  See below for descriptions of some of the useful variables.
1634
1635Defaults for the options are specified in brackets.
1636
1637Configuration:
1638  -h, --help              display this help and exit
1639      --help=short        display options specific to this package
1640      --help=recursive    display the short help of all the included packages
1641  -V, --version           display version information and exit
1642  -q, --quiet, --silent   do not print \`checking ...' messages
1643      --cache-file=FILE   cache test results in FILE [disabled]
1644  -C, --config-cache      alias for \`--cache-file=config.cache'
1645  -n, --no-create         do not create output files
1646      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1647
1648Installation directories:
1649  --prefix=PREFIX         install architecture-independent files in PREFIX
1650                          [$ac_default_prefix]
1651  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1652                          [PREFIX]
1653
1654By default, \`make install' will install all the files in
1655\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1656an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1657for instance \`--prefix=\$HOME'.
1658
1659For better control, use the options below.
1660
1661Fine tuning of the installation directories:
1662  --bindir=DIR            user executables [EPREFIX/bin]
1663  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1664  --libexecdir=DIR        program executables [EPREFIX/libexec]
1665  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1666  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1667  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1668  --libdir=DIR            object code libraries [EPREFIX/lib]
1669  --includedir=DIR        C header files [PREFIX/include]
1670  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1671  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1672  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1673  --infodir=DIR           info documentation [DATAROOTDIR/info]
1674  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1675  --mandir=DIR            man documentation [DATAROOTDIR/man]
1676  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1677  --htmldir=DIR           html documentation [DOCDIR]
1678  --dvidir=DIR            dvi documentation [DOCDIR]
1679  --pdfdir=DIR            pdf documentation [DOCDIR]
1680  --psdir=DIR             ps documentation [DOCDIR]
1681_ACEOF
1682
1683  cat <<\_ACEOF
1684
1685X features:
1686  --x-includes=DIR    X include files are in DIR
1687  --x-libraries=DIR   X library files are in DIR
1688
1689System types:
1690  --build=BUILD     configure for building on BUILD [guessed]
1691  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1692  --target=TARGET   configure for building compilers for TARGET [HOST]
1693_ACEOF
1694fi
1695
1696if test -n "$ac_init_help"; then
1697  case $ac_init_help in
1698     short | recursive ) echo "Configuration of OpenJDK jdk8:";;
1699   esac
1700  cat <<\_ACEOF
1701
1702Optional Features:
1703  --disable-option-checking  ignore unrecognized --enable/--with options
1704  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1705  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1706  --enable-openjdk-only   suppress building custom source even if present
1707                          [disabled]
1708  --enable-debug          set the debug level to fastdebug (shorthand for
1709                          --with-debug-level=fastdebug) [disabled]
1710  --disable-headful       disable building headful support (graphical UI
1711                          support) [enabled]
1712  --enable-hotspot-test-in-build
1713                          run the Queens test after Hotspot build [disabled]
1714  --enable-unlimited-crypto
1715                          Enable unlimited crypto policy [disabled]
1716  --disable-debug-symbols disable generation of debug symbols [enabled]
1717  --disable-zip-debug-info
1718                          disable zipping of debug-info files [enabled]
1719  --disable-macosx-runtime-support
1720                          disable the use of MacOSX Java runtime support
1721                          framework [enabled]
1722  --enable-sjavac         use sjavac to do fast incremental compiles
1723                          [disabled]
1724  --disable-precompiled-headers
1725                          disable using precompiled headers when compiling C++
1726                          [enabled]
1727  --disable-ccache        disable using ccache to speed up recompilations
1728                          [enabled]
1729
1730Optional Packages:
1731  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1732  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1733  --with-custom-make-dir  use this directory for custom build/make files
1734  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
1735                          support it), e.g. --with-target-bits=32 [guessed]
1736  --with-sys-root         pass this sys-root to the compilers and tools (for
1737                          cross-compiling)
1738  --with-tools-dir        search this directory for compilers and tools (for
1739                          cross-compiling)
1740  --with-devkit           use this directory as base for tools-dir and
1741                          sys-root (for cross-compiling)
1742  --with-jdk-variant      JDK variant to build (normal) [normal]
1743  --with-jvm-variants     JVM variants (separated by commas) to build (server,
1744                          client, minimal1, kernel, zero, zeroshark) [server]
1745  --with-debug-level      set the debug level (release, fastdebug, slowdebug)
1746                          [release]
1747  --with-conf-name        use this as the name of the configuration [generated
1748                          from important configuration options]
1749  --with-builddeps-conf   use this configuration file for the builddeps
1750  --with-builddeps-server download and use build dependencies from this server
1751                          url
1752  --with-builddeps-dir    store downloaded build dependencies here
1753                          [/localhome/builddeps]
1754  --with-builddeps-group  chgrp the downloaded build dependencies to this
1755                          group
1756  --with-cacerts-file     specify alternative cacerts file
1757  --with-milestone        Set milestone value for build [internal]
1758  --with-update-version   Set update version value for build [b00]
1759  --with-user-release-suffix
1760                          Add a custom string to the version string if build
1761                          number isn't set.[username_builddateb00]
1762  --with-build-number     Set build number value for build [b00]
1763  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
1764  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all
1765                          invocations of the Boot JDK, overriding the default
1766                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
1767                          -enableassertions"
1768  --with-add-source-root  for each and every source directory, look in this
1769                          additional source root for the same directory; if it
1770                          exists and have files in it, include it in the build
1771  --with-override-source-root
1772                          for each and every source directory, look in this
1773                          override source root for the same directory; if it
1774                          exists, use that directory instead and ignore the
1775                          directory in the original source root
1776  --with-adds-and-overrides
1777                          use the subdirs 'adds' and 'overrides' in the
1778                          specified directory as add-source-root and
1779                          override-source-root
1780  --with-override-langtools
1781                          use this langtools dir for the build
1782  --with-override-corba   use this corba dir for the build
1783  --with-override-jaxp    use this jaxp dir for the build
1784  --with-override-jaxws   use this jaxws dir for the build
1785  --with-override-hotspot use this hotspot dir for the build
1786  --with-override-nashorn use this nashorn dir for the build
1787  --with-override-jdk     use this jdk dir for the build
1788  --with-import-hotspot   import hotspot binaries from this jdk image or
1789                          hotspot build dist dir instead of building from
1790                          source
1791  --with-msvcr-dll        copy this msvcr100.dll into the built JDK (Windows
1792                          only) [probed]
1793  --with-dxsdk            Deprecated. Option is kept for backwards
1794                          compatibility and is ignored
1795  --with-dxsdk-lib        Deprecated. Option is kept for backwards
1796                          compatibility and is ignored
1797  --with-dxsdk-include    Deprecated. Option is kept for backwards
1798                          compatibility and is ignored
1799  --with-jtreg            Regression Test Harness [probed]
1800  --with-extra-cflags     extra flags to be used when compiling jdk c-files
1801  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
1802  --with-extra-ldflags    extra flags to be used when linking jdk
1803  --with-x                use the X Window System
1804  --with-cups             specify prefix directory for the cups package
1805                          (expecting the headers under PATH/include)
1806  --with-cups-include     specify directory for the cups include files
1807  --with-freetype         specify prefix directory for the freetype2 package
1808                          (expecting the libraries under PATH/lib and the
1809                          headers under PATH/include)
1810  --with-alsa             specify prefix directory for the alsa package
1811                          (expecting the libraries under PATH/lib and the
1812                          headers under PATH/include)
1813  --with-alsa-include     specify directory for the alsa include files
1814  --with-alsa-lib         specify directory for the alsa library
1815  --with-giflib           use giflib from build system or OpenJDK source
1816                          (system, bundled) [bundled]
1817  --with-zlib             use zlib from build system or OpenJDK source
1818                          (system, bundled) [bundled]
1819  --with-stdc++lib=<static>,<dynamic>,<default>
1820                          force linking of the C++ runtime on Linux to either
1821                          static or dynamic, default is static with dynamic as
1822                          fallback
1823  --with-num-cores        number of cores in the build system, e.g.
1824                          --with-num-cores=8 [probed]
1825  --with-memory-size      memory (in MB) available in the build system, e.g.
1826                          --with-memory-size=1024 [probed]
1827  --with-jobs             number of parallel jobs to let make run [calculated
1828                          based on cores and memory]
1829  --with-sjavac-server-java
1830                          use this java binary for running the sjavac
1831                          background server [Boot JDK java]
1832  --with-ccache-dir       where to store ccache files [~/.ccache]
1833
1834Some influential environment variables:
1835  PKG_CONFIG  path to pkg-config utility
1836  CC          C compiler command
1837  CFLAGS      C compiler flags
1838  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1839              nonstandard directory <lib dir>
1840  LIBS        libraries to pass to the linker, e.g. -l<library>
1841  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1842              you have headers in a nonstandard directory <include dir>
1843  CXX         C++ compiler command
1844  CXXFLAGS    C++ compiler flags
1845  OBJC        Objective C compiler command
1846  OBJCFLAGS   Objective C compiler flags
1847  CPP         C preprocessor
1848  CXXCPP      C++ preprocessor
1849  XMKMF       Path to xmkmf, Makefile generator for X Window System
1850  FREETYPE2_CFLAGS
1851              C compiler flags for FREETYPE2, overriding pkg-config
1852  FREETYPE2_LIBS
1853              linker flags for FREETYPE2, overriding pkg-config
1854  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
1855  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
1856  LIBFFI_CFLAGS
1857              C compiler flags for LIBFFI, overriding pkg-config
1858  LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
1859
1860Use these variables to override the choices made by `configure' or to help
1861it to find libraries and programs with nonstandard names/locations.
1862
1863Report bugs to <build-dev@openjdk.java.net>.
1864OpenJDK home page: <http://openjdk.java.net>.
1865_ACEOF
1866ac_status=$?
1867fi
1868
1869if test "$ac_init_help" = "recursive"; then
1870  # If there are subdirs, report their specific --help.
1871  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1872    test -d "$ac_dir" ||
1873      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1874      continue
1875    ac_builddir=.
1876
1877case "$ac_dir" in
1878.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1879*)
1880  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1881  # A ".." for each directory in $ac_dir_suffix.
1882  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1883  case $ac_top_builddir_sub in
1884  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1885  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1886  esac ;;
1887esac
1888ac_abs_top_builddir=$ac_pwd
1889ac_abs_builddir=$ac_pwd$ac_dir_suffix
1890# for backward compatibility:
1891ac_top_builddir=$ac_top_build_prefix
1892
1893case $srcdir in
1894  .)  # We are building in place.
1895    ac_srcdir=.
1896    ac_top_srcdir=$ac_top_builddir_sub
1897    ac_abs_top_srcdir=$ac_pwd ;;
1898  [\\/]* | ?:[\\/]* )  # Absolute name.
1899    ac_srcdir=$srcdir$ac_dir_suffix;
1900    ac_top_srcdir=$srcdir
1901    ac_abs_top_srcdir=$srcdir ;;
1902  *) # Relative name.
1903    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1904    ac_top_srcdir=$ac_top_build_prefix$srcdir
1905    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1906esac
1907ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1908
1909    cd "$ac_dir" || { ac_status=$?; continue; }
1910    # Check for guested configure.
1911    if test -f "$ac_srcdir/configure.gnu"; then
1912      echo &&
1913      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1914    elif test -f "$ac_srcdir/configure"; then
1915      echo &&
1916      $SHELL "$ac_srcdir/configure" --help=recursive
1917    else
1918      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1919    fi || ac_status=$?
1920    cd "$ac_pwd" || { ac_status=$?; break; }
1921  done
1922fi
1923
1924test -n "$ac_init_help" && exit $ac_status
1925if $ac_init_version; then
1926  cat <<\_ACEOF
1927OpenJDK configure jdk8
1928generated by GNU Autoconf 2.69
1929
1930Copyright (C) 2012 Free Software Foundation, Inc.
1931This configure script is free software; the Free Software Foundation
1932gives unlimited permission to copy, distribute and modify it.
1933_ACEOF
1934  exit
1935fi
1936
1937## ------------------------ ##
1938## Autoconf initialization. ##
1939## ------------------------ ##
1940
1941# ac_fn_c_try_compile LINENO
1942# --------------------------
1943# Try to compile conftest.$ac_ext, and return whether this succeeded.
1944ac_fn_c_try_compile ()
1945{
1946  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1947  rm -f conftest.$ac_objext
1948  if { { ac_try="$ac_compile"
1949case "(($ac_try" in
1950  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1951  *) ac_try_echo=$ac_try;;
1952esac
1953eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1954$as_echo "$ac_try_echo"; } >&5
1955  (eval "$ac_compile") 2>conftest.err
1956  ac_status=$?
1957  if test -s conftest.err; then
1958    grep -v '^ *+' conftest.err >conftest.er1
1959    cat conftest.er1 >&5
1960    mv -f conftest.er1 conftest.err
1961  fi
1962  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1963  test $ac_status = 0; } && {
1964	 test -z "$ac_c_werror_flag" ||
1965	 test ! -s conftest.err
1966       } && test -s conftest.$ac_objext; then :
1967  ac_retval=0
1968else
1969  $as_echo "$as_me: failed program was:" >&5
1970sed 's/^/| /' conftest.$ac_ext >&5
1971
1972	ac_retval=1
1973fi
1974  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1975  as_fn_set_status $ac_retval
1976
1977} # ac_fn_c_try_compile
1978
1979# ac_fn_cxx_try_compile LINENO
1980# ----------------------------
1981# Try to compile conftest.$ac_ext, and return whether this succeeded.
1982ac_fn_cxx_try_compile ()
1983{
1984  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1985  rm -f conftest.$ac_objext
1986  if { { ac_try="$ac_compile"
1987case "(($ac_try" in
1988  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1989  *) ac_try_echo=$ac_try;;
1990esac
1991eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1992$as_echo "$ac_try_echo"; } >&5
1993  (eval "$ac_compile") 2>conftest.err
1994  ac_status=$?
1995  if test -s conftest.err; then
1996    grep -v '^ *+' conftest.err >conftest.er1
1997    cat conftest.er1 >&5
1998    mv -f conftest.er1 conftest.err
1999  fi
2000  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2001  test $ac_status = 0; } && {
2002	 test -z "$ac_cxx_werror_flag" ||
2003	 test ! -s conftest.err
2004       } && test -s conftest.$ac_objext; then :
2005  ac_retval=0
2006else
2007  $as_echo "$as_me: failed program was:" >&5
2008sed 's/^/| /' conftest.$ac_ext >&5
2009
2010	ac_retval=1
2011fi
2012  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2013  as_fn_set_status $ac_retval
2014
2015} # ac_fn_cxx_try_compile
2016
2017# ac_fn_objc_try_compile LINENO
2018# -----------------------------
2019# Try to compile conftest.$ac_ext, and return whether this succeeded.
2020ac_fn_objc_try_compile ()
2021{
2022  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2023  rm -f conftest.$ac_objext
2024  if { { ac_try="$ac_compile"
2025case "(($ac_try" in
2026  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2027  *) ac_try_echo=$ac_try;;
2028esac
2029eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2030$as_echo "$ac_try_echo"; } >&5
2031  (eval "$ac_compile") 2>conftest.err
2032  ac_status=$?
2033  if test -s conftest.err; then
2034    grep -v '^ *+' conftest.err >conftest.er1
2035    cat conftest.er1 >&5
2036    mv -f conftest.er1 conftest.err
2037  fi
2038  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2039  test $ac_status = 0; } && {
2040	 test -z "$ac_objc_werror_flag" ||
2041	 test ! -s conftest.err
2042       } && test -s conftest.$ac_objext; then :
2043  ac_retval=0
2044else
2045  $as_echo "$as_me: failed program was:" >&5
2046sed 's/^/| /' conftest.$ac_ext >&5
2047
2048	ac_retval=1
2049fi
2050  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2051  as_fn_set_status $ac_retval
2052
2053} # ac_fn_objc_try_compile
2054
2055# ac_fn_c_try_cpp LINENO
2056# ----------------------
2057# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2058ac_fn_c_try_cpp ()
2059{
2060  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2061  if { { ac_try="$ac_cpp conftest.$ac_ext"
2062case "(($ac_try" in
2063  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2064  *) ac_try_echo=$ac_try;;
2065esac
2066eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2067$as_echo "$ac_try_echo"; } >&5
2068  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2069  ac_status=$?
2070  if test -s conftest.err; then
2071    grep -v '^ *+' conftest.err >conftest.er1
2072    cat conftest.er1 >&5
2073    mv -f conftest.er1 conftest.err
2074  fi
2075  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2076  test $ac_status = 0; } > conftest.i && {
2077	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2078	 test ! -s conftest.err
2079       }; then :
2080  ac_retval=0
2081else
2082  $as_echo "$as_me: failed program was:" >&5
2083sed 's/^/| /' conftest.$ac_ext >&5
2084
2085    ac_retval=1
2086fi
2087  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2088  as_fn_set_status $ac_retval
2089
2090} # ac_fn_c_try_cpp
2091
2092# ac_fn_cxx_try_cpp LINENO
2093# ------------------------
2094# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2095ac_fn_cxx_try_cpp ()
2096{
2097  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2098  if { { ac_try="$ac_cpp conftest.$ac_ext"
2099case "(($ac_try" in
2100  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2101  *) ac_try_echo=$ac_try;;
2102esac
2103eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2104$as_echo "$ac_try_echo"; } >&5
2105  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2106  ac_status=$?
2107  if test -s conftest.err; then
2108    grep -v '^ *+' conftest.err >conftest.er1
2109    cat conftest.er1 >&5
2110    mv -f conftest.er1 conftest.err
2111  fi
2112  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2113  test $ac_status = 0; } > conftest.i && {
2114	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2115	 test ! -s conftest.err
2116       }; then :
2117  ac_retval=0
2118else
2119  $as_echo "$as_me: failed program was:" >&5
2120sed 's/^/| /' conftest.$ac_ext >&5
2121
2122    ac_retval=1
2123fi
2124  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2125  as_fn_set_status $ac_retval
2126
2127} # ac_fn_cxx_try_cpp
2128
2129# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2130# ---------------------------------------------------------
2131# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2132# the include files in INCLUDES and setting the cache variable VAR
2133# accordingly.
2134ac_fn_cxx_check_header_mongrel ()
2135{
2136  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2137  if eval \${$3+:} false; then :
2138  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2139$as_echo_n "checking for $2... " >&6; }
2140if eval \${$3+:} false; then :
2141  $as_echo_n "(cached) " >&6
2142fi
2143eval ac_res=\$$3
2144	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2145$as_echo "$ac_res" >&6; }
2146else
2147  # Is the header compilable?
2148{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2149$as_echo_n "checking $2 usability... " >&6; }
2150cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2151/* end confdefs.h.  */
2152$4
2153#include <$2>
2154_ACEOF
2155if ac_fn_cxx_try_compile "$LINENO"; then :
2156  ac_header_compiler=yes
2157else
2158  ac_header_compiler=no
2159fi
2160rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2161{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2162$as_echo "$ac_header_compiler" >&6; }
2163
2164# Is the header present?
2165{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2166$as_echo_n "checking $2 presence... " >&6; }
2167cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2168/* end confdefs.h.  */
2169#include <$2>
2170_ACEOF
2171if ac_fn_cxx_try_cpp "$LINENO"; then :
2172  ac_header_preproc=yes
2173else
2174  ac_header_preproc=no
2175fi
2176rm -f conftest.err conftest.i conftest.$ac_ext
2177{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2178$as_echo "$ac_header_preproc" >&6; }
2179
2180# So?  What about this header?
2181case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2182  yes:no: )
2183    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2184$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2185    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2186$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2187    ;;
2188  no:yes:* )
2189    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2190$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2191    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2192$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2193    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2194$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2195    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2196$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2197    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2198$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2199( $as_echo "## ----------------------------------------- ##
2200## Report this to build-dev@openjdk.java.net ##
2201## ----------------------------------------- ##"
2202     ) | sed "s/^/$as_me: WARNING:     /" >&2
2203    ;;
2204esac
2205  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2206$as_echo_n "checking for $2... " >&6; }
2207if eval \${$3+:} false; then :
2208  $as_echo_n "(cached) " >&6
2209else
2210  eval "$3=\$ac_header_compiler"
2211fi
2212eval ac_res=\$$3
2213	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2214$as_echo "$ac_res" >&6; }
2215fi
2216  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2217
2218} # ac_fn_cxx_check_header_mongrel
2219
2220# ac_fn_cxx_try_run LINENO
2221# ------------------------
2222# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2223# that executables *can* be run.
2224ac_fn_cxx_try_run ()
2225{
2226  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2227  if { { ac_try="$ac_link"
2228case "(($ac_try" in
2229  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2230  *) ac_try_echo=$ac_try;;
2231esac
2232eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2233$as_echo "$ac_try_echo"; } >&5
2234  (eval "$ac_link") 2>&5
2235  ac_status=$?
2236  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2237  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2238  { { case "(($ac_try" in
2239  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2240  *) ac_try_echo=$ac_try;;
2241esac
2242eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2243$as_echo "$ac_try_echo"; } >&5
2244  (eval "$ac_try") 2>&5
2245  ac_status=$?
2246  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2247  test $ac_status = 0; }; }; then :
2248  ac_retval=0
2249else
2250  $as_echo "$as_me: program exited with status $ac_status" >&5
2251       $as_echo "$as_me: failed program was:" >&5
2252sed 's/^/| /' conftest.$ac_ext >&5
2253
2254       ac_retval=$ac_status
2255fi
2256  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2257  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2258  as_fn_set_status $ac_retval
2259
2260} # ac_fn_cxx_try_run
2261
2262# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2263# ---------------------------------------------------------
2264# Tests whether HEADER exists and can be compiled using the include files in
2265# INCLUDES, setting the cache variable VAR accordingly.
2266ac_fn_cxx_check_header_compile ()
2267{
2268  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2269  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2270$as_echo_n "checking for $2... " >&6; }
2271if eval \${$3+:} false; then :
2272  $as_echo_n "(cached) " >&6
2273else
2274  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2275/* end confdefs.h.  */
2276$4
2277#include <$2>
2278_ACEOF
2279if ac_fn_cxx_try_compile "$LINENO"; then :
2280  eval "$3=yes"
2281else
2282  eval "$3=no"
2283fi
2284rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2285fi
2286eval ac_res=\$$3
2287	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2288$as_echo "$ac_res" >&6; }
2289  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2290
2291} # ac_fn_cxx_check_header_compile
2292
2293# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2294# ----------------------------------------------
2295# Tries to find the compile-time value of EXPR in a program that includes
2296# INCLUDES, setting VAR accordingly. Returns whether the value could be
2297# computed
2298ac_fn_cxx_compute_int ()
2299{
2300  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2301  if test "$cross_compiling" = yes; then
2302    # Depending upon the size, compute the lo and hi bounds.
2303cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2304/* end confdefs.h.  */
2305$4
2306int
2307main ()
2308{
2309static int test_array [1 - 2 * !(($2) >= 0)];
2310test_array [0] = 0;
2311return test_array [0];
2312
2313  ;
2314  return 0;
2315}
2316_ACEOF
2317if ac_fn_cxx_try_compile "$LINENO"; then :
2318  ac_lo=0 ac_mid=0
2319  while :; do
2320    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2321/* end confdefs.h.  */
2322$4
2323int
2324main ()
2325{
2326static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2327test_array [0] = 0;
2328return test_array [0];
2329
2330  ;
2331  return 0;
2332}
2333_ACEOF
2334if ac_fn_cxx_try_compile "$LINENO"; then :
2335  ac_hi=$ac_mid; break
2336else
2337  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2338			if test $ac_lo -le $ac_mid; then
2339			  ac_lo= ac_hi=
2340			  break
2341			fi
2342			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2343fi
2344rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2345  done
2346else
2347  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2348/* end confdefs.h.  */
2349$4
2350int
2351main ()
2352{
2353static int test_array [1 - 2 * !(($2) < 0)];
2354test_array [0] = 0;
2355return test_array [0];
2356
2357  ;
2358  return 0;
2359}
2360_ACEOF
2361if ac_fn_cxx_try_compile "$LINENO"; then :
2362  ac_hi=-1 ac_mid=-1
2363  while :; do
2364    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2365/* end confdefs.h.  */
2366$4
2367int
2368main ()
2369{
2370static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2371test_array [0] = 0;
2372return test_array [0];
2373
2374  ;
2375  return 0;
2376}
2377_ACEOF
2378if ac_fn_cxx_try_compile "$LINENO"; then :
2379  ac_lo=$ac_mid; break
2380else
2381  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2382			if test $ac_mid -le $ac_hi; then
2383			  ac_lo= ac_hi=
2384			  break
2385			fi
2386			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2387fi
2388rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2389  done
2390else
2391  ac_lo= ac_hi=
2392fi
2393rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2394fi
2395rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2396# Binary search between lo and hi bounds.
2397while test "x$ac_lo" != "x$ac_hi"; do
2398  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2399  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2400/* end confdefs.h.  */
2401$4
2402int
2403main ()
2404{
2405static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2406test_array [0] = 0;
2407return test_array [0];
2408
2409  ;
2410  return 0;
2411}
2412_ACEOF
2413if ac_fn_cxx_try_compile "$LINENO"; then :
2414  ac_hi=$ac_mid
2415else
2416  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2417fi
2418rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2419done
2420case $ac_lo in #((
2421?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2422'') ac_retval=1 ;;
2423esac
2424  else
2425    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2426/* end confdefs.h.  */
2427$4
2428static long int longval () { return $2; }
2429static unsigned long int ulongval () { return $2; }
2430#include <stdio.h>
2431#include <stdlib.h>
2432int
2433main ()
2434{
2435
2436  FILE *f = fopen ("conftest.val", "w");
2437  if (! f)
2438    return 1;
2439  if (($2) < 0)
2440    {
2441      long int i = longval ();
2442      if (i != ($2))
2443	return 1;
2444      fprintf (f, "%ld", i);
2445    }
2446  else
2447    {
2448      unsigned long int i = ulongval ();
2449      if (i != ($2))
2450	return 1;
2451      fprintf (f, "%lu", i);
2452    }
2453  /* Do not output a trailing newline, as this causes \r\n confusion
2454     on some platforms.  */
2455  return ferror (f) || fclose (f) != 0;
2456
2457  ;
2458  return 0;
2459}
2460_ACEOF
2461if ac_fn_cxx_try_run "$LINENO"; then :
2462  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2463else
2464  ac_retval=1
2465fi
2466rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2467  conftest.$ac_objext conftest.beam conftest.$ac_ext
2468rm -f conftest.val
2469
2470  fi
2471  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2472  as_fn_set_status $ac_retval
2473
2474} # ac_fn_cxx_compute_int
2475
2476# ac_fn_cxx_try_link LINENO
2477# -------------------------
2478# Try to link conftest.$ac_ext, and return whether this succeeded.
2479ac_fn_cxx_try_link ()
2480{
2481  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2482  rm -f conftest.$ac_objext conftest$ac_exeext
2483  if { { ac_try="$ac_link"
2484case "(($ac_try" in
2485  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2486  *) ac_try_echo=$ac_try;;
2487esac
2488eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2489$as_echo "$ac_try_echo"; } >&5
2490  (eval "$ac_link") 2>conftest.err
2491  ac_status=$?
2492  if test -s conftest.err; then
2493    grep -v '^ *+' conftest.err >conftest.er1
2494    cat conftest.er1 >&5
2495    mv -f conftest.er1 conftest.err
2496  fi
2497  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2498  test $ac_status = 0; } && {
2499	 test -z "$ac_cxx_werror_flag" ||
2500	 test ! -s conftest.err
2501       } && test -s conftest$ac_exeext && {
2502	 test "$cross_compiling" = yes ||
2503	 test -x conftest$ac_exeext
2504       }; then :
2505  ac_retval=0
2506else
2507  $as_echo "$as_me: failed program was:" >&5
2508sed 's/^/| /' conftest.$ac_ext >&5
2509
2510	ac_retval=1
2511fi
2512  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2513  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2514  # interfere with the next link command; also delete a directory that is
2515  # left behind by Apple's compiler.  We do this before executing the actions.
2516  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2517  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2518  as_fn_set_status $ac_retval
2519
2520} # ac_fn_cxx_try_link
2521
2522# ac_fn_cxx_check_func LINENO FUNC VAR
2523# ------------------------------------
2524# Tests whether FUNC exists, setting the cache variable VAR accordingly
2525ac_fn_cxx_check_func ()
2526{
2527  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2528  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2529$as_echo_n "checking for $2... " >&6; }
2530if eval \${$3+:} false; then :
2531  $as_echo_n "(cached) " >&6
2532else
2533  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2534/* end confdefs.h.  */
2535/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2536   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2537#define $2 innocuous_$2
2538
2539/* System header to define __stub macros and hopefully few prototypes,
2540    which can conflict with char $2 (); below.
2541    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2542    <limits.h> exists even on freestanding compilers.  */
2543
2544#ifdef __STDC__
2545# include <limits.h>
2546#else
2547# include <assert.h>
2548#endif
2549
2550#undef $2
2551
2552/* Override any GCC internal prototype to avoid an error.
2553   Use char because int might match the return type of a GCC
2554   builtin and then its argument prototype would still apply.  */
2555#ifdef __cplusplus
2556extern "C"
2557#endif
2558char $2 ();
2559/* The GNU C library defines this for functions which it implements
2560    to always fail with ENOSYS.  Some functions are actually named
2561    something starting with __ and the normal name is an alias.  */
2562#if defined __stub_$2 || defined __stub___$2
2563choke me
2564#endif
2565
2566int
2567main ()
2568{
2569return $2 ();
2570  ;
2571  return 0;
2572}
2573_ACEOF
2574if ac_fn_cxx_try_link "$LINENO"; then :
2575  eval "$3=yes"
2576else
2577  eval "$3=no"
2578fi
2579rm -f core conftest.err conftest.$ac_objext \
2580    conftest$ac_exeext conftest.$ac_ext
2581fi
2582eval ac_res=\$$3
2583	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2584$as_echo "$ac_res" >&6; }
2585  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2586
2587} # ac_fn_cxx_check_func
2588
2589# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2590# -------------------------------------------------------
2591# Tests whether HEADER exists and can be compiled using the include files in
2592# INCLUDES, setting the cache variable VAR accordingly.
2593ac_fn_c_check_header_compile ()
2594{
2595  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2596  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2597$as_echo_n "checking for $2... " >&6; }
2598if eval \${$3+:} false; then :
2599  $as_echo_n "(cached) " >&6
2600else
2601  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2602/* end confdefs.h.  */
2603$4
2604#include <$2>
2605_ACEOF
2606if ac_fn_c_try_compile "$LINENO"; then :
2607  eval "$3=yes"
2608else
2609  eval "$3=no"
2610fi
2611rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2612fi
2613eval ac_res=\$$3
2614	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2615$as_echo "$ac_res" >&6; }
2616  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2617
2618} # ac_fn_c_check_header_compile
2619cat >config.log <<_ACEOF
2620This file contains any messages produced by compilers while
2621running configure, to aid debugging if configure makes a mistake.
2622
2623It was created by OpenJDK $as_me jdk8, which was
2624generated by GNU Autoconf 2.69.  Invocation command line was
2625
2626  $ $0 $@
2627
2628_ACEOF
2629exec 5>>config.log
2630{
2631cat <<_ASUNAME
2632## --------- ##
2633## Platform. ##
2634## --------- ##
2635
2636hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2637uname -m = `(uname -m) 2>/dev/null || echo unknown`
2638uname -r = `(uname -r) 2>/dev/null || echo unknown`
2639uname -s = `(uname -s) 2>/dev/null || echo unknown`
2640uname -v = `(uname -v) 2>/dev/null || echo unknown`
2641
2642/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2643/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2644
2645/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2646/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2647/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2648/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2649/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2650/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2651/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2652
2653_ASUNAME
2654
2655as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2656for as_dir in $PATH
2657do
2658  IFS=$as_save_IFS
2659  test -z "$as_dir" && as_dir=.
2660    $as_echo "PATH: $as_dir"
2661  done
2662IFS=$as_save_IFS
2663
2664} >&5
2665
2666cat >&5 <<_ACEOF
2667
2668
2669## ----------- ##
2670## Core tests. ##
2671## ----------- ##
2672
2673_ACEOF
2674
2675
2676# Keep a trace of the command line.
2677# Strip out --no-create and --no-recursion so they do not pile up.
2678# Strip out --silent because we don't want to record it for future runs.
2679# Also quote any args containing shell meta-characters.
2680# Make two passes to allow for proper duplicate-argument suppression.
2681ac_configure_args=
2682ac_configure_args0=
2683ac_configure_args1=
2684ac_must_keep_next=false
2685for ac_pass in 1 2
2686do
2687  for ac_arg
2688  do
2689    case $ac_arg in
2690    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2691    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2692    | -silent | --silent | --silen | --sile | --sil)
2693      continue ;;
2694    *\'*)
2695      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2696    esac
2697    case $ac_pass in
2698    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2699    2)
2700      as_fn_append ac_configure_args1 " '$ac_arg'"
2701      if test $ac_must_keep_next = true; then
2702	ac_must_keep_next=false # Got value, back to normal.
2703      else
2704	case $ac_arg in
2705	  *=* | --config-cache | -C | -disable-* | --disable-* \
2706	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2707	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2708	  | -with-* | --with-* | -without-* | --without-* | --x)
2709	    case "$ac_configure_args0 " in
2710	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2711	    esac
2712	    ;;
2713	  -* ) ac_must_keep_next=true ;;
2714	esac
2715      fi
2716      as_fn_append ac_configure_args " '$ac_arg'"
2717      ;;
2718    esac
2719  done
2720done
2721{ ac_configure_args0=; unset ac_configure_args0;}
2722{ ac_configure_args1=; unset ac_configure_args1;}
2723
2724# When interrupted or exit'd, cleanup temporary files, and complete
2725# config.log.  We remove comments because anyway the quotes in there
2726# would cause problems or look ugly.
2727# WARNING: Use '\'' to represent an apostrophe within the trap.
2728# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2729trap 'exit_status=$?
2730  # Save into config.log some information that might help in debugging.
2731  {
2732    echo
2733
2734    $as_echo "## ---------------- ##
2735## Cache variables. ##
2736## ---------------- ##"
2737    echo
2738    # The following way of writing the cache mishandles newlines in values,
2739(
2740  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2741    eval ac_val=\$$ac_var
2742    case $ac_val in #(
2743    *${as_nl}*)
2744      case $ac_var in #(
2745      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2746$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2747      esac
2748      case $ac_var in #(
2749      _ | IFS | as_nl) ;; #(
2750      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2751      *) { eval $ac_var=; unset $ac_var;} ;;
2752      esac ;;
2753    esac
2754  done
2755  (set) 2>&1 |
2756    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2757    *${as_nl}ac_space=\ *)
2758      sed -n \
2759	"s/'\''/'\''\\\\'\'''\''/g;
2760	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2761      ;; #(
2762    *)
2763      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2764      ;;
2765    esac |
2766    sort
2767)
2768    echo
2769
2770    $as_echo "## ----------------- ##
2771## Output variables. ##
2772## ----------------- ##"
2773    echo
2774    for ac_var in $ac_subst_vars
2775    do
2776      eval ac_val=\$$ac_var
2777      case $ac_val in
2778      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2779      esac
2780      $as_echo "$ac_var='\''$ac_val'\''"
2781    done | sort
2782    echo
2783
2784    if test -n "$ac_subst_files"; then
2785      $as_echo "## ------------------- ##
2786## File substitutions. ##
2787## ------------------- ##"
2788      echo
2789      for ac_var in $ac_subst_files
2790      do
2791	eval ac_val=\$$ac_var
2792	case $ac_val in
2793	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2794	esac
2795	$as_echo "$ac_var='\''$ac_val'\''"
2796      done | sort
2797      echo
2798    fi
2799
2800    if test -s confdefs.h; then
2801      $as_echo "## ----------- ##
2802## confdefs.h. ##
2803## ----------- ##"
2804      echo
2805      cat confdefs.h
2806      echo
2807    fi
2808    test "$ac_signal" != 0 &&
2809      $as_echo "$as_me: caught signal $ac_signal"
2810    $as_echo "$as_me: exit $exit_status"
2811  } >&5
2812  rm -f core *.core core.conftest.* &&
2813    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2814    exit $exit_status
2815' 0
2816for ac_signal in 1 2 13 15; do
2817  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2818done
2819ac_signal=0
2820
2821# confdefs.h avoids OS command line length limits that DEFS can exceed.
2822rm -f -r conftest* confdefs.h
2823
2824$as_echo "/* confdefs.h */" > confdefs.h
2825
2826# Predefined preprocessor variables.
2827
2828cat >>confdefs.h <<_ACEOF
2829#define PACKAGE_NAME "$PACKAGE_NAME"
2830_ACEOF
2831
2832cat >>confdefs.h <<_ACEOF
2833#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2834_ACEOF
2835
2836cat >>confdefs.h <<_ACEOF
2837#define PACKAGE_VERSION "$PACKAGE_VERSION"
2838_ACEOF
2839
2840cat >>confdefs.h <<_ACEOF
2841#define PACKAGE_STRING "$PACKAGE_STRING"
2842_ACEOF
2843
2844cat >>confdefs.h <<_ACEOF
2845#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2846_ACEOF
2847
2848cat >>confdefs.h <<_ACEOF
2849#define PACKAGE_URL "$PACKAGE_URL"
2850_ACEOF
2851
2852
2853# Let the site file select an alternate cache file if it wants to.
2854# Prefer an explicitly selected file to automatically selected ones.
2855ac_site_file1=NONE
2856ac_site_file2=NONE
2857if test -n "$CONFIG_SITE"; then
2858  # We do not want a PATH search for config.site.
2859  case $CONFIG_SITE in #((
2860    -*)  ac_site_file1=./$CONFIG_SITE;;
2861    */*) ac_site_file1=$CONFIG_SITE;;
2862    *)   ac_site_file1=./$CONFIG_SITE;;
2863  esac
2864elif test "x$prefix" != xNONE; then
2865  ac_site_file1=$prefix/share/config.site
2866  ac_site_file2=$prefix/etc/config.site
2867else
2868  ac_site_file1=$ac_default_prefix/share/config.site
2869  ac_site_file2=$ac_default_prefix/etc/config.site
2870fi
2871for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2872do
2873  test "x$ac_site_file" = xNONE && continue
2874  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2875    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2876$as_echo "$as_me: loading site script $ac_site_file" >&6;}
2877    sed 's/^/| /' "$ac_site_file" >&5
2878    . "$ac_site_file" \
2879      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2880$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2881as_fn_error $? "failed to load site script $ac_site_file
2882See \`config.log' for more details" "$LINENO" 5; }
2883  fi
2884done
2885
2886if test -r "$cache_file"; then
2887  # Some versions of bash will fail to source /dev/null (special files
2888  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
2889  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2890    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2891$as_echo "$as_me: loading cache $cache_file" >&6;}
2892    case $cache_file in
2893      [\\/]* | ?:[\\/]* ) . "$cache_file";;
2894      *)                      . "./$cache_file";;
2895    esac
2896  fi
2897else
2898  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2899$as_echo "$as_me: creating cache $cache_file" >&6;}
2900  >$cache_file
2901fi
2902
2903# Check that the precious variables saved in the cache have kept the same
2904# value.
2905ac_cache_corrupted=false
2906for ac_var in $ac_precious_vars; do
2907  eval ac_old_set=\$ac_cv_env_${ac_var}_set
2908  eval ac_new_set=\$ac_env_${ac_var}_set
2909  eval ac_old_val=\$ac_cv_env_${ac_var}_value
2910  eval ac_new_val=\$ac_env_${ac_var}_value
2911  case $ac_old_set,$ac_new_set in
2912    set,)
2913      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2914$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2915      ac_cache_corrupted=: ;;
2916    ,set)
2917      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2918$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2919      ac_cache_corrupted=: ;;
2920    ,);;
2921    *)
2922      if test "x$ac_old_val" != "x$ac_new_val"; then
2923	# differences in whitespace do not lead to failure.
2924	ac_old_val_w=`echo x $ac_old_val`
2925	ac_new_val_w=`echo x $ac_new_val`
2926	if test "$ac_old_val_w" != "$ac_new_val_w"; then
2927	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2928$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2929	  ac_cache_corrupted=:
2930	else
2931	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2932$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2933	  eval $ac_var=\$ac_old_val
2934	fi
2935	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
2936$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
2937	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
2938$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
2939      fi;;
2940  esac
2941  # Pass precious variables to config.status.
2942  if test "$ac_new_set" = set; then
2943    case $ac_new_val in
2944    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2945    *) ac_arg=$ac_var=$ac_new_val ;;
2946    esac
2947    case " $ac_configure_args " in
2948      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
2949      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2950    esac
2951  fi
2952done
2953if $ac_cache_corrupted; then
2954  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2955$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2956  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2957$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2958  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2959fi
2960## -------------------- ##
2961## Main body of script. ##
2962## -------------------- ##
2963
2964ac_ext=c
2965ac_cpp='$CPP $CPPFLAGS'
2966ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2967ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2968ac_compiler_gnu=$ac_cv_c_compiler_gnu
2969
2970
2971
2972ac_aux_dir=
2973for ac_dir in build-aux "$srcdir"/build-aux; do
2974  if test -f "$ac_dir/install-sh"; then
2975    ac_aux_dir=$ac_dir
2976    ac_install_sh="$ac_aux_dir/install-sh -c"
2977    break
2978  elif test -f "$ac_dir/install.sh"; then
2979    ac_aux_dir=$ac_dir
2980    ac_install_sh="$ac_aux_dir/install.sh -c"
2981    break
2982  elif test -f "$ac_dir/shtool"; then
2983    ac_aux_dir=$ac_dir
2984    ac_install_sh="$ac_aux_dir/shtool install -c"
2985    break
2986  fi
2987done
2988if test -z "$ac_aux_dir"; then
2989  as_fn_error $? "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5
2990fi
2991
2992# These three variables are undocumented and unsupported,
2993# and are intended to be withdrawn in a future Autoconf release.
2994# They can cause serious problems if a builder's source tree is in a directory
2995# whose full name contains unusual characters.
2996ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
2997ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
2998ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
2999
3000
3001# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3002
3003#
3004# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3005# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3006#
3007# This code is free software; you can redistribute it and/or modify it
3008# under the terms of the GNU General Public License version 2 only, as
3009# published by the Free Software Foundation.  Oracle designates this
3010# particular file as subject to the "Classpath" exception as provided
3011# by Oracle in the LICENSE file that accompanied this code.
3012#
3013# This code is distributed in the hope that it will be useful, but WITHOUT
3014# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3015# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3016# version 2 for more details (a copy is included in the LICENSE file that
3017# accompanied this code).
3018#
3019# You should have received a copy of the GNU General Public License version
3020# 2 along with this work; if not, write to the Free Software Foundation,
3021# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3022#
3023# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3024# or visit www.oracle.com if you need additional information or have any
3025# questions.
3026#
3027
3028#
3029# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
3030#
3031# This program is free software; you can redistribute it and/or modify
3032# it under the terms of the GNU General Public License as published by
3033# the Free Software Foundation; either version 2 of the License, or
3034# (at your option) any later version.
3035#
3036# This program is distributed in the hope that it will be useful, but
3037# WITHOUT ANY WARRANTY; without even the implied warranty of
3038# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3039# General Public License for more details.
3040#
3041# You should have received a copy of the GNU General Public License
3042# along with this program; if not, write to the Free Software
3043# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3044#
3045# As a special exception to the GNU General Public License, if you
3046# distribute this file as part of a program that contains a
3047# configuration script generated by Autoconf, you may include it under
3048# the same distribution terms that you use for the rest of that program.
3049
3050# PKG_PROG_PKG_CONFIG([MIN-VERSION])
3051# ----------------------------------
3052# PKG_PROG_PKG_CONFIG
3053
3054# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3055#
3056# Check to see whether a particular set of modules exists.  Similar
3057# to PKG_CHECK_MODULES(), but does not set variables or print errors.
3058#
3059#
3060# Similar to PKG_CHECK_MODULES, make sure that the first instance of
3061# this or PKG_CHECK_MODULES is called, or make sure to call
3062# PKG_CHECK_EXISTS manually
3063# --------------------------------------------------------------
3064
3065
3066
3067# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3068# ---------------------------------------------
3069# _PKG_CONFIG
3070
3071# _PKG_SHORT_ERRORS_SUPPORTED
3072# -----------------------------
3073# _PKG_SHORT_ERRORS_SUPPORTED
3074
3075
3076# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3077# [ACTION-IF-NOT-FOUND])
3078#
3079#
3080# Note that if there is a possibility the first call to
3081# PKG_CHECK_MODULES might not happen, you should be sure to include an
3082# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3083#
3084#
3085# --------------------------------------------------------------
3086# PKG_CHECK_MODULES
3087
3088
3089# Include these first...
3090#
3091# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
3092# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3093#
3094# This code is free software; you can redistribute it and/or modify it
3095# under the terms of the GNU General Public License version 2 only, as
3096# published by the Free Software Foundation.  Oracle designates this
3097# particular file as subject to the "Classpath" exception as provided
3098# by Oracle in the LICENSE file that accompanied this code.
3099#
3100# This code is distributed in the hope that it will be useful, but WITHOUT
3101# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3102# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3103# version 2 for more details (a copy is included in the LICENSE file that
3104# accompanied this code).
3105#
3106# You should have received a copy of the GNU General Public License version
3107# 2 along with this work; if not, write to the Free Software Foundation,
3108# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3109#
3110# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3111# or visit www.oracle.com if you need additional information or have any
3112# questions.
3113#
3114
3115# Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3116# If so, then append $1 to $2 \
3117# Also set JVM_ARG_OK to true/false depending on outcome.
3118
3119
3120# Appends a string to a path variable, only adding the : when needed.
3121
3122
3123# This will make sure the given variable points to a full and proper
3124# path. This means:
3125# 1) There will be no spaces in the path. On posix platforms,
3126#    spaces in the path will result in an error. On Windows,
3127#    the path will be rewritten using short-style to be space-free.
3128# 2) The path will be absolute, and it will be in unix-style (on
3129#     cygwin).
3130# $1: The name of the variable to fix
3131
3132
3133# This will make sure the given variable points to a executable
3134# with a full and proper path. This means:
3135# 1) There will be no spaces in the path. On posix platforms,
3136#    spaces in the path will result in an error. On Windows,
3137#    the path will be rewritten using short-style to be space-free.
3138# 2) The path will be absolute, and it will be in unix-style (on
3139#     cygwin).
3140# Any arguments given to the executable is preserved.
3141# If the input variable does not have a directory specification, then
3142# it need to be in the PATH.
3143# $1: The name of the variable to fix
3144
3145
3146
3147
3148# Register a --with argument but mark it as deprecated
3149# $1: The name of the with argument to deprecate, not including --with-
3150
3151
3152
3153
3154# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3155# $1: variable to check
3156# $2: executable name to print in warning (optional)
3157
3158
3159# Does AC_PATH_PROG followed by BASIC_CHECK_NONEMPTY.
3160# Arguments as AC_PATH_PROG:
3161# $1: variable to set
3162# $2: executable name to look for
3163
3164
3165# Setup the most fundamental tools that relies on not much else to set up,
3166# but is used by much of the early bootstrap code.
3167
3168
3169# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3170
3171
3172
3173
3174
3175
3176
3177#%%% Simple tools %%%
3178
3179# Check if we have found a usable version of make
3180# $1: the path to a potential make binary (or empty)
3181# $2: the description on how we found this
3182
3183
3184# Goes looking for a usable version of GNU make.
3185
3186
3187
3188
3189
3190
3191# Check if build directory is on local disk. If not possible to determine,
3192# we prefer to claim it's local.
3193# Argument 1: directory to test
3194# Argument 2: what to do if it is on local disk
3195# Argument 3: what to do otherwise (remote disk or failure)
3196
3197
3198# Check that source files have basic read permissions set. This might
3199# not be the case in cygwin in certain conditions.
3200
3201
3202
3203
3204#
3205# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3206# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3207#
3208# This code is free software; you can redistribute it and/or modify it
3209# under the terms of the GNU General Public License version 2 only, as
3210# published by the Free Software Foundation.  Oracle designates this
3211# particular file as subject to the "Classpath" exception as provided
3212# by Oracle in the LICENSE file that accompanied this code.
3213#
3214# This code is distributed in the hope that it will be useful, but WITHOUT
3215# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3216# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3217# version 2 for more details (a copy is included in the LICENSE file that
3218# accompanied this code).
3219#
3220# You should have received a copy of the GNU General Public License version
3221# 2 along with this work; if not, write to the Free Software Foundation,
3222# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3223#
3224# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3225# or visit www.oracle.com if you need additional information or have any
3226# questions.
3227#
3228
3229
3230
3231
3232
3233# Helper function which possibly converts a path using DOS-style short mode.
3234# If so, the updated path is stored in $new_path.
3235# $1: The path to check
3236
3237
3238# Helper function which possibly converts a path using DOS-style short mode.
3239# If so, the updated path is stored in $new_path.
3240# $1: The path to check
3241
3242
3243# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3244# and could probably be heavily simplified. However, all changes in this
3245# area tend to need lot of testing in different scenarios, and in lack of
3246# proper unit testing, cleaning this up has not been deemed worth the effort
3247# at the moment.
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3258
3259
3260
3261
3262#
3263# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3264# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3265#
3266# This code is free software; you can redistribute it and/or modify it
3267# under the terms of the GNU General Public License version 2 only, as
3268# published by the Free Software Foundation.  Oracle designates this
3269# particular file as subject to the "Classpath" exception as provided
3270# by Oracle in the LICENSE file that accompanied this code.
3271#
3272# This code is distributed in the hope that it will be useful, but WITHOUT
3273# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3274# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3275# version 2 for more details (a copy is included in the LICENSE file that
3276# accompanied this code).
3277#
3278# You should have received a copy of the GNU General Public License version
3279# 2 along with this work; if not, write to the Free Software Foundation,
3280# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3281#
3282# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3283# or visit www.oracle.com if you need additional information or have any
3284# questions.
3285#
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297# ... then the rest
3298#
3299# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3300# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3301#
3302# This code is free software; you can redistribute it and/or modify it
3303# under the terms of the GNU General Public License version 2 only, as
3304# published by the Free Software Foundation.  Oracle designates this
3305# particular file as subject to the "Classpath" exception as provided
3306# by Oracle in the LICENSE file that accompanied this code.
3307#
3308# This code is distributed in the hope that it will be useful, but WITHOUT
3309# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3310# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3311# version 2 for more details (a copy is included in the LICENSE file that
3312# accompanied this code).
3313#
3314# You should have received a copy of the GNU General Public License version
3315# 2 along with this work; if not, write to the Free Software Foundation,
3316# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3317#
3318# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3319# or visit www.oracle.com if you need additional information or have any
3320# questions.
3321#
3322
3323# Execute the check given as argument, and verify the result
3324# If the Boot JDK was previously found, do nothing
3325# $1 A command line (typically autoconf macro) to execute
3326
3327
3328# Test: Is bootjdk explicitely set by command line arguments?
3329
3330
3331# Test: Is bootjdk available from builddeps?
3332
3333
3334# Test: Is $JAVA_HOME set?
3335
3336
3337# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3338
3339
3340# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3341
3342
3343# Look for a jdk in the given path. If there are multiple, try to select the newest.
3344# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3345# $1 = Path to directory containing jdk installations.
3346# $2 = String to append to the found JDK directory to get the proper JDK home
3347
3348
3349# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3350# environmental variable as base for where to look.
3351# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3352
3353
3354# Test: Is there a JDK installed in default, well-known locations?
3355
3356
3357# Check that a command-line tool in the Boot JDK is correct
3358# $1 = name of variable to assign
3359# $2 = name of binary
3360
3361
3362###############################################################################
3363#
3364# We need a Boot JDK to bootstrap the build.
3365#
3366
3367
3368
3369
3370
3371#
3372# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3373# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3374#
3375# This code is free software; you can redistribute it and/or modify it
3376# under the terms of the GNU General Public License version 2 only, as
3377# published by the Free Software Foundation.  Oracle designates this
3378# particular file as subject to the "Classpath" exception as provided
3379# by Oracle in the LICENSE file that accompanied this code.
3380#
3381# This code is distributed in the hope that it will be useful, but WITHOUT
3382# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3383# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3384# version 2 for more details (a copy is included in the LICENSE file that
3385# accompanied this code).
3386#
3387# You should have received a copy of the GNU General Public License version
3388# 2 along with this work; if not, write to the Free Software Foundation,
3389# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3390#
3391# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3392# or visit www.oracle.com if you need additional information or have any
3393# questions.
3394#
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415#
3416# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3417# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3418#
3419# This code is free software; you can redistribute it and/or modify it
3420# under the terms of the GNU General Public License version 2 only, as
3421# published by the Free Software Foundation.  Oracle designates this
3422# particular file as subject to the "Classpath" exception as provided
3423# by Oracle in the LICENSE file that accompanied this code.
3424#
3425# This code is distributed in the hope that it will be useful, but WITHOUT
3426# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3427# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3428# version 2 for more details (a copy is included in the LICENSE file that
3429# accompanied this code).
3430#
3431# You should have received a copy of the GNU General Public License version
3432# 2 along with this work; if not, write to the Free Software Foundation,
3433# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3434#
3435# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3436# or visit www.oracle.com if you need additional information or have any
3437# questions.
3438#
3439
3440
3441
3442
3443
3444cygwin_help() {
3445  case $1 in
3446    unzip)
3447      PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip" ;;
3448    zip)
3449      PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P zip" ;;
3450    make)
3451      PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P make" ;;
3452    * )
3453      break ;;
3454  esac
3455}
3456
3457apt_help() {
3458  case $1 in
3459    devkit)
3460      PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
3461    openjdk)
3462      PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
3463    alsa)
3464      PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
3465    cups)
3466      PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
3467    freetype2)
3468      PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
3469    pulse)
3470      PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;;
3471    x11)
3472      PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
3473    ccache)
3474      PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
3475    * )
3476      break ;;
3477  esac
3478}
3479
3480yum_help() {
3481  case $1 in
3482    devkit)
3483      PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
3484    openjdk)
3485      PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
3486    alsa)
3487      PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
3488    cups)
3489      PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
3490    freetype2)
3491      PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
3492    pulse)
3493      PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;;
3494    x11)
3495      PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel" ;;
3496    ccache)
3497      PKGHANDLER_COMMAND="sudo yum install ccache" ;;
3498    * )
3499      break ;;
3500  esac
3501}
3502
3503port_help() {
3504  PKGHANDLER_COMMAND=""
3505}
3506
3507pkgutil_help() {
3508  PKGHANDLER_COMMAND=""
3509}
3510
3511pkgadd_help() {
3512  PKGHANDLER_COMMAND=""
3513}
3514
3515
3516
3517#
3518# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
3519# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3520#
3521# This code is free software; you can redistribute it and/or modify it
3522# under the terms of the GNU General Public License version 2 only, as
3523# published by the Free Software Foundation.  Oracle designates this
3524# particular file as subject to the "Classpath" exception as provided
3525# by Oracle in the LICENSE file that accompanied this code.
3526#
3527# This code is distributed in the hope that it will be useful, but WITHOUT
3528# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3529# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3530# version 2 for more details (a copy is included in the LICENSE file that
3531# accompanied this code).
3532#
3533# You should have received a copy of the GNU General Public License version
3534# 2 along with this work; if not, write to the Free Software Foundation,
3535# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3536#
3537# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3538# or visit www.oracle.com if you need additional information or have any
3539# questions.
3540#
3541
3542
3543
3544
3545
3546
3547
3548
3549###############################################################################
3550#
3551# Should we build only OpenJDK even if closed sources are present?
3552#
3553
3554
3555
3556
3557###############################################################################
3558#
3559# Setup version numbers
3560#
3561
3562
3563
3564
3565
3566
3567# Support for customization of the build process. Some build files
3568# will include counterparts from this location, if they exist. This allows
3569# for a degree of customization of the build targets and the rules/recipes
3570# to create them
3571
3572# Check whether --with-custom-make-dir was given.
3573if test "${with_custom_make_dir+set}" = set; then :
3574  withval=$with_custom_make_dir; CUSTOM_MAKE_DIR=$with_custom_make_dir
3575fi
3576
3577
3578
3579#
3580# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3581# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3582#
3583# This code is free software; you can redistribute it and/or modify it
3584# under the terms of the GNU General Public License version 2 only, as
3585# published by the Free Software Foundation.  Oracle designates this
3586# particular file as subject to the "Classpath" exception as provided
3587# by Oracle in the LICENSE file that accompanied this code.
3588#
3589# This code is distributed in the hope that it will be useful, but WITHOUT
3590# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3591# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3592# version 2 for more details (a copy is included in the LICENSE file that
3593# accompanied this code).
3594#
3595# You should have received a copy of the GNU General Public License version
3596# 2 along with this work; if not, write to the Free Software Foundation,
3597# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3598#
3599# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3600# or visit www.oracle.com if you need additional information or have any
3601# questions.
3602#
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618#
3619# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3620# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3621#
3622# This code is free software; you can redistribute it and/or modify it
3623# under the terms of the GNU General Public License version 2 only, as
3624# published by the Free Software Foundation.  Oracle designates this
3625# particular file as subject to the "Classpath" exception as provided
3626# by Oracle in the LICENSE file that accompanied this code.
3627#
3628# This code is distributed in the hope that it will be useful, but WITHOUT
3629# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3630# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3631# version 2 for more details (a copy is included in the LICENSE file that
3632# accompanied this code).
3633#
3634# You should have received a copy of the GNU General Public License version
3635# 2 along with this work; if not, write to the Free Software Foundation,
3636# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3637#
3638# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3639# or visit www.oracle.com if you need additional information or have any
3640# questions.
3641#
3642
3643# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
3644# Converts autoconf style CPU name to OpenJDK style, into
3645# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
3646
3647
3648# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
3649# Converts autoconf style OS name to OpenJDK style, into
3650# VAR_OS and VAR_OS_API.
3651
3652
3653# Expects $host_os $host_cpu $build_os and $build_cpu
3654# and $with_target_bits to have been setup!
3655#
3656# Translate the standard triplet(quadruplet) definition
3657# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
3658# OPENJDK_BUILD_OS, etc.
3659
3660
3661# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
3662# accordingly. Must be done after setting up build and target system, but before
3663# doing anything else with these values.
3664
3665
3666# Setup the legacy variables, for controlling the old makefiles.
3667#
3668
3669
3670
3671
3672#%%% Build and target systems %%%
3673
3674
3675
3676
3677# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
3678# Add -mX to various FLAGS variables.
3679
3680
3681
3682
3683
3684
3685#
3686# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3687# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3688#
3689# This code is free software; you can redistribute it and/or modify it
3690# under the terms of the GNU General Public License version 2 only, as
3691# published by the Free Software Foundation.  Oracle designates this
3692# particular file as subject to the "Classpath" exception as provided
3693# by Oracle in the LICENSE file that accompanied this code.
3694#
3695# This code is distributed in the hope that it will be useful, but WITHOUT
3696# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3697# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3698# version 2 for more details (a copy is included in the LICENSE file that
3699# accompanied this code).
3700#
3701# You should have received a copy of the GNU General Public License version
3702# 2 along with this work; if not, write to the Free Software Foundation,
3703# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3704#
3705# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3706# or visit www.oracle.com if you need additional information or have any
3707# questions.
3708#
3709
3710
3711
3712
3713
3714
3715
3716
3717#
3718# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3719# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3720#
3721# This code is free software; you can redistribute it and/or modify it
3722# under the terms of the GNU General Public License version 2 only, as
3723# published by the Free Software Foundation.  Oracle designates this
3724# particular file as subject to the "Classpath" exception as provided
3725# by Oracle in the LICENSE file that accompanied this code.
3726#
3727# This code is distributed in the hope that it will be useful, but WITHOUT
3728# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3729# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3730# version 2 for more details (a copy is included in the LICENSE file that
3731# accompanied this code).
3732#
3733# You should have received a copy of the GNU General Public License version
3734# 2 along with this work; if not, write to the Free Software Foundation,
3735# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3736#
3737# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3738# or visit www.oracle.com if you need additional information or have any
3739# questions.
3740#
3741
3742# $1 = compiler to test (CC or CXX)
3743# $2 = human readable name of compiler (C or C++)
3744
3745
3746
3747
3748
3749# $1 = compiler to test (CC or CXX)
3750# $2 = human readable name of compiler (C or C++)
3751# $3 = list of compiler names to search for
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765# TOOLCHAIN_COMPILER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3766#                                   [RUN-IF-FALSE])
3767# ------------------------------------------------------------
3768# Check that the c and c++ compilers support an argument
3769
3770
3771
3772
3773# Setup the JTREG paths
3774
3775
3776#
3777# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3778# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3779#
3780# This code is free software; you can redistribute it and/or modify it
3781# under the terms of the GNU General Public License version 2 only, as
3782# published by the Free Software Foundation.  Oracle designates this
3783# particular file as subject to the "Classpath" exception as provided
3784# by Oracle in the LICENSE file that accompanied this code.
3785#
3786# This code is distributed in the hope that it will be useful, but WITHOUT
3787# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3788# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3789# version 2 for more details (a copy is included in the LICENSE file that
3790# accompanied this code).
3791#
3792# You should have received a copy of the GNU General Public License version
3793# 2 along with this work; if not, write to the Free Software Foundation,
3794# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3795#
3796# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3797# or visit www.oracle.com if you need additional information or have any
3798# questions.
3799#
3800
3801
3802
3803
3804
3805
3806
3807# Check if the VS env variables were setup prior to running configure.
3808# If not, then find vcvarsall.bat and run it automatically, and integrate
3809# the set env variables into the spec file.
3810
3811
3812
3813
3814
3815
3816# This line needs to be here, verbatim, after all includes and the dummy hook
3817# definitions. It is replaced with custom functionality when building
3818# custom sources.
3819#CUSTOM_AUTOCONF_INCLUDE
3820
3821# Do not change or remove the following line, it is needed for consistency checks:
3822DATE_WHEN_GENERATED=1381407169
3823
3824###############################################################################
3825#
3826# Initialization / Boot-strapping
3827#
3828# The bootstrapping process needs to solve the "chicken or the egg" problem,
3829# thus it jumps back and forth, each time gaining something needed later on.
3830#
3831###############################################################################
3832
3833# Basic initialization that must happen first of all
3834
3835  # Save the original command line. This is passed to us by the wrapper configure script.
3836
3837  DATE_WHEN_CONFIGURED=`LANG=C date`
3838
3839  { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
3840$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
3841  { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
3842$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
3843
3844
3845
3846  # Start with tools that do not need have cross compilation support
3847  # and can be expected to be found in the default PATH. These tools are
3848  # used by configure. Nor are these tools expected to be found in the
3849  # devkit from the builddeps server either, since they are
3850  # needed to download the devkit.
3851
3852  # First are all the simple required tools.
3853
3854  for ac_prog in basename
3855do
3856  # Extract the first word of "$ac_prog", so it can be a program name with args.
3857set dummy $ac_prog; ac_word=$2
3858{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3859$as_echo_n "checking for $ac_word... " >&6; }
3860if ${ac_cv_path_BASENAME+:} false; then :
3861  $as_echo_n "(cached) " >&6
3862else
3863  case $BASENAME in
3864  [\\/]* | ?:[\\/]*)
3865  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
3866  ;;
3867  *)
3868  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3869for as_dir in $PATH
3870do
3871  IFS=$as_save_IFS
3872  test -z "$as_dir" && as_dir=.
3873    for ac_exec_ext in '' $ac_executable_extensions; do
3874  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3875    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
3876    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3877    break 2
3878  fi
3879done
3880  done
3881IFS=$as_save_IFS
3882
3883  ;;
3884esac
3885fi
3886BASENAME=$ac_cv_path_BASENAME
3887if test -n "$BASENAME"; then
3888  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
3889$as_echo "$BASENAME" >&6; }
3890else
3891  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3892$as_echo "no" >&6; }
3893fi
3894
3895
3896  test -n "$BASENAME" && break
3897done
3898
3899
3900  if test "x$BASENAME" = x; then
3901    if test "xbasename" = x; then
3902      PROG_NAME=basename
3903    else
3904      PROG_NAME=basename
3905    fi
3906    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3907$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3908    as_fn_error $? "Cannot continue" "$LINENO" 5
3909  fi
3910
3911
3912
3913  for ac_prog in bash
3914do
3915  # Extract the first word of "$ac_prog", so it can be a program name with args.
3916set dummy $ac_prog; ac_word=$2
3917{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3918$as_echo_n "checking for $ac_word... " >&6; }
3919if ${ac_cv_path_BASH+:} false; then :
3920  $as_echo_n "(cached) " >&6
3921else
3922  case $BASH in
3923  [\\/]* | ?:[\\/]*)
3924  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
3925  ;;
3926  *)
3927  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3928for as_dir in $PATH
3929do
3930  IFS=$as_save_IFS
3931  test -z "$as_dir" && as_dir=.
3932    for ac_exec_ext in '' $ac_executable_extensions; do
3933  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3934    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
3935    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3936    break 2
3937  fi
3938done
3939  done
3940IFS=$as_save_IFS
3941
3942  ;;
3943esac
3944fi
3945BASH=$ac_cv_path_BASH
3946if test -n "$BASH"; then
3947  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
3948$as_echo "$BASH" >&6; }
3949else
3950  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3951$as_echo "no" >&6; }
3952fi
3953
3954
3955  test -n "$BASH" && break
3956done
3957
3958
3959  if test "x$BASH" = x; then
3960    if test "xbash" = x; then
3961      PROG_NAME=bash
3962    else
3963      PROG_NAME=bash
3964    fi
3965    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3966$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3967    as_fn_error $? "Cannot continue" "$LINENO" 5
3968  fi
3969
3970
3971
3972  for ac_prog in cat
3973do
3974  # Extract the first word of "$ac_prog", so it can be a program name with args.
3975set dummy $ac_prog; ac_word=$2
3976{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3977$as_echo_n "checking for $ac_word... " >&6; }
3978if ${ac_cv_path_CAT+:} false; then :
3979  $as_echo_n "(cached) " >&6
3980else
3981  case $CAT in
3982  [\\/]* | ?:[\\/]*)
3983  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
3984  ;;
3985  *)
3986  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3987for as_dir in $PATH
3988do
3989  IFS=$as_save_IFS
3990  test -z "$as_dir" && as_dir=.
3991    for ac_exec_ext in '' $ac_executable_extensions; do
3992  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3993    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
3994    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3995    break 2
3996  fi
3997done
3998  done
3999IFS=$as_save_IFS
4000
4001  ;;
4002esac
4003fi
4004CAT=$ac_cv_path_CAT
4005if test -n "$CAT"; then
4006  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4007$as_echo "$CAT" >&6; }
4008else
4009  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4010$as_echo "no" >&6; }
4011fi
4012
4013
4014  test -n "$CAT" && break
4015done
4016
4017
4018  if test "x$CAT" = x; then
4019    if test "xcat" = x; then
4020      PROG_NAME=cat
4021    else
4022      PROG_NAME=cat
4023    fi
4024    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4025$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4026    as_fn_error $? "Cannot continue" "$LINENO" 5
4027  fi
4028
4029
4030
4031  for ac_prog in chmod
4032do
4033  # Extract the first word of "$ac_prog", so it can be a program name with args.
4034set dummy $ac_prog; ac_word=$2
4035{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4036$as_echo_n "checking for $ac_word... " >&6; }
4037if ${ac_cv_path_CHMOD+:} false; then :
4038  $as_echo_n "(cached) " >&6
4039else
4040  case $CHMOD in
4041  [\\/]* | ?:[\\/]*)
4042  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
4043  ;;
4044  *)
4045  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4046for as_dir in $PATH
4047do
4048  IFS=$as_save_IFS
4049  test -z "$as_dir" && as_dir=.
4050    for ac_exec_ext in '' $ac_executable_extensions; do
4051  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4052    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
4053    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4054    break 2
4055  fi
4056done
4057  done
4058IFS=$as_save_IFS
4059
4060  ;;
4061esac
4062fi
4063CHMOD=$ac_cv_path_CHMOD
4064if test -n "$CHMOD"; then
4065  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
4066$as_echo "$CHMOD" >&6; }
4067else
4068  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4069$as_echo "no" >&6; }
4070fi
4071
4072
4073  test -n "$CHMOD" && break
4074done
4075
4076
4077  if test "x$CHMOD" = x; then
4078    if test "xchmod" = x; then
4079      PROG_NAME=chmod
4080    else
4081      PROG_NAME=chmod
4082    fi
4083    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4084$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4085    as_fn_error $? "Cannot continue" "$LINENO" 5
4086  fi
4087
4088
4089
4090  for ac_prog in cmp
4091do
4092  # Extract the first word of "$ac_prog", so it can be a program name with args.
4093set dummy $ac_prog; ac_word=$2
4094{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4095$as_echo_n "checking for $ac_word... " >&6; }
4096if ${ac_cv_path_CMP+:} false; then :
4097  $as_echo_n "(cached) " >&6
4098else
4099  case $CMP in
4100  [\\/]* | ?:[\\/]*)
4101  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
4102  ;;
4103  *)
4104  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4105for as_dir in $PATH
4106do
4107  IFS=$as_save_IFS
4108  test -z "$as_dir" && as_dir=.
4109    for ac_exec_ext in '' $ac_executable_extensions; do
4110  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4111    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
4112    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4113    break 2
4114  fi
4115done
4116  done
4117IFS=$as_save_IFS
4118
4119  ;;
4120esac
4121fi
4122CMP=$ac_cv_path_CMP
4123if test -n "$CMP"; then
4124  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
4125$as_echo "$CMP" >&6; }
4126else
4127  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4128$as_echo "no" >&6; }
4129fi
4130
4131
4132  test -n "$CMP" && break
4133done
4134
4135
4136  if test "x$CMP" = x; then
4137    if test "xcmp" = x; then
4138      PROG_NAME=cmp
4139    else
4140      PROG_NAME=cmp
4141    fi
4142    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4143$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4144    as_fn_error $? "Cannot continue" "$LINENO" 5
4145  fi
4146
4147
4148
4149  for ac_prog in comm
4150do
4151  # Extract the first word of "$ac_prog", so it can be a program name with args.
4152set dummy $ac_prog; ac_word=$2
4153{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4154$as_echo_n "checking for $ac_word... " >&6; }
4155if ${ac_cv_path_COMM+:} false; then :
4156  $as_echo_n "(cached) " >&6
4157else
4158  case $COMM in
4159  [\\/]* | ?:[\\/]*)
4160  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
4161  ;;
4162  *)
4163  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4164for as_dir in $PATH
4165do
4166  IFS=$as_save_IFS
4167  test -z "$as_dir" && as_dir=.
4168    for ac_exec_ext in '' $ac_executable_extensions; do
4169  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4170    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
4171    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4172    break 2
4173  fi
4174done
4175  done
4176IFS=$as_save_IFS
4177
4178  ;;
4179esac
4180fi
4181COMM=$ac_cv_path_COMM
4182if test -n "$COMM"; then
4183  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
4184$as_echo "$COMM" >&6; }
4185else
4186  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4187$as_echo "no" >&6; }
4188fi
4189
4190
4191  test -n "$COMM" && break
4192done
4193
4194
4195  if test "x$COMM" = x; then
4196    if test "xcomm" = x; then
4197      PROG_NAME=comm
4198    else
4199      PROG_NAME=comm
4200    fi
4201    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4202$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4203    as_fn_error $? "Cannot continue" "$LINENO" 5
4204  fi
4205
4206
4207
4208  for ac_prog in cp
4209do
4210  # Extract the first word of "$ac_prog", so it can be a program name with args.
4211set dummy $ac_prog; ac_word=$2
4212{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4213$as_echo_n "checking for $ac_word... " >&6; }
4214if ${ac_cv_path_CP+:} false; then :
4215  $as_echo_n "(cached) " >&6
4216else
4217  case $CP in
4218  [\\/]* | ?:[\\/]*)
4219  ac_cv_path_CP="$CP" # Let the user override the test with a path.
4220  ;;
4221  *)
4222  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4223for as_dir in $PATH
4224do
4225  IFS=$as_save_IFS
4226  test -z "$as_dir" && as_dir=.
4227    for ac_exec_ext in '' $ac_executable_extensions; do
4228  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4229    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
4230    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4231    break 2
4232  fi
4233done
4234  done
4235IFS=$as_save_IFS
4236
4237  ;;
4238esac
4239fi
4240CP=$ac_cv_path_CP
4241if test -n "$CP"; then
4242  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
4243$as_echo "$CP" >&6; }
4244else
4245  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4246$as_echo "no" >&6; }
4247fi
4248
4249
4250  test -n "$CP" && break
4251done
4252
4253
4254  if test "x$CP" = x; then
4255    if test "xcp" = x; then
4256      PROG_NAME=cp
4257    else
4258      PROG_NAME=cp
4259    fi
4260    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4261$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4262    as_fn_error $? "Cannot continue" "$LINENO" 5
4263  fi
4264
4265
4266
4267  for ac_prog in cpio
4268do
4269  # Extract the first word of "$ac_prog", so it can be a program name with args.
4270set dummy $ac_prog; ac_word=$2
4271{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4272$as_echo_n "checking for $ac_word... " >&6; }
4273if ${ac_cv_path_CPIO+:} false; then :
4274  $as_echo_n "(cached) " >&6
4275else
4276  case $CPIO in
4277  [\\/]* | ?:[\\/]*)
4278  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
4279  ;;
4280  *)
4281  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4282for as_dir in $PATH
4283do
4284  IFS=$as_save_IFS
4285  test -z "$as_dir" && as_dir=.
4286    for ac_exec_ext in '' $ac_executable_extensions; do
4287  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4288    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
4289    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4290    break 2
4291  fi
4292done
4293  done
4294IFS=$as_save_IFS
4295
4296  ;;
4297esac
4298fi
4299CPIO=$ac_cv_path_CPIO
4300if test -n "$CPIO"; then
4301  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
4302$as_echo "$CPIO" >&6; }
4303else
4304  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4305$as_echo "no" >&6; }
4306fi
4307
4308
4309  test -n "$CPIO" && break
4310done
4311
4312
4313  if test "x$CPIO" = x; then
4314    if test "xcpio" = x; then
4315      PROG_NAME=cpio
4316    else
4317      PROG_NAME=cpio
4318    fi
4319    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4320$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4321    as_fn_error $? "Cannot continue" "$LINENO" 5
4322  fi
4323
4324
4325
4326  for ac_prog in cut
4327do
4328  # Extract the first word of "$ac_prog", so it can be a program name with args.
4329set dummy $ac_prog; ac_word=$2
4330{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4331$as_echo_n "checking for $ac_word... " >&6; }
4332if ${ac_cv_path_CUT+:} false; then :
4333  $as_echo_n "(cached) " >&6
4334else
4335  case $CUT in
4336  [\\/]* | ?:[\\/]*)
4337  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
4338  ;;
4339  *)
4340  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4341for as_dir in $PATH
4342do
4343  IFS=$as_save_IFS
4344  test -z "$as_dir" && as_dir=.
4345    for ac_exec_ext in '' $ac_executable_extensions; do
4346  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4347    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
4348    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4349    break 2
4350  fi
4351done
4352  done
4353IFS=$as_save_IFS
4354
4355  ;;
4356esac
4357fi
4358CUT=$ac_cv_path_CUT
4359if test -n "$CUT"; then
4360  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
4361$as_echo "$CUT" >&6; }
4362else
4363  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4364$as_echo "no" >&6; }
4365fi
4366
4367
4368  test -n "$CUT" && break
4369done
4370
4371
4372  if test "x$CUT" = x; then
4373    if test "xcut" = x; then
4374      PROG_NAME=cut
4375    else
4376      PROG_NAME=cut
4377    fi
4378    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4379$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4380    as_fn_error $? "Cannot continue" "$LINENO" 5
4381  fi
4382
4383
4384
4385  for ac_prog in date
4386do
4387  # Extract the first word of "$ac_prog", so it can be a program name with args.
4388set dummy $ac_prog; ac_word=$2
4389{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4390$as_echo_n "checking for $ac_word... " >&6; }
4391if ${ac_cv_path_DATE+:} false; then :
4392  $as_echo_n "(cached) " >&6
4393else
4394  case $DATE in
4395  [\\/]* | ?:[\\/]*)
4396  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
4397  ;;
4398  *)
4399  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4400for as_dir in $PATH
4401do
4402  IFS=$as_save_IFS
4403  test -z "$as_dir" && as_dir=.
4404    for ac_exec_ext in '' $ac_executable_extensions; do
4405  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4406    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
4407    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4408    break 2
4409  fi
4410done
4411  done
4412IFS=$as_save_IFS
4413
4414  ;;
4415esac
4416fi
4417DATE=$ac_cv_path_DATE
4418if test -n "$DATE"; then
4419  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
4420$as_echo "$DATE" >&6; }
4421else
4422  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4423$as_echo "no" >&6; }
4424fi
4425
4426
4427  test -n "$DATE" && break
4428done
4429
4430
4431  if test "x$DATE" = x; then
4432    if test "xdate" = x; then
4433      PROG_NAME=date
4434    else
4435      PROG_NAME=date
4436    fi
4437    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4438$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4439    as_fn_error $? "Cannot continue" "$LINENO" 5
4440  fi
4441
4442
4443
4444  for ac_prog in gdiff diff
4445do
4446  # Extract the first word of "$ac_prog", so it can be a program name with args.
4447set dummy $ac_prog; ac_word=$2
4448{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4449$as_echo_n "checking for $ac_word... " >&6; }
4450if ${ac_cv_path_DIFF+:} false; then :
4451  $as_echo_n "(cached) " >&6
4452else
4453  case $DIFF in
4454  [\\/]* | ?:[\\/]*)
4455  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
4456  ;;
4457  *)
4458  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4459for as_dir in $PATH
4460do
4461  IFS=$as_save_IFS
4462  test -z "$as_dir" && as_dir=.
4463    for ac_exec_ext in '' $ac_executable_extensions; do
4464  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4465    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
4466    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4467    break 2
4468  fi
4469done
4470  done
4471IFS=$as_save_IFS
4472
4473  ;;
4474esac
4475fi
4476DIFF=$ac_cv_path_DIFF
4477if test -n "$DIFF"; then
4478  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
4479$as_echo "$DIFF" >&6; }
4480else
4481  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4482$as_echo "no" >&6; }
4483fi
4484
4485
4486  test -n "$DIFF" && break
4487done
4488
4489
4490  if test "x$DIFF" = x; then
4491    if test "xgdiff diff" = x; then
4492      PROG_NAME=diff
4493    else
4494      PROG_NAME=gdiff diff
4495    fi
4496    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4497$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4498    as_fn_error $? "Cannot continue" "$LINENO" 5
4499  fi
4500
4501
4502
4503  for ac_prog in dirname
4504do
4505  # Extract the first word of "$ac_prog", so it can be a program name with args.
4506set dummy $ac_prog; ac_word=$2
4507{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4508$as_echo_n "checking for $ac_word... " >&6; }
4509if ${ac_cv_path_DIRNAME+:} false; then :
4510  $as_echo_n "(cached) " >&6
4511else
4512  case $DIRNAME in
4513  [\\/]* | ?:[\\/]*)
4514  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
4515  ;;
4516  *)
4517  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4518for as_dir in $PATH
4519do
4520  IFS=$as_save_IFS
4521  test -z "$as_dir" && as_dir=.
4522    for ac_exec_ext in '' $ac_executable_extensions; do
4523  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4524    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
4525    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4526    break 2
4527  fi
4528done
4529  done
4530IFS=$as_save_IFS
4531
4532  ;;
4533esac
4534fi
4535DIRNAME=$ac_cv_path_DIRNAME
4536if test -n "$DIRNAME"; then
4537  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
4538$as_echo "$DIRNAME" >&6; }
4539else
4540  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4541$as_echo "no" >&6; }
4542fi
4543
4544
4545  test -n "$DIRNAME" && break
4546done
4547
4548
4549  if test "x$DIRNAME" = x; then
4550    if test "xdirname" = x; then
4551      PROG_NAME=dirname
4552    else
4553      PROG_NAME=dirname
4554    fi
4555    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4556$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4557    as_fn_error $? "Cannot continue" "$LINENO" 5
4558  fi
4559
4560
4561
4562  for ac_prog in echo
4563do
4564  # Extract the first word of "$ac_prog", so it can be a program name with args.
4565set dummy $ac_prog; ac_word=$2
4566{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4567$as_echo_n "checking for $ac_word... " >&6; }
4568if ${ac_cv_path_ECHO+:} false; then :
4569  $as_echo_n "(cached) " >&6
4570else
4571  case $ECHO in
4572  [\\/]* | ?:[\\/]*)
4573  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
4574  ;;
4575  *)
4576  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4577for as_dir in $PATH
4578do
4579  IFS=$as_save_IFS
4580  test -z "$as_dir" && as_dir=.
4581    for ac_exec_ext in '' $ac_executable_extensions; do
4582  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4583    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
4584    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4585    break 2
4586  fi
4587done
4588  done
4589IFS=$as_save_IFS
4590
4591  ;;
4592esac
4593fi
4594ECHO=$ac_cv_path_ECHO
4595if test -n "$ECHO"; then
4596  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
4597$as_echo "$ECHO" >&6; }
4598else
4599  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4600$as_echo "no" >&6; }
4601fi
4602
4603
4604  test -n "$ECHO" && break
4605done
4606
4607
4608  if test "x$ECHO" = x; then
4609    if test "xecho" = x; then
4610      PROG_NAME=echo
4611    else
4612      PROG_NAME=echo
4613    fi
4614    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4615$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4616    as_fn_error $? "Cannot continue" "$LINENO" 5
4617  fi
4618
4619
4620
4621  for ac_prog in expr
4622do
4623  # Extract the first word of "$ac_prog", so it can be a program name with args.
4624set dummy $ac_prog; ac_word=$2
4625{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4626$as_echo_n "checking for $ac_word... " >&6; }
4627if ${ac_cv_path_EXPR+:} false; then :
4628  $as_echo_n "(cached) " >&6
4629else
4630  case $EXPR in
4631  [\\/]* | ?:[\\/]*)
4632  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
4633  ;;
4634  *)
4635  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4636for as_dir in $PATH
4637do
4638  IFS=$as_save_IFS
4639  test -z "$as_dir" && as_dir=.
4640    for ac_exec_ext in '' $ac_executable_extensions; do
4641  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4642    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
4643    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4644    break 2
4645  fi
4646done
4647  done
4648IFS=$as_save_IFS
4649
4650  ;;
4651esac
4652fi
4653EXPR=$ac_cv_path_EXPR
4654if test -n "$EXPR"; then
4655  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
4656$as_echo "$EXPR" >&6; }
4657else
4658  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4659$as_echo "no" >&6; }
4660fi
4661
4662
4663  test -n "$EXPR" && break
4664done
4665
4666
4667  if test "x$EXPR" = x; then
4668    if test "xexpr" = x; then
4669      PROG_NAME=expr
4670    else
4671      PROG_NAME=expr
4672    fi
4673    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4674$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4675    as_fn_error $? "Cannot continue" "$LINENO" 5
4676  fi
4677
4678
4679
4680  for ac_prog in file
4681do
4682  # Extract the first word of "$ac_prog", so it can be a program name with args.
4683set dummy $ac_prog; ac_word=$2
4684{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4685$as_echo_n "checking for $ac_word... " >&6; }
4686if ${ac_cv_path_FILE+:} false; then :
4687  $as_echo_n "(cached) " >&6
4688else
4689  case $FILE in
4690  [\\/]* | ?:[\\/]*)
4691  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
4692  ;;
4693  *)
4694  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4695for as_dir in $PATH
4696do
4697  IFS=$as_save_IFS
4698  test -z "$as_dir" && as_dir=.
4699    for ac_exec_ext in '' $ac_executable_extensions; do
4700  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4701    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
4702    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4703    break 2
4704  fi
4705done
4706  done
4707IFS=$as_save_IFS
4708
4709  ;;
4710esac
4711fi
4712FILE=$ac_cv_path_FILE
4713if test -n "$FILE"; then
4714  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
4715$as_echo "$FILE" >&6; }
4716else
4717  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4718$as_echo "no" >&6; }
4719fi
4720
4721
4722  test -n "$FILE" && break
4723done
4724
4725
4726  if test "x$FILE" = x; then
4727    if test "xfile" = x; then
4728      PROG_NAME=file
4729    else
4730      PROG_NAME=file
4731    fi
4732    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4733$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4734    as_fn_error $? "Cannot continue" "$LINENO" 5
4735  fi
4736
4737
4738
4739  for ac_prog in find
4740do
4741  # Extract the first word of "$ac_prog", so it can be a program name with args.
4742set dummy $ac_prog; ac_word=$2
4743{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4744$as_echo_n "checking for $ac_word... " >&6; }
4745if ${ac_cv_path_FIND+:} false; then :
4746  $as_echo_n "(cached) " >&6
4747else
4748  case $FIND in
4749  [\\/]* | ?:[\\/]*)
4750  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
4751  ;;
4752  *)
4753  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4754for as_dir in $PATH
4755do
4756  IFS=$as_save_IFS
4757  test -z "$as_dir" && as_dir=.
4758    for ac_exec_ext in '' $ac_executable_extensions; do
4759  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4760    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
4761    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4762    break 2
4763  fi
4764done
4765  done
4766IFS=$as_save_IFS
4767
4768  ;;
4769esac
4770fi
4771FIND=$ac_cv_path_FIND
4772if test -n "$FIND"; then
4773  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
4774$as_echo "$FIND" >&6; }
4775else
4776  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4777$as_echo "no" >&6; }
4778fi
4779
4780
4781  test -n "$FIND" && break
4782done
4783
4784
4785  if test "x$FIND" = x; then
4786    if test "xfind" = x; then
4787      PROG_NAME=find
4788    else
4789      PROG_NAME=find
4790    fi
4791    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4792$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4793    as_fn_error $? "Cannot continue" "$LINENO" 5
4794  fi
4795
4796
4797
4798  for ac_prog in head
4799do
4800  # Extract the first word of "$ac_prog", so it can be a program name with args.
4801set dummy $ac_prog; ac_word=$2
4802{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4803$as_echo_n "checking for $ac_word... " >&6; }
4804if ${ac_cv_path_HEAD+:} false; then :
4805  $as_echo_n "(cached) " >&6
4806else
4807  case $HEAD in
4808  [\\/]* | ?:[\\/]*)
4809  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
4810  ;;
4811  *)
4812  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4813for as_dir in $PATH
4814do
4815  IFS=$as_save_IFS
4816  test -z "$as_dir" && as_dir=.
4817    for ac_exec_ext in '' $ac_executable_extensions; do
4818  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4819    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
4820    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4821    break 2
4822  fi
4823done
4824  done
4825IFS=$as_save_IFS
4826
4827  ;;
4828esac
4829fi
4830HEAD=$ac_cv_path_HEAD
4831if test -n "$HEAD"; then
4832  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
4833$as_echo "$HEAD" >&6; }
4834else
4835  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4836$as_echo "no" >&6; }
4837fi
4838
4839
4840  test -n "$HEAD" && break
4841done
4842
4843
4844  if test "x$HEAD" = x; then
4845    if test "xhead" = x; then
4846      PROG_NAME=head
4847    else
4848      PROG_NAME=head
4849    fi
4850    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4851$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4852    as_fn_error $? "Cannot continue" "$LINENO" 5
4853  fi
4854
4855
4856
4857  for ac_prog in ln
4858do
4859  # Extract the first word of "$ac_prog", so it can be a program name with args.
4860set dummy $ac_prog; ac_word=$2
4861{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4862$as_echo_n "checking for $ac_word... " >&6; }
4863if ${ac_cv_path_LN+:} false; then :
4864  $as_echo_n "(cached) " >&6
4865else
4866  case $LN in
4867  [\\/]* | ?:[\\/]*)
4868  ac_cv_path_LN="$LN" # Let the user override the test with a path.
4869  ;;
4870  *)
4871  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4872for as_dir in $PATH
4873do
4874  IFS=$as_save_IFS
4875  test -z "$as_dir" && as_dir=.
4876    for ac_exec_ext in '' $ac_executable_extensions; do
4877  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4878    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
4879    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4880    break 2
4881  fi
4882done
4883  done
4884IFS=$as_save_IFS
4885
4886  ;;
4887esac
4888fi
4889LN=$ac_cv_path_LN
4890if test -n "$LN"; then
4891  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
4892$as_echo "$LN" >&6; }
4893else
4894  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4895$as_echo "no" >&6; }
4896fi
4897
4898
4899  test -n "$LN" && break
4900done
4901
4902
4903  if test "x$LN" = x; then
4904    if test "xln" = x; then
4905      PROG_NAME=ln
4906    else
4907      PROG_NAME=ln
4908    fi
4909    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4910$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4911    as_fn_error $? "Cannot continue" "$LINENO" 5
4912  fi
4913
4914
4915
4916  for ac_prog in ls
4917do
4918  # Extract the first word of "$ac_prog", so it can be a program name with args.
4919set dummy $ac_prog; ac_word=$2
4920{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4921$as_echo_n "checking for $ac_word... " >&6; }
4922if ${ac_cv_path_LS+:} false; then :
4923  $as_echo_n "(cached) " >&6
4924else
4925  case $LS in
4926  [\\/]* | ?:[\\/]*)
4927  ac_cv_path_LS="$LS" # Let the user override the test with a path.
4928  ;;
4929  *)
4930  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4931for as_dir in $PATH
4932do
4933  IFS=$as_save_IFS
4934  test -z "$as_dir" && as_dir=.
4935    for ac_exec_ext in '' $ac_executable_extensions; do
4936  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4937    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
4938    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4939    break 2
4940  fi
4941done
4942  done
4943IFS=$as_save_IFS
4944
4945  ;;
4946esac
4947fi
4948LS=$ac_cv_path_LS
4949if test -n "$LS"; then
4950  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
4951$as_echo "$LS" >&6; }
4952else
4953  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4954$as_echo "no" >&6; }
4955fi
4956
4957
4958  test -n "$LS" && break
4959done
4960
4961
4962  if test "x$LS" = x; then
4963    if test "xls" = x; then
4964      PROG_NAME=ls
4965    else
4966      PROG_NAME=ls
4967    fi
4968    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4969$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4970    as_fn_error $? "Cannot continue" "$LINENO" 5
4971  fi
4972
4973
4974
4975  for ac_prog in mkdir
4976do
4977  # Extract the first word of "$ac_prog", so it can be a program name with args.
4978set dummy $ac_prog; ac_word=$2
4979{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4980$as_echo_n "checking for $ac_word... " >&6; }
4981if ${ac_cv_path_MKDIR+:} false; then :
4982  $as_echo_n "(cached) " >&6
4983else
4984  case $MKDIR in
4985  [\\/]* | ?:[\\/]*)
4986  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
4987  ;;
4988  *)
4989  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4990for as_dir in $PATH
4991do
4992  IFS=$as_save_IFS
4993  test -z "$as_dir" && as_dir=.
4994    for ac_exec_ext in '' $ac_executable_extensions; do
4995  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4996    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
4997    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4998    break 2
4999  fi
5000done
5001  done
5002IFS=$as_save_IFS
5003
5004  ;;
5005esac
5006fi
5007MKDIR=$ac_cv_path_MKDIR
5008if test -n "$MKDIR"; then
5009  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
5010$as_echo "$MKDIR" >&6; }
5011else
5012  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5013$as_echo "no" >&6; }
5014fi
5015
5016
5017  test -n "$MKDIR" && break
5018done
5019
5020
5021  if test "x$MKDIR" = x; then
5022    if test "xmkdir" = x; then
5023      PROG_NAME=mkdir
5024    else
5025      PROG_NAME=mkdir
5026    fi
5027    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5028$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5029    as_fn_error $? "Cannot continue" "$LINENO" 5
5030  fi
5031
5032
5033
5034  for ac_prog in mktemp
5035do
5036  # Extract the first word of "$ac_prog", so it can be a program name with args.
5037set dummy $ac_prog; ac_word=$2
5038{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5039$as_echo_n "checking for $ac_word... " >&6; }
5040if ${ac_cv_path_MKTEMP+:} false; then :
5041  $as_echo_n "(cached) " >&6
5042else
5043  case $MKTEMP in
5044  [\\/]* | ?:[\\/]*)
5045  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
5046  ;;
5047  *)
5048  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5049for as_dir in $PATH
5050do
5051  IFS=$as_save_IFS
5052  test -z "$as_dir" && as_dir=.
5053    for ac_exec_ext in '' $ac_executable_extensions; do
5054  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5055    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
5056    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5057    break 2
5058  fi
5059done
5060  done
5061IFS=$as_save_IFS
5062
5063  ;;
5064esac
5065fi
5066MKTEMP=$ac_cv_path_MKTEMP
5067if test -n "$MKTEMP"; then
5068  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
5069$as_echo "$MKTEMP" >&6; }
5070else
5071  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5072$as_echo "no" >&6; }
5073fi
5074
5075
5076  test -n "$MKTEMP" && break
5077done
5078
5079
5080  if test "x$MKTEMP" = x; then
5081    if test "xmktemp" = x; then
5082      PROG_NAME=mktemp
5083    else
5084      PROG_NAME=mktemp
5085    fi
5086    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5087$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5088    as_fn_error $? "Cannot continue" "$LINENO" 5
5089  fi
5090
5091
5092
5093  for ac_prog in mv
5094do
5095  # Extract the first word of "$ac_prog", so it can be a program name with args.
5096set dummy $ac_prog; ac_word=$2
5097{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5098$as_echo_n "checking for $ac_word... " >&6; }
5099if ${ac_cv_path_MV+:} false; then :
5100  $as_echo_n "(cached) " >&6
5101else
5102  case $MV in
5103  [\\/]* | ?:[\\/]*)
5104  ac_cv_path_MV="$MV" # Let the user override the test with a path.
5105  ;;
5106  *)
5107  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5108for as_dir in $PATH
5109do
5110  IFS=$as_save_IFS
5111  test -z "$as_dir" && as_dir=.
5112    for ac_exec_ext in '' $ac_executable_extensions; do
5113  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5114    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
5115    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5116    break 2
5117  fi
5118done
5119  done
5120IFS=$as_save_IFS
5121
5122  ;;
5123esac
5124fi
5125MV=$ac_cv_path_MV
5126if test -n "$MV"; then
5127  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
5128$as_echo "$MV" >&6; }
5129else
5130  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5131$as_echo "no" >&6; }
5132fi
5133
5134
5135  test -n "$MV" && break
5136done
5137
5138
5139  if test "x$MV" = x; then
5140    if test "xmv" = x; then
5141      PROG_NAME=mv
5142    else
5143      PROG_NAME=mv
5144    fi
5145    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5146$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5147    as_fn_error $? "Cannot continue" "$LINENO" 5
5148  fi
5149
5150
5151
5152  for ac_prog in printf
5153do
5154  # Extract the first word of "$ac_prog", so it can be a program name with args.
5155set dummy $ac_prog; ac_word=$2
5156{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5157$as_echo_n "checking for $ac_word... " >&6; }
5158if ${ac_cv_path_PRINTF+:} false; then :
5159  $as_echo_n "(cached) " >&6
5160else
5161  case $PRINTF in
5162  [\\/]* | ?:[\\/]*)
5163  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
5164  ;;
5165  *)
5166  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5167for as_dir in $PATH
5168do
5169  IFS=$as_save_IFS
5170  test -z "$as_dir" && as_dir=.
5171    for ac_exec_ext in '' $ac_executable_extensions; do
5172  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5173    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
5174    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5175    break 2
5176  fi
5177done
5178  done
5179IFS=$as_save_IFS
5180
5181  ;;
5182esac
5183fi
5184PRINTF=$ac_cv_path_PRINTF
5185if test -n "$PRINTF"; then
5186  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
5187$as_echo "$PRINTF" >&6; }
5188else
5189  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5190$as_echo "no" >&6; }
5191fi
5192
5193
5194  test -n "$PRINTF" && break
5195done
5196
5197
5198  if test "x$PRINTF" = x; then
5199    if test "xprintf" = x; then
5200      PROG_NAME=printf
5201    else
5202      PROG_NAME=printf
5203    fi
5204    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5205$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5206    as_fn_error $? "Cannot continue" "$LINENO" 5
5207  fi
5208
5209
5210
5211  for ac_prog in rm
5212do
5213  # Extract the first word of "$ac_prog", so it can be a program name with args.
5214set dummy $ac_prog; ac_word=$2
5215{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5216$as_echo_n "checking for $ac_word... " >&6; }
5217if ${ac_cv_path_RM+:} false; then :
5218  $as_echo_n "(cached) " >&6
5219else
5220  case $RM in
5221  [\\/]* | ?:[\\/]*)
5222  ac_cv_path_RM="$RM" # Let the user override the test with a path.
5223  ;;
5224  *)
5225  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5226for as_dir in $PATH
5227do
5228  IFS=$as_save_IFS
5229  test -z "$as_dir" && as_dir=.
5230    for ac_exec_ext in '' $ac_executable_extensions; do
5231  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5232    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
5233    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5234    break 2
5235  fi
5236done
5237  done
5238IFS=$as_save_IFS
5239
5240  ;;
5241esac
5242fi
5243RM=$ac_cv_path_RM
5244if test -n "$RM"; then
5245  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
5246$as_echo "$RM" >&6; }
5247else
5248  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5249$as_echo "no" >&6; }
5250fi
5251
5252
5253  test -n "$RM" && break
5254done
5255
5256
5257  if test "x$RM" = x; then
5258    if test "xrm" = x; then
5259      PROG_NAME=rm
5260    else
5261      PROG_NAME=rm
5262    fi
5263    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5264$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5265    as_fn_error $? "Cannot continue" "$LINENO" 5
5266  fi
5267
5268
5269
5270  for ac_prog in sh
5271do
5272  # Extract the first word of "$ac_prog", so it can be a program name with args.
5273set dummy $ac_prog; ac_word=$2
5274{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5275$as_echo_n "checking for $ac_word... " >&6; }
5276if ${ac_cv_path_SH+:} false; then :
5277  $as_echo_n "(cached) " >&6
5278else
5279  case $SH in
5280  [\\/]* | ?:[\\/]*)
5281  ac_cv_path_SH="$SH" # Let the user override the test with a path.
5282  ;;
5283  *)
5284  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5285for as_dir in $PATH
5286do
5287  IFS=$as_save_IFS
5288  test -z "$as_dir" && as_dir=.
5289    for ac_exec_ext in '' $ac_executable_extensions; do
5290  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5291    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
5292    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5293    break 2
5294  fi
5295done
5296  done
5297IFS=$as_save_IFS
5298
5299  ;;
5300esac
5301fi
5302SH=$ac_cv_path_SH
5303if test -n "$SH"; then
5304  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
5305$as_echo "$SH" >&6; }
5306else
5307  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5308$as_echo "no" >&6; }
5309fi
5310
5311
5312  test -n "$SH" && break
5313done
5314
5315
5316  if test "x$SH" = x; then
5317    if test "xsh" = x; then
5318      PROG_NAME=sh
5319    else
5320      PROG_NAME=sh
5321    fi
5322    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5323$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5324    as_fn_error $? "Cannot continue" "$LINENO" 5
5325  fi
5326
5327
5328
5329  for ac_prog in sort
5330do
5331  # Extract the first word of "$ac_prog", so it can be a program name with args.
5332set dummy $ac_prog; ac_word=$2
5333{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5334$as_echo_n "checking for $ac_word... " >&6; }
5335if ${ac_cv_path_SORT+:} false; then :
5336  $as_echo_n "(cached) " >&6
5337else
5338  case $SORT in
5339  [\\/]* | ?:[\\/]*)
5340  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
5341  ;;
5342  *)
5343  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5344for as_dir in $PATH
5345do
5346  IFS=$as_save_IFS
5347  test -z "$as_dir" && as_dir=.
5348    for ac_exec_ext in '' $ac_executable_extensions; do
5349  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5350    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
5351    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5352    break 2
5353  fi
5354done
5355  done
5356IFS=$as_save_IFS
5357
5358  ;;
5359esac
5360fi
5361SORT=$ac_cv_path_SORT
5362if test -n "$SORT"; then
5363  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
5364$as_echo "$SORT" >&6; }
5365else
5366  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5367$as_echo "no" >&6; }
5368fi
5369
5370
5371  test -n "$SORT" && break
5372done
5373
5374
5375  if test "x$SORT" = x; then
5376    if test "xsort" = x; then
5377      PROG_NAME=sort
5378    else
5379      PROG_NAME=sort
5380    fi
5381    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5382$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5383    as_fn_error $? "Cannot continue" "$LINENO" 5
5384  fi
5385
5386
5387
5388  for ac_prog in tail
5389do
5390  # Extract the first word of "$ac_prog", so it can be a program name with args.
5391set dummy $ac_prog; ac_word=$2
5392{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5393$as_echo_n "checking for $ac_word... " >&6; }
5394if ${ac_cv_path_TAIL+:} false; then :
5395  $as_echo_n "(cached) " >&6
5396else
5397  case $TAIL in
5398  [\\/]* | ?:[\\/]*)
5399  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
5400  ;;
5401  *)
5402  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5403for as_dir in $PATH
5404do
5405  IFS=$as_save_IFS
5406  test -z "$as_dir" && as_dir=.
5407    for ac_exec_ext in '' $ac_executable_extensions; do
5408  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5409    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
5410    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5411    break 2
5412  fi
5413done
5414  done
5415IFS=$as_save_IFS
5416
5417  ;;
5418esac
5419fi
5420TAIL=$ac_cv_path_TAIL
5421if test -n "$TAIL"; then
5422  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
5423$as_echo "$TAIL" >&6; }
5424else
5425  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5426$as_echo "no" >&6; }
5427fi
5428
5429
5430  test -n "$TAIL" && break
5431done
5432
5433
5434  if test "x$TAIL" = x; then
5435    if test "xtail" = x; then
5436      PROG_NAME=tail
5437    else
5438      PROG_NAME=tail
5439    fi
5440    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5441$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5442    as_fn_error $? "Cannot continue" "$LINENO" 5
5443  fi
5444
5445
5446
5447  for ac_prog in tar
5448do
5449  # Extract the first word of "$ac_prog", so it can be a program name with args.
5450set dummy $ac_prog; ac_word=$2
5451{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5452$as_echo_n "checking for $ac_word... " >&6; }
5453if ${ac_cv_path_TAR+:} false; then :
5454  $as_echo_n "(cached) " >&6
5455else
5456  case $TAR in
5457  [\\/]* | ?:[\\/]*)
5458  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
5459  ;;
5460  *)
5461  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5462for as_dir in $PATH
5463do
5464  IFS=$as_save_IFS
5465  test -z "$as_dir" && as_dir=.
5466    for ac_exec_ext in '' $ac_executable_extensions; do
5467  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5468    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
5469    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5470    break 2
5471  fi
5472done
5473  done
5474IFS=$as_save_IFS
5475
5476  ;;
5477esac
5478fi
5479TAR=$ac_cv_path_TAR
5480if test -n "$TAR"; then
5481  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
5482$as_echo "$TAR" >&6; }
5483else
5484  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5485$as_echo "no" >&6; }
5486fi
5487
5488
5489  test -n "$TAR" && break
5490done
5491
5492
5493  if test "x$TAR" = x; then
5494    if test "xtar" = x; then
5495      PROG_NAME=tar
5496    else
5497      PROG_NAME=tar
5498    fi
5499    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5500$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5501    as_fn_error $? "Cannot continue" "$LINENO" 5
5502  fi
5503
5504
5505
5506  for ac_prog in tee
5507do
5508  # Extract the first word of "$ac_prog", so it can be a program name with args.
5509set dummy $ac_prog; ac_word=$2
5510{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5511$as_echo_n "checking for $ac_word... " >&6; }
5512if ${ac_cv_path_TEE+:} false; then :
5513  $as_echo_n "(cached) " >&6
5514else
5515  case $TEE in
5516  [\\/]* | ?:[\\/]*)
5517  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
5518  ;;
5519  *)
5520  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5521for as_dir in $PATH
5522do
5523  IFS=$as_save_IFS
5524  test -z "$as_dir" && as_dir=.
5525    for ac_exec_ext in '' $ac_executable_extensions; do
5526  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5527    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
5528    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5529    break 2
5530  fi
5531done
5532  done
5533IFS=$as_save_IFS
5534
5535  ;;
5536esac
5537fi
5538TEE=$ac_cv_path_TEE
5539if test -n "$TEE"; then
5540  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
5541$as_echo "$TEE" >&6; }
5542else
5543  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5544$as_echo "no" >&6; }
5545fi
5546
5547
5548  test -n "$TEE" && break
5549done
5550
5551
5552  if test "x$TEE" = x; then
5553    if test "xtee" = x; then
5554      PROG_NAME=tee
5555    else
5556      PROG_NAME=tee
5557    fi
5558    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5559$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5560    as_fn_error $? "Cannot continue" "$LINENO" 5
5561  fi
5562
5563
5564
5565  for ac_prog in touch
5566do
5567  # Extract the first word of "$ac_prog", so it can be a program name with args.
5568set dummy $ac_prog; ac_word=$2
5569{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5570$as_echo_n "checking for $ac_word... " >&6; }
5571if ${ac_cv_path_TOUCH+:} false; then :
5572  $as_echo_n "(cached) " >&6
5573else
5574  case $TOUCH in
5575  [\\/]* | ?:[\\/]*)
5576  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
5577  ;;
5578  *)
5579  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5580for as_dir in $PATH
5581do
5582  IFS=$as_save_IFS
5583  test -z "$as_dir" && as_dir=.
5584    for ac_exec_ext in '' $ac_executable_extensions; do
5585  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5586    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
5587    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5588    break 2
5589  fi
5590done
5591  done
5592IFS=$as_save_IFS
5593
5594  ;;
5595esac
5596fi
5597TOUCH=$ac_cv_path_TOUCH
5598if test -n "$TOUCH"; then
5599  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
5600$as_echo "$TOUCH" >&6; }
5601else
5602  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5603$as_echo "no" >&6; }
5604fi
5605
5606
5607  test -n "$TOUCH" && break
5608done
5609
5610
5611  if test "x$TOUCH" = x; then
5612    if test "xtouch" = x; then
5613      PROG_NAME=touch
5614    else
5615      PROG_NAME=touch
5616    fi
5617    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5618$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5619    as_fn_error $? "Cannot continue" "$LINENO" 5
5620  fi
5621
5622
5623
5624  for ac_prog in tr
5625do
5626  # Extract the first word of "$ac_prog", so it can be a program name with args.
5627set dummy $ac_prog; ac_word=$2
5628{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5629$as_echo_n "checking for $ac_word... " >&6; }
5630if ${ac_cv_path_TR+:} false; then :
5631  $as_echo_n "(cached) " >&6
5632else
5633  case $TR in
5634  [\\/]* | ?:[\\/]*)
5635  ac_cv_path_TR="$TR" # Let the user override the test with a path.
5636  ;;
5637  *)
5638  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5639for as_dir in $PATH
5640do
5641  IFS=$as_save_IFS
5642  test -z "$as_dir" && as_dir=.
5643    for ac_exec_ext in '' $ac_executable_extensions; do
5644  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5645    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
5646    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5647    break 2
5648  fi
5649done
5650  done
5651IFS=$as_save_IFS
5652
5653  ;;
5654esac
5655fi
5656TR=$ac_cv_path_TR
5657if test -n "$TR"; then
5658  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
5659$as_echo "$TR" >&6; }
5660else
5661  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5662$as_echo "no" >&6; }
5663fi
5664
5665
5666  test -n "$TR" && break
5667done
5668
5669
5670  if test "x$TR" = x; then
5671    if test "xtr" = x; then
5672      PROG_NAME=tr
5673    else
5674      PROG_NAME=tr
5675    fi
5676    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5677$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5678    as_fn_error $? "Cannot continue" "$LINENO" 5
5679  fi
5680
5681
5682
5683  for ac_prog in uname
5684do
5685  # Extract the first word of "$ac_prog", so it can be a program name with args.
5686set dummy $ac_prog; ac_word=$2
5687{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5688$as_echo_n "checking for $ac_word... " >&6; }
5689if ${ac_cv_path_UNAME+:} false; then :
5690  $as_echo_n "(cached) " >&6
5691else
5692  case $UNAME in
5693  [\\/]* | ?:[\\/]*)
5694  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
5695  ;;
5696  *)
5697  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5698for as_dir in $PATH
5699do
5700  IFS=$as_save_IFS
5701  test -z "$as_dir" && as_dir=.
5702    for ac_exec_ext in '' $ac_executable_extensions; do
5703  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5704    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
5705    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5706    break 2
5707  fi
5708done
5709  done
5710IFS=$as_save_IFS
5711
5712  ;;
5713esac
5714fi
5715UNAME=$ac_cv_path_UNAME
5716if test -n "$UNAME"; then
5717  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
5718$as_echo "$UNAME" >&6; }
5719else
5720  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5721$as_echo "no" >&6; }
5722fi
5723
5724
5725  test -n "$UNAME" && break
5726done
5727
5728
5729  if test "x$UNAME" = x; then
5730    if test "xuname" = x; then
5731      PROG_NAME=uname
5732    else
5733      PROG_NAME=uname
5734    fi
5735    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5736$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5737    as_fn_error $? "Cannot continue" "$LINENO" 5
5738  fi
5739
5740
5741
5742  for ac_prog in uniq
5743do
5744  # Extract the first word of "$ac_prog", so it can be a program name with args.
5745set dummy $ac_prog; ac_word=$2
5746{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5747$as_echo_n "checking for $ac_word... " >&6; }
5748if ${ac_cv_path_UNIQ+:} false; then :
5749  $as_echo_n "(cached) " >&6
5750else
5751  case $UNIQ in
5752  [\\/]* | ?:[\\/]*)
5753  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
5754  ;;
5755  *)
5756  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5757for as_dir in $PATH
5758do
5759  IFS=$as_save_IFS
5760  test -z "$as_dir" && as_dir=.
5761    for ac_exec_ext in '' $ac_executable_extensions; do
5762  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5763    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
5764    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5765    break 2
5766  fi
5767done
5768  done
5769IFS=$as_save_IFS
5770
5771  ;;
5772esac
5773fi
5774UNIQ=$ac_cv_path_UNIQ
5775if test -n "$UNIQ"; then
5776  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
5777$as_echo "$UNIQ" >&6; }
5778else
5779  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5780$as_echo "no" >&6; }
5781fi
5782
5783
5784  test -n "$UNIQ" && break
5785done
5786
5787
5788  if test "x$UNIQ" = x; then
5789    if test "xuniq" = x; then
5790      PROG_NAME=uniq
5791    else
5792      PROG_NAME=uniq
5793    fi
5794    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5795$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5796    as_fn_error $? "Cannot continue" "$LINENO" 5
5797  fi
5798
5799
5800
5801  for ac_prog in wc
5802do
5803  # Extract the first word of "$ac_prog", so it can be a program name with args.
5804set dummy $ac_prog; ac_word=$2
5805{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5806$as_echo_n "checking for $ac_word... " >&6; }
5807if ${ac_cv_path_WC+:} false; then :
5808  $as_echo_n "(cached) " >&6
5809else
5810  case $WC in
5811  [\\/]* | ?:[\\/]*)
5812  ac_cv_path_WC="$WC" # Let the user override the test with a path.
5813  ;;
5814  *)
5815  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5816for as_dir in $PATH
5817do
5818  IFS=$as_save_IFS
5819  test -z "$as_dir" && as_dir=.
5820    for ac_exec_ext in '' $ac_executable_extensions; do
5821  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5822    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
5823    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5824    break 2
5825  fi
5826done
5827  done
5828IFS=$as_save_IFS
5829
5830  ;;
5831esac
5832fi
5833WC=$ac_cv_path_WC
5834if test -n "$WC"; then
5835  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
5836$as_echo "$WC" >&6; }
5837else
5838  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5839$as_echo "no" >&6; }
5840fi
5841
5842
5843  test -n "$WC" && break
5844done
5845
5846
5847  if test "x$WC" = x; then
5848    if test "xwc" = x; then
5849      PROG_NAME=wc
5850    else
5851      PROG_NAME=wc
5852    fi
5853    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5854$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5855    as_fn_error $? "Cannot continue" "$LINENO" 5
5856  fi
5857
5858
5859
5860  for ac_prog in which
5861do
5862  # Extract the first word of "$ac_prog", so it can be a program name with args.
5863set dummy $ac_prog; ac_word=$2
5864{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5865$as_echo_n "checking for $ac_word... " >&6; }
5866if ${ac_cv_path_WHICH+:} false; then :
5867  $as_echo_n "(cached) " >&6
5868else
5869  case $WHICH in
5870  [\\/]* | ?:[\\/]*)
5871  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
5872  ;;
5873  *)
5874  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5875for as_dir in $PATH
5876do
5877  IFS=$as_save_IFS
5878  test -z "$as_dir" && as_dir=.
5879    for ac_exec_ext in '' $ac_executable_extensions; do
5880  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5881    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
5882    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5883    break 2
5884  fi
5885done
5886  done
5887IFS=$as_save_IFS
5888
5889  ;;
5890esac
5891fi
5892WHICH=$ac_cv_path_WHICH
5893if test -n "$WHICH"; then
5894  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
5895$as_echo "$WHICH" >&6; }
5896else
5897  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5898$as_echo "no" >&6; }
5899fi
5900
5901
5902  test -n "$WHICH" && break
5903done
5904
5905
5906  if test "x$WHICH" = x; then
5907    if test "xwhich" = x; then
5908      PROG_NAME=which
5909    else
5910      PROG_NAME=which
5911    fi
5912    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5913$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5914    as_fn_error $? "Cannot continue" "$LINENO" 5
5915  fi
5916
5917
5918
5919  for ac_prog in xargs
5920do
5921  # Extract the first word of "$ac_prog", so it can be a program name with args.
5922set dummy $ac_prog; ac_word=$2
5923{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5924$as_echo_n "checking for $ac_word... " >&6; }
5925if ${ac_cv_path_XARGS+:} false; then :
5926  $as_echo_n "(cached) " >&6
5927else
5928  case $XARGS in
5929  [\\/]* | ?:[\\/]*)
5930  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
5931  ;;
5932  *)
5933  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5934for as_dir in $PATH
5935do
5936  IFS=$as_save_IFS
5937  test -z "$as_dir" && as_dir=.
5938    for ac_exec_ext in '' $ac_executable_extensions; do
5939  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5940    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
5941    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5942    break 2
5943  fi
5944done
5945  done
5946IFS=$as_save_IFS
5947
5948  ;;
5949esac
5950fi
5951XARGS=$ac_cv_path_XARGS
5952if test -n "$XARGS"; then
5953  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
5954$as_echo "$XARGS" >&6; }
5955else
5956  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5957$as_echo "no" >&6; }
5958fi
5959
5960
5961  test -n "$XARGS" && break
5962done
5963
5964
5965  if test "x$XARGS" = x; then
5966    if test "xxargs" = x; then
5967      PROG_NAME=xargs
5968    else
5969      PROG_NAME=xargs
5970    fi
5971    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5972$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5973    as_fn_error $? "Cannot continue" "$LINENO" 5
5974  fi
5975
5976
5977
5978  # Then required tools that require some special treatment.
5979  for ac_prog in gawk mawk nawk awk
5980do
5981  # Extract the first word of "$ac_prog", so it can be a program name with args.
5982set dummy $ac_prog; ac_word=$2
5983{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5984$as_echo_n "checking for $ac_word... " >&6; }
5985if ${ac_cv_prog_AWK+:} false; then :
5986  $as_echo_n "(cached) " >&6
5987else
5988  if test -n "$AWK"; then
5989  ac_cv_prog_AWK="$AWK" # Let the user override the test.
5990else
5991as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5992for as_dir in $PATH
5993do
5994  IFS=$as_save_IFS
5995  test -z "$as_dir" && as_dir=.
5996    for ac_exec_ext in '' $ac_executable_extensions; do
5997  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5998    ac_cv_prog_AWK="$ac_prog"
5999    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6000    break 2
6001  fi
6002done
6003  done
6004IFS=$as_save_IFS
6005
6006fi
6007fi
6008AWK=$ac_cv_prog_AWK
6009if test -n "$AWK"; then
6010  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
6011$as_echo "$AWK" >&6; }
6012else
6013  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6014$as_echo "no" >&6; }
6015fi
6016
6017
6018  test -n "$AWK" && break
6019done
6020
6021
6022  if test "x$AWK" = x; then
6023    if test "x" = x; then
6024      PROG_NAME=awk
6025    else
6026      PROG_NAME=
6027    fi
6028    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6029$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6030    as_fn_error $? "Cannot continue" "$LINENO" 5
6031  fi
6032
6033  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
6034$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
6035if ${ac_cv_path_GREP+:} false; then :
6036  $as_echo_n "(cached) " >&6
6037else
6038  if test -z "$GREP"; then
6039  ac_path_GREP_found=false
6040  # Loop through the user's path and test for each of PROGNAME-LIST
6041  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6042for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6043do
6044  IFS=$as_save_IFS
6045  test -z "$as_dir" && as_dir=.
6046    for ac_prog in grep ggrep; do
6047    for ac_exec_ext in '' $ac_executable_extensions; do
6048      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
6049      as_fn_executable_p "$ac_path_GREP" || continue
6050# Check for GNU ac_path_GREP and select it if it is found.
6051  # Check for GNU $ac_path_GREP
6052case `"$ac_path_GREP" --version 2>&1` in
6053*GNU*)
6054  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
6055*)
6056  ac_count=0
6057  $as_echo_n 0123456789 >"conftest.in"
6058  while :
6059  do
6060    cat "conftest.in" "conftest.in" >"conftest.tmp"
6061    mv "conftest.tmp" "conftest.in"
6062    cp "conftest.in" "conftest.nl"
6063    $as_echo 'GREP' >> "conftest.nl"
6064    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6065    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6066    as_fn_arith $ac_count + 1 && ac_count=$as_val
6067    if test $ac_count -gt ${ac_path_GREP_max-0}; then
6068      # Best one so far, save it but keep looking for a better one
6069      ac_cv_path_GREP="$ac_path_GREP"
6070      ac_path_GREP_max=$ac_count
6071    fi
6072    # 10*(2^10) chars as input seems more than enough
6073    test $ac_count -gt 10 && break
6074  done
6075  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6076esac
6077
6078      $ac_path_GREP_found && break 3
6079    done
6080  done
6081  done
6082IFS=$as_save_IFS
6083  if test -z "$ac_cv_path_GREP"; then
6084    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6085  fi
6086else
6087  ac_cv_path_GREP=$GREP
6088fi
6089
6090fi
6091{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
6092$as_echo "$ac_cv_path_GREP" >&6; }
6093 GREP="$ac_cv_path_GREP"
6094
6095
6096
6097  if test "x$GREP" = x; then
6098    if test "x" = x; then
6099      PROG_NAME=grep
6100    else
6101      PROG_NAME=
6102    fi
6103    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6104$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6105    as_fn_error $? "Cannot continue" "$LINENO" 5
6106  fi
6107
6108  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
6109$as_echo_n "checking for egrep... " >&6; }
6110if ${ac_cv_path_EGREP+:} false; then :
6111  $as_echo_n "(cached) " >&6
6112else
6113  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
6114   then ac_cv_path_EGREP="$GREP -E"
6115   else
6116     if test -z "$EGREP"; then
6117  ac_path_EGREP_found=false
6118  # Loop through the user's path and test for each of PROGNAME-LIST
6119  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6120for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6121do
6122  IFS=$as_save_IFS
6123  test -z "$as_dir" && as_dir=.
6124    for ac_prog in egrep; do
6125    for ac_exec_ext in '' $ac_executable_extensions; do
6126      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
6127      as_fn_executable_p "$ac_path_EGREP" || continue
6128# Check for GNU ac_path_EGREP and select it if it is found.
6129  # Check for GNU $ac_path_EGREP
6130case `"$ac_path_EGREP" --version 2>&1` in
6131*GNU*)
6132  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
6133*)
6134  ac_count=0
6135  $as_echo_n 0123456789 >"conftest.in"
6136  while :
6137  do
6138    cat "conftest.in" "conftest.in" >"conftest.tmp"
6139    mv "conftest.tmp" "conftest.in"
6140    cp "conftest.in" "conftest.nl"
6141    $as_echo 'EGREP' >> "conftest.nl"
6142    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6143    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6144    as_fn_arith $ac_count + 1 && ac_count=$as_val
6145    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
6146      # Best one so far, save it but keep looking for a better one
6147      ac_cv_path_EGREP="$ac_path_EGREP"
6148      ac_path_EGREP_max=$ac_count
6149    fi
6150    # 10*(2^10) chars as input seems more than enough
6151    test $ac_count -gt 10 && break
6152  done
6153  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6154esac
6155
6156      $ac_path_EGREP_found && break 3
6157    done
6158  done
6159  done
6160IFS=$as_save_IFS
6161  if test -z "$ac_cv_path_EGREP"; then
6162    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6163  fi
6164else
6165  ac_cv_path_EGREP=$EGREP
6166fi
6167
6168   fi
6169fi
6170{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
6171$as_echo "$ac_cv_path_EGREP" >&6; }
6172 EGREP="$ac_cv_path_EGREP"
6173
6174
6175
6176  if test "x$EGREP" = x; then
6177    if test "x" = x; then
6178      PROG_NAME=egrep
6179    else
6180      PROG_NAME=
6181    fi
6182    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6183$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6184    as_fn_error $? "Cannot continue" "$LINENO" 5
6185  fi
6186
6187  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
6188$as_echo_n "checking for fgrep... " >&6; }
6189if ${ac_cv_path_FGREP+:} false; then :
6190  $as_echo_n "(cached) " >&6
6191else
6192  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
6193   then ac_cv_path_FGREP="$GREP -F"
6194   else
6195     if test -z "$FGREP"; then
6196  ac_path_FGREP_found=false
6197  # Loop through the user's path and test for each of PROGNAME-LIST
6198  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6199for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6200do
6201  IFS=$as_save_IFS
6202  test -z "$as_dir" && as_dir=.
6203    for ac_prog in fgrep; do
6204    for ac_exec_ext in '' $ac_executable_extensions; do
6205      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
6206      as_fn_executable_p "$ac_path_FGREP" || continue
6207# Check for GNU ac_path_FGREP and select it if it is found.
6208  # Check for GNU $ac_path_FGREP
6209case `"$ac_path_FGREP" --version 2>&1` in
6210*GNU*)
6211  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
6212*)
6213  ac_count=0
6214  $as_echo_n 0123456789 >"conftest.in"
6215  while :
6216  do
6217    cat "conftest.in" "conftest.in" >"conftest.tmp"
6218    mv "conftest.tmp" "conftest.in"
6219    cp "conftest.in" "conftest.nl"
6220    $as_echo 'FGREP' >> "conftest.nl"
6221    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
6222    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6223    as_fn_arith $ac_count + 1 && ac_count=$as_val
6224    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
6225      # Best one so far, save it but keep looking for a better one
6226      ac_cv_path_FGREP="$ac_path_FGREP"
6227      ac_path_FGREP_max=$ac_count
6228    fi
6229    # 10*(2^10) chars as input seems more than enough
6230    test $ac_count -gt 10 && break
6231  done
6232  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6233esac
6234
6235      $ac_path_FGREP_found && break 3
6236    done
6237  done
6238  done
6239IFS=$as_save_IFS
6240  if test -z "$ac_cv_path_FGREP"; then
6241    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6242  fi
6243else
6244  ac_cv_path_FGREP=$FGREP
6245fi
6246
6247   fi
6248fi
6249{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
6250$as_echo "$ac_cv_path_FGREP" >&6; }
6251 FGREP="$ac_cv_path_FGREP"
6252
6253
6254
6255  if test "x$FGREP" = x; then
6256    if test "x" = x; then
6257      PROG_NAME=fgrep
6258    else
6259      PROG_NAME=
6260    fi
6261    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6262$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6263    as_fn_error $? "Cannot continue" "$LINENO" 5
6264  fi
6265
6266  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
6267$as_echo_n "checking for a sed that does not truncate output... " >&6; }
6268if ${ac_cv_path_SED+:} false; then :
6269  $as_echo_n "(cached) " >&6
6270else
6271            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
6272     for ac_i in 1 2 3 4 5 6 7; do
6273       ac_script="$ac_script$as_nl$ac_script"
6274     done
6275     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
6276     { ac_script=; unset ac_script;}
6277     if test -z "$SED"; then
6278  ac_path_SED_found=false
6279  # Loop through the user's path and test for each of PROGNAME-LIST
6280  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6281for as_dir in $PATH
6282do
6283  IFS=$as_save_IFS
6284  test -z "$as_dir" && as_dir=.
6285    for ac_prog in sed gsed; do
6286    for ac_exec_ext in '' $ac_executable_extensions; do
6287      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
6288      as_fn_executable_p "$ac_path_SED" || continue
6289# Check for GNU ac_path_SED and select it if it is found.
6290  # Check for GNU $ac_path_SED
6291case `"$ac_path_SED" --version 2>&1` in
6292*GNU*)
6293  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
6294*)
6295  ac_count=0
6296  $as_echo_n 0123456789 >"conftest.in"
6297  while :
6298  do
6299    cat "conftest.in" "conftest.in" >"conftest.tmp"
6300    mv "conftest.tmp" "conftest.in"
6301    cp "conftest.in" "conftest.nl"
6302    $as_echo '' >> "conftest.nl"
6303    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
6304    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6305    as_fn_arith $ac_count + 1 && ac_count=$as_val
6306    if test $ac_count -gt ${ac_path_SED_max-0}; then
6307      # Best one so far, save it but keep looking for a better one
6308      ac_cv_path_SED="$ac_path_SED"
6309      ac_path_SED_max=$ac_count
6310    fi
6311    # 10*(2^10) chars as input seems more than enough
6312    test $ac_count -gt 10 && break
6313  done
6314  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6315esac
6316
6317      $ac_path_SED_found && break 3
6318    done
6319  done
6320  done
6321IFS=$as_save_IFS
6322  if test -z "$ac_cv_path_SED"; then
6323    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
6324  fi
6325else
6326  ac_cv_path_SED=$SED
6327fi
6328
6329fi
6330{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
6331$as_echo "$ac_cv_path_SED" >&6; }
6332 SED="$ac_cv_path_SED"
6333  rm -f conftest.sed
6334
6335
6336  if test "x$SED" = x; then
6337    if test "x" = x; then
6338      PROG_NAME=sed
6339    else
6340      PROG_NAME=
6341    fi
6342    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6343$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6344    as_fn_error $? "Cannot continue" "$LINENO" 5
6345  fi
6346
6347
6348  for ac_prog in nawk gawk awk
6349do
6350  # Extract the first word of "$ac_prog", so it can be a program name with args.
6351set dummy $ac_prog; ac_word=$2
6352{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6353$as_echo_n "checking for $ac_word... " >&6; }
6354if ${ac_cv_path_NAWK+:} false; then :
6355  $as_echo_n "(cached) " >&6
6356else
6357  case $NAWK in
6358  [\\/]* | ?:[\\/]*)
6359  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
6360  ;;
6361  *)
6362  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6363for as_dir in $PATH
6364do
6365  IFS=$as_save_IFS
6366  test -z "$as_dir" && as_dir=.
6367    for ac_exec_ext in '' $ac_executable_extensions; do
6368  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6369    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
6370    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6371    break 2
6372  fi
6373done
6374  done
6375IFS=$as_save_IFS
6376
6377  ;;
6378esac
6379fi
6380NAWK=$ac_cv_path_NAWK
6381if test -n "$NAWK"; then
6382  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
6383$as_echo "$NAWK" >&6; }
6384else
6385  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6386$as_echo "no" >&6; }
6387fi
6388
6389
6390  test -n "$NAWK" && break
6391done
6392
6393
6394  if test "x$NAWK" = x; then
6395    if test "x" = x; then
6396      PROG_NAME=nawk
6397    else
6398      PROG_NAME=
6399    fi
6400    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6401$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6402    as_fn_error $? "Cannot continue" "$LINENO" 5
6403  fi
6404
6405
6406  # Always force rm.
6407  RM="$RM -f"
6408
6409  # pwd behaves differently on various platforms and some don't support the -L flag.
6410  # Always use the bash builtin pwd to get uniform behavior.
6411  THEPWDCMD=pwd
6412
6413  # These are not required on all platforms
6414  # Extract the first word of "cygpath", so it can be a program name with args.
6415set dummy cygpath; ac_word=$2
6416{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6417$as_echo_n "checking for $ac_word... " >&6; }
6418if ${ac_cv_path_CYGPATH+:} false; then :
6419  $as_echo_n "(cached) " >&6
6420else
6421  case $CYGPATH in
6422  [\\/]* | ?:[\\/]*)
6423  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
6424  ;;
6425  *)
6426  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6427for as_dir in $PATH
6428do
6429  IFS=$as_save_IFS
6430  test -z "$as_dir" && as_dir=.
6431    for ac_exec_ext in '' $ac_executable_extensions; do
6432  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6433    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
6434    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6435    break 2
6436  fi
6437done
6438  done
6439IFS=$as_save_IFS
6440
6441  ;;
6442esac
6443fi
6444CYGPATH=$ac_cv_path_CYGPATH
6445if test -n "$CYGPATH"; then
6446  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
6447$as_echo "$CYGPATH" >&6; }
6448else
6449  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6450$as_echo "no" >&6; }
6451fi
6452
6453
6454  # Extract the first word of "readlink", so it can be a program name with args.
6455set dummy readlink; ac_word=$2
6456{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6457$as_echo_n "checking for $ac_word... " >&6; }
6458if ${ac_cv_path_READLINK+:} false; then :
6459  $as_echo_n "(cached) " >&6
6460else
6461  case $READLINK in
6462  [\\/]* | ?:[\\/]*)
6463  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
6464  ;;
6465  *)
6466  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6467for as_dir in $PATH
6468do
6469  IFS=$as_save_IFS
6470  test -z "$as_dir" && as_dir=.
6471    for ac_exec_ext in '' $ac_executable_extensions; do
6472  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6473    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
6474    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6475    break 2
6476  fi
6477done
6478  done
6479IFS=$as_save_IFS
6480
6481  ;;
6482esac
6483fi
6484READLINK=$ac_cv_path_READLINK
6485if test -n "$READLINK"; then
6486  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
6487$as_echo "$READLINK" >&6; }
6488else
6489  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6490$as_echo "no" >&6; }
6491fi
6492
6493
6494  # Extract the first word of "df", so it can be a program name with args.
6495set dummy df; ac_word=$2
6496{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6497$as_echo_n "checking for $ac_word... " >&6; }
6498if ${ac_cv_path_DF+:} false; then :
6499  $as_echo_n "(cached) " >&6
6500else
6501  case $DF in
6502  [\\/]* | ?:[\\/]*)
6503  ac_cv_path_DF="$DF" # Let the user override the test with a path.
6504  ;;
6505  *)
6506  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6507for as_dir in $PATH
6508do
6509  IFS=$as_save_IFS
6510  test -z "$as_dir" && as_dir=.
6511    for ac_exec_ext in '' $ac_executable_extensions; do
6512  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6513    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
6514    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6515    break 2
6516  fi
6517done
6518  done
6519IFS=$as_save_IFS
6520
6521  ;;
6522esac
6523fi
6524DF=$ac_cv_path_DF
6525if test -n "$DF"; then
6526  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
6527$as_echo "$DF" >&6; }
6528else
6529  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6530$as_echo "no" >&6; }
6531fi
6532
6533
6534  # Extract the first word of "SetFile", so it can be a program name with args.
6535set dummy SetFile; ac_word=$2
6536{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6537$as_echo_n "checking for $ac_word... " >&6; }
6538if ${ac_cv_path_SETFILE+:} false; then :
6539  $as_echo_n "(cached) " >&6
6540else
6541  case $SETFILE in
6542  [\\/]* | ?:[\\/]*)
6543  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
6544  ;;
6545  *)
6546  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6547for as_dir in $PATH
6548do
6549  IFS=$as_save_IFS
6550  test -z "$as_dir" && as_dir=.
6551    for ac_exec_ext in '' $ac_executable_extensions; do
6552  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6553    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
6554    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6555    break 2
6556  fi
6557done
6558  done
6559IFS=$as_save_IFS
6560
6561  ;;
6562esac
6563fi
6564SETFILE=$ac_cv_path_SETFILE
6565if test -n "$SETFILE"; then
6566  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
6567$as_echo "$SETFILE" >&6; }
6568else
6569  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6570$as_echo "no" >&6; }
6571fi
6572
6573
6574
6575
6576# Now we can determine OpenJDK build and target platforms. This is required to
6577# have early on.
6578# Make sure we can run config.sub.
6579$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
6580  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
6581
6582{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
6583$as_echo_n "checking build system type... " >&6; }
6584if ${ac_cv_build+:} false; then :
6585  $as_echo_n "(cached) " >&6
6586else
6587  ac_build_alias=$build_alias
6588test "x$ac_build_alias" = x &&
6589  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
6590test "x$ac_build_alias" = x &&
6591  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
6592ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
6593  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
6594
6595fi
6596{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
6597$as_echo "$ac_cv_build" >&6; }
6598case $ac_cv_build in
6599*-*-*) ;;
6600*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
6601esac
6602build=$ac_cv_build
6603ac_save_IFS=$IFS; IFS='-'
6604set x $ac_cv_build
6605shift
6606build_cpu=$1
6607build_vendor=$2
6608shift; shift
6609# Remember, the first character of IFS is used to create $*,
6610# except with old shells:
6611build_os=$*
6612IFS=$ac_save_IFS
6613case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
6614
6615
6616{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
6617$as_echo_n "checking host system type... " >&6; }
6618if ${ac_cv_host+:} false; then :
6619  $as_echo_n "(cached) " >&6
6620else
6621  if test "x$host_alias" = x; then
6622  ac_cv_host=$ac_cv_build
6623else
6624  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
6625    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
6626fi
6627
6628fi
6629{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
6630$as_echo "$ac_cv_host" >&6; }
6631case $ac_cv_host in
6632*-*-*) ;;
6633*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
6634esac
6635host=$ac_cv_host
6636ac_save_IFS=$IFS; IFS='-'
6637set x $ac_cv_host
6638shift
6639host_cpu=$1
6640host_vendor=$2
6641shift; shift
6642# Remember, the first character of IFS is used to create $*,
6643# except with old shells:
6644host_os=$*
6645IFS=$ac_save_IFS
6646case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
6647
6648
6649{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
6650$as_echo_n "checking target system type... " >&6; }
6651if ${ac_cv_target+:} false; then :
6652  $as_echo_n "(cached) " >&6
6653else
6654  if test "x$target_alias" = x; then
6655  ac_cv_target=$ac_cv_host
6656else
6657  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
6658    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
6659fi
6660
6661fi
6662{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
6663$as_echo "$ac_cv_target" >&6; }
6664case $ac_cv_target in
6665*-*-*) ;;
6666*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
6667esac
6668target=$ac_cv_target
6669ac_save_IFS=$IFS; IFS='-'
6670set x $ac_cv_target
6671shift
6672target_cpu=$1
6673target_vendor=$2
6674shift; shift
6675# Remember, the first character of IFS is used to create $*,
6676# except with old shells:
6677target_os=$*
6678IFS=$ac_save_IFS
6679case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
6680
6681
6682# The aliases save the names the user supplied, while $host etc.
6683# will get canonicalized.
6684test -n "$target_alias" &&
6685  test "$program_prefix$program_suffix$program_transform_name" = \
6686    NONENONEs,x,x, &&
6687  program_prefix=${target_alias}-
6688
6689  # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
6690  # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
6691  # product you're building. The target of this build is called "host". Since this is confusing to most people, we
6692  # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
6693  # to use the configure naming style.
6694
6695
6696
6697
6698
6699  # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
6700  # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
6701  # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
6702  # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
6703  OPENJDK_TARGET_AUTOCONF_NAME="$host"
6704  OPENJDK_BUILD_AUTOCONF_NAME="$build"
6705
6706
6707
6708  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
6709
6710  case "$build_os" in
6711    *linux*)
6712      VAR_OS=linux
6713      VAR_OS_API=posix
6714      VAR_OS_ENV=linux
6715      ;;
6716    *solaris*)
6717      VAR_OS=solaris
6718      VAR_OS_API=posix
6719      VAR_OS_ENV=solaris
6720      ;;
6721    *darwin*)
6722      VAR_OS=macosx
6723      VAR_OS_API=posix
6724      VAR_OS_ENV=macosx
6725      ;;
6726    *bsd*)
6727      VAR_OS=bsd
6728      VAR_OS_API=posix
6729      VAR_OS_ENV=bsd
6730      ;;
6731    *cygwin*)
6732      VAR_OS=windows
6733      VAR_OS_API=winapi
6734      VAR_OS_ENV=windows.cygwin
6735      ;;
6736    *mingw*)
6737      VAR_OS=windows
6738      VAR_OS_API=winapi
6739      VAR_OS_ENV=windows.msys
6740      ;;
6741    *)
6742      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
6743      ;;
6744  esac
6745
6746
6747  # First argument is the cpu name from the trip/quad
6748  case "$build_cpu" in
6749    x86_64)
6750      VAR_CPU=x86_64
6751      VAR_CPU_ARCH=x86
6752      VAR_CPU_BITS=64
6753      VAR_CPU_ENDIAN=little
6754      ;;
6755    i?86)
6756      VAR_CPU=x86
6757      VAR_CPU_ARCH=x86
6758      VAR_CPU_BITS=32
6759      VAR_CPU_ENDIAN=little
6760      ;;
6761    arm*)
6762      VAR_CPU=arm
6763      VAR_CPU_ARCH=arm
6764      VAR_CPU_BITS=32
6765      VAR_CPU_ENDIAN=little
6766      ;;
6767    powerpc)
6768      VAR_CPU=ppc
6769      VAR_CPU_ARCH=ppc
6770      VAR_CPU_BITS=32
6771      VAR_CPU_ENDIAN=big
6772      ;;
6773    powerpc64)
6774      VAR_CPU=ppc64
6775      VAR_CPU_ARCH=ppc
6776      VAR_CPU_BITS=64
6777      VAR_CPU_ENDIAN=big
6778      ;;
6779    s390)
6780      VAR_CPU=s390
6781      VAR_CPU_ARCH=s390
6782      VAR_CPU_BITS=32
6783      VAR_CPU_ENDIAN=big
6784      ;;
6785    s390x)
6786      VAR_CPU=s390x
6787      VAR_CPU_ARCH=s390
6788      VAR_CPU_BITS=64
6789      VAR_CPU_ENDIAN=big
6790      ;;
6791    sparc)
6792      VAR_CPU=sparc
6793      VAR_CPU_ARCH=sparc
6794      VAR_CPU_BITS=32
6795      VAR_CPU_ENDIAN=big
6796      ;;
6797    sparcv9)
6798      VAR_CPU=sparcv9
6799      VAR_CPU_ARCH=sparc
6800      VAR_CPU_BITS=64
6801      VAR_CPU_ENDIAN=big
6802      ;;
6803    *)
6804      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
6805      ;;
6806  esac
6807
6808  # ..and setup our own variables. (Do this explicitely to facilitate searching)
6809  OPENJDK_BUILD_OS="$VAR_OS"
6810  OPENJDK_BUILD_OS_API="$VAR_OS_API"
6811  OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
6812  OPENJDK_BUILD_CPU="$VAR_CPU"
6813  OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
6814  OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
6815  OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
6816
6817
6818
6819
6820
6821
6822
6823  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
6824$as_echo_n "checking openjdk-build os-cpu... " >&6; }
6825  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
6826$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
6827
6828  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
6829
6830  case "$host_os" in
6831    *linux*)
6832      VAR_OS=linux
6833      VAR_OS_API=posix
6834      VAR_OS_ENV=linux
6835      ;;
6836    *solaris*)
6837      VAR_OS=solaris
6838      VAR_OS_API=posix
6839      VAR_OS_ENV=solaris
6840      ;;
6841    *darwin*)
6842      VAR_OS=macosx
6843      VAR_OS_API=posix
6844      VAR_OS_ENV=macosx
6845      ;;
6846    *bsd*)
6847      VAR_OS=bsd
6848      VAR_OS_API=posix
6849      VAR_OS_ENV=bsd
6850      ;;
6851    *cygwin*)
6852      VAR_OS=windows
6853      VAR_OS_API=winapi
6854      VAR_OS_ENV=windows.cygwin
6855      ;;
6856    *mingw*)
6857      VAR_OS=windows
6858      VAR_OS_API=winapi
6859      VAR_OS_ENV=windows.msys
6860      ;;
6861    *)
6862      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
6863      ;;
6864  esac
6865
6866
6867  # First argument is the cpu name from the trip/quad
6868  case "$host_cpu" in
6869    x86_64)
6870      VAR_CPU=x86_64
6871      VAR_CPU_ARCH=x86
6872      VAR_CPU_BITS=64
6873      VAR_CPU_ENDIAN=little
6874      ;;
6875    i?86)
6876      VAR_CPU=x86
6877      VAR_CPU_ARCH=x86
6878      VAR_CPU_BITS=32
6879      VAR_CPU_ENDIAN=little
6880      ;;
6881    arm*)
6882      VAR_CPU=arm
6883      VAR_CPU_ARCH=arm
6884      VAR_CPU_BITS=32
6885      VAR_CPU_ENDIAN=little
6886      ;;
6887    powerpc)
6888      VAR_CPU=ppc
6889      VAR_CPU_ARCH=ppc
6890      VAR_CPU_BITS=32
6891      VAR_CPU_ENDIAN=big
6892      ;;
6893    powerpc64)
6894      VAR_CPU=ppc64
6895      VAR_CPU_ARCH=ppc
6896      VAR_CPU_BITS=64
6897      VAR_CPU_ENDIAN=big
6898      ;;
6899    s390)
6900      VAR_CPU=s390
6901      VAR_CPU_ARCH=s390
6902      VAR_CPU_BITS=32
6903      VAR_CPU_ENDIAN=big
6904      ;;
6905    s390x)
6906      VAR_CPU=s390x
6907      VAR_CPU_ARCH=s390
6908      VAR_CPU_BITS=64
6909      VAR_CPU_ENDIAN=big
6910      ;;
6911    sparc)
6912      VAR_CPU=sparc
6913      VAR_CPU_ARCH=sparc
6914      VAR_CPU_BITS=32
6915      VAR_CPU_ENDIAN=big
6916      ;;
6917    sparcv9)
6918      VAR_CPU=sparcv9
6919      VAR_CPU_ARCH=sparc
6920      VAR_CPU_BITS=64
6921      VAR_CPU_ENDIAN=big
6922      ;;
6923    *)
6924      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
6925      ;;
6926  esac
6927
6928  # ... and setup our own variables. (Do this explicitely to facilitate searching)
6929  OPENJDK_TARGET_OS="$VAR_OS"
6930  OPENJDK_TARGET_OS_API="$VAR_OS_API"
6931  OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
6932  OPENJDK_TARGET_CPU="$VAR_CPU"
6933  OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
6934  OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
6935  OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
6936
6937
6938
6939
6940
6941
6942
6943  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
6944$as_echo_n "checking openjdk-target os-cpu... " >&6; }
6945  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
6946$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
6947
6948
6949
6950# Check whether --with-target-bits was given.
6951if test "${with_target_bits+set}" = set; then :
6952  withval=$with_target_bits;
6953fi
6954
6955
6956  # We have three types of compiles:
6957  # native  == normal compilation, target system == build system
6958  # cross   == traditional cross compilation, target system != build system; special toolchain needed
6959  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
6960  #
6961  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
6962    # We're doing a proper cross-compilation
6963    COMPILE_TYPE="cross"
6964  else
6965    COMPILE_TYPE="native"
6966  fi
6967
6968  if test "x$with_target_bits" != x; then
6969    if test "x$COMPILE_TYPE" = "xcross"; then
6970      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
6971    fi
6972
6973    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
6974      # A reduced build is requested
6975      COMPILE_TYPE="reduced"
6976      OPENJDK_TARGET_CPU_BITS=32
6977      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
6978        OPENJDK_TARGET_CPU=x86
6979      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
6980        OPENJDK_TARGET_CPU=sparc
6981      else
6982        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
6983      fi
6984    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
6985      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
6986    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
6987      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
6988$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
6989    else
6990      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
6991    fi
6992  fi
6993
6994
6995  { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
6996$as_echo_n "checking compilation type... " >&6; }
6997  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
6998$as_echo "$COMPILE_TYPE" >&6; }
6999
7000
7001  if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
7002    REQUIRED_OS_NAME=SunOS
7003    REQUIRED_OS_VERSION=5.10
7004  fi
7005  if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
7006    REQUIRED_OS_NAME=Linux
7007    REQUIRED_OS_VERSION=2.6
7008  fi
7009  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
7010    REQUIRED_OS_NAME=Windows
7011    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
7012      REQUIRED_OS_VERSION=5.2
7013    else
7014      REQUIRED_OS_VERSION=5.1
7015    fi
7016  fi
7017  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
7018    REQUIRED_OS_NAME=Darwin
7019    REQUIRED_OS_VERSION=11.2
7020  fi
7021
7022
7023
7024
7025
7026  # Also store the legacy naming of the cpu.
7027  # Ie i586 and amd64 instead of x86 and x86_64
7028  OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
7029  if test "x$OPENJDK_TARGET_CPU" = xx86; then
7030    OPENJDK_TARGET_CPU_LEGACY="i586"
7031  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7032    # On all platforms except MacOSX replace x86_64 with amd64.
7033    OPENJDK_TARGET_CPU_LEGACY="amd64"
7034  fi
7035
7036
7037  # And the second legacy naming of the cpu.
7038  # Ie i386 and amd64 instead of x86 and x86_64.
7039  OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
7040  if test "x$OPENJDK_TARGET_CPU" = xx86; then
7041    OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
7042  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7043    OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
7044  fi
7045
7046
7047  # This is the name of the cpu (but using i386 and amd64 instead of
7048  # x86 and x86_64, respectively), preceeded by a /, to be used when
7049  # locating libraries. On macosx, it's empty, though.
7050  OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
7051  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
7052    OPENJDK_TARGET_CPU_LIBDIR=""
7053  fi
7054
7055
7056  # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
7057  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
7058  # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
7059  OPENJDK_TARGET_CPU_ISADIR=""
7060  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
7061    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7062      OPENJDK_TARGET_CPU_ISADIR="/amd64"
7063    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
7064      OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
7065    fi
7066  fi
7067
7068
7069  # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
7070  OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
7071  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
7072    # On linux only, we replace x86 with i386.
7073    OPENJDK_TARGET_CPU_OSARCH="i386"
7074  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7075    # On all platforms except macosx, we replace x86_64 with amd64.
7076    OPENJDK_TARGET_CPU_OSARCH="amd64"
7077  fi
7078
7079
7080  OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
7081  if test "x$OPENJDK_TARGET_CPU" = xx86; then
7082    OPENJDK_TARGET_CPU_JLI="i386"
7083  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7084    # On all platforms except macosx, we replace x86_64 with amd64.
7085    OPENJDK_TARGET_CPU_JLI="amd64"
7086  fi
7087  # Now setup the -D flags for building libjli.
7088  OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
7089  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
7090    if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
7091      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
7092    elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
7093      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
7094    fi
7095  fi
7096
7097
7098  # Setup OPENJDK_TARGET_OS_API_DIR, used in source paths.
7099  if test "x$OPENJDK_TARGET_OS_API" = xposix; then
7100    OPENJDK_TARGET_OS_API_DIR="solaris"
7101  fi
7102  if test "x$OPENJDK_TARGET_OS_API" = xwinapi; then
7103    OPENJDK_TARGET_OS_API_DIR="windows"
7104  fi
7105
7106
7107  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7108    A_LP64="LP64:="
7109    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
7110    # unpack200.exe
7111    if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
7112      ADD_LP64="-D_LP64=1"
7113    fi
7114  fi
7115  LP64=$A_LP64
7116
7117
7118  if test "x$COMPILE_TYPE" = "xcross"; then
7119    # FIXME: ... or should this include reduced builds..?
7120    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
7121  else
7122    DEFINE_CROSS_COMPILE_ARCH=""
7123  fi
7124
7125
7126  # ZERO_ARCHDEF is used to enable architecture-specific code
7127  case "${OPENJDK_TARGET_CPU}" in
7128    ppc*)    ZERO_ARCHDEF=PPC   ;;
7129    s390*)   ZERO_ARCHDEF=S390  ;;
7130    sparc*)  ZERO_ARCHDEF=SPARC ;;
7131    x86_64*) ZERO_ARCHDEF=AMD64 ;;
7132    x86)     ZERO_ARCHDEF=IA32  ;;
7133    *)      ZERO_ARCHDEF=$(echo "${OPENJDK_TARGET_CPU_LEGACY_LIB}" | tr a-z A-Z)
7134  esac
7135
7136
7137
7138
7139# Continue setting up basic stuff. Most remaining code require fundamental tools.
7140
7141  # Locate the directory of this script.
7142  SCRIPT="$0"
7143  AUTOCONF_DIR=`cd \`$DIRNAME $SCRIPT\`; $THEPWDCMD -L`
7144
7145  # Where is the source? It is located two levels above the configure script.
7146  CURDIR="$PWD"
7147  cd "$AUTOCONF_DIR/../.."
7148  SRC_ROOT="`$THEPWDCMD -L`"
7149
7150  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
7151    PATH_SEP=";"
7152
7153  SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
7154  if test $SRC_ROOT_LENGTH -gt 100; then
7155    as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
7156  fi
7157
7158  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7159    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
7160$as_echo_n "checking cygwin release... " >&6; }
7161    CYGWIN_VERSION=`$UNAME -r`
7162    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
7163$as_echo "$CYGWIN_VERSION" >&6; }
7164    WINDOWS_ENV_VENDOR='cygwin'
7165    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
7166
7167    CYGWIN_VERSION_OK=`$ECHO $CYGWIN_VERSION | $GREP ^1.7.`
7168    if test "x$CYGWIN_VERSION_OK" = x; then
7169      { $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
7170$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;}
7171      as_fn_error $? "Cannot continue" "$LINENO" 5
7172    fi
7173    if test "x$CYGPATH" = x; then
7174      as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
7175    fi
7176    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
7177$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
7178    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
7179    cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
7180    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
7181    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
7182    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
7183$as_echo "$CYGWIN_ROOT_PATH" >&6; }
7184    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
7185    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
7186    if test "x$test_cygdrive_prefix" = x; then
7187      as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
7188    fi
7189  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7190    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
7191$as_echo_n "checking msys release... " >&6; }
7192    MSYS_VERSION=`$UNAME -r`
7193    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
7194$as_echo "$MSYS_VERSION" >&6; }
7195
7196    WINDOWS_ENV_VENDOR='msys'
7197    WINDOWS_ENV_VERSION="$MSYS_VERSION"
7198
7199    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
7200$as_echo_n "checking msys root directory as unix-style path... " >&6; }
7201    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
7202    MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
7203
7204  windows_path="$MSYS_ROOT_PATH"
7205  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7206    unix_path=`$CYGPATH -u "$windows_path"`
7207    MSYS_ROOT_PATH="$unix_path"
7208  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7209    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7210    MSYS_ROOT_PATH="$unix_path"
7211  fi
7212
7213    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
7214$as_echo "$MSYS_ROOT_PATH" >&6; }
7215    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
7216  else
7217    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
7218  fi
7219
7220  # Test if windows or unix (cygwin/msys) find is first in path.
7221  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
7222$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
7223  FIND_BINARY_OUTPUT=`find --version 2>&1`
7224  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
7225    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
7226$as_echo "unix style" >&6; }
7227  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
7228    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
7229$as_echo "Windows" >&6; }
7230    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
7231$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
7232    { $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
7233$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
7234    as_fn_error $? "Cannot continue" "$LINENO" 5
7235  else
7236    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
7237$as_echo "unknown" >&6; }
7238    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
7239$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
7240  fi
7241
7242  else
7243    PATH_SEP=":"
7244  fi
7245
7246
7247
7248  cd "$CURDIR"
7249
7250
7251  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7252
7253  # Input might be given as Windows format, start by converting to
7254  # unix format.
7255  path="$SRC_ROOT"
7256  new_path=`$CYGPATH -u "$path"`
7257
7258  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7259  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7260  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7261  # "foo.exe" is OK but "foo" is an error.
7262  #
7263  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7264  # It is also a way to make sure we got the proper file name for the real test later on.
7265  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7266  if test "x$test_shortpath" = x; then
7267    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5
7268$as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;}
7269    as_fn_error $? "Cannot locate the the path of SRC_ROOT" "$LINENO" 5
7270  fi
7271
7272  # Call helper function which possibly converts this using DOS-style short mode.
7273  # If so, the updated path is stored in $new_path.
7274
7275  input_path="$new_path"
7276  # Check if we need to convert this using DOS-style short mode. If the path
7277  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7278  # take no chances and rewrite it.
7279  # Note: m4 eats our [], so we need to use [ and ] instead.
7280  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7281  if test "x$has_forbidden_chars" != x; then
7282    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7283    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7284    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7285    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7286      # Going to short mode and back again did indeed matter. Since short mode is
7287      # case insensitive, let's make it lowercase to improve readability.
7288      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7289      # Now convert it back to Unix-stile (cygpath)
7290      input_path=`$CYGPATH -u "$shortmode_path"`
7291      new_path="$input_path"
7292    fi
7293  fi
7294
7295  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7296  if test "x$test_cygdrive_prefix" = x; then
7297    # As a simple fix, exclude /usr/bin since it's not a real path.
7298    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7299      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7300      # a path prefixed by /cygdrive for fixpath to work.
7301      new_path="$CYGWIN_ROOT_PATH$input_path"
7302    fi
7303  fi
7304
7305
7306  if test "x$path" != "x$new_path"; then
7307    SRC_ROOT="$new_path"
7308    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5
7309$as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;}
7310  fi
7311
7312  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7313
7314  path="$SRC_ROOT"
7315  has_colon=`$ECHO $path | $GREP ^.:`
7316  new_path="$path"
7317  if test "x$has_colon" = x; then
7318    # Not in mixed or Windows style, start by that.
7319    new_path=`cmd //c echo $path`
7320  fi
7321
7322
7323  input_path="$new_path"
7324  # Check if we need to convert this using DOS-style short mode. If the path
7325  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7326  # take no chances and rewrite it.
7327  # Note: m4 eats our [], so we need to use [ and ] instead.
7328  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7329  if test "x$has_forbidden_chars" != x; then
7330    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7331    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7332  fi
7333
7334
7335  windows_path="$new_path"
7336  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7337    unix_path=`$CYGPATH -u "$windows_path"`
7338    new_path="$unix_path"
7339  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7340    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7341    new_path="$unix_path"
7342  fi
7343
7344  if test "x$path" != "x$new_path"; then
7345    SRC_ROOT="$new_path"
7346    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5
7347$as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;}
7348  fi
7349
7350  # Save the first 10 bytes of this path to the storage, so fixpath can work.
7351  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7352
7353  else
7354    # We're on a posix platform. Hooray! :)
7355    path="$SRC_ROOT"
7356    has_space=`$ECHO "$path" | $GREP " "`
7357    if test "x$has_space" != x; then
7358      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5
7359$as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;}
7360      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7361    fi
7362
7363    # Use eval to expand a potential ~
7364    eval path="$path"
7365    if test ! -f "$path" && test ! -d "$path"; then
7366      as_fn_error $? "The path of SRC_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
7367    fi
7368
7369    SRC_ROOT="`cd "$path"; $THEPWDCMD -L`"
7370  fi
7371
7372
7373  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7374
7375  # Input might be given as Windows format, start by converting to
7376  # unix format.
7377  path="$CURDIR"
7378  new_path=`$CYGPATH -u "$path"`
7379
7380  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7381  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7382  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7383  # "foo.exe" is OK but "foo" is an error.
7384  #
7385  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7386  # It is also a way to make sure we got the proper file name for the real test later on.
7387  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7388  if test "x$test_shortpath" = x; then
7389    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
7390$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
7391    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
7392  fi
7393
7394  # Call helper function which possibly converts this using DOS-style short mode.
7395  # If so, the updated path is stored in $new_path.
7396
7397  input_path="$new_path"
7398  # Check if we need to convert this using DOS-style short mode. If the path
7399  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7400  # take no chances and rewrite it.
7401  # Note: m4 eats our [], so we need to use [ and ] instead.
7402  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7403  if test "x$has_forbidden_chars" != x; then
7404    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7405    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7406    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7407    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7408      # Going to short mode and back again did indeed matter. Since short mode is
7409      # case insensitive, let's make it lowercase to improve readability.
7410      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7411      # Now convert it back to Unix-stile (cygpath)
7412      input_path=`$CYGPATH -u "$shortmode_path"`
7413      new_path="$input_path"
7414    fi
7415  fi
7416
7417  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7418  if test "x$test_cygdrive_prefix" = x; then
7419    # As a simple fix, exclude /usr/bin since it's not a real path.
7420    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7421      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7422      # a path prefixed by /cygdrive for fixpath to work.
7423      new_path="$CYGWIN_ROOT_PATH$input_path"
7424    fi
7425  fi
7426
7427
7428  if test "x$path" != "x$new_path"; then
7429    CURDIR="$new_path"
7430    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
7431$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
7432  fi
7433
7434  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7435
7436  path="$CURDIR"
7437  has_colon=`$ECHO $path | $GREP ^.:`
7438  new_path="$path"
7439  if test "x$has_colon" = x; then
7440    # Not in mixed or Windows style, start by that.
7441    new_path=`cmd //c echo $path`
7442  fi
7443
7444
7445  input_path="$new_path"
7446  # Check if we need to convert this using DOS-style short mode. If the path
7447  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7448  # take no chances and rewrite it.
7449  # Note: m4 eats our [], so we need to use [ and ] instead.
7450  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7451  if test "x$has_forbidden_chars" != x; then
7452    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7453    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7454  fi
7455
7456
7457  windows_path="$new_path"
7458  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7459    unix_path=`$CYGPATH -u "$windows_path"`
7460    new_path="$unix_path"
7461  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7462    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7463    new_path="$unix_path"
7464  fi
7465
7466  if test "x$path" != "x$new_path"; then
7467    CURDIR="$new_path"
7468    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
7469$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
7470  fi
7471
7472  # Save the first 10 bytes of this path to the storage, so fixpath can work.
7473  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7474
7475  else
7476    # We're on a posix platform. Hooray! :)
7477    path="$CURDIR"
7478    has_space=`$ECHO "$path" | $GREP " "`
7479    if test "x$has_space" != x; then
7480      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
7481$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
7482      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7483    fi
7484
7485    # Use eval to expand a potential ~
7486    eval path="$path"
7487    if test ! -f "$path" && test ! -d "$path"; then
7488      as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
7489    fi
7490
7491    CURDIR="`cd "$path"; $THEPWDCMD -L`"
7492  fi
7493
7494
7495  if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
7496    # Add extra search paths on solaris for utilities like ar and as etc...
7497    PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
7498  fi
7499
7500  # You can force the sys-root if the sys-root encoded into the cross compiler tools
7501  # is not correct.
7502
7503# Check whether --with-sys-root was given.
7504if test "${with_sys_root+set}" = set; then :
7505  withval=$with_sys_root;
7506fi
7507
7508
7509  if test "x$with_sys_root" != x; then
7510    SYS_ROOT=$with_sys_root
7511  else
7512    SYS_ROOT=/
7513  fi
7514
7515
7516
7517# Check whether --with-tools-dir was given.
7518if test "${with_tools_dir+set}" = set; then :
7519  withval=$with_tools_dir; TOOLS_DIR=$with_tools_dir
7520
7521fi
7522
7523
7524
7525# Check whether --with-devkit was given.
7526if test "${with_devkit+set}" = set; then :
7527  withval=$with_devkit;
7528        if test "x$with_sys_root" != x; then
7529          as_fn_error $? "Cannot specify both --with-devkit and --with-sys-root at the same time" "$LINENO" 5
7530        fi
7531
7532  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7533
7534  # Input might be given as Windows format, start by converting to
7535  # unix format.
7536  path="$with_devkit"
7537  new_path=`$CYGPATH -u "$path"`
7538
7539  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7540  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7541  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7542  # "foo.exe" is OK but "foo" is an error.
7543  #
7544  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7545  # It is also a way to make sure we got the proper file name for the real test later on.
7546  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7547  if test "x$test_shortpath" = x; then
7548    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
7549$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
7550    as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
7551  fi
7552
7553  # Call helper function which possibly converts this using DOS-style short mode.
7554  # If so, the updated path is stored in $new_path.
7555
7556  input_path="$new_path"
7557  # Check if we need to convert this using DOS-style short mode. If the path
7558  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7559  # take no chances and rewrite it.
7560  # Note: m4 eats our [], so we need to use [ and ] instead.
7561  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7562  if test "x$has_forbidden_chars" != x; then
7563    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7564    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7565    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7566    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7567      # Going to short mode and back again did indeed matter. Since short mode is
7568      # case insensitive, let's make it lowercase to improve readability.
7569      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7570      # Now convert it back to Unix-stile (cygpath)
7571      input_path=`$CYGPATH -u "$shortmode_path"`
7572      new_path="$input_path"
7573    fi
7574  fi
7575
7576  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7577  if test "x$test_cygdrive_prefix" = x; then
7578    # As a simple fix, exclude /usr/bin since it's not a real path.
7579    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7580      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7581      # a path prefixed by /cygdrive for fixpath to work.
7582      new_path="$CYGWIN_ROOT_PATH$input_path"
7583    fi
7584  fi
7585
7586
7587  if test "x$path" != "x$new_path"; then
7588    with_devkit="$new_path"
7589    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
7590$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
7591  fi
7592
7593  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7594
7595  path="$with_devkit"
7596  has_colon=`$ECHO $path | $GREP ^.:`
7597  new_path="$path"
7598  if test "x$has_colon" = x; then
7599    # Not in mixed or Windows style, start by that.
7600    new_path=`cmd //c echo $path`
7601  fi
7602
7603
7604  input_path="$new_path"
7605  # Check if we need to convert this using DOS-style short mode. If the path
7606  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7607  # take no chances and rewrite it.
7608  # Note: m4 eats our [], so we need to use [ and ] instead.
7609  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7610  if test "x$has_forbidden_chars" != x; then
7611    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7612    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7613  fi
7614
7615
7616  windows_path="$new_path"
7617  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7618    unix_path=`$CYGPATH -u "$windows_path"`
7619    new_path="$unix_path"
7620  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7621    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7622    new_path="$unix_path"
7623  fi
7624
7625  if test "x$path" != "x$new_path"; then
7626    with_devkit="$new_path"
7627    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
7628$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
7629  fi
7630
7631  # Save the first 10 bytes of this path to the storage, so fixpath can work.
7632  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7633
7634  else
7635    # We're on a posix platform. Hooray! :)
7636    path="$with_devkit"
7637    has_space=`$ECHO "$path" | $GREP " "`
7638    if test "x$has_space" != x; then
7639      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
7640$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
7641      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7642    fi
7643
7644    # Use eval to expand a potential ~
7645    eval path="$path"
7646    if test ! -f "$path" && test ! -d "$path"; then
7647      as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
7648    fi
7649
7650    with_devkit="`cd "$path"; $THEPWDCMD -L`"
7651  fi
7652
7653
7654  if test "x$TOOLS_DIR" = x; then
7655    TOOLS_DIR="$with_devkit/bin"
7656  else
7657    TOOLS_DIR="$TOOLS_DIR:$with_devkit/bin"
7658  fi
7659
7660        if test -d "$with_devkit/$host_alias/libc"; then
7661          SYS_ROOT=$with_devkit/$host_alias/libc
7662        elif test -d "$with_devkit/$host/sys-root"; then
7663          SYS_ROOT=$with_devkit/$host/sys-root
7664        fi
7665
7666fi
7667
7668
7669
7670  # Setup default logging of stdout and stderr to build.log in the output root.
7671  BUILD_LOG='$(OUTPUT_ROOT)/build.log'
7672  BUILD_LOG_PREVIOUS='$(OUTPUT_ROOT)/build.log.old'
7673  BUILD_LOG_WRAPPER='$(BASH) $(SRC_ROOT)/common/bin/logger.sh $(BUILD_LOG)'
7674
7675
7676
7677
7678
7679# Check if it's a pure open build or if custom sources are to be used.
7680
7681  # Check whether --enable-openjdk-only was given.
7682if test "${enable_openjdk_only+set}" = set; then :
7683  enableval=$enable_openjdk_only;
7684else
7685  enable_openjdk_only="no"
7686fi
7687
7688
7689  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
7690$as_echo_n "checking for presence of closed sources... " >&6; }
7691  if test -d "$SRC_ROOT/jdk/src/closed"; then
7692    CLOSED_SOURCE_PRESENT=yes
7693  else
7694    CLOSED_SOURCE_PRESENT=no
7695  fi
7696  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
7697$as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
7698
7699  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
7700$as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
7701  SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
7702  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
7703$as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
7704
7705  if test "x$CLOSED_SOURCE_PRESENT" = xno; then
7706    OPENJDK=true
7707    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
7708      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
7709$as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
7710    fi
7711  else
7712    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
7713      OPENJDK=true
7714    else
7715      OPENJDK=false
7716    fi
7717  fi
7718
7719  if test "x$OPENJDK" = "xtrue"; then
7720    SET_OPENJDK="OPENJDK=true"
7721  fi
7722
7723
7724
7725
7726# These are needed to be able to create a configuration name (and thus the output directory)
7727
7728  ###############################################################################
7729  #
7730  # Check which variant of the JDK that we want to build.
7731  # Currently we have:
7732  #    normal:   standard edition
7733  # but the custom make system may add other variants
7734  #
7735  # Effectively the JDK variant gives a name to a specific set of
7736  # modules to compile into the JDK. In the future, these modules
7737  # might even be Jigsaw modules.
7738  #
7739  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
7740$as_echo_n "checking which variant of the JDK to build... " >&6; }
7741
7742# Check whether --with-jdk-variant was given.
7743if test "${with_jdk_variant+set}" = set; then :
7744  withval=$with_jdk_variant;
7745fi
7746
7747
7748  if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
7749    JDK_VARIANT="normal"
7750  else
7751    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
7752  fi
7753
7754
7755
7756  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
7757$as_echo "$JDK_VARIANT" >&6; }
7758
7759
7760
7761  ###############################################################################
7762  #
7763  # Check which variants of the JVM that we want to build.
7764  # Currently we have:
7765  #    server: normal interpreter and a tiered C1/C2 compiler
7766  #    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
7767  #    minimal1: reduced form of client with optional VM services and features stripped out
7768  #    kernel: kernel footprint JVM that passes the TCK without major performance problems,
7769  #             ie normal interpreter and C1, only the serial GC, kernel jvmti etc
7770  #    zero: no machine code interpreter, no compiler
7771  #    zeroshark: zero interpreter and shark/llvm compiler backend
7772  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
7773$as_echo_n "checking which variants of the JVM to build... " >&6; }
7774
7775# Check whether --with-jvm-variants was given.
7776if test "${with_jvm_variants+set}" = set; then :
7777  withval=$with_jvm_variants;
7778fi
7779
7780
7781  if test "x$with_jvm_variants" = x; then
7782    with_jvm_variants="server"
7783  fi
7784
7785  JVM_VARIANTS=",$with_jvm_variants,"
7786  TEST_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,//' -e 's/client,//'  -e 's/minimal1,//' -e 's/kernel,//' -e 's/zero,//' -e 's/zeroshark,//'`
7787
7788  if test "x$TEST_VARIANTS" != "x,"; then
7789    as_fn_error $? "The available JVM variants are: server, client, minimal1, kernel, zero, zeroshark" "$LINENO" 5
7790  fi
7791  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
7792$as_echo "$with_jvm_variants" >&6; }
7793
7794  JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
7795  JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
7796  JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
7797  JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
7798  JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
7799  JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
7800
7801  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
7802    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7803      as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
7804    fi
7805  fi
7806  if test "x$JVM_VARIANT_KERNEL" = xtrue; then
7807    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7808      as_fn_error $? "You cannot build a kernel JVM for a 64-bit machine." "$LINENO" 5
7809    fi
7810  fi
7811  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
7812    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7813      as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
7814    fi
7815  fi
7816
7817  # Replace the commas with AND for use in the build directory name.
7818  ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/'`
7819  COUNT_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,/1/' -e 's/client,/1/' -e 's/minimal1,/1/' -e 's/kernel,/1/' -e 's/zero,/1/' -e 's/zeroshark,/1/'`
7820  if test "x$COUNT_VARIANTS" != "x,1"; then
7821    BUILDING_MULTIPLE_JVM_VARIANTS=yes
7822  else
7823    BUILDING_MULTIPLE_JVM_VARIANTS=no
7824  fi
7825
7826
7827
7828
7829
7830
7831
7832
7833
7834  INCLUDE_SA=true
7835  if test "x$JVM_VARIANT_ZERO" = xtrue ; then
7836    INCLUDE_SA=false
7837  fi
7838  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then
7839    INCLUDE_SA=false
7840  fi
7841
7842
7843  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
7844    MACOSX_UNIVERSAL="true"
7845  fi
7846
7847
7848
7849
7850  ###############################################################################
7851  #
7852  # Set the debug level
7853  #    release: no debug information, all optimizations, no asserts.
7854  #    fastdebug: debug information (-g), all optimizations, all asserts
7855  #    slowdebug: debug information (-g), no optimizations, all asserts
7856  #
7857  DEBUG_LEVEL="release"
7858  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
7859$as_echo_n "checking which debug level to use... " >&6; }
7860  # Check whether --enable-debug was given.
7861if test "${enable_debug+set}" = set; then :
7862  enableval=$enable_debug;
7863        ENABLE_DEBUG="${enableval}"
7864        DEBUG_LEVEL="fastdebug"
7865
7866else
7867  ENABLE_DEBUG="no"
7868fi
7869
7870
7871
7872# Check whether --with-debug-level was given.
7873if test "${with_debug_level+set}" = set; then :
7874  withval=$with_debug_level;
7875        DEBUG_LEVEL="${withval}"
7876        if test "x$ENABLE_DEBUG" = xyes; then
7877          as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
7878        fi
7879
7880fi
7881
7882  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
7883$as_echo "$DEBUG_LEVEL" >&6; }
7884
7885  if test "x$DEBUG_LEVEL" != xrelease && \
7886      test "x$DEBUG_LEVEL" != xfastdebug && \
7887      test "x$DEBUG_LEVEL" != xslowdebug; then
7888    as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
7889  fi
7890
7891
7892  ###############################################################################
7893  #
7894  # Setup legacy vars/targets and new vars to deal with different debug levels.
7895  #
7896
7897  case $DEBUG_LEVEL in
7898    release )
7899      VARIANT="OPT"
7900      FASTDEBUG="false"
7901      DEBUG_CLASSFILES="false"
7902      BUILD_VARIANT_RELEASE=""
7903      HOTSPOT_DEBUG_LEVEL="product"
7904      HOTSPOT_EXPORT="product"
7905      ;;
7906    fastdebug )
7907      VARIANT="DBG"
7908      FASTDEBUG="true"
7909      DEBUG_CLASSFILES="true"
7910      BUILD_VARIANT_RELEASE="-fastdebug"
7911      HOTSPOT_DEBUG_LEVEL="fastdebug"
7912      HOTSPOT_EXPORT="fastdebug"
7913      ;;
7914    slowdebug )
7915      VARIANT="DBG"
7916      FASTDEBUG="false"
7917      DEBUG_CLASSFILES="true"
7918      BUILD_VARIANT_RELEASE="-debug"
7919      HOTSPOT_DEBUG_LEVEL="jvmg"
7920      HOTSPOT_EXPORT="debug"
7921      ;;
7922  esac
7923
7924  #####
7925  # Generate the legacy makefile targets for hotspot.
7926  # The hotspot api for selecting the build artifacts, really, needs to be improved.
7927  # JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
7928  # determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
7929  # But until then ...
7930  HOTSPOT_TARGET=""
7931
7932  if test "x$JVM_VARIANT_SERVER" = xtrue; then
7933    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
7934  fi
7935
7936  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
7937    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
7938  fi
7939
7940  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
7941    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
7942  fi
7943
7944  if test "x$JVM_VARIANT_KERNEL" = xtrue; then
7945    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
7946  fi
7947
7948  if test "x$JVM_VARIANT_ZERO" = xtrue; then
7949    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
7950  fi
7951
7952  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
7953    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
7954  fi
7955
7956  HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
7957
7958  # On Macosx universal binaries are produced, but they only contain
7959  # 64 bit intel. This invalidates control of which jvms are built
7960  # from configure, but only server is valid anyway. Fix this
7961  # when hotspot makefiles are rewritten.
7962  if test "x$MACOSX_UNIVERSAL" = xtrue; then
7963    HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
7964  fi
7965
7966  #####
7967
7968
7969
7970
7971
7972
7973
7974
7975# With basic setup done, call the custom early hook.
7976
7977
7978# To properly create a configuration name, we need to have the OpenJDK target
7979# and options (variants and debug level) parsed.
7980
7981
7982
7983# Check whether --with-conf-name was given.
7984if test "${with_conf_name+set}" = set; then :
7985  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
7986fi
7987
7988
7989  # Test from where we are running configure, in or outside of src root.
7990  if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
7991      || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
7992      || test "x$CURDIR" = "x$SRC_ROOT/common/makefiles" ; then
7993    # We are running configure from the src root.
7994    # Create a default ./build/target-variant-debuglevel output root.
7995    if test "x${CONF_NAME}" = x; then
7996      CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
7997    fi
7998    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
7999    $MKDIR -p "$OUTPUT_ROOT"
8000    if test ! -d "$OUTPUT_ROOT"; then
8001      as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
8002    fi
8003  else
8004    # We are running configure from outside of the src dir.
8005    # Then use the current directory as output dir!
8006    # If configuration is situated in normal build directory, just use the build
8007    # directory name as configuration name, otherwise use the complete path.
8008    if test "x${CONF_NAME}" = x; then
8009      CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
8010    fi
8011    OUTPUT_ROOT="$CURDIR"
8012
8013    # WARNING: This might be a bad thing to do. You need to be sure you want to
8014    # have a configuration in this directory. Do some sanity checks!
8015
8016    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
8017      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
8018      # other files
8019      files_present=`$LS $OUTPUT_ROOT`
8020      # Configure has already touched config.log and confdefs.h in the current dir when this check
8021      # is performed.
8022      filtered_files=`$ECHO "$files_present" | $SED -e 's/config.log//g' -e 's/confdefs.h//g' -e 's/ //g' \
8023      | $TR -d '\n'`
8024      if test "x$filtered_files" != x; then
8025        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
8026$as_echo "$as_me: Current directory is $CURDIR." >&6;}
8027        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
8028$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
8029        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
8030$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
8031        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
8032$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
8033        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
8034$as_echo "$as_me: seriously mess up just about everything." >&6;}
8035        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
8036$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
8037        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
8038$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
8039        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
8040      fi
8041    fi
8042  fi
8043  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
8044$as_echo_n "checking what configuration name to use... " >&6; }
8045  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
8046$as_echo "$CONF_NAME" >&6; }
8047
8048
8049  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8050
8051  # Input might be given as Windows format, start by converting to
8052  # unix format.
8053  path="$OUTPUT_ROOT"
8054  new_path=`$CYGPATH -u "$path"`
8055
8056  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8057  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8058  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8059  # "foo.exe" is OK but "foo" is an error.
8060  #
8061  # This test is therefore slightly more accurate than "test -f" to check for file precense.
8062  # It is also a way to make sure we got the proper file name for the real test later on.
8063  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8064  if test "x$test_shortpath" = x; then
8065    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
8066$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
8067    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
8068  fi
8069
8070  # Call helper function which possibly converts this using DOS-style short mode.
8071  # If so, the updated path is stored in $new_path.
8072
8073  input_path="$new_path"
8074  # Check if we need to convert this using DOS-style short mode. If the path
8075  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8076  # take no chances and rewrite it.
8077  # Note: m4 eats our [], so we need to use [ and ] instead.
8078  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8079  if test "x$has_forbidden_chars" != x; then
8080    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8081    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8082    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8083    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8084      # Going to short mode and back again did indeed matter. Since short mode is
8085      # case insensitive, let's make it lowercase to improve readability.
8086      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8087      # Now convert it back to Unix-stile (cygpath)
8088      input_path=`$CYGPATH -u "$shortmode_path"`
8089      new_path="$input_path"
8090    fi
8091  fi
8092
8093  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8094  if test "x$test_cygdrive_prefix" = x; then
8095    # As a simple fix, exclude /usr/bin since it's not a real path.
8096    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
8097      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8098      # a path prefixed by /cygdrive for fixpath to work.
8099      new_path="$CYGWIN_ROOT_PATH$input_path"
8100    fi
8101  fi
8102
8103
8104  if test "x$path" != "x$new_path"; then
8105    OUTPUT_ROOT="$new_path"
8106    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
8107$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
8108  fi
8109
8110  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8111
8112  path="$OUTPUT_ROOT"
8113  has_colon=`$ECHO $path | $GREP ^.:`
8114  new_path="$path"
8115  if test "x$has_colon" = x; then
8116    # Not in mixed or Windows style, start by that.
8117    new_path=`cmd //c echo $path`
8118  fi
8119
8120
8121  input_path="$new_path"
8122  # Check if we need to convert this using DOS-style short mode. If the path
8123  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8124  # take no chances and rewrite it.
8125  # Note: m4 eats our [], so we need to use [ and ] instead.
8126  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8127  if test "x$has_forbidden_chars" != x; then
8128    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8129    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8130  fi
8131
8132
8133  windows_path="$new_path"
8134  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8135    unix_path=`$CYGPATH -u "$windows_path"`
8136    new_path="$unix_path"
8137  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8138    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8139    new_path="$unix_path"
8140  fi
8141
8142  if test "x$path" != "x$new_path"; then
8143    OUTPUT_ROOT="$new_path"
8144    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
8145$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
8146  fi
8147
8148  # Save the first 10 bytes of this path to the storage, so fixpath can work.
8149  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8150
8151  else
8152    # We're on a posix platform. Hooray! :)
8153    path="$OUTPUT_ROOT"
8154    has_space=`$ECHO "$path" | $GREP " "`
8155    if test "x$has_space" != x; then
8156      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
8157$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
8158      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
8159    fi
8160
8161    # Use eval to expand a potential ~
8162    eval path="$path"
8163    if test ! -f "$path" && test ! -d "$path"; then
8164      as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
8165    fi
8166
8167    OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
8168  fi
8169
8170
8171  SPEC=$OUTPUT_ROOT/spec.gmk
8172
8173  CONF_NAME=$CONF_NAME
8174
8175  OUTPUT_ROOT=$OUTPUT_ROOT
8176
8177
8178  # Most of the probed defines are put into config.h
8179  ac_config_headers="$ac_config_headers $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in"
8180
8181  # The spec.gmk file contains all variables for the make system.
8182  ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
8183
8184  # The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
8185  ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
8186
8187  # The bootcycle-spec.gmk file contains support for boot cycle builds.
8188  ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
8189
8190  # The compare.sh is used to compare the build output to other builds.
8191  ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
8192
8193  # Spec.sh is currently used by compare-objects.sh
8194  ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in"
8195
8196  # The generated Makefile knows where the spec.gmk is and where the source is.
8197  # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
8198  # which will look for generated configurations
8199  ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
8200
8201
8202  # Save the arguments given to us
8203  echo "$CONFIGURE_COMMAND_LINE" > $OUTPUT_ROOT/configure-arguments
8204
8205
8206# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
8207
8208  for ac_prog in apt-get yum port pkgutil pkgadd
8209do
8210  # Extract the first word of "$ac_prog", so it can be a program name with args.
8211set dummy $ac_prog; ac_word=$2
8212{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8213$as_echo_n "checking for $ac_word... " >&6; }
8214if ${ac_cv_prog_PKGHANDLER+:} false; then :
8215  $as_echo_n "(cached) " >&6
8216else
8217  if test -n "$PKGHANDLER"; then
8218  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
8219else
8220as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8221for as_dir in $PATH
8222do
8223  IFS=$as_save_IFS
8224  test -z "$as_dir" && as_dir=.
8225    for ac_exec_ext in '' $ac_executable_extensions; do
8226  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8227    ac_cv_prog_PKGHANDLER="$ac_prog"
8228    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8229    break 2
8230  fi
8231done
8232  done
8233IFS=$as_save_IFS
8234
8235fi
8236fi
8237PKGHANDLER=$ac_cv_prog_PKGHANDLER
8238if test -n "$PKGHANDLER"; then
8239  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
8240$as_echo "$PKGHANDLER" >&6; }
8241else
8242  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8243$as_echo "no" >&6; }
8244fi
8245
8246
8247  test -n "$PKGHANDLER" && break
8248done
8249
8250
8251
8252# Setup tools that requires more complex handling, or that is not needed by the configure script.
8253
8254
8255  # We need to find a recent version of GNU make. Especially on Solaris, this can be tricky.
8256  if test "x$MAKE" != x; then
8257    # User has supplied a make, test it.
8258    if test ! -f "$MAKE"; then
8259      as_fn_error $? "The specified make (by MAKE=$MAKE) is not found." "$LINENO" 5
8260    fi
8261
8262  MAKE_CANDIDATE=""$MAKE""
8263  DESCRIPTION="user supplied MAKE=$MAKE"
8264  if test "x$MAKE_CANDIDATE" != x; then
8265    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8266$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8267    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8268    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8269    if test "x$IS_GNU_MAKE" = x; then
8270      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8271$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8272    else
8273      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8274      if test "x$IS_MODERN_MAKE" = x; then
8275        { $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
8276$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;}
8277      else
8278        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8279          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8280            MAKE_EXPECTED_ENV='cygwin'
8281          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8282            MAKE_EXPECTED_ENV='msys'
8283          else
8284            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8285          fi
8286          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8287          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8288        else
8289          # Not relevant for non-Windows
8290          IS_MAKE_CORRECT_ENV=true
8291        fi
8292        if test "x$IS_MAKE_CORRECT_ENV" = x; then
8293          { $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
8294$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;}
8295        else
8296          FOUND_MAKE=$MAKE_CANDIDATE
8297
8298  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8299
8300  # First separate the path from the arguments. This will split at the first
8301  # space.
8302  complete="$FOUND_MAKE"
8303  path="${complete%% *}"
8304  tmp="$complete EOL"
8305  arguments="${tmp#* }"
8306
8307  # Input might be given as Windows format, start by converting to
8308  # unix format.
8309  new_path=`$CYGPATH -u "$path"`
8310
8311  # Now try to locate executable using which
8312  new_path=`$WHICH "$new_path" 2> /dev/null`
8313  # bat and cmd files are not always considered executable in cygwin causing which
8314  # to not find them
8315  if test "x$new_path" = x \
8316      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8317      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8318    new_path=`$CYGPATH -u "$path"`
8319  fi
8320  if test "x$new_path" = x; then
8321    # Oops. Which didn't find the executable.
8322    # The splitting of arguments from the executable at a space might have been incorrect,
8323    # since paths with space are more likely in Windows. Give it another try with the whole
8324    # argument.
8325    path="$complete"
8326    arguments="EOL"
8327    new_path=`$CYGPATH -u "$path"`
8328    new_path=`$WHICH "$new_path" 2> /dev/null`
8329    # bat and cmd files are not always considered executable in cygwin causing which
8330    # to not find them
8331    if test "x$new_path" = x \
8332        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8333        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8334      new_path=`$CYGPATH -u "$path"`
8335    fi
8336    if test "x$new_path" = x; then
8337      # It's still not found. Now this is an unrecoverable error.
8338      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8339$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8340      has_space=`$ECHO "$complete" | $GREP " "`
8341      if test "x$has_space" != x; then
8342        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8343$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8344      fi
8345      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8346    fi
8347  fi
8348
8349  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8350  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8351  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8352  # "foo.exe" is OK but "foo" is an error.
8353  #
8354  # This test is therefore slightly more accurate than "test -f" to check for file presence.
8355  # It is also a way to make sure we got the proper file name for the real test later on.
8356  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8357  if test "x$test_shortpath" = x; then
8358    # Short path failed, file does not exist as specified.
8359    # Try adding .exe or .cmd
8360    if test -f "${new_path}.exe"; then
8361      input_to_shortpath="${new_path}.exe"
8362    elif test -f "${new_path}.cmd"; then
8363      input_to_shortpath="${new_path}.cmd"
8364    else
8365      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8366$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8367      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8368$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8369      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8370    fi
8371  else
8372    input_to_shortpath="$new_path"
8373  fi
8374
8375  # Call helper function which possibly converts this using DOS-style short mode.
8376  # If so, the updated path is stored in $new_path.
8377  new_path="$input_to_shortpath"
8378
8379  input_path="$input_to_shortpath"
8380  # Check if we need to convert this using DOS-style short mode. If the path
8381  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8382  # take no chances and rewrite it.
8383  # Note: m4 eats our [], so we need to use [ and ] instead.
8384  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8385  if test "x$has_forbidden_chars" != x; then
8386    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8387    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8388    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8389    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8390      # Going to short mode and back again did indeed matter. Since short mode is
8391      # case insensitive, let's make it lowercase to improve readability.
8392      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8393      # Now convert it back to Unix-stile (cygpath)
8394      input_path=`$CYGPATH -u "$shortmode_path"`
8395      new_path="$input_path"
8396    fi
8397  fi
8398
8399  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8400  if test "x$test_cygdrive_prefix" = x; then
8401    # As a simple fix, exclude /usr/bin since it's not a real path.
8402    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8403      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8404      # a path prefixed by /cygdrive for fixpath to work.
8405      new_path="$CYGWIN_ROOT_PATH$input_path"
8406    fi
8407  fi
8408
8409  # remove trailing .exe if any
8410  new_path="${new_path/%.exe/}"
8411
8412  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8413
8414  # First separate the path from the arguments. This will split at the first
8415  # space.
8416  complete="$FOUND_MAKE"
8417  path="${complete%% *}"
8418  tmp="$complete EOL"
8419  arguments="${tmp#* }"
8420
8421  # Input might be given as Windows format, start by converting to
8422  # unix format.
8423  new_path="$path"
8424
8425  windows_path="$new_path"
8426  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8427    unix_path=`$CYGPATH -u "$windows_path"`
8428    new_path="$unix_path"
8429  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8430    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8431    new_path="$unix_path"
8432  fi
8433
8434
8435  # Now try to locate executable using which
8436  new_path=`$WHICH "$new_path" 2> /dev/null`
8437
8438  if test "x$new_path" = x; then
8439    # Oops. Which didn't find the executable.
8440    # The splitting of arguments from the executable at a space might have been incorrect,
8441    # since paths with space are more likely in Windows. Give it another try with the whole
8442    # argument.
8443    path="$complete"
8444    arguments="EOL"
8445    new_path="$path"
8446
8447  windows_path="$new_path"
8448  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8449    unix_path=`$CYGPATH -u "$windows_path"`
8450    new_path="$unix_path"
8451  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8452    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8453    new_path="$unix_path"
8454  fi
8455
8456
8457    new_path=`$WHICH "$new_path" 2> /dev/null`
8458
8459    if test "x$new_path" = x; then
8460      # It's still not found. Now this is an unrecoverable error.
8461      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8462$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8463      has_space=`$ECHO "$complete" | $GREP " "`
8464      if test "x$has_space" != x; then
8465        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8466$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8467      fi
8468      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8469    fi
8470  fi
8471
8472  # Now new_path has a complete unix path to the binary
8473  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8474    # Keep paths in /bin as-is, but remove trailing .exe if any
8475    new_path="${new_path/%.exe/}"
8476    # Do not save /bin paths to all_fixpath_prefixes!
8477  else
8478    # Not in mixed or Windows style, start by that.
8479    new_path=`cmd //c echo $new_path`
8480
8481  input_path="$new_path"
8482  # Check if we need to convert this using DOS-style short mode. If the path
8483  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8484  # take no chances and rewrite it.
8485  # Note: m4 eats our [], so we need to use [ and ] instead.
8486  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8487  if test "x$has_forbidden_chars" != x; then
8488    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8489    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8490  fi
8491
8492    # Output is in $new_path
8493
8494  windows_path="$new_path"
8495  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8496    unix_path=`$CYGPATH -u "$windows_path"`
8497    new_path="$unix_path"
8498  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8499    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8500    new_path="$unix_path"
8501  fi
8502
8503    # remove trailing .exe if any
8504    new_path="${new_path/%.exe/}"
8505
8506    # Save the first 10 bytes of this path to the storage, so fixpath can work.
8507    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8508  fi
8509
8510  else
8511    # We're on a posix platform. Hooray! :)
8512    # First separate the path from the arguments. This will split at the first
8513    # space.
8514    complete="$FOUND_MAKE"
8515    path="${complete%% *}"
8516    tmp="$complete EOL"
8517    arguments="${tmp#* }"
8518
8519    # Cannot rely on the command "which" here since it doesn't always work.
8520    is_absolute_path=`$ECHO "$path" | $GREP ^/`
8521    if test -z "$is_absolute_path"; then
8522      # Path to executable is not absolute. Find it.
8523      IFS_save="$IFS"
8524      IFS=:
8525      for p in $PATH; do
8526        if test -f "$p/$path" && test -x "$p/$path"; then
8527          new_path="$p/$path"
8528          break
8529        fi
8530      done
8531      IFS="$IFS_save"
8532    else
8533      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
8534$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
8535      new_path="$path"
8536    fi
8537
8538    if test "x$new_path" = x; then
8539      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8540$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8541      has_space=`$ECHO "$complete" | $GREP " "`
8542      if test "x$has_space" != x; then
8543        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
8544$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
8545      fi
8546      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8547    fi
8548  fi
8549
8550  # Now join together the path and the arguments once again
8551  if test "x$arguments" != xEOL; then
8552    new_complete="$new_path ${arguments% *}"
8553  else
8554    new_complete="$new_path"
8555  fi
8556
8557  if test "x$complete" != "x$new_complete"; then
8558    FOUND_MAKE="$new_complete"
8559    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
8560$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
8561  fi
8562
8563        fi
8564      fi
8565    fi
8566  fi
8567
8568    if test "x$FOUND_MAKE" = x; then
8569      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make 3.81 or newer." "$LINENO" 5
8570    fi
8571  else
8572    # Try our hardest to locate a correct version of GNU make
8573    for ac_prog in gmake
8574do
8575  # Extract the first word of "$ac_prog", so it can be a program name with args.
8576set dummy $ac_prog; ac_word=$2
8577{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8578$as_echo_n "checking for $ac_word... " >&6; }
8579if ${ac_cv_path_CHECK_GMAKE+:} false; then :
8580  $as_echo_n "(cached) " >&6
8581else
8582  case $CHECK_GMAKE in
8583  [\\/]* | ?:[\\/]*)
8584  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
8585  ;;
8586  *)
8587  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8588for as_dir in $PATH
8589do
8590  IFS=$as_save_IFS
8591  test -z "$as_dir" && as_dir=.
8592    for ac_exec_ext in '' $ac_executable_extensions; do
8593  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8594    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
8595    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8596    break 2
8597  fi
8598done
8599  done
8600IFS=$as_save_IFS
8601
8602  ;;
8603esac
8604fi
8605CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
8606if test -n "$CHECK_GMAKE"; then
8607  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
8608$as_echo "$CHECK_GMAKE" >&6; }
8609else
8610  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8611$as_echo "no" >&6; }
8612fi
8613
8614
8615  test -n "$CHECK_GMAKE" && break
8616done
8617
8618
8619  MAKE_CANDIDATE=""$CHECK_GMAKE""
8620  DESCRIPTION="gmake in PATH"
8621  if test "x$MAKE_CANDIDATE" != x; then
8622    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8623$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8624    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8625    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8626    if test "x$IS_GNU_MAKE" = x; then
8627      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8628$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8629    else
8630      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8631      if test "x$IS_MODERN_MAKE" = x; then
8632        { $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
8633$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;}
8634      else
8635        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8636          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8637            MAKE_EXPECTED_ENV='cygwin'
8638          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8639            MAKE_EXPECTED_ENV='msys'
8640          else
8641            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8642          fi
8643          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8644          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8645        else
8646          # Not relevant for non-Windows
8647          IS_MAKE_CORRECT_ENV=true
8648        fi
8649        if test "x$IS_MAKE_CORRECT_ENV" = x; then
8650          { $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
8651$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;}
8652        else
8653          FOUND_MAKE=$MAKE_CANDIDATE
8654
8655  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8656
8657  # First separate the path from the arguments. This will split at the first
8658  # space.
8659  complete="$FOUND_MAKE"
8660  path="${complete%% *}"
8661  tmp="$complete EOL"
8662  arguments="${tmp#* }"
8663
8664  # Input might be given as Windows format, start by converting to
8665  # unix format.
8666  new_path=`$CYGPATH -u "$path"`
8667
8668  # Now try to locate executable using which
8669  new_path=`$WHICH "$new_path" 2> /dev/null`
8670  # bat and cmd files are not always considered executable in cygwin causing which
8671  # to not find them
8672  if test "x$new_path" = x \
8673      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8674      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8675    new_path=`$CYGPATH -u "$path"`
8676  fi
8677  if test "x$new_path" = x; then
8678    # Oops. Which didn't find the executable.
8679    # The splitting of arguments from the executable at a space might have been incorrect,
8680    # since paths with space are more likely in Windows. Give it another try with the whole
8681    # argument.
8682    path="$complete"
8683    arguments="EOL"
8684    new_path=`$CYGPATH -u "$path"`
8685    new_path=`$WHICH "$new_path" 2> /dev/null`
8686    # bat and cmd files are not always considered executable in cygwin causing which
8687    # to not find them
8688    if test "x$new_path" = x \
8689        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8690        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8691      new_path=`$CYGPATH -u "$path"`
8692    fi
8693    if test "x$new_path" = x; then
8694      # It's still not found. Now this is an unrecoverable error.
8695      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8696$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8697      has_space=`$ECHO "$complete" | $GREP " "`
8698      if test "x$has_space" != x; then
8699        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8700$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8701      fi
8702      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8703    fi
8704  fi
8705
8706  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8707  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8708  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8709  # "foo.exe" is OK but "foo" is an error.
8710  #
8711  # This test is therefore slightly more accurate than "test -f" to check for file presence.
8712  # It is also a way to make sure we got the proper file name for the real test later on.
8713  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8714  if test "x$test_shortpath" = x; then
8715    # Short path failed, file does not exist as specified.
8716    # Try adding .exe or .cmd
8717    if test -f "${new_path}.exe"; then
8718      input_to_shortpath="${new_path}.exe"
8719    elif test -f "${new_path}.cmd"; then
8720      input_to_shortpath="${new_path}.cmd"
8721    else
8722      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8723$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8724      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8725$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8726      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8727    fi
8728  else
8729    input_to_shortpath="$new_path"
8730  fi
8731
8732  # Call helper function which possibly converts this using DOS-style short mode.
8733  # If so, the updated path is stored in $new_path.
8734  new_path="$input_to_shortpath"
8735
8736  input_path="$input_to_shortpath"
8737  # Check if we need to convert this using DOS-style short mode. If the path
8738  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8739  # take no chances and rewrite it.
8740  # Note: m4 eats our [], so we need to use [ and ] instead.
8741  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8742  if test "x$has_forbidden_chars" != x; then
8743    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8744    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8745    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8746    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8747      # Going to short mode and back again did indeed matter. Since short mode is
8748      # case insensitive, let's make it lowercase to improve readability.
8749      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8750      # Now convert it back to Unix-stile (cygpath)
8751      input_path=`$CYGPATH -u "$shortmode_path"`
8752      new_path="$input_path"
8753    fi
8754  fi
8755
8756  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8757  if test "x$test_cygdrive_prefix" = x; then
8758    # As a simple fix, exclude /usr/bin since it's not a real path.
8759    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8760      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8761      # a path prefixed by /cygdrive for fixpath to work.
8762      new_path="$CYGWIN_ROOT_PATH$input_path"
8763    fi
8764  fi
8765
8766  # remove trailing .exe if any
8767  new_path="${new_path/%.exe/}"
8768
8769  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8770
8771  # First separate the path from the arguments. This will split at the first
8772  # space.
8773  complete="$FOUND_MAKE"
8774  path="${complete%% *}"
8775  tmp="$complete EOL"
8776  arguments="${tmp#* }"
8777
8778  # Input might be given as Windows format, start by converting to
8779  # unix format.
8780  new_path="$path"
8781
8782  windows_path="$new_path"
8783  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8784    unix_path=`$CYGPATH -u "$windows_path"`
8785    new_path="$unix_path"
8786  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8787    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8788    new_path="$unix_path"
8789  fi
8790
8791
8792  # Now try to locate executable using which
8793  new_path=`$WHICH "$new_path" 2> /dev/null`
8794
8795  if test "x$new_path" = x; then
8796    # Oops. Which didn't find the executable.
8797    # The splitting of arguments from the executable at a space might have been incorrect,
8798    # since paths with space are more likely in Windows. Give it another try with the whole
8799    # argument.
8800    path="$complete"
8801    arguments="EOL"
8802    new_path="$path"
8803
8804  windows_path="$new_path"
8805  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8806    unix_path=`$CYGPATH -u "$windows_path"`
8807    new_path="$unix_path"
8808  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8809    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8810    new_path="$unix_path"
8811  fi
8812
8813
8814    new_path=`$WHICH "$new_path" 2> /dev/null`
8815
8816    if test "x$new_path" = x; then
8817      # It's still not found. Now this is an unrecoverable error.
8818      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8819$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8820      has_space=`$ECHO "$complete" | $GREP " "`
8821      if test "x$has_space" != x; then
8822        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8823$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8824      fi
8825      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8826    fi
8827  fi
8828
8829  # Now new_path has a complete unix path to the binary
8830  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8831    # Keep paths in /bin as-is, but remove trailing .exe if any
8832    new_path="${new_path/%.exe/}"
8833    # Do not save /bin paths to all_fixpath_prefixes!
8834  else
8835    # Not in mixed or Windows style, start by that.
8836    new_path=`cmd //c echo $new_path`
8837
8838  input_path="$new_path"
8839  # Check if we need to convert this using DOS-style short mode. If the path
8840  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8841  # take no chances and rewrite it.
8842  # Note: m4 eats our [], so we need to use [ and ] instead.
8843  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8844  if test "x$has_forbidden_chars" != x; then
8845    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8846    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8847  fi
8848
8849    # Output is in $new_path
8850
8851  windows_path="$new_path"
8852  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8853    unix_path=`$CYGPATH -u "$windows_path"`
8854    new_path="$unix_path"
8855  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8856    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8857    new_path="$unix_path"
8858  fi
8859
8860    # remove trailing .exe if any
8861    new_path="${new_path/%.exe/}"
8862
8863    # Save the first 10 bytes of this path to the storage, so fixpath can work.
8864    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8865  fi
8866
8867  else
8868    # We're on a posix platform. Hooray! :)
8869    # First separate the path from the arguments. This will split at the first
8870    # space.
8871    complete="$FOUND_MAKE"
8872    path="${complete%% *}"
8873    tmp="$complete EOL"
8874    arguments="${tmp#* }"
8875
8876    # Cannot rely on the command "which" here since it doesn't always work.
8877    is_absolute_path=`$ECHO "$path" | $GREP ^/`
8878    if test -z "$is_absolute_path"; then
8879      # Path to executable is not absolute. Find it.
8880      IFS_save="$IFS"
8881      IFS=:
8882      for p in $PATH; do
8883        if test -f "$p/$path" && test -x "$p/$path"; then
8884          new_path="$p/$path"
8885          break
8886        fi
8887      done
8888      IFS="$IFS_save"
8889    else
8890      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
8891$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
8892      new_path="$path"
8893    fi
8894
8895    if test "x$new_path" = x; then
8896      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8897$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8898      has_space=`$ECHO "$complete" | $GREP " "`
8899      if test "x$has_space" != x; then
8900        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
8901$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
8902      fi
8903      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8904    fi
8905  fi
8906
8907  # Now join together the path and the arguments once again
8908  if test "x$arguments" != xEOL; then
8909    new_complete="$new_path ${arguments% *}"
8910  else
8911    new_complete="$new_path"
8912  fi
8913
8914  if test "x$complete" != "x$new_complete"; then
8915    FOUND_MAKE="$new_complete"
8916    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
8917$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
8918  fi
8919
8920        fi
8921      fi
8922    fi
8923  fi
8924
8925
8926    if test "x$FOUND_MAKE" = x; then
8927      for ac_prog in make
8928do
8929  # Extract the first word of "$ac_prog", so it can be a program name with args.
8930set dummy $ac_prog; ac_word=$2
8931{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8932$as_echo_n "checking for $ac_word... " >&6; }
8933if ${ac_cv_path_CHECK_MAKE+:} false; then :
8934  $as_echo_n "(cached) " >&6
8935else
8936  case $CHECK_MAKE in
8937  [\\/]* | ?:[\\/]*)
8938  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
8939  ;;
8940  *)
8941  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8942for as_dir in $PATH
8943do
8944  IFS=$as_save_IFS
8945  test -z "$as_dir" && as_dir=.
8946    for ac_exec_ext in '' $ac_executable_extensions; do
8947  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8948    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
8949    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8950    break 2
8951  fi
8952done
8953  done
8954IFS=$as_save_IFS
8955
8956  ;;
8957esac
8958fi
8959CHECK_MAKE=$ac_cv_path_CHECK_MAKE
8960if test -n "$CHECK_MAKE"; then
8961  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
8962$as_echo "$CHECK_MAKE" >&6; }
8963else
8964  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8965$as_echo "no" >&6; }
8966fi
8967
8968
8969  test -n "$CHECK_MAKE" && break
8970done
8971
8972
8973  MAKE_CANDIDATE=""$CHECK_MAKE""
8974  DESCRIPTION="make in PATH"
8975  if test "x$MAKE_CANDIDATE" != x; then
8976    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8977$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8978    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8979    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8980    if test "x$IS_GNU_MAKE" = x; then
8981      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8982$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8983    else
8984      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8985      if test "x$IS_MODERN_MAKE" = x; then
8986        { $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
8987$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;}
8988      else
8989        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8990          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8991            MAKE_EXPECTED_ENV='cygwin'
8992          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8993            MAKE_EXPECTED_ENV='msys'
8994          else
8995            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8996          fi
8997          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8998          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8999        else
9000          # Not relevant for non-Windows
9001          IS_MAKE_CORRECT_ENV=true
9002        fi
9003        if test "x$IS_MAKE_CORRECT_ENV" = x; then
9004          { $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
9005$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;}
9006        else
9007          FOUND_MAKE=$MAKE_CANDIDATE
9008
9009  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9010
9011  # First separate the path from the arguments. This will split at the first
9012  # space.
9013  complete="$FOUND_MAKE"
9014  path="${complete%% *}"
9015  tmp="$complete EOL"
9016  arguments="${tmp#* }"
9017
9018  # Input might be given as Windows format, start by converting to
9019  # unix format.
9020  new_path=`$CYGPATH -u "$path"`
9021
9022  # Now try to locate executable using which
9023  new_path=`$WHICH "$new_path" 2> /dev/null`
9024  # bat and cmd files are not always considered executable in cygwin causing which
9025  # to not find them
9026  if test "x$new_path" = x \
9027      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9028      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9029    new_path=`$CYGPATH -u "$path"`
9030  fi
9031  if test "x$new_path" = x; then
9032    # Oops. Which didn't find the executable.
9033    # The splitting of arguments from the executable at a space might have been incorrect,
9034    # since paths with space are more likely in Windows. Give it another try with the whole
9035    # argument.
9036    path="$complete"
9037    arguments="EOL"
9038    new_path=`$CYGPATH -u "$path"`
9039    new_path=`$WHICH "$new_path" 2> /dev/null`
9040    # bat and cmd files are not always considered executable in cygwin causing which
9041    # to not find them
9042    if test "x$new_path" = x \
9043        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9044        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9045      new_path=`$CYGPATH -u "$path"`
9046    fi
9047    if test "x$new_path" = x; then
9048      # It's still not found. Now this is an unrecoverable error.
9049      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9050$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9051      has_space=`$ECHO "$complete" | $GREP " "`
9052      if test "x$has_space" != x; then
9053        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9054$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9055      fi
9056      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9057    fi
9058  fi
9059
9060  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9061  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9062  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9063  # "foo.exe" is OK but "foo" is an error.
9064  #
9065  # This test is therefore slightly more accurate than "test -f" to check for file presence.
9066  # It is also a way to make sure we got the proper file name for the real test later on.
9067  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9068  if test "x$test_shortpath" = x; then
9069    # Short path failed, file does not exist as specified.
9070    # Try adding .exe or .cmd
9071    if test -f "${new_path}.exe"; then
9072      input_to_shortpath="${new_path}.exe"
9073    elif test -f "${new_path}.cmd"; then
9074      input_to_shortpath="${new_path}.cmd"
9075    else
9076      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9077$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9078      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9079$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9080      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9081    fi
9082  else
9083    input_to_shortpath="$new_path"
9084  fi
9085
9086  # Call helper function which possibly converts this using DOS-style short mode.
9087  # If so, the updated path is stored in $new_path.
9088  new_path="$input_to_shortpath"
9089
9090  input_path="$input_to_shortpath"
9091  # Check if we need to convert this using DOS-style short mode. If the path
9092  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9093  # take no chances and rewrite it.
9094  # Note: m4 eats our [], so we need to use [ and ] instead.
9095  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9096  if test "x$has_forbidden_chars" != x; then
9097    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9098    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9099    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9100    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9101      # Going to short mode and back again did indeed matter. Since short mode is
9102      # case insensitive, let's make it lowercase to improve readability.
9103      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9104      # Now convert it back to Unix-stile (cygpath)
9105      input_path=`$CYGPATH -u "$shortmode_path"`
9106      new_path="$input_path"
9107    fi
9108  fi
9109
9110  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9111  if test "x$test_cygdrive_prefix" = x; then
9112    # As a simple fix, exclude /usr/bin since it's not a real path.
9113    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9114      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9115      # a path prefixed by /cygdrive for fixpath to work.
9116      new_path="$CYGWIN_ROOT_PATH$input_path"
9117    fi
9118  fi
9119
9120  # remove trailing .exe if any
9121  new_path="${new_path/%.exe/}"
9122
9123  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9124
9125  # First separate the path from the arguments. This will split at the first
9126  # space.
9127  complete="$FOUND_MAKE"
9128  path="${complete%% *}"
9129  tmp="$complete EOL"
9130  arguments="${tmp#* }"
9131
9132  # Input might be given as Windows format, start by converting to
9133  # unix format.
9134  new_path="$path"
9135
9136  windows_path="$new_path"
9137  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9138    unix_path=`$CYGPATH -u "$windows_path"`
9139    new_path="$unix_path"
9140  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9141    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9142    new_path="$unix_path"
9143  fi
9144
9145
9146  # Now try to locate executable using which
9147  new_path=`$WHICH "$new_path" 2> /dev/null`
9148
9149  if test "x$new_path" = x; then
9150    # Oops. Which didn't find the executable.
9151    # The splitting of arguments from the executable at a space might have been incorrect,
9152    # since paths with space are more likely in Windows. Give it another try with the whole
9153    # argument.
9154    path="$complete"
9155    arguments="EOL"
9156    new_path="$path"
9157
9158  windows_path="$new_path"
9159  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9160    unix_path=`$CYGPATH -u "$windows_path"`
9161    new_path="$unix_path"
9162  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9163    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9164    new_path="$unix_path"
9165  fi
9166
9167
9168    new_path=`$WHICH "$new_path" 2> /dev/null`
9169
9170    if test "x$new_path" = x; then
9171      # It's still not found. Now this is an unrecoverable error.
9172      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9173$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9174      has_space=`$ECHO "$complete" | $GREP " "`
9175      if test "x$has_space" != x; then
9176        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9177$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9178      fi
9179      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9180    fi
9181  fi
9182
9183  # Now new_path has a complete unix path to the binary
9184  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9185    # Keep paths in /bin as-is, but remove trailing .exe if any
9186    new_path="${new_path/%.exe/}"
9187    # Do not save /bin paths to all_fixpath_prefixes!
9188  else
9189    # Not in mixed or Windows style, start by that.
9190    new_path=`cmd //c echo $new_path`
9191
9192  input_path="$new_path"
9193  # Check if we need to convert this using DOS-style short mode. If the path
9194  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9195  # take no chances and rewrite it.
9196  # Note: m4 eats our [], so we need to use [ and ] instead.
9197  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9198  if test "x$has_forbidden_chars" != x; then
9199    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9200    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9201  fi
9202
9203    # Output is in $new_path
9204
9205  windows_path="$new_path"
9206  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9207    unix_path=`$CYGPATH -u "$windows_path"`
9208    new_path="$unix_path"
9209  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9210    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9211    new_path="$unix_path"
9212  fi
9213
9214    # remove trailing .exe if any
9215    new_path="${new_path/%.exe/}"
9216
9217    # Save the first 10 bytes of this path to the storage, so fixpath can work.
9218    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9219  fi
9220
9221  else
9222    # We're on a posix platform. Hooray! :)
9223    # First separate the path from the arguments. This will split at the first
9224    # space.
9225    complete="$FOUND_MAKE"
9226    path="${complete%% *}"
9227    tmp="$complete EOL"
9228    arguments="${tmp#* }"
9229
9230    # Cannot rely on the command "which" here since it doesn't always work.
9231    is_absolute_path=`$ECHO "$path" | $GREP ^/`
9232    if test -z "$is_absolute_path"; then
9233      # Path to executable is not absolute. Find it.
9234      IFS_save="$IFS"
9235      IFS=:
9236      for p in $PATH; do
9237        if test -f "$p/$path" && test -x "$p/$path"; then
9238          new_path="$p/$path"
9239          break
9240        fi
9241      done
9242      IFS="$IFS_save"
9243    else
9244      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9245$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9246      new_path="$path"
9247    fi
9248
9249    if test "x$new_path" = x; then
9250      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9251$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9252      has_space=`$ECHO "$complete" | $GREP " "`
9253      if test "x$has_space" != x; then
9254        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9255$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9256      fi
9257      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9258    fi
9259  fi
9260
9261  # Now join together the path and the arguments once again
9262  if test "x$arguments" != xEOL; then
9263    new_complete="$new_path ${arguments% *}"
9264  else
9265    new_complete="$new_path"
9266  fi
9267
9268  if test "x$complete" != "x$new_complete"; then
9269    FOUND_MAKE="$new_complete"
9270    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9271$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9272  fi
9273
9274        fi
9275      fi
9276    fi
9277  fi
9278
9279    fi
9280
9281    if test "x$FOUND_MAKE" = x; then
9282      if test "x$TOOLS_DIR" != x; then
9283        # We have a tools-dir, check that as well before giving up.
9284        OLD_PATH=$PATH
9285        PATH=$TOOLS_DIR:$PATH
9286        for ac_prog in gmake
9287do
9288  # Extract the first word of "$ac_prog", so it can be a program name with args.
9289set dummy $ac_prog; ac_word=$2
9290{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9291$as_echo_n "checking for $ac_word... " >&6; }
9292if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
9293  $as_echo_n "(cached) " >&6
9294else
9295  case $CHECK_TOOLSDIR_GMAKE in
9296  [\\/]* | ?:[\\/]*)
9297  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
9298  ;;
9299  *)
9300  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9301for as_dir in $PATH
9302do
9303  IFS=$as_save_IFS
9304  test -z "$as_dir" && as_dir=.
9305    for ac_exec_ext in '' $ac_executable_extensions; do
9306  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9307    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
9308    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9309    break 2
9310  fi
9311done
9312  done
9313IFS=$as_save_IFS
9314
9315  ;;
9316esac
9317fi
9318CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
9319if test -n "$CHECK_TOOLSDIR_GMAKE"; then
9320  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
9321$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
9322else
9323  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9324$as_echo "no" >&6; }
9325fi
9326
9327
9328  test -n "$CHECK_TOOLSDIR_GMAKE" && break
9329done
9330
9331
9332  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
9333  DESCRIPTION="gmake in tools-dir"
9334  if test "x$MAKE_CANDIDATE" != x; then
9335    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
9336$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
9337    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
9338    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
9339    if test "x$IS_GNU_MAKE" = x; then
9340      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
9341$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
9342    else
9343      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
9344      if test "x$IS_MODERN_MAKE" = x; then
9345        { $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
9346$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;}
9347      else
9348        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9349          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9350            MAKE_EXPECTED_ENV='cygwin'
9351          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9352            MAKE_EXPECTED_ENV='msys'
9353          else
9354            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
9355          fi
9356          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
9357          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
9358        else
9359          # Not relevant for non-Windows
9360          IS_MAKE_CORRECT_ENV=true
9361        fi
9362        if test "x$IS_MAKE_CORRECT_ENV" = x; then
9363          { $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
9364$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;}
9365        else
9366          FOUND_MAKE=$MAKE_CANDIDATE
9367
9368  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9369
9370  # First separate the path from the arguments. This will split at the first
9371  # space.
9372  complete="$FOUND_MAKE"
9373  path="${complete%% *}"
9374  tmp="$complete EOL"
9375  arguments="${tmp#* }"
9376
9377  # Input might be given as Windows format, start by converting to
9378  # unix format.
9379  new_path=`$CYGPATH -u "$path"`
9380
9381  # Now try to locate executable using which
9382  new_path=`$WHICH "$new_path" 2> /dev/null`
9383  # bat and cmd files are not always considered executable in cygwin causing which
9384  # to not find them
9385  if test "x$new_path" = x \
9386      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9387      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9388    new_path=`$CYGPATH -u "$path"`
9389  fi
9390  if test "x$new_path" = x; then
9391    # Oops. Which didn't find the executable.
9392    # The splitting of arguments from the executable at a space might have been incorrect,
9393    # since paths with space are more likely in Windows. Give it another try with the whole
9394    # argument.
9395    path="$complete"
9396    arguments="EOL"
9397    new_path=`$CYGPATH -u "$path"`
9398    new_path=`$WHICH "$new_path" 2> /dev/null`
9399    # bat and cmd files are not always considered executable in cygwin causing which
9400    # to not find them
9401    if test "x$new_path" = x \
9402        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9403        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9404      new_path=`$CYGPATH -u "$path"`
9405    fi
9406    if test "x$new_path" = x; then
9407      # It's still not found. Now this is an unrecoverable error.
9408      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9409$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9410      has_space=`$ECHO "$complete" | $GREP " "`
9411      if test "x$has_space" != x; then
9412        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9413$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9414      fi
9415      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9416    fi
9417  fi
9418
9419  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9420  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9421  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9422  # "foo.exe" is OK but "foo" is an error.
9423  #
9424  # This test is therefore slightly more accurate than "test -f" to check for file presence.
9425  # It is also a way to make sure we got the proper file name for the real test later on.
9426  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9427  if test "x$test_shortpath" = x; then
9428    # Short path failed, file does not exist as specified.
9429    # Try adding .exe or .cmd
9430    if test -f "${new_path}.exe"; then
9431      input_to_shortpath="${new_path}.exe"
9432    elif test -f "${new_path}.cmd"; then
9433      input_to_shortpath="${new_path}.cmd"
9434    else
9435      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9436$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9437      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9438$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9439      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9440    fi
9441  else
9442    input_to_shortpath="$new_path"
9443  fi
9444
9445  # Call helper function which possibly converts this using DOS-style short mode.
9446  # If so, the updated path is stored in $new_path.
9447  new_path="$input_to_shortpath"
9448
9449  input_path="$input_to_shortpath"
9450  # Check if we need to convert this using DOS-style short mode. If the path
9451  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9452  # take no chances and rewrite it.
9453  # Note: m4 eats our [], so we need to use [ and ] instead.
9454  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9455  if test "x$has_forbidden_chars" != x; then
9456    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9457    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9458    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9459    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9460      # Going to short mode and back again did indeed matter. Since short mode is
9461      # case insensitive, let's make it lowercase to improve readability.
9462      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9463      # Now convert it back to Unix-stile (cygpath)
9464      input_path=`$CYGPATH -u "$shortmode_path"`
9465      new_path="$input_path"
9466    fi
9467  fi
9468
9469  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9470  if test "x$test_cygdrive_prefix" = x; then
9471    # As a simple fix, exclude /usr/bin since it's not a real path.
9472    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9473      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9474      # a path prefixed by /cygdrive for fixpath to work.
9475      new_path="$CYGWIN_ROOT_PATH$input_path"
9476    fi
9477  fi
9478
9479  # remove trailing .exe if any
9480  new_path="${new_path/%.exe/}"
9481
9482  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9483
9484  # First separate the path from the arguments. This will split at the first
9485  # space.
9486  complete="$FOUND_MAKE"
9487  path="${complete%% *}"
9488  tmp="$complete EOL"
9489  arguments="${tmp#* }"
9490
9491  # Input might be given as Windows format, start by converting to
9492  # unix format.
9493  new_path="$path"
9494
9495  windows_path="$new_path"
9496  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9497    unix_path=`$CYGPATH -u "$windows_path"`
9498    new_path="$unix_path"
9499  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9500    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9501    new_path="$unix_path"
9502  fi
9503
9504
9505  # Now try to locate executable using which
9506  new_path=`$WHICH "$new_path" 2> /dev/null`
9507
9508  if test "x$new_path" = x; then
9509    # Oops. Which didn't find the executable.
9510    # The splitting of arguments from the executable at a space might have been incorrect,
9511    # since paths with space are more likely in Windows. Give it another try with the whole
9512    # argument.
9513    path="$complete"
9514    arguments="EOL"
9515    new_path="$path"
9516
9517  windows_path="$new_path"
9518  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9519    unix_path=`$CYGPATH -u "$windows_path"`
9520    new_path="$unix_path"
9521  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9522    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9523    new_path="$unix_path"
9524  fi
9525
9526
9527    new_path=`$WHICH "$new_path" 2> /dev/null`
9528
9529    if test "x$new_path" = x; then
9530      # It's still not found. Now this is an unrecoverable error.
9531      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9532$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9533      has_space=`$ECHO "$complete" | $GREP " "`
9534      if test "x$has_space" != x; then
9535        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9536$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9537      fi
9538      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9539    fi
9540  fi
9541
9542  # Now new_path has a complete unix path to the binary
9543  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9544    # Keep paths in /bin as-is, but remove trailing .exe if any
9545    new_path="${new_path/%.exe/}"
9546    # Do not save /bin paths to all_fixpath_prefixes!
9547  else
9548    # Not in mixed or Windows style, start by that.
9549    new_path=`cmd //c echo $new_path`
9550
9551  input_path="$new_path"
9552  # Check if we need to convert this using DOS-style short mode. If the path
9553  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9554  # take no chances and rewrite it.
9555  # Note: m4 eats our [], so we need to use [ and ] instead.
9556  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9557  if test "x$has_forbidden_chars" != x; then
9558    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9559    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9560  fi
9561
9562    # Output is in $new_path
9563
9564  windows_path="$new_path"
9565  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9566    unix_path=`$CYGPATH -u "$windows_path"`
9567    new_path="$unix_path"
9568  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9569    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9570    new_path="$unix_path"
9571  fi
9572
9573    # remove trailing .exe if any
9574    new_path="${new_path/%.exe/}"
9575
9576    # Save the first 10 bytes of this path to the storage, so fixpath can work.
9577    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9578  fi
9579
9580  else
9581    # We're on a posix platform. Hooray! :)
9582    # First separate the path from the arguments. This will split at the first
9583    # space.
9584    complete="$FOUND_MAKE"
9585    path="${complete%% *}"
9586    tmp="$complete EOL"
9587    arguments="${tmp#* }"
9588
9589    # Cannot rely on the command "which" here since it doesn't always work.
9590    is_absolute_path=`$ECHO "$path" | $GREP ^/`
9591    if test -z "$is_absolute_path"; then
9592      # Path to executable is not absolute. Find it.
9593      IFS_save="$IFS"
9594      IFS=:
9595      for p in $PATH; do
9596        if test -f "$p/$path" && test -x "$p/$path"; then
9597          new_path="$p/$path"
9598          break
9599        fi
9600      done
9601      IFS="$IFS_save"
9602    else
9603      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9604$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9605      new_path="$path"
9606    fi
9607
9608    if test "x$new_path" = x; then
9609      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9610$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9611      has_space=`$ECHO "$complete" | $GREP " "`
9612      if test "x$has_space" != x; then
9613        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9614$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9615      fi
9616      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9617    fi
9618  fi
9619
9620  # Now join together the path and the arguments once again
9621  if test "x$arguments" != xEOL; then
9622    new_complete="$new_path ${arguments% *}"
9623  else
9624    new_complete="$new_path"
9625  fi
9626
9627  if test "x$complete" != "x$new_complete"; then
9628    FOUND_MAKE="$new_complete"
9629    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9630$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9631  fi
9632
9633        fi
9634      fi
9635    fi
9636  fi
9637
9638        if test "x$FOUND_MAKE" = x; then
9639          for ac_prog in make
9640do
9641  # Extract the first word of "$ac_prog", so it can be a program name with args.
9642set dummy $ac_prog; ac_word=$2
9643{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9644$as_echo_n "checking for $ac_word... " >&6; }
9645if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
9646  $as_echo_n "(cached) " >&6
9647else
9648  case $CHECK_TOOLSDIR_MAKE in
9649  [\\/]* | ?:[\\/]*)
9650  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
9651  ;;
9652  *)
9653  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9654for as_dir in $PATH
9655do
9656  IFS=$as_save_IFS
9657  test -z "$as_dir" && as_dir=.
9658    for ac_exec_ext in '' $ac_executable_extensions; do
9659  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9660    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
9661    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9662    break 2
9663  fi
9664done
9665  done
9666IFS=$as_save_IFS
9667
9668  ;;
9669esac
9670fi
9671CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
9672if test -n "$CHECK_TOOLSDIR_MAKE"; then
9673  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
9674$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
9675else
9676  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9677$as_echo "no" >&6; }
9678fi
9679
9680
9681  test -n "$CHECK_TOOLSDIR_MAKE" && break
9682done
9683
9684
9685  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
9686  DESCRIPTION="make in tools-dir"
9687  if test "x$MAKE_CANDIDATE" != x; then
9688    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
9689$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
9690    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
9691    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
9692    if test "x$IS_GNU_MAKE" = x; then
9693      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
9694$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
9695    else
9696      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
9697      if test "x$IS_MODERN_MAKE" = x; then
9698        { $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
9699$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;}
9700      else
9701        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9702          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9703            MAKE_EXPECTED_ENV='cygwin'
9704          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9705            MAKE_EXPECTED_ENV='msys'
9706          else
9707            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
9708          fi
9709          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
9710          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
9711        else
9712          # Not relevant for non-Windows
9713          IS_MAKE_CORRECT_ENV=true
9714        fi
9715        if test "x$IS_MAKE_CORRECT_ENV" = x; then
9716          { $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
9717$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;}
9718        else
9719          FOUND_MAKE=$MAKE_CANDIDATE
9720
9721  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9722
9723  # First separate the path from the arguments. This will split at the first
9724  # space.
9725  complete="$FOUND_MAKE"
9726  path="${complete%% *}"
9727  tmp="$complete EOL"
9728  arguments="${tmp#* }"
9729
9730  # Input might be given as Windows format, start by converting to
9731  # unix format.
9732  new_path=`$CYGPATH -u "$path"`
9733
9734  # Now try to locate executable using which
9735  new_path=`$WHICH "$new_path" 2> /dev/null`
9736  # bat and cmd files are not always considered executable in cygwin causing which
9737  # to not find them
9738  if test "x$new_path" = x \
9739      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9740      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9741    new_path=`$CYGPATH -u "$path"`
9742  fi
9743  if test "x$new_path" = x; then
9744    # Oops. Which didn't find the executable.
9745    # The splitting of arguments from the executable at a space might have been incorrect,
9746    # since paths with space are more likely in Windows. Give it another try with the whole
9747    # argument.
9748    path="$complete"
9749    arguments="EOL"
9750    new_path=`$CYGPATH -u "$path"`
9751    new_path=`$WHICH "$new_path" 2> /dev/null`
9752    # bat and cmd files are not always considered executable in cygwin causing which
9753    # to not find them
9754    if test "x$new_path" = x \
9755        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9756        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9757      new_path=`$CYGPATH -u "$path"`
9758    fi
9759    if test "x$new_path" = x; then
9760      # It's still not found. Now this is an unrecoverable error.
9761      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9762$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9763      has_space=`$ECHO "$complete" | $GREP " "`
9764      if test "x$has_space" != x; then
9765        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9766$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9767      fi
9768      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9769    fi
9770  fi
9771
9772  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9773  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9774  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9775  # "foo.exe" is OK but "foo" is an error.
9776  #
9777  # This test is therefore slightly more accurate than "test -f" to check for file presence.
9778  # It is also a way to make sure we got the proper file name for the real test later on.
9779  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9780  if test "x$test_shortpath" = x; then
9781    # Short path failed, file does not exist as specified.
9782    # Try adding .exe or .cmd
9783    if test -f "${new_path}.exe"; then
9784      input_to_shortpath="${new_path}.exe"
9785    elif test -f "${new_path}.cmd"; then
9786      input_to_shortpath="${new_path}.cmd"
9787    else
9788      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9789$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9790      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9791$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9792      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9793    fi
9794  else
9795    input_to_shortpath="$new_path"
9796  fi
9797
9798  # Call helper function which possibly converts this using DOS-style short mode.
9799  # If so, the updated path is stored in $new_path.
9800  new_path="$input_to_shortpath"
9801
9802  input_path="$input_to_shortpath"
9803  # Check if we need to convert this using DOS-style short mode. If the path
9804  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9805  # take no chances and rewrite it.
9806  # Note: m4 eats our [], so we need to use [ and ] instead.
9807  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9808  if test "x$has_forbidden_chars" != x; then
9809    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9810    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9811    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9812    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9813      # Going to short mode and back again did indeed matter. Since short mode is
9814      # case insensitive, let's make it lowercase to improve readability.
9815      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9816      # Now convert it back to Unix-stile (cygpath)
9817      input_path=`$CYGPATH -u "$shortmode_path"`
9818      new_path="$input_path"
9819    fi
9820  fi
9821
9822  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9823  if test "x$test_cygdrive_prefix" = x; then
9824    # As a simple fix, exclude /usr/bin since it's not a real path.
9825    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9826      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9827      # a path prefixed by /cygdrive for fixpath to work.
9828      new_path="$CYGWIN_ROOT_PATH$input_path"
9829    fi
9830  fi
9831
9832  # remove trailing .exe if any
9833  new_path="${new_path/%.exe/}"
9834
9835  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9836
9837  # First separate the path from the arguments. This will split at the first
9838  # space.
9839  complete="$FOUND_MAKE"
9840  path="${complete%% *}"
9841  tmp="$complete EOL"
9842  arguments="${tmp#* }"
9843
9844  # Input might be given as Windows format, start by converting to
9845  # unix format.
9846  new_path="$path"
9847
9848  windows_path="$new_path"
9849  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9850    unix_path=`$CYGPATH -u "$windows_path"`
9851    new_path="$unix_path"
9852  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9853    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9854    new_path="$unix_path"
9855  fi
9856
9857
9858  # Now try to locate executable using which
9859  new_path=`$WHICH "$new_path" 2> /dev/null`
9860
9861  if test "x$new_path" = x; then
9862    # Oops. Which didn't find the executable.
9863    # The splitting of arguments from the executable at a space might have been incorrect,
9864    # since paths with space are more likely in Windows. Give it another try with the whole
9865    # argument.
9866    path="$complete"
9867    arguments="EOL"
9868    new_path="$path"
9869
9870  windows_path="$new_path"
9871  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9872    unix_path=`$CYGPATH -u "$windows_path"`
9873    new_path="$unix_path"
9874  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9875    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9876    new_path="$unix_path"
9877  fi
9878
9879
9880    new_path=`$WHICH "$new_path" 2> /dev/null`
9881
9882    if test "x$new_path" = x; then
9883      # It's still not found. Now this is an unrecoverable error.
9884      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9885$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9886      has_space=`$ECHO "$complete" | $GREP " "`
9887      if test "x$has_space" != x; then
9888        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9889$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9890      fi
9891      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9892    fi
9893  fi
9894
9895  # Now new_path has a complete unix path to the binary
9896  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9897    # Keep paths in /bin as-is, but remove trailing .exe if any
9898    new_path="${new_path/%.exe/}"
9899    # Do not save /bin paths to all_fixpath_prefixes!
9900  else
9901    # Not in mixed or Windows style, start by that.
9902    new_path=`cmd //c echo $new_path`
9903
9904  input_path="$new_path"
9905  # Check if we need to convert this using DOS-style short mode. If the path
9906  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9907  # take no chances and rewrite it.
9908  # Note: m4 eats our [], so we need to use [ and ] instead.
9909  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9910  if test "x$has_forbidden_chars" != x; then
9911    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9912    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9913  fi
9914
9915    # Output is in $new_path
9916
9917  windows_path="$new_path"
9918  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9919    unix_path=`$CYGPATH -u "$windows_path"`
9920    new_path="$unix_path"
9921  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9922    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9923    new_path="$unix_path"
9924  fi
9925
9926    # remove trailing .exe if any
9927    new_path="${new_path/%.exe/}"
9928
9929    # Save the first 10 bytes of this path to the storage, so fixpath can work.
9930    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9931  fi
9932
9933  else
9934    # We're on a posix platform. Hooray! :)
9935    # First separate the path from the arguments. This will split at the first
9936    # space.
9937    complete="$FOUND_MAKE"
9938    path="${complete%% *}"
9939    tmp="$complete EOL"
9940    arguments="${tmp#* }"
9941
9942    # Cannot rely on the command "which" here since it doesn't always work.
9943    is_absolute_path=`$ECHO "$path" | $GREP ^/`
9944    if test -z "$is_absolute_path"; then
9945      # Path to executable is not absolute. Find it.
9946      IFS_save="$IFS"
9947      IFS=:
9948      for p in $PATH; do
9949        if test -f "$p/$path" && test -x "$p/$path"; then
9950          new_path="$p/$path"
9951          break
9952        fi
9953      done
9954      IFS="$IFS_save"
9955    else
9956      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9957$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9958      new_path="$path"
9959    fi
9960
9961    if test "x$new_path" = x; then
9962      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9963$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9964      has_space=`$ECHO "$complete" | $GREP " "`
9965      if test "x$has_space" != x; then
9966        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9967$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9968      fi
9969      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9970    fi
9971  fi
9972
9973  # Now join together the path and the arguments once again
9974  if test "x$arguments" != xEOL; then
9975    new_complete="$new_path ${arguments% *}"
9976  else
9977    new_complete="$new_path"
9978  fi
9979
9980  if test "x$complete" != "x$new_complete"; then
9981    FOUND_MAKE="$new_complete"
9982    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9983$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9984  fi
9985
9986        fi
9987      fi
9988    fi
9989  fi
9990
9991        fi
9992        PATH=$OLD_PATH
9993      fi
9994    fi
9995
9996    if test "x$FOUND_MAKE" = x; then
9997      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
9998    fi
9999  fi
10000
10001  MAKE=$FOUND_MAKE
10002
10003  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
10004$as_echo "$as_me: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
10005
10006
10007
10008  # Test if find supports -delete
10009  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
10010$as_echo_n "checking if find supports -delete... " >&6; }
10011  FIND_DELETE="-delete"
10012
10013  DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
10014
10015  echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
10016
10017  TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
10018  if test -f $DELETEDIR/TestIfFindSupportsDelete; then
10019    # No, it does not.
10020    rm $DELETEDIR/TestIfFindSupportsDelete
10021    FIND_DELETE="-exec rm \{\} \+"
10022    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10023$as_echo "no" >&6; }
10024  else
10025    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10026$as_echo "yes" >&6; }
10027  fi
10028  rmdir $DELETEDIR
10029
10030
10031
10032  # These tools might not be installed by default,
10033  # need hint on how to install them.
10034
10035  for ac_prog in unzip
10036do
10037  # Extract the first word of "$ac_prog", so it can be a program name with args.
10038set dummy $ac_prog; ac_word=$2
10039{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10040$as_echo_n "checking for $ac_word... " >&6; }
10041if ${ac_cv_path_UNZIP+:} false; then :
10042  $as_echo_n "(cached) " >&6
10043else
10044  case $UNZIP in
10045  [\\/]* | ?:[\\/]*)
10046  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
10047  ;;
10048  *)
10049  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10050for as_dir in $PATH
10051do
10052  IFS=$as_save_IFS
10053  test -z "$as_dir" && as_dir=.
10054    for ac_exec_ext in '' $ac_executable_extensions; do
10055  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10056    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
10057    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10058    break 2
10059  fi
10060done
10061  done
10062IFS=$as_save_IFS
10063
10064  ;;
10065esac
10066fi
10067UNZIP=$ac_cv_path_UNZIP
10068if test -n "$UNZIP"; then
10069  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
10070$as_echo "$UNZIP" >&6; }
10071else
10072  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10073$as_echo "no" >&6; }
10074fi
10075
10076
10077  test -n "$UNZIP" && break
10078done
10079
10080
10081  if test "x$UNZIP" = x; then
10082    if test "xunzip" = x; then
10083      PROG_NAME=unzip
10084    else
10085      PROG_NAME=unzip
10086    fi
10087    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10088$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10089    as_fn_error $? "Cannot continue" "$LINENO" 5
10090  fi
10091
10092
10093
10094  for ac_prog in zip
10095do
10096  # Extract the first word of "$ac_prog", so it can be a program name with args.
10097set dummy $ac_prog; ac_word=$2
10098{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10099$as_echo_n "checking for $ac_word... " >&6; }
10100if ${ac_cv_path_ZIP+:} false; then :
10101  $as_echo_n "(cached) " >&6
10102else
10103  case $ZIP in
10104  [\\/]* | ?:[\\/]*)
10105  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
10106  ;;
10107  *)
10108  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10109for as_dir in $PATH
10110do
10111  IFS=$as_save_IFS
10112  test -z "$as_dir" && as_dir=.
10113    for ac_exec_ext in '' $ac_executable_extensions; do
10114  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10115    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
10116    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10117    break 2
10118  fi
10119done
10120  done
10121IFS=$as_save_IFS
10122
10123  ;;
10124esac
10125fi
10126ZIP=$ac_cv_path_ZIP
10127if test -n "$ZIP"; then
10128  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
10129$as_echo "$ZIP" >&6; }
10130else
10131  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10132$as_echo "no" >&6; }
10133fi
10134
10135
10136  test -n "$ZIP" && break
10137done
10138
10139
10140  if test "x$ZIP" = x; then
10141    if test "xzip" = x; then
10142      PROG_NAME=zip
10143    else
10144      PROG_NAME=zip
10145    fi
10146    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10147$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10148    as_fn_error $? "Cannot continue" "$LINENO" 5
10149  fi
10150
10151
10152
10153  # Non-required basic tools
10154
10155  # Extract the first word of "ldd", so it can be a program name with args.
10156set dummy ldd; ac_word=$2
10157{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10158$as_echo_n "checking for $ac_word... " >&6; }
10159if ${ac_cv_path_LDD+:} false; then :
10160  $as_echo_n "(cached) " >&6
10161else
10162  case $LDD in
10163  [\\/]* | ?:[\\/]*)
10164  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
10165  ;;
10166  *)
10167  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10168for as_dir in $PATH
10169do
10170  IFS=$as_save_IFS
10171  test -z "$as_dir" && as_dir=.
10172    for ac_exec_ext in '' $ac_executable_extensions; do
10173  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10174    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
10175    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10176    break 2
10177  fi
10178done
10179  done
10180IFS=$as_save_IFS
10181
10182  ;;
10183esac
10184fi
10185LDD=$ac_cv_path_LDD
10186if test -n "$LDD"; then
10187  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
10188$as_echo "$LDD" >&6; }
10189else
10190  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10191$as_echo "no" >&6; }
10192fi
10193
10194
10195  if test "x$LDD" = "x"; then
10196    # List shared lib dependencies is used for
10197    # debug output and checking for forbidden dependencies.
10198    # We can build without it.
10199    LDD="true"
10200  fi
10201  # Extract the first word of "otool", so it can be a program name with args.
10202set dummy otool; ac_word=$2
10203{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10204$as_echo_n "checking for $ac_word... " >&6; }
10205if ${ac_cv_path_OTOOL+:} false; then :
10206  $as_echo_n "(cached) " >&6
10207else
10208  case $OTOOL in
10209  [\\/]* | ?:[\\/]*)
10210  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
10211  ;;
10212  *)
10213  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10214for as_dir in $PATH
10215do
10216  IFS=$as_save_IFS
10217  test -z "$as_dir" && as_dir=.
10218    for ac_exec_ext in '' $ac_executable_extensions; do
10219  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10220    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
10221    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10222    break 2
10223  fi
10224done
10225  done
10226IFS=$as_save_IFS
10227
10228  ;;
10229esac
10230fi
10231OTOOL=$ac_cv_path_OTOOL
10232if test -n "$OTOOL"; then
10233  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
10234$as_echo "$OTOOL" >&6; }
10235else
10236  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10237$as_echo "no" >&6; }
10238fi
10239
10240
10241  if test "x$OTOOL" = "x"; then
10242    OTOOL="true"
10243  fi
10244  for ac_prog in readelf greadelf
10245do
10246  # Extract the first word of "$ac_prog", so it can be a program name with args.
10247set dummy $ac_prog; ac_word=$2
10248{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10249$as_echo_n "checking for $ac_word... " >&6; }
10250if ${ac_cv_path_READELF+:} false; then :
10251  $as_echo_n "(cached) " >&6
10252else
10253  case $READELF in
10254  [\\/]* | ?:[\\/]*)
10255  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
10256  ;;
10257  *)
10258  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10259for as_dir in $PATH
10260do
10261  IFS=$as_save_IFS
10262  test -z "$as_dir" && as_dir=.
10263    for ac_exec_ext in '' $ac_executable_extensions; do
10264  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10265    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
10266    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10267    break 2
10268  fi
10269done
10270  done
10271IFS=$as_save_IFS
10272
10273  ;;
10274esac
10275fi
10276READELF=$ac_cv_path_READELF
10277if test -n "$READELF"; then
10278  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
10279$as_echo "$READELF" >&6; }
10280else
10281  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10282$as_echo "no" >&6; }
10283fi
10284
10285
10286  test -n "$READELF" && break
10287done
10288
10289  # Extract the first word of "hg", so it can be a program name with args.
10290set dummy hg; ac_word=$2
10291{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10292$as_echo_n "checking for $ac_word... " >&6; }
10293if ${ac_cv_path_HG+:} false; then :
10294  $as_echo_n "(cached) " >&6
10295else
10296  case $HG in
10297  [\\/]* | ?:[\\/]*)
10298  ac_cv_path_HG="$HG" # Let the user override the test with a path.
10299  ;;
10300  *)
10301  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10302for as_dir in $PATH
10303do
10304  IFS=$as_save_IFS
10305  test -z "$as_dir" && as_dir=.
10306    for ac_exec_ext in '' $ac_executable_extensions; do
10307  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10308    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
10309    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10310    break 2
10311  fi
10312done
10313  done
10314IFS=$as_save_IFS
10315
10316  ;;
10317esac
10318fi
10319HG=$ac_cv_path_HG
10320if test -n "$HG"; then
10321  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
10322$as_echo "$HG" >&6; }
10323else
10324  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10325$as_echo "no" >&6; }
10326fi
10327
10328
10329  # Extract the first word of "stat", so it can be a program name with args.
10330set dummy stat; ac_word=$2
10331{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10332$as_echo_n "checking for $ac_word... " >&6; }
10333if ${ac_cv_path_STAT+:} false; then :
10334  $as_echo_n "(cached) " >&6
10335else
10336  case $STAT in
10337  [\\/]* | ?:[\\/]*)
10338  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
10339  ;;
10340  *)
10341  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10342for as_dir in $PATH
10343do
10344  IFS=$as_save_IFS
10345  test -z "$as_dir" && as_dir=.
10346    for ac_exec_ext in '' $ac_executable_extensions; do
10347  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10348    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
10349    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10350    break 2
10351  fi
10352done
10353  done
10354IFS=$as_save_IFS
10355
10356  ;;
10357esac
10358fi
10359STAT=$ac_cv_path_STAT
10360if test -n "$STAT"; then
10361  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
10362$as_echo "$STAT" >&6; }
10363else
10364  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10365$as_echo "no" >&6; }
10366fi
10367
10368
10369  # Extract the first word of "time", so it can be a program name with args.
10370set dummy time; ac_word=$2
10371{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10372$as_echo_n "checking for $ac_word... " >&6; }
10373if ${ac_cv_path_TIME+:} false; then :
10374  $as_echo_n "(cached) " >&6
10375else
10376  case $TIME in
10377  [\\/]* | ?:[\\/]*)
10378  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
10379  ;;
10380  *)
10381  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10382for as_dir in $PATH
10383do
10384  IFS=$as_save_IFS
10385  test -z "$as_dir" && as_dir=.
10386    for ac_exec_ext in '' $ac_executable_extensions; do
10387  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10388    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
10389    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10390    break 2
10391  fi
10392done
10393  done
10394IFS=$as_save_IFS
10395
10396  ;;
10397esac
10398fi
10399TIME=$ac_cv_path_TIME
10400if test -n "$TIME"; then
10401  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
10402$as_echo "$TIME" >&6; }
10403else
10404  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10405$as_echo "no" >&6; }
10406fi
10407
10408
10409  # Check if it's GNU time
10410  IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
10411  if test "x$IS_GNU_TIME" != x; then
10412    IS_GNU_TIME=yes
10413  else
10414    IS_GNU_TIME=no
10415  fi
10416
10417
10418  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
10419
10420  for ac_prog in comm
10421do
10422  # Extract the first word of "$ac_prog", so it can be a program name with args.
10423set dummy $ac_prog; ac_word=$2
10424{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10425$as_echo_n "checking for $ac_word... " >&6; }
10426if ${ac_cv_path_COMM+:} false; then :
10427  $as_echo_n "(cached) " >&6
10428else
10429  case $COMM in
10430  [\\/]* | ?:[\\/]*)
10431  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
10432  ;;
10433  *)
10434  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10435for as_dir in $PATH
10436do
10437  IFS=$as_save_IFS
10438  test -z "$as_dir" && as_dir=.
10439    for ac_exec_ext in '' $ac_executable_extensions; do
10440  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10441    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
10442    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10443    break 2
10444  fi
10445done
10446  done
10447IFS=$as_save_IFS
10448
10449  ;;
10450esac
10451fi
10452COMM=$ac_cv_path_COMM
10453if test -n "$COMM"; then
10454  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
10455$as_echo "$COMM" >&6; }
10456else
10457  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10458$as_echo "no" >&6; }
10459fi
10460
10461
10462  test -n "$COMM" && break
10463done
10464
10465
10466  if test "x$COMM" = x; then
10467    if test "xcomm" = x; then
10468      PROG_NAME=comm
10469    else
10470      PROG_NAME=comm
10471    fi
10472    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10473$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10474    as_fn_error $? "Cannot continue" "$LINENO" 5
10475  fi
10476
10477
10478  fi
10479
10480  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
10481
10482  for ac_prog in xattr
10483do
10484  # Extract the first word of "$ac_prog", so it can be a program name with args.
10485set dummy $ac_prog; ac_word=$2
10486{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10487$as_echo_n "checking for $ac_word... " >&6; }
10488if ${ac_cv_path_XATTR+:} false; then :
10489  $as_echo_n "(cached) " >&6
10490else
10491  case $XATTR in
10492  [\\/]* | ?:[\\/]*)
10493  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
10494  ;;
10495  *)
10496  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10497for as_dir in $PATH
10498do
10499  IFS=$as_save_IFS
10500  test -z "$as_dir" && as_dir=.
10501    for ac_exec_ext in '' $ac_executable_extensions; do
10502  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10503    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
10504    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10505    break 2
10506  fi
10507done
10508  done
10509IFS=$as_save_IFS
10510
10511  ;;
10512esac
10513fi
10514XATTR=$ac_cv_path_XATTR
10515if test -n "$XATTR"; then
10516  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
10517$as_echo "$XATTR" >&6; }
10518else
10519  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10520$as_echo "no" >&6; }
10521fi
10522
10523
10524  test -n "$XATTR" && break
10525done
10526
10527
10528  if test "x$XATTR" = x; then
10529    if test "xxattr" = x; then
10530      PROG_NAME=xattr
10531    else
10532      PROG_NAME=xattr
10533    fi
10534    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10535$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10536    as_fn_error $? "Cannot continue" "$LINENO" 5
10537  fi
10538
10539
10540    # Extract the first word of "codesign", so it can be a program name with args.
10541set dummy codesign; ac_word=$2
10542{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10543$as_echo_n "checking for $ac_word... " >&6; }
10544if ${ac_cv_path_CODESIGN+:} false; then :
10545  $as_echo_n "(cached) " >&6
10546else
10547  case $CODESIGN in
10548  [\\/]* | ?:[\\/]*)
10549  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
10550  ;;
10551  *)
10552  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10553for as_dir in $PATH
10554do
10555  IFS=$as_save_IFS
10556  test -z "$as_dir" && as_dir=.
10557    for ac_exec_ext in '' $ac_executable_extensions; do
10558  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10559    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
10560    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10561    break 2
10562  fi
10563done
10564  done
10565IFS=$as_save_IFS
10566
10567  ;;
10568esac
10569fi
10570CODESIGN=$ac_cv_path_CODESIGN
10571if test -n "$CODESIGN"; then
10572  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
10573$as_echo "$CODESIGN" >&6; }
10574else
10575  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10576$as_echo "no" >&6; }
10577fi
10578
10579
10580    if test "x$CODESIGN" != "x"; then
10581      # Verify that the openjdk_codesign certificate is present
10582      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
10583$as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
10584      rm -f codesign-testfile
10585      touch codesign-testfile
10586      codesign -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
10587      rm -f codesign-testfile
10588      if test "x$CODESIGN" = x; then
10589        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10590$as_echo "no" >&6; }
10591      else
10592        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10593$as_echo "yes" >&6; }
10594      fi
10595    fi
10596
10597
10598    for ac_prog in dsymutil
10599do
10600  # Extract the first word of "$ac_prog", so it can be a program name with args.
10601set dummy $ac_prog; ac_word=$2
10602{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10603$as_echo_n "checking for $ac_word... " >&6; }
10604if ${ac_cv_path_DSYMUTIL+:} false; then :
10605  $as_echo_n "(cached) " >&6
10606else
10607  case $DSYMUTIL in
10608  [\\/]* | ?:[\\/]*)
10609  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
10610  ;;
10611  *)
10612  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10613for as_dir in $PATH
10614do
10615  IFS=$as_save_IFS
10616  test -z "$as_dir" && as_dir=.
10617    for ac_exec_ext in '' $ac_executable_extensions; do
10618  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10619    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
10620    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10621    break 2
10622  fi
10623done
10624  done
10625IFS=$as_save_IFS
10626
10627  ;;
10628esac
10629fi
10630DSYMUTIL=$ac_cv_path_DSYMUTIL
10631if test -n "$DSYMUTIL"; then
10632  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
10633$as_echo "$DSYMUTIL" >&6; }
10634else
10635  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10636$as_echo "no" >&6; }
10637fi
10638
10639
10640  test -n "$DSYMUTIL" && break
10641done
10642
10643
10644    if test "x$DSYMUTIL" = x; then
10645        if test "xdsymutil" = x; then
10646          PROG_NAME=dsymutil
10647        else
10648          PROG_NAME=dsymutil
10649        fi
10650        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10651$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10652        as_fn_error $? "Cannot continue" "$LINENO" 5
10653    fi
10654  fi
10655
10656
10657# Check if pkg-config is available.
10658
10659
10660if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
10661	if test -n "$ac_tool_prefix"; then
10662  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
10663set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
10664{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10665$as_echo_n "checking for $ac_word... " >&6; }
10666if ${ac_cv_path_PKG_CONFIG+:} false; then :
10667  $as_echo_n "(cached) " >&6
10668else
10669  case $PKG_CONFIG in
10670  [\\/]* | ?:[\\/]*)
10671  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10672  ;;
10673  *)
10674  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10675for as_dir in $PATH
10676do
10677  IFS=$as_save_IFS
10678  test -z "$as_dir" && as_dir=.
10679    for ac_exec_ext in '' $ac_executable_extensions; do
10680  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10681    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10682    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10683    break 2
10684  fi
10685done
10686  done
10687IFS=$as_save_IFS
10688
10689  ;;
10690esac
10691fi
10692PKG_CONFIG=$ac_cv_path_PKG_CONFIG
10693if test -n "$PKG_CONFIG"; then
10694  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
10695$as_echo "$PKG_CONFIG" >&6; }
10696else
10697  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10698$as_echo "no" >&6; }
10699fi
10700
10701
10702fi
10703if test -z "$ac_cv_path_PKG_CONFIG"; then
10704  ac_pt_PKG_CONFIG=$PKG_CONFIG
10705  # Extract the first word of "pkg-config", so it can be a program name with args.
10706set dummy pkg-config; ac_word=$2
10707{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10708$as_echo_n "checking for $ac_word... " >&6; }
10709if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
10710  $as_echo_n "(cached) " >&6
10711else
10712  case $ac_pt_PKG_CONFIG in
10713  [\\/]* | ?:[\\/]*)
10714  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
10715  ;;
10716  *)
10717  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10718for as_dir in $PATH
10719do
10720  IFS=$as_save_IFS
10721  test -z "$as_dir" && as_dir=.
10722    for ac_exec_ext in '' $ac_executable_extensions; do
10723  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10724    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10725    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10726    break 2
10727  fi
10728done
10729  done
10730IFS=$as_save_IFS
10731
10732  ;;
10733esac
10734fi
10735ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
10736if test -n "$ac_pt_PKG_CONFIG"; then
10737  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
10738$as_echo "$ac_pt_PKG_CONFIG" >&6; }
10739else
10740  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10741$as_echo "no" >&6; }
10742fi
10743
10744  if test "x$ac_pt_PKG_CONFIG" = x; then
10745    PKG_CONFIG=""
10746  else
10747    case $cross_compiling:$ac_tool_warned in
10748yes:)
10749{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10750$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10751ac_tool_warned=yes ;;
10752esac
10753    PKG_CONFIG=$ac_pt_PKG_CONFIG
10754  fi
10755else
10756  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
10757fi
10758
10759fi
10760if test -n "$PKG_CONFIG"; then
10761	_pkg_min_version=0.9.0
10762	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
10763$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
10764	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
10765		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10766$as_echo "yes" >&6; }
10767	else
10768		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10769$as_echo "no" >&6; }
10770		PKG_CONFIG=""
10771	fi
10772
10773fi
10774
10775# After basic tools have been setup, we can check build os specific details.
10776
10777  ###############################################################################
10778
10779  # Note that this is the build platform OS version!
10780
10781  OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
10782  OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
10783  OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
10784  OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
10785
10786
10787
10788
10789
10790# Setup builddeps, for automatic downloading of tools we need.
10791# This is needed before we can call BDEPS_CHECK_MODULE, which is done in
10792# boot-jdk setup, but we need to have basic tools setup first.
10793
10794
10795# Check whether --with-builddeps-conf was given.
10796if test "${with_builddeps_conf+set}" = set; then :
10797  withval=$with_builddeps_conf;
10798fi
10799
10800
10801
10802# Check whether --with-builddeps-server was given.
10803if test "${with_builddeps_server+set}" = set; then :
10804  withval=$with_builddeps_server;
10805fi
10806
10807
10808
10809# Check whether --with-builddeps-dir was given.
10810if test "${with_builddeps_dir+set}" = set; then :
10811  withval=$with_builddeps_dir;
10812else
10813  with_builddeps_dir=/localhome/builddeps
10814fi
10815
10816
10817
10818# Check whether --with-builddeps-group was given.
10819if test "${with_builddeps_group+set}" = set; then :
10820  withval=$with_builddeps_group;
10821fi
10822
10823
10824
10825
10826  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
10827    if test "x$with_builddeps_conf" != x; then
10828      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for supplied builddeps configuration file" >&5
10829$as_echo_n "checking for supplied builddeps configuration file... " >&6; }
10830      builddepsfile=$with_builddeps_conf
10831      if test -s $builddepsfile; then
10832        . $builddepsfile
10833        { $as_echo "$as_me:${as_lineno-$LINENO}: result: loaded!" >&5
10834$as_echo "loaded!" >&6; }
10835      else
10836        as_fn_error $? "The given builddeps conf file $with_builddeps_conf could not be loaded!" "$LINENO" 5
10837      fi
10838    else
10839      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builddeps.conf files in sources..." >&5
10840$as_echo_n "checking for builddeps.conf files in sources...... " >&6; }
10841      builddepsfile=`mktemp`
10842      touch $builddepsfile
10843      # Put all found confs into a single file.
10844      find ${SRC_ROOT} -name builddeps.conf -exec cat \{\} \; >> $builddepsfile
10845      # Source the file to acquire the variables
10846      if test -s $builddepsfile; then
10847        . $builddepsfile
10848        { $as_echo "$as_me:${as_lineno-$LINENO}: result: found at least one!" >&5
10849$as_echo "found at least one!" >&6; }
10850      else
10851        as_fn_error $? "Could not find any builddeps.conf at all!" "$LINENO" 5
10852      fi
10853    fi
10854    # Create build and target names that use _ instead of "-" and ".".
10855    # This is necessary to use them in variable names.
10856    build_var=`echo ${OPENJDK_BUILD_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
10857    target_var=`echo ${OPENJDK_TARGET_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
10858    # Extract rewrite information for build and target
10859    eval rewritten_build=\${REWRITE_${build_var}}
10860    if test "x$rewritten_build" = x; then
10861      rewritten_build=${OPENJDK_BUILD_AUTOCONF_NAME}
10862      echo Build stays the same $rewritten_build
10863    else
10864      echo Rewriting build for builddeps into $rewritten_build
10865    fi
10866    eval rewritten_target=\${REWRITE_${target_var}}
10867    if test "x$rewritten_target" = x; then
10868      rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME}
10869      echo Target stays the same $rewritten_target
10870    else
10871      echo Rewriting target for builddeps into $rewritten_target
10872    fi
10873    rewritten_build_var=`echo ${rewritten_build} | tr '-' '_' | tr '.' '_'`
10874    rewritten_target_var=`echo ${rewritten_target} | tr '-' '_' | tr '.' '_'`
10875  fi
10876  for ac_prog in 7z unzip
10877do
10878  # Extract the first word of "$ac_prog", so it can be a program name with args.
10879set dummy $ac_prog; ac_word=$2
10880{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10881$as_echo_n "checking for $ac_word... " >&6; }
10882if ${ac_cv_prog_BDEPS_UNZIP+:} false; then :
10883  $as_echo_n "(cached) " >&6
10884else
10885  if test -n "$BDEPS_UNZIP"; then
10886  ac_cv_prog_BDEPS_UNZIP="$BDEPS_UNZIP" # Let the user override the test.
10887else
10888as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10889for as_dir in $PATH
10890do
10891  IFS=$as_save_IFS
10892  test -z "$as_dir" && as_dir=.
10893    for ac_exec_ext in '' $ac_executable_extensions; do
10894  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10895    ac_cv_prog_BDEPS_UNZIP="$ac_prog"
10896    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10897    break 2
10898  fi
10899done
10900  done
10901IFS=$as_save_IFS
10902
10903fi
10904fi
10905BDEPS_UNZIP=$ac_cv_prog_BDEPS_UNZIP
10906if test -n "$BDEPS_UNZIP"; then
10907  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_UNZIP" >&5
10908$as_echo "$BDEPS_UNZIP" >&6; }
10909else
10910  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10911$as_echo "no" >&6; }
10912fi
10913
10914
10915  test -n "$BDEPS_UNZIP" && break
10916done
10917
10918  if test "x$BDEPS_UNZIP" = x7z; then
10919    BDEPS_UNZIP="7z x"
10920  fi
10921
10922  for ac_prog in wget lftp ftp
10923do
10924  # Extract the first word of "$ac_prog", so it can be a program name with args.
10925set dummy $ac_prog; ac_word=$2
10926{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10927$as_echo_n "checking for $ac_word... " >&6; }
10928if ${ac_cv_prog_BDEPS_FTP+:} false; then :
10929  $as_echo_n "(cached) " >&6
10930else
10931  if test -n "$BDEPS_FTP"; then
10932  ac_cv_prog_BDEPS_FTP="$BDEPS_FTP" # Let the user override the test.
10933else
10934as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10935for as_dir in $PATH
10936do
10937  IFS=$as_save_IFS
10938  test -z "$as_dir" && as_dir=.
10939    for ac_exec_ext in '' $ac_executable_extensions; do
10940  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10941    ac_cv_prog_BDEPS_FTP="$ac_prog"
10942    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10943    break 2
10944  fi
10945done
10946  done
10947IFS=$as_save_IFS
10948
10949fi
10950fi
10951BDEPS_FTP=$ac_cv_prog_BDEPS_FTP
10952if test -n "$BDEPS_FTP"; then
10953  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_FTP" >&5
10954$as_echo "$BDEPS_FTP" >&6; }
10955else
10956  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10957$as_echo "no" >&6; }
10958fi
10959
10960
10961  test -n "$BDEPS_FTP" && break
10962done
10963
10964
10965
10966###############################################################################
10967#
10968# Determine OpenJDK variants, options and version numbers.
10969#
10970###############################################################################
10971
10972# We need build & target for this.
10973
10974
10975  ###############################################################################
10976  #
10977  # Should we build a JDK/JVM with headful support (ie a graphical ui)?
10978  # We always build headless support.
10979  #
10980  { $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
10981$as_echo_n "checking headful support... " >&6; }
10982  # Check whether --enable-headful was given.
10983if test "${enable_headful+set}" = set; then :
10984  enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
10985else
10986  SUPPORT_HEADFUL=yes
10987fi
10988
10989
10990  SUPPORT_HEADLESS=yes
10991  BUILD_HEADLESS="BUILD_HEADLESS:=true"
10992
10993  if test "x$SUPPORT_HEADFUL" = xyes; then
10994    # We are building both headful and headless.
10995    headful_msg="include support for both headful and headless"
10996  fi
10997
10998  if test "x$SUPPORT_HEADFUL" = xno; then
10999    # Thus we are building headless only.
11000    BUILD_HEADLESS="BUILD_HEADLESS:=true"
11001    headful_msg="headless only"
11002  fi
11003
11004  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
11005$as_echo "$headful_msg" >&6; }
11006
11007
11008
11009
11010
11011  # Control wether Hotspot runs Queens test after build.
11012  # Check whether --enable-hotspot-test-in-build was given.
11013if test "${enable_hotspot_test_in_build+set}" = set; then :
11014  enableval=$enable_hotspot_test_in_build;
11015else
11016  enable_hotspot_test_in_build=no
11017fi
11018
11019  if test "x$enable_hotspot_test_in_build" = "xyes"; then
11020    TEST_IN_BUILD=true
11021  else
11022    TEST_IN_BUILD=false
11023  fi
11024
11025
11026  ###############################################################################
11027  #
11028  # Choose cacerts source file
11029  #
11030
11031# Check whether --with-cacerts-file was given.
11032if test "${with_cacerts_file+set}" = set; then :
11033  withval=$with_cacerts_file;
11034fi
11035
11036  if test "x$with_cacerts_file" != x; then
11037    CACERTS_FILE=$with_cacerts_file
11038  else
11039    CACERTS_FILE=${SRC_ROOT}/jdk/src/share/lib/security/cacerts
11040  fi
11041
11042
11043  ###############################################################################
11044  #
11045  # Enable or disable unlimited crypto
11046  #
11047  # Check whether --enable-unlimited-crypto was given.
11048if test "${enable_unlimited_crypto+set}" = set; then :
11049  enableval=$enable_unlimited_crypto;
11050else
11051  enable_unlimited_crypto=no
11052fi
11053
11054  if test "x$enable_unlimited_crypto" = "xyes"; then
11055    UNLIMITED_CRYPTO=true
11056  else
11057    UNLIMITED_CRYPTO=false
11058  fi
11059
11060
11061  ###############################################################################
11062  #
11063  # Enable or disable the elliptic curve crypto implementation
11064  #
11065
11066
11067  ###############################################################################
11068  #
11069  # Compress jars
11070  #
11071  COMPRESS_JARS=false
11072
11073
11074
11075
11076  # Source the version numbers
11077  . $AUTOCONF_DIR/version-numbers
11078
11079  # Get the settings from parameters
11080
11081# Check whether --with-milestone was given.
11082if test "${with_milestone+set}" = set; then :
11083  withval=$with_milestone;
11084fi
11085
11086  if test "x$with_milestone" = xyes; then
11087    as_fn_error $? "Milestone must have a value" "$LINENO" 5
11088  elif test "x$with_milestone" != x; then
11089    MILESTONE="$with_milestone"
11090  fi
11091  if test "x$MILESTONE" = x; then
11092    MILESTONE=internal
11093  fi
11094
11095
11096# Check whether --with-update-version was given.
11097if test "${with_update_version+set}" = set; then :
11098  withval=$with_update_version;
11099fi
11100
11101  if test "x$with_update_version" = xyes; then
11102    as_fn_error $? "Update version must have a value" "$LINENO" 5
11103  elif test "x$with_update_version" != x; then
11104    JDK_UPDATE_VERSION="$with_update_version"
11105  fi
11106
11107
11108# Check whether --with-user-release-suffix was given.
11109if test "${with_user_release_suffix+set}" = set; then :
11110  withval=$with_user_release_suffix;
11111fi
11112
11113  if test "x$with_user_release_suffix" = xyes; then
11114    as_fn_error $? "Release suffix must have a value" "$LINENO" 5
11115  elif test "x$with_user_release_suffix" != x; then
11116    USER_RELEASE_SUFFIX="$with_user_release_suffix"
11117  fi
11118
11119
11120# Check whether --with-build-number was given.
11121if test "${with_build_number+set}" = set; then :
11122  withval=$with_build_number;
11123fi
11124
11125  if test "x$with_build_number" = xyes; then
11126    as_fn_error $? "Build number must have a value" "$LINENO" 5
11127  elif test "x$with_build_number" != x; then
11128    JDK_BUILD_NUMBER="$with_build_number"
11129  fi
11130  # Define default USER_RELEASE_SUFFIX if BUILD_NUMBER and USER_RELEASE_SUFFIX are not set
11131  if test "x$JDK_BUILD_NUMBER" = x; then
11132    JDK_BUILD_NUMBER=b00
11133    if test "x$USER_RELEASE_SUFFIX" = x; then
11134      BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
11135      # Avoid [:alnum:] since it depends on the locale.
11136      CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvqxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'`
11137      USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11138    fi
11139  fi
11140
11141  # Now set the JDK version, milestone, build number etc.
11142
11143
11144
11145
11146
11147
11148
11149
11150
11151
11152
11153
11154
11155
11156
11157  COPYRIGHT_YEAR=`date +'%Y'`
11158
11159
11160  if test "x$JDK_UPDATE_VERSION" != x; then
11161    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
11162  else
11163    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
11164  fi
11165
11166
11167  COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
11168
11169
11170
11171###############################################################################
11172#
11173# Setup BootJDK, used to bootstrap the build.
11174#
11175###############################################################################
11176
11177
11178  BOOT_JDK_FOUND=no
11179
11180# Check whether --with-boot-jdk was given.
11181if test "${with_boot_jdk+set}" = set; then :
11182  withval=$with_boot_jdk;
11183fi
11184
11185
11186  # We look for the Boot JDK through various means, going from more certain to
11187  # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
11188  # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
11189  # must check if this is indeed valid; otherwise we'll continue looking.
11190
11191  # Test: Is bootjdk explicitely set by command line arguments?
11192
11193  if test "x$BOOT_JDK_FOUND" = xno; then
11194    # Now execute the test
11195
11196  if test "x$with_boot_jdk" != x; then
11197    BOOT_JDK=$with_boot_jdk
11198    BOOT_JDK_FOUND=maybe
11199    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
11200$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
11201  fi
11202
11203
11204    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11205    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11206      # Do we have a bin/java?
11207      if test ! -x "$BOOT_JDK/bin/java"; then
11208        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11209$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11210        BOOT_JDK_FOUND=no
11211      else
11212        # Do we have a bin/javac?
11213        if test ! -x "$BOOT_JDK/bin/javac"; then
11214          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11215$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11216          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11217$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11218          BOOT_JDK_FOUND=no
11219        else
11220          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11221          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11222            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11223$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11224            BOOT_JDK_FOUND=no
11225          else
11226            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11227            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11228
11229            # Extra M4 quote needed to protect [] in grep expression.
11230            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11231            if test "x$FOUND_VERSION_78" = x; then
11232              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11233$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11234              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11235$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11236              BOOT_JDK_FOUND=no
11237            else
11238              # We're done! :-)
11239              BOOT_JDK_FOUND=yes
11240
11241  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11242
11243  # Input might be given as Windows format, start by converting to
11244  # unix format.
11245  path="$BOOT_JDK"
11246  new_path=`$CYGPATH -u "$path"`
11247
11248  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11249  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11250  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11251  # "foo.exe" is OK but "foo" is an error.
11252  #
11253  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11254  # It is also a way to make sure we got the proper file name for the real test later on.
11255  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11256  if test "x$test_shortpath" = x; then
11257    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11258$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11259    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11260  fi
11261
11262  # Call helper function which possibly converts this using DOS-style short mode.
11263  # If so, the updated path is stored in $new_path.
11264
11265  input_path="$new_path"
11266  # Check if we need to convert this using DOS-style short mode. If the path
11267  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11268  # take no chances and rewrite it.
11269  # Note: m4 eats our [], so we need to use [ and ] instead.
11270  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11271  if test "x$has_forbidden_chars" != x; then
11272    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11273    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11274    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11275    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11276      # Going to short mode and back again did indeed matter. Since short mode is
11277      # case insensitive, let's make it lowercase to improve readability.
11278      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11279      # Now convert it back to Unix-stile (cygpath)
11280      input_path=`$CYGPATH -u "$shortmode_path"`
11281      new_path="$input_path"
11282    fi
11283  fi
11284
11285  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11286  if test "x$test_cygdrive_prefix" = x; then
11287    # As a simple fix, exclude /usr/bin since it's not a real path.
11288    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11289      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11290      # a path prefixed by /cygdrive for fixpath to work.
11291      new_path="$CYGWIN_ROOT_PATH$input_path"
11292    fi
11293  fi
11294
11295
11296  if test "x$path" != "x$new_path"; then
11297    BOOT_JDK="$new_path"
11298    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11299$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11300  fi
11301
11302  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11303
11304  path="$BOOT_JDK"
11305  has_colon=`$ECHO $path | $GREP ^.:`
11306  new_path="$path"
11307  if test "x$has_colon" = x; then
11308    # Not in mixed or Windows style, start by that.
11309    new_path=`cmd //c echo $path`
11310  fi
11311
11312
11313  input_path="$new_path"
11314  # Check if we need to convert this using DOS-style short mode. If the path
11315  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11316  # take no chances and rewrite it.
11317  # Note: m4 eats our [], so we need to use [ and ] instead.
11318  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11319  if test "x$has_forbidden_chars" != x; then
11320    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11321    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11322  fi
11323
11324
11325  windows_path="$new_path"
11326  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11327    unix_path=`$CYGPATH -u "$windows_path"`
11328    new_path="$unix_path"
11329  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11330    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11331    new_path="$unix_path"
11332  fi
11333
11334  if test "x$path" != "x$new_path"; then
11335    BOOT_JDK="$new_path"
11336    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11337$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11338  fi
11339
11340  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11341  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11342
11343  else
11344    # We're on a posix platform. Hooray! :)
11345    path="$BOOT_JDK"
11346    has_space=`$ECHO "$path" | $GREP " "`
11347    if test "x$has_space" != x; then
11348      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11349$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11350      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11351    fi
11352
11353    # Use eval to expand a potential ~
11354    eval path="$path"
11355    if test ! -f "$path" && test ! -d "$path"; then
11356      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11357    fi
11358
11359    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
11360  fi
11361
11362              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11363$as_echo_n "checking for Boot JDK... " >&6; }
11364              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11365$as_echo "$BOOT_JDK" >&6; }
11366              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11367$as_echo_n "checking Boot JDK version... " >&6; }
11368              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11369              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11370$as_echo "$BOOT_JDK_VERSION" >&6; }
11371            fi # end check jdk version
11372          fi # end check rt.jar
11373        fi # end check javac
11374      fi # end check java
11375    fi # end check boot jdk found
11376  fi
11377
11378  if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
11379    # Having specified an argument which is incorrect will produce an instant failure;
11380    # we should not go on looking
11381    as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
11382  fi
11383
11384  # Test: Is bootjdk available from builddeps?
11385
11386  if test "x$BOOT_JDK_FOUND" = xno; then
11387    # Now execute the test
11388
11389
11390
11391  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
11392    # Source the builddeps file again, to make sure it uses the latest variables!
11393    . $builddepsfile
11394    # Look for a target and build machine specific resource!
11395    eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
11396    if test "x$resource" = x; then
11397      # Ok, lets instead look for a target specific resource
11398      eval resource=\${builddep_bootjdk_TARGET_${rewritten_target_var}}
11399    fi
11400    if test "x$resource" = x; then
11401      # Ok, lets instead look for a build specific resource
11402      eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}}
11403    fi
11404    if test "x$resource" = x; then
11405      # Ok, lets instead look for a generic resource
11406      # (The bootjdk comes from M4 and not the shell, thus no need for eval here.)
11407      resource=${builddep_bootjdk}
11408    fi
11409    if test "x$resource" != x; then
11410      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for bootjdk" >&5
11411$as_echo "$as_me: Using builddeps $resource for bootjdk" >&6;}
11412      # If the resource in the builddeps.conf file is an existing directory,
11413      # for example /java/linux/cups
11414      if test -d ${resource}; then
11415        depdir=${resource}
11416      else
11417
11418  # bootjdk is for example mymodule
11419  # $resource is for example libs/general/libmymod_1_2_3.zip
11420  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
11421  # $with_builddeps_dir is for example /localhome/builddeps
11422  # depdir is the name of the variable into which we store the depdir, eg MYMOD
11423  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
11424  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
11425  filename=`basename $resource`
11426  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
11427  filebase=${filename%%.*}
11428  extension=${filename#*.}
11429  installdir=$with_builddeps_dir/$filebase
11430  if test ! -f $installdir/$filename.unpacked; then
11431    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&5
11432$as_echo "$as_me: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&6;}
11433    if test ! -d $installdir; then
11434      mkdir -p $installdir
11435    fi
11436    if test ! -d $installdir; then
11437      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
11438    fi
11439    tmpfile=`mktemp $installdir/bootjdk.XXXXXXXXX`
11440    touch $tmpfile
11441    if test ! -f $tmpfile; then
11442      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
11443    fi
11444
11445  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
11446  # $tmpfile is the local file name for the downloaded file.
11447  VALID_TOOL=no
11448  if test "x$BDEPS_FTP" = xwget; then
11449    VALID_TOOL=yes
11450    wget -O $tmpfile $with_builddeps_server/$resource
11451  fi
11452  if test "x$BDEPS_FTP" = xlftp; then
11453    VALID_TOOL=yes
11454    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
11455  fi
11456  if test "x$BDEPS_FTP" = xftp; then
11457    VALID_TOOL=yes
11458    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
11459    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
11460    FTPUSERPWD=${FTPSERVER%%@*}
11461    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
11462      FTPUSER=${userpwd%%:*}
11463      FTPPWD=${userpwd#*@}
11464      FTPSERVER=${FTPSERVER#*@}
11465    else
11466      FTPUSER=ftp
11467      FTPPWD=ftp
11468    fi
11469    # the "pass" command does not work on some
11470    # ftp clients (read ftp.exe) but if it works,
11471    # passive mode is better!
11472    ( \
11473        echo "user $FTPUSER $FTPPWD"        ; \
11474        echo "pass"                         ; \
11475        echo "bin"                          ; \
11476        echo "get $FTPPATH $tmpfile"              ; \
11477    ) | ftp -in $FTPSERVER
11478  fi
11479  if test "x$VALID_TOOL" != xyes; then
11480    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
11481  fi
11482
11483    mv $tmpfile $installdir/$filename
11484    if test ! -s $installdir/$filename; then
11485      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
11486    fi
11487    case "$extension" in
11488      zip)  echo "Unzipping $installdir/$filename..."
11489        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
11490        ;;
11491      tar.gz) echo "Untaring $installdir/$filename..."
11492        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
11493        ;;
11494      tgz) echo "Untaring $installdir/$filename..."
11495        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
11496        ;;
11497      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
11498        ;;
11499    esac
11500  fi
11501  if test -f $installdir/$filename.unpacked; then
11502    depdir=$installdir
11503  fi
11504
11505      fi
11506      # Source the builddeps file again, because in the previous command, the depdir
11507      # was updated to point at the current build dependency install directory.
11508      . $builddepsfile
11509      # Now extract variables from the builddeps.conf files.
11510      theroot=${builddep_bootjdk_ROOT}
11511      thecflags=${builddep_bootjdk_CFLAGS}
11512      thelibs=${builddep_bootjdk_LIBS}
11513      if test "x$depdir" = x; then
11514        as_fn_error $? "Could not download build dependency bootjdk" "$LINENO" 5
11515      fi
11516      BOOT_JDK=$depdir
11517      if test "x$theroot" != x; then
11518        BOOT_JDK="$theroot"
11519      fi
11520      if test "x$thecflags" != x; then
11521        BOOT_JDK_CFLAGS="$thecflags"
11522      fi
11523      if test "x$thelibs" != x; then
11524        BOOT_JDK_LIBS="$thelibs"
11525      fi
11526      BOOT_JDK_FOUND=maybe
11527      else BOOT_JDK_FOUND=no
11528
11529    fi
11530    else BOOT_JDK_FOUND=no
11531
11532  fi
11533
11534
11535
11536    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11537    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11538      # Do we have a bin/java?
11539      if test ! -x "$BOOT_JDK/bin/java"; then
11540        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11541$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11542        BOOT_JDK_FOUND=no
11543      else
11544        # Do we have a bin/javac?
11545        if test ! -x "$BOOT_JDK/bin/javac"; then
11546          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11547$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11548          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11549$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11550          BOOT_JDK_FOUND=no
11551        else
11552          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11553          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11554            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11555$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11556            BOOT_JDK_FOUND=no
11557          else
11558            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11559            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11560
11561            # Extra M4 quote needed to protect [] in grep expression.
11562            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11563            if test "x$FOUND_VERSION_78" = x; then
11564              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11565$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11566              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11567$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11568              BOOT_JDK_FOUND=no
11569            else
11570              # We're done! :-)
11571              BOOT_JDK_FOUND=yes
11572
11573  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11574
11575  # Input might be given as Windows format, start by converting to
11576  # unix format.
11577  path="$BOOT_JDK"
11578  new_path=`$CYGPATH -u "$path"`
11579
11580  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11581  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11582  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11583  # "foo.exe" is OK but "foo" is an error.
11584  #
11585  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11586  # It is also a way to make sure we got the proper file name for the real test later on.
11587  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11588  if test "x$test_shortpath" = x; then
11589    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11590$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11591    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11592  fi
11593
11594  # Call helper function which possibly converts this using DOS-style short mode.
11595  # If so, the updated path is stored in $new_path.
11596
11597  input_path="$new_path"
11598  # Check if we need to convert this using DOS-style short mode. If the path
11599  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11600  # take no chances and rewrite it.
11601  # Note: m4 eats our [], so we need to use [ and ] instead.
11602  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11603  if test "x$has_forbidden_chars" != x; then
11604    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11605    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11606    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11607    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11608      # Going to short mode and back again did indeed matter. Since short mode is
11609      # case insensitive, let's make it lowercase to improve readability.
11610      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11611      # Now convert it back to Unix-stile (cygpath)
11612      input_path=`$CYGPATH -u "$shortmode_path"`
11613      new_path="$input_path"
11614    fi
11615  fi
11616
11617  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11618  if test "x$test_cygdrive_prefix" = x; then
11619    # As a simple fix, exclude /usr/bin since it's not a real path.
11620    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11621      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11622      # a path prefixed by /cygdrive for fixpath to work.
11623      new_path="$CYGWIN_ROOT_PATH$input_path"
11624    fi
11625  fi
11626
11627
11628  if test "x$path" != "x$new_path"; then
11629    BOOT_JDK="$new_path"
11630    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11631$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11632  fi
11633
11634  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11635
11636  path="$BOOT_JDK"
11637  has_colon=`$ECHO $path | $GREP ^.:`
11638  new_path="$path"
11639  if test "x$has_colon" = x; then
11640    # Not in mixed or Windows style, start by that.
11641    new_path=`cmd //c echo $path`
11642  fi
11643
11644
11645  input_path="$new_path"
11646  # Check if we need to convert this using DOS-style short mode. If the path
11647  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11648  # take no chances and rewrite it.
11649  # Note: m4 eats our [], so we need to use [ and ] instead.
11650  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11651  if test "x$has_forbidden_chars" != x; then
11652    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11653    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11654  fi
11655
11656
11657  windows_path="$new_path"
11658  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11659    unix_path=`$CYGPATH -u "$windows_path"`
11660    new_path="$unix_path"
11661  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11662    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11663    new_path="$unix_path"
11664  fi
11665
11666  if test "x$path" != "x$new_path"; then
11667    BOOT_JDK="$new_path"
11668    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11669$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11670  fi
11671
11672  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11673  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11674
11675  else
11676    # We're on a posix platform. Hooray! :)
11677    path="$BOOT_JDK"
11678    has_space=`$ECHO "$path" | $GREP " "`
11679    if test "x$has_space" != x; then
11680      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11681$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11682      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11683    fi
11684
11685    # Use eval to expand a potential ~
11686    eval path="$path"
11687    if test ! -f "$path" && test ! -d "$path"; then
11688      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11689    fi
11690
11691    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
11692  fi
11693
11694              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11695$as_echo_n "checking for Boot JDK... " >&6; }
11696              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11697$as_echo "$BOOT_JDK" >&6; }
11698              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11699$as_echo_n "checking Boot JDK version... " >&6; }
11700              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11701              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11702$as_echo "$BOOT_JDK_VERSION" >&6; }
11703            fi # end check jdk version
11704          fi # end check rt.jar
11705        fi # end check javac
11706      fi # end check java
11707    fi # end check boot jdk found
11708  fi
11709
11710
11711  # Test: Is $JAVA_HOME set?
11712
11713  if test "x$BOOT_JDK_FOUND" = xno; then
11714    # Now execute the test
11715
11716  if test "x$JAVA_HOME" != x; then
11717    JAVA_HOME_PROCESSED="$JAVA_HOME"
11718
11719  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11720
11721  # Input might be given as Windows format, start by converting to
11722  # unix format.
11723  path="$JAVA_HOME_PROCESSED"
11724  new_path=`$CYGPATH -u "$path"`
11725
11726  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11727  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11728  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11729  # "foo.exe" is OK but "foo" is an error.
11730  #
11731  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11732  # It is also a way to make sure we got the proper file name for the real test later on.
11733  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11734  if test "x$test_shortpath" = x; then
11735    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
11736$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
11737    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
11738  fi
11739
11740  # Call helper function which possibly converts this using DOS-style short mode.
11741  # If so, the updated path is stored in $new_path.
11742
11743  input_path="$new_path"
11744  # Check if we need to convert this using DOS-style short mode. If the path
11745  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11746  # take no chances and rewrite it.
11747  # Note: m4 eats our [], so we need to use [ and ] instead.
11748  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11749  if test "x$has_forbidden_chars" != x; then
11750    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11751    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11752    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11753    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11754      # Going to short mode and back again did indeed matter. Since short mode is
11755      # case insensitive, let's make it lowercase to improve readability.
11756      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11757      # Now convert it back to Unix-stile (cygpath)
11758      input_path=`$CYGPATH -u "$shortmode_path"`
11759      new_path="$input_path"
11760    fi
11761  fi
11762
11763  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11764  if test "x$test_cygdrive_prefix" = x; then
11765    # As a simple fix, exclude /usr/bin since it's not a real path.
11766    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11767      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11768      # a path prefixed by /cygdrive for fixpath to work.
11769      new_path="$CYGWIN_ROOT_PATH$input_path"
11770    fi
11771  fi
11772
11773
11774  if test "x$path" != "x$new_path"; then
11775    JAVA_HOME_PROCESSED="$new_path"
11776    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
11777$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
11778  fi
11779
11780  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11781
11782  path="$JAVA_HOME_PROCESSED"
11783  has_colon=`$ECHO $path | $GREP ^.:`
11784  new_path="$path"
11785  if test "x$has_colon" = x; then
11786    # Not in mixed or Windows style, start by that.
11787    new_path=`cmd //c echo $path`
11788  fi
11789
11790
11791  input_path="$new_path"
11792  # Check if we need to convert this using DOS-style short mode. If the path
11793  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11794  # take no chances and rewrite it.
11795  # Note: m4 eats our [], so we need to use [ and ] instead.
11796  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11797  if test "x$has_forbidden_chars" != x; then
11798    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11799    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11800  fi
11801
11802
11803  windows_path="$new_path"
11804  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11805    unix_path=`$CYGPATH -u "$windows_path"`
11806    new_path="$unix_path"
11807  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11808    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11809    new_path="$unix_path"
11810  fi
11811
11812  if test "x$path" != "x$new_path"; then
11813    JAVA_HOME_PROCESSED="$new_path"
11814    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
11815$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
11816  fi
11817
11818  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11819  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11820
11821  else
11822    # We're on a posix platform. Hooray! :)
11823    path="$JAVA_HOME_PROCESSED"
11824    has_space=`$ECHO "$path" | $GREP " "`
11825    if test "x$has_space" != x; then
11826      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
11827$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
11828      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11829    fi
11830
11831    # Use eval to expand a potential ~
11832    eval path="$path"
11833    if test ! -f "$path" && test ! -d "$path"; then
11834      as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
11835    fi
11836
11837    JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
11838  fi
11839
11840    if test ! -d "$JAVA_HOME_PROCESSED"; then
11841      { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
11842$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
11843    else
11844      # Aha, the user has set a JAVA_HOME
11845      # let us use that as the Boot JDK.
11846      BOOT_JDK="$JAVA_HOME_PROCESSED"
11847      BOOT_JDK_FOUND=maybe
11848      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
11849$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
11850    fi
11851  fi
11852
11853
11854    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11855    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11856      # Do we have a bin/java?
11857      if test ! -x "$BOOT_JDK/bin/java"; then
11858        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11859$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11860        BOOT_JDK_FOUND=no
11861      else
11862        # Do we have a bin/javac?
11863        if test ! -x "$BOOT_JDK/bin/javac"; then
11864          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11865$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11866          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11867$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11868          BOOT_JDK_FOUND=no
11869        else
11870          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11871          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11872            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11873$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11874            BOOT_JDK_FOUND=no
11875          else
11876            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11877            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11878
11879            # Extra M4 quote needed to protect [] in grep expression.
11880            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11881            if test "x$FOUND_VERSION_78" = x; then
11882              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11883$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11884              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11885$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11886              BOOT_JDK_FOUND=no
11887            else
11888              # We're done! :-)
11889              BOOT_JDK_FOUND=yes
11890
11891  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11892
11893  # Input might be given as Windows format, start by converting to
11894  # unix format.
11895  path="$BOOT_JDK"
11896  new_path=`$CYGPATH -u "$path"`
11897
11898  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11899  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11900  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11901  # "foo.exe" is OK but "foo" is an error.
11902  #
11903  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11904  # It is also a way to make sure we got the proper file name for the real test later on.
11905  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11906  if test "x$test_shortpath" = x; then
11907    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11908$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11909    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11910  fi
11911
11912  # Call helper function which possibly converts this using DOS-style short mode.
11913  # If so, the updated path is stored in $new_path.
11914
11915  input_path="$new_path"
11916  # Check if we need to convert this using DOS-style short mode. If the path
11917  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11918  # take no chances and rewrite it.
11919  # Note: m4 eats our [], so we need to use [ and ] instead.
11920  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11921  if test "x$has_forbidden_chars" != x; then
11922    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11923    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11924    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11925    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11926      # Going to short mode and back again did indeed matter. Since short mode is
11927      # case insensitive, let's make it lowercase to improve readability.
11928      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11929      # Now convert it back to Unix-stile (cygpath)
11930      input_path=`$CYGPATH -u "$shortmode_path"`
11931      new_path="$input_path"
11932    fi
11933  fi
11934
11935  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11936  if test "x$test_cygdrive_prefix" = x; then
11937    # As a simple fix, exclude /usr/bin since it's not a real path.
11938    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11939      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11940      # a path prefixed by /cygdrive for fixpath to work.
11941      new_path="$CYGWIN_ROOT_PATH$input_path"
11942    fi
11943  fi
11944
11945
11946  if test "x$path" != "x$new_path"; then
11947    BOOT_JDK="$new_path"
11948    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11949$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11950  fi
11951
11952  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11953
11954  path="$BOOT_JDK"
11955  has_colon=`$ECHO $path | $GREP ^.:`
11956  new_path="$path"
11957  if test "x$has_colon" = x; then
11958    # Not in mixed or Windows style, start by that.
11959    new_path=`cmd //c echo $path`
11960  fi
11961
11962
11963  input_path="$new_path"
11964  # Check if we need to convert this using DOS-style short mode. If the path
11965  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11966  # take no chances and rewrite it.
11967  # Note: m4 eats our [], so we need to use [ and ] instead.
11968  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11969  if test "x$has_forbidden_chars" != x; then
11970    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11971    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11972  fi
11973
11974
11975  windows_path="$new_path"
11976  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11977    unix_path=`$CYGPATH -u "$windows_path"`
11978    new_path="$unix_path"
11979  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11980    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11981    new_path="$unix_path"
11982  fi
11983
11984  if test "x$path" != "x$new_path"; then
11985    BOOT_JDK="$new_path"
11986    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11987$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11988  fi
11989
11990  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11991  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11992
11993  else
11994    # We're on a posix platform. Hooray! :)
11995    path="$BOOT_JDK"
11996    has_space=`$ECHO "$path" | $GREP " "`
11997    if test "x$has_space" != x; then
11998      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11999$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12000      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12001    fi
12002
12003    # Use eval to expand a potential ~
12004    eval path="$path"
12005    if test ! -f "$path" && test ! -d "$path"; then
12006      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12007    fi
12008
12009    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
12010  fi
12011
12012              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12013$as_echo_n "checking for Boot JDK... " >&6; }
12014              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12015$as_echo "$BOOT_JDK" >&6; }
12016              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12017$as_echo_n "checking Boot JDK version... " >&6; }
12018              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12019              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12020$as_echo "$BOOT_JDK_VERSION" >&6; }
12021            fi # end check jdk version
12022          fi # end check rt.jar
12023        fi # end check javac
12024      fi # end check java
12025    fi # end check boot jdk found
12026  fi
12027
12028
12029  # Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
12030
12031  if test "x$BOOT_JDK_FOUND" = xno; then
12032    # Now execute the test
12033
12034  if test -x /usr/libexec/java_home; then
12035    BOOT_JDK=`/usr/libexec/java_home`
12036    BOOT_JDK_FOUND=maybe
12037    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home" >&5
12038$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home" >&6;}
12039  fi
12040
12041
12042    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12043    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12044      # Do we have a bin/java?
12045      if test ! -x "$BOOT_JDK/bin/java"; then
12046        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12047$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12048        BOOT_JDK_FOUND=no
12049      else
12050        # Do we have a bin/javac?
12051        if test ! -x "$BOOT_JDK/bin/javac"; then
12052          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12053$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12054          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12055$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12056          BOOT_JDK_FOUND=no
12057        else
12058          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12059          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12060            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12061$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12062            BOOT_JDK_FOUND=no
12063          else
12064            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12065            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12066
12067            # Extra M4 quote needed to protect [] in grep expression.
12068            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12069            if test "x$FOUND_VERSION_78" = x; then
12070              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12071$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12072              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12073$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12074              BOOT_JDK_FOUND=no
12075            else
12076              # We're done! :-)
12077              BOOT_JDK_FOUND=yes
12078
12079  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12080
12081  # Input might be given as Windows format, start by converting to
12082  # unix format.
12083  path="$BOOT_JDK"
12084  new_path=`$CYGPATH -u "$path"`
12085
12086  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12087  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12088  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12089  # "foo.exe" is OK but "foo" is an error.
12090  #
12091  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12092  # It is also a way to make sure we got the proper file name for the real test later on.
12093  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12094  if test "x$test_shortpath" = x; then
12095    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12096$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12097    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12098  fi
12099
12100  # Call helper function which possibly converts this using DOS-style short mode.
12101  # If so, the updated path is stored in $new_path.
12102
12103  input_path="$new_path"
12104  # Check if we need to convert this using DOS-style short mode. If the path
12105  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12106  # take no chances and rewrite it.
12107  # Note: m4 eats our [], so we need to use [ and ] instead.
12108  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12109  if test "x$has_forbidden_chars" != x; then
12110    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12111    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12112    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12113    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12114      # Going to short mode and back again did indeed matter. Since short mode is
12115      # case insensitive, let's make it lowercase to improve readability.
12116      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12117      # Now convert it back to Unix-stile (cygpath)
12118      input_path=`$CYGPATH -u "$shortmode_path"`
12119      new_path="$input_path"
12120    fi
12121  fi
12122
12123  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12124  if test "x$test_cygdrive_prefix" = x; then
12125    # As a simple fix, exclude /usr/bin since it's not a real path.
12126    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12127      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12128      # a path prefixed by /cygdrive for fixpath to work.
12129      new_path="$CYGWIN_ROOT_PATH$input_path"
12130    fi
12131  fi
12132
12133
12134  if test "x$path" != "x$new_path"; then
12135    BOOT_JDK="$new_path"
12136    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12137$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12138  fi
12139
12140  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12141
12142  path="$BOOT_JDK"
12143  has_colon=`$ECHO $path | $GREP ^.:`
12144  new_path="$path"
12145  if test "x$has_colon" = x; then
12146    # Not in mixed or Windows style, start by that.
12147    new_path=`cmd //c echo $path`
12148  fi
12149
12150
12151  input_path="$new_path"
12152  # Check if we need to convert this using DOS-style short mode. If the path
12153  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12154  # take no chances and rewrite it.
12155  # Note: m4 eats our [], so we need to use [ and ] instead.
12156  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12157  if test "x$has_forbidden_chars" != x; then
12158    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12159    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12160  fi
12161
12162
12163  windows_path="$new_path"
12164  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12165    unix_path=`$CYGPATH -u "$windows_path"`
12166    new_path="$unix_path"
12167  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12168    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12169    new_path="$unix_path"
12170  fi
12171
12172  if test "x$path" != "x$new_path"; then
12173    BOOT_JDK="$new_path"
12174    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12175$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12176  fi
12177
12178  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12179  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12180
12181  else
12182    # We're on a posix platform. Hooray! :)
12183    path="$BOOT_JDK"
12184    has_space=`$ECHO "$path" | $GREP " "`
12185    if test "x$has_space" != x; then
12186      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12187$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12188      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12189    fi
12190
12191    # Use eval to expand a potential ~
12192    eval path="$path"
12193    if test ! -f "$path" && test ! -d "$path"; then
12194      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12195    fi
12196
12197    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
12198  fi
12199
12200              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12201$as_echo_n "checking for Boot JDK... " >&6; }
12202              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12203$as_echo "$BOOT_JDK" >&6; }
12204              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12205$as_echo_n "checking Boot JDK version... " >&6; }
12206              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12207              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12208$as_echo "$BOOT_JDK_VERSION" >&6; }
12209            fi # end check jdk version
12210          fi # end check rt.jar
12211        fi # end check javac
12212      fi # end check java
12213    fi # end check boot jdk found
12214  fi
12215
12216
12217  # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
12218
12219  if test "x$BOOT_JDK_FOUND" = xno; then
12220    # Now execute the test
12221
12222  # Extract the first word of "javac", so it can be a program name with args.
12223set dummy javac; ac_word=$2
12224{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12225$as_echo_n "checking for $ac_word... " >&6; }
12226if ${ac_cv_path_JAVAC_CHECK+:} false; then :
12227  $as_echo_n "(cached) " >&6
12228else
12229  case $JAVAC_CHECK in
12230  [\\/]* | ?:[\\/]*)
12231  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
12232  ;;
12233  *)
12234  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12235for as_dir in $PATH
12236do
12237  IFS=$as_save_IFS
12238  test -z "$as_dir" && as_dir=.
12239    for ac_exec_ext in '' $ac_executable_extensions; do
12240  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12241    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
12242    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12243    break 2
12244  fi
12245done
12246  done
12247IFS=$as_save_IFS
12248
12249  ;;
12250esac
12251fi
12252JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
12253if test -n "$JAVAC_CHECK"; then
12254  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
12255$as_echo "$JAVAC_CHECK" >&6; }
12256else
12257  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12258$as_echo "no" >&6; }
12259fi
12260
12261
12262  # Extract the first word of "java", so it can be a program name with args.
12263set dummy java; ac_word=$2
12264{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12265$as_echo_n "checking for $ac_word... " >&6; }
12266if ${ac_cv_path_JAVA_CHECK+:} false; then :
12267  $as_echo_n "(cached) " >&6
12268else
12269  case $JAVA_CHECK in
12270  [\\/]* | ?:[\\/]*)
12271  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
12272  ;;
12273  *)
12274  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12275for as_dir in $PATH
12276do
12277  IFS=$as_save_IFS
12278  test -z "$as_dir" && as_dir=.
12279    for ac_exec_ext in '' $ac_executable_extensions; do
12280  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12281    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
12282    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12283    break 2
12284  fi
12285done
12286  done
12287IFS=$as_save_IFS
12288
12289  ;;
12290esac
12291fi
12292JAVA_CHECK=$ac_cv_path_JAVA_CHECK
12293if test -n "$JAVA_CHECK"; then
12294  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
12295$as_echo "$JAVA_CHECK" >&6; }
12296else
12297  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12298$as_echo "no" >&6; }
12299fi
12300
12301
12302  BINARY="$JAVAC_CHECK"
12303  if test "x$JAVAC_CHECK" = x; then
12304    BINARY="$JAVA_CHECK"
12305  fi
12306  if test "x$BINARY" != x; then
12307    # So there is a java(c) binary, it might be part of a JDK.
12308    # Lets find the JDK/JRE directory by following symbolic links.
12309    # Linux/GNU systems often have links from /usr/bin/java to
12310    # /etc/alternatives/java to the real JDK binary.
12311
12312  if test "x$OPENJDK_BUILD_OS" != xwindows; then
12313    # Follow a chain of symbolic links. Use readlink
12314    # where it exists, else fall back to horribly
12315    # complicated shell code.
12316    if test "x$READLINK_TESTED" != yes; then
12317      # On MacOSX there is a readlink tool with a different
12318      # purpose than the GNU readlink tool. Check the found readlink.
12319      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
12320      if test "x$ISGNU" = x; then
12321        # A readlink that we do not know how to use.
12322        # Are there other non-GNU readlinks out there?
12323        READLINK_TESTED=yes
12324        READLINK=
12325      fi
12326    fi
12327
12328    if test "x$READLINK" != x; then
12329      BINARY=`$READLINK -f $BINARY`
12330    else
12331      # Save the current directory for restoring afterwards
12332      STARTDIR=$PWD
12333      COUNTER=0
12334      sym_link_dir=`$DIRNAME $BINARY`
12335      sym_link_file=`$BASENAME $BINARY`
12336      cd $sym_link_dir
12337      # Use -P flag to resolve symlinks in directories.
12338      cd `$THEPWDCMD -P`
12339      sym_link_dir=`$THEPWDCMD -P`
12340      # Resolve file symlinks
12341      while test $COUNTER -lt 20; do
12342        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
12343        if test "x$ISLINK" == x; then
12344          # This is not a symbolic link! We are done!
12345          break
12346        fi
12347        # Again resolve directory symlinks since the target of the just found
12348        # link could be in a different directory
12349        cd `$DIRNAME $ISLINK`
12350        sym_link_dir=`$THEPWDCMD -P`
12351        sym_link_file=`$BASENAME $ISLINK`
12352        let COUNTER=COUNTER+1
12353      done
12354      cd $STARTDIR
12355      BINARY=$sym_link_dir/$sym_link_file
12356    fi
12357  fi
12358
12359    BOOT_JDK=`dirname "$BINARY"`
12360    BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
12361    if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
12362      # Looks like we found ourselves an JDK
12363      BOOT_JDK_FOUND=maybe
12364      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
12365$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
12366    fi
12367  fi
12368
12369
12370    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12371    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12372      # Do we have a bin/java?
12373      if test ! -x "$BOOT_JDK/bin/java"; then
12374        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12375$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12376        BOOT_JDK_FOUND=no
12377      else
12378        # Do we have a bin/javac?
12379        if test ! -x "$BOOT_JDK/bin/javac"; then
12380          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12381$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12382          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12383$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12384          BOOT_JDK_FOUND=no
12385        else
12386          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12387          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12388            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12389$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12390            BOOT_JDK_FOUND=no
12391          else
12392            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12393            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12394
12395            # Extra M4 quote needed to protect [] in grep expression.
12396            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12397            if test "x$FOUND_VERSION_78" = x; then
12398              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12399$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12400              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12401$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12402              BOOT_JDK_FOUND=no
12403            else
12404              # We're done! :-)
12405              BOOT_JDK_FOUND=yes
12406
12407  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12408
12409  # Input might be given as Windows format, start by converting to
12410  # unix format.
12411  path="$BOOT_JDK"
12412  new_path=`$CYGPATH -u "$path"`
12413
12414  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12415  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12416  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12417  # "foo.exe" is OK but "foo" is an error.
12418  #
12419  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12420  # It is also a way to make sure we got the proper file name for the real test later on.
12421  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12422  if test "x$test_shortpath" = x; then
12423    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12424$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12425    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12426  fi
12427
12428  # Call helper function which possibly converts this using DOS-style short mode.
12429  # If so, the updated path is stored in $new_path.
12430
12431  input_path="$new_path"
12432  # Check if we need to convert this using DOS-style short mode. If the path
12433  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12434  # take no chances and rewrite it.
12435  # Note: m4 eats our [], so we need to use [ and ] instead.
12436  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12437  if test "x$has_forbidden_chars" != x; then
12438    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12439    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12440    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12441    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12442      # Going to short mode and back again did indeed matter. Since short mode is
12443      # case insensitive, let's make it lowercase to improve readability.
12444      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12445      # Now convert it back to Unix-stile (cygpath)
12446      input_path=`$CYGPATH -u "$shortmode_path"`
12447      new_path="$input_path"
12448    fi
12449  fi
12450
12451  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12452  if test "x$test_cygdrive_prefix" = x; then
12453    # As a simple fix, exclude /usr/bin since it's not a real path.
12454    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12455      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12456      # a path prefixed by /cygdrive for fixpath to work.
12457      new_path="$CYGWIN_ROOT_PATH$input_path"
12458    fi
12459  fi
12460
12461
12462  if test "x$path" != "x$new_path"; then
12463    BOOT_JDK="$new_path"
12464    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12465$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12466  fi
12467
12468  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12469
12470  path="$BOOT_JDK"
12471  has_colon=`$ECHO $path | $GREP ^.:`
12472  new_path="$path"
12473  if test "x$has_colon" = x; then
12474    # Not in mixed or Windows style, start by that.
12475    new_path=`cmd //c echo $path`
12476  fi
12477
12478
12479  input_path="$new_path"
12480  # Check if we need to convert this using DOS-style short mode. If the path
12481  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12482  # take no chances and rewrite it.
12483  # Note: m4 eats our [], so we need to use [ and ] instead.
12484  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12485  if test "x$has_forbidden_chars" != x; then
12486    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12487    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12488  fi
12489
12490
12491  windows_path="$new_path"
12492  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12493    unix_path=`$CYGPATH -u "$windows_path"`
12494    new_path="$unix_path"
12495  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12496    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12497    new_path="$unix_path"
12498  fi
12499
12500  if test "x$path" != "x$new_path"; then
12501    BOOT_JDK="$new_path"
12502    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12503$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12504  fi
12505
12506  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12507  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12508
12509  else
12510    # We're on a posix platform. Hooray! :)
12511    path="$BOOT_JDK"
12512    has_space=`$ECHO "$path" | $GREP " "`
12513    if test "x$has_space" != x; then
12514      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12515$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12516      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12517    fi
12518
12519    # Use eval to expand a potential ~
12520    eval path="$path"
12521    if test ! -f "$path" && test ! -d "$path"; then
12522      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12523    fi
12524
12525    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
12526  fi
12527
12528              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12529$as_echo_n "checking for Boot JDK... " >&6; }
12530              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12531$as_echo "$BOOT_JDK" >&6; }
12532              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12533$as_echo_n "checking Boot JDK version... " >&6; }
12534              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12535              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12536$as_echo "$BOOT_JDK_VERSION" >&6; }
12537            fi # end check jdk version
12538          fi # end check rt.jar
12539        fi # end check javac
12540      fi # end check java
12541    fi # end check boot jdk found
12542  fi
12543
12544
12545  # Test: Is there a JDK installed in default, well-known locations?
12546
12547  if test "x$BOOT_JDK_FOUND" = xno; then
12548    # Now execute the test
12549
12550  if test "x$OPENJDK_TARGET_OS" = xwindows; then
12551
12552  if test "x$BOOT_JDK_FOUND" = xno; then
12553    # Now execute the test
12554
12555  if test "x$ProgramW6432" != x; then
12556    VIRTUAL_DIR="$ProgramW6432/Java"
12557
12558  windows_path="$VIRTUAL_DIR"
12559  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12560    unix_path=`$CYGPATH -u "$windows_path"`
12561    VIRTUAL_DIR="$unix_path"
12562  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12563    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12564    VIRTUAL_DIR="$unix_path"
12565  fi
12566
12567
12568  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
12569  BOOT_JDK_SUFFIX=""
12570  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
12571  if test "x$ALL_JDKS_FOUND" != x; then
12572    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
12573
12574  if test "x$BOOT_JDK_FOUND" = xno; then
12575    # Now execute the test
12576
12577        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
12578        if test -d "$BOOT_JDK"; then
12579          BOOT_JDK_FOUND=maybe
12580          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
12581$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
12582        fi
12583
12584
12585    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12586    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12587      # Do we have a bin/java?
12588      if test ! -x "$BOOT_JDK/bin/java"; then
12589        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12590$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12591        BOOT_JDK_FOUND=no
12592      else
12593        # Do we have a bin/javac?
12594        if test ! -x "$BOOT_JDK/bin/javac"; then
12595          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12596$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12597          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12598$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12599          BOOT_JDK_FOUND=no
12600        else
12601          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12602          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12603            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12604$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12605            BOOT_JDK_FOUND=no
12606          else
12607            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12608            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12609
12610            # Extra M4 quote needed to protect [] in grep expression.
12611            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12612            if test "x$FOUND_VERSION_78" = x; then
12613              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12614$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12615              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12616$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12617              BOOT_JDK_FOUND=no
12618            else
12619              # We're done! :-)
12620              BOOT_JDK_FOUND=yes
12621
12622  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12623
12624  # Input might be given as Windows format, start by converting to
12625  # unix format.
12626  path="$BOOT_JDK"
12627  new_path=`$CYGPATH -u "$path"`
12628
12629  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12630  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12631  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12632  # "foo.exe" is OK but "foo" is an error.
12633  #
12634  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12635  # It is also a way to make sure we got the proper file name for the real test later on.
12636  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12637  if test "x$test_shortpath" = x; then
12638    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12639$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12640    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12641  fi
12642
12643  # Call helper function which possibly converts this using DOS-style short mode.
12644  # If so, the updated path is stored in $new_path.
12645
12646  input_path="$new_path"
12647  # Check if we need to convert this using DOS-style short mode. If the path
12648  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12649  # take no chances and rewrite it.
12650  # Note: m4 eats our [], so we need to use [ and ] instead.
12651  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12652  if test "x$has_forbidden_chars" != x; then
12653    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12654    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12655    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12656    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12657      # Going to short mode and back again did indeed matter. Since short mode is
12658      # case insensitive, let's make it lowercase to improve readability.
12659      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12660      # Now convert it back to Unix-stile (cygpath)
12661      input_path=`$CYGPATH -u "$shortmode_path"`
12662      new_path="$input_path"
12663    fi
12664  fi
12665
12666  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12667  if test "x$test_cygdrive_prefix" = x; then
12668    # As a simple fix, exclude /usr/bin since it's not a real path.
12669    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12670      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12671      # a path prefixed by /cygdrive for fixpath to work.
12672      new_path="$CYGWIN_ROOT_PATH$input_path"
12673    fi
12674  fi
12675
12676
12677  if test "x$path" != "x$new_path"; then
12678    BOOT_JDK="$new_path"
12679    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12680$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12681  fi
12682
12683  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12684
12685  path="$BOOT_JDK"
12686  has_colon=`$ECHO $path | $GREP ^.:`
12687  new_path="$path"
12688  if test "x$has_colon" = x; then
12689    # Not in mixed or Windows style, start by that.
12690    new_path=`cmd //c echo $path`
12691  fi
12692
12693
12694  input_path="$new_path"
12695  # Check if we need to convert this using DOS-style short mode. If the path
12696  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12697  # take no chances and rewrite it.
12698  # Note: m4 eats our [], so we need to use [ and ] instead.
12699  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12700  if test "x$has_forbidden_chars" != x; then
12701    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12702    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12703  fi
12704
12705
12706  windows_path="$new_path"
12707  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12708    unix_path=`$CYGPATH -u "$windows_path"`
12709    new_path="$unix_path"
12710  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12711    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12712    new_path="$unix_path"
12713  fi
12714
12715  if test "x$path" != "x$new_path"; then
12716    BOOT_JDK="$new_path"
12717    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12718$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12719  fi
12720
12721  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12722  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12723
12724  else
12725    # We're on a posix platform. Hooray! :)
12726    path="$BOOT_JDK"
12727    has_space=`$ECHO "$path" | $GREP " "`
12728    if test "x$has_space" != x; then
12729      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12730$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12731      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12732    fi
12733
12734    # Use eval to expand a potential ~
12735    eval path="$path"
12736    if test ! -f "$path" && test ! -d "$path"; then
12737      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12738    fi
12739
12740    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
12741  fi
12742
12743              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12744$as_echo_n "checking for Boot JDK... " >&6; }
12745              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12746$as_echo "$BOOT_JDK" >&6; }
12747              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12748$as_echo_n "checking Boot JDK version... " >&6; }
12749              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12750              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12751$as_echo "$BOOT_JDK_VERSION" >&6; }
12752            fi # end check jdk version
12753          fi # end check rt.jar
12754        fi # end check javac
12755      fi # end check java
12756    fi # end check boot jdk found
12757  fi
12758
12759    done
12760  fi
12761
12762  fi
12763
12764
12765    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12766    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12767      # Do we have a bin/java?
12768      if test ! -x "$BOOT_JDK/bin/java"; then
12769        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12770$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12771        BOOT_JDK_FOUND=no
12772      else
12773        # Do we have a bin/javac?
12774        if test ! -x "$BOOT_JDK/bin/javac"; then
12775          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12776$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12777          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12778$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12779          BOOT_JDK_FOUND=no
12780        else
12781          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12782          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12783            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12784$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12785            BOOT_JDK_FOUND=no
12786          else
12787            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12788            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12789
12790            # Extra M4 quote needed to protect [] in grep expression.
12791            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12792            if test "x$FOUND_VERSION_78" = x; then
12793              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12794$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12795              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12796$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12797              BOOT_JDK_FOUND=no
12798            else
12799              # We're done! :-)
12800              BOOT_JDK_FOUND=yes
12801
12802  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12803
12804  # Input might be given as Windows format, start by converting to
12805  # unix format.
12806  path="$BOOT_JDK"
12807  new_path=`$CYGPATH -u "$path"`
12808
12809  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12810  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12811  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12812  # "foo.exe" is OK but "foo" is an error.
12813  #
12814  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12815  # It is also a way to make sure we got the proper file name for the real test later on.
12816  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12817  if test "x$test_shortpath" = x; then
12818    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12819$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12820    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12821  fi
12822
12823  # Call helper function which possibly converts this using DOS-style short mode.
12824  # If so, the updated path is stored in $new_path.
12825
12826  input_path="$new_path"
12827  # Check if we need to convert this using DOS-style short mode. If the path
12828  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12829  # take no chances and rewrite it.
12830  # Note: m4 eats our [], so we need to use [ and ] instead.
12831  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12832  if test "x$has_forbidden_chars" != x; then
12833    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12834    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12835    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12836    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12837      # Going to short mode and back again did indeed matter. Since short mode is
12838      # case insensitive, let's make it lowercase to improve readability.
12839      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12840      # Now convert it back to Unix-stile (cygpath)
12841      input_path=`$CYGPATH -u "$shortmode_path"`
12842      new_path="$input_path"
12843    fi
12844  fi
12845
12846  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12847  if test "x$test_cygdrive_prefix" = x; then
12848    # As a simple fix, exclude /usr/bin since it's not a real path.
12849    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12850      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12851      # a path prefixed by /cygdrive for fixpath to work.
12852      new_path="$CYGWIN_ROOT_PATH$input_path"
12853    fi
12854  fi
12855
12856
12857  if test "x$path" != "x$new_path"; then
12858    BOOT_JDK="$new_path"
12859    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12860$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12861  fi
12862
12863  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12864
12865  path="$BOOT_JDK"
12866  has_colon=`$ECHO $path | $GREP ^.:`
12867  new_path="$path"
12868  if test "x$has_colon" = x; then
12869    # Not in mixed or Windows style, start by that.
12870    new_path=`cmd //c echo $path`
12871  fi
12872
12873
12874  input_path="$new_path"
12875  # Check if we need to convert this using DOS-style short mode. If the path
12876  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12877  # take no chances and rewrite it.
12878  # Note: m4 eats our [], so we need to use [ and ] instead.
12879  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12880  if test "x$has_forbidden_chars" != x; then
12881    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12882    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12883  fi
12884
12885
12886  windows_path="$new_path"
12887  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12888    unix_path=`$CYGPATH -u "$windows_path"`
12889    new_path="$unix_path"
12890  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12891    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12892    new_path="$unix_path"
12893  fi
12894
12895  if test "x$path" != "x$new_path"; then
12896    BOOT_JDK="$new_path"
12897    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12898$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12899  fi
12900
12901  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12902  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12903
12904  else
12905    # We're on a posix platform. Hooray! :)
12906    path="$BOOT_JDK"
12907    has_space=`$ECHO "$path" | $GREP " "`
12908    if test "x$has_space" != x; then
12909      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12910$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12911      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12912    fi
12913
12914    # Use eval to expand a potential ~
12915    eval path="$path"
12916    if test ! -f "$path" && test ! -d "$path"; then
12917      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12918    fi
12919
12920    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
12921  fi
12922
12923              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12924$as_echo_n "checking for Boot JDK... " >&6; }
12925              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12926$as_echo "$BOOT_JDK" >&6; }
12927              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12928$as_echo_n "checking Boot JDK version... " >&6; }
12929              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12930              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12931$as_echo "$BOOT_JDK_VERSION" >&6; }
12932            fi # end check jdk version
12933          fi # end check rt.jar
12934        fi # end check javac
12935      fi # end check java
12936    fi # end check boot jdk found
12937  fi
12938
12939
12940  if test "x$BOOT_JDK_FOUND" = xno; then
12941    # Now execute the test
12942
12943  if test "x$PROGRAMW6432" != x; then
12944    VIRTUAL_DIR="$PROGRAMW6432/Java"
12945
12946  windows_path="$VIRTUAL_DIR"
12947  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12948    unix_path=`$CYGPATH -u "$windows_path"`
12949    VIRTUAL_DIR="$unix_path"
12950  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12951    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12952    VIRTUAL_DIR="$unix_path"
12953  fi
12954
12955
12956  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
12957  BOOT_JDK_SUFFIX=""
12958  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
12959  if test "x$ALL_JDKS_FOUND" != x; then
12960    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
12961
12962  if test "x$BOOT_JDK_FOUND" = xno; then
12963    # Now execute the test
12964
12965        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
12966        if test -d "$BOOT_JDK"; then
12967          BOOT_JDK_FOUND=maybe
12968          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
12969$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
12970        fi
12971
12972
12973    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12974    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12975      # Do we have a bin/java?
12976      if test ! -x "$BOOT_JDK/bin/java"; then
12977        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12978$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12979        BOOT_JDK_FOUND=no
12980      else
12981        # Do we have a bin/javac?
12982        if test ! -x "$BOOT_JDK/bin/javac"; then
12983          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12984$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12985          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12986$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12987          BOOT_JDK_FOUND=no
12988        else
12989          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12990          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12991            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12992$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12993            BOOT_JDK_FOUND=no
12994          else
12995            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12996            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12997
12998            # Extra M4 quote needed to protect [] in grep expression.
12999            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13000            if test "x$FOUND_VERSION_78" = x; then
13001              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13002$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13003              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13004$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13005              BOOT_JDK_FOUND=no
13006            else
13007              # We're done! :-)
13008              BOOT_JDK_FOUND=yes
13009
13010  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13011
13012  # Input might be given as Windows format, start by converting to
13013  # unix format.
13014  path="$BOOT_JDK"
13015  new_path=`$CYGPATH -u "$path"`
13016
13017  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13018  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13019  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13020  # "foo.exe" is OK but "foo" is an error.
13021  #
13022  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13023  # It is also a way to make sure we got the proper file name for the real test later on.
13024  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13025  if test "x$test_shortpath" = x; then
13026    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13027$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13028    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13029  fi
13030
13031  # Call helper function which possibly converts this using DOS-style short mode.
13032  # If so, the updated path is stored in $new_path.
13033
13034  input_path="$new_path"
13035  # Check if we need to convert this using DOS-style short mode. If the path
13036  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13037  # take no chances and rewrite it.
13038  # Note: m4 eats our [], so we need to use [ and ] instead.
13039  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13040  if test "x$has_forbidden_chars" != x; then
13041    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13042    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13043    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13044    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13045      # Going to short mode and back again did indeed matter. Since short mode is
13046      # case insensitive, let's make it lowercase to improve readability.
13047      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13048      # Now convert it back to Unix-stile (cygpath)
13049      input_path=`$CYGPATH -u "$shortmode_path"`
13050      new_path="$input_path"
13051    fi
13052  fi
13053
13054  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13055  if test "x$test_cygdrive_prefix" = x; then
13056    # As a simple fix, exclude /usr/bin since it's not a real path.
13057    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13058      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13059      # a path prefixed by /cygdrive for fixpath to work.
13060      new_path="$CYGWIN_ROOT_PATH$input_path"
13061    fi
13062  fi
13063
13064
13065  if test "x$path" != "x$new_path"; then
13066    BOOT_JDK="$new_path"
13067    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13068$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13069  fi
13070
13071  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13072
13073  path="$BOOT_JDK"
13074  has_colon=`$ECHO $path | $GREP ^.:`
13075  new_path="$path"
13076  if test "x$has_colon" = x; then
13077    # Not in mixed or Windows style, start by that.
13078    new_path=`cmd //c echo $path`
13079  fi
13080
13081
13082  input_path="$new_path"
13083  # Check if we need to convert this using DOS-style short mode. If the path
13084  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13085  # take no chances and rewrite it.
13086  # Note: m4 eats our [], so we need to use [ and ] instead.
13087  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13088  if test "x$has_forbidden_chars" != x; then
13089    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13090    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13091  fi
13092
13093
13094  windows_path="$new_path"
13095  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13096    unix_path=`$CYGPATH -u "$windows_path"`
13097    new_path="$unix_path"
13098  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13099    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13100    new_path="$unix_path"
13101  fi
13102
13103  if test "x$path" != "x$new_path"; then
13104    BOOT_JDK="$new_path"
13105    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13106$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13107  fi
13108
13109  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13110  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13111
13112  else
13113    # We're on a posix platform. Hooray! :)
13114    path="$BOOT_JDK"
13115    has_space=`$ECHO "$path" | $GREP " "`
13116    if test "x$has_space" != x; then
13117      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13118$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13119      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13120    fi
13121
13122    # Use eval to expand a potential ~
13123    eval path="$path"
13124    if test ! -f "$path" && test ! -d "$path"; then
13125      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13126    fi
13127
13128    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13129  fi
13130
13131              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13132$as_echo_n "checking for Boot JDK... " >&6; }
13133              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13134$as_echo "$BOOT_JDK" >&6; }
13135              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13136$as_echo_n "checking Boot JDK version... " >&6; }
13137              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13138              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13139$as_echo "$BOOT_JDK_VERSION" >&6; }
13140            fi # end check jdk version
13141          fi # end check rt.jar
13142        fi # end check javac
13143      fi # end check java
13144    fi # end check boot jdk found
13145  fi
13146
13147    done
13148  fi
13149
13150  fi
13151
13152
13153    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13154    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13155      # Do we have a bin/java?
13156      if test ! -x "$BOOT_JDK/bin/java"; then
13157        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13158$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13159        BOOT_JDK_FOUND=no
13160      else
13161        # Do we have a bin/javac?
13162        if test ! -x "$BOOT_JDK/bin/javac"; then
13163          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13164$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13165          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13166$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13167          BOOT_JDK_FOUND=no
13168        else
13169          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13170          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13171            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13172$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13173            BOOT_JDK_FOUND=no
13174          else
13175            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13176            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13177
13178            # Extra M4 quote needed to protect [] in grep expression.
13179            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13180            if test "x$FOUND_VERSION_78" = x; then
13181              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13182$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13183              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13184$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13185              BOOT_JDK_FOUND=no
13186            else
13187              # We're done! :-)
13188              BOOT_JDK_FOUND=yes
13189
13190  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13191
13192  # Input might be given as Windows format, start by converting to
13193  # unix format.
13194  path="$BOOT_JDK"
13195  new_path=`$CYGPATH -u "$path"`
13196
13197  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13198  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13199  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13200  # "foo.exe" is OK but "foo" is an error.
13201  #
13202  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13203  # It is also a way to make sure we got the proper file name for the real test later on.
13204  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13205  if test "x$test_shortpath" = x; then
13206    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13207$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13208    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13209  fi
13210
13211  # Call helper function which possibly converts this using DOS-style short mode.
13212  # If so, the updated path is stored in $new_path.
13213
13214  input_path="$new_path"
13215  # Check if we need to convert this using DOS-style short mode. If the path
13216  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13217  # take no chances and rewrite it.
13218  # Note: m4 eats our [], so we need to use [ and ] instead.
13219  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13220  if test "x$has_forbidden_chars" != x; then
13221    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13222    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13223    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13224    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13225      # Going to short mode and back again did indeed matter. Since short mode is
13226      # case insensitive, let's make it lowercase to improve readability.
13227      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13228      # Now convert it back to Unix-stile (cygpath)
13229      input_path=`$CYGPATH -u "$shortmode_path"`
13230      new_path="$input_path"
13231    fi
13232  fi
13233
13234  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13235  if test "x$test_cygdrive_prefix" = x; then
13236    # As a simple fix, exclude /usr/bin since it's not a real path.
13237    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13238      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13239      # a path prefixed by /cygdrive for fixpath to work.
13240      new_path="$CYGWIN_ROOT_PATH$input_path"
13241    fi
13242  fi
13243
13244
13245  if test "x$path" != "x$new_path"; then
13246    BOOT_JDK="$new_path"
13247    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13248$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13249  fi
13250
13251  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13252
13253  path="$BOOT_JDK"
13254  has_colon=`$ECHO $path | $GREP ^.:`
13255  new_path="$path"
13256  if test "x$has_colon" = x; then
13257    # Not in mixed or Windows style, start by that.
13258    new_path=`cmd //c echo $path`
13259  fi
13260
13261
13262  input_path="$new_path"
13263  # Check if we need to convert this using DOS-style short mode. If the path
13264  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13265  # take no chances and rewrite it.
13266  # Note: m4 eats our [], so we need to use [ and ] instead.
13267  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13268  if test "x$has_forbidden_chars" != x; then
13269    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13270    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13271  fi
13272
13273
13274  windows_path="$new_path"
13275  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13276    unix_path=`$CYGPATH -u "$windows_path"`
13277    new_path="$unix_path"
13278  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13279    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13280    new_path="$unix_path"
13281  fi
13282
13283  if test "x$path" != "x$new_path"; then
13284    BOOT_JDK="$new_path"
13285    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13286$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13287  fi
13288
13289  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13290  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13291
13292  else
13293    # We're on a posix platform. Hooray! :)
13294    path="$BOOT_JDK"
13295    has_space=`$ECHO "$path" | $GREP " "`
13296    if test "x$has_space" != x; then
13297      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13298$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13299      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13300    fi
13301
13302    # Use eval to expand a potential ~
13303    eval path="$path"
13304    if test ! -f "$path" && test ! -d "$path"; then
13305      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13306    fi
13307
13308    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13309  fi
13310
13311              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13312$as_echo_n "checking for Boot JDK... " >&6; }
13313              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13314$as_echo "$BOOT_JDK" >&6; }
13315              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13316$as_echo_n "checking Boot JDK version... " >&6; }
13317              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13318              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13319$as_echo "$BOOT_JDK_VERSION" >&6; }
13320            fi # end check jdk version
13321          fi # end check rt.jar
13322        fi # end check javac
13323      fi # end check java
13324    fi # end check boot jdk found
13325  fi
13326
13327
13328  if test "x$BOOT_JDK_FOUND" = xno; then
13329    # Now execute the test
13330
13331  if test "x$PROGRAMFILES" != x; then
13332    VIRTUAL_DIR="$PROGRAMFILES/Java"
13333
13334  windows_path="$VIRTUAL_DIR"
13335  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13336    unix_path=`$CYGPATH -u "$windows_path"`
13337    VIRTUAL_DIR="$unix_path"
13338  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13339    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13340    VIRTUAL_DIR="$unix_path"
13341  fi
13342
13343
13344  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
13345  BOOT_JDK_SUFFIX=""
13346  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13347  if test "x$ALL_JDKS_FOUND" != x; then
13348    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13349
13350  if test "x$BOOT_JDK_FOUND" = xno; then
13351    # Now execute the test
13352
13353        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13354        if test -d "$BOOT_JDK"; then
13355          BOOT_JDK_FOUND=maybe
13356          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13357$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13358        fi
13359
13360
13361    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13362    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13363      # Do we have a bin/java?
13364      if test ! -x "$BOOT_JDK/bin/java"; then
13365        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13366$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13367        BOOT_JDK_FOUND=no
13368      else
13369        # Do we have a bin/javac?
13370        if test ! -x "$BOOT_JDK/bin/javac"; then
13371          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13372$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13373          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13374$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13375          BOOT_JDK_FOUND=no
13376        else
13377          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13378          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13379            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13380$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13381            BOOT_JDK_FOUND=no
13382          else
13383            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13384            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13385
13386            # Extra M4 quote needed to protect [] in grep expression.
13387            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13388            if test "x$FOUND_VERSION_78" = x; then
13389              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13390$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13391              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13392$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13393              BOOT_JDK_FOUND=no
13394            else
13395              # We're done! :-)
13396              BOOT_JDK_FOUND=yes
13397
13398  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13399
13400  # Input might be given as Windows format, start by converting to
13401  # unix format.
13402  path="$BOOT_JDK"
13403  new_path=`$CYGPATH -u "$path"`
13404
13405  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13406  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13407  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13408  # "foo.exe" is OK but "foo" is an error.
13409  #
13410  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13411  # It is also a way to make sure we got the proper file name for the real test later on.
13412  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13413  if test "x$test_shortpath" = x; then
13414    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13415$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13416    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13417  fi
13418
13419  # Call helper function which possibly converts this using DOS-style short mode.
13420  # If so, the updated path is stored in $new_path.
13421
13422  input_path="$new_path"
13423  # Check if we need to convert this using DOS-style short mode. If the path
13424  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13425  # take no chances and rewrite it.
13426  # Note: m4 eats our [], so we need to use [ and ] instead.
13427  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13428  if test "x$has_forbidden_chars" != x; then
13429    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13430    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13431    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13432    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13433      # Going to short mode and back again did indeed matter. Since short mode is
13434      # case insensitive, let's make it lowercase to improve readability.
13435      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13436      # Now convert it back to Unix-stile (cygpath)
13437      input_path=`$CYGPATH -u "$shortmode_path"`
13438      new_path="$input_path"
13439    fi
13440  fi
13441
13442  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13443  if test "x$test_cygdrive_prefix" = x; then
13444    # As a simple fix, exclude /usr/bin since it's not a real path.
13445    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13446      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13447      # a path prefixed by /cygdrive for fixpath to work.
13448      new_path="$CYGWIN_ROOT_PATH$input_path"
13449    fi
13450  fi
13451
13452
13453  if test "x$path" != "x$new_path"; then
13454    BOOT_JDK="$new_path"
13455    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13456$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13457  fi
13458
13459  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13460
13461  path="$BOOT_JDK"
13462  has_colon=`$ECHO $path | $GREP ^.:`
13463  new_path="$path"
13464  if test "x$has_colon" = x; then
13465    # Not in mixed or Windows style, start by that.
13466    new_path=`cmd //c echo $path`
13467  fi
13468
13469
13470  input_path="$new_path"
13471  # Check if we need to convert this using DOS-style short mode. If the path
13472  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13473  # take no chances and rewrite it.
13474  # Note: m4 eats our [], so we need to use [ and ] instead.
13475  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13476  if test "x$has_forbidden_chars" != x; then
13477    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13478    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13479  fi
13480
13481
13482  windows_path="$new_path"
13483  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13484    unix_path=`$CYGPATH -u "$windows_path"`
13485    new_path="$unix_path"
13486  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13487    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13488    new_path="$unix_path"
13489  fi
13490
13491  if test "x$path" != "x$new_path"; then
13492    BOOT_JDK="$new_path"
13493    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13494$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13495  fi
13496
13497  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13498  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13499
13500  else
13501    # We're on a posix platform. Hooray! :)
13502    path="$BOOT_JDK"
13503    has_space=`$ECHO "$path" | $GREP " "`
13504    if test "x$has_space" != x; then
13505      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13506$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13507      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13508    fi
13509
13510    # Use eval to expand a potential ~
13511    eval path="$path"
13512    if test ! -f "$path" && test ! -d "$path"; then
13513      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13514    fi
13515
13516    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13517  fi
13518
13519              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13520$as_echo_n "checking for Boot JDK... " >&6; }
13521              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13522$as_echo "$BOOT_JDK" >&6; }
13523              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13524$as_echo_n "checking Boot JDK version... " >&6; }
13525              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13526              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13527$as_echo "$BOOT_JDK_VERSION" >&6; }
13528            fi # end check jdk version
13529          fi # end check rt.jar
13530        fi # end check javac
13531      fi # end check java
13532    fi # end check boot jdk found
13533  fi
13534
13535    done
13536  fi
13537
13538  fi
13539
13540
13541    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13542    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13543      # Do we have a bin/java?
13544      if test ! -x "$BOOT_JDK/bin/java"; then
13545        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13546$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13547        BOOT_JDK_FOUND=no
13548      else
13549        # Do we have a bin/javac?
13550        if test ! -x "$BOOT_JDK/bin/javac"; then
13551          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13552$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13553          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13554$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13555          BOOT_JDK_FOUND=no
13556        else
13557          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13558          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13559            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13560$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13561            BOOT_JDK_FOUND=no
13562          else
13563            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13564            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13565
13566            # Extra M4 quote needed to protect [] in grep expression.
13567            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13568            if test "x$FOUND_VERSION_78" = x; then
13569              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13570$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13571              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13572$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13573              BOOT_JDK_FOUND=no
13574            else
13575              # We're done! :-)
13576              BOOT_JDK_FOUND=yes
13577
13578  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13579
13580  # Input might be given as Windows format, start by converting to
13581  # unix format.
13582  path="$BOOT_JDK"
13583  new_path=`$CYGPATH -u "$path"`
13584
13585  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13586  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13587  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13588  # "foo.exe" is OK but "foo" is an error.
13589  #
13590  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13591  # It is also a way to make sure we got the proper file name for the real test later on.
13592  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13593  if test "x$test_shortpath" = x; then
13594    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13595$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13596    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13597  fi
13598
13599  # Call helper function which possibly converts this using DOS-style short mode.
13600  # If so, the updated path is stored in $new_path.
13601
13602  input_path="$new_path"
13603  # Check if we need to convert this using DOS-style short mode. If the path
13604  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13605  # take no chances and rewrite it.
13606  # Note: m4 eats our [], so we need to use [ and ] instead.
13607  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13608  if test "x$has_forbidden_chars" != x; then
13609    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13610    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13611    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13612    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13613      # Going to short mode and back again did indeed matter. Since short mode is
13614      # case insensitive, let's make it lowercase to improve readability.
13615      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13616      # Now convert it back to Unix-stile (cygpath)
13617      input_path=`$CYGPATH -u "$shortmode_path"`
13618      new_path="$input_path"
13619    fi
13620  fi
13621
13622  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13623  if test "x$test_cygdrive_prefix" = x; then
13624    # As a simple fix, exclude /usr/bin since it's not a real path.
13625    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13626      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13627      # a path prefixed by /cygdrive for fixpath to work.
13628      new_path="$CYGWIN_ROOT_PATH$input_path"
13629    fi
13630  fi
13631
13632
13633  if test "x$path" != "x$new_path"; then
13634    BOOT_JDK="$new_path"
13635    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13636$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13637  fi
13638
13639  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13640
13641  path="$BOOT_JDK"
13642  has_colon=`$ECHO $path | $GREP ^.:`
13643  new_path="$path"
13644  if test "x$has_colon" = x; then
13645    # Not in mixed or Windows style, start by that.
13646    new_path=`cmd //c echo $path`
13647  fi
13648
13649
13650  input_path="$new_path"
13651  # Check if we need to convert this using DOS-style short mode. If the path
13652  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13653  # take no chances and rewrite it.
13654  # Note: m4 eats our [], so we need to use [ and ] instead.
13655  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13656  if test "x$has_forbidden_chars" != x; then
13657    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13658    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13659  fi
13660
13661
13662  windows_path="$new_path"
13663  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13664    unix_path=`$CYGPATH -u "$windows_path"`
13665    new_path="$unix_path"
13666  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13667    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13668    new_path="$unix_path"
13669  fi
13670
13671  if test "x$path" != "x$new_path"; then
13672    BOOT_JDK="$new_path"
13673    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13674$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13675  fi
13676
13677  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13678  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13679
13680  else
13681    # We're on a posix platform. Hooray! :)
13682    path="$BOOT_JDK"
13683    has_space=`$ECHO "$path" | $GREP " "`
13684    if test "x$has_space" != x; then
13685      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13686$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13687      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13688    fi
13689
13690    # Use eval to expand a potential ~
13691    eval path="$path"
13692    if test ! -f "$path" && test ! -d "$path"; then
13693      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13694    fi
13695
13696    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13697  fi
13698
13699              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13700$as_echo_n "checking for Boot JDK... " >&6; }
13701              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13702$as_echo "$BOOT_JDK" >&6; }
13703              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13704$as_echo_n "checking Boot JDK version... " >&6; }
13705              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13706              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13707$as_echo "$BOOT_JDK_VERSION" >&6; }
13708            fi # end check jdk version
13709          fi # end check rt.jar
13710        fi # end check javac
13711      fi # end check java
13712    fi # end check boot jdk found
13713  fi
13714
13715
13716  if test "x$BOOT_JDK_FOUND" = xno; then
13717    # Now execute the test
13718
13719  if test "x$ProgramFiles" != x; then
13720    VIRTUAL_DIR="$ProgramFiles/Java"
13721
13722  windows_path="$VIRTUAL_DIR"
13723  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13724    unix_path=`$CYGPATH -u "$windows_path"`
13725    VIRTUAL_DIR="$unix_path"
13726  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13727    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13728    VIRTUAL_DIR="$unix_path"
13729  fi
13730
13731
13732  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
13733  BOOT_JDK_SUFFIX=""
13734  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13735  if test "x$ALL_JDKS_FOUND" != x; then
13736    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13737
13738  if test "x$BOOT_JDK_FOUND" = xno; then
13739    # Now execute the test
13740
13741        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13742        if test -d "$BOOT_JDK"; then
13743          BOOT_JDK_FOUND=maybe
13744          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13745$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13746        fi
13747
13748
13749    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13750    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13751      # Do we have a bin/java?
13752      if test ! -x "$BOOT_JDK/bin/java"; then
13753        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13754$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13755        BOOT_JDK_FOUND=no
13756      else
13757        # Do we have a bin/javac?
13758        if test ! -x "$BOOT_JDK/bin/javac"; then
13759          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13760$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13761          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13762$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13763          BOOT_JDK_FOUND=no
13764        else
13765          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13766          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13767            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13768$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13769            BOOT_JDK_FOUND=no
13770          else
13771            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13772            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13773
13774            # Extra M4 quote needed to protect [] in grep expression.
13775            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13776            if test "x$FOUND_VERSION_78" = x; then
13777              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13778$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13779              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13780$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13781              BOOT_JDK_FOUND=no
13782            else
13783              # We're done! :-)
13784              BOOT_JDK_FOUND=yes
13785
13786  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13787
13788  # Input might be given as Windows format, start by converting to
13789  # unix format.
13790  path="$BOOT_JDK"
13791  new_path=`$CYGPATH -u "$path"`
13792
13793  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13794  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13795  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13796  # "foo.exe" is OK but "foo" is an error.
13797  #
13798  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13799  # It is also a way to make sure we got the proper file name for the real test later on.
13800  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13801  if test "x$test_shortpath" = x; then
13802    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13803$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13804    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13805  fi
13806
13807  # Call helper function which possibly converts this using DOS-style short mode.
13808  # If so, the updated path is stored in $new_path.
13809
13810  input_path="$new_path"
13811  # Check if we need to convert this using DOS-style short mode. If the path
13812  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13813  # take no chances and rewrite it.
13814  # Note: m4 eats our [], so we need to use [ and ] instead.
13815  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13816  if test "x$has_forbidden_chars" != x; then
13817    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13818    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13819    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13820    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13821      # Going to short mode and back again did indeed matter. Since short mode is
13822      # case insensitive, let's make it lowercase to improve readability.
13823      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13824      # Now convert it back to Unix-stile (cygpath)
13825      input_path=`$CYGPATH -u "$shortmode_path"`
13826      new_path="$input_path"
13827    fi
13828  fi
13829
13830  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13831  if test "x$test_cygdrive_prefix" = x; then
13832    # As a simple fix, exclude /usr/bin since it's not a real path.
13833    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13834      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13835      # a path prefixed by /cygdrive for fixpath to work.
13836      new_path="$CYGWIN_ROOT_PATH$input_path"
13837    fi
13838  fi
13839
13840
13841  if test "x$path" != "x$new_path"; then
13842    BOOT_JDK="$new_path"
13843    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13844$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13845  fi
13846
13847  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13848
13849  path="$BOOT_JDK"
13850  has_colon=`$ECHO $path | $GREP ^.:`
13851  new_path="$path"
13852  if test "x$has_colon" = x; then
13853    # Not in mixed or Windows style, start by that.
13854    new_path=`cmd //c echo $path`
13855  fi
13856
13857
13858  input_path="$new_path"
13859  # Check if we need to convert this using DOS-style short mode. If the path
13860  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13861  # take no chances and rewrite it.
13862  # Note: m4 eats our [], so we need to use [ and ] instead.
13863  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13864  if test "x$has_forbidden_chars" != x; then
13865    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13866    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13867  fi
13868
13869
13870  windows_path="$new_path"
13871  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13872    unix_path=`$CYGPATH -u "$windows_path"`
13873    new_path="$unix_path"
13874  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13875    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13876    new_path="$unix_path"
13877  fi
13878
13879  if test "x$path" != "x$new_path"; then
13880    BOOT_JDK="$new_path"
13881    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13882$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13883  fi
13884
13885  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13886  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13887
13888  else
13889    # We're on a posix platform. Hooray! :)
13890    path="$BOOT_JDK"
13891    has_space=`$ECHO "$path" | $GREP " "`
13892    if test "x$has_space" != x; then
13893      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13894$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13895      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13896    fi
13897
13898    # Use eval to expand a potential ~
13899    eval path="$path"
13900    if test ! -f "$path" && test ! -d "$path"; then
13901      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13902    fi
13903
13904    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13905  fi
13906
13907              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13908$as_echo_n "checking for Boot JDK... " >&6; }
13909              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13910$as_echo "$BOOT_JDK" >&6; }
13911              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13912$as_echo_n "checking Boot JDK version... " >&6; }
13913              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13914              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13915$as_echo "$BOOT_JDK_VERSION" >&6; }
13916            fi # end check jdk version
13917          fi # end check rt.jar
13918        fi # end check javac
13919      fi # end check java
13920    fi # end check boot jdk found
13921  fi
13922
13923    done
13924  fi
13925
13926  fi
13927
13928
13929    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13930    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13931      # Do we have a bin/java?
13932      if test ! -x "$BOOT_JDK/bin/java"; then
13933        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13934$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13935        BOOT_JDK_FOUND=no
13936      else
13937        # Do we have a bin/javac?
13938        if test ! -x "$BOOT_JDK/bin/javac"; then
13939          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13940$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13941          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13942$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13943          BOOT_JDK_FOUND=no
13944        else
13945          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13946          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13947            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13948$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13949            BOOT_JDK_FOUND=no
13950          else
13951            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13952            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13953
13954            # Extra M4 quote needed to protect [] in grep expression.
13955            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13956            if test "x$FOUND_VERSION_78" = x; then
13957              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13958$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13959              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13960$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13961              BOOT_JDK_FOUND=no
13962            else
13963              # We're done! :-)
13964              BOOT_JDK_FOUND=yes
13965
13966  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13967
13968  # Input might be given as Windows format, start by converting to
13969  # unix format.
13970  path="$BOOT_JDK"
13971  new_path=`$CYGPATH -u "$path"`
13972
13973  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13974  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13975  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13976  # "foo.exe" is OK but "foo" is an error.
13977  #
13978  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13979  # It is also a way to make sure we got the proper file name for the real test later on.
13980  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13981  if test "x$test_shortpath" = x; then
13982    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13983$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13984    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13985  fi
13986
13987  # Call helper function which possibly converts this using DOS-style short mode.
13988  # If so, the updated path is stored in $new_path.
13989
13990  input_path="$new_path"
13991  # Check if we need to convert this using DOS-style short mode. If the path
13992  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13993  # take no chances and rewrite it.
13994  # Note: m4 eats our [], so we need to use [ and ] instead.
13995  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13996  if test "x$has_forbidden_chars" != x; then
13997    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13998    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13999    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14000    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14001      # Going to short mode and back again did indeed matter. Since short mode is
14002      # case insensitive, let's make it lowercase to improve readability.
14003      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14004      # Now convert it back to Unix-stile (cygpath)
14005      input_path=`$CYGPATH -u "$shortmode_path"`
14006      new_path="$input_path"
14007    fi
14008  fi
14009
14010  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14011  if test "x$test_cygdrive_prefix" = x; then
14012    # As a simple fix, exclude /usr/bin since it's not a real path.
14013    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14014      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14015      # a path prefixed by /cygdrive for fixpath to work.
14016      new_path="$CYGWIN_ROOT_PATH$input_path"
14017    fi
14018  fi
14019
14020
14021  if test "x$path" != "x$new_path"; then
14022    BOOT_JDK="$new_path"
14023    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14024$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14025  fi
14026
14027  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14028
14029  path="$BOOT_JDK"
14030  has_colon=`$ECHO $path | $GREP ^.:`
14031  new_path="$path"
14032  if test "x$has_colon" = x; then
14033    # Not in mixed or Windows style, start by that.
14034    new_path=`cmd //c echo $path`
14035  fi
14036
14037
14038  input_path="$new_path"
14039  # Check if we need to convert this using DOS-style short mode. If the path
14040  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14041  # take no chances and rewrite it.
14042  # Note: m4 eats our [], so we need to use [ and ] instead.
14043  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14044  if test "x$has_forbidden_chars" != x; then
14045    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14046    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14047  fi
14048
14049
14050  windows_path="$new_path"
14051  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14052    unix_path=`$CYGPATH -u "$windows_path"`
14053    new_path="$unix_path"
14054  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14055    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14056    new_path="$unix_path"
14057  fi
14058
14059  if test "x$path" != "x$new_path"; then
14060    BOOT_JDK="$new_path"
14061    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14062$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14063  fi
14064
14065  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14066  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14067
14068  else
14069    # We're on a posix platform. Hooray! :)
14070    path="$BOOT_JDK"
14071    has_space=`$ECHO "$path" | $GREP " "`
14072    if test "x$has_space" != x; then
14073      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14074$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14075      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14076    fi
14077
14078    # Use eval to expand a potential ~
14079    eval path="$path"
14080    if test ! -f "$path" && test ! -d "$path"; then
14081      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14082    fi
14083
14084    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14085  fi
14086
14087              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14088$as_echo_n "checking for Boot JDK... " >&6; }
14089              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14090$as_echo "$BOOT_JDK" >&6; }
14091              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14092$as_echo_n "checking Boot JDK version... " >&6; }
14093              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14094              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14095$as_echo "$BOOT_JDK_VERSION" >&6; }
14096            fi # end check jdk version
14097          fi # end check rt.jar
14098        fi # end check javac
14099      fi # end check java
14100    fi # end check boot jdk found
14101  fi
14102
14103
14104  if test "x$BOOT_JDK_FOUND" = xno; then
14105    # Now execute the test
14106
14107  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
14108  BOOT_JDK_SUFFIX=""
14109  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14110  if test "x$ALL_JDKS_FOUND" != x; then
14111    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14112
14113  if test "x$BOOT_JDK_FOUND" = xno; then
14114    # Now execute the test
14115
14116        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14117        if test -d "$BOOT_JDK"; then
14118          BOOT_JDK_FOUND=maybe
14119          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14120$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14121        fi
14122
14123
14124    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14125    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14126      # Do we have a bin/java?
14127      if test ! -x "$BOOT_JDK/bin/java"; then
14128        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14129$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14130        BOOT_JDK_FOUND=no
14131      else
14132        # Do we have a bin/javac?
14133        if test ! -x "$BOOT_JDK/bin/javac"; then
14134          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14135$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14136          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14137$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14138          BOOT_JDK_FOUND=no
14139        else
14140          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14141          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14142            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14143$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14144            BOOT_JDK_FOUND=no
14145          else
14146            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14147            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14148
14149            # Extra M4 quote needed to protect [] in grep expression.
14150            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14151            if test "x$FOUND_VERSION_78" = x; then
14152              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14153$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14154              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14155$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14156              BOOT_JDK_FOUND=no
14157            else
14158              # We're done! :-)
14159              BOOT_JDK_FOUND=yes
14160
14161  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14162
14163  # Input might be given as Windows format, start by converting to
14164  # unix format.
14165  path="$BOOT_JDK"
14166  new_path=`$CYGPATH -u "$path"`
14167
14168  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14169  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14170  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14171  # "foo.exe" is OK but "foo" is an error.
14172  #
14173  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14174  # It is also a way to make sure we got the proper file name for the real test later on.
14175  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14176  if test "x$test_shortpath" = x; then
14177    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14178$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14179    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14180  fi
14181
14182  # Call helper function which possibly converts this using DOS-style short mode.
14183  # If so, the updated path is stored in $new_path.
14184
14185  input_path="$new_path"
14186  # Check if we need to convert this using DOS-style short mode. If the path
14187  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14188  # take no chances and rewrite it.
14189  # Note: m4 eats our [], so we need to use [ and ] instead.
14190  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14191  if test "x$has_forbidden_chars" != x; then
14192    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14193    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14194    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14195    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14196      # Going to short mode and back again did indeed matter. Since short mode is
14197      # case insensitive, let's make it lowercase to improve readability.
14198      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14199      # Now convert it back to Unix-stile (cygpath)
14200      input_path=`$CYGPATH -u "$shortmode_path"`
14201      new_path="$input_path"
14202    fi
14203  fi
14204
14205  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14206  if test "x$test_cygdrive_prefix" = x; then
14207    # As a simple fix, exclude /usr/bin since it's not a real path.
14208    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14209      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14210      # a path prefixed by /cygdrive for fixpath to work.
14211      new_path="$CYGWIN_ROOT_PATH$input_path"
14212    fi
14213  fi
14214
14215
14216  if test "x$path" != "x$new_path"; then
14217    BOOT_JDK="$new_path"
14218    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14219$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14220  fi
14221
14222  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14223
14224  path="$BOOT_JDK"
14225  has_colon=`$ECHO $path | $GREP ^.:`
14226  new_path="$path"
14227  if test "x$has_colon" = x; then
14228    # Not in mixed or Windows style, start by that.
14229    new_path=`cmd //c echo $path`
14230  fi
14231
14232
14233  input_path="$new_path"
14234  # Check if we need to convert this using DOS-style short mode. If the path
14235  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14236  # take no chances and rewrite it.
14237  # Note: m4 eats our [], so we need to use [ and ] instead.
14238  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14239  if test "x$has_forbidden_chars" != x; then
14240    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14241    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14242  fi
14243
14244
14245  windows_path="$new_path"
14246  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14247    unix_path=`$CYGPATH -u "$windows_path"`
14248    new_path="$unix_path"
14249  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14250    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14251    new_path="$unix_path"
14252  fi
14253
14254  if test "x$path" != "x$new_path"; then
14255    BOOT_JDK="$new_path"
14256    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14257$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14258  fi
14259
14260  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14261  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14262
14263  else
14264    # We're on a posix platform. Hooray! :)
14265    path="$BOOT_JDK"
14266    has_space=`$ECHO "$path" | $GREP " "`
14267    if test "x$has_space" != x; then
14268      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14269$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14270      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14271    fi
14272
14273    # Use eval to expand a potential ~
14274    eval path="$path"
14275    if test ! -f "$path" && test ! -d "$path"; then
14276      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14277    fi
14278
14279    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14280  fi
14281
14282              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14283$as_echo_n "checking for Boot JDK... " >&6; }
14284              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14285$as_echo "$BOOT_JDK" >&6; }
14286              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14287$as_echo_n "checking Boot JDK version... " >&6; }
14288              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14289              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14290$as_echo "$BOOT_JDK_VERSION" >&6; }
14291            fi # end check jdk version
14292          fi # end check rt.jar
14293        fi # end check javac
14294      fi # end check java
14295    fi # end check boot jdk found
14296  fi
14297
14298    done
14299  fi
14300
14301
14302    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14303    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14304      # Do we have a bin/java?
14305      if test ! -x "$BOOT_JDK/bin/java"; then
14306        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14307$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14308        BOOT_JDK_FOUND=no
14309      else
14310        # Do we have a bin/javac?
14311        if test ! -x "$BOOT_JDK/bin/javac"; then
14312          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14313$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14314          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14315$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14316          BOOT_JDK_FOUND=no
14317        else
14318          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14319          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14320            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14321$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14322            BOOT_JDK_FOUND=no
14323          else
14324            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14325            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14326
14327            # Extra M4 quote needed to protect [] in grep expression.
14328            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14329            if test "x$FOUND_VERSION_78" = x; then
14330              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14331$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14332              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14333$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14334              BOOT_JDK_FOUND=no
14335            else
14336              # We're done! :-)
14337              BOOT_JDK_FOUND=yes
14338
14339  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14340
14341  # Input might be given as Windows format, start by converting to
14342  # unix format.
14343  path="$BOOT_JDK"
14344  new_path=`$CYGPATH -u "$path"`
14345
14346  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14347  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14348  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14349  # "foo.exe" is OK but "foo" is an error.
14350  #
14351  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14352  # It is also a way to make sure we got the proper file name for the real test later on.
14353  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14354  if test "x$test_shortpath" = x; then
14355    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14356$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14357    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14358  fi
14359
14360  # Call helper function which possibly converts this using DOS-style short mode.
14361  # If so, the updated path is stored in $new_path.
14362
14363  input_path="$new_path"
14364  # Check if we need to convert this using DOS-style short mode. If the path
14365  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14366  # take no chances and rewrite it.
14367  # Note: m4 eats our [], so we need to use [ and ] instead.
14368  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14369  if test "x$has_forbidden_chars" != x; then
14370    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14371    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14372    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14373    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14374      # Going to short mode and back again did indeed matter. Since short mode is
14375      # case insensitive, let's make it lowercase to improve readability.
14376      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14377      # Now convert it back to Unix-stile (cygpath)
14378      input_path=`$CYGPATH -u "$shortmode_path"`
14379      new_path="$input_path"
14380    fi
14381  fi
14382
14383  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14384  if test "x$test_cygdrive_prefix" = x; then
14385    # As a simple fix, exclude /usr/bin since it's not a real path.
14386    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14387      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14388      # a path prefixed by /cygdrive for fixpath to work.
14389      new_path="$CYGWIN_ROOT_PATH$input_path"
14390    fi
14391  fi
14392
14393
14394  if test "x$path" != "x$new_path"; then
14395    BOOT_JDK="$new_path"
14396    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14397$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14398  fi
14399
14400  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14401
14402  path="$BOOT_JDK"
14403  has_colon=`$ECHO $path | $GREP ^.:`
14404  new_path="$path"
14405  if test "x$has_colon" = x; then
14406    # Not in mixed or Windows style, start by that.
14407    new_path=`cmd //c echo $path`
14408  fi
14409
14410
14411  input_path="$new_path"
14412  # Check if we need to convert this using DOS-style short mode. If the path
14413  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14414  # take no chances and rewrite it.
14415  # Note: m4 eats our [], so we need to use [ and ] instead.
14416  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14417  if test "x$has_forbidden_chars" != x; then
14418    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14419    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14420  fi
14421
14422
14423  windows_path="$new_path"
14424  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14425    unix_path=`$CYGPATH -u "$windows_path"`
14426    new_path="$unix_path"
14427  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14428    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14429    new_path="$unix_path"
14430  fi
14431
14432  if test "x$path" != "x$new_path"; then
14433    BOOT_JDK="$new_path"
14434    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14435$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14436  fi
14437
14438  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14439  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14440
14441  else
14442    # We're on a posix platform. Hooray! :)
14443    path="$BOOT_JDK"
14444    has_space=`$ECHO "$path" | $GREP " "`
14445    if test "x$has_space" != x; then
14446      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14447$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14448      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14449    fi
14450
14451    # Use eval to expand a potential ~
14452    eval path="$path"
14453    if test ! -f "$path" && test ! -d "$path"; then
14454      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14455    fi
14456
14457    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14458  fi
14459
14460              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14461$as_echo_n "checking for Boot JDK... " >&6; }
14462              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14463$as_echo "$BOOT_JDK" >&6; }
14464              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14465$as_echo_n "checking Boot JDK version... " >&6; }
14466              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14467              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14468$as_echo "$BOOT_JDK_VERSION" >&6; }
14469            fi # end check jdk version
14470          fi # end check rt.jar
14471        fi # end check javac
14472      fi # end check java
14473    fi # end check boot jdk found
14474  fi
14475
14476  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
14477
14478  if test "x$BOOT_JDK_FOUND" = xno; then
14479    # Now execute the test
14480
14481  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
14482  BOOT_JDK_SUFFIX="/Contents/Home"
14483  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14484  if test "x$ALL_JDKS_FOUND" != x; then
14485    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14486
14487  if test "x$BOOT_JDK_FOUND" = xno; then
14488    # Now execute the test
14489
14490        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14491        if test -d "$BOOT_JDK"; then
14492          BOOT_JDK_FOUND=maybe
14493          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14494$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14495        fi
14496
14497
14498    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14499    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14500      # Do we have a bin/java?
14501      if test ! -x "$BOOT_JDK/bin/java"; then
14502        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14503$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14504        BOOT_JDK_FOUND=no
14505      else
14506        # Do we have a bin/javac?
14507        if test ! -x "$BOOT_JDK/bin/javac"; then
14508          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14509$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14510          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14511$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14512          BOOT_JDK_FOUND=no
14513        else
14514          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14515          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14516            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14517$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14518            BOOT_JDK_FOUND=no
14519          else
14520            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14521            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14522
14523            # Extra M4 quote needed to protect [] in grep expression.
14524            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14525            if test "x$FOUND_VERSION_78" = x; then
14526              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14527$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14528              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14529$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14530              BOOT_JDK_FOUND=no
14531            else
14532              # We're done! :-)
14533              BOOT_JDK_FOUND=yes
14534
14535  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14536
14537  # Input might be given as Windows format, start by converting to
14538  # unix format.
14539  path="$BOOT_JDK"
14540  new_path=`$CYGPATH -u "$path"`
14541
14542  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14543  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14544  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14545  # "foo.exe" is OK but "foo" is an error.
14546  #
14547  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14548  # It is also a way to make sure we got the proper file name for the real test later on.
14549  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14550  if test "x$test_shortpath" = x; then
14551    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14552$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14553    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14554  fi
14555
14556  # Call helper function which possibly converts this using DOS-style short mode.
14557  # If so, the updated path is stored in $new_path.
14558
14559  input_path="$new_path"
14560  # Check if we need to convert this using DOS-style short mode. If the path
14561  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14562  # take no chances and rewrite it.
14563  # Note: m4 eats our [], so we need to use [ and ] instead.
14564  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14565  if test "x$has_forbidden_chars" != x; then
14566    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14567    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14568    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14569    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14570      # Going to short mode and back again did indeed matter. Since short mode is
14571      # case insensitive, let's make it lowercase to improve readability.
14572      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14573      # Now convert it back to Unix-stile (cygpath)
14574      input_path=`$CYGPATH -u "$shortmode_path"`
14575      new_path="$input_path"
14576    fi
14577  fi
14578
14579  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14580  if test "x$test_cygdrive_prefix" = x; then
14581    # As a simple fix, exclude /usr/bin since it's not a real path.
14582    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14583      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14584      # a path prefixed by /cygdrive for fixpath to work.
14585      new_path="$CYGWIN_ROOT_PATH$input_path"
14586    fi
14587  fi
14588
14589
14590  if test "x$path" != "x$new_path"; then
14591    BOOT_JDK="$new_path"
14592    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14593$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14594  fi
14595
14596  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14597
14598  path="$BOOT_JDK"
14599  has_colon=`$ECHO $path | $GREP ^.:`
14600  new_path="$path"
14601  if test "x$has_colon" = x; then
14602    # Not in mixed or Windows style, start by that.
14603    new_path=`cmd //c echo $path`
14604  fi
14605
14606
14607  input_path="$new_path"
14608  # Check if we need to convert this using DOS-style short mode. If the path
14609  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14610  # take no chances and rewrite it.
14611  # Note: m4 eats our [], so we need to use [ and ] instead.
14612  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14613  if test "x$has_forbidden_chars" != x; then
14614    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14615    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14616  fi
14617
14618
14619  windows_path="$new_path"
14620  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14621    unix_path=`$CYGPATH -u "$windows_path"`
14622    new_path="$unix_path"
14623  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14624    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14625    new_path="$unix_path"
14626  fi
14627
14628  if test "x$path" != "x$new_path"; then
14629    BOOT_JDK="$new_path"
14630    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14631$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14632  fi
14633
14634  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14635  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14636
14637  else
14638    # We're on a posix platform. Hooray! :)
14639    path="$BOOT_JDK"
14640    has_space=`$ECHO "$path" | $GREP " "`
14641    if test "x$has_space" != x; then
14642      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14643$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14644      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14645    fi
14646
14647    # Use eval to expand a potential ~
14648    eval path="$path"
14649    if test ! -f "$path" && test ! -d "$path"; then
14650      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14651    fi
14652
14653    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14654  fi
14655
14656              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14657$as_echo_n "checking for Boot JDK... " >&6; }
14658              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14659$as_echo "$BOOT_JDK" >&6; }
14660              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14661$as_echo_n "checking Boot JDK version... " >&6; }
14662              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14663              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14664$as_echo "$BOOT_JDK_VERSION" >&6; }
14665            fi # end check jdk version
14666          fi # end check rt.jar
14667        fi # end check javac
14668      fi # end check java
14669    fi # end check boot jdk found
14670  fi
14671
14672    done
14673  fi
14674
14675
14676    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14677    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14678      # Do we have a bin/java?
14679      if test ! -x "$BOOT_JDK/bin/java"; then
14680        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14681$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14682        BOOT_JDK_FOUND=no
14683      else
14684        # Do we have a bin/javac?
14685        if test ! -x "$BOOT_JDK/bin/javac"; then
14686          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14687$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14688          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14689$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14690          BOOT_JDK_FOUND=no
14691        else
14692          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14693          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14694            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14695$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14696            BOOT_JDK_FOUND=no
14697          else
14698            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14699            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14700
14701            # Extra M4 quote needed to protect [] in grep expression.
14702            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14703            if test "x$FOUND_VERSION_78" = x; then
14704              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14705$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14706              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14707$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14708              BOOT_JDK_FOUND=no
14709            else
14710              # We're done! :-)
14711              BOOT_JDK_FOUND=yes
14712
14713  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14714
14715  # Input might be given as Windows format, start by converting to
14716  # unix format.
14717  path="$BOOT_JDK"
14718  new_path=`$CYGPATH -u "$path"`
14719
14720  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14721  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14722  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14723  # "foo.exe" is OK but "foo" is an error.
14724  #
14725  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14726  # It is also a way to make sure we got the proper file name for the real test later on.
14727  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14728  if test "x$test_shortpath" = x; then
14729    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14730$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14731    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14732  fi
14733
14734  # Call helper function which possibly converts this using DOS-style short mode.
14735  # If so, the updated path is stored in $new_path.
14736
14737  input_path="$new_path"
14738  # Check if we need to convert this using DOS-style short mode. If the path
14739  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14740  # take no chances and rewrite it.
14741  # Note: m4 eats our [], so we need to use [ and ] instead.
14742  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14743  if test "x$has_forbidden_chars" != x; then
14744    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14745    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14746    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14747    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14748      # Going to short mode and back again did indeed matter. Since short mode is
14749      # case insensitive, let's make it lowercase to improve readability.
14750      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14751      # Now convert it back to Unix-stile (cygpath)
14752      input_path=`$CYGPATH -u "$shortmode_path"`
14753      new_path="$input_path"
14754    fi
14755  fi
14756
14757  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14758  if test "x$test_cygdrive_prefix" = x; then
14759    # As a simple fix, exclude /usr/bin since it's not a real path.
14760    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14761      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14762      # a path prefixed by /cygdrive for fixpath to work.
14763      new_path="$CYGWIN_ROOT_PATH$input_path"
14764    fi
14765  fi
14766
14767
14768  if test "x$path" != "x$new_path"; then
14769    BOOT_JDK="$new_path"
14770    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14771$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14772  fi
14773
14774  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14775
14776  path="$BOOT_JDK"
14777  has_colon=`$ECHO $path | $GREP ^.:`
14778  new_path="$path"
14779  if test "x$has_colon" = x; then
14780    # Not in mixed or Windows style, start by that.
14781    new_path=`cmd //c echo $path`
14782  fi
14783
14784
14785  input_path="$new_path"
14786  # Check if we need to convert this using DOS-style short mode. If the path
14787  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14788  # take no chances and rewrite it.
14789  # Note: m4 eats our [], so we need to use [ and ] instead.
14790  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14791  if test "x$has_forbidden_chars" != x; then
14792    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14793    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14794  fi
14795
14796
14797  windows_path="$new_path"
14798  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14799    unix_path=`$CYGPATH -u "$windows_path"`
14800    new_path="$unix_path"
14801  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14802    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14803    new_path="$unix_path"
14804  fi
14805
14806  if test "x$path" != "x$new_path"; then
14807    BOOT_JDK="$new_path"
14808    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14809$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14810  fi
14811
14812  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14813  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14814
14815  else
14816    # We're on a posix platform. Hooray! :)
14817    path="$BOOT_JDK"
14818    has_space=`$ECHO "$path" | $GREP " "`
14819    if test "x$has_space" != x; then
14820      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14821$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14822      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14823    fi
14824
14825    # Use eval to expand a potential ~
14826    eval path="$path"
14827    if test ! -f "$path" && test ! -d "$path"; then
14828      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14829    fi
14830
14831    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14832  fi
14833
14834              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14835$as_echo_n "checking for Boot JDK... " >&6; }
14836              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14837$as_echo "$BOOT_JDK" >&6; }
14838              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14839$as_echo_n "checking Boot JDK version... " >&6; }
14840              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14841              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14842$as_echo "$BOOT_JDK_VERSION" >&6; }
14843            fi # end check jdk version
14844          fi # end check rt.jar
14845        fi # end check javac
14846      fi # end check java
14847    fi # end check boot jdk found
14848  fi
14849
14850
14851  if test "x$BOOT_JDK_FOUND" = xno; then
14852    # Now execute the test
14853
14854  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
14855  BOOT_JDK_SUFFIX="/Contents/Home"
14856  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14857  if test "x$ALL_JDKS_FOUND" != x; then
14858    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14859
14860  if test "x$BOOT_JDK_FOUND" = xno; then
14861    # Now execute the test
14862
14863        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14864        if test -d "$BOOT_JDK"; then
14865          BOOT_JDK_FOUND=maybe
14866          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14867$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14868        fi
14869
14870
14871    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14872    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14873      # Do we have a bin/java?
14874      if test ! -x "$BOOT_JDK/bin/java"; then
14875        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14876$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14877        BOOT_JDK_FOUND=no
14878      else
14879        # Do we have a bin/javac?
14880        if test ! -x "$BOOT_JDK/bin/javac"; then
14881          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14882$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14883          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14884$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14885          BOOT_JDK_FOUND=no
14886        else
14887          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14888          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14889            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14890$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14891            BOOT_JDK_FOUND=no
14892          else
14893            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14894            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14895
14896            # Extra M4 quote needed to protect [] in grep expression.
14897            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14898            if test "x$FOUND_VERSION_78" = x; then
14899              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14900$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14901              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14902$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14903              BOOT_JDK_FOUND=no
14904            else
14905              # We're done! :-)
14906              BOOT_JDK_FOUND=yes
14907
14908  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14909
14910  # Input might be given as Windows format, start by converting to
14911  # unix format.
14912  path="$BOOT_JDK"
14913  new_path=`$CYGPATH -u "$path"`
14914
14915  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14916  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14917  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14918  # "foo.exe" is OK but "foo" is an error.
14919  #
14920  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14921  # It is also a way to make sure we got the proper file name for the real test later on.
14922  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14923  if test "x$test_shortpath" = x; then
14924    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14925$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14926    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14927  fi
14928
14929  # Call helper function which possibly converts this using DOS-style short mode.
14930  # If so, the updated path is stored in $new_path.
14931
14932  input_path="$new_path"
14933  # Check if we need to convert this using DOS-style short mode. If the path
14934  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14935  # take no chances and rewrite it.
14936  # Note: m4 eats our [], so we need to use [ and ] instead.
14937  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14938  if test "x$has_forbidden_chars" != x; then
14939    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14940    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14941    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14942    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14943      # Going to short mode and back again did indeed matter. Since short mode is
14944      # case insensitive, let's make it lowercase to improve readability.
14945      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14946      # Now convert it back to Unix-stile (cygpath)
14947      input_path=`$CYGPATH -u "$shortmode_path"`
14948      new_path="$input_path"
14949    fi
14950  fi
14951
14952  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14953  if test "x$test_cygdrive_prefix" = x; then
14954    # As a simple fix, exclude /usr/bin since it's not a real path.
14955    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14956      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14957      # a path prefixed by /cygdrive for fixpath to work.
14958      new_path="$CYGWIN_ROOT_PATH$input_path"
14959    fi
14960  fi
14961
14962
14963  if test "x$path" != "x$new_path"; then
14964    BOOT_JDK="$new_path"
14965    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14966$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14967  fi
14968
14969  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14970
14971  path="$BOOT_JDK"
14972  has_colon=`$ECHO $path | $GREP ^.:`
14973  new_path="$path"
14974  if test "x$has_colon" = x; then
14975    # Not in mixed or Windows style, start by that.
14976    new_path=`cmd //c echo $path`
14977  fi
14978
14979
14980  input_path="$new_path"
14981  # Check if we need to convert this using DOS-style short mode. If the path
14982  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14983  # take no chances and rewrite it.
14984  # Note: m4 eats our [], so we need to use [ and ] instead.
14985  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14986  if test "x$has_forbidden_chars" != x; then
14987    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14988    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14989  fi
14990
14991
14992  windows_path="$new_path"
14993  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14994    unix_path=`$CYGPATH -u "$windows_path"`
14995    new_path="$unix_path"
14996  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14997    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14998    new_path="$unix_path"
14999  fi
15000
15001  if test "x$path" != "x$new_path"; then
15002    BOOT_JDK="$new_path"
15003    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15004$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15005  fi
15006
15007  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15008  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15009
15010  else
15011    # We're on a posix platform. Hooray! :)
15012    path="$BOOT_JDK"
15013    has_space=`$ECHO "$path" | $GREP " "`
15014    if test "x$has_space" != x; then
15015      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15016$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15017      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15018    fi
15019
15020    # Use eval to expand a potential ~
15021    eval path="$path"
15022    if test ! -f "$path" && test ! -d "$path"; then
15023      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15024    fi
15025
15026    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
15027  fi
15028
15029              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15030$as_echo_n "checking for Boot JDK... " >&6; }
15031              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15032$as_echo "$BOOT_JDK" >&6; }
15033              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15034$as_echo_n "checking Boot JDK version... " >&6; }
15035              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15036              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15037$as_echo "$BOOT_JDK_VERSION" >&6; }
15038            fi # end check jdk version
15039          fi # end check rt.jar
15040        fi # end check javac
15041      fi # end check java
15042    fi # end check boot jdk found
15043  fi
15044
15045    done
15046  fi
15047
15048
15049    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15050    if test "x$BOOT_JDK_FOUND" = xmaybe; then
15051      # Do we have a bin/java?
15052      if test ! -x "$BOOT_JDK/bin/java"; then
15053        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15054$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15055        BOOT_JDK_FOUND=no
15056      else
15057        # Do we have a bin/javac?
15058        if test ! -x "$BOOT_JDK/bin/javac"; then
15059          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15060$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15061          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15062$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15063          BOOT_JDK_FOUND=no
15064        else
15065          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15066          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15067            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15068$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15069            BOOT_JDK_FOUND=no
15070          else
15071            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15072            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15073
15074            # Extra M4 quote needed to protect [] in grep expression.
15075            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15076            if test "x$FOUND_VERSION_78" = x; then
15077              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15078$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15079              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15080$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15081              BOOT_JDK_FOUND=no
15082            else
15083              # We're done! :-)
15084              BOOT_JDK_FOUND=yes
15085
15086  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15087
15088  # Input might be given as Windows format, start by converting to
15089  # unix format.
15090  path="$BOOT_JDK"
15091  new_path=`$CYGPATH -u "$path"`
15092
15093  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15094  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15095  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15096  # "foo.exe" is OK but "foo" is an error.
15097  #
15098  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15099  # It is also a way to make sure we got the proper file name for the real test later on.
15100  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15101  if test "x$test_shortpath" = x; then
15102    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15103$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15104    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15105  fi
15106
15107  # Call helper function which possibly converts this using DOS-style short mode.
15108  # If so, the updated path is stored in $new_path.
15109
15110  input_path="$new_path"
15111  # Check if we need to convert this using DOS-style short mode. If the path
15112  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15113  # take no chances and rewrite it.
15114  # Note: m4 eats our [], so we need to use [ and ] instead.
15115  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15116  if test "x$has_forbidden_chars" != x; then
15117    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15118    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15119    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15120    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15121      # Going to short mode and back again did indeed matter. Since short mode is
15122      # case insensitive, let's make it lowercase to improve readability.
15123      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15124      # Now convert it back to Unix-stile (cygpath)
15125      input_path=`$CYGPATH -u "$shortmode_path"`
15126      new_path="$input_path"
15127    fi
15128  fi
15129
15130  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15131  if test "x$test_cygdrive_prefix" = x; then
15132    # As a simple fix, exclude /usr/bin since it's not a real path.
15133    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15134      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15135      # a path prefixed by /cygdrive for fixpath to work.
15136      new_path="$CYGWIN_ROOT_PATH$input_path"
15137    fi
15138  fi
15139
15140
15141  if test "x$path" != "x$new_path"; then
15142    BOOT_JDK="$new_path"
15143    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15144$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15145  fi
15146
15147  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15148
15149  path="$BOOT_JDK"
15150  has_colon=`$ECHO $path | $GREP ^.:`
15151  new_path="$path"
15152  if test "x$has_colon" = x; then
15153    # Not in mixed or Windows style, start by that.
15154    new_path=`cmd //c echo $path`
15155  fi
15156
15157
15158  input_path="$new_path"
15159  # Check if we need to convert this using DOS-style short mode. If the path
15160  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15161  # take no chances and rewrite it.
15162  # Note: m4 eats our [], so we need to use [ and ] instead.
15163  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15164  if test "x$has_forbidden_chars" != x; then
15165    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15166    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15167  fi
15168
15169
15170  windows_path="$new_path"
15171  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15172    unix_path=`$CYGPATH -u "$windows_path"`
15173    new_path="$unix_path"
15174  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15175    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15176    new_path="$unix_path"
15177  fi
15178
15179  if test "x$path" != "x$new_path"; then
15180    BOOT_JDK="$new_path"
15181    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15182$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15183  fi
15184
15185  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15186  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15187
15188  else
15189    # We're on a posix platform. Hooray! :)
15190    path="$BOOT_JDK"
15191    has_space=`$ECHO "$path" | $GREP " "`
15192    if test "x$has_space" != x; then
15193      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15194$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15195      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15196    fi
15197
15198    # Use eval to expand a potential ~
15199    eval path="$path"
15200    if test ! -f "$path" && test ! -d "$path"; then
15201      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15202    fi
15203
15204    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
15205  fi
15206
15207              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15208$as_echo_n "checking for Boot JDK... " >&6; }
15209              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15210$as_echo "$BOOT_JDK" >&6; }
15211              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15212$as_echo_n "checking Boot JDK version... " >&6; }
15213              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15214              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15215$as_echo "$BOOT_JDK_VERSION" >&6; }
15216            fi # end check jdk version
15217          fi # end check rt.jar
15218        fi # end check javac
15219      fi # end check java
15220    fi # end check boot jdk found
15221  fi
15222
15223  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
15224
15225  if test "x$BOOT_JDK_FOUND" = xno; then
15226    # Now execute the test
15227
15228  BOOT_JDK_PREFIX="/usr/lib/jvm"
15229  BOOT_JDK_SUFFIX=""
15230  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
15231  if test "x$ALL_JDKS_FOUND" != x; then
15232    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
15233
15234  if test "x$BOOT_JDK_FOUND" = xno; then
15235    # Now execute the test
15236
15237        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
15238        if test -d "$BOOT_JDK"; then
15239          BOOT_JDK_FOUND=maybe
15240          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
15241$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
15242        fi
15243
15244
15245    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15246    if test "x$BOOT_JDK_FOUND" = xmaybe; then
15247      # Do we have a bin/java?
15248      if test ! -x "$BOOT_JDK/bin/java"; then
15249        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15250$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15251        BOOT_JDK_FOUND=no
15252      else
15253        # Do we have a bin/javac?
15254        if test ! -x "$BOOT_JDK/bin/javac"; then
15255          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15256$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15257          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15258$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15259          BOOT_JDK_FOUND=no
15260        else
15261          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15262          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15263            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15264$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15265            BOOT_JDK_FOUND=no
15266          else
15267            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15268            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15269
15270            # Extra M4 quote needed to protect [] in grep expression.
15271            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15272            if test "x$FOUND_VERSION_78" = x; then
15273              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15274$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15275              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15276$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15277              BOOT_JDK_FOUND=no
15278            else
15279              # We're done! :-)
15280              BOOT_JDK_FOUND=yes
15281
15282  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15283
15284  # Input might be given as Windows format, start by converting to
15285  # unix format.
15286  path="$BOOT_JDK"
15287  new_path=`$CYGPATH -u "$path"`
15288
15289  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15290  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15291  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15292  # "foo.exe" is OK but "foo" is an error.
15293  #
15294  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15295  # It is also a way to make sure we got the proper file name for the real test later on.
15296  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15297  if test "x$test_shortpath" = x; then
15298    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15299$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15300    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15301  fi
15302
15303  # Call helper function which possibly converts this using DOS-style short mode.
15304  # If so, the updated path is stored in $new_path.
15305
15306  input_path="$new_path"
15307  # Check if we need to convert this using DOS-style short mode. If the path
15308  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15309  # take no chances and rewrite it.
15310  # Note: m4 eats our [], so we need to use [ and ] instead.
15311  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15312  if test "x$has_forbidden_chars" != x; then
15313    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15314    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15315    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15316    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15317      # Going to short mode and back again did indeed matter. Since short mode is
15318      # case insensitive, let's make it lowercase to improve readability.
15319      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15320      # Now convert it back to Unix-stile (cygpath)
15321      input_path=`$CYGPATH -u "$shortmode_path"`
15322      new_path="$input_path"
15323    fi
15324  fi
15325
15326  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15327  if test "x$test_cygdrive_prefix" = x; then
15328    # As a simple fix, exclude /usr/bin since it's not a real path.
15329    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15330      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15331      # a path prefixed by /cygdrive for fixpath to work.
15332      new_path="$CYGWIN_ROOT_PATH$input_path"
15333    fi
15334  fi
15335
15336
15337  if test "x$path" != "x$new_path"; then
15338    BOOT_JDK="$new_path"
15339    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15340$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15341  fi
15342
15343  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15344
15345  path="$BOOT_JDK"
15346  has_colon=`$ECHO $path | $GREP ^.:`
15347  new_path="$path"
15348  if test "x$has_colon" = x; then
15349    # Not in mixed or Windows style, start by that.
15350    new_path=`cmd //c echo $path`
15351  fi
15352
15353
15354  input_path="$new_path"
15355  # Check if we need to convert this using DOS-style short mode. If the path
15356  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15357  # take no chances and rewrite it.
15358  # Note: m4 eats our [], so we need to use [ and ] instead.
15359  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15360  if test "x$has_forbidden_chars" != x; then
15361    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15362    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15363  fi
15364
15365
15366  windows_path="$new_path"
15367  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15368    unix_path=`$CYGPATH -u "$windows_path"`
15369    new_path="$unix_path"
15370  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15371    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15372    new_path="$unix_path"
15373  fi
15374
15375  if test "x$path" != "x$new_path"; then
15376    BOOT_JDK="$new_path"
15377    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15378$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15379  fi
15380
15381  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15382  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15383
15384  else
15385    # We're on a posix platform. Hooray! :)
15386    path="$BOOT_JDK"
15387    has_space=`$ECHO "$path" | $GREP " "`
15388    if test "x$has_space" != x; then
15389      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15390$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15391      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15392    fi
15393
15394    # Use eval to expand a potential ~
15395    eval path="$path"
15396    if test ! -f "$path" && test ! -d "$path"; then
15397      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15398    fi
15399
15400    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
15401  fi
15402
15403              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15404$as_echo_n "checking for Boot JDK... " >&6; }
15405              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15406$as_echo "$BOOT_JDK" >&6; }
15407              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15408$as_echo_n "checking Boot JDK version... " >&6; }
15409              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15410              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15411$as_echo "$BOOT_JDK_VERSION" >&6; }
15412            fi # end check jdk version
15413          fi # end check rt.jar
15414        fi # end check javac
15415      fi # end check java
15416    fi # end check boot jdk found
15417  fi
15418
15419    done
15420  fi
15421
15422
15423    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15424    if test "x$BOOT_JDK_FOUND" = xmaybe; then
15425      # Do we have a bin/java?
15426      if test ! -x "$BOOT_JDK/bin/java"; then
15427        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15428$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15429        BOOT_JDK_FOUND=no
15430      else
15431        # Do we have a bin/javac?
15432        if test ! -x "$BOOT_JDK/bin/javac"; then
15433          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15434$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15435          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15436$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15437          BOOT_JDK_FOUND=no
15438        else
15439          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15440          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15441            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15442$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15443            BOOT_JDK_FOUND=no
15444          else
15445            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15446            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15447
15448            # Extra M4 quote needed to protect [] in grep expression.
15449            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15450            if test "x$FOUND_VERSION_78" = x; then
15451              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15452$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15453              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15454$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15455              BOOT_JDK_FOUND=no
15456            else
15457              # We're done! :-)
15458              BOOT_JDK_FOUND=yes
15459
15460  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15461
15462  # Input might be given as Windows format, start by converting to
15463  # unix format.
15464  path="$BOOT_JDK"
15465  new_path=`$CYGPATH -u "$path"`
15466
15467  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15468  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15469  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15470  # "foo.exe" is OK but "foo" is an error.
15471  #
15472  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15473  # It is also a way to make sure we got the proper file name for the real test later on.
15474  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15475  if test "x$test_shortpath" = x; then
15476    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15477$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15478    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15479  fi
15480
15481  # Call helper function which possibly converts this using DOS-style short mode.
15482  # If so, the updated path is stored in $new_path.
15483
15484  input_path="$new_path"
15485  # Check if we need to convert this using DOS-style short mode. If the path
15486  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15487  # take no chances and rewrite it.
15488  # Note: m4 eats our [], so we need to use [ and ] instead.
15489  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15490  if test "x$has_forbidden_chars" != x; then
15491    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15492    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15493    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15494    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15495      # Going to short mode and back again did indeed matter. Since short mode is
15496      # case insensitive, let's make it lowercase to improve readability.
15497      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15498      # Now convert it back to Unix-stile (cygpath)
15499      input_path=`$CYGPATH -u "$shortmode_path"`
15500      new_path="$input_path"
15501    fi
15502  fi
15503
15504  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15505  if test "x$test_cygdrive_prefix" = x; then
15506    # As a simple fix, exclude /usr/bin since it's not a real path.
15507    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15508      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15509      # a path prefixed by /cygdrive for fixpath to work.
15510      new_path="$CYGWIN_ROOT_PATH$input_path"
15511    fi
15512  fi
15513
15514
15515  if test "x$path" != "x$new_path"; then
15516    BOOT_JDK="$new_path"
15517    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15518$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15519  fi
15520
15521  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15522
15523  path="$BOOT_JDK"
15524  has_colon=`$ECHO $path | $GREP ^.:`
15525  new_path="$path"
15526  if test "x$has_colon" = x; then
15527    # Not in mixed or Windows style, start by that.
15528    new_path=`cmd //c echo $path`
15529  fi
15530
15531
15532  input_path="$new_path"
15533  # Check if we need to convert this using DOS-style short mode. If the path
15534  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15535  # take no chances and rewrite it.
15536  # Note: m4 eats our [], so we need to use [ and ] instead.
15537  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15538  if test "x$has_forbidden_chars" != x; then
15539    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15540    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15541  fi
15542
15543
15544  windows_path="$new_path"
15545  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15546    unix_path=`$CYGPATH -u "$windows_path"`
15547    new_path="$unix_path"
15548  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15549    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15550    new_path="$unix_path"
15551  fi
15552
15553  if test "x$path" != "x$new_path"; then
15554    BOOT_JDK="$new_path"
15555    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15556$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15557  fi
15558
15559  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15560  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15561
15562  else
15563    # We're on a posix platform. Hooray! :)
15564    path="$BOOT_JDK"
15565    has_space=`$ECHO "$path" | $GREP " "`
15566    if test "x$has_space" != x; then
15567      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15568$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15569      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15570    fi
15571
15572    # Use eval to expand a potential ~
15573    eval path="$path"
15574    if test ! -f "$path" && test ! -d "$path"; then
15575      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15576    fi
15577
15578    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
15579  fi
15580
15581              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15582$as_echo_n "checking for Boot JDK... " >&6; }
15583              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15584$as_echo "$BOOT_JDK" >&6; }
15585              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15586$as_echo_n "checking Boot JDK version... " >&6; }
15587              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15588              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15589$as_echo "$BOOT_JDK_VERSION" >&6; }
15590            fi # end check jdk version
15591          fi # end check rt.jar
15592        fi # end check javac
15593      fi # end check java
15594    fi # end check boot jdk found
15595  fi
15596
15597  fi
15598
15599
15600    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15601    if test "x$BOOT_JDK_FOUND" = xmaybe; then
15602      # Do we have a bin/java?
15603      if test ! -x "$BOOT_JDK/bin/java"; then
15604        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15605$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15606        BOOT_JDK_FOUND=no
15607      else
15608        # Do we have a bin/javac?
15609        if test ! -x "$BOOT_JDK/bin/javac"; then
15610          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15611$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15612          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15613$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15614          BOOT_JDK_FOUND=no
15615        else
15616          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15617          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15618            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15619$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15620            BOOT_JDK_FOUND=no
15621          else
15622            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15623            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15624
15625            # Extra M4 quote needed to protect [] in grep expression.
15626            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15627            if test "x$FOUND_VERSION_78" = x; then
15628              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15629$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15630              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15631$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15632              BOOT_JDK_FOUND=no
15633            else
15634              # We're done! :-)
15635              BOOT_JDK_FOUND=yes
15636
15637  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15638
15639  # Input might be given as Windows format, start by converting to
15640  # unix format.
15641  path="$BOOT_JDK"
15642  new_path=`$CYGPATH -u "$path"`
15643
15644  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15645  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15646  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15647  # "foo.exe" is OK but "foo" is an error.
15648  #
15649  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15650  # It is also a way to make sure we got the proper file name for the real test later on.
15651  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15652  if test "x$test_shortpath" = x; then
15653    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15654$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15655    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15656  fi
15657
15658  # Call helper function which possibly converts this using DOS-style short mode.
15659  # If so, the updated path is stored in $new_path.
15660
15661  input_path="$new_path"
15662  # Check if we need to convert this using DOS-style short mode. If the path
15663  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15664  # take no chances and rewrite it.
15665  # Note: m4 eats our [], so we need to use [ and ] instead.
15666  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15667  if test "x$has_forbidden_chars" != x; then
15668    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15669    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15670    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15671    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15672      # Going to short mode and back again did indeed matter. Since short mode is
15673      # case insensitive, let's make it lowercase to improve readability.
15674      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15675      # Now convert it back to Unix-stile (cygpath)
15676      input_path=`$CYGPATH -u "$shortmode_path"`
15677      new_path="$input_path"
15678    fi
15679  fi
15680
15681  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15682  if test "x$test_cygdrive_prefix" = x; then
15683    # As a simple fix, exclude /usr/bin since it's not a real path.
15684    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15685      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15686      # a path prefixed by /cygdrive for fixpath to work.
15687      new_path="$CYGWIN_ROOT_PATH$input_path"
15688    fi
15689  fi
15690
15691
15692  if test "x$path" != "x$new_path"; then
15693    BOOT_JDK="$new_path"
15694    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15695$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15696  fi
15697
15698  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15699
15700  path="$BOOT_JDK"
15701  has_colon=`$ECHO $path | $GREP ^.:`
15702  new_path="$path"
15703  if test "x$has_colon" = x; then
15704    # Not in mixed or Windows style, start by that.
15705    new_path=`cmd //c echo $path`
15706  fi
15707
15708
15709  input_path="$new_path"
15710  # Check if we need to convert this using DOS-style short mode. If the path
15711  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15712  # take no chances and rewrite it.
15713  # Note: m4 eats our [], so we need to use [ and ] instead.
15714  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15715  if test "x$has_forbidden_chars" != x; then
15716    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15717    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15718  fi
15719
15720
15721  windows_path="$new_path"
15722  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15723    unix_path=`$CYGPATH -u "$windows_path"`
15724    new_path="$unix_path"
15725  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15726    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15727    new_path="$unix_path"
15728  fi
15729
15730  if test "x$path" != "x$new_path"; then
15731    BOOT_JDK="$new_path"
15732    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15733$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15734  fi
15735
15736  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15737  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15738
15739  else
15740    # We're on a posix platform. Hooray! :)
15741    path="$BOOT_JDK"
15742    has_space=`$ECHO "$path" | $GREP " "`
15743    if test "x$has_space" != x; then
15744      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15745$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15746      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15747    fi
15748
15749    # Use eval to expand a potential ~
15750    eval path="$path"
15751    if test ! -f "$path" && test ! -d "$path"; then
15752      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15753    fi
15754
15755    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
15756  fi
15757
15758              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15759$as_echo_n "checking for Boot JDK... " >&6; }
15760              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15761$as_echo "$BOOT_JDK" >&6; }
15762              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15763$as_echo_n "checking Boot JDK version... " >&6; }
15764              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15765              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15766$as_echo "$BOOT_JDK_VERSION" >&6; }
15767            fi # end check jdk version
15768          fi # end check rt.jar
15769        fi # end check javac
15770      fi # end check java
15771    fi # end check boot jdk found
15772  fi
15773
15774
15775  # If we haven't found anything yet, we've truly lost. Give up.
15776  if test "x$BOOT_JDK_FOUND" = xno; then
15777
15778  # Print a helpful message on how to acquire the necessary build dependency.
15779  # openjdk is the help tag: freetyp2, cups, pulse, alsa etc
15780  MISSING_DEPENDENCY=openjdk
15781  PKGHANDLER_COMMAND=
15782
15783  case $PKGHANDLER in
15784    apt-get)
15785      apt_help     $MISSING_DEPENDENCY ;;
15786    yum)
15787      yum_help     $MISSING_DEPENDENCY ;;
15788    port)
15789      port_help    $MISSING_DEPENDENCY ;;
15790    pkgutil)
15791      pkgutil_help $MISSING_DEPENDENCY ;;
15792    pkgadd)
15793      pkgadd_help  $MISSING_DEPENDENCY ;;
15794    * )
15795      break ;;
15796  esac
15797
15798  if test "x$PKGHANDLER_COMMAND" != x; then
15799    HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
15800  fi
15801
15802    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
15803$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
15804    { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
15805$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15806    as_fn_error $? "Cannot continue" "$LINENO" 5
15807  fi
15808
15809  # Setup proper paths for what we found
15810  BOOT_RTJAR="$BOOT_JDK/jre/lib/rt.jar"
15811  if test ! -f "$BOOT_RTJAR"; then
15812    # On MacOSX it is called classes.jar
15813    BOOT_RTJAR="$BOOT_JDK/../Classes/classes.jar"
15814    if test -f "$BOOT_RTJAR"; then
15815      # Remove the ..
15816      BOOT_RTJAR="`cd ${BOOT_RTJAR%/*} && pwd`/${BOOT_RTJAR##*/}"
15817    fi
15818  fi
15819  BOOT_TOOLSJAR="$BOOT_JDK/lib/tools.jar"
15820  BOOT_JDK="$BOOT_JDK"
15821
15822
15823
15824
15825  # Setup tools from the Boot JDK.
15826
15827  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
15828$as_echo_n "checking for java in Boot JDK... " >&6; }
15829  JAVA=$BOOT_JDK/bin/java
15830  if test ! -x $JAVA; then
15831    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15832$as_echo "not found" >&6; }
15833    { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15834$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15835    as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
15836  fi
15837  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15838$as_echo "ok" >&6; }
15839
15840
15841  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
15842$as_echo_n "checking for javac in Boot JDK... " >&6; }
15843  JAVAC=$BOOT_JDK/bin/javac
15844  if test ! -x $JAVAC; then
15845    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15846$as_echo "not found" >&6; }
15847    { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15848$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15849    as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
15850  fi
15851  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15852$as_echo "ok" >&6; }
15853
15854
15855  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
15856$as_echo_n "checking for javah in Boot JDK... " >&6; }
15857  JAVAH=$BOOT_JDK/bin/javah
15858  if test ! -x $JAVAH; then
15859    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15860$as_echo "not found" >&6; }
15861    { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15862$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15863    as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
15864  fi
15865  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15866$as_echo "ok" >&6; }
15867
15868
15869  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javap in Boot JDK" >&5
15870$as_echo_n "checking for javap in Boot JDK... " >&6; }
15871  JAVAP=$BOOT_JDK/bin/javap
15872  if test ! -x $JAVAP; then
15873    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15874$as_echo "not found" >&6; }
15875    { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15876$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15877    as_fn_error $? "Could not find javap in the Boot JDK" "$LINENO" 5
15878  fi
15879  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15880$as_echo "ok" >&6; }
15881
15882
15883  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
15884$as_echo_n "checking for jar in Boot JDK... " >&6; }
15885  JAR=$BOOT_JDK/bin/jar
15886  if test ! -x $JAR; then
15887    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15888$as_echo "not found" >&6; }
15889    { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15890$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15891    as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
15892  fi
15893  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15894$as_echo "ok" >&6; }
15895
15896
15897  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rmic in Boot JDK" >&5
15898$as_echo_n "checking for rmic in Boot JDK... " >&6; }
15899  RMIC=$BOOT_JDK/bin/rmic
15900  if test ! -x $RMIC; then
15901    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15902$as_echo "not found" >&6; }
15903    { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15904$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15905    as_fn_error $? "Could not find rmic in the Boot JDK" "$LINENO" 5
15906  fi
15907  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15908$as_echo "ok" >&6; }
15909
15910
15911  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5
15912$as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
15913  NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
15914  if test ! -x $NATIVE2ASCII; then
15915    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15916$as_echo "not found" >&6; }
15917    { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15918$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15919    as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5
15920  fi
15921  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15922$as_echo "ok" >&6; }
15923
15924
15925  # Finally, set some other options...
15926
15927  # When compiling code to be executed by the Boot JDK, force jdk7 compatibility.
15928  BOOT_JDK_SOURCETARGET="-source 7 -target 7"
15929
15930
15931
15932
15933  ##############################################################################
15934  #
15935  # Specify options for anything that is run with the Boot JDK.
15936  #
15937
15938# Check whether --with-boot-jdk-jvmargs was given.
15939if test "${with_boot_jdk_jvmargs+set}" = set; then :
15940  withval=$with_boot_jdk_jvmargs;
15941fi
15942
15943
15944  if test "x$with_boot_jdk_jvmargs" = x; then
15945    # Not all JVM:s accept the same arguments on the command line.
15946    # OpenJDK specific increase in thread stack for JDK build,
15947    # well more specifically, when running javac.
15948    if test "x$BUILD_NUM_BITS" = x32; then
15949      STACK_SIZE=768
15950    else
15951      # Running Javac on a JVM on a 64-bit machine, the stack takes more space
15952      # since 64-bit pointers are pushed on the stach. Apparently, we need
15953      # to increase the stack space when javacing the JDK....
15954      STACK_SIZE=1536
15955    fi
15956
15957    # Minimum amount of heap memory.
15958
15959  $ECHO "Check if jvm arg is ok: -Xms64M" >&5
15960  $ECHO "Command: $JAVA -Xms64M -version" >&5
15961  OUTPUT=`$JAVA -Xms64M -version 2>&1`
15962  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
15963  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
15964  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15965    boot_jdk_jvmargs="$boot_jdk_jvmargs -Xms64M"
15966    JVM_ARG_OK=true
15967  else
15968    $ECHO "Arg failed:" >&5
15969    $ECHO "$OUTPUT" >&5
15970    JVM_ARG_OK=false
15971  fi
15972
15973    if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
15974      # Why does macosx need more heap? Its the huge JDK batch.
15975
15976  $ECHO "Check if jvm arg is ok: -Xmx1600M" >&5
15977  $ECHO "Command: $JAVA -Xmx1600M -version" >&5
15978  OUTPUT=`$JAVA -Xmx1600M -version 2>&1`
15979  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
15980  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
15981  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15982    boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1600M"
15983    JVM_ARG_OK=true
15984  else
15985    $ECHO "Arg failed:" >&5
15986    $ECHO "$OUTPUT" >&5
15987    JVM_ARG_OK=false
15988  fi
15989
15990    else
15991
15992  $ECHO "Check if jvm arg is ok: -Xmx1100M" >&5
15993  $ECHO "Command: $JAVA -Xmx1100M -version" >&5
15994  OUTPUT=`$JAVA -Xmx1100M -version 2>&1`
15995  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
15996  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
15997  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15998    boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1100M"
15999    JVM_ARG_OK=true
16000  else
16001    $ECHO "Arg failed:" >&5
16002    $ECHO "$OUTPUT" >&5
16003    JVM_ARG_OK=false
16004  fi
16005
16006    fi
16007    # When is adding -client something that speeds up the JVM?
16008    # ADD_JVM_ARG_IF_OK([-client],boot_jdk_jvmargs,[$JAVA])
16009
16010  $ECHO "Check if jvm arg is ok: -XX:PermSize=32m" >&5
16011  $ECHO "Command: $JAVA -XX:PermSize=32m -version" >&5
16012  OUTPUT=`$JAVA -XX:PermSize=32m -version 2>&1`
16013  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
16014  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
16015  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
16016    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:PermSize=32m"
16017    JVM_ARG_OK=true
16018  else
16019    $ECHO "Arg failed:" >&5
16020    $ECHO "$OUTPUT" >&5
16021    JVM_ARG_OK=false
16022  fi
16023
16024
16025  $ECHO "Check if jvm arg is ok: -XX:MaxPermSize=160m" >&5
16026  $ECHO "Command: $JAVA -XX:MaxPermSize=160m -version" >&5
16027  OUTPUT=`$JAVA -XX:MaxPermSize=160m -version 2>&1`
16028  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
16029  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
16030  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
16031    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:MaxPermSize=160m"
16032    JVM_ARG_OK=true
16033  else
16034    $ECHO "Arg failed:" >&5
16035    $ECHO "$OUTPUT" >&5
16036    JVM_ARG_OK=false
16037  fi
16038
16039
16040  $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
16041  $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
16042  OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
16043  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
16044  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
16045  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
16046    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:ThreadStackSize=$STACK_SIZE"
16047    JVM_ARG_OK=true
16048  else
16049    $ECHO "Arg failed:" >&5
16050    $ECHO "$OUTPUT" >&5
16051    JVM_ARG_OK=false
16052  fi
16053
16054    # Disable special log output when a debug build is used as Boot JDK...
16055
16056  $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
16057  $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
16058  OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
16059  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
16060  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
16061  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
16062    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
16063    JVM_ARG_OK=true
16064  else
16065    $ECHO "Arg failed:" >&5
16066    $ECHO "$OUTPUT" >&5
16067    JVM_ARG_OK=false
16068  fi
16069
16070  fi
16071
16072  BOOT_JDK_JVMARGS=$boot_jdk_jvmargs
16073
16074
16075
16076###############################################################################
16077#
16078# Configure the sources to use. We can add or override individual directories.
16079#
16080###############################################################################
16081
16082
16083  # Where are the sources. Any of these can be overridden
16084  # using --with-override-corba and the likes.
16085  LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
16086  CORBA_TOPDIR="$SRC_ROOT/corba"
16087  JAXP_TOPDIR="$SRC_ROOT/jaxp"
16088  JAXWS_TOPDIR="$SRC_ROOT/jaxws"
16089  HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
16090  NASHORN_TOPDIR="$SRC_ROOT/nashorn"
16091  JDK_TOPDIR="$SRC_ROOT/jdk"
16092
16093
16094
16095
16096
16097
16098
16099
16100
16101
16102  ###############################################################################
16103  #
16104  # Pickup additional source for a component from outside of the source root
16105  # or override source for a component.
16106  #
16107
16108# Check whether --with-add-source-root was given.
16109if test "${with_add_source_root+set}" = set; then :
16110  withval=$with_add_source_root;
16111fi
16112
16113
16114
16115# Check whether --with-override-source-root was given.
16116if test "${with_override_source_root+set}" = set; then :
16117  withval=$with_override_source_root;
16118fi
16119
16120
16121
16122# Check whether --with-adds-and-overrides was given.
16123if test "${with_adds_and_overrides+set}" = set; then :
16124  withval=$with_adds_and_overrides;
16125fi
16126
16127
16128  if test "x$with_adds_and_overrides" != x; then
16129    with_add_source_root="$with_adds_and_overrides/adds"
16130    with_override_source_root="$with_adds_and_overrides/overrides"
16131  fi
16132
16133  if test "x$with_add_source_root" != x; then
16134    if ! test -d $with_add_source_root; then
16135      as_fn_error $? "Trying to use a non-existant add-source-root $with_add_source_root" "$LINENO" 5
16136    fi
16137    CURDIR="$PWD"
16138    cd "$with_add_source_root"
16139    ADD_SRC_ROOT="`pwd`"
16140    cd "$CURDIR"
16141    # Verify that the addon source root does not have any root makefiles.
16142    # If it does, then it is usually an error, prevent this.
16143    if test -f $with_add_source_root/langtools/makefiles/Makefile || \
16144      test -f $with_add_source_root/langtools/make/Makefile; then
16145      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
16146    fi
16147    if test -f $with_add_source_root/corba/makefiles/Makefile || \
16148      test -f $with_add_source_root/corba/make/Makefile; then
16149      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
16150    fi
16151    if test -f $with_add_source_root/jaxp/makefiles/Makefile || \
16152      test -f $with_add_source_root/jaxp/make/Makefile; then
16153      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
16154    fi
16155    if test -f $with_add_source_root/jaxws/makefiles/Makefile || \
16156      test -f $with_add_source_root/jaxws/make/Makefile; then
16157      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
16158    fi
16159    if test -f $with_add_source_root/hotspot/makefiles/Makefile || \
16160      test -f $with_add_source_root/hotspot/make/Makefile; then
16161      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
16162    fi
16163    if test -f $with_add_source_root/nashorn/makefiles/Makefile || \
16164      test -f $with_add_source_root/nashorn/make/Makefile; then
16165      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
16166    fi
16167    if test -f $with_add_source_root/jdk/makefiles/Makefile || \
16168      test -f $with_add_source_root/jdk/make/Makefile; then
16169      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
16170    fi
16171  fi
16172
16173
16174  if test "x$with_override_source_root" != x; then
16175    if ! test -d $with_override_source_root; then
16176      as_fn_error $? "Trying to use a non-existant override-source-root $with_override_source_root" "$LINENO" 5
16177    fi
16178    CURDIR="$PWD"
16179    cd "$with_override_source_root"
16180    OVERRIDE_SRC_ROOT="`pwd`"
16181    cd "$CURDIR"
16182    if test -f $with_override_source_root/langtools/makefiles/Makefile || \
16183      test -f $with_override_source_root/langtools/make/Makefile; then
16184      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
16185    fi
16186    if test -f $with_override_source_root/corba/makefiles/Makefile || \
16187      test -f $with_override_source_root/corba/make/Makefile; then
16188      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
16189    fi
16190    if test -f $with_override_source_root/jaxp/makefiles/Makefile || \
16191      test -f $with_override_source_root/jaxp/make/Makefile; then
16192      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
16193    fi
16194    if test -f $with_override_source_root/jaxws/makefiles/Makefile || \
16195      test -f $with_override_source_root/jaxws/make/Makefile; then
16196      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
16197    fi
16198    if test -f $with_override_source_root/hotspot/makefiles/Makefile || \
16199      test -f $with_override_source_root/hotspot/make/Makefile; then
16200      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
16201    fi
16202    if test -f $with_override_source_root/nashorn/makefiles/Makefile || \
16203      test -f $with_override_source_root/nashorn/make/Makefile; then
16204      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
16205    fi
16206    if test -f $with_override_source_root/jdk/makefiles/Makefile || \
16207      test -f $with_override_source_root/jdk/make/Makefile; then
16208      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
16209    fi
16210  fi
16211
16212
16213  ###############################################################################
16214  #
16215  # Override a repo completely, this is used for example when you have 3 small
16216  # development sandboxes of the langtools sources and want to avoid having 3 full
16217  # OpenJDK sources checked out on disk.
16218  #
16219  # Assuming that the 3 langtools sandboxes are located here:
16220  # /home/fredrik/sandbox1/langtools
16221  # /home/fredrik/sandbox2/langtools
16222  # /home/fredrik/sandbox3/langtools
16223  #
16224  # From the source root you create build subdirs manually:
16225  #     mkdir -p build1 build2 build3
16226  # in each build directory run:
16227  #     (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make)
16228  #     (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make)
16229  #     (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make)
16230  #
16231
16232
16233# Check whether --with-override-langtools was given.
16234if test "${with_override_langtools+set}" = set; then :
16235  withval=$with_override_langtools;
16236fi
16237
16238
16239
16240# Check whether --with-override-corba was given.
16241if test "${with_override_corba+set}" = set; then :
16242  withval=$with_override_corba;
16243fi
16244
16245
16246
16247# Check whether --with-override-jaxp was given.
16248if test "${with_override_jaxp+set}" = set; then :
16249  withval=$with_override_jaxp;
16250fi
16251
16252
16253
16254# Check whether --with-override-jaxws was given.
16255if test "${with_override_jaxws+set}" = set; then :
16256  withval=$with_override_jaxws;
16257fi
16258
16259
16260
16261# Check whether --with-override-hotspot was given.
16262if test "${with_override_hotspot+set}" = set; then :
16263  withval=$with_override_hotspot;
16264fi
16265
16266
16267
16268# Check whether --with-override-nashorn was given.
16269if test "${with_override_nashorn+set}" = set; then :
16270  withval=$with_override_nashorn;
16271fi
16272
16273
16274
16275# Check whether --with-override-jdk was given.
16276if test "${with_override_jdk+set}" = set; then :
16277  withval=$with_override_jdk;
16278fi
16279
16280
16281  if test "x$with_override_langtools" != x; then
16282    CURDIR="$PWD"
16283    cd "$with_override_langtools"
16284    LANGTOOLS_TOPDIR="`pwd`"
16285    cd "$CURDIR"
16286    if ! test -f $LANGTOOLS_TOPDIR/makefiles/Makefile; then
16287      as_fn_error $? "You have to override langtools with a full langtools repo!" "$LINENO" 5
16288    fi
16289    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if langtools should be overridden" >&5
16290$as_echo_n "checking if langtools should be overridden... " >&6; }
16291    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $LANGTOOLS_TOPDIR" >&5
16292$as_echo "yes with $LANGTOOLS_TOPDIR" >&6; }
16293  fi
16294  if test "x$with_override_corba" != x; then
16295    CURDIR="$PWD"
16296    cd "$with_override_corba"
16297    CORBA_TOPDIR="`pwd`"
16298    cd "$CURDIR"
16299    if ! test -f $CORBA_TOPDIR/makefiles/Makefile; then
16300      as_fn_error $? "You have to override corba with a full corba repo!" "$LINENO" 5
16301    fi
16302    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if corba should be overridden" >&5
16303$as_echo_n "checking if corba should be overridden... " >&6; }
16304    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $CORBA_TOPDIR" >&5
16305$as_echo "yes with $CORBA_TOPDIR" >&6; }
16306  fi
16307  if test "x$with_override_jaxp" != x; then
16308    CURDIR="$PWD"
16309    cd "$with_override_jaxp"
16310    JAXP_TOPDIR="`pwd`"
16311    cd "$CURDIR"
16312    if ! test -f $JAXP_TOPDIR/makefiles/Makefile; then
16313      as_fn_error $? "You have to override jaxp with a full jaxp repo!" "$LINENO" 5
16314    fi
16315    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxp should be overridden" >&5
16316$as_echo_n "checking if jaxp should be overridden... " >&6; }
16317    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXP_TOPDIR" >&5
16318$as_echo "yes with $JAXP_TOPDIR" >&6; }
16319  fi
16320  if test "x$with_override_jaxws" != x; then
16321    CURDIR="$PWD"
16322    cd "$with_override_jaxws"
16323    JAXWS_TOPDIR="`pwd`"
16324    cd "$CURDIR"
16325    if ! test -f $JAXWS_TOPDIR/makefiles/Makefile; then
16326      as_fn_error $? "You have to override jaxws with a full jaxws repo!" "$LINENO" 5
16327    fi
16328    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxws should be overridden" >&5
16329$as_echo_n "checking if jaxws should be overridden... " >&6; }
16330    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXWS_TOPDIR" >&5
16331$as_echo "yes with $JAXWS_TOPDIR" >&6; }
16332  fi
16333  if test "x$with_override_hotspot" != x; then
16334    CURDIR="$PWD"
16335    cd "$with_override_hotspot"
16336    HOTSPOT_TOPDIR="`pwd`"
16337    cd "$CURDIR"
16338    if ! test -f $HOTSPOT_TOPDIR/make/Makefile && \
16339        ! test -f $HOTSPOT_TOPDIR/makefiles/Makefile; then
16340      as_fn_error $? "You have to override hotspot with a full hotspot repo!" "$LINENO" 5
16341    fi
16342    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be overridden" >&5
16343$as_echo_n "checking if hotspot should be overridden... " >&6; }
16344    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $HOTSPOT_TOPDIR" >&5
16345$as_echo "yes with $HOTSPOT_TOPDIR" >&6; }
16346  fi
16347  if test "x$with_override_nashorn" != x; then
16348    CURDIR="$PWD"
16349    cd "$with_override_nashorn"
16350    NASHORN_TOPDIR="`pwd`"
16351    cd "$CURDIR"
16352    if ! test -f $NASHORN_TOPDIR/makefiles/Makefile; then
16353      as_fn_error $? "You have to override nashorn with a full nashorn repo!" "$LINENO" 5
16354    fi
16355    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if nashorn should be overridden" >&5
16356$as_echo_n "checking if nashorn should be overridden... " >&6; }
16357    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $NASHORN_TOPDIR" >&5
16358$as_echo "yes with $NASHORN_TOPDIR" >&6; }
16359  fi
16360  if test "x$with_override_jdk" != x; then
16361    CURDIR="$PWD"
16362    cd "$with_override_jdk"
16363    JDK_TOPDIR="`pwd`"
16364    cd "$CURDIR"
16365    if ! test -f $JDK_TOPDIR/makefiles/Makefile; then
16366      as_fn_error $? "You have to override JDK with a full JDK repo!" "$LINENO" 5
16367    fi
16368    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if JDK should be overridden" >&5
16369$as_echo_n "checking if JDK should be overridden... " >&6; }
16370    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JDK_TOPDIR" >&5
16371$as_echo "yes with $JDK_TOPDIR" >&6; }
16372  fi
16373
16374
16375  BUILD_OUTPUT="$OUTPUT_ROOT"
16376
16377
16378  HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
16379  BUILD_HOTSPOT=true
16380
16381
16382
16383# Check whether --with-import-hotspot was given.
16384if test "${with_import_hotspot+set}" = set; then :
16385  withval=$with_import_hotspot;
16386fi
16387
16388  if test "x$with_import_hotspot" != x; then
16389    CURDIR="$PWD"
16390    cd "$with_import_hotspot"
16391    HOTSPOT_DIST="`pwd`"
16392    cd "$CURDIR"
16393    if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
16394      as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
16395    fi
16396    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
16397$as_echo_n "checking if hotspot should be imported... " >&6; }
16398    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
16399$as_echo "yes from $HOTSPOT_DIST" >&6; }
16400    BUILD_HOTSPOT=false
16401  fi
16402
16403  JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
16404
16405
16406###############################################################################
16407#
16408# Setup the toolchain (compilers etc), i.e. the tools that need to be
16409# cross-compilation aware.
16410#
16411###############################################################################
16412
16413
16414  ###############################################################################
16415  #
16416  # Configure the development tool paths and potential sysroot.
16417  #
16418  ac_ext=cpp
16419ac_cpp='$CXXCPP $CPPFLAGS'
16420ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16421ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16422ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16423
16424
16425  # The option used to specify the target .o,.a or .so file.
16426  # When compiling, how to specify the to be created object file.
16427  CC_OUT_OPTION='-o$(SPACE)'
16428  # When linking, how to specify the to be created executable.
16429  EXE_OUT_OPTION='-o$(SPACE)'
16430  # When linking, how to specify the to be created dynamically linkable library.
16431  LD_OUT_OPTION='-o$(SPACE)'
16432  # When archiving, how to specify the to be create static archive for object files.
16433  AR_OUT_OPTION='rcs$(SPACE)'
16434
16435
16436
16437
16438
16439# Locate the actual tools
16440
16441
16442# Check whether --with-jtreg was given.
16443if test "${with_jtreg+set}" = set; then :
16444  withval=$with_jtreg;
16445else
16446  with_jtreg=no
16447fi
16448
16449
16450  if test "x$with_jtreg" = xno; then
16451    # jtreg disabled
16452    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
16453$as_echo_n "checking for jtreg... " >&6; }
16454    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16455$as_echo "no" >&6; }
16456  else
16457    if test "x$with_jtreg" != xyes; then
16458      # with path specified.
16459      JT_HOME="$with_jtreg"
16460    fi
16461
16462    if test "x$JT_HOME" != x; then
16463      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
16464$as_echo_n "checking for jtreg... " >&6; }
16465
16466      # use JT_HOME enviroment var.
16467
16468  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16469
16470  # Input might be given as Windows format, start by converting to
16471  # unix format.
16472  path="$JT_HOME"
16473  new_path=`$CYGPATH -u "$path"`
16474
16475  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16476  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16477  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16478  # "foo.exe" is OK but "foo" is an error.
16479  #
16480  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16481  # It is also a way to make sure we got the proper file name for the real test later on.
16482  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16483  if test "x$test_shortpath" = x; then
16484    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
16485$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
16486    as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
16487  fi
16488
16489  # Call helper function which possibly converts this using DOS-style short mode.
16490  # If so, the updated path is stored in $new_path.
16491
16492  input_path="$new_path"
16493  # Check if we need to convert this using DOS-style short mode. If the path
16494  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16495  # take no chances and rewrite it.
16496  # Note: m4 eats our [], so we need to use [ and ] instead.
16497  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16498  if test "x$has_forbidden_chars" != x; then
16499    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16500    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16501    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16502    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16503      # Going to short mode and back again did indeed matter. Since short mode is
16504      # case insensitive, let's make it lowercase to improve readability.
16505      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16506      # Now convert it back to Unix-stile (cygpath)
16507      input_path=`$CYGPATH -u "$shortmode_path"`
16508      new_path="$input_path"
16509    fi
16510  fi
16511
16512  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16513  if test "x$test_cygdrive_prefix" = x; then
16514    # As a simple fix, exclude /usr/bin since it's not a real path.
16515    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16516      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16517      # a path prefixed by /cygdrive for fixpath to work.
16518      new_path="$CYGWIN_ROOT_PATH$input_path"
16519    fi
16520  fi
16521
16522
16523  if test "x$path" != "x$new_path"; then
16524    JT_HOME="$new_path"
16525    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
16526$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
16527  fi
16528
16529  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16530
16531  path="$JT_HOME"
16532  has_colon=`$ECHO $path | $GREP ^.:`
16533  new_path="$path"
16534  if test "x$has_colon" = x; then
16535    # Not in mixed or Windows style, start by that.
16536    new_path=`cmd //c echo $path`
16537  fi
16538
16539
16540  input_path="$new_path"
16541  # Check if we need to convert this using DOS-style short mode. If the path
16542  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16543  # take no chances and rewrite it.
16544  # Note: m4 eats our [], so we need to use [ and ] instead.
16545  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16546  if test "x$has_forbidden_chars" != x; then
16547    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16548    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16549  fi
16550
16551
16552  windows_path="$new_path"
16553  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16554    unix_path=`$CYGPATH -u "$windows_path"`
16555    new_path="$unix_path"
16556  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16557    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16558    new_path="$unix_path"
16559  fi
16560
16561  if test "x$path" != "x$new_path"; then
16562    JT_HOME="$new_path"
16563    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
16564$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
16565  fi
16566
16567  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16568  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16569
16570  else
16571    # We're on a posix platform. Hooray! :)
16572    path="$JT_HOME"
16573    has_space=`$ECHO "$path" | $GREP " "`
16574    if test "x$has_space" != x; then
16575      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
16576$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
16577      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16578    fi
16579
16580    # Use eval to expand a potential ~
16581    eval path="$path"
16582    if test ! -f "$path" && test ! -d "$path"; then
16583      as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
16584    fi
16585
16586    JT_HOME="`cd "$path"; $THEPWDCMD -L`"
16587  fi
16588
16589
16590      # jtreg win32 script works for everybody
16591      JTREGEXE="$JT_HOME/win32/bin/jtreg"
16592
16593      if test ! -f "$JTREGEXE"; then
16594        as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
16595      fi
16596
16597      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
16598$as_echo "$JTREGEXE" >&6; }
16599    else
16600      # try to find jtreg on path
16601
16602  for ac_prog in jtreg
16603do
16604  # Extract the first word of "$ac_prog", so it can be a program name with args.
16605set dummy $ac_prog; ac_word=$2
16606{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16607$as_echo_n "checking for $ac_word... " >&6; }
16608if ${ac_cv_path_JTREGEXE+:} false; then :
16609  $as_echo_n "(cached) " >&6
16610else
16611  case $JTREGEXE in
16612  [\\/]* | ?:[\\/]*)
16613  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
16614  ;;
16615  *)
16616  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16617for as_dir in $PATH
16618do
16619  IFS=$as_save_IFS
16620  test -z "$as_dir" && as_dir=.
16621    for ac_exec_ext in '' $ac_executable_extensions; do
16622  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16623    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
16624    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16625    break 2
16626  fi
16627done
16628  done
16629IFS=$as_save_IFS
16630
16631  ;;
16632esac
16633fi
16634JTREGEXE=$ac_cv_path_JTREGEXE
16635if test -n "$JTREGEXE"; then
16636  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
16637$as_echo "$JTREGEXE" >&6; }
16638else
16639  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16640$as_echo "no" >&6; }
16641fi
16642
16643
16644  test -n "$JTREGEXE" && break
16645done
16646
16647
16648  if test "x$JTREGEXE" = x; then
16649    if test "xjtreg" = x; then
16650      PROG_NAME=jtregexe
16651    else
16652      PROG_NAME=jtreg
16653    fi
16654    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
16655$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
16656    as_fn_error $? "Cannot continue" "$LINENO" 5
16657  fi
16658
16659
16660      JT_HOME="`$DIRNAME $JTREGEXE`"
16661    fi
16662  fi
16663
16664
16665
16666
16667
16668  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
16669
16670  # Store path to cygwin link.exe to help excluding it when searching for
16671  # VS linker. This must be done before changing the PATH when looking for VS.
16672  # Extract the first word of "link", so it can be a program name with args.
16673set dummy link; ac_word=$2
16674{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16675$as_echo_n "checking for $ac_word... " >&6; }
16676if ${ac_cv_path_CYGWIN_LINK+:} false; then :
16677  $as_echo_n "(cached) " >&6
16678else
16679  case $CYGWIN_LINK in
16680  [\\/]* | ?:[\\/]*)
16681  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
16682  ;;
16683  *)
16684  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16685for as_dir in $PATH
16686do
16687  IFS=$as_save_IFS
16688  test -z "$as_dir" && as_dir=.
16689    for ac_exec_ext in '' $ac_executable_extensions; do
16690  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16691    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
16692    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16693    break 2
16694  fi
16695done
16696  done
16697IFS=$as_save_IFS
16698
16699  ;;
16700esac
16701fi
16702CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
16703if test -n "$CYGWIN_LINK"; then
16704  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
16705$as_echo "$CYGWIN_LINK" >&6; }
16706else
16707  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16708$as_echo "no" >&6; }
16709fi
16710
16711
16712  if test "x$CYGWIN_LINK" != x; then
16713    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
16714$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
16715    "$CYGWIN_LINK" --version > /dev/null
16716    if test $? -eq 0 ; then
16717      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16718$as_echo "yes" >&6; }
16719    else
16720      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16721$as_echo "no" >&6; }
16722      # This might be the VS linker. Don't exclude it later on.
16723      CYGWIN_LINK=""
16724    fi
16725  fi
16726
16727  # First-hand choice is to locate and run the vsvars bat file.
16728
16729  if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16730    VCVARSFILE="vc/bin/vcvars32.bat"
16731  else
16732    VCVARSFILE="vc/bin/amd64/vcvars64.bat"
16733  fi
16734
16735  VS_ENV_CMD=""
16736  VS_ENV_ARGS=""
16737  if test "x$with_toolsdir" != x; then
16738
16739  if test "x$VS_ENV_CMD" = x; then
16740    VS100BASE="$with_toolsdir/../.."
16741    METHOD="--with-tools-dir"
16742
16743  windows_path="$VS100BASE"
16744  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16745    unix_path=`$CYGPATH -u "$windows_path"`
16746    VS100BASE="$unix_path"
16747  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16748    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16749    VS100BASE="$unix_path"
16750  fi
16751
16752    if test -d "$VS100BASE"; then
16753      if test -f "$VS100BASE/$VCVARSFILE"; then
16754        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16755$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16756        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16757      else
16758        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16759$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16760        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16761$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16762      fi
16763    fi
16764  fi
16765
16766  fi
16767
16768  if test "x$with_toolsdir" != x && test "x$VS_ENV_CMD" = x; then
16769    # Having specified an argument which is incorrect will produce an instant failure;
16770    # we should not go on looking
16771    { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&5
16772$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&6;}
16773    { $as_echo "$as_me:${as_lineno-$LINENO}: Please point to the VC/bin directory within the Visual Studio installation" >&5
16774$as_echo "$as_me: Please point to the VC/bin directory within the Visual Studio installation" >&6;}
16775    as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
16776  fi
16777
16778  if test "x$VS100COMNTOOLS" != x; then
16779
16780  if test "x$VS_ENV_CMD" = x; then
16781    VS100BASE="$VS100COMNTOOLS/../.."
16782    METHOD="VS100COMNTOOLS variable"
16783
16784  windows_path="$VS100BASE"
16785  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16786    unix_path=`$CYGPATH -u "$windows_path"`
16787    VS100BASE="$unix_path"
16788  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16789    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16790    VS100BASE="$unix_path"
16791  fi
16792
16793    if test -d "$VS100BASE"; then
16794      if test -f "$VS100BASE/$VCVARSFILE"; then
16795        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16796$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16797        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16798      else
16799        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16800$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16801        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16802$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16803      fi
16804    fi
16805  fi
16806
16807  fi
16808  if test "x$PROGRAMFILES" != x; then
16809
16810  if test "x$VS_ENV_CMD" = x; then
16811    VS100BASE="$PROGRAMFILES/Microsoft Visual Studio 10.0"
16812    METHOD="well-known name"
16813
16814  windows_path="$VS100BASE"
16815  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16816    unix_path=`$CYGPATH -u "$windows_path"`
16817    VS100BASE="$unix_path"
16818  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16819    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16820    VS100BASE="$unix_path"
16821  fi
16822
16823    if test -d "$VS100BASE"; then
16824      if test -f "$VS100BASE/$VCVARSFILE"; then
16825        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16826$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16827        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16828      else
16829        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16830$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16831        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16832$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16833      fi
16834    fi
16835  fi
16836
16837  fi
16838
16839  if test "x$VS_ENV_CMD" = x; then
16840    VS100BASE="C:/Program Files/Microsoft Visual Studio 10.0"
16841    METHOD="well-known name"
16842
16843  windows_path="$VS100BASE"
16844  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16845    unix_path=`$CYGPATH -u "$windows_path"`
16846    VS100BASE="$unix_path"
16847  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16848    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16849    VS100BASE="$unix_path"
16850  fi
16851
16852    if test -d "$VS100BASE"; then
16853      if test -f "$VS100BASE/$VCVARSFILE"; then
16854        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16855$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16856        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16857      else
16858        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16859$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16860        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16861$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16862      fi
16863    fi
16864  fi
16865
16866
16867  if test "x$VS_ENV_CMD" = x; then
16868    VS100BASE="C:/Program Files (x86)/Microsoft Visual Studio 10.0"
16869    METHOD="well-known name"
16870
16871  windows_path="$VS100BASE"
16872  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16873    unix_path=`$CYGPATH -u "$windows_path"`
16874    VS100BASE="$unix_path"
16875  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16876    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16877    VS100BASE="$unix_path"
16878  fi
16879
16880    if test -d "$VS100BASE"; then
16881      if test -f "$VS100BASE/$VCVARSFILE"; then
16882        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16883$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16884        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16885      else
16886        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16887$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16888        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16889$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16890      fi
16891    fi
16892  fi
16893
16894
16895  if test "x$ProgramW6432" != x; then
16896
16897  if test "x$VS_ENV_CMD" = x; then
16898    WIN_SDK_BASE="$ProgramW6432/Microsoft SDKs/Windows/v7.1/Bin"
16899    METHOD="well-known name"
16900
16901  windows_path="$WIN_SDK_BASE"
16902  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16903    unix_path=`$CYGPATH -u "$windows_path"`
16904    WIN_SDK_BASE="$unix_path"
16905  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16906    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16907    WIN_SDK_BASE="$unix_path"
16908  fi
16909
16910    if test -d "$WIN_SDK_BASE"; then
16911      # There have been cases of partial or broken SDK installations. A missing
16912      # lib dir is not going to work.
16913      if test ! -d "$WIN_SDK_BASE/../lib"; then
16914        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16915$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16916        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16917$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16918      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16919        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16920$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16921        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16922        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16923          VS_ENV_ARGS="/x86"
16924        else
16925          VS_ENV_ARGS="/x64"
16926        fi
16927      else
16928        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16929$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16930        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16931$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16932      fi
16933    fi
16934  fi
16935
16936  fi
16937  if test "x$PROGRAMW6432" != x; then
16938
16939  if test "x$VS_ENV_CMD" = x; then
16940    WIN_SDK_BASE="$PROGRAMW6432/Microsoft SDKs/Windows/v7.1/Bin"
16941    METHOD="well-known name"
16942
16943  windows_path="$WIN_SDK_BASE"
16944  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16945    unix_path=`$CYGPATH -u "$windows_path"`
16946    WIN_SDK_BASE="$unix_path"
16947  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16948    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16949    WIN_SDK_BASE="$unix_path"
16950  fi
16951
16952    if test -d "$WIN_SDK_BASE"; then
16953      # There have been cases of partial or broken SDK installations. A missing
16954      # lib dir is not going to work.
16955      if test ! -d "$WIN_SDK_BASE/../lib"; then
16956        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16957$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16958        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16959$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16960      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16961        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16962$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16963        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16964        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16965          VS_ENV_ARGS="/x86"
16966        else
16967          VS_ENV_ARGS="/x64"
16968        fi
16969      else
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, SetEnv.Cmd is missing. Ignoring" >&5
16973$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16974      fi
16975    fi
16976  fi
16977
16978  fi
16979  if test "x$PROGRAMFILES" != x; then
16980
16981  if test "x$VS_ENV_CMD" = x; then
16982    WIN_SDK_BASE="$PROGRAMFILES/Microsoft SDKs/Windows/v7.1/Bin"
16983    METHOD="well-known name"
16984
16985  windows_path="$WIN_SDK_BASE"
16986  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16987    unix_path=`$CYGPATH -u "$windows_path"`
16988    WIN_SDK_BASE="$unix_path"
16989  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16990    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16991    WIN_SDK_BASE="$unix_path"
16992  fi
16993
16994    if test -d "$WIN_SDK_BASE"; then
16995      # There have been cases of partial or broken SDK installations. A missing
16996      # lib dir is not going to work.
16997      if test ! -d "$WIN_SDK_BASE/../lib"; then
16998        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16999$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17000        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
17001$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
17002      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
17003        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17004$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17005        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
17006        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17007          VS_ENV_ARGS="/x86"
17008        else
17009          VS_ENV_ARGS="/x64"
17010        fi
17011      else
17012        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17013$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17014        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
17015$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
17016      fi
17017    fi
17018  fi
17019
17020  fi
17021
17022  if test "x$VS_ENV_CMD" = x; then
17023    WIN_SDK_BASE="C:/Program Files/Microsoft SDKs/Windows/v7.1/Bin"
17024    METHOD="well-known name"
17025
17026  windows_path="$WIN_SDK_BASE"
17027  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17028    unix_path=`$CYGPATH -u "$windows_path"`
17029    WIN_SDK_BASE="$unix_path"
17030  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17031    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17032    WIN_SDK_BASE="$unix_path"
17033  fi
17034
17035    if test -d "$WIN_SDK_BASE"; then
17036      # There have been cases of partial or broken SDK installations. A missing
17037      # lib dir is not going to work.
17038      if test ! -d "$WIN_SDK_BASE/../lib"; then
17039        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17040$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17041        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
17042$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
17043      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
17044        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17045$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17046        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
17047        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17048          VS_ENV_ARGS="/x86"
17049        else
17050          VS_ENV_ARGS="/x64"
17051        fi
17052      else
17053        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17054$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17055        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
17056$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
17057      fi
17058    fi
17059  fi
17060
17061
17062  if test "x$VS_ENV_CMD" = x; then
17063    WIN_SDK_BASE="C:/Program Files (x86)/Microsoft SDKs/Windows/v7.1/Bin"
17064    METHOD="well-known name"
17065
17066  windows_path="$WIN_SDK_BASE"
17067  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17068    unix_path=`$CYGPATH -u "$windows_path"`
17069    WIN_SDK_BASE="$unix_path"
17070  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17071    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17072    WIN_SDK_BASE="$unix_path"
17073  fi
17074
17075    if test -d "$WIN_SDK_BASE"; then
17076      # There have been cases of partial or broken SDK installations. A missing
17077      # lib dir is not going to work.
17078      if test ! -d "$WIN_SDK_BASE/../lib"; then
17079        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17080$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17081        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
17082$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
17083      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
17084        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17085$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17086        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
17087        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17088          VS_ENV_ARGS="/x86"
17089        else
17090          VS_ENV_ARGS="/x64"
17091        fi
17092      else
17093        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17094$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17095        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
17096$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
17097      fi
17098    fi
17099  fi
17100
17101
17102  if test "x$VS_ENV_CMD" != x; then
17103    # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
17104
17105  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17106
17107  # First separate the path from the arguments. This will split at the first
17108  # space.
17109  complete="$VS_ENV_CMD"
17110  path="${complete%% *}"
17111  tmp="$complete EOL"
17112  arguments="${tmp#* }"
17113
17114  # Input might be given as Windows format, start by converting to
17115  # unix format.
17116  new_path=`$CYGPATH -u "$path"`
17117
17118  # Now try to locate executable using which
17119  new_path=`$WHICH "$new_path" 2> /dev/null`
17120  # bat and cmd files are not always considered executable in cygwin causing which
17121  # to not find them
17122  if test "x$new_path" = x \
17123      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17124      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17125    new_path=`$CYGPATH -u "$path"`
17126  fi
17127  if test "x$new_path" = x; then
17128    # Oops. Which didn't find the executable.
17129    # The splitting of arguments from the executable at a space might have been incorrect,
17130    # since paths with space are more likely in Windows. Give it another try with the whole
17131    # argument.
17132    path="$complete"
17133    arguments="EOL"
17134    new_path=`$CYGPATH -u "$path"`
17135    new_path=`$WHICH "$new_path" 2> /dev/null`
17136    # bat and cmd files are not always considered executable in cygwin causing which
17137    # to not find them
17138    if test "x$new_path" = x \
17139        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17140        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17141      new_path=`$CYGPATH -u "$path"`
17142    fi
17143    if test "x$new_path" = x; then
17144      # It's still not found. Now this is an unrecoverable error.
17145      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
17146$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
17147      has_space=`$ECHO "$complete" | $GREP " "`
17148      if test "x$has_space" != x; then
17149        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17150$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17151      fi
17152      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
17153    fi
17154  fi
17155
17156  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17157  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17158  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17159  # "foo.exe" is OK but "foo" is an error.
17160  #
17161  # This test is therefore slightly more accurate than "test -f" to check for file presence.
17162  # It is also a way to make sure we got the proper file name for the real test later on.
17163  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17164  if test "x$test_shortpath" = x; then
17165    # Short path failed, file does not exist as specified.
17166    # Try adding .exe or .cmd
17167    if test -f "${new_path}.exe"; then
17168      input_to_shortpath="${new_path}.exe"
17169    elif test -f "${new_path}.cmd"; then
17170      input_to_shortpath="${new_path}.cmd"
17171    else
17172      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
17173$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
17174      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17175$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17176      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
17177    fi
17178  else
17179    input_to_shortpath="$new_path"
17180  fi
17181
17182  # Call helper function which possibly converts this using DOS-style short mode.
17183  # If so, the updated path is stored in $new_path.
17184  new_path="$input_to_shortpath"
17185
17186  input_path="$input_to_shortpath"
17187  # Check if we need to convert this using DOS-style short mode. If the path
17188  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17189  # take no chances and rewrite it.
17190  # Note: m4 eats our [], so we need to use [ and ] instead.
17191  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17192  if test "x$has_forbidden_chars" != x; then
17193    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17194    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17195    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17196    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17197      # Going to short mode and back again did indeed matter. Since short mode is
17198      # case insensitive, let's make it lowercase to improve readability.
17199      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17200      # Now convert it back to Unix-stile (cygpath)
17201      input_path=`$CYGPATH -u "$shortmode_path"`
17202      new_path="$input_path"
17203    fi
17204  fi
17205
17206  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17207  if test "x$test_cygdrive_prefix" = x; then
17208    # As a simple fix, exclude /usr/bin since it's not a real path.
17209    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17210      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17211      # a path prefixed by /cygdrive for fixpath to work.
17212      new_path="$CYGWIN_ROOT_PATH$input_path"
17213    fi
17214  fi
17215
17216  # remove trailing .exe if any
17217  new_path="${new_path/%.exe/}"
17218
17219  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17220
17221  # First separate the path from the arguments. This will split at the first
17222  # space.
17223  complete="$VS_ENV_CMD"
17224  path="${complete%% *}"
17225  tmp="$complete EOL"
17226  arguments="${tmp#* }"
17227
17228  # Input might be given as Windows format, start by converting to
17229  # unix format.
17230  new_path="$path"
17231
17232  windows_path="$new_path"
17233  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17234    unix_path=`$CYGPATH -u "$windows_path"`
17235    new_path="$unix_path"
17236  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17237    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17238    new_path="$unix_path"
17239  fi
17240
17241
17242  # Now try to locate executable using which
17243  new_path=`$WHICH "$new_path" 2> /dev/null`
17244
17245  if test "x$new_path" = x; then
17246    # Oops. Which didn't find the executable.
17247    # The splitting of arguments from the executable at a space might have been incorrect,
17248    # since paths with space are more likely in Windows. Give it another try with the whole
17249    # argument.
17250    path="$complete"
17251    arguments="EOL"
17252    new_path="$path"
17253
17254  windows_path="$new_path"
17255  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17256    unix_path=`$CYGPATH -u "$windows_path"`
17257    new_path="$unix_path"
17258  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17259    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17260    new_path="$unix_path"
17261  fi
17262
17263
17264    new_path=`$WHICH "$new_path" 2> /dev/null`
17265
17266    if test "x$new_path" = x; then
17267      # It's still not found. Now this is an unrecoverable error.
17268      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
17269$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
17270      has_space=`$ECHO "$complete" | $GREP " "`
17271      if test "x$has_space" != x; then
17272        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17273$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17274      fi
17275      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
17276    fi
17277  fi
17278
17279  # Now new_path has a complete unix path to the binary
17280  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17281    # Keep paths in /bin as-is, but remove trailing .exe if any
17282    new_path="${new_path/%.exe/}"
17283    # Do not save /bin paths to all_fixpath_prefixes!
17284  else
17285    # Not in mixed or Windows style, start by that.
17286    new_path=`cmd //c echo $new_path`
17287
17288  input_path="$new_path"
17289  # Check if we need to convert this using DOS-style short mode. If the path
17290  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17291  # take no chances and rewrite it.
17292  # Note: m4 eats our [], so we need to use [ and ] instead.
17293  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17294  if test "x$has_forbidden_chars" != x; then
17295    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17296    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17297  fi
17298
17299    # Output is in $new_path
17300
17301  windows_path="$new_path"
17302  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17303    unix_path=`$CYGPATH -u "$windows_path"`
17304    new_path="$unix_path"
17305  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17306    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17307    new_path="$unix_path"
17308  fi
17309
17310    # remove trailing .exe if any
17311    new_path="${new_path/%.exe/}"
17312
17313    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17314    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17315  fi
17316
17317  else
17318    # We're on a posix platform. Hooray! :)
17319    # First separate the path from the arguments. This will split at the first
17320    # space.
17321    complete="$VS_ENV_CMD"
17322    path="${complete%% *}"
17323    tmp="$complete EOL"
17324    arguments="${tmp#* }"
17325
17326    # Cannot rely on the command "which" here since it doesn't always work.
17327    is_absolute_path=`$ECHO "$path" | $GREP ^/`
17328    if test -z "$is_absolute_path"; then
17329      # Path to executable is not absolute. Find it.
17330      IFS_save="$IFS"
17331      IFS=:
17332      for p in $PATH; do
17333        if test -f "$p/$path" && test -x "$p/$path"; then
17334          new_path="$p/$path"
17335          break
17336        fi
17337      done
17338      IFS="$IFS_save"
17339    else
17340      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&5
17341$as_echo "$as_me: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&6;}
17342      new_path="$path"
17343    fi
17344
17345    if test "x$new_path" = x; then
17346      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
17347$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
17348      has_space=`$ECHO "$complete" | $GREP " "`
17349      if test "x$has_space" != x; then
17350        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17351$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17352      fi
17353      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
17354    fi
17355  fi
17356
17357  # Now join together the path and the arguments once again
17358  if test "x$arguments" != xEOL; then
17359    new_complete="$new_path ${arguments% *}"
17360  else
17361    new_complete="$new_path"
17362  fi
17363
17364  if test "x$complete" != "x$new_complete"; then
17365    VS_ENV_CMD="$new_complete"
17366    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
17367$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
17368  fi
17369
17370
17371    # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
17372    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
17373$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
17374    cd $OUTPUT_ROOT
17375    # FIXME: The code betweeen ---- was inlined from a separate script and is not properly adapted
17376    # to autoconf standards.
17377
17378    #----
17379
17380    # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment)
17381    # but calculate the difference in Cygwin environment before/after running it and then
17382    # apply the diff.
17383
17384    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
17385      _vs10varsall=`cygpath -a -m -s "$VS_ENV_CMD"`
17386      _dosvs10varsall=`cygpath -a -w -s $_vs10varsall`
17387      _dosbash=`cygpath -a -w -s \`which bash\`.*`
17388    else
17389      _dosvs10varsall=`cmd //c echo $VS_ENV_CMD`
17390      _dosbash=`cmd //c echo \`which bash\``
17391    fi
17392
17393    # generate the set of exported vars before/after the vs10 setup
17394    $ECHO "@echo off"                                           >  localdevenvtmp.bat
17395    $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export0" >> localdevenvtmp.bat
17396    $ECHO "call $_dosvs10varsall $VS_ENV_ARGS"                  >> localdevenvtmp.bat
17397    $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export1" >> localdevenvtmp.bat
17398
17399    # Now execute the newly created bat file.
17400    # The | cat is to stop SetEnv.Cmd to mess with system colors on msys
17401    cmd /c localdevenvtmp.bat | cat
17402
17403    # apply the diff (less some non-vs10 vars named by "!")
17404    $SORT localdevenvtmp.export0 | $GREP -v "!" > localdevenvtmp.export0.sort
17405    $SORT localdevenvtmp.export1 | $GREP -v "!" > localdevenvtmp.export1.sort
17406    $COMM -1 -3 localdevenvtmp.export0.sort localdevenvtmp.export1.sort > localdevenv.sh
17407
17408    # cleanup
17409    $RM localdevenvtmp*
17410    #----
17411    cd $CURDIR
17412    if test ! -s $OUTPUT_ROOT/localdevenv.sh; then
17413      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17414$as_echo "no" >&6; }
17415      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
17416$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
17417      { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
17418$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
17419      { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
17420$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
17421      as_fn_error $? "Cannot continue" "$LINENO" 5
17422    fi
17423
17424    # Now set all paths and other env variables. This will allow the rest of
17425    # the configure script to find and run the compiler in the proper way.
17426    { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
17427$as_echo "$as_me: Setting extracted environment variables" >&6;}
17428    . $OUTPUT_ROOT/localdevenv.sh
17429  else
17430    # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
17431    { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
17432$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
17433  fi
17434
17435  # At this point, we should have corrent variables in the environment, or we can't continue.
17436  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
17437$as_echo_n "checking for Visual Studio variables... " >&6; }
17438
17439  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x || test "x$WINDOWSSDKDIR" != x; then
17440    if test "x$INCLUDE" = x || test "x$LIB" = x; then
17441      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
17442$as_echo "present but broken" >&6; }
17443      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
17444    else
17445      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
17446$as_echo "ok" >&6; }
17447      # Remove any trailing \ from INCLUDE and LIB to avoid trouble in spec.gmk.
17448      VS_INCLUDE=`$ECHO "$INCLUDE" | $SED 's/\\\\$//'`
17449      VS_LIB=`$ECHO "$LIB" | $SED 's/\\\\$//'`
17450      # Remove any paths containing # (typically F#) as that messes up make
17451      PATH=`$ECHO "$PATH" | $SED 's/[^:#]*#[^:]*://g'`
17452      VS_PATH="$PATH"
17453
17454
17455
17456    fi
17457  else
17458    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17459$as_echo "not found" >&6; }
17460
17461    if test "x$VS_ENV_CMD" = x; then
17462      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
17463$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
17464      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
17465$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
17466    else
17467      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
17468$as_echo "$as_me: Running the extraction script failed." >&6;}
17469    fi
17470    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
17471$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
17472    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
17473$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
17474    as_fn_error $? "Cannot continue" "$LINENO" 5
17475  fi
17476
17477  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
17478$as_echo_n "checking for msvcr100.dll... " >&6; }
17479
17480# Check whether --with-msvcr-dll was given.
17481if test "${with_msvcr_dll+set}" = set; then :
17482  withval=$with_msvcr_dll;
17483fi
17484
17485  if test "x$with_msvcr_dll" != x; then
17486    MSVCR_DLL="$with_msvcr_dll"
17487  else
17488    if test "x$VCINSTALLDIR" != x; then
17489      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
17490        MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | grep x64 | head --lines 1`
17491      else
17492        MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | grep x86 | grep -v ia64 | grep -v x64 | head --lines 1`
17493        if test "x$MSVCR_DLL" = x; then
17494          MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | head --lines 1`
17495        fi
17496      fi
17497      if test "x$MSVCR_DLL" != x; then
17498        { $as_echo "$as_me:${as_lineno-$LINENO}: msvcr100.dll found in VCINSTALLDIR: $VCINSTALLDIR" >&5
17499$as_echo "$as_me: msvcr100.dll found in VCINSTALLDIR: $VCINSTALLDIR" >&6;}
17500      else
17501        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: msvcr100.dll not found in VCINSTALLDIR: $VCINSTALLDIR" >&5
17502$as_echo "$as_me: Warning: msvcr100.dll not found in VCINSTALLDIR: $VCINSTALLDIR" >&6;}
17503      fi
17504    fi
17505    # Try some fallback alternatives
17506    if test "x$MSVCR_DLL" = x; then
17507      # If visual studio express is installed, there is usually one with the debugger
17508      if test "x$VS100COMNTOOLS" != x; then
17509        if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
17510          MSVCR_DLL=`find "$VS100COMNTOOLS/.." -name msvcr100.dll | grep -i x64 | head --lines 1`
17511          { $as_echo "$as_me:${as_lineno-$LINENO}: msvcr100.dll found in $VS100COMNTOOLS..: $VS100COMNTOOLS.." >&5
17512$as_echo "$as_me: msvcr100.dll found in $VS100COMNTOOLS..: $VS100COMNTOOLS.." >&6;}
17513        fi
17514      fi
17515    fi
17516    if test "x$MSVCR_DLL" = x; then
17517      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17518        # Fallback for 32bit builds, look in the windows directory.
17519        if test -f "$SYSTEMROOT/system32/msvcr100.dll"; then
17520          { $as_echo "$as_me:${as_lineno-$LINENO}: msvcr100.dll found in $SYSTEMROOT/system32" >&5
17521$as_echo "$as_me: msvcr100.dll found in $SYSTEMROOT/system32" >&6;}
17522          MSVCR_DLL="$SYSTEMROOT/system32/msvcr100.dll"
17523        fi
17524      fi
17525    fi
17526  fi
17527  if test "x$MSVCR_DLL" = x; then
17528    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17529$as_echo "no" >&6; }
17530    as_fn_error $? "Could not find msvcr100.dll !" "$LINENO" 5
17531  fi
17532  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
17533$as_echo "$MSVCR_DLL" >&6; }
17534
17535  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17536
17537  # Input might be given as Windows format, start by converting to
17538  # unix format.
17539  path="$MSVCR_DLL"
17540  new_path=`$CYGPATH -u "$path"`
17541
17542  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17543  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17544  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17545  # "foo.exe" is OK but "foo" is an error.
17546  #
17547  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17548  # It is also a way to make sure we got the proper file name for the real test later on.
17549  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17550  if test "x$test_shortpath" = x; then
17551    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
17552$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
17553    as_fn_error $? "Cannot locate the the path of MSVCR_DLL" "$LINENO" 5
17554  fi
17555
17556  # Call helper function which possibly converts this using DOS-style short mode.
17557  # If so, the updated path is stored in $new_path.
17558
17559  input_path="$new_path"
17560  # Check if we need to convert this using DOS-style short mode. If the path
17561  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17562  # take no chances and rewrite it.
17563  # Note: m4 eats our [], so we need to use [ and ] instead.
17564  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17565  if test "x$has_forbidden_chars" != x; then
17566    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17567    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17568    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17569    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17570      # Going to short mode and back again did indeed matter. Since short mode is
17571      # case insensitive, let's make it lowercase to improve readability.
17572      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17573      # Now convert it back to Unix-stile (cygpath)
17574      input_path=`$CYGPATH -u "$shortmode_path"`
17575      new_path="$input_path"
17576    fi
17577  fi
17578
17579  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17580  if test "x$test_cygdrive_prefix" = x; then
17581    # As a simple fix, exclude /usr/bin since it's not a real path.
17582    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17583      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17584      # a path prefixed by /cygdrive for fixpath to work.
17585      new_path="$CYGWIN_ROOT_PATH$input_path"
17586    fi
17587  fi
17588
17589
17590  if test "x$path" != "x$new_path"; then
17591    MSVCR_DLL="$new_path"
17592    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
17593$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
17594  fi
17595
17596  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17597
17598  path="$MSVCR_DLL"
17599  has_colon=`$ECHO $path | $GREP ^.:`
17600  new_path="$path"
17601  if test "x$has_colon" = x; then
17602    # Not in mixed or Windows style, start by that.
17603    new_path=`cmd //c echo $path`
17604  fi
17605
17606
17607  input_path="$new_path"
17608  # Check if we need to convert this using DOS-style short mode. If the path
17609  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17610  # take no chances and rewrite it.
17611  # Note: m4 eats our [], so we need to use [ and ] instead.
17612  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17613  if test "x$has_forbidden_chars" != x; then
17614    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17615    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17616  fi
17617
17618
17619  windows_path="$new_path"
17620  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17621    unix_path=`$CYGPATH -u "$windows_path"`
17622    new_path="$unix_path"
17623  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17624    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17625    new_path="$unix_path"
17626  fi
17627
17628  if test "x$path" != "x$new_path"; then
17629    MSVCR_DLL="$new_path"
17630    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
17631$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
17632  fi
17633
17634  # Save the first 10 bytes of this path to the storage, so fixpath can work.
17635  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17636
17637  else
17638    # We're on a posix platform. Hooray! :)
17639    path="$MSVCR_DLL"
17640    has_space=`$ECHO "$path" | $GREP " "`
17641    if test "x$has_space" != x; then
17642      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
17643$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
17644      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17645    fi
17646
17647    # Use eval to expand a potential ~
17648    eval path="$path"
17649    if test ! -f "$path" && test ! -d "$path"; then
17650      as_fn_error $? "The path of MSVCR_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
17651    fi
17652
17653    MSVCR_DLL="`cd "$path"; $THEPWDCMD -L`"
17654  fi
17655
17656
17657
17658
17659# Check whether --with-dxsdk was given.
17660if test "${with_dxsdk+set}" = set; then :
17661  withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
17662$as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
17663fi
17664
17665
17666
17667
17668# Check whether --with-dxsdk-lib was given.
17669if test "${with_dxsdk_lib+set}" = set; then :
17670  withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
17671$as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
17672fi
17673
17674
17675
17676
17677# Check whether --with-dxsdk-include was given.
17678if test "${with_dxsdk_include+set}" = set; then :
17679  withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
17680$as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
17681fi
17682
17683
17684  fi
17685
17686
17687
17688  # If --build AND --host is set, then the configure script will find any
17689  # cross compilation tools in the PATH. Cross compilation tools
17690  # follows the cross compilation standard where they are prefixed with ${host}.
17691  # For example the binary i686-sun-solaris2.10-gcc
17692  # will cross compile for i686-sun-solaris2.10
17693  # If neither of build and host is not set, then build=host and the
17694  # default compiler found in the path will be used.
17695  # Setting only --host, does not seem to be really supported.
17696  # Please set both --build and --host if you want to cross compile.
17697
17698  if test "x$COMPILE_TYPE" = "xcross"; then
17699    # Now we to find a C/C++ compiler that can build executables for the build
17700    # platform. We can't use the AC_PROG_CC macro, since it can only be used
17701    # once. Also, we need to do this before adding a tools dir to the path,
17702    # otherwise we might pick up cross-compilers which don't use standard naming.
17703    # Otherwise, we'll set the BUILD_tools to the native tools, but that'll have
17704    # to wait until they are properly discovered.
17705    for ac_prog in cl cc gcc
17706do
17707  # Extract the first word of "$ac_prog", so it can be a program name with args.
17708set dummy $ac_prog; ac_word=$2
17709{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17710$as_echo_n "checking for $ac_word... " >&6; }
17711if ${ac_cv_path_BUILD_CC+:} false; then :
17712  $as_echo_n "(cached) " >&6
17713else
17714  case $BUILD_CC in
17715  [\\/]* | ?:[\\/]*)
17716  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
17717  ;;
17718  *)
17719  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17720for as_dir in $PATH
17721do
17722  IFS=$as_save_IFS
17723  test -z "$as_dir" && as_dir=.
17724    for ac_exec_ext in '' $ac_executable_extensions; do
17725  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17726    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
17727    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17728    break 2
17729  fi
17730done
17731  done
17732IFS=$as_save_IFS
17733
17734  ;;
17735esac
17736fi
17737BUILD_CC=$ac_cv_path_BUILD_CC
17738if test -n "$BUILD_CC"; then
17739  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
17740$as_echo "$BUILD_CC" >&6; }
17741else
17742  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17743$as_echo "no" >&6; }
17744fi
17745
17746
17747  test -n "$BUILD_CC" && break
17748done
17749
17750
17751  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17752
17753  # First separate the path from the arguments. This will split at the first
17754  # space.
17755  complete="$BUILD_CC"
17756  path="${complete%% *}"
17757  tmp="$complete EOL"
17758  arguments="${tmp#* }"
17759
17760  # Input might be given as Windows format, start by converting to
17761  # unix format.
17762  new_path=`$CYGPATH -u "$path"`
17763
17764  # Now try to locate executable using which
17765  new_path=`$WHICH "$new_path" 2> /dev/null`
17766  # bat and cmd files are not always considered executable in cygwin causing which
17767  # to not find them
17768  if test "x$new_path" = x \
17769      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17770      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17771    new_path=`$CYGPATH -u "$path"`
17772  fi
17773  if test "x$new_path" = x; then
17774    # Oops. Which didn't find the executable.
17775    # The splitting of arguments from the executable at a space might have been incorrect,
17776    # since paths with space are more likely in Windows. Give it another try with the whole
17777    # argument.
17778    path="$complete"
17779    arguments="EOL"
17780    new_path=`$CYGPATH -u "$path"`
17781    new_path=`$WHICH "$new_path" 2> /dev/null`
17782    # bat and cmd files are not always considered executable in cygwin causing which
17783    # to not find them
17784    if test "x$new_path" = x \
17785        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17786        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17787      new_path=`$CYGPATH -u "$path"`
17788    fi
17789    if test "x$new_path" = x; then
17790      # It's still not found. Now this is an unrecoverable error.
17791      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
17792$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
17793      has_space=`$ECHO "$complete" | $GREP " "`
17794      if test "x$has_space" != x; then
17795        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17796$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17797      fi
17798      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
17799    fi
17800  fi
17801
17802  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17803  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17804  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17805  # "foo.exe" is OK but "foo" is an error.
17806  #
17807  # This test is therefore slightly more accurate than "test -f" to check for file presence.
17808  # It is also a way to make sure we got the proper file name for the real test later on.
17809  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17810  if test "x$test_shortpath" = x; then
17811    # Short path failed, file does not exist as specified.
17812    # Try adding .exe or .cmd
17813    if test -f "${new_path}.exe"; then
17814      input_to_shortpath="${new_path}.exe"
17815    elif test -f "${new_path}.cmd"; then
17816      input_to_shortpath="${new_path}.cmd"
17817    else
17818      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
17819$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
17820      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17821$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17822      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
17823    fi
17824  else
17825    input_to_shortpath="$new_path"
17826  fi
17827
17828  # Call helper function which possibly converts this using DOS-style short mode.
17829  # If so, the updated path is stored in $new_path.
17830  new_path="$input_to_shortpath"
17831
17832  input_path="$input_to_shortpath"
17833  # Check if we need to convert this using DOS-style short mode. If the path
17834  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17835  # take no chances and rewrite it.
17836  # Note: m4 eats our [], so we need to use [ and ] instead.
17837  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17838  if test "x$has_forbidden_chars" != x; then
17839    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17840    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17841    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17842    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17843      # Going to short mode and back again did indeed matter. Since short mode is
17844      # case insensitive, let's make it lowercase to improve readability.
17845      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17846      # Now convert it back to Unix-stile (cygpath)
17847      input_path=`$CYGPATH -u "$shortmode_path"`
17848      new_path="$input_path"
17849    fi
17850  fi
17851
17852  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17853  if test "x$test_cygdrive_prefix" = x; then
17854    # As a simple fix, exclude /usr/bin since it's not a real path.
17855    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17856      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17857      # a path prefixed by /cygdrive for fixpath to work.
17858      new_path="$CYGWIN_ROOT_PATH$input_path"
17859    fi
17860  fi
17861
17862  # remove trailing .exe if any
17863  new_path="${new_path/%.exe/}"
17864
17865  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17866
17867  # First separate the path from the arguments. This will split at the first
17868  # space.
17869  complete="$BUILD_CC"
17870  path="${complete%% *}"
17871  tmp="$complete EOL"
17872  arguments="${tmp#* }"
17873
17874  # Input might be given as Windows format, start by converting to
17875  # unix format.
17876  new_path="$path"
17877
17878  windows_path="$new_path"
17879  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17880    unix_path=`$CYGPATH -u "$windows_path"`
17881    new_path="$unix_path"
17882  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17883    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17884    new_path="$unix_path"
17885  fi
17886
17887
17888  # Now try to locate executable using which
17889  new_path=`$WHICH "$new_path" 2> /dev/null`
17890
17891  if test "x$new_path" = x; then
17892    # Oops. Which didn't find the executable.
17893    # The splitting of arguments from the executable at a space might have been incorrect,
17894    # since paths with space are more likely in Windows. Give it another try with the whole
17895    # argument.
17896    path="$complete"
17897    arguments="EOL"
17898    new_path="$path"
17899
17900  windows_path="$new_path"
17901  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17902    unix_path=`$CYGPATH -u "$windows_path"`
17903    new_path="$unix_path"
17904  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17905    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17906    new_path="$unix_path"
17907  fi
17908
17909
17910    new_path=`$WHICH "$new_path" 2> /dev/null`
17911
17912    if test "x$new_path" = x; then
17913      # It's still not found. Now this is an unrecoverable error.
17914      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
17915$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
17916      has_space=`$ECHO "$complete" | $GREP " "`
17917      if test "x$has_space" != x; then
17918        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17919$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17920      fi
17921      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
17922    fi
17923  fi
17924
17925  # Now new_path has a complete unix path to the binary
17926  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17927    # Keep paths in /bin as-is, but remove trailing .exe if any
17928    new_path="${new_path/%.exe/}"
17929    # Do not save /bin paths to all_fixpath_prefixes!
17930  else
17931    # Not in mixed or Windows style, start by that.
17932    new_path=`cmd //c echo $new_path`
17933
17934  input_path="$new_path"
17935  # Check if we need to convert this using DOS-style short mode. If the path
17936  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17937  # take no chances and rewrite it.
17938  # Note: m4 eats our [], so we need to use [ and ] instead.
17939  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17940  if test "x$has_forbidden_chars" != x; then
17941    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17942    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17943  fi
17944
17945    # Output is in $new_path
17946
17947  windows_path="$new_path"
17948  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17949    unix_path=`$CYGPATH -u "$windows_path"`
17950    new_path="$unix_path"
17951  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17952    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17953    new_path="$unix_path"
17954  fi
17955
17956    # remove trailing .exe if any
17957    new_path="${new_path/%.exe/}"
17958
17959    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17960    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17961  fi
17962
17963  else
17964    # We're on a posix platform. Hooray! :)
17965    # First separate the path from the arguments. This will split at the first
17966    # space.
17967    complete="$BUILD_CC"
17968    path="${complete%% *}"
17969    tmp="$complete EOL"
17970    arguments="${tmp#* }"
17971
17972    # Cannot rely on the command "which" here since it doesn't always work.
17973    is_absolute_path=`$ECHO "$path" | $GREP ^/`
17974    if test -z "$is_absolute_path"; then
17975      # Path to executable is not absolute. Find it.
17976      IFS_save="$IFS"
17977      IFS=:
17978      for p in $PATH; do
17979        if test -f "$p/$path" && test -x "$p/$path"; then
17980          new_path="$p/$path"
17981          break
17982        fi
17983      done
17984      IFS="$IFS_save"
17985    else
17986      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CC (as $path) failed, using $path directly." >&5
17987$as_echo "$as_me: Resolving BUILD_CC (as $path) failed, using $path directly." >&6;}
17988      new_path="$path"
17989    fi
17990
17991    if test "x$new_path" = x; then
17992      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
17993$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
17994      has_space=`$ECHO "$complete" | $GREP " "`
17995      if test "x$has_space" != x; then
17996        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17997$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17998      fi
17999      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
18000    fi
18001  fi
18002
18003  # Now join together the path and the arguments once again
18004  if test "x$arguments" != xEOL; then
18005    new_complete="$new_path ${arguments% *}"
18006  else
18007    new_complete="$new_path"
18008  fi
18009
18010  if test "x$complete" != "x$new_complete"; then
18011    BUILD_CC="$new_complete"
18012    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
18013$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
18014  fi
18015
18016    for ac_prog in cl CC g++
18017do
18018  # Extract the first word of "$ac_prog", so it can be a program name with args.
18019set dummy $ac_prog; ac_word=$2
18020{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18021$as_echo_n "checking for $ac_word... " >&6; }
18022if ${ac_cv_path_BUILD_CXX+:} false; then :
18023  $as_echo_n "(cached) " >&6
18024else
18025  case $BUILD_CXX in
18026  [\\/]* | ?:[\\/]*)
18027  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
18028  ;;
18029  *)
18030  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18031for as_dir in $PATH
18032do
18033  IFS=$as_save_IFS
18034  test -z "$as_dir" && as_dir=.
18035    for ac_exec_ext in '' $ac_executable_extensions; do
18036  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18037    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
18038    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18039    break 2
18040  fi
18041done
18042  done
18043IFS=$as_save_IFS
18044
18045  ;;
18046esac
18047fi
18048BUILD_CXX=$ac_cv_path_BUILD_CXX
18049if test -n "$BUILD_CXX"; then
18050  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
18051$as_echo "$BUILD_CXX" >&6; }
18052else
18053  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18054$as_echo "no" >&6; }
18055fi
18056
18057
18058  test -n "$BUILD_CXX" && break
18059done
18060
18061
18062  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18063
18064  # First separate the path from the arguments. This will split at the first
18065  # space.
18066  complete="$BUILD_CXX"
18067  path="${complete%% *}"
18068  tmp="$complete EOL"
18069  arguments="${tmp#* }"
18070
18071  # Input might be given as Windows format, start by converting to
18072  # unix format.
18073  new_path=`$CYGPATH -u "$path"`
18074
18075  # Now try to locate executable using which
18076  new_path=`$WHICH "$new_path" 2> /dev/null`
18077  # bat and cmd files are not always considered executable in cygwin causing which
18078  # to not find them
18079  if test "x$new_path" = x \
18080      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18081      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18082    new_path=`$CYGPATH -u "$path"`
18083  fi
18084  if test "x$new_path" = x; then
18085    # Oops. Which didn't find the executable.
18086    # The splitting of arguments from the executable at a space might have been incorrect,
18087    # since paths with space are more likely in Windows. Give it another try with the whole
18088    # argument.
18089    path="$complete"
18090    arguments="EOL"
18091    new_path=`$CYGPATH -u "$path"`
18092    new_path=`$WHICH "$new_path" 2> /dev/null`
18093    # bat and cmd files are not always considered executable in cygwin causing which
18094    # to not find them
18095    if test "x$new_path" = x \
18096        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18097        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18098      new_path=`$CYGPATH -u "$path"`
18099    fi
18100    if test "x$new_path" = x; then
18101      # It's still not found. Now this is an unrecoverable error.
18102      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
18103$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
18104      has_space=`$ECHO "$complete" | $GREP " "`
18105      if test "x$has_space" != x; then
18106        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18107$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18108      fi
18109      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18110    fi
18111  fi
18112
18113  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18114  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18115  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18116  # "foo.exe" is OK but "foo" is an error.
18117  #
18118  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18119  # It is also a way to make sure we got the proper file name for the real test later on.
18120  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18121  if test "x$test_shortpath" = x; then
18122    # Short path failed, file does not exist as specified.
18123    # Try adding .exe or .cmd
18124    if test -f "${new_path}.exe"; then
18125      input_to_shortpath="${new_path}.exe"
18126    elif test -f "${new_path}.cmd"; then
18127      input_to_shortpath="${new_path}.cmd"
18128    else
18129      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
18130$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
18131      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18132$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18133      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18134    fi
18135  else
18136    input_to_shortpath="$new_path"
18137  fi
18138
18139  # Call helper function which possibly converts this using DOS-style short mode.
18140  # If so, the updated path is stored in $new_path.
18141  new_path="$input_to_shortpath"
18142
18143  input_path="$input_to_shortpath"
18144  # Check if we need to convert this using DOS-style short mode. If the path
18145  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18146  # take no chances and rewrite it.
18147  # Note: m4 eats our [], so we need to use [ and ] instead.
18148  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18149  if test "x$has_forbidden_chars" != x; then
18150    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18151    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18152    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18153    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18154      # Going to short mode and back again did indeed matter. Since short mode is
18155      # case insensitive, let's make it lowercase to improve readability.
18156      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18157      # Now convert it back to Unix-stile (cygpath)
18158      input_path=`$CYGPATH -u "$shortmode_path"`
18159      new_path="$input_path"
18160    fi
18161  fi
18162
18163  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18164  if test "x$test_cygdrive_prefix" = x; then
18165    # As a simple fix, exclude /usr/bin since it's not a real path.
18166    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18167      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18168      # a path prefixed by /cygdrive for fixpath to work.
18169      new_path="$CYGWIN_ROOT_PATH$input_path"
18170    fi
18171  fi
18172
18173  # remove trailing .exe if any
18174  new_path="${new_path/%.exe/}"
18175
18176  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18177
18178  # First separate the path from the arguments. This will split at the first
18179  # space.
18180  complete="$BUILD_CXX"
18181  path="${complete%% *}"
18182  tmp="$complete EOL"
18183  arguments="${tmp#* }"
18184
18185  # Input might be given as Windows format, start by converting to
18186  # unix format.
18187  new_path="$path"
18188
18189  windows_path="$new_path"
18190  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18191    unix_path=`$CYGPATH -u "$windows_path"`
18192    new_path="$unix_path"
18193  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18194    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18195    new_path="$unix_path"
18196  fi
18197
18198
18199  # Now try to locate executable using which
18200  new_path=`$WHICH "$new_path" 2> /dev/null`
18201
18202  if test "x$new_path" = x; then
18203    # Oops. Which didn't find the executable.
18204    # The splitting of arguments from the executable at a space might have been incorrect,
18205    # since paths with space are more likely in Windows. Give it another try with the whole
18206    # argument.
18207    path="$complete"
18208    arguments="EOL"
18209    new_path="$path"
18210
18211  windows_path="$new_path"
18212  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18213    unix_path=`$CYGPATH -u "$windows_path"`
18214    new_path="$unix_path"
18215  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18216    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18217    new_path="$unix_path"
18218  fi
18219
18220
18221    new_path=`$WHICH "$new_path" 2> /dev/null`
18222
18223    if test "x$new_path" = x; then
18224      # It's still not found. Now this is an unrecoverable error.
18225      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
18226$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
18227      has_space=`$ECHO "$complete" | $GREP " "`
18228      if test "x$has_space" != x; then
18229        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18230$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18231      fi
18232      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18233    fi
18234  fi
18235
18236  # Now new_path has a complete unix path to the binary
18237  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18238    # Keep paths in /bin as-is, but remove trailing .exe if any
18239    new_path="${new_path/%.exe/}"
18240    # Do not save /bin paths to all_fixpath_prefixes!
18241  else
18242    # Not in mixed or Windows style, start by that.
18243    new_path=`cmd //c echo $new_path`
18244
18245  input_path="$new_path"
18246  # Check if we need to convert this using DOS-style short mode. If the path
18247  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18248  # take no chances and rewrite it.
18249  # Note: m4 eats our [], so we need to use [ and ] instead.
18250  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18251  if test "x$has_forbidden_chars" != x; then
18252    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18253    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18254  fi
18255
18256    # Output is in $new_path
18257
18258  windows_path="$new_path"
18259  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18260    unix_path=`$CYGPATH -u "$windows_path"`
18261    new_path="$unix_path"
18262  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18263    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18264    new_path="$unix_path"
18265  fi
18266
18267    # remove trailing .exe if any
18268    new_path="${new_path/%.exe/}"
18269
18270    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18271    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18272  fi
18273
18274  else
18275    # We're on a posix platform. Hooray! :)
18276    # First separate the path from the arguments. This will split at the first
18277    # space.
18278    complete="$BUILD_CXX"
18279    path="${complete%% *}"
18280    tmp="$complete EOL"
18281    arguments="${tmp#* }"
18282
18283    # Cannot rely on the command "which" here since it doesn't always work.
18284    is_absolute_path=`$ECHO "$path" | $GREP ^/`
18285    if test -z "$is_absolute_path"; then
18286      # Path to executable is not absolute. Find it.
18287      IFS_save="$IFS"
18288      IFS=:
18289      for p in $PATH; do
18290        if test -f "$p/$path" && test -x "$p/$path"; then
18291          new_path="$p/$path"
18292          break
18293        fi
18294      done
18295      IFS="$IFS_save"
18296    else
18297      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CXX (as $path) failed, using $path directly." >&5
18298$as_echo "$as_me: Resolving BUILD_CXX (as $path) failed, using $path directly." >&6;}
18299      new_path="$path"
18300    fi
18301
18302    if test "x$new_path" = x; then
18303      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
18304$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
18305      has_space=`$ECHO "$complete" | $GREP " "`
18306      if test "x$has_space" != x; then
18307        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18308$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18309      fi
18310      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18311    fi
18312  fi
18313
18314  # Now join together the path and the arguments once again
18315  if test "x$arguments" != xEOL; then
18316    new_complete="$new_path ${arguments% *}"
18317  else
18318    new_complete="$new_path"
18319  fi
18320
18321  if test "x$complete" != "x$new_complete"; then
18322    BUILD_CXX="$new_complete"
18323    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
18324$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
18325  fi
18326
18327    # Extract the first word of "ld", so it can be a program name with args.
18328set dummy ld; ac_word=$2
18329{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18330$as_echo_n "checking for $ac_word... " >&6; }
18331if ${ac_cv_path_BUILD_LD+:} false; then :
18332  $as_echo_n "(cached) " >&6
18333else
18334  case $BUILD_LD in
18335  [\\/]* | ?:[\\/]*)
18336  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
18337  ;;
18338  *)
18339  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18340for as_dir in $PATH
18341do
18342  IFS=$as_save_IFS
18343  test -z "$as_dir" && as_dir=.
18344    for ac_exec_ext in '' $ac_executable_extensions; do
18345  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18346    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
18347    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18348    break 2
18349  fi
18350done
18351  done
18352IFS=$as_save_IFS
18353
18354  ;;
18355esac
18356fi
18357BUILD_LD=$ac_cv_path_BUILD_LD
18358if test -n "$BUILD_LD"; then
18359  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
18360$as_echo "$BUILD_LD" >&6; }
18361else
18362  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18363$as_echo "no" >&6; }
18364fi
18365
18366
18367
18368  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18369
18370  # First separate the path from the arguments. This will split at the first
18371  # space.
18372  complete="$BUILD_LD"
18373  path="${complete%% *}"
18374  tmp="$complete EOL"
18375  arguments="${tmp#* }"
18376
18377  # Input might be given as Windows format, start by converting to
18378  # unix format.
18379  new_path=`$CYGPATH -u "$path"`
18380
18381  # Now try to locate executable using which
18382  new_path=`$WHICH "$new_path" 2> /dev/null`
18383  # bat and cmd files are not always considered executable in cygwin causing which
18384  # to not find them
18385  if test "x$new_path" = x \
18386      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18387      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18388    new_path=`$CYGPATH -u "$path"`
18389  fi
18390  if test "x$new_path" = x; then
18391    # Oops. Which didn't find the executable.
18392    # The splitting of arguments from the executable at a space might have been incorrect,
18393    # since paths with space are more likely in Windows. Give it another try with the whole
18394    # argument.
18395    path="$complete"
18396    arguments="EOL"
18397    new_path=`$CYGPATH -u "$path"`
18398    new_path=`$WHICH "$new_path" 2> /dev/null`
18399    # bat and cmd files are not always considered executable in cygwin causing which
18400    # to not find them
18401    if test "x$new_path" = x \
18402        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18403        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18404      new_path=`$CYGPATH -u "$path"`
18405    fi
18406    if test "x$new_path" = x; then
18407      # It's still not found. Now this is an unrecoverable error.
18408      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
18409$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
18410      has_space=`$ECHO "$complete" | $GREP " "`
18411      if test "x$has_space" != x; then
18412        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18413$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18414      fi
18415      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18416    fi
18417  fi
18418
18419  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18420  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18421  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18422  # "foo.exe" is OK but "foo" is an error.
18423  #
18424  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18425  # It is also a way to make sure we got the proper file name for the real test later on.
18426  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18427  if test "x$test_shortpath" = x; then
18428    # Short path failed, file does not exist as specified.
18429    # Try adding .exe or .cmd
18430    if test -f "${new_path}.exe"; then
18431      input_to_shortpath="${new_path}.exe"
18432    elif test -f "${new_path}.cmd"; then
18433      input_to_shortpath="${new_path}.cmd"
18434    else
18435      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&5
18436$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&6;}
18437      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18438$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18439      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18440    fi
18441  else
18442    input_to_shortpath="$new_path"
18443  fi
18444
18445  # Call helper function which possibly converts this using DOS-style short mode.
18446  # If so, the updated path is stored in $new_path.
18447  new_path="$input_to_shortpath"
18448
18449  input_path="$input_to_shortpath"
18450  # Check if we need to convert this using DOS-style short mode. If the path
18451  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18452  # take no chances and rewrite it.
18453  # Note: m4 eats our [], so we need to use [ and ] instead.
18454  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18455  if test "x$has_forbidden_chars" != x; then
18456    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18457    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18458    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18459    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18460      # Going to short mode and back again did indeed matter. Since short mode is
18461      # case insensitive, let's make it lowercase to improve readability.
18462      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18463      # Now convert it back to Unix-stile (cygpath)
18464      input_path=`$CYGPATH -u "$shortmode_path"`
18465      new_path="$input_path"
18466    fi
18467  fi
18468
18469  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18470  if test "x$test_cygdrive_prefix" = x; then
18471    # As a simple fix, exclude /usr/bin since it's not a real path.
18472    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18473      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18474      # a path prefixed by /cygdrive for fixpath to work.
18475      new_path="$CYGWIN_ROOT_PATH$input_path"
18476    fi
18477  fi
18478
18479  # remove trailing .exe if any
18480  new_path="${new_path/%.exe/}"
18481
18482  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18483
18484  # First separate the path from the arguments. This will split at the first
18485  # space.
18486  complete="$BUILD_LD"
18487  path="${complete%% *}"
18488  tmp="$complete EOL"
18489  arguments="${tmp#* }"
18490
18491  # Input might be given as Windows format, start by converting to
18492  # unix format.
18493  new_path="$path"
18494
18495  windows_path="$new_path"
18496  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18497    unix_path=`$CYGPATH -u "$windows_path"`
18498    new_path="$unix_path"
18499  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18500    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18501    new_path="$unix_path"
18502  fi
18503
18504
18505  # Now try to locate executable using which
18506  new_path=`$WHICH "$new_path" 2> /dev/null`
18507
18508  if test "x$new_path" = x; then
18509    # Oops. Which didn't find the executable.
18510    # The splitting of arguments from the executable at a space might have been incorrect,
18511    # since paths with space are more likely in Windows. Give it another try with the whole
18512    # argument.
18513    path="$complete"
18514    arguments="EOL"
18515    new_path="$path"
18516
18517  windows_path="$new_path"
18518  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18519    unix_path=`$CYGPATH -u "$windows_path"`
18520    new_path="$unix_path"
18521  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18522    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18523    new_path="$unix_path"
18524  fi
18525
18526
18527    new_path=`$WHICH "$new_path" 2> /dev/null`
18528
18529    if test "x$new_path" = x; then
18530      # It's still not found. Now this is an unrecoverable error.
18531      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
18532$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
18533      has_space=`$ECHO "$complete" | $GREP " "`
18534      if test "x$has_space" != x; then
18535        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18536$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18537      fi
18538      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18539    fi
18540  fi
18541
18542  # Now new_path has a complete unix path to the binary
18543  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18544    # Keep paths in /bin as-is, but remove trailing .exe if any
18545    new_path="${new_path/%.exe/}"
18546    # Do not save /bin paths to all_fixpath_prefixes!
18547  else
18548    # Not in mixed or Windows style, start by that.
18549    new_path=`cmd //c echo $new_path`
18550
18551  input_path="$new_path"
18552  # Check if we need to convert this using DOS-style short mode. If the path
18553  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18554  # take no chances and rewrite it.
18555  # Note: m4 eats our [], so we need to use [ and ] instead.
18556  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18557  if test "x$has_forbidden_chars" != x; then
18558    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18559    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18560  fi
18561
18562    # Output is in $new_path
18563
18564  windows_path="$new_path"
18565  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18566    unix_path=`$CYGPATH -u "$windows_path"`
18567    new_path="$unix_path"
18568  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18569    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18570    new_path="$unix_path"
18571  fi
18572
18573    # remove trailing .exe if any
18574    new_path="${new_path/%.exe/}"
18575
18576    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18577    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18578  fi
18579
18580  else
18581    # We're on a posix platform. Hooray! :)
18582    # First separate the path from the arguments. This will split at the first
18583    # space.
18584    complete="$BUILD_LD"
18585    path="${complete%% *}"
18586    tmp="$complete EOL"
18587    arguments="${tmp#* }"
18588
18589    # Cannot rely on the command "which" here since it doesn't always work.
18590    is_absolute_path=`$ECHO "$path" | $GREP ^/`
18591    if test -z "$is_absolute_path"; then
18592      # Path to executable is not absolute. Find it.
18593      IFS_save="$IFS"
18594      IFS=:
18595      for p in $PATH; do
18596        if test -f "$p/$path" && test -x "$p/$path"; then
18597          new_path="$p/$path"
18598          break
18599        fi
18600      done
18601      IFS="$IFS_save"
18602    else
18603      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_LD (as $path) failed, using $path directly." >&5
18604$as_echo "$as_me: Resolving BUILD_LD (as $path) failed, using $path directly." >&6;}
18605      new_path="$path"
18606    fi
18607
18608    if test "x$new_path" = x; then
18609      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
18610$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
18611      has_space=`$ECHO "$complete" | $GREP " "`
18612      if test "x$has_space" != x; then
18613        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18614$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18615      fi
18616      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18617    fi
18618  fi
18619
18620  # Now join together the path and the arguments once again
18621  if test "x$arguments" != xEOL; then
18622    new_complete="$new_path ${arguments% *}"
18623  else
18624    new_complete="$new_path"
18625  fi
18626
18627  if test "x$complete" != "x$new_complete"; then
18628    BUILD_LD="$new_complete"
18629    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_LD to \"$new_complete\"" >&5
18630$as_echo "$as_me: Rewriting BUILD_LD to \"$new_complete\"" >&6;}
18631  fi
18632
18633  fi
18634
18635
18636
18637
18638  # If a devkit is found on the builddeps server, then prepend its path to the
18639  # PATH variable. If there are cross compilers available in the devkit, these
18640  # will be found by AC_PROG_CC et al.
18641  DEVKIT=
18642
18643
18644  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
18645    # Source the builddeps file again, to make sure it uses the latest variables!
18646    . $builddepsfile
18647    # Look for a target and build machine specific resource!
18648    eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
18649    if test "x$resource" = x; then
18650      # Ok, lets instead look for a target specific resource
18651      eval resource=\${builddep_devkit_TARGET_${rewritten_target_var}}
18652    fi
18653    if test "x$resource" = x; then
18654      # Ok, lets instead look for a build specific resource
18655      eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}}
18656    fi
18657    if test "x$resource" = x; then
18658      # Ok, lets instead look for a generic resource
18659      # (The devkit comes from M4 and not the shell, thus no need for eval here.)
18660      resource=${builddep_devkit}
18661    fi
18662    if test "x$resource" != x; then
18663      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for devkit" >&5
18664$as_echo "$as_me: Using builddeps $resource for devkit" >&6;}
18665      # If the resource in the builddeps.conf file is an existing directory,
18666      # for example /java/linux/cups
18667      if test -d ${resource}; then
18668        depdir=${resource}
18669      else
18670
18671  # devkit is for example mymodule
18672  # $resource is for example libs/general/libmymod_1_2_3.zip
18673  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
18674  # $with_builddeps_dir is for example /localhome/builddeps
18675  # depdir is the name of the variable into which we store the depdir, eg MYMOD
18676  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
18677  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
18678  filename=`basename $resource`
18679  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
18680  filebase=${filename%%.*}
18681  extension=${filename#*.}
18682  installdir=$with_builddeps_dir/$filebase
18683  if test ! -f $installdir/$filename.unpacked; then
18684    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&5
18685$as_echo "$as_me: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&6;}
18686    if test ! -d $installdir; then
18687      mkdir -p $installdir
18688    fi
18689    if test ! -d $installdir; then
18690      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
18691    fi
18692    tmpfile=`mktemp $installdir/devkit.XXXXXXXXX`
18693    touch $tmpfile
18694    if test ! -f $tmpfile; then
18695      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
18696    fi
18697
18698  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
18699  # $tmpfile is the local file name for the downloaded file.
18700  VALID_TOOL=no
18701  if test "x$BDEPS_FTP" = xwget; then
18702    VALID_TOOL=yes
18703    wget -O $tmpfile $with_builddeps_server/$resource
18704  fi
18705  if test "x$BDEPS_FTP" = xlftp; then
18706    VALID_TOOL=yes
18707    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
18708  fi
18709  if test "x$BDEPS_FTP" = xftp; then
18710    VALID_TOOL=yes
18711    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
18712    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
18713    FTPUSERPWD=${FTPSERVER%%@*}
18714    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
18715      FTPUSER=${userpwd%%:*}
18716      FTPPWD=${userpwd#*@}
18717      FTPSERVER=${FTPSERVER#*@}
18718    else
18719      FTPUSER=ftp
18720      FTPPWD=ftp
18721    fi
18722    # the "pass" command does not work on some
18723    # ftp clients (read ftp.exe) but if it works,
18724    # passive mode is better!
18725    ( \
18726        echo "user $FTPUSER $FTPPWD"        ; \
18727        echo "pass"                         ; \
18728        echo "bin"                          ; \
18729        echo "get $FTPPATH $tmpfile"              ; \
18730    ) | ftp -in $FTPSERVER
18731  fi
18732  if test "x$VALID_TOOL" != xyes; then
18733    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
18734  fi
18735
18736    mv $tmpfile $installdir/$filename
18737    if test ! -s $installdir/$filename; then
18738      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
18739    fi
18740    case "$extension" in
18741      zip)  echo "Unzipping $installdir/$filename..."
18742        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
18743        ;;
18744      tar.gz) echo "Untaring $installdir/$filename..."
18745        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
18746        ;;
18747      tgz) echo "Untaring $installdir/$filename..."
18748        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
18749        ;;
18750      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
18751        ;;
18752    esac
18753  fi
18754  if test -f $installdir/$filename.unpacked; then
18755    depdir=$installdir
18756  fi
18757
18758      fi
18759      # Source the builddeps file again, because in the previous command, the depdir
18760      # was updated to point at the current build dependency install directory.
18761      . $builddepsfile
18762      # Now extract variables from the builddeps.conf files.
18763      theroot=${builddep_devkit_ROOT}
18764      thecflags=${builddep_devkit_CFLAGS}
18765      thelibs=${builddep_devkit_LIBS}
18766      if test "x$depdir" = x; then
18767        as_fn_error $? "Could not download build dependency devkit" "$LINENO" 5
18768      fi
18769      DEVKIT=$depdir
18770      if test "x$theroot" != x; then
18771        DEVKIT="$theroot"
18772      fi
18773      if test "x$thecflags" != x; then
18774        DEVKIT_CFLAGS="$thecflags"
18775      fi
18776      if test "x$thelibs" != x; then
18777        DEVKIT_LIBS="$thelibs"
18778      fi
18779
18780        # Found devkit
18781        PATH="$DEVKIT/bin:$PATH"
18782        SYS_ROOT="$DEVKIT/${rewritten_target}/sys-root"
18783        if test "x$x_includes" = "xNONE"; then
18784          x_includes="$SYS_ROOT/usr/include/X11"
18785        fi
18786        if test "x$x_libraries" = "xNONE"; then
18787          x_libraries="$SYS_ROOT/usr/lib"
18788        fi
18789
18790
18791    fi
18792
18793  fi
18794
18795
18796  # Store the CFLAGS etal passed to the configure script.
18797  ORG_CFLAGS="$CFLAGS"
18798  ORG_CXXFLAGS="$CXXFLAGS"
18799  ORG_OBJCFLAGS="$OBJCFLAGS"
18800
18801  # autoconf magic only relies on PATH, so update it if tools dir is specified
18802  OLD_PATH="$PATH"
18803  if test "x$TOOLS_DIR" != x; then
18804    PATH=$TOOLS_DIR:$PATH
18805  fi
18806
18807
18808  ### Locate C compiler (CC)
18809
18810  # On windows, only cl.exe is supported.
18811  # On Solaris, cc is preferred to gcc.
18812  # Elsewhere, gcc is preferred to cc.
18813
18814  if test "x$CC" != x; then
18815    COMPILER_CHECK_LIST="$CC"
18816  elif test "x$OPENJDK_TARGET_OS" = "xwindows"; then
18817    COMPILER_CHECK_LIST="cl"
18818  elif test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
18819    COMPILER_CHECK_LIST="cc gcc"
18820  else
18821    COMPILER_CHECK_LIST="gcc cc"
18822  fi
18823
18824
18825  COMPILER_NAME=C
18826
18827  CC=
18828  # If TOOLS_DIR is set, check for all compiler names in there first
18829  # before checking the rest of the PATH.
18830  if test -n "$TOOLS_DIR"; then
18831    PATH_save="$PATH"
18832    PATH="$TOOLS_DIR"
18833    for ac_prog in $COMPILER_CHECK_LIST
18834do
18835  # Extract the first word of "$ac_prog", so it can be a program name with args.
18836set dummy $ac_prog; ac_word=$2
18837{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18838$as_echo_n "checking for $ac_word... " >&6; }
18839if ${ac_cv_path_TOOLS_DIR_CC+:} false; then :
18840  $as_echo_n "(cached) " >&6
18841else
18842  case $TOOLS_DIR_CC in
18843  [\\/]* | ?:[\\/]*)
18844  ac_cv_path_TOOLS_DIR_CC="$TOOLS_DIR_CC" # Let the user override the test with a path.
18845  ;;
18846  *)
18847  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18848for as_dir in $PATH
18849do
18850  IFS=$as_save_IFS
18851  test -z "$as_dir" && as_dir=.
18852    for ac_exec_ext in '' $ac_executable_extensions; do
18853  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18854    ac_cv_path_TOOLS_DIR_CC="$as_dir/$ac_word$ac_exec_ext"
18855    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18856    break 2
18857  fi
18858done
18859  done
18860IFS=$as_save_IFS
18861
18862  ;;
18863esac
18864fi
18865TOOLS_DIR_CC=$ac_cv_path_TOOLS_DIR_CC
18866if test -n "$TOOLS_DIR_CC"; then
18867  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CC" >&5
18868$as_echo "$TOOLS_DIR_CC" >&6; }
18869else
18870  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18871$as_echo "no" >&6; }
18872fi
18873
18874
18875  test -n "$TOOLS_DIR_CC" && break
18876done
18877
18878    CC=$TOOLS_DIR_CC
18879    PATH="$PATH_save"
18880  fi
18881
18882  # AC_PATH_PROGS can't be run multiple times with the same variable,
18883  # so create a new name for this run.
18884  if test "x$CC" = x; then
18885    for ac_prog in $COMPILER_CHECK_LIST
18886do
18887  # Extract the first word of "$ac_prog", so it can be a program name with args.
18888set dummy $ac_prog; ac_word=$2
18889{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18890$as_echo_n "checking for $ac_word... " >&6; }
18891if ${ac_cv_path_POTENTIAL_CC+:} false; then :
18892  $as_echo_n "(cached) " >&6
18893else
18894  case $POTENTIAL_CC in
18895  [\\/]* | ?:[\\/]*)
18896  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
18897  ;;
18898  *)
18899  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18900for as_dir in $PATH
18901do
18902  IFS=$as_save_IFS
18903  test -z "$as_dir" && as_dir=.
18904    for ac_exec_ext in '' $ac_executable_extensions; do
18905  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18906    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
18907    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18908    break 2
18909  fi
18910done
18911  done
18912IFS=$as_save_IFS
18913
18914  ;;
18915esac
18916fi
18917POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
18918if test -n "$POTENTIAL_CC"; then
18919  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
18920$as_echo "$POTENTIAL_CC" >&6; }
18921else
18922  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18923$as_echo "no" >&6; }
18924fi
18925
18926
18927  test -n "$POTENTIAL_CC" && break
18928done
18929
18930    CC=$POTENTIAL_CC
18931  fi
18932
18933  if test "x$CC" = x; then
18934
18935  # Print a helpful message on how to acquire the necessary build dependency.
18936  # devkit is the help tag: freetyp2, cups, pulse, alsa etc
18937  MISSING_DEPENDENCY=devkit
18938  PKGHANDLER_COMMAND=
18939
18940  case $PKGHANDLER in
18941    apt-get)
18942      apt_help     $MISSING_DEPENDENCY ;;
18943    yum)
18944      yum_help     $MISSING_DEPENDENCY ;;
18945    port)
18946      port_help    $MISSING_DEPENDENCY ;;
18947    pkgutil)
18948      pkgutil_help $MISSING_DEPENDENCY ;;
18949    pkgadd)
18950      pkgadd_help  $MISSING_DEPENDENCY ;;
18951    * )
18952      break ;;
18953  esac
18954
18955  if test "x$PKGHANDLER_COMMAND" != x; then
18956    HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
18957  fi
18958
18959    as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
18960  fi
18961
18962  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18963
18964  # First separate the path from the arguments. This will split at the first
18965  # space.
18966  complete="$CC"
18967  path="${complete%% *}"
18968  tmp="$complete EOL"
18969  arguments="${tmp#* }"
18970
18971  # Input might be given as Windows format, start by converting to
18972  # unix format.
18973  new_path=`$CYGPATH -u "$path"`
18974
18975  # Now try to locate executable using which
18976  new_path=`$WHICH "$new_path" 2> /dev/null`
18977  # bat and cmd files are not always considered executable in cygwin causing which
18978  # to not find them
18979  if test "x$new_path" = x \
18980      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18981      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18982    new_path=`$CYGPATH -u "$path"`
18983  fi
18984  if test "x$new_path" = x; then
18985    # Oops. Which didn't find the executable.
18986    # The splitting of arguments from the executable at a space might have been incorrect,
18987    # since paths with space are more likely in Windows. Give it another try with the whole
18988    # argument.
18989    path="$complete"
18990    arguments="EOL"
18991    new_path=`$CYGPATH -u "$path"`
18992    new_path=`$WHICH "$new_path" 2> /dev/null`
18993    # bat and cmd files are not always considered executable in cygwin causing which
18994    # to not find them
18995    if test "x$new_path" = x \
18996        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18997        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18998      new_path=`$CYGPATH -u "$path"`
18999    fi
19000    if test "x$new_path" = x; then
19001      # It's still not found. Now this is an unrecoverable error.
19002      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
19003$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
19004      has_space=`$ECHO "$complete" | $GREP " "`
19005      if test "x$has_space" != x; then
19006        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19007$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19008      fi
19009      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
19010    fi
19011  fi
19012
19013  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19014  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19015  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19016  # "foo.exe" is OK but "foo" is an error.
19017  #
19018  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19019  # It is also a way to make sure we got the proper file name for the real test later on.
19020  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19021  if test "x$test_shortpath" = x; then
19022    # Short path failed, file does not exist as specified.
19023    # Try adding .exe or .cmd
19024    if test -f "${new_path}.exe"; then
19025      input_to_shortpath="${new_path}.exe"
19026    elif test -f "${new_path}.cmd"; then
19027      input_to_shortpath="${new_path}.cmd"
19028    else
19029      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
19030$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
19031      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19032$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19033      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
19034    fi
19035  else
19036    input_to_shortpath="$new_path"
19037  fi
19038
19039  # Call helper function which possibly converts this using DOS-style short mode.
19040  # If so, the updated path is stored in $new_path.
19041  new_path="$input_to_shortpath"
19042
19043  input_path="$input_to_shortpath"
19044  # Check if we need to convert this using DOS-style short mode. If the path
19045  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19046  # take no chances and rewrite it.
19047  # Note: m4 eats our [], so we need to use [ and ] instead.
19048  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19049  if test "x$has_forbidden_chars" != x; then
19050    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19051    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19052    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19053    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19054      # Going to short mode and back again did indeed matter. Since short mode is
19055      # case insensitive, let's make it lowercase to improve readability.
19056      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19057      # Now convert it back to Unix-stile (cygpath)
19058      input_path=`$CYGPATH -u "$shortmode_path"`
19059      new_path="$input_path"
19060    fi
19061  fi
19062
19063  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19064  if test "x$test_cygdrive_prefix" = x; then
19065    # As a simple fix, exclude /usr/bin since it's not a real path.
19066    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19067      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19068      # a path prefixed by /cygdrive for fixpath to work.
19069      new_path="$CYGWIN_ROOT_PATH$input_path"
19070    fi
19071  fi
19072
19073  # remove trailing .exe if any
19074  new_path="${new_path/%.exe/}"
19075
19076  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19077
19078  # First separate the path from the arguments. This will split at the first
19079  # space.
19080  complete="$CC"
19081  path="${complete%% *}"
19082  tmp="$complete EOL"
19083  arguments="${tmp#* }"
19084
19085  # Input might be given as Windows format, start by converting to
19086  # unix format.
19087  new_path="$path"
19088
19089  windows_path="$new_path"
19090  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19091    unix_path=`$CYGPATH -u "$windows_path"`
19092    new_path="$unix_path"
19093  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19094    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19095    new_path="$unix_path"
19096  fi
19097
19098
19099  # Now try to locate executable using which
19100  new_path=`$WHICH "$new_path" 2> /dev/null`
19101
19102  if test "x$new_path" = x; then
19103    # Oops. Which didn't find the executable.
19104    # The splitting of arguments from the executable at a space might have been incorrect,
19105    # since paths with space are more likely in Windows. Give it another try with the whole
19106    # argument.
19107    path="$complete"
19108    arguments="EOL"
19109    new_path="$path"
19110
19111  windows_path="$new_path"
19112  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19113    unix_path=`$CYGPATH -u "$windows_path"`
19114    new_path="$unix_path"
19115  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19116    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19117    new_path="$unix_path"
19118  fi
19119
19120
19121    new_path=`$WHICH "$new_path" 2> /dev/null`
19122
19123    if test "x$new_path" = x; then
19124      # It's still not found. Now this is an unrecoverable error.
19125      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
19126$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
19127      has_space=`$ECHO "$complete" | $GREP " "`
19128      if test "x$has_space" != x; then
19129        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19130$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19131      fi
19132      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
19133    fi
19134  fi
19135
19136  # Now new_path has a complete unix path to the binary
19137  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19138    # Keep paths in /bin as-is, but remove trailing .exe if any
19139    new_path="${new_path/%.exe/}"
19140    # Do not save /bin paths to all_fixpath_prefixes!
19141  else
19142    # Not in mixed or Windows style, start by that.
19143    new_path=`cmd //c echo $new_path`
19144
19145  input_path="$new_path"
19146  # Check if we need to convert this using DOS-style short mode. If the path
19147  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19148  # take no chances and rewrite it.
19149  # Note: m4 eats our [], so we need to use [ and ] instead.
19150  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19151  if test "x$has_forbidden_chars" != x; then
19152    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19153    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19154  fi
19155
19156    # Output is in $new_path
19157
19158  windows_path="$new_path"
19159  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19160    unix_path=`$CYGPATH -u "$windows_path"`
19161    new_path="$unix_path"
19162  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19163    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19164    new_path="$unix_path"
19165  fi
19166
19167    # remove trailing .exe if any
19168    new_path="${new_path/%.exe/}"
19169
19170    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19171    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19172  fi
19173
19174  else
19175    # We're on a posix platform. Hooray! :)
19176    # First separate the path from the arguments. This will split at the first
19177    # space.
19178    complete="$CC"
19179    path="${complete%% *}"
19180    tmp="$complete EOL"
19181    arguments="${tmp#* }"
19182
19183    # Cannot rely on the command "which" here since it doesn't always work.
19184    is_absolute_path=`$ECHO "$path" | $GREP ^/`
19185    if test -z "$is_absolute_path"; then
19186      # Path to executable is not absolute. Find it.
19187      IFS_save="$IFS"
19188      IFS=:
19189      for p in $PATH; do
19190        if test -f "$p/$path" && test -x "$p/$path"; then
19191          new_path="$p/$path"
19192          break
19193        fi
19194      done
19195      IFS="$IFS_save"
19196    else
19197      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CC (as $path) failed, using $path directly." >&5
19198$as_echo "$as_me: Resolving CC (as $path) failed, using $path directly." >&6;}
19199      new_path="$path"
19200    fi
19201
19202    if test "x$new_path" = x; then
19203      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
19204$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
19205      has_space=`$ECHO "$complete" | $GREP " "`
19206      if test "x$has_space" != x; then
19207        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19208$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19209      fi
19210      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
19211    fi
19212  fi
19213
19214  # Now join together the path and the arguments once again
19215  if test "x$arguments" != xEOL; then
19216    new_complete="$new_path ${arguments% *}"
19217  else
19218    new_complete="$new_path"
19219  fi
19220
19221  if test "x$complete" != "x$new_complete"; then
19222    CC="$new_complete"
19223    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
19224$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
19225  fi
19226
19227  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
19228$as_echo_n "checking resolved symbolic links for CC... " >&6; }
19229  TEST_COMPILER="$CC"
19230
19231  if test "x$OPENJDK_BUILD_OS" != xwindows; then
19232    # Follow a chain of symbolic links. Use readlink
19233    # where it exists, else fall back to horribly
19234    # complicated shell code.
19235    if test "x$READLINK_TESTED" != yes; then
19236      # On MacOSX there is a readlink tool with a different
19237      # purpose than the GNU readlink tool. Check the found readlink.
19238      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
19239      if test "x$ISGNU" = x; then
19240        # A readlink that we do not know how to use.
19241        # Are there other non-GNU readlinks out there?
19242        READLINK_TESTED=yes
19243        READLINK=
19244      fi
19245    fi
19246
19247    if test "x$READLINK" != x; then
19248      TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
19249    else
19250      # Save the current directory for restoring afterwards
19251      STARTDIR=$PWD
19252      COUNTER=0
19253      sym_link_dir=`$DIRNAME $TEST_COMPILER`
19254      sym_link_file=`$BASENAME $TEST_COMPILER`
19255      cd $sym_link_dir
19256      # Use -P flag to resolve symlinks in directories.
19257      cd `$THEPWDCMD -P`
19258      sym_link_dir=`$THEPWDCMD -P`
19259      # Resolve file symlinks
19260      while test $COUNTER -lt 20; do
19261        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
19262        if test "x$ISLINK" == x; then
19263          # This is not a symbolic link! We are done!
19264          break
19265        fi
19266        # Again resolve directory symlinks since the target of the just found
19267        # link could be in a different directory
19268        cd `$DIRNAME $ISLINK`
19269        sym_link_dir=`$THEPWDCMD -P`
19270        sym_link_file=`$BASENAME $ISLINK`
19271        let COUNTER=COUNTER+1
19272      done
19273      cd $STARTDIR
19274      TEST_COMPILER=$sym_link_dir/$sym_link_file
19275    fi
19276  fi
19277
19278  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
19279$as_echo "$TEST_COMPILER" >&6; }
19280  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
19281$as_echo_n "checking if CC is disguised ccache... " >&6; }
19282
19283  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
19284  if test "x$COMPILER_BASENAME" = "xccache"; then
19285    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
19286$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
19287    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
19288    # We want to control ccache invocation ourselves, so ignore this cc and try
19289    # searching again.
19290
19291    # Remove the path to the fake ccache cc from the PATH
19292    RETRY_COMPILER_SAVED_PATH="$PATH"
19293    COMPILER_DIRNAME=`$DIRNAME $CC`
19294    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
19295
19296    # Try again looking for our compiler
19297    if test -n "$ac_tool_prefix"; then
19298  for ac_prog in $COMPILER_CHECK_LIST
19299  do
19300    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
19301set dummy $ac_tool_prefix$ac_prog; ac_word=$2
19302{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19303$as_echo_n "checking for $ac_word... " >&6; }
19304if ${ac_cv_prog_PROPER_COMPILER_CC+:} false; then :
19305  $as_echo_n "(cached) " >&6
19306else
19307  if test -n "$PROPER_COMPILER_CC"; then
19308  ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
19309else
19310as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19311for as_dir in $PATH
19312do
19313  IFS=$as_save_IFS
19314  test -z "$as_dir" && as_dir=.
19315    for ac_exec_ext in '' $ac_executable_extensions; do
19316  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19317    ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
19318    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19319    break 2
19320  fi
19321done
19322  done
19323IFS=$as_save_IFS
19324
19325fi
19326fi
19327PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
19328if test -n "$PROPER_COMPILER_CC"; then
19329  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
19330$as_echo "$PROPER_COMPILER_CC" >&6; }
19331else
19332  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19333$as_echo "no" >&6; }
19334fi
19335
19336
19337    test -n "$PROPER_COMPILER_CC" && break
19338  done
19339fi
19340if test -z "$PROPER_COMPILER_CC"; then
19341  ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
19342  for ac_prog in $COMPILER_CHECK_LIST
19343do
19344  # Extract the first word of "$ac_prog", so it can be a program name with args.
19345set dummy $ac_prog; ac_word=$2
19346{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19347$as_echo_n "checking for $ac_word... " >&6; }
19348if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+:} false; then :
19349  $as_echo_n "(cached) " >&6
19350else
19351  if test -n "$ac_ct_PROPER_COMPILER_CC"; then
19352  ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
19353else
19354as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19355for as_dir in $PATH
19356do
19357  IFS=$as_save_IFS
19358  test -z "$as_dir" && as_dir=.
19359    for ac_exec_ext in '' $ac_executable_extensions; do
19360  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19361    ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
19362    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19363    break 2
19364  fi
19365done
19366  done
19367IFS=$as_save_IFS
19368
19369fi
19370fi
19371ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
19372if test -n "$ac_ct_PROPER_COMPILER_CC"; then
19373  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
19374$as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
19375else
19376  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19377$as_echo "no" >&6; }
19378fi
19379
19380
19381  test -n "$ac_ct_PROPER_COMPILER_CC" && break
19382done
19383
19384  if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
19385    PROPER_COMPILER_CC=""
19386  else
19387    case $cross_compiling:$ac_tool_warned in
19388yes:)
19389{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19390$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19391ac_tool_warned=yes ;;
19392esac
19393    PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
19394  fi
19395fi
19396
19397
19398  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19399
19400  # First separate the path from the arguments. This will split at the first
19401  # space.
19402  complete="$PROPER_COMPILER_CC"
19403  path="${complete%% *}"
19404  tmp="$complete EOL"
19405  arguments="${tmp#* }"
19406
19407  # Input might be given as Windows format, start by converting to
19408  # unix format.
19409  new_path=`$CYGPATH -u "$path"`
19410
19411  # Now try to locate executable using which
19412  new_path=`$WHICH "$new_path" 2> /dev/null`
19413  # bat and cmd files are not always considered executable in cygwin causing which
19414  # to not find them
19415  if test "x$new_path" = x \
19416      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19417      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19418    new_path=`$CYGPATH -u "$path"`
19419  fi
19420  if test "x$new_path" = x; then
19421    # Oops. Which didn't find the executable.
19422    # The splitting of arguments from the executable at a space might have been incorrect,
19423    # since paths with space are more likely in Windows. Give it another try with the whole
19424    # argument.
19425    path="$complete"
19426    arguments="EOL"
19427    new_path=`$CYGPATH -u "$path"`
19428    new_path=`$WHICH "$new_path" 2> /dev/null`
19429    # bat and cmd files are not always considered executable in cygwin causing which
19430    # to not find them
19431    if test "x$new_path" = x \
19432        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19433        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19434      new_path=`$CYGPATH -u "$path"`
19435    fi
19436    if test "x$new_path" = x; then
19437      # It's still not found. Now this is an unrecoverable error.
19438      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
19439$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
19440      has_space=`$ECHO "$complete" | $GREP " "`
19441      if test "x$has_space" != x; then
19442        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19443$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19444      fi
19445      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19446    fi
19447  fi
19448
19449  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19450  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19451  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19452  # "foo.exe" is OK but "foo" is an error.
19453  #
19454  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19455  # It is also a way to make sure we got the proper file name for the real test later on.
19456  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19457  if test "x$test_shortpath" = x; then
19458    # Short path failed, file does not exist as specified.
19459    # Try adding .exe or .cmd
19460    if test -f "${new_path}.exe"; then
19461      input_to_shortpath="${new_path}.exe"
19462    elif test -f "${new_path}.cmd"; then
19463      input_to_shortpath="${new_path}.cmd"
19464    else
19465      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
19466$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
19467      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19468$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19469      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19470    fi
19471  else
19472    input_to_shortpath="$new_path"
19473  fi
19474
19475  # Call helper function which possibly converts this using DOS-style short mode.
19476  # If so, the updated path is stored in $new_path.
19477  new_path="$input_to_shortpath"
19478
19479  input_path="$input_to_shortpath"
19480  # Check if we need to convert this using DOS-style short mode. If the path
19481  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19482  # take no chances and rewrite it.
19483  # Note: m4 eats our [], so we need to use [ and ] instead.
19484  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19485  if test "x$has_forbidden_chars" != x; then
19486    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19487    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19488    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19489    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19490      # Going to short mode and back again did indeed matter. Since short mode is
19491      # case insensitive, let's make it lowercase to improve readability.
19492      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19493      # Now convert it back to Unix-stile (cygpath)
19494      input_path=`$CYGPATH -u "$shortmode_path"`
19495      new_path="$input_path"
19496    fi
19497  fi
19498
19499  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19500  if test "x$test_cygdrive_prefix" = x; then
19501    # As a simple fix, exclude /usr/bin since it's not a real path.
19502    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19503      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19504      # a path prefixed by /cygdrive for fixpath to work.
19505      new_path="$CYGWIN_ROOT_PATH$input_path"
19506    fi
19507  fi
19508
19509  # remove trailing .exe if any
19510  new_path="${new_path/%.exe/}"
19511
19512  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19513
19514  # First separate the path from the arguments. This will split at the first
19515  # space.
19516  complete="$PROPER_COMPILER_CC"
19517  path="${complete%% *}"
19518  tmp="$complete EOL"
19519  arguments="${tmp#* }"
19520
19521  # Input might be given as Windows format, start by converting to
19522  # unix format.
19523  new_path="$path"
19524
19525  windows_path="$new_path"
19526  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19527    unix_path=`$CYGPATH -u "$windows_path"`
19528    new_path="$unix_path"
19529  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19530    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19531    new_path="$unix_path"
19532  fi
19533
19534
19535  # Now try to locate executable using which
19536  new_path=`$WHICH "$new_path" 2> /dev/null`
19537
19538  if test "x$new_path" = x; then
19539    # Oops. Which didn't find the executable.
19540    # The splitting of arguments from the executable at a space might have been incorrect,
19541    # since paths with space are more likely in Windows. Give it another try with the whole
19542    # argument.
19543    path="$complete"
19544    arguments="EOL"
19545    new_path="$path"
19546
19547  windows_path="$new_path"
19548  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19549    unix_path=`$CYGPATH -u "$windows_path"`
19550    new_path="$unix_path"
19551  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19552    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19553    new_path="$unix_path"
19554  fi
19555
19556
19557    new_path=`$WHICH "$new_path" 2> /dev/null`
19558
19559    if test "x$new_path" = x; then
19560      # It's still not found. Now this is an unrecoverable error.
19561      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
19562$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
19563      has_space=`$ECHO "$complete" | $GREP " "`
19564      if test "x$has_space" != x; then
19565        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19566$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19567      fi
19568      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19569    fi
19570  fi
19571
19572  # Now new_path has a complete unix path to the binary
19573  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19574    # Keep paths in /bin as-is, but remove trailing .exe if any
19575    new_path="${new_path/%.exe/}"
19576    # Do not save /bin paths to all_fixpath_prefixes!
19577  else
19578    # Not in mixed or Windows style, start by that.
19579    new_path=`cmd //c echo $new_path`
19580
19581  input_path="$new_path"
19582  # Check if we need to convert this using DOS-style short mode. If the path
19583  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19584  # take no chances and rewrite it.
19585  # Note: m4 eats our [], so we need to use [ and ] instead.
19586  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19587  if test "x$has_forbidden_chars" != x; then
19588    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19589    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19590  fi
19591
19592    # Output is in $new_path
19593
19594  windows_path="$new_path"
19595  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19596    unix_path=`$CYGPATH -u "$windows_path"`
19597    new_path="$unix_path"
19598  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19599    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19600    new_path="$unix_path"
19601  fi
19602
19603    # remove trailing .exe if any
19604    new_path="${new_path/%.exe/}"
19605
19606    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19607    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19608  fi
19609
19610  else
19611    # We're on a posix platform. Hooray! :)
19612    # First separate the path from the arguments. This will split at the first
19613    # space.
19614    complete="$PROPER_COMPILER_CC"
19615    path="${complete%% *}"
19616    tmp="$complete EOL"
19617    arguments="${tmp#* }"
19618
19619    # Cannot rely on the command "which" here since it doesn't always work.
19620    is_absolute_path=`$ECHO "$path" | $GREP ^/`
19621    if test -z "$is_absolute_path"; then
19622      # Path to executable is not absolute. Find it.
19623      IFS_save="$IFS"
19624      IFS=:
19625      for p in $PATH; do
19626        if test -f "$p/$path" && test -x "$p/$path"; then
19627          new_path="$p/$path"
19628          break
19629        fi
19630      done
19631      IFS="$IFS_save"
19632    else
19633      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&5
19634$as_echo "$as_me: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&6;}
19635      new_path="$path"
19636    fi
19637
19638    if test "x$new_path" = x; then
19639      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
19640$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
19641      has_space=`$ECHO "$complete" | $GREP " "`
19642      if test "x$has_space" != x; then
19643        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19644$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19645      fi
19646      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19647    fi
19648  fi
19649
19650  # Now join together the path and the arguments once again
19651  if test "x$arguments" != xEOL; then
19652    new_complete="$new_path ${arguments% *}"
19653  else
19654    new_complete="$new_path"
19655  fi
19656
19657  if test "x$complete" != "x$new_complete"; then
19658    PROPER_COMPILER_CC="$new_complete"
19659    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
19660$as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
19661  fi
19662
19663    PATH="$RETRY_COMPILER_SAVED_PATH"
19664
19665    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
19666$as_echo_n "checking for resolved symbolic links for CC... " >&6; }
19667
19668  if test "x$OPENJDK_BUILD_OS" != xwindows; then
19669    # Follow a chain of symbolic links. Use readlink
19670    # where it exists, else fall back to horribly
19671    # complicated shell code.
19672    if test "x$READLINK_TESTED" != yes; then
19673      # On MacOSX there is a readlink tool with a different
19674      # purpose than the GNU readlink tool. Check the found readlink.
19675      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
19676      if test "x$ISGNU" = x; then
19677        # A readlink that we do not know how to use.
19678        # Are there other non-GNU readlinks out there?
19679        READLINK_TESTED=yes
19680        READLINK=
19681      fi
19682    fi
19683
19684    if test "x$READLINK" != x; then
19685      PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
19686    else
19687      # Save the current directory for restoring afterwards
19688      STARTDIR=$PWD
19689      COUNTER=0
19690      sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
19691      sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
19692      cd $sym_link_dir
19693      # Use -P flag to resolve symlinks in directories.
19694      cd `$THEPWDCMD -P`
19695      sym_link_dir=`$THEPWDCMD -P`
19696      # Resolve file symlinks
19697      while test $COUNTER -lt 20; do
19698        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
19699        if test "x$ISLINK" == x; then
19700          # This is not a symbolic link! We are done!
19701          break
19702        fi
19703        # Again resolve directory symlinks since the target of the just found
19704        # link could be in a different directory
19705        cd `$DIRNAME $ISLINK`
19706        sym_link_dir=`$THEPWDCMD -P`
19707        sym_link_file=`$BASENAME $ISLINK`
19708        let COUNTER=COUNTER+1
19709      done
19710      cd $STARTDIR
19711      PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
19712    fi
19713  fi
19714
19715    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
19716$as_echo "$PROPER_COMPILER_CC" >&6; }
19717    CC="$PROPER_COMPILER_CC"
19718  else
19719    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
19720$as_echo "no, keeping CC" >&6; }
19721    CC="$TEST_COMPILER"
19722  fi
19723
19724  COMPILER=$CC
19725  COMPILER_NAME=$COMPILER_NAME
19726
19727  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
19728    # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
19729    COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
19730    $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
19731    if test $? -ne 0; then
19732      GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
19733
19734      { $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
19735$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
19736      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
19737$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
19738      as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
19739    else
19740      COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
19741      COMPILER_VENDOR="Sun Studio"
19742    fi
19743  elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
19744    # First line typically looks something like:
19745    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
19746    COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
19747    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
19748    COMPILER_VENDOR="Microsoft CL.EXE"
19749    COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
19750    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
19751      if test "x$COMPILER_CPU_TEST" != "x80x86"; then
19752        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
19753      fi
19754    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
19755      if test "x$COMPILER_CPU_TEST" != "xx64"; then
19756        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
19757      fi
19758    fi
19759  else
19760    COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
19761    # Check that this is likely to be GCC.
19762    $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
19763    if test $? -ne 0; then
19764      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
19765$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
19766      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
19767$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
19768      as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
19769    fi
19770
19771    # First line typically looks something like:
19772    # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
19773    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
19774    COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
19775  fi
19776  # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
19777  CC_VERSION="$COMPILER_VERSION"
19778  # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
19779  CC_VENDOR="$COMPILER_VENDOR"
19780
19781  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
19782$as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
19783
19784
19785  # Now that we have resolved CC ourself, let autoconf have its go at it
19786  ac_ext=c
19787ac_cpp='$CPP $CPPFLAGS'
19788ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19789ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19790ac_compiler_gnu=$ac_cv_c_compiler_gnu
19791if test -n "$ac_tool_prefix"; then
19792  for ac_prog in $CC
19793  do
19794    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
19795set dummy $ac_tool_prefix$ac_prog; ac_word=$2
19796{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19797$as_echo_n "checking for $ac_word... " >&6; }
19798if ${ac_cv_prog_CC+:} false; then :
19799  $as_echo_n "(cached) " >&6
19800else
19801  if test -n "$CC"; then
19802  ac_cv_prog_CC="$CC" # Let the user override the test.
19803else
19804as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19805for as_dir in $PATH
19806do
19807  IFS=$as_save_IFS
19808  test -z "$as_dir" && as_dir=.
19809    for ac_exec_ext in '' $ac_executable_extensions; do
19810  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19811    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
19812    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19813    break 2
19814  fi
19815done
19816  done
19817IFS=$as_save_IFS
19818
19819fi
19820fi
19821CC=$ac_cv_prog_CC
19822if test -n "$CC"; then
19823  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
19824$as_echo "$CC" >&6; }
19825else
19826  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19827$as_echo "no" >&6; }
19828fi
19829
19830
19831    test -n "$CC" && break
19832  done
19833fi
19834if test -z "$CC"; then
19835  ac_ct_CC=$CC
19836  for ac_prog in $CC
19837do
19838  # Extract the first word of "$ac_prog", so it can be a program name with args.
19839set dummy $ac_prog; ac_word=$2
19840{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19841$as_echo_n "checking for $ac_word... " >&6; }
19842if ${ac_cv_prog_ac_ct_CC+:} false; then :
19843  $as_echo_n "(cached) " >&6
19844else
19845  if test -n "$ac_ct_CC"; then
19846  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
19847else
19848as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19849for as_dir in $PATH
19850do
19851  IFS=$as_save_IFS
19852  test -z "$as_dir" && as_dir=.
19853    for ac_exec_ext in '' $ac_executable_extensions; do
19854  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19855    ac_cv_prog_ac_ct_CC="$ac_prog"
19856    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19857    break 2
19858  fi
19859done
19860  done
19861IFS=$as_save_IFS
19862
19863fi
19864fi
19865ac_ct_CC=$ac_cv_prog_ac_ct_CC
19866if test -n "$ac_ct_CC"; then
19867  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
19868$as_echo "$ac_ct_CC" >&6; }
19869else
19870  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19871$as_echo "no" >&6; }
19872fi
19873
19874
19875  test -n "$ac_ct_CC" && break
19876done
19877
19878  if test "x$ac_ct_CC" = x; then
19879    CC=""
19880  else
19881    case $cross_compiling:$ac_tool_warned in
19882yes:)
19883{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19884$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19885ac_tool_warned=yes ;;
19886esac
19887    CC=$ac_ct_CC
19888  fi
19889fi
19890
19891
19892test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19893$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19894as_fn_error $? "no acceptable C compiler found in \$PATH
19895See \`config.log' for more details" "$LINENO" 5; }
19896
19897# Provide some information about the compiler.
19898$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
19899set X $ac_compile
19900ac_compiler=$2
19901for ac_option in --version -v -V -qversion; do
19902  { { ac_try="$ac_compiler $ac_option >&5"
19903case "(($ac_try" in
19904  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19905  *) ac_try_echo=$ac_try;;
19906esac
19907eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19908$as_echo "$ac_try_echo"; } >&5
19909  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
19910  ac_status=$?
19911  if test -s conftest.err; then
19912    sed '10a\
19913... rest of stderr output deleted ...
19914         10q' conftest.err >conftest.er1
19915    cat conftest.er1 >&5
19916  fi
19917  rm -f conftest.er1 conftest.err
19918  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19919  test $ac_status = 0; }
19920done
19921
19922cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19923/* end confdefs.h.  */
19924
19925int
19926main ()
19927{
19928
19929  ;
19930  return 0;
19931}
19932_ACEOF
19933ac_clean_files_save=$ac_clean_files
19934ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
19935# Try to create an executable without -o first, disregard a.out.
19936# It will help us diagnose broken compilers, and finding out an intuition
19937# of exeext.
19938{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
19939$as_echo_n "checking whether the C compiler works... " >&6; }
19940ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
19941
19942# The possible output files:
19943ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
19944
19945ac_rmfiles=
19946for ac_file in $ac_files
19947do
19948  case $ac_file in
19949    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
19950    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
19951  esac
19952done
19953rm -f $ac_rmfiles
19954
19955if { { ac_try="$ac_link_default"
19956case "(($ac_try" in
19957  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19958  *) ac_try_echo=$ac_try;;
19959esac
19960eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19961$as_echo "$ac_try_echo"; } >&5
19962  (eval "$ac_link_default") 2>&5
19963  ac_status=$?
19964  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19965  test $ac_status = 0; }; then :
19966  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
19967# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
19968# in a Makefile.  We should not override ac_cv_exeext if it was cached,
19969# so that the user can short-circuit this test for compilers unknown to
19970# Autoconf.
19971for ac_file in $ac_files ''
19972do
19973  test -f "$ac_file" || continue
19974  case $ac_file in
19975    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
19976	;;
19977    [ab].out )
19978	# We found the default executable, but exeext='' is most
19979	# certainly right.
19980	break;;
19981    *.* )
19982	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
19983	then :; else
19984	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
19985	fi
19986	# We set ac_cv_exeext here because the later test for it is not
19987	# safe: cross compilers may not add the suffix if given an `-o'
19988	# argument, so we may need to know it at that point already.
19989	# Even if this section looks crufty: it has the advantage of
19990	# actually working.
19991	break;;
19992    * )
19993	break;;
19994  esac
19995done
19996test "$ac_cv_exeext" = no && ac_cv_exeext=
19997
19998else
19999  ac_file=''
20000fi
20001if test -z "$ac_file"; then :
20002  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20003$as_echo "no" >&6; }
20004$as_echo "$as_me: failed program was:" >&5
20005sed 's/^/| /' conftest.$ac_ext >&5
20006
20007{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20008$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20009as_fn_error 77 "C compiler cannot create executables
20010See \`config.log' for more details" "$LINENO" 5; }
20011else
20012  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20013$as_echo "yes" >&6; }
20014fi
20015{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
20016$as_echo_n "checking for C compiler default output file name... " >&6; }
20017{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
20018$as_echo "$ac_file" >&6; }
20019ac_exeext=$ac_cv_exeext
20020
20021rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
20022ac_clean_files=$ac_clean_files_save
20023{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
20024$as_echo_n "checking for suffix of executables... " >&6; }
20025if { { ac_try="$ac_link"
20026case "(($ac_try" in
20027  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20028  *) ac_try_echo=$ac_try;;
20029esac
20030eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20031$as_echo "$ac_try_echo"; } >&5
20032  (eval "$ac_link") 2>&5
20033  ac_status=$?
20034  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20035  test $ac_status = 0; }; then :
20036  # If both `conftest.exe' and `conftest' are `present' (well, observable)
20037# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
20038# work properly (i.e., refer to `conftest.exe'), while it won't with
20039# `rm'.
20040for ac_file in conftest.exe conftest conftest.*; do
20041  test -f "$ac_file" || continue
20042  case $ac_file in
20043    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
20044    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
20045	  break;;
20046    * ) break;;
20047  esac
20048done
20049else
20050  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20051$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20052as_fn_error $? "cannot compute suffix of executables: cannot compile and link
20053See \`config.log' for more details" "$LINENO" 5; }
20054fi
20055rm -f conftest conftest$ac_cv_exeext
20056{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
20057$as_echo "$ac_cv_exeext" >&6; }
20058
20059rm -f conftest.$ac_ext
20060EXEEXT=$ac_cv_exeext
20061ac_exeext=$EXEEXT
20062cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20063/* end confdefs.h.  */
20064#include <stdio.h>
20065int
20066main ()
20067{
20068FILE *f = fopen ("conftest.out", "w");
20069 return ferror (f) || fclose (f) != 0;
20070
20071  ;
20072  return 0;
20073}
20074_ACEOF
20075ac_clean_files="$ac_clean_files conftest.out"
20076# Check that the compiler produces executables we can run.  If not, either
20077# the compiler is broken, or we cross compile.
20078{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
20079$as_echo_n "checking whether we are cross compiling... " >&6; }
20080if test "$cross_compiling" != yes; then
20081  { { ac_try="$ac_link"
20082case "(($ac_try" in
20083  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20084  *) ac_try_echo=$ac_try;;
20085esac
20086eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20087$as_echo "$ac_try_echo"; } >&5
20088  (eval "$ac_link") 2>&5
20089  ac_status=$?
20090  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20091  test $ac_status = 0; }
20092  if { ac_try='./conftest$ac_cv_exeext'
20093  { { case "(($ac_try" in
20094  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20095  *) ac_try_echo=$ac_try;;
20096esac
20097eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20098$as_echo "$ac_try_echo"; } >&5
20099  (eval "$ac_try") 2>&5
20100  ac_status=$?
20101  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20102  test $ac_status = 0; }; }; then
20103    cross_compiling=no
20104  else
20105    if test "$cross_compiling" = maybe; then
20106	cross_compiling=yes
20107    else
20108	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20109$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20110as_fn_error $? "cannot run C compiled programs.
20111If you meant to cross compile, use \`--host'.
20112See \`config.log' for more details" "$LINENO" 5; }
20113    fi
20114  fi
20115fi
20116{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
20117$as_echo "$cross_compiling" >&6; }
20118
20119rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
20120ac_clean_files=$ac_clean_files_save
20121{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
20122$as_echo_n "checking for suffix of object files... " >&6; }
20123if ${ac_cv_objext+:} false; then :
20124  $as_echo_n "(cached) " >&6
20125else
20126  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20127/* end confdefs.h.  */
20128
20129int
20130main ()
20131{
20132
20133  ;
20134  return 0;
20135}
20136_ACEOF
20137rm -f conftest.o conftest.obj
20138if { { ac_try="$ac_compile"
20139case "(($ac_try" in
20140  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20141  *) ac_try_echo=$ac_try;;
20142esac
20143eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20144$as_echo "$ac_try_echo"; } >&5
20145  (eval "$ac_compile") 2>&5
20146  ac_status=$?
20147  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20148  test $ac_status = 0; }; then :
20149  for ac_file in conftest.o conftest.obj conftest.*; do
20150  test -f "$ac_file" || continue;
20151  case $ac_file in
20152    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
20153    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
20154       break;;
20155  esac
20156done
20157else
20158  $as_echo "$as_me: failed program was:" >&5
20159sed 's/^/| /' conftest.$ac_ext >&5
20160
20161{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20162$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20163as_fn_error $? "cannot compute suffix of object files: cannot compile
20164See \`config.log' for more details" "$LINENO" 5; }
20165fi
20166rm -f conftest.$ac_cv_objext conftest.$ac_ext
20167fi
20168{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
20169$as_echo "$ac_cv_objext" >&6; }
20170OBJEXT=$ac_cv_objext
20171ac_objext=$OBJEXT
20172{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
20173$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
20174if ${ac_cv_c_compiler_gnu+:} false; then :
20175  $as_echo_n "(cached) " >&6
20176else
20177  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20178/* end confdefs.h.  */
20179
20180int
20181main ()
20182{
20183#ifndef __GNUC__
20184       choke me
20185#endif
20186
20187  ;
20188  return 0;
20189}
20190_ACEOF
20191if ac_fn_c_try_compile "$LINENO"; then :
20192  ac_compiler_gnu=yes
20193else
20194  ac_compiler_gnu=no
20195fi
20196rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20197ac_cv_c_compiler_gnu=$ac_compiler_gnu
20198
20199fi
20200{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
20201$as_echo "$ac_cv_c_compiler_gnu" >&6; }
20202if test $ac_compiler_gnu = yes; then
20203  GCC=yes
20204else
20205  GCC=
20206fi
20207ac_test_CFLAGS=${CFLAGS+set}
20208ac_save_CFLAGS=$CFLAGS
20209{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
20210$as_echo_n "checking whether $CC accepts -g... " >&6; }
20211if ${ac_cv_prog_cc_g+:} false; then :
20212  $as_echo_n "(cached) " >&6
20213else
20214  ac_save_c_werror_flag=$ac_c_werror_flag
20215   ac_c_werror_flag=yes
20216   ac_cv_prog_cc_g=no
20217   CFLAGS="-g"
20218   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20219/* end confdefs.h.  */
20220
20221int
20222main ()
20223{
20224
20225  ;
20226  return 0;
20227}
20228_ACEOF
20229if ac_fn_c_try_compile "$LINENO"; then :
20230  ac_cv_prog_cc_g=yes
20231else
20232  CFLAGS=""
20233      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20234/* end confdefs.h.  */
20235
20236int
20237main ()
20238{
20239
20240  ;
20241  return 0;
20242}
20243_ACEOF
20244if ac_fn_c_try_compile "$LINENO"; then :
20245
20246else
20247  ac_c_werror_flag=$ac_save_c_werror_flag
20248	 CFLAGS="-g"
20249	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20250/* end confdefs.h.  */
20251
20252int
20253main ()
20254{
20255
20256  ;
20257  return 0;
20258}
20259_ACEOF
20260if ac_fn_c_try_compile "$LINENO"; then :
20261  ac_cv_prog_cc_g=yes
20262fi
20263rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20264fi
20265rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20266fi
20267rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20268   ac_c_werror_flag=$ac_save_c_werror_flag
20269fi
20270{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
20271$as_echo "$ac_cv_prog_cc_g" >&6; }
20272if test "$ac_test_CFLAGS" = set; then
20273  CFLAGS=$ac_save_CFLAGS
20274elif test $ac_cv_prog_cc_g = yes; then
20275  if test "$GCC" = yes; then
20276    CFLAGS="-g -O2"
20277  else
20278    CFLAGS="-g"
20279  fi
20280else
20281  if test "$GCC" = yes; then
20282    CFLAGS="-O2"
20283  else
20284    CFLAGS=
20285  fi
20286fi
20287{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
20288$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
20289if ${ac_cv_prog_cc_c89+:} false; then :
20290  $as_echo_n "(cached) " >&6
20291else
20292  ac_cv_prog_cc_c89=no
20293ac_save_CC=$CC
20294cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20295/* end confdefs.h.  */
20296#include <stdarg.h>
20297#include <stdio.h>
20298struct stat;
20299/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
20300struct buf { int x; };
20301FILE * (*rcsopen) (struct buf *, struct stat *, int);
20302static char *e (p, i)
20303     char **p;
20304     int i;
20305{
20306  return p[i];
20307}
20308static char *f (char * (*g) (char **, int), char **p, ...)
20309{
20310  char *s;
20311  va_list v;
20312  va_start (v,p);
20313  s = g (p, va_arg (v,int));
20314  va_end (v);
20315  return s;
20316}
20317
20318/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
20319   function prototypes and stuff, but not '\xHH' hex character constants.
20320   These don't provoke an error unfortunately, instead are silently treated
20321   as 'x'.  The following induces an error, until -std is added to get
20322   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
20323   array size at least.  It's necessary to write '\x00'==0 to get something
20324   that's true only with -std.  */
20325int osf4_cc_array ['\x00' == 0 ? 1 : -1];
20326
20327/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
20328   inside strings and character constants.  */
20329#define FOO(x) 'x'
20330int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
20331
20332int test (int i, double x);
20333struct s1 {int (*f) (int a);};
20334struct s2 {int (*f) (double a);};
20335int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
20336int argc;
20337char **argv;
20338int
20339main ()
20340{
20341return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
20342  ;
20343  return 0;
20344}
20345_ACEOF
20346for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
20347	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
20348do
20349  CC="$ac_save_CC $ac_arg"
20350  if ac_fn_c_try_compile "$LINENO"; then :
20351  ac_cv_prog_cc_c89=$ac_arg
20352fi
20353rm -f core conftest.err conftest.$ac_objext
20354  test "x$ac_cv_prog_cc_c89" != "xno" && break
20355done
20356rm -f conftest.$ac_ext
20357CC=$ac_save_CC
20358
20359fi
20360# AC_CACHE_VAL
20361case "x$ac_cv_prog_cc_c89" in
20362  x)
20363    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
20364$as_echo "none needed" >&6; } ;;
20365  xno)
20366    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
20367$as_echo "unsupported" >&6; } ;;
20368  *)
20369    CC="$CC $ac_cv_prog_cc_c89"
20370    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
20371$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
20372esac
20373if test "x$ac_cv_prog_cc_c89" != xno; then :
20374
20375fi
20376
20377ac_ext=cpp
20378ac_cpp='$CXXCPP $CPPFLAGS'
20379ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20380ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20381ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20382
20383
20384  ### Locate C++ compiler (CXX)
20385
20386  if test "x$CXX" != x; then
20387    COMPILER_CHECK_LIST="$CXX"
20388  elif test "x$OPENJDK_TARGET_OS" = "xwindows"; then
20389    COMPILER_CHECK_LIST="cl"
20390  elif test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
20391    COMPILER_CHECK_LIST="CC g++"
20392  else
20393    COMPILER_CHECK_LIST="g++ CC"
20394  fi
20395
20396
20397  COMPILER_NAME=C++
20398
20399  CXX=
20400  # If TOOLS_DIR is set, check for all compiler names in there first
20401  # before checking the rest of the PATH.
20402  if test -n "$TOOLS_DIR"; then
20403    PATH_save="$PATH"
20404    PATH="$TOOLS_DIR"
20405    for ac_prog in $COMPILER_CHECK_LIST
20406do
20407  # Extract the first word of "$ac_prog", so it can be a program name with args.
20408set dummy $ac_prog; ac_word=$2
20409{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20410$as_echo_n "checking for $ac_word... " >&6; }
20411if ${ac_cv_path_TOOLS_DIR_CXX+:} false; then :
20412  $as_echo_n "(cached) " >&6
20413else
20414  case $TOOLS_DIR_CXX in
20415  [\\/]* | ?:[\\/]*)
20416  ac_cv_path_TOOLS_DIR_CXX="$TOOLS_DIR_CXX" # Let the user override the test with a path.
20417  ;;
20418  *)
20419  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20420for as_dir in $PATH
20421do
20422  IFS=$as_save_IFS
20423  test -z "$as_dir" && as_dir=.
20424    for ac_exec_ext in '' $ac_executable_extensions; do
20425  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20426    ac_cv_path_TOOLS_DIR_CXX="$as_dir/$ac_word$ac_exec_ext"
20427    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20428    break 2
20429  fi
20430done
20431  done
20432IFS=$as_save_IFS
20433
20434  ;;
20435esac
20436fi
20437TOOLS_DIR_CXX=$ac_cv_path_TOOLS_DIR_CXX
20438if test -n "$TOOLS_DIR_CXX"; then
20439  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CXX" >&5
20440$as_echo "$TOOLS_DIR_CXX" >&6; }
20441else
20442  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20443$as_echo "no" >&6; }
20444fi
20445
20446
20447  test -n "$TOOLS_DIR_CXX" && break
20448done
20449
20450    CXX=$TOOLS_DIR_CXX
20451    PATH="$PATH_save"
20452  fi
20453
20454  # AC_PATH_PROGS can't be run multiple times with the same variable,
20455  # so create a new name for this run.
20456  if test "x$CXX" = x; then
20457    for ac_prog in $COMPILER_CHECK_LIST
20458do
20459  # Extract the first word of "$ac_prog", so it can be a program name with args.
20460set dummy $ac_prog; ac_word=$2
20461{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20462$as_echo_n "checking for $ac_word... " >&6; }
20463if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
20464  $as_echo_n "(cached) " >&6
20465else
20466  case $POTENTIAL_CXX in
20467  [\\/]* | ?:[\\/]*)
20468  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
20469  ;;
20470  *)
20471  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20472for as_dir in $PATH
20473do
20474  IFS=$as_save_IFS
20475  test -z "$as_dir" && as_dir=.
20476    for ac_exec_ext in '' $ac_executable_extensions; do
20477  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20478    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
20479    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20480    break 2
20481  fi
20482done
20483  done
20484IFS=$as_save_IFS
20485
20486  ;;
20487esac
20488fi
20489POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
20490if test -n "$POTENTIAL_CXX"; then
20491  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
20492$as_echo "$POTENTIAL_CXX" >&6; }
20493else
20494  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20495$as_echo "no" >&6; }
20496fi
20497
20498
20499  test -n "$POTENTIAL_CXX" && break
20500done
20501
20502    CXX=$POTENTIAL_CXX
20503  fi
20504
20505  if test "x$CXX" = x; then
20506
20507  # Print a helpful message on how to acquire the necessary build dependency.
20508  # devkit is the help tag: freetyp2, cups, pulse, alsa etc
20509  MISSING_DEPENDENCY=devkit
20510  PKGHANDLER_COMMAND=
20511
20512  case $PKGHANDLER in
20513    apt-get)
20514      apt_help     $MISSING_DEPENDENCY ;;
20515    yum)
20516      yum_help     $MISSING_DEPENDENCY ;;
20517    port)
20518      port_help    $MISSING_DEPENDENCY ;;
20519    pkgutil)
20520      pkgutil_help $MISSING_DEPENDENCY ;;
20521    pkgadd)
20522      pkgadd_help  $MISSING_DEPENDENCY ;;
20523    * )
20524      break ;;
20525  esac
20526
20527  if test "x$PKGHANDLER_COMMAND" != x; then
20528    HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
20529  fi
20530
20531    as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
20532  fi
20533
20534  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20535
20536  # First separate the path from the arguments. This will split at the first
20537  # space.
20538  complete="$CXX"
20539  path="${complete%% *}"
20540  tmp="$complete EOL"
20541  arguments="${tmp#* }"
20542
20543  # Input might be given as Windows format, start by converting to
20544  # unix format.
20545  new_path=`$CYGPATH -u "$path"`
20546
20547  # Now try to locate executable using which
20548  new_path=`$WHICH "$new_path" 2> /dev/null`
20549  # bat and cmd files are not always considered executable in cygwin causing which
20550  # to not find them
20551  if test "x$new_path" = x \
20552      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20553      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20554    new_path=`$CYGPATH -u "$path"`
20555  fi
20556  if test "x$new_path" = x; then
20557    # Oops. Which didn't find the executable.
20558    # The splitting of arguments from the executable at a space might have been incorrect,
20559    # since paths with space are more likely in Windows. Give it another try with the whole
20560    # argument.
20561    path="$complete"
20562    arguments="EOL"
20563    new_path=`$CYGPATH -u "$path"`
20564    new_path=`$WHICH "$new_path" 2> /dev/null`
20565    # bat and cmd files are not always considered executable in cygwin causing which
20566    # to not find them
20567    if test "x$new_path" = x \
20568        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20569        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20570      new_path=`$CYGPATH -u "$path"`
20571    fi
20572    if test "x$new_path" = x; then
20573      # It's still not found. Now this is an unrecoverable error.
20574      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
20575$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
20576      has_space=`$ECHO "$complete" | $GREP " "`
20577      if test "x$has_space" != x; then
20578        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20579$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20580      fi
20581      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20582    fi
20583  fi
20584
20585  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20586  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20587  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20588  # "foo.exe" is OK but "foo" is an error.
20589  #
20590  # This test is therefore slightly more accurate than "test -f" to check for file presence.
20591  # It is also a way to make sure we got the proper file name for the real test later on.
20592  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20593  if test "x$test_shortpath" = x; then
20594    # Short path failed, file does not exist as specified.
20595    # Try adding .exe or .cmd
20596    if test -f "${new_path}.exe"; then
20597      input_to_shortpath="${new_path}.exe"
20598    elif test -f "${new_path}.cmd"; then
20599      input_to_shortpath="${new_path}.cmd"
20600    else
20601      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
20602$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
20603      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20604$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20605      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20606    fi
20607  else
20608    input_to_shortpath="$new_path"
20609  fi
20610
20611  # Call helper function which possibly converts this using DOS-style short mode.
20612  # If so, the updated path is stored in $new_path.
20613  new_path="$input_to_shortpath"
20614
20615  input_path="$input_to_shortpath"
20616  # Check if we need to convert this using DOS-style short mode. If the path
20617  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20618  # take no chances and rewrite it.
20619  # Note: m4 eats our [], so we need to use [ and ] instead.
20620  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20621  if test "x$has_forbidden_chars" != x; then
20622    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20623    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20624    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20625    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20626      # Going to short mode and back again did indeed matter. Since short mode is
20627      # case insensitive, let's make it lowercase to improve readability.
20628      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20629      # Now convert it back to Unix-stile (cygpath)
20630      input_path=`$CYGPATH -u "$shortmode_path"`
20631      new_path="$input_path"
20632    fi
20633  fi
20634
20635  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20636  if test "x$test_cygdrive_prefix" = x; then
20637    # As a simple fix, exclude /usr/bin since it's not a real path.
20638    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20639      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20640      # a path prefixed by /cygdrive for fixpath to work.
20641      new_path="$CYGWIN_ROOT_PATH$input_path"
20642    fi
20643  fi
20644
20645  # remove trailing .exe if any
20646  new_path="${new_path/%.exe/}"
20647
20648  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20649
20650  # First separate the path from the arguments. This will split at the first
20651  # space.
20652  complete="$CXX"
20653  path="${complete%% *}"
20654  tmp="$complete EOL"
20655  arguments="${tmp#* }"
20656
20657  # Input might be given as Windows format, start by converting to
20658  # unix format.
20659  new_path="$path"
20660
20661  windows_path="$new_path"
20662  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20663    unix_path=`$CYGPATH -u "$windows_path"`
20664    new_path="$unix_path"
20665  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20666    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20667    new_path="$unix_path"
20668  fi
20669
20670
20671  # Now try to locate executable using which
20672  new_path=`$WHICH "$new_path" 2> /dev/null`
20673
20674  if test "x$new_path" = x; then
20675    # Oops. Which didn't find the executable.
20676    # The splitting of arguments from the executable at a space might have been incorrect,
20677    # since paths with space are more likely in Windows. Give it another try with the whole
20678    # argument.
20679    path="$complete"
20680    arguments="EOL"
20681    new_path="$path"
20682
20683  windows_path="$new_path"
20684  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20685    unix_path=`$CYGPATH -u "$windows_path"`
20686    new_path="$unix_path"
20687  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20688    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20689    new_path="$unix_path"
20690  fi
20691
20692
20693    new_path=`$WHICH "$new_path" 2> /dev/null`
20694
20695    if test "x$new_path" = x; then
20696      # It's still not found. Now this is an unrecoverable error.
20697      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
20698$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
20699      has_space=`$ECHO "$complete" | $GREP " "`
20700      if test "x$has_space" != x; then
20701        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20702$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20703      fi
20704      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20705    fi
20706  fi
20707
20708  # Now new_path has a complete unix path to the binary
20709  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20710    # Keep paths in /bin as-is, but remove trailing .exe if any
20711    new_path="${new_path/%.exe/}"
20712    # Do not save /bin paths to all_fixpath_prefixes!
20713  else
20714    # Not in mixed or Windows style, start by that.
20715    new_path=`cmd //c echo $new_path`
20716
20717  input_path="$new_path"
20718  # Check if we need to convert this using DOS-style short mode. If the path
20719  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20720  # take no chances and rewrite it.
20721  # Note: m4 eats our [], so we need to use [ and ] instead.
20722  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20723  if test "x$has_forbidden_chars" != x; then
20724    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20725    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20726  fi
20727
20728    # Output is in $new_path
20729
20730  windows_path="$new_path"
20731  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20732    unix_path=`$CYGPATH -u "$windows_path"`
20733    new_path="$unix_path"
20734  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20735    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20736    new_path="$unix_path"
20737  fi
20738
20739    # remove trailing .exe if any
20740    new_path="${new_path/%.exe/}"
20741
20742    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20743    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20744  fi
20745
20746  else
20747    # We're on a posix platform. Hooray! :)
20748    # First separate the path from the arguments. This will split at the first
20749    # space.
20750    complete="$CXX"
20751    path="${complete%% *}"
20752    tmp="$complete EOL"
20753    arguments="${tmp#* }"
20754
20755    # Cannot rely on the command "which" here since it doesn't always work.
20756    is_absolute_path=`$ECHO "$path" | $GREP ^/`
20757    if test -z "$is_absolute_path"; then
20758      # Path to executable is not absolute. Find it.
20759      IFS_save="$IFS"
20760      IFS=:
20761      for p in $PATH; do
20762        if test -f "$p/$path" && test -x "$p/$path"; then
20763          new_path="$p/$path"
20764          break
20765        fi
20766      done
20767      IFS="$IFS_save"
20768    else
20769      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXX (as $path) failed, using $path directly." >&5
20770$as_echo "$as_me: Resolving CXX (as $path) failed, using $path directly." >&6;}
20771      new_path="$path"
20772    fi
20773
20774    if test "x$new_path" = x; then
20775      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
20776$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
20777      has_space=`$ECHO "$complete" | $GREP " "`
20778      if test "x$has_space" != x; then
20779        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20780$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20781      fi
20782      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20783    fi
20784  fi
20785
20786  # Now join together the path and the arguments once again
20787  if test "x$arguments" != xEOL; then
20788    new_complete="$new_path ${arguments% *}"
20789  else
20790    new_complete="$new_path"
20791  fi
20792
20793  if test "x$complete" != "x$new_complete"; then
20794    CXX="$new_complete"
20795    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
20796$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
20797  fi
20798
20799  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
20800$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
20801  TEST_COMPILER="$CXX"
20802
20803  if test "x$OPENJDK_BUILD_OS" != xwindows; then
20804    # Follow a chain of symbolic links. Use readlink
20805    # where it exists, else fall back to horribly
20806    # complicated shell code.
20807    if test "x$READLINK_TESTED" != yes; then
20808      # On MacOSX there is a readlink tool with a different
20809      # purpose than the GNU readlink tool. Check the found readlink.
20810      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
20811      if test "x$ISGNU" = x; then
20812        # A readlink that we do not know how to use.
20813        # Are there other non-GNU readlinks out there?
20814        READLINK_TESTED=yes
20815        READLINK=
20816      fi
20817    fi
20818
20819    if test "x$READLINK" != x; then
20820      TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
20821    else
20822      # Save the current directory for restoring afterwards
20823      STARTDIR=$PWD
20824      COUNTER=0
20825      sym_link_dir=`$DIRNAME $TEST_COMPILER`
20826      sym_link_file=`$BASENAME $TEST_COMPILER`
20827      cd $sym_link_dir
20828      # Use -P flag to resolve symlinks in directories.
20829      cd `$THEPWDCMD -P`
20830      sym_link_dir=`$THEPWDCMD -P`
20831      # Resolve file symlinks
20832      while test $COUNTER -lt 20; do
20833        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
20834        if test "x$ISLINK" == x; then
20835          # This is not a symbolic link! We are done!
20836          break
20837        fi
20838        # Again resolve directory symlinks since the target of the just found
20839        # link could be in a different directory
20840        cd `$DIRNAME $ISLINK`
20841        sym_link_dir=`$THEPWDCMD -P`
20842        sym_link_file=`$BASENAME $ISLINK`
20843        let COUNTER=COUNTER+1
20844      done
20845      cd $STARTDIR
20846      TEST_COMPILER=$sym_link_dir/$sym_link_file
20847    fi
20848  fi
20849
20850  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
20851$as_echo "$TEST_COMPILER" >&6; }
20852  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
20853$as_echo_n "checking if CXX is disguised ccache... " >&6; }
20854
20855  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
20856  if test "x$COMPILER_BASENAME" = "xccache"; then
20857    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
20858$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
20859    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
20860    # We want to control ccache invocation ourselves, so ignore this cc and try
20861    # searching again.
20862
20863    # Remove the path to the fake ccache cc from the PATH
20864    RETRY_COMPILER_SAVED_PATH="$PATH"
20865    COMPILER_DIRNAME=`$DIRNAME $CXX`
20866    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
20867
20868    # Try again looking for our compiler
20869    if test -n "$ac_tool_prefix"; then
20870  for ac_prog in $COMPILER_CHECK_LIST
20871  do
20872    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
20873set dummy $ac_tool_prefix$ac_prog; ac_word=$2
20874{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20875$as_echo_n "checking for $ac_word... " >&6; }
20876if ${ac_cv_prog_PROPER_COMPILER_CXX+:} false; then :
20877  $as_echo_n "(cached) " >&6
20878else
20879  if test -n "$PROPER_COMPILER_CXX"; then
20880  ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
20881else
20882as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20883for as_dir in $PATH
20884do
20885  IFS=$as_save_IFS
20886  test -z "$as_dir" && as_dir=.
20887    for ac_exec_ext in '' $ac_executable_extensions; do
20888  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20889    ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
20890    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20891    break 2
20892  fi
20893done
20894  done
20895IFS=$as_save_IFS
20896
20897fi
20898fi
20899PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
20900if test -n "$PROPER_COMPILER_CXX"; then
20901  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
20902$as_echo "$PROPER_COMPILER_CXX" >&6; }
20903else
20904  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20905$as_echo "no" >&6; }
20906fi
20907
20908
20909    test -n "$PROPER_COMPILER_CXX" && break
20910  done
20911fi
20912if test -z "$PROPER_COMPILER_CXX"; then
20913  ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
20914  for ac_prog in $COMPILER_CHECK_LIST
20915do
20916  # Extract the first word of "$ac_prog", so it can be a program name with args.
20917set dummy $ac_prog; ac_word=$2
20918{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20919$as_echo_n "checking for $ac_word... " >&6; }
20920if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+:} false; then :
20921  $as_echo_n "(cached) " >&6
20922else
20923  if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
20924  ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
20925else
20926as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20927for as_dir in $PATH
20928do
20929  IFS=$as_save_IFS
20930  test -z "$as_dir" && as_dir=.
20931    for ac_exec_ext in '' $ac_executable_extensions; do
20932  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20933    ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
20934    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20935    break 2
20936  fi
20937done
20938  done
20939IFS=$as_save_IFS
20940
20941fi
20942fi
20943ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
20944if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
20945  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
20946$as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
20947else
20948  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20949$as_echo "no" >&6; }
20950fi
20951
20952
20953  test -n "$ac_ct_PROPER_COMPILER_CXX" && break
20954done
20955
20956  if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
20957    PROPER_COMPILER_CXX=""
20958  else
20959    case $cross_compiling:$ac_tool_warned in
20960yes:)
20961{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
20962$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
20963ac_tool_warned=yes ;;
20964esac
20965    PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
20966  fi
20967fi
20968
20969
20970  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20971
20972  # First separate the path from the arguments. This will split at the first
20973  # space.
20974  complete="$PROPER_COMPILER_CXX"
20975  path="${complete%% *}"
20976  tmp="$complete EOL"
20977  arguments="${tmp#* }"
20978
20979  # Input might be given as Windows format, start by converting to
20980  # unix format.
20981  new_path=`$CYGPATH -u "$path"`
20982
20983  # Now try to locate executable using which
20984  new_path=`$WHICH "$new_path" 2> /dev/null`
20985  # bat and cmd files are not always considered executable in cygwin causing which
20986  # to not find them
20987  if test "x$new_path" = x \
20988      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20989      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20990    new_path=`$CYGPATH -u "$path"`
20991  fi
20992  if test "x$new_path" = x; then
20993    # Oops. Which didn't find the executable.
20994    # The splitting of arguments from the executable at a space might have been incorrect,
20995    # since paths with space are more likely in Windows. Give it another try with the whole
20996    # argument.
20997    path="$complete"
20998    arguments="EOL"
20999    new_path=`$CYGPATH -u "$path"`
21000    new_path=`$WHICH "$new_path" 2> /dev/null`
21001    # bat and cmd files are not always considered executable in cygwin causing which
21002    # to not find them
21003    if test "x$new_path" = x \
21004        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21005        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21006      new_path=`$CYGPATH -u "$path"`
21007    fi
21008    if test "x$new_path" = x; then
21009      # It's still not found. Now this is an unrecoverable error.
21010      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
21011$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
21012      has_space=`$ECHO "$complete" | $GREP " "`
21013      if test "x$has_space" != x; then
21014        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21015$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21016      fi
21017      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21018    fi
21019  fi
21020
21021  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21022  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21023  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21024  # "foo.exe" is OK but "foo" is an error.
21025  #
21026  # This test is therefore slightly more accurate than "test -f" to check for file presence.
21027  # It is also a way to make sure we got the proper file name for the real test later on.
21028  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21029  if test "x$test_shortpath" = x; then
21030    # Short path failed, file does not exist as specified.
21031    # Try adding .exe or .cmd
21032    if test -f "${new_path}.exe"; then
21033      input_to_shortpath="${new_path}.exe"
21034    elif test -f "${new_path}.cmd"; then
21035      input_to_shortpath="${new_path}.cmd"
21036    else
21037      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
21038$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
21039      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21040$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21041      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21042    fi
21043  else
21044    input_to_shortpath="$new_path"
21045  fi
21046
21047  # Call helper function which possibly converts this using DOS-style short mode.
21048  # If so, the updated path is stored in $new_path.
21049  new_path="$input_to_shortpath"
21050
21051  input_path="$input_to_shortpath"
21052  # Check if we need to convert this using DOS-style short mode. If the path
21053  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21054  # take no chances and rewrite it.
21055  # Note: m4 eats our [], so we need to use [ and ] instead.
21056  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21057  if test "x$has_forbidden_chars" != x; then
21058    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21059    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21060    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21061    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21062      # Going to short mode and back again did indeed matter. Since short mode is
21063      # case insensitive, let's make it lowercase to improve readability.
21064      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21065      # Now convert it back to Unix-stile (cygpath)
21066      input_path=`$CYGPATH -u "$shortmode_path"`
21067      new_path="$input_path"
21068    fi
21069  fi
21070
21071  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21072  if test "x$test_cygdrive_prefix" = x; then
21073    # As a simple fix, exclude /usr/bin since it's not a real path.
21074    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21075      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21076      # a path prefixed by /cygdrive for fixpath to work.
21077      new_path="$CYGWIN_ROOT_PATH$input_path"
21078    fi
21079  fi
21080
21081  # remove trailing .exe if any
21082  new_path="${new_path/%.exe/}"
21083
21084  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21085
21086  # First separate the path from the arguments. This will split at the first
21087  # space.
21088  complete="$PROPER_COMPILER_CXX"
21089  path="${complete%% *}"
21090  tmp="$complete EOL"
21091  arguments="${tmp#* }"
21092
21093  # Input might be given as Windows format, start by converting to
21094  # unix format.
21095  new_path="$path"
21096
21097  windows_path="$new_path"
21098  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21099    unix_path=`$CYGPATH -u "$windows_path"`
21100    new_path="$unix_path"
21101  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21102    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21103    new_path="$unix_path"
21104  fi
21105
21106
21107  # Now try to locate executable using which
21108  new_path=`$WHICH "$new_path" 2> /dev/null`
21109
21110  if test "x$new_path" = x; then
21111    # Oops. Which didn't find the executable.
21112    # The splitting of arguments from the executable at a space might have been incorrect,
21113    # since paths with space are more likely in Windows. Give it another try with the whole
21114    # argument.
21115    path="$complete"
21116    arguments="EOL"
21117    new_path="$path"
21118
21119  windows_path="$new_path"
21120  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21121    unix_path=`$CYGPATH -u "$windows_path"`
21122    new_path="$unix_path"
21123  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21124    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21125    new_path="$unix_path"
21126  fi
21127
21128
21129    new_path=`$WHICH "$new_path" 2> /dev/null`
21130
21131    if test "x$new_path" = x; then
21132      # It's still not found. Now this is an unrecoverable error.
21133      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
21134$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
21135      has_space=`$ECHO "$complete" | $GREP " "`
21136      if test "x$has_space" != x; then
21137        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21138$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21139      fi
21140      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21141    fi
21142  fi
21143
21144  # Now new_path has a complete unix path to the binary
21145  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21146    # Keep paths in /bin as-is, but remove trailing .exe if any
21147    new_path="${new_path/%.exe/}"
21148    # Do not save /bin paths to all_fixpath_prefixes!
21149  else
21150    # Not in mixed or Windows style, start by that.
21151    new_path=`cmd //c echo $new_path`
21152
21153  input_path="$new_path"
21154  # Check if we need to convert this using DOS-style short mode. If the path
21155  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21156  # take no chances and rewrite it.
21157  # Note: m4 eats our [], so we need to use [ and ] instead.
21158  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21159  if test "x$has_forbidden_chars" != x; then
21160    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21161    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21162  fi
21163
21164    # Output is in $new_path
21165
21166  windows_path="$new_path"
21167  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21168    unix_path=`$CYGPATH -u "$windows_path"`
21169    new_path="$unix_path"
21170  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21171    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21172    new_path="$unix_path"
21173  fi
21174
21175    # remove trailing .exe if any
21176    new_path="${new_path/%.exe/}"
21177
21178    # Save the first 10 bytes of this path to the storage, so fixpath can work.
21179    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21180  fi
21181
21182  else
21183    # We're on a posix platform. Hooray! :)
21184    # First separate the path from the arguments. This will split at the first
21185    # space.
21186    complete="$PROPER_COMPILER_CXX"
21187    path="${complete%% *}"
21188    tmp="$complete EOL"
21189    arguments="${tmp#* }"
21190
21191    # Cannot rely on the command "which" here since it doesn't always work.
21192    is_absolute_path=`$ECHO "$path" | $GREP ^/`
21193    if test -z "$is_absolute_path"; then
21194      # Path to executable is not absolute. Find it.
21195      IFS_save="$IFS"
21196      IFS=:
21197      for p in $PATH; do
21198        if test -f "$p/$path" && test -x "$p/$path"; then
21199          new_path="$p/$path"
21200          break
21201        fi
21202      done
21203      IFS="$IFS_save"
21204    else
21205      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&5
21206$as_echo "$as_me: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&6;}
21207      new_path="$path"
21208    fi
21209
21210    if test "x$new_path" = x; then
21211      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
21212$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
21213      has_space=`$ECHO "$complete" | $GREP " "`
21214      if test "x$has_space" != x; then
21215        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21216$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21217      fi
21218      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21219    fi
21220  fi
21221
21222  # Now join together the path and the arguments once again
21223  if test "x$arguments" != xEOL; then
21224    new_complete="$new_path ${arguments% *}"
21225  else
21226    new_complete="$new_path"
21227  fi
21228
21229  if test "x$complete" != "x$new_complete"; then
21230    PROPER_COMPILER_CXX="$new_complete"
21231    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
21232$as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
21233  fi
21234
21235    PATH="$RETRY_COMPILER_SAVED_PATH"
21236
21237    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
21238$as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
21239
21240  if test "x$OPENJDK_BUILD_OS" != xwindows; then
21241    # Follow a chain of symbolic links. Use readlink
21242    # where it exists, else fall back to horribly
21243    # complicated shell code.
21244    if test "x$READLINK_TESTED" != yes; then
21245      # On MacOSX there is a readlink tool with a different
21246      # purpose than the GNU readlink tool. Check the found readlink.
21247      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
21248      if test "x$ISGNU" = x; then
21249        # A readlink that we do not know how to use.
21250        # Are there other non-GNU readlinks out there?
21251        READLINK_TESTED=yes
21252        READLINK=
21253      fi
21254    fi
21255
21256    if test "x$READLINK" != x; then
21257      PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
21258    else
21259      # Save the current directory for restoring afterwards
21260      STARTDIR=$PWD
21261      COUNTER=0
21262      sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
21263      sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
21264      cd $sym_link_dir
21265      # Use -P flag to resolve symlinks in directories.
21266      cd `$THEPWDCMD -P`
21267      sym_link_dir=`$THEPWDCMD -P`
21268      # Resolve file symlinks
21269      while test $COUNTER -lt 20; do
21270        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
21271        if test "x$ISLINK" == x; then
21272          # This is not a symbolic link! We are done!
21273          break
21274        fi
21275        # Again resolve directory symlinks since the target of the just found
21276        # link could be in a different directory
21277        cd `$DIRNAME $ISLINK`
21278        sym_link_dir=`$THEPWDCMD -P`
21279        sym_link_file=`$BASENAME $ISLINK`
21280        let COUNTER=COUNTER+1
21281      done
21282      cd $STARTDIR
21283      PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
21284    fi
21285  fi
21286
21287    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
21288$as_echo "$PROPER_COMPILER_CXX" >&6; }
21289    CXX="$PROPER_COMPILER_CXX"
21290  else
21291    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
21292$as_echo "no, keeping CXX" >&6; }
21293    CXX="$TEST_COMPILER"
21294  fi
21295
21296  COMPILER=$CXX
21297  COMPILER_NAME=$COMPILER_NAME
21298
21299  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
21300    # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
21301    COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
21302    $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
21303    if test $? -ne 0; then
21304      GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
21305
21306      { $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
21307$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
21308      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
21309$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
21310      as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
21311    else
21312      COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
21313      COMPILER_VENDOR="Sun Studio"
21314    fi
21315  elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
21316    # First line typically looks something like:
21317    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
21318    COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
21319    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
21320    COMPILER_VENDOR="Microsoft CL.EXE"
21321    COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
21322    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
21323      if test "x$COMPILER_CPU_TEST" != "x80x86"; then
21324        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
21325      fi
21326    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
21327      if test "x$COMPILER_CPU_TEST" != "xx64"; then
21328        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
21329      fi
21330    fi
21331  else
21332    COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
21333    # Check that this is likely to be GCC.
21334    $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
21335    if test $? -ne 0; then
21336      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
21337$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
21338      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
21339$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
21340      as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
21341    fi
21342
21343    # First line typically looks something like:
21344    # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
21345    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
21346    COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
21347  fi
21348  # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
21349  CXX_VERSION="$COMPILER_VERSION"
21350  # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
21351  CXX_VENDOR="$COMPILER_VENDOR"
21352
21353  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
21354$as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
21355
21356
21357  # Now that we have resolved CXX ourself, let autoconf have its go at it
21358  ac_ext=cpp
21359ac_cpp='$CXXCPP $CPPFLAGS'
21360ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21361ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21362ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21363if test -z "$CXX"; then
21364  if test -n "$CCC"; then
21365    CXX=$CCC
21366  else
21367    if test -n "$ac_tool_prefix"; then
21368  for ac_prog in $CXX
21369  do
21370    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
21371set dummy $ac_tool_prefix$ac_prog; ac_word=$2
21372{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21373$as_echo_n "checking for $ac_word... " >&6; }
21374if ${ac_cv_prog_CXX+:} false; then :
21375  $as_echo_n "(cached) " >&6
21376else
21377  if test -n "$CXX"; then
21378  ac_cv_prog_CXX="$CXX" # Let the user override the test.
21379else
21380as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21381for as_dir in $PATH
21382do
21383  IFS=$as_save_IFS
21384  test -z "$as_dir" && as_dir=.
21385    for ac_exec_ext in '' $ac_executable_extensions; do
21386  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21387    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
21388    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21389    break 2
21390  fi
21391done
21392  done
21393IFS=$as_save_IFS
21394
21395fi
21396fi
21397CXX=$ac_cv_prog_CXX
21398if test -n "$CXX"; then
21399  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
21400$as_echo "$CXX" >&6; }
21401else
21402  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21403$as_echo "no" >&6; }
21404fi
21405
21406
21407    test -n "$CXX" && break
21408  done
21409fi
21410if test -z "$CXX"; then
21411  ac_ct_CXX=$CXX
21412  for ac_prog in $CXX
21413do
21414  # Extract the first word of "$ac_prog", so it can be a program name with args.
21415set dummy $ac_prog; ac_word=$2
21416{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21417$as_echo_n "checking for $ac_word... " >&6; }
21418if ${ac_cv_prog_ac_ct_CXX+:} false; then :
21419  $as_echo_n "(cached) " >&6
21420else
21421  if test -n "$ac_ct_CXX"; then
21422  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
21423else
21424as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21425for as_dir in $PATH
21426do
21427  IFS=$as_save_IFS
21428  test -z "$as_dir" && as_dir=.
21429    for ac_exec_ext in '' $ac_executable_extensions; do
21430  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21431    ac_cv_prog_ac_ct_CXX="$ac_prog"
21432    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21433    break 2
21434  fi
21435done
21436  done
21437IFS=$as_save_IFS
21438
21439fi
21440fi
21441ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
21442if test -n "$ac_ct_CXX"; then
21443  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
21444$as_echo "$ac_ct_CXX" >&6; }
21445else
21446  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21447$as_echo "no" >&6; }
21448fi
21449
21450
21451  test -n "$ac_ct_CXX" && break
21452done
21453
21454  if test "x$ac_ct_CXX" = x; then
21455    CXX="g++"
21456  else
21457    case $cross_compiling:$ac_tool_warned in
21458yes:)
21459{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
21460$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
21461ac_tool_warned=yes ;;
21462esac
21463    CXX=$ac_ct_CXX
21464  fi
21465fi
21466
21467  fi
21468fi
21469# Provide some information about the compiler.
21470$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
21471set X $ac_compile
21472ac_compiler=$2
21473for ac_option in --version -v -V -qversion; do
21474  { { ac_try="$ac_compiler $ac_option >&5"
21475case "(($ac_try" in
21476  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21477  *) ac_try_echo=$ac_try;;
21478esac
21479eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
21480$as_echo "$ac_try_echo"; } >&5
21481  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
21482  ac_status=$?
21483  if test -s conftest.err; then
21484    sed '10a\
21485... rest of stderr output deleted ...
21486         10q' conftest.err >conftest.er1
21487    cat conftest.er1 >&5
21488  fi
21489  rm -f conftest.er1 conftest.err
21490  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21491  test $ac_status = 0; }
21492done
21493
21494{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
21495$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
21496if ${ac_cv_cxx_compiler_gnu+:} false; then :
21497  $as_echo_n "(cached) " >&6
21498else
21499  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21500/* end confdefs.h.  */
21501
21502int
21503main ()
21504{
21505#ifndef __GNUC__
21506       choke me
21507#endif
21508
21509  ;
21510  return 0;
21511}
21512_ACEOF
21513if ac_fn_cxx_try_compile "$LINENO"; then :
21514  ac_compiler_gnu=yes
21515else
21516  ac_compiler_gnu=no
21517fi
21518rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21519ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
21520
21521fi
21522{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
21523$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
21524if test $ac_compiler_gnu = yes; then
21525  GXX=yes
21526else
21527  GXX=
21528fi
21529ac_test_CXXFLAGS=${CXXFLAGS+set}
21530ac_save_CXXFLAGS=$CXXFLAGS
21531{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
21532$as_echo_n "checking whether $CXX accepts -g... " >&6; }
21533if ${ac_cv_prog_cxx_g+:} false; then :
21534  $as_echo_n "(cached) " >&6
21535else
21536  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
21537   ac_cxx_werror_flag=yes
21538   ac_cv_prog_cxx_g=no
21539   CXXFLAGS="-g"
21540   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21541/* end confdefs.h.  */
21542
21543int
21544main ()
21545{
21546
21547  ;
21548  return 0;
21549}
21550_ACEOF
21551if ac_fn_cxx_try_compile "$LINENO"; then :
21552  ac_cv_prog_cxx_g=yes
21553else
21554  CXXFLAGS=""
21555      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21556/* end confdefs.h.  */
21557
21558int
21559main ()
21560{
21561
21562  ;
21563  return 0;
21564}
21565_ACEOF
21566if ac_fn_cxx_try_compile "$LINENO"; then :
21567
21568else
21569  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
21570	 CXXFLAGS="-g"
21571	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21572/* end confdefs.h.  */
21573
21574int
21575main ()
21576{
21577
21578  ;
21579  return 0;
21580}
21581_ACEOF
21582if ac_fn_cxx_try_compile "$LINENO"; then :
21583  ac_cv_prog_cxx_g=yes
21584fi
21585rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21586fi
21587rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21588fi
21589rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21590   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
21591fi
21592{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
21593$as_echo "$ac_cv_prog_cxx_g" >&6; }
21594if test "$ac_test_CXXFLAGS" = set; then
21595  CXXFLAGS=$ac_save_CXXFLAGS
21596elif test $ac_cv_prog_cxx_g = yes; then
21597  if test "$GXX" = yes; then
21598    CXXFLAGS="-g -O2"
21599  else
21600    CXXFLAGS="-g"
21601  fi
21602else
21603  if test "$GXX" = yes; then
21604    CXXFLAGS="-O2"
21605  else
21606    CXXFLAGS=
21607  fi
21608fi
21609ac_ext=cpp
21610ac_cpp='$CXXCPP $CPPFLAGS'
21611ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21612ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21613ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21614
21615
21616  ### Locate other tools
21617
21618  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
21619    ac_ext=m
21620ac_cpp='$OBJCPP $CPPFLAGS'
21621ac_compile='$OBJC -c $OBJCFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21622ac_link='$OBJC -o conftest$ac_exeext $OBJCFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21623ac_compiler_gnu=$ac_cv_objc_compiler_gnu
21624if test -n "$ac_tool_prefix"; then
21625  for ac_prog in gcc objcc objc cc CC
21626  do
21627    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
21628set dummy $ac_tool_prefix$ac_prog; ac_word=$2
21629{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21630$as_echo_n "checking for $ac_word... " >&6; }
21631if ${ac_cv_prog_OBJC+:} false; then :
21632  $as_echo_n "(cached) " >&6
21633else
21634  if test -n "$OBJC"; then
21635  ac_cv_prog_OBJC="$OBJC" # Let the user override the test.
21636else
21637as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21638for as_dir in $PATH
21639do
21640  IFS=$as_save_IFS
21641  test -z "$as_dir" && as_dir=.
21642    for ac_exec_ext in '' $ac_executable_extensions; do
21643  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21644    ac_cv_prog_OBJC="$ac_tool_prefix$ac_prog"
21645    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21646    break 2
21647  fi
21648done
21649  done
21650IFS=$as_save_IFS
21651
21652fi
21653fi
21654OBJC=$ac_cv_prog_OBJC
21655if test -n "$OBJC"; then
21656  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJC" >&5
21657$as_echo "$OBJC" >&6; }
21658else
21659  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21660$as_echo "no" >&6; }
21661fi
21662
21663
21664    test -n "$OBJC" && break
21665  done
21666fi
21667if test -z "$OBJC"; then
21668  ac_ct_OBJC=$OBJC
21669  for ac_prog in gcc objcc objc cc CC
21670do
21671  # Extract the first word of "$ac_prog", so it can be a program name with args.
21672set dummy $ac_prog; ac_word=$2
21673{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21674$as_echo_n "checking for $ac_word... " >&6; }
21675if ${ac_cv_prog_ac_ct_OBJC+:} false; then :
21676  $as_echo_n "(cached) " >&6
21677else
21678  if test -n "$ac_ct_OBJC"; then
21679  ac_cv_prog_ac_ct_OBJC="$ac_ct_OBJC" # Let the user override the test.
21680else
21681as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21682for as_dir in $PATH
21683do
21684  IFS=$as_save_IFS
21685  test -z "$as_dir" && as_dir=.
21686    for ac_exec_ext in '' $ac_executable_extensions; do
21687  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21688    ac_cv_prog_ac_ct_OBJC="$ac_prog"
21689    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21690    break 2
21691  fi
21692done
21693  done
21694IFS=$as_save_IFS
21695
21696fi
21697fi
21698ac_ct_OBJC=$ac_cv_prog_ac_ct_OBJC
21699if test -n "$ac_ct_OBJC"; then
21700  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJC" >&5
21701$as_echo "$ac_ct_OBJC" >&6; }
21702else
21703  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21704$as_echo "no" >&6; }
21705fi
21706
21707
21708  test -n "$ac_ct_OBJC" && break
21709done
21710
21711  if test "x$ac_ct_OBJC" = x; then
21712    OBJC="gcc"
21713  else
21714    case $cross_compiling:$ac_tool_warned in
21715yes:)
21716{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
21717$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
21718ac_tool_warned=yes ;;
21719esac
21720    OBJC=$ac_ct_OBJC
21721  fi
21722fi
21723
21724# Provide some information about the compiler.
21725$as_echo "$as_me:${as_lineno-$LINENO}: checking for Objective C compiler version" >&5
21726set X $ac_compile
21727ac_compiler=$2
21728for ac_option in --version -v -V -qversion; do
21729  { { ac_try="$ac_compiler $ac_option >&5"
21730case "(($ac_try" in
21731  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21732  *) ac_try_echo=$ac_try;;
21733esac
21734eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
21735$as_echo "$ac_try_echo"; } >&5
21736  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
21737  ac_status=$?
21738  if test -s conftest.err; then
21739    sed '10a\
21740... rest of stderr output deleted ...
21741         10q' conftest.err >conftest.er1
21742    cat conftest.er1 >&5
21743  fi
21744  rm -f conftest.er1 conftest.err
21745  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21746  test $ac_status = 0; }
21747done
21748
21749{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Objective C compiler" >&5
21750$as_echo_n "checking whether we are using the GNU Objective C compiler... " >&6; }
21751if ${ac_cv_objc_compiler_gnu+:} false; then :
21752  $as_echo_n "(cached) " >&6
21753else
21754  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21755/* end confdefs.h.  */
21756
21757int
21758main ()
21759{
21760#ifndef __GNUC__
21761       choke me
21762#endif
21763
21764  ;
21765  return 0;
21766}
21767_ACEOF
21768if ac_fn_objc_try_compile "$LINENO"; then :
21769  ac_compiler_gnu=yes
21770else
21771  ac_compiler_gnu=no
21772fi
21773rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21774ac_cv_objc_compiler_gnu=$ac_compiler_gnu
21775
21776fi
21777{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objc_compiler_gnu" >&5
21778$as_echo "$ac_cv_objc_compiler_gnu" >&6; }
21779if test $ac_compiler_gnu = yes; then
21780  GOBJC=yes
21781else
21782  GOBJC=
21783fi
21784ac_test_OBJCFLAGS=${OBJCFLAGS+set}
21785ac_save_OBJCFLAGS=$OBJCFLAGS
21786{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $OBJC accepts -g" >&5
21787$as_echo_n "checking whether $OBJC accepts -g... " >&6; }
21788if ${ac_cv_prog_objc_g+:} false; then :
21789  $as_echo_n "(cached) " >&6
21790else
21791  ac_save_objc_werror_flag=$ac_objc_werror_flag
21792   ac_objc_werror_flag=yes
21793   ac_cv_prog_objc_g=no
21794   OBJCFLAGS="-g"
21795   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21796/* end confdefs.h.  */
21797
21798int
21799main ()
21800{
21801
21802  ;
21803  return 0;
21804}
21805_ACEOF
21806if ac_fn_objc_try_compile "$LINENO"; then :
21807  ac_cv_prog_objc_g=yes
21808else
21809  OBJCFLAGS=""
21810      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21811/* end confdefs.h.  */
21812
21813int
21814main ()
21815{
21816
21817  ;
21818  return 0;
21819}
21820_ACEOF
21821if ac_fn_objc_try_compile "$LINENO"; then :
21822
21823else
21824  ac_objc_werror_flag=$ac_save_objc_werror_flag
21825	 OBJCFLAGS="-g"
21826	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21827/* end confdefs.h.  */
21828
21829int
21830main ()
21831{
21832
21833  ;
21834  return 0;
21835}
21836_ACEOF
21837if ac_fn_objc_try_compile "$LINENO"; then :
21838  ac_cv_prog_objc_g=yes
21839fi
21840rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21841fi
21842rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21843fi
21844rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21845   ac_objc_werror_flag=$ac_save_objc_werror_flag
21846fi
21847{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_objc_g" >&5
21848$as_echo "$ac_cv_prog_objc_g" >&6; }
21849if test "$ac_test_OBJCFLAGS" = set; then
21850  OBJCFLAGS=$ac_save_OBJCFLAGS
21851elif test $ac_cv_prog_objc_g = yes; then
21852  if test "$GOBJC" = yes; then
21853    OBJCFLAGS="-g -O2"
21854  else
21855    OBJCFLAGS="-g"
21856  fi
21857else
21858  if test "$GOBJC" = yes; then
21859    OBJCFLAGS="-O2"
21860  else
21861    OBJCFLAGS=
21862  fi
21863fi
21864ac_ext=cpp
21865ac_cpp='$CXXCPP $CPPFLAGS'
21866ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21867ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21868ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21869
21870
21871  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21872
21873  # First separate the path from the arguments. This will split at the first
21874  # space.
21875  complete="$OBJC"
21876  path="${complete%% *}"
21877  tmp="$complete EOL"
21878  arguments="${tmp#* }"
21879
21880  # Input might be given as Windows format, start by converting to
21881  # unix format.
21882  new_path=`$CYGPATH -u "$path"`
21883
21884  # Now try to locate executable using which
21885  new_path=`$WHICH "$new_path" 2> /dev/null`
21886  # bat and cmd files are not always considered executable in cygwin causing which
21887  # to not find them
21888  if test "x$new_path" = x \
21889      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21890      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21891    new_path=`$CYGPATH -u "$path"`
21892  fi
21893  if test "x$new_path" = x; then
21894    # Oops. Which didn't find the executable.
21895    # The splitting of arguments from the executable at a space might have been incorrect,
21896    # since paths with space are more likely in Windows. Give it another try with the whole
21897    # argument.
21898    path="$complete"
21899    arguments="EOL"
21900    new_path=`$CYGPATH -u "$path"`
21901    new_path=`$WHICH "$new_path" 2> /dev/null`
21902    # bat and cmd files are not always considered executable in cygwin causing which
21903    # to not find them
21904    if test "x$new_path" = x \
21905        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21906        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21907      new_path=`$CYGPATH -u "$path"`
21908    fi
21909    if test "x$new_path" = x; then
21910      # It's still not found. Now this is an unrecoverable error.
21911      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
21912$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
21913      has_space=`$ECHO "$complete" | $GREP " "`
21914      if test "x$has_space" != x; then
21915        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21916$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21917      fi
21918      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
21919    fi
21920  fi
21921
21922  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21923  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21924  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21925  # "foo.exe" is OK but "foo" is an error.
21926  #
21927  # This test is therefore slightly more accurate than "test -f" to check for file presence.
21928  # It is also a way to make sure we got the proper file name for the real test later on.
21929  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21930  if test "x$test_shortpath" = x; then
21931    # Short path failed, file does not exist as specified.
21932    # Try adding .exe or .cmd
21933    if test -f "${new_path}.exe"; then
21934      input_to_shortpath="${new_path}.exe"
21935    elif test -f "${new_path}.cmd"; then
21936      input_to_shortpath="${new_path}.cmd"
21937    else
21938      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$new_path\", is invalid." >&5
21939$as_echo "$as_me: The path of OBJC, which resolves as \"$new_path\", is invalid." >&6;}
21940      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21941$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21942      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
21943    fi
21944  else
21945    input_to_shortpath="$new_path"
21946  fi
21947
21948  # Call helper function which possibly converts this using DOS-style short mode.
21949  # If so, the updated path is stored in $new_path.
21950  new_path="$input_to_shortpath"
21951
21952  input_path="$input_to_shortpath"
21953  # Check if we need to convert this using DOS-style short mode. If the path
21954  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21955  # take no chances and rewrite it.
21956  # Note: m4 eats our [], so we need to use [ and ] instead.
21957  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21958  if test "x$has_forbidden_chars" != x; then
21959    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21960    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21961    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21962    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21963      # Going to short mode and back again did indeed matter. Since short mode is
21964      # case insensitive, let's make it lowercase to improve readability.
21965      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21966      # Now convert it back to Unix-stile (cygpath)
21967      input_path=`$CYGPATH -u "$shortmode_path"`
21968      new_path="$input_path"
21969    fi
21970  fi
21971
21972  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21973  if test "x$test_cygdrive_prefix" = x; then
21974    # As a simple fix, exclude /usr/bin since it's not a real path.
21975    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21976      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21977      # a path prefixed by /cygdrive for fixpath to work.
21978      new_path="$CYGWIN_ROOT_PATH$input_path"
21979    fi
21980  fi
21981
21982  # remove trailing .exe if any
21983  new_path="${new_path/%.exe/}"
21984
21985  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21986
21987  # First separate the path from the arguments. This will split at the first
21988  # space.
21989  complete="$OBJC"
21990  path="${complete%% *}"
21991  tmp="$complete EOL"
21992  arguments="${tmp#* }"
21993
21994  # Input might be given as Windows format, start by converting to
21995  # unix format.
21996  new_path="$path"
21997
21998  windows_path="$new_path"
21999  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22000    unix_path=`$CYGPATH -u "$windows_path"`
22001    new_path="$unix_path"
22002  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22003    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22004    new_path="$unix_path"
22005  fi
22006
22007
22008  # Now try to locate executable using which
22009  new_path=`$WHICH "$new_path" 2> /dev/null`
22010
22011  if test "x$new_path" = x; then
22012    # Oops. Which didn't find the executable.
22013    # The splitting of arguments from the executable at a space might have been incorrect,
22014    # since paths with space are more likely in Windows. Give it another try with the whole
22015    # argument.
22016    path="$complete"
22017    arguments="EOL"
22018    new_path="$path"
22019
22020  windows_path="$new_path"
22021  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22022    unix_path=`$CYGPATH -u "$windows_path"`
22023    new_path="$unix_path"
22024  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22025    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22026    new_path="$unix_path"
22027  fi
22028
22029
22030    new_path=`$WHICH "$new_path" 2> /dev/null`
22031
22032    if test "x$new_path" = x; then
22033      # It's still not found. Now this is an unrecoverable error.
22034      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
22035$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
22036      has_space=`$ECHO "$complete" | $GREP " "`
22037      if test "x$has_space" != x; then
22038        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22039$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22040      fi
22041      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
22042    fi
22043  fi
22044
22045  # Now new_path has a complete unix path to the binary
22046  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22047    # Keep paths in /bin as-is, but remove trailing .exe if any
22048    new_path="${new_path/%.exe/}"
22049    # Do not save /bin paths to all_fixpath_prefixes!
22050  else
22051    # Not in mixed or Windows style, start by that.
22052    new_path=`cmd //c echo $new_path`
22053
22054  input_path="$new_path"
22055  # Check if we need to convert this using DOS-style short mode. If the path
22056  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22057  # take no chances and rewrite it.
22058  # Note: m4 eats our [], so we need to use [ and ] instead.
22059  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22060  if test "x$has_forbidden_chars" != x; then
22061    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22062    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22063  fi
22064
22065    # Output is in $new_path
22066
22067  windows_path="$new_path"
22068  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22069    unix_path=`$CYGPATH -u "$windows_path"`
22070    new_path="$unix_path"
22071  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22072    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22073    new_path="$unix_path"
22074  fi
22075
22076    # remove trailing .exe if any
22077    new_path="${new_path/%.exe/}"
22078
22079    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22080    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22081  fi
22082
22083  else
22084    # We're on a posix platform. Hooray! :)
22085    # First separate the path from the arguments. This will split at the first
22086    # space.
22087    complete="$OBJC"
22088    path="${complete%% *}"
22089    tmp="$complete EOL"
22090    arguments="${tmp#* }"
22091
22092    # Cannot rely on the command "which" here since it doesn't always work.
22093    is_absolute_path=`$ECHO "$path" | $GREP ^/`
22094    if test -z "$is_absolute_path"; then
22095      # Path to executable is not absolute. Find it.
22096      IFS_save="$IFS"
22097      IFS=:
22098      for p in $PATH; do
22099        if test -f "$p/$path" && test -x "$p/$path"; then
22100          new_path="$p/$path"
22101          break
22102        fi
22103      done
22104      IFS="$IFS_save"
22105    else
22106      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJC (as $path) failed, using $path directly." >&5
22107$as_echo "$as_me: Resolving OBJC (as $path) failed, using $path directly." >&6;}
22108      new_path="$path"
22109    fi
22110
22111    if test "x$new_path" = x; then
22112      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
22113$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
22114      has_space=`$ECHO "$complete" | $GREP " "`
22115      if test "x$has_space" != x; then
22116        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22117$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22118      fi
22119      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
22120    fi
22121  fi
22122
22123  # Now join together the path and the arguments once again
22124  if test "x$arguments" != xEOL; then
22125    new_complete="$new_path ${arguments% *}"
22126  else
22127    new_complete="$new_path"
22128  fi
22129
22130  if test "x$complete" != "x$new_complete"; then
22131    OBJC="$new_complete"
22132    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJC to \"$new_complete\"" >&5
22133$as_echo "$as_me: Rewriting OBJC to \"$new_complete\"" >&6;}
22134  fi
22135
22136  else
22137    OBJC=
22138  fi
22139
22140  # Restore the flags to the user specified values.
22141  # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
22142  CFLAGS="$ORG_CFLAGS"
22143  CXXFLAGS="$ORG_CXXFLAGS"
22144  OBJCFLAGS="$ORG_OBJCFLAGS"
22145
22146  LD="$CC"
22147  LDEXE="$CC"
22148  LDCXX="$CXX"
22149  LDEXECXX="$CXX"
22150
22151  # LDEXE is the linker to use, when creating executables.
22152
22153  # Linking C++ libraries.
22154
22155  # Linking C++ executables.
22156
22157
22158  if test "x$OPENJDK_TARGET_OS" != xwindows; then
22159    if test -n "$ac_tool_prefix"; then
22160  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
22161set dummy ${ac_tool_prefix}ar; ac_word=$2
22162{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22163$as_echo_n "checking for $ac_word... " >&6; }
22164if ${ac_cv_prog_AR+:} false; then :
22165  $as_echo_n "(cached) " >&6
22166else
22167  if test -n "$AR"; then
22168  ac_cv_prog_AR="$AR" # Let the user override the test.
22169else
22170as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22171for as_dir in $PATH
22172do
22173  IFS=$as_save_IFS
22174  test -z "$as_dir" && as_dir=.
22175    for ac_exec_ext in '' $ac_executable_extensions; do
22176  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22177    ac_cv_prog_AR="${ac_tool_prefix}ar"
22178    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22179    break 2
22180  fi
22181done
22182  done
22183IFS=$as_save_IFS
22184
22185fi
22186fi
22187AR=$ac_cv_prog_AR
22188if test -n "$AR"; then
22189  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
22190$as_echo "$AR" >&6; }
22191else
22192  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22193$as_echo "no" >&6; }
22194fi
22195
22196
22197fi
22198if test -z "$ac_cv_prog_AR"; then
22199  ac_ct_AR=$AR
22200  # Extract the first word of "ar", so it can be a program name with args.
22201set dummy ar; ac_word=$2
22202{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22203$as_echo_n "checking for $ac_word... " >&6; }
22204if ${ac_cv_prog_ac_ct_AR+:} false; then :
22205  $as_echo_n "(cached) " >&6
22206else
22207  if test -n "$ac_ct_AR"; then
22208  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
22209else
22210as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22211for as_dir in $PATH
22212do
22213  IFS=$as_save_IFS
22214  test -z "$as_dir" && as_dir=.
22215    for ac_exec_ext in '' $ac_executable_extensions; do
22216  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22217    ac_cv_prog_ac_ct_AR="ar"
22218    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22219    break 2
22220  fi
22221done
22222  done
22223IFS=$as_save_IFS
22224
22225fi
22226fi
22227ac_ct_AR=$ac_cv_prog_ac_ct_AR
22228if test -n "$ac_ct_AR"; then
22229  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
22230$as_echo "$ac_ct_AR" >&6; }
22231else
22232  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22233$as_echo "no" >&6; }
22234fi
22235
22236  if test "x$ac_ct_AR" = x; then
22237    AR=""
22238  else
22239    case $cross_compiling:$ac_tool_warned in
22240yes:)
22241{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
22242$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
22243ac_tool_warned=yes ;;
22244esac
22245    AR=$ac_ct_AR
22246  fi
22247else
22248  AR="$ac_cv_prog_AR"
22249fi
22250
22251
22252  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22253
22254  # First separate the path from the arguments. This will split at the first
22255  # space.
22256  complete="$AR"
22257  path="${complete%% *}"
22258  tmp="$complete EOL"
22259  arguments="${tmp#* }"
22260
22261  # Input might be given as Windows format, start by converting to
22262  # unix format.
22263  new_path=`$CYGPATH -u "$path"`
22264
22265  # Now try to locate executable using which
22266  new_path=`$WHICH "$new_path" 2> /dev/null`
22267  # bat and cmd files are not always considered executable in cygwin causing which
22268  # to not find them
22269  if test "x$new_path" = x \
22270      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22271      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22272    new_path=`$CYGPATH -u "$path"`
22273  fi
22274  if test "x$new_path" = x; then
22275    # Oops. Which didn't find the executable.
22276    # The splitting of arguments from the executable at a space might have been incorrect,
22277    # since paths with space are more likely in Windows. Give it another try with the whole
22278    # argument.
22279    path="$complete"
22280    arguments="EOL"
22281    new_path=`$CYGPATH -u "$path"`
22282    new_path=`$WHICH "$new_path" 2> /dev/null`
22283    # bat and cmd files are not always considered executable in cygwin causing which
22284    # to not find them
22285    if test "x$new_path" = x \
22286        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22287        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22288      new_path=`$CYGPATH -u "$path"`
22289    fi
22290    if test "x$new_path" = x; then
22291      # It's still not found. Now this is an unrecoverable error.
22292      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
22293$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
22294      has_space=`$ECHO "$complete" | $GREP " "`
22295      if test "x$has_space" != x; then
22296        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22297$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22298      fi
22299      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22300    fi
22301  fi
22302
22303  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22304  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22305  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22306  # "foo.exe" is OK but "foo" is an error.
22307  #
22308  # This test is therefore slightly more accurate than "test -f" to check for file presence.
22309  # It is also a way to make sure we got the proper file name for the real test later on.
22310  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22311  if test "x$test_shortpath" = x; then
22312    # Short path failed, file does not exist as specified.
22313    # Try adding .exe or .cmd
22314    if test -f "${new_path}.exe"; then
22315      input_to_shortpath="${new_path}.exe"
22316    elif test -f "${new_path}.cmd"; then
22317      input_to_shortpath="${new_path}.cmd"
22318    else
22319      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
22320$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
22321      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22322$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22323      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22324    fi
22325  else
22326    input_to_shortpath="$new_path"
22327  fi
22328
22329  # Call helper function which possibly converts this using DOS-style short mode.
22330  # If so, the updated path is stored in $new_path.
22331  new_path="$input_to_shortpath"
22332
22333  input_path="$input_to_shortpath"
22334  # Check if we need to convert this using DOS-style short mode. If the path
22335  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22336  # take no chances and rewrite it.
22337  # Note: m4 eats our [], so we need to use [ and ] instead.
22338  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22339  if test "x$has_forbidden_chars" != x; then
22340    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22341    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22342    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22343    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22344      # Going to short mode and back again did indeed matter. Since short mode is
22345      # case insensitive, let's make it lowercase to improve readability.
22346      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22347      # Now convert it back to Unix-stile (cygpath)
22348      input_path=`$CYGPATH -u "$shortmode_path"`
22349      new_path="$input_path"
22350    fi
22351  fi
22352
22353  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22354  if test "x$test_cygdrive_prefix" = x; then
22355    # As a simple fix, exclude /usr/bin since it's not a real path.
22356    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22357      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22358      # a path prefixed by /cygdrive for fixpath to work.
22359      new_path="$CYGWIN_ROOT_PATH$input_path"
22360    fi
22361  fi
22362
22363  # remove trailing .exe if any
22364  new_path="${new_path/%.exe/}"
22365
22366  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22367
22368  # First separate the path from the arguments. This will split at the first
22369  # space.
22370  complete="$AR"
22371  path="${complete%% *}"
22372  tmp="$complete EOL"
22373  arguments="${tmp#* }"
22374
22375  # Input might be given as Windows format, start by converting to
22376  # unix format.
22377  new_path="$path"
22378
22379  windows_path="$new_path"
22380  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22381    unix_path=`$CYGPATH -u "$windows_path"`
22382    new_path="$unix_path"
22383  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22384    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22385    new_path="$unix_path"
22386  fi
22387
22388
22389  # Now try to locate executable using which
22390  new_path=`$WHICH "$new_path" 2> /dev/null`
22391
22392  if test "x$new_path" = x; then
22393    # Oops. Which didn't find the executable.
22394    # The splitting of arguments from the executable at a space might have been incorrect,
22395    # since paths with space are more likely in Windows. Give it another try with the whole
22396    # argument.
22397    path="$complete"
22398    arguments="EOL"
22399    new_path="$path"
22400
22401  windows_path="$new_path"
22402  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22403    unix_path=`$CYGPATH -u "$windows_path"`
22404    new_path="$unix_path"
22405  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22406    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22407    new_path="$unix_path"
22408  fi
22409
22410
22411    new_path=`$WHICH "$new_path" 2> /dev/null`
22412
22413    if test "x$new_path" = x; then
22414      # It's still not found. Now this is an unrecoverable error.
22415      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
22416$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
22417      has_space=`$ECHO "$complete" | $GREP " "`
22418      if test "x$has_space" != x; then
22419        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22420$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22421      fi
22422      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22423    fi
22424  fi
22425
22426  # Now new_path has a complete unix path to the binary
22427  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22428    # Keep paths in /bin as-is, but remove trailing .exe if any
22429    new_path="${new_path/%.exe/}"
22430    # Do not save /bin paths to all_fixpath_prefixes!
22431  else
22432    # Not in mixed or Windows style, start by that.
22433    new_path=`cmd //c echo $new_path`
22434
22435  input_path="$new_path"
22436  # Check if we need to convert this using DOS-style short mode. If the path
22437  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22438  # take no chances and rewrite it.
22439  # Note: m4 eats our [], so we need to use [ and ] instead.
22440  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22441  if test "x$has_forbidden_chars" != x; then
22442    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22443    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22444  fi
22445
22446    # Output is in $new_path
22447
22448  windows_path="$new_path"
22449  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22450    unix_path=`$CYGPATH -u "$windows_path"`
22451    new_path="$unix_path"
22452  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22453    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22454    new_path="$unix_path"
22455  fi
22456
22457    # remove trailing .exe if any
22458    new_path="${new_path/%.exe/}"
22459
22460    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22461    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22462  fi
22463
22464  else
22465    # We're on a posix platform. Hooray! :)
22466    # First separate the path from the arguments. This will split at the first
22467    # space.
22468    complete="$AR"
22469    path="${complete%% *}"
22470    tmp="$complete EOL"
22471    arguments="${tmp#* }"
22472
22473    # Cannot rely on the command "which" here since it doesn't always work.
22474    is_absolute_path=`$ECHO "$path" | $GREP ^/`
22475    if test -z "$is_absolute_path"; then
22476      # Path to executable is not absolute. Find it.
22477      IFS_save="$IFS"
22478      IFS=:
22479      for p in $PATH; do
22480        if test -f "$p/$path" && test -x "$p/$path"; then
22481          new_path="$p/$path"
22482          break
22483        fi
22484      done
22485      IFS="$IFS_save"
22486    else
22487      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AR (as $path) failed, using $path directly." >&5
22488$as_echo "$as_me: Resolving AR (as $path) failed, using $path directly." >&6;}
22489      new_path="$path"
22490    fi
22491
22492    if test "x$new_path" = x; then
22493      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
22494$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
22495      has_space=`$ECHO "$complete" | $GREP " "`
22496      if test "x$has_space" != x; then
22497        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22498$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22499      fi
22500      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22501    fi
22502  fi
22503
22504  # Now join together the path and the arguments once again
22505  if test "x$arguments" != xEOL; then
22506    new_complete="$new_path ${arguments% *}"
22507  else
22508    new_complete="$new_path"
22509  fi
22510
22511  if test "x$complete" != "x$new_complete"; then
22512    AR="$new_complete"
22513    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
22514$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
22515  fi
22516
22517  fi
22518  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
22519    ARFLAGS="-r"
22520  else
22521    ARFLAGS=""
22522  fi
22523
22524
22525  # For hotspot, we need these in Windows mixed path; other platforms keep them the same
22526  HOTSPOT_CXX="$CXX"
22527  HOTSPOT_LD="$LD"
22528
22529
22530
22531  COMPILER_NAME=gcc
22532  COMPILER_TYPE=CC
22533  if test "x$OPENJDK_TARGET_OS" = xwindows; then :
22534
22535    # For now, assume that we are always compiling using cl.exe.
22536    CC_OUT_OPTION=-Fo
22537    EXE_OUT_OPTION=-out:
22538    LD_OUT_OPTION=-out:
22539    AR_OUT_OPTION=-out:
22540    # On Windows, reject /usr/bin/link (as determined in CYGWIN_LINK), which is a cygwin
22541    # program for something completely different.
22542    # Extract the first word of "link", so it can be a program name with args.
22543set dummy link; ac_word=$2
22544{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22545$as_echo_n "checking for $ac_word... " >&6; }
22546if ${ac_cv_prog_WINLD+:} false; then :
22547  $as_echo_n "(cached) " >&6
22548else
22549  if test -n "$WINLD"; then
22550  ac_cv_prog_WINLD="$WINLD" # Let the user override the test.
22551else
22552  ac_prog_rejected=no
22553as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22554for as_dir in $PATH
22555do
22556  IFS=$as_save_IFS
22557  test -z "$as_dir" && as_dir=.
22558    for ac_exec_ext in '' $ac_executable_extensions; do
22559  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22560    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
22561       ac_prog_rejected=yes
22562       continue
22563     fi
22564    ac_cv_prog_WINLD="link"
22565    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22566    break 2
22567  fi
22568done
22569  done
22570IFS=$as_save_IFS
22571
22572if test $ac_prog_rejected = yes; then
22573  # We found a bogon in the path, so make sure we never use it.
22574  set dummy $ac_cv_prog_WINLD
22575  shift
22576  if test $# != 0; then
22577    # We chose a different compiler from the bogus one.
22578    # However, it has the same basename, so the bogon will be chosen
22579    # first if we set WINLD to just the basename; use the full file name.
22580    shift
22581    ac_cv_prog_WINLD="$as_dir/$ac_word${1+' '}$@"
22582  fi
22583fi
22584fi
22585fi
22586WINLD=$ac_cv_prog_WINLD
22587if test -n "$WINLD"; then
22588  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINLD" >&5
22589$as_echo "$WINLD" >&6; }
22590else
22591  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22592$as_echo "no" >&6; }
22593fi
22594
22595
22596    # Since we must ignore the first found link, WINLD will contain
22597    # the full path to the link.exe program.
22598
22599  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22600
22601  # First separate the path from the arguments. This will split at the first
22602  # space.
22603  complete="$WINLD"
22604  path="${complete%% *}"
22605  tmp="$complete EOL"
22606  arguments="${tmp#* }"
22607
22608  # Input might be given as Windows format, start by converting to
22609  # unix format.
22610  new_path=`$CYGPATH -u "$path"`
22611
22612  # Now try to locate executable using which
22613  new_path=`$WHICH "$new_path" 2> /dev/null`
22614  # bat and cmd files are not always considered executable in cygwin causing which
22615  # to not find them
22616  if test "x$new_path" = x \
22617      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22618      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22619    new_path=`$CYGPATH -u "$path"`
22620  fi
22621  if test "x$new_path" = x; then
22622    # Oops. Which didn't find the executable.
22623    # The splitting of arguments from the executable at a space might have been incorrect,
22624    # since paths with space are more likely in Windows. Give it another try with the whole
22625    # argument.
22626    path="$complete"
22627    arguments="EOL"
22628    new_path=`$CYGPATH -u "$path"`
22629    new_path=`$WHICH "$new_path" 2> /dev/null`
22630    # bat and cmd files are not always considered executable in cygwin causing which
22631    # to not find them
22632    if test "x$new_path" = x \
22633        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22634        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22635      new_path=`$CYGPATH -u "$path"`
22636    fi
22637    if test "x$new_path" = x; then
22638      # It's still not found. Now this is an unrecoverable error.
22639      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
22640$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
22641      has_space=`$ECHO "$complete" | $GREP " "`
22642      if test "x$has_space" != x; then
22643        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22644$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22645      fi
22646      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22647    fi
22648  fi
22649
22650  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22651  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22652  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22653  # "foo.exe" is OK but "foo" is an error.
22654  #
22655  # This test is therefore slightly more accurate than "test -f" to check for file presence.
22656  # It is also a way to make sure we got the proper file name for the real test later on.
22657  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22658  if test "x$test_shortpath" = x; then
22659    # Short path failed, file does not exist as specified.
22660    # Try adding .exe or .cmd
22661    if test -f "${new_path}.exe"; then
22662      input_to_shortpath="${new_path}.exe"
22663    elif test -f "${new_path}.cmd"; then
22664      input_to_shortpath="${new_path}.cmd"
22665    else
22666      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$new_path\", is invalid." >&5
22667$as_echo "$as_me: The path of WINLD, which resolves as \"$new_path\", is invalid." >&6;}
22668      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22669$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22670      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22671    fi
22672  else
22673    input_to_shortpath="$new_path"
22674  fi
22675
22676  # Call helper function which possibly converts this using DOS-style short mode.
22677  # If so, the updated path is stored in $new_path.
22678  new_path="$input_to_shortpath"
22679
22680  input_path="$input_to_shortpath"
22681  # Check if we need to convert this using DOS-style short mode. If the path
22682  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22683  # take no chances and rewrite it.
22684  # Note: m4 eats our [], so we need to use [ and ] instead.
22685  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22686  if test "x$has_forbidden_chars" != x; then
22687    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22688    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22689    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22690    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22691      # Going to short mode and back again did indeed matter. Since short mode is
22692      # case insensitive, let's make it lowercase to improve readability.
22693      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22694      # Now convert it back to Unix-stile (cygpath)
22695      input_path=`$CYGPATH -u "$shortmode_path"`
22696      new_path="$input_path"
22697    fi
22698  fi
22699
22700  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22701  if test "x$test_cygdrive_prefix" = x; then
22702    # As a simple fix, exclude /usr/bin since it's not a real path.
22703    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22704      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22705      # a path prefixed by /cygdrive for fixpath to work.
22706      new_path="$CYGWIN_ROOT_PATH$input_path"
22707    fi
22708  fi
22709
22710  # remove trailing .exe if any
22711  new_path="${new_path/%.exe/}"
22712
22713  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22714
22715  # First separate the path from the arguments. This will split at the first
22716  # space.
22717  complete="$WINLD"
22718  path="${complete%% *}"
22719  tmp="$complete EOL"
22720  arguments="${tmp#* }"
22721
22722  # Input might be given as Windows format, start by converting to
22723  # unix format.
22724  new_path="$path"
22725
22726  windows_path="$new_path"
22727  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22728    unix_path=`$CYGPATH -u "$windows_path"`
22729    new_path="$unix_path"
22730  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22731    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22732    new_path="$unix_path"
22733  fi
22734
22735
22736  # Now try to locate executable using which
22737  new_path=`$WHICH "$new_path" 2> /dev/null`
22738
22739  if test "x$new_path" = x; then
22740    # Oops. Which didn't find the executable.
22741    # The splitting of arguments from the executable at a space might have been incorrect,
22742    # since paths with space are more likely in Windows. Give it another try with the whole
22743    # argument.
22744    path="$complete"
22745    arguments="EOL"
22746    new_path="$path"
22747
22748  windows_path="$new_path"
22749  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22750    unix_path=`$CYGPATH -u "$windows_path"`
22751    new_path="$unix_path"
22752  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22753    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22754    new_path="$unix_path"
22755  fi
22756
22757
22758    new_path=`$WHICH "$new_path" 2> /dev/null`
22759
22760    if test "x$new_path" = x; then
22761      # It's still not found. Now this is an unrecoverable error.
22762      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
22763$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
22764      has_space=`$ECHO "$complete" | $GREP " "`
22765      if test "x$has_space" != x; then
22766        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22767$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22768      fi
22769      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22770    fi
22771  fi
22772
22773  # Now new_path has a complete unix path to the binary
22774  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22775    # Keep paths in /bin as-is, but remove trailing .exe if any
22776    new_path="${new_path/%.exe/}"
22777    # Do not save /bin paths to all_fixpath_prefixes!
22778  else
22779    # Not in mixed or Windows style, start by that.
22780    new_path=`cmd //c echo $new_path`
22781
22782  input_path="$new_path"
22783  # Check if we need to convert this using DOS-style short mode. If the path
22784  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22785  # take no chances and rewrite it.
22786  # Note: m4 eats our [], so we need to use [ and ] instead.
22787  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22788  if test "x$has_forbidden_chars" != x; then
22789    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22790    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22791  fi
22792
22793    # Output is in $new_path
22794
22795  windows_path="$new_path"
22796  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22797    unix_path=`$CYGPATH -u "$windows_path"`
22798    new_path="$unix_path"
22799  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22800    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22801    new_path="$unix_path"
22802  fi
22803
22804    # remove trailing .exe if any
22805    new_path="${new_path/%.exe/}"
22806
22807    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22808    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22809  fi
22810
22811  else
22812    # We're on a posix platform. Hooray! :)
22813    # First separate the path from the arguments. This will split at the first
22814    # space.
22815    complete="$WINLD"
22816    path="${complete%% *}"
22817    tmp="$complete EOL"
22818    arguments="${tmp#* }"
22819
22820    # Cannot rely on the command "which" here since it doesn't always work.
22821    is_absolute_path=`$ECHO "$path" | $GREP ^/`
22822    if test -z "$is_absolute_path"; then
22823      # Path to executable is not absolute. Find it.
22824      IFS_save="$IFS"
22825      IFS=:
22826      for p in $PATH; do
22827        if test -f "$p/$path" && test -x "$p/$path"; then
22828          new_path="$p/$path"
22829          break
22830        fi
22831      done
22832      IFS="$IFS_save"
22833    else
22834      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINLD (as $path) failed, using $path directly." >&5
22835$as_echo "$as_me: Resolving WINLD (as $path) failed, using $path directly." >&6;}
22836      new_path="$path"
22837    fi
22838
22839    if test "x$new_path" = x; then
22840      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
22841$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
22842      has_space=`$ECHO "$complete" | $GREP " "`
22843      if test "x$has_space" != x; then
22844        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22845$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22846      fi
22847      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22848    fi
22849  fi
22850
22851  # Now join together the path and the arguments once again
22852  if test "x$arguments" != xEOL; then
22853    new_complete="$new_path ${arguments% *}"
22854  else
22855    new_complete="$new_path"
22856  fi
22857
22858  if test "x$complete" != "x$new_complete"; then
22859    WINLD="$new_complete"
22860    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINLD to \"$new_complete\"" >&5
22861$as_echo "$as_me: Rewriting WINLD to \"$new_complete\"" >&6;}
22862  fi
22863
22864    printf "Windows linker was found at $WINLD\n"
22865    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
22866$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
22867    "$WINLD" --version > /dev/null
22868    if test $? -eq 0 ; then
22869      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22870$as_echo "no" >&6; }
22871      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
22872    else
22873      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
22874$as_echo "yes" >&6; }
22875    fi
22876    LD="$WINLD"
22877    LDEXE="$WINLD"
22878    LDCXX="$WINLD"
22879    LDEXECXX="$WINLD"
22880
22881    # Extract the first word of "mt", so it can be a program name with args.
22882set dummy mt; ac_word=$2
22883{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22884$as_echo_n "checking for $ac_word... " >&6; }
22885if ${ac_cv_prog_MT+:} false; then :
22886  $as_echo_n "(cached) " >&6
22887else
22888  if test -n "$MT"; then
22889  ac_cv_prog_MT="$MT" # Let the user override the test.
22890else
22891  ac_prog_rejected=no
22892as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22893for as_dir in $PATH
22894do
22895  IFS=$as_save_IFS
22896  test -z "$as_dir" && as_dir=.
22897    for ac_exec_ext in '' $ac_executable_extensions; do
22898  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22899    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
22900       ac_prog_rejected=yes
22901       continue
22902     fi
22903    ac_cv_prog_MT="mt"
22904    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22905    break 2
22906  fi
22907done
22908  done
22909IFS=$as_save_IFS
22910
22911if test $ac_prog_rejected = yes; then
22912  # We found a bogon in the path, so make sure we never use it.
22913  set dummy $ac_cv_prog_MT
22914  shift
22915  if test $# != 0; then
22916    # We chose a different compiler from the bogus one.
22917    # However, it has the same basename, so the bogon will be chosen
22918    # first if we set MT to just the basename; use the full file name.
22919    shift
22920    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
22921  fi
22922fi
22923fi
22924fi
22925MT=$ac_cv_prog_MT
22926if test -n "$MT"; then
22927  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
22928$as_echo "$MT" >&6; }
22929else
22930  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22931$as_echo "no" >&6; }
22932fi
22933
22934
22935
22936  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22937
22938  # First separate the path from the arguments. This will split at the first
22939  # space.
22940  complete="$MT"
22941  path="${complete%% *}"
22942  tmp="$complete EOL"
22943  arguments="${tmp#* }"
22944
22945  # Input might be given as Windows format, start by converting to
22946  # unix format.
22947  new_path=`$CYGPATH -u "$path"`
22948
22949  # Now try to locate executable using which
22950  new_path=`$WHICH "$new_path" 2> /dev/null`
22951  # bat and cmd files are not always considered executable in cygwin causing which
22952  # to not find them
22953  if test "x$new_path" = x \
22954      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22955      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22956    new_path=`$CYGPATH -u "$path"`
22957  fi
22958  if test "x$new_path" = x; then
22959    # Oops. Which didn't find the executable.
22960    # The splitting of arguments from the executable at a space might have been incorrect,
22961    # since paths with space are more likely in Windows. Give it another try with the whole
22962    # argument.
22963    path="$complete"
22964    arguments="EOL"
22965    new_path=`$CYGPATH -u "$path"`
22966    new_path=`$WHICH "$new_path" 2> /dev/null`
22967    # bat and cmd files are not always considered executable in cygwin causing which
22968    # to not find them
22969    if test "x$new_path" = x \
22970        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22971        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22972      new_path=`$CYGPATH -u "$path"`
22973    fi
22974    if test "x$new_path" = x; then
22975      # It's still not found. Now this is an unrecoverable error.
22976      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
22977$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
22978      has_space=`$ECHO "$complete" | $GREP " "`
22979      if test "x$has_space" != x; then
22980        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22981$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22982      fi
22983      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
22984    fi
22985  fi
22986
22987  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22988  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22989  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22990  # "foo.exe" is OK but "foo" is an error.
22991  #
22992  # This test is therefore slightly more accurate than "test -f" to check for file presence.
22993  # It is also a way to make sure we got the proper file name for the real test later on.
22994  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22995  if test "x$test_shortpath" = x; then
22996    # Short path failed, file does not exist as specified.
22997    # Try adding .exe or .cmd
22998    if test -f "${new_path}.exe"; then
22999      input_to_shortpath="${new_path}.exe"
23000    elif test -f "${new_path}.cmd"; then
23001      input_to_shortpath="${new_path}.cmd"
23002    else
23003      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
23004$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
23005      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23006$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23007      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
23008    fi
23009  else
23010    input_to_shortpath="$new_path"
23011  fi
23012
23013  # Call helper function which possibly converts this using DOS-style short mode.
23014  # If so, the updated path is stored in $new_path.
23015  new_path="$input_to_shortpath"
23016
23017  input_path="$input_to_shortpath"
23018  # Check if we need to convert this using DOS-style short mode. If the path
23019  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23020  # take no chances and rewrite it.
23021  # Note: m4 eats our [], so we need to use [ and ] instead.
23022  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23023  if test "x$has_forbidden_chars" != x; then
23024    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23025    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23026    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23027    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23028      # Going to short mode and back again did indeed matter. Since short mode is
23029      # case insensitive, let's make it lowercase to improve readability.
23030      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23031      # Now convert it back to Unix-stile (cygpath)
23032      input_path=`$CYGPATH -u "$shortmode_path"`
23033      new_path="$input_path"
23034    fi
23035  fi
23036
23037  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23038  if test "x$test_cygdrive_prefix" = x; then
23039    # As a simple fix, exclude /usr/bin since it's not a real path.
23040    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23041      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23042      # a path prefixed by /cygdrive for fixpath to work.
23043      new_path="$CYGWIN_ROOT_PATH$input_path"
23044    fi
23045  fi
23046
23047  # remove trailing .exe if any
23048  new_path="${new_path/%.exe/}"
23049
23050  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23051
23052  # First separate the path from the arguments. This will split at the first
23053  # space.
23054  complete="$MT"
23055  path="${complete%% *}"
23056  tmp="$complete EOL"
23057  arguments="${tmp#* }"
23058
23059  # Input might be given as Windows format, start by converting to
23060  # unix format.
23061  new_path="$path"
23062
23063  windows_path="$new_path"
23064  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23065    unix_path=`$CYGPATH -u "$windows_path"`
23066    new_path="$unix_path"
23067  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23068    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23069    new_path="$unix_path"
23070  fi
23071
23072
23073  # Now try to locate executable using which
23074  new_path=`$WHICH "$new_path" 2> /dev/null`
23075
23076  if test "x$new_path" = x; then
23077    # Oops. Which didn't find the executable.
23078    # The splitting of arguments from the executable at a space might have been incorrect,
23079    # since paths with space are more likely in Windows. Give it another try with the whole
23080    # argument.
23081    path="$complete"
23082    arguments="EOL"
23083    new_path="$path"
23084
23085  windows_path="$new_path"
23086  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23087    unix_path=`$CYGPATH -u "$windows_path"`
23088    new_path="$unix_path"
23089  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23090    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23091    new_path="$unix_path"
23092  fi
23093
23094
23095    new_path=`$WHICH "$new_path" 2> /dev/null`
23096
23097    if test "x$new_path" = x; then
23098      # It's still not found. Now this is an unrecoverable error.
23099      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
23100$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
23101      has_space=`$ECHO "$complete" | $GREP " "`
23102      if test "x$has_space" != x; then
23103        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23104$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23105      fi
23106      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
23107    fi
23108  fi
23109
23110  # Now new_path has a complete unix path to the binary
23111  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23112    # Keep paths in /bin as-is, but remove trailing .exe if any
23113    new_path="${new_path/%.exe/}"
23114    # Do not save /bin paths to all_fixpath_prefixes!
23115  else
23116    # Not in mixed or Windows style, start by that.
23117    new_path=`cmd //c echo $new_path`
23118
23119  input_path="$new_path"
23120  # Check if we need to convert this using DOS-style short mode. If the path
23121  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23122  # take no chances and rewrite it.
23123  # Note: m4 eats our [], so we need to use [ and ] instead.
23124  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23125  if test "x$has_forbidden_chars" != x; then
23126    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23127    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23128  fi
23129
23130    # Output is in $new_path
23131
23132  windows_path="$new_path"
23133  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23134    unix_path=`$CYGPATH -u "$windows_path"`
23135    new_path="$unix_path"
23136  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23137    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23138    new_path="$unix_path"
23139  fi
23140
23141    # remove trailing .exe if any
23142    new_path="${new_path/%.exe/}"
23143
23144    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23145    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23146  fi
23147
23148  else
23149    # We're on a posix platform. Hooray! :)
23150    # First separate the path from the arguments. This will split at the first
23151    # space.
23152    complete="$MT"
23153    path="${complete%% *}"
23154    tmp="$complete EOL"
23155    arguments="${tmp#* }"
23156
23157    # Cannot rely on the command "which" here since it doesn't always work.
23158    is_absolute_path=`$ECHO "$path" | $GREP ^/`
23159    if test -z "$is_absolute_path"; then
23160      # Path to executable is not absolute. Find it.
23161      IFS_save="$IFS"
23162      IFS=:
23163      for p in $PATH; do
23164        if test -f "$p/$path" && test -x "$p/$path"; then
23165          new_path="$p/$path"
23166          break
23167        fi
23168      done
23169      IFS="$IFS_save"
23170    else
23171      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MT (as $path) failed, using $path directly." >&5
23172$as_echo "$as_me: Resolving MT (as $path) failed, using $path directly." >&6;}
23173      new_path="$path"
23174    fi
23175
23176    if test "x$new_path" = x; then
23177      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
23178$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
23179      has_space=`$ECHO "$complete" | $GREP " "`
23180      if test "x$has_space" != x; then
23181        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23182$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23183      fi
23184      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
23185    fi
23186  fi
23187
23188  # Now join together the path and the arguments once again
23189  if test "x$arguments" != xEOL; then
23190    new_complete="$new_path ${arguments% *}"
23191  else
23192    new_complete="$new_path"
23193  fi
23194
23195  if test "x$complete" != "x$new_complete"; then
23196    MT="$new_complete"
23197    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
23198$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
23199  fi
23200
23201    # The resource compiler
23202    # Extract the first word of "rc", so it can be a program name with args.
23203set dummy rc; ac_word=$2
23204{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23205$as_echo_n "checking for $ac_word... " >&6; }
23206if ${ac_cv_prog_RC+:} false; then :
23207  $as_echo_n "(cached) " >&6
23208else
23209  if test -n "$RC"; then
23210  ac_cv_prog_RC="$RC" # Let the user override the test.
23211else
23212  ac_prog_rejected=no
23213as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23214for as_dir in $PATH
23215do
23216  IFS=$as_save_IFS
23217  test -z "$as_dir" && as_dir=.
23218    for ac_exec_ext in '' $ac_executable_extensions; do
23219  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23220    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
23221       ac_prog_rejected=yes
23222       continue
23223     fi
23224    ac_cv_prog_RC="rc"
23225    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23226    break 2
23227  fi
23228done
23229  done
23230IFS=$as_save_IFS
23231
23232if test $ac_prog_rejected = yes; then
23233  # We found a bogon in the path, so make sure we never use it.
23234  set dummy $ac_cv_prog_RC
23235  shift
23236  if test $# != 0; then
23237    # We chose a different compiler from the bogus one.
23238    # However, it has the same basename, so the bogon will be chosen
23239    # first if we set RC to just the basename; use the full file name.
23240    shift
23241    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
23242  fi
23243fi
23244fi
23245fi
23246RC=$ac_cv_prog_RC
23247if test -n "$RC"; then
23248  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
23249$as_echo "$RC" >&6; }
23250else
23251  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23252$as_echo "no" >&6; }
23253fi
23254
23255
23256
23257  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23258
23259  # First separate the path from the arguments. This will split at the first
23260  # space.
23261  complete="$RC"
23262  path="${complete%% *}"
23263  tmp="$complete EOL"
23264  arguments="${tmp#* }"
23265
23266  # Input might be given as Windows format, start by converting to
23267  # unix format.
23268  new_path=`$CYGPATH -u "$path"`
23269
23270  # Now try to locate executable using which
23271  new_path=`$WHICH "$new_path" 2> /dev/null`
23272  # bat and cmd files are not always considered executable in cygwin causing which
23273  # to not find them
23274  if test "x$new_path" = x \
23275      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23276      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23277    new_path=`$CYGPATH -u "$path"`
23278  fi
23279  if test "x$new_path" = x; then
23280    # Oops. Which didn't find the executable.
23281    # The splitting of arguments from the executable at a space might have been incorrect,
23282    # since paths with space are more likely in Windows. Give it another try with the whole
23283    # argument.
23284    path="$complete"
23285    arguments="EOL"
23286    new_path=`$CYGPATH -u "$path"`
23287    new_path=`$WHICH "$new_path" 2> /dev/null`
23288    # bat and cmd files are not always considered executable in cygwin causing which
23289    # to not find them
23290    if test "x$new_path" = x \
23291        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23292        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23293      new_path=`$CYGPATH -u "$path"`
23294    fi
23295    if test "x$new_path" = x; then
23296      # It's still not found. Now this is an unrecoverable error.
23297      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
23298$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
23299      has_space=`$ECHO "$complete" | $GREP " "`
23300      if test "x$has_space" != x; then
23301        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23302$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23303      fi
23304      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23305    fi
23306  fi
23307
23308  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23309  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23310  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23311  # "foo.exe" is OK but "foo" is an error.
23312  #
23313  # This test is therefore slightly more accurate than "test -f" to check for file presence.
23314  # It is also a way to make sure we got the proper file name for the real test later on.
23315  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23316  if test "x$test_shortpath" = x; then
23317    # Short path failed, file does not exist as specified.
23318    # Try adding .exe or .cmd
23319    if test -f "${new_path}.exe"; then
23320      input_to_shortpath="${new_path}.exe"
23321    elif test -f "${new_path}.cmd"; then
23322      input_to_shortpath="${new_path}.cmd"
23323    else
23324      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
23325$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
23326      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23327$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23328      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23329    fi
23330  else
23331    input_to_shortpath="$new_path"
23332  fi
23333
23334  # Call helper function which possibly converts this using DOS-style short mode.
23335  # If so, the updated path is stored in $new_path.
23336  new_path="$input_to_shortpath"
23337
23338  input_path="$input_to_shortpath"
23339  # Check if we need to convert this using DOS-style short mode. If the path
23340  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23341  # take no chances and rewrite it.
23342  # Note: m4 eats our [], so we need to use [ and ] instead.
23343  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23344  if test "x$has_forbidden_chars" != x; then
23345    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23346    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23347    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23348    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23349      # Going to short mode and back again did indeed matter. Since short mode is
23350      # case insensitive, let's make it lowercase to improve readability.
23351      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23352      # Now convert it back to Unix-stile (cygpath)
23353      input_path=`$CYGPATH -u "$shortmode_path"`
23354      new_path="$input_path"
23355    fi
23356  fi
23357
23358  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23359  if test "x$test_cygdrive_prefix" = x; then
23360    # As a simple fix, exclude /usr/bin since it's not a real path.
23361    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23362      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23363      # a path prefixed by /cygdrive for fixpath to work.
23364      new_path="$CYGWIN_ROOT_PATH$input_path"
23365    fi
23366  fi
23367
23368  # remove trailing .exe if any
23369  new_path="${new_path/%.exe/}"
23370
23371  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23372
23373  # First separate the path from the arguments. This will split at the first
23374  # space.
23375  complete="$RC"
23376  path="${complete%% *}"
23377  tmp="$complete EOL"
23378  arguments="${tmp#* }"
23379
23380  # Input might be given as Windows format, start by converting to
23381  # unix format.
23382  new_path="$path"
23383
23384  windows_path="$new_path"
23385  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23386    unix_path=`$CYGPATH -u "$windows_path"`
23387    new_path="$unix_path"
23388  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23389    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23390    new_path="$unix_path"
23391  fi
23392
23393
23394  # Now try to locate executable using which
23395  new_path=`$WHICH "$new_path" 2> /dev/null`
23396
23397  if test "x$new_path" = x; then
23398    # Oops. Which didn't find the executable.
23399    # The splitting of arguments from the executable at a space might have been incorrect,
23400    # since paths with space are more likely in Windows. Give it another try with the whole
23401    # argument.
23402    path="$complete"
23403    arguments="EOL"
23404    new_path="$path"
23405
23406  windows_path="$new_path"
23407  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23408    unix_path=`$CYGPATH -u "$windows_path"`
23409    new_path="$unix_path"
23410  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23411    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23412    new_path="$unix_path"
23413  fi
23414
23415
23416    new_path=`$WHICH "$new_path" 2> /dev/null`
23417
23418    if test "x$new_path" = x; then
23419      # It's still not found. Now this is an unrecoverable error.
23420      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
23421$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
23422      has_space=`$ECHO "$complete" | $GREP " "`
23423      if test "x$has_space" != x; then
23424        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23425$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23426      fi
23427      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23428    fi
23429  fi
23430
23431  # Now new_path has a complete unix path to the binary
23432  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23433    # Keep paths in /bin as-is, but remove trailing .exe if any
23434    new_path="${new_path/%.exe/}"
23435    # Do not save /bin paths to all_fixpath_prefixes!
23436  else
23437    # Not in mixed or Windows style, start by that.
23438    new_path=`cmd //c echo $new_path`
23439
23440  input_path="$new_path"
23441  # Check if we need to convert this using DOS-style short mode. If the path
23442  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23443  # take no chances and rewrite it.
23444  # Note: m4 eats our [], so we need to use [ and ] instead.
23445  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23446  if test "x$has_forbidden_chars" != x; then
23447    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23448    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23449  fi
23450
23451    # Output is in $new_path
23452
23453  windows_path="$new_path"
23454  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23455    unix_path=`$CYGPATH -u "$windows_path"`
23456    new_path="$unix_path"
23457  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23458    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23459    new_path="$unix_path"
23460  fi
23461
23462    # remove trailing .exe if any
23463    new_path="${new_path/%.exe/}"
23464
23465    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23466    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23467  fi
23468
23469  else
23470    # We're on a posix platform. Hooray! :)
23471    # First separate the path from the arguments. This will split at the first
23472    # space.
23473    complete="$RC"
23474    path="${complete%% *}"
23475    tmp="$complete EOL"
23476    arguments="${tmp#* }"
23477
23478    # Cannot rely on the command "which" here since it doesn't always work.
23479    is_absolute_path=`$ECHO "$path" | $GREP ^/`
23480    if test -z "$is_absolute_path"; then
23481      # Path to executable is not absolute. Find it.
23482      IFS_save="$IFS"
23483      IFS=:
23484      for p in $PATH; do
23485        if test -f "$p/$path" && test -x "$p/$path"; then
23486          new_path="$p/$path"
23487          break
23488        fi
23489      done
23490      IFS="$IFS_save"
23491    else
23492      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving RC (as $path) failed, using $path directly." >&5
23493$as_echo "$as_me: Resolving RC (as $path) failed, using $path directly." >&6;}
23494      new_path="$path"
23495    fi
23496
23497    if test "x$new_path" = x; then
23498      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
23499$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
23500      has_space=`$ECHO "$complete" | $GREP " "`
23501      if test "x$has_space" != x; then
23502        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23503$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23504      fi
23505      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23506    fi
23507  fi
23508
23509  # Now join together the path and the arguments once again
23510  if test "x$arguments" != xEOL; then
23511    new_complete="$new_path ${arguments% *}"
23512  else
23513    new_complete="$new_path"
23514  fi
23515
23516  if test "x$complete" != "x$new_complete"; then
23517    RC="$new_complete"
23518    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
23519$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
23520  fi
23521
23522
23523    # For hotspot, we need these in Windows mixed path,
23524    # so rewrite them all. Need added .exe suffix.
23525    HOTSPOT_CXX="$CXX.exe"
23526    HOTSPOT_LD="$LD.exe"
23527    HOTSPOT_MT="$MT.exe"
23528    HOTSPOT_RC="$RC.exe"
23529
23530  unix_path="$HOTSPOT_CXX"
23531  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23532    windows_path=`$CYGPATH -m "$unix_path"`
23533    HOTSPOT_CXX="$windows_path"
23534  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23535    windows_path=`cmd //c echo $unix_path`
23536    HOTSPOT_CXX="$windows_path"
23537  fi
23538
23539
23540  unix_path="$HOTSPOT_LD"
23541  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23542    windows_path=`$CYGPATH -m "$unix_path"`
23543    HOTSPOT_LD="$windows_path"
23544  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23545    windows_path=`cmd //c echo $unix_path`
23546    HOTSPOT_LD="$windows_path"
23547  fi
23548
23549
23550  unix_path="$HOTSPOT_MT"
23551  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23552    windows_path=`$CYGPATH -m "$unix_path"`
23553    HOTSPOT_MT="$windows_path"
23554  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23555    windows_path=`cmd //c echo $unix_path`
23556    HOTSPOT_MT="$windows_path"
23557  fi
23558
23559
23560  unix_path="$HOTSPOT_RC"
23561  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23562    windows_path=`$CYGPATH -m "$unix_path"`
23563    HOTSPOT_RC="$windows_path"
23564  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23565    windows_path=`cmd //c echo $unix_path`
23566    HOTSPOT_RC="$windows_path"
23567  fi
23568
23569
23570
23571
23572    RC_FLAGS="-nologo -l 0x409 -r"
23573    if test "x$VARIANT" = xOPT; then :
23574
23575    RC_FLAGS="$RC_FLAGS -d NDEBUG"
23576
23577fi
23578
23579  # The version variables used to create RC_FLAGS may be overridden
23580  # in a custom configure script, or possibly the command line.
23581  # Let those variables be expanded at make time in spec.gmk.
23582  # The \$ are escaped to the shell, and the $(...) variables
23583  # are evaluated by make.
23584  RC_FLAGS="$RC_FLAGS \
23585      -d \"JDK_BUILD_ID=\$(FULL_VERSION)\" \
23586      -d \"JDK_COMPANY=\$(COMPANY_NAME)\" \
23587      -d \"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
23588      -d \"JDK_VER=\$(JDK_MINOR_VERSION).\$(JDK_MICRO_VERSION).\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0).\$(COOKED_BUILD_NUMBER)\" \
23589      -d \"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
23590      -d \"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(JDK_MINOR_VERSION) \$(JDK_UPDATE_META_TAG)\" \
23591      -d \"JDK_FVER=\$(JDK_MINOR_VERSION),\$(JDK_MICRO_VERSION),\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0),\$(COOKED_BUILD_NUMBER)\""
23592
23593  # lib.exe is used to create static libraries.
23594  # Extract the first word of "lib", so it can be a program name with args.
23595set dummy lib; ac_word=$2
23596{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23597$as_echo_n "checking for $ac_word... " >&6; }
23598if ${ac_cv_prog_WINAR+:} false; then :
23599  $as_echo_n "(cached) " >&6
23600else
23601  if test -n "$WINAR"; then
23602  ac_cv_prog_WINAR="$WINAR" # Let the user override the test.
23603else
23604as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23605for as_dir in $PATH
23606do
23607  IFS=$as_save_IFS
23608  test -z "$as_dir" && as_dir=.
23609    for ac_exec_ext in '' $ac_executable_extensions; do
23610  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23611    ac_cv_prog_WINAR="lib"
23612    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23613    break 2
23614  fi
23615done
23616  done
23617IFS=$as_save_IFS
23618
23619fi
23620fi
23621WINAR=$ac_cv_prog_WINAR
23622if test -n "$WINAR"; then
23623  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINAR" >&5
23624$as_echo "$WINAR" >&6; }
23625else
23626  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23627$as_echo "no" >&6; }
23628fi
23629
23630
23631
23632  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23633
23634  # First separate the path from the arguments. This will split at the first
23635  # space.
23636  complete="$WINAR"
23637  path="${complete%% *}"
23638  tmp="$complete EOL"
23639  arguments="${tmp#* }"
23640
23641  # Input might be given as Windows format, start by converting to
23642  # unix format.
23643  new_path=`$CYGPATH -u "$path"`
23644
23645  # Now try to locate executable using which
23646  new_path=`$WHICH "$new_path" 2> /dev/null`
23647  # bat and cmd files are not always considered executable in cygwin causing which
23648  # to not find them
23649  if test "x$new_path" = x \
23650      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23651      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23652    new_path=`$CYGPATH -u "$path"`
23653  fi
23654  if test "x$new_path" = x; then
23655    # Oops. Which didn't find the executable.
23656    # The splitting of arguments from the executable at a space might have been incorrect,
23657    # since paths with space are more likely in Windows. Give it another try with the whole
23658    # argument.
23659    path="$complete"
23660    arguments="EOL"
23661    new_path=`$CYGPATH -u "$path"`
23662    new_path=`$WHICH "$new_path" 2> /dev/null`
23663    # bat and cmd files are not always considered executable in cygwin causing which
23664    # to not find them
23665    if test "x$new_path" = x \
23666        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23667        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23668      new_path=`$CYGPATH -u "$path"`
23669    fi
23670    if test "x$new_path" = x; then
23671      # It's still not found. Now this is an unrecoverable error.
23672      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
23673$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
23674      has_space=`$ECHO "$complete" | $GREP " "`
23675      if test "x$has_space" != x; then
23676        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23677$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23678      fi
23679      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
23680    fi
23681  fi
23682
23683  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23684  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23685  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23686  # "foo.exe" is OK but "foo" is an error.
23687  #
23688  # This test is therefore slightly more accurate than "test -f" to check for file presence.
23689  # It is also a way to make sure we got the proper file name for the real test later on.
23690  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23691  if test "x$test_shortpath" = x; then
23692    # Short path failed, file does not exist as specified.
23693    # Try adding .exe or .cmd
23694    if test -f "${new_path}.exe"; then
23695      input_to_shortpath="${new_path}.exe"
23696    elif test -f "${new_path}.cmd"; then
23697      input_to_shortpath="${new_path}.cmd"
23698    else
23699      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$new_path\", is invalid." >&5
23700$as_echo "$as_me: The path of WINAR, which resolves as \"$new_path\", is invalid." >&6;}
23701      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23702$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23703      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
23704    fi
23705  else
23706    input_to_shortpath="$new_path"
23707  fi
23708
23709  # Call helper function which possibly converts this using DOS-style short mode.
23710  # If so, the updated path is stored in $new_path.
23711  new_path="$input_to_shortpath"
23712
23713  input_path="$input_to_shortpath"
23714  # Check if we need to convert this using DOS-style short mode. If the path
23715  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23716  # take no chances and rewrite it.
23717  # Note: m4 eats our [], so we need to use [ and ] instead.
23718  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23719  if test "x$has_forbidden_chars" != x; then
23720    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23721    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23722    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23723    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23724      # Going to short mode and back again did indeed matter. Since short mode is
23725      # case insensitive, let's make it lowercase to improve readability.
23726      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23727      # Now convert it back to Unix-stile (cygpath)
23728      input_path=`$CYGPATH -u "$shortmode_path"`
23729      new_path="$input_path"
23730    fi
23731  fi
23732
23733  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23734  if test "x$test_cygdrive_prefix" = x; then
23735    # As a simple fix, exclude /usr/bin since it's not a real path.
23736    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23737      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23738      # a path prefixed by /cygdrive for fixpath to work.
23739      new_path="$CYGWIN_ROOT_PATH$input_path"
23740    fi
23741  fi
23742
23743  # remove trailing .exe if any
23744  new_path="${new_path/%.exe/}"
23745
23746  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23747
23748  # First separate the path from the arguments. This will split at the first
23749  # space.
23750  complete="$WINAR"
23751  path="${complete%% *}"
23752  tmp="$complete EOL"
23753  arguments="${tmp#* }"
23754
23755  # Input might be given as Windows format, start by converting to
23756  # unix format.
23757  new_path="$path"
23758
23759  windows_path="$new_path"
23760  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23761    unix_path=`$CYGPATH -u "$windows_path"`
23762    new_path="$unix_path"
23763  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23764    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23765    new_path="$unix_path"
23766  fi
23767
23768
23769  # Now try to locate executable using which
23770  new_path=`$WHICH "$new_path" 2> /dev/null`
23771
23772  if test "x$new_path" = x; then
23773    # Oops. Which didn't find the executable.
23774    # The splitting of arguments from the executable at a space might have been incorrect,
23775    # since paths with space are more likely in Windows. Give it another try with the whole
23776    # argument.
23777    path="$complete"
23778    arguments="EOL"
23779    new_path="$path"
23780
23781  windows_path="$new_path"
23782  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23783    unix_path=`$CYGPATH -u "$windows_path"`
23784    new_path="$unix_path"
23785  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23786    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23787    new_path="$unix_path"
23788  fi
23789
23790
23791    new_path=`$WHICH "$new_path" 2> /dev/null`
23792
23793    if test "x$new_path" = x; then
23794      # It's still not found. Now this is an unrecoverable error.
23795      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
23796$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
23797      has_space=`$ECHO "$complete" | $GREP " "`
23798      if test "x$has_space" != x; then
23799        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23800$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23801      fi
23802      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
23803    fi
23804  fi
23805
23806  # Now new_path has a complete unix path to the binary
23807  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23808    # Keep paths in /bin as-is, but remove trailing .exe if any
23809    new_path="${new_path/%.exe/}"
23810    # Do not save /bin paths to all_fixpath_prefixes!
23811  else
23812    # Not in mixed or Windows style, start by that.
23813    new_path=`cmd //c echo $new_path`
23814
23815  input_path="$new_path"
23816  # Check if we need to convert this using DOS-style short mode. If the path
23817  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23818  # take no chances and rewrite it.
23819  # Note: m4 eats our [], so we need to use [ and ] instead.
23820  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23821  if test "x$has_forbidden_chars" != x; then
23822    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23823    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23824  fi
23825
23826    # Output is in $new_path
23827
23828  windows_path="$new_path"
23829  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23830    unix_path=`$CYGPATH -u "$windows_path"`
23831    new_path="$unix_path"
23832  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23833    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23834    new_path="$unix_path"
23835  fi
23836
23837    # remove trailing .exe if any
23838    new_path="${new_path/%.exe/}"
23839
23840    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23841    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23842  fi
23843
23844  else
23845    # We're on a posix platform. Hooray! :)
23846    # First separate the path from the arguments. This will split at the first
23847    # space.
23848    complete="$WINAR"
23849    path="${complete%% *}"
23850    tmp="$complete EOL"
23851    arguments="${tmp#* }"
23852
23853    # Cannot rely on the command "which" here since it doesn't always work.
23854    is_absolute_path=`$ECHO "$path" | $GREP ^/`
23855    if test -z "$is_absolute_path"; then
23856      # Path to executable is not absolute. Find it.
23857      IFS_save="$IFS"
23858      IFS=:
23859      for p in $PATH; do
23860        if test -f "$p/$path" && test -x "$p/$path"; then
23861          new_path="$p/$path"
23862          break
23863        fi
23864      done
23865      IFS="$IFS_save"
23866    else
23867      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINAR (as $path) failed, using $path directly." >&5
23868$as_echo "$as_me: Resolving WINAR (as $path) failed, using $path directly." >&6;}
23869      new_path="$path"
23870    fi
23871
23872    if test "x$new_path" = x; then
23873      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
23874$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
23875      has_space=`$ECHO "$complete" | $GREP " "`
23876      if test "x$has_space" != x; then
23877        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23878$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23879      fi
23880      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
23881    fi
23882  fi
23883
23884  # Now join together the path and the arguments once again
23885  if test "x$arguments" != xEOL; then
23886    new_complete="$new_path ${arguments% *}"
23887  else
23888    new_complete="$new_path"
23889  fi
23890
23891  if test "x$complete" != "x$new_complete"; then
23892    WINAR="$new_complete"
23893    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINAR to \"$new_complete\"" >&5
23894$as_echo "$as_me: Rewriting WINAR to \"$new_complete\"" >&6;}
23895  fi
23896
23897  AR="$WINAR"
23898  ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
23899
23900  # Extract the first word of "dumpbin", so it can be a program name with args.
23901set dummy dumpbin; ac_word=$2
23902{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23903$as_echo_n "checking for $ac_word... " >&6; }
23904if ${ac_cv_prog_DUMPBIN+:} false; then :
23905  $as_echo_n "(cached) " >&6
23906else
23907  if test -n "$DUMPBIN"; then
23908  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
23909else
23910as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23911for as_dir in $PATH
23912do
23913  IFS=$as_save_IFS
23914  test -z "$as_dir" && as_dir=.
23915    for ac_exec_ext in '' $ac_executable_extensions; do
23916  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23917    ac_cv_prog_DUMPBIN="dumpbin"
23918    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23919    break 2
23920  fi
23921done
23922  done
23923IFS=$as_save_IFS
23924
23925fi
23926fi
23927DUMPBIN=$ac_cv_prog_DUMPBIN
23928if test -n "$DUMPBIN"; then
23929  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
23930$as_echo "$DUMPBIN" >&6; }
23931else
23932  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23933$as_echo "no" >&6; }
23934fi
23935
23936
23937
23938  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23939
23940  # First separate the path from the arguments. This will split at the first
23941  # space.
23942  complete="$DUMPBIN"
23943  path="${complete%% *}"
23944  tmp="$complete EOL"
23945  arguments="${tmp#* }"
23946
23947  # Input might be given as Windows format, start by converting to
23948  # unix format.
23949  new_path=`$CYGPATH -u "$path"`
23950
23951  # Now try to locate executable using which
23952  new_path=`$WHICH "$new_path" 2> /dev/null`
23953  # bat and cmd files are not always considered executable in cygwin causing which
23954  # to not find them
23955  if test "x$new_path" = x \
23956      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23957      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23958    new_path=`$CYGPATH -u "$path"`
23959  fi
23960  if test "x$new_path" = x; then
23961    # Oops. Which didn't find the executable.
23962    # The splitting of arguments from the executable at a space might have been incorrect,
23963    # since paths with space are more likely in Windows. Give it another try with the whole
23964    # argument.
23965    path="$complete"
23966    arguments="EOL"
23967    new_path=`$CYGPATH -u "$path"`
23968    new_path=`$WHICH "$new_path" 2> /dev/null`
23969    # bat and cmd files are not always considered executable in cygwin causing which
23970    # to not find them
23971    if test "x$new_path" = x \
23972        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23973        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23974      new_path=`$CYGPATH -u "$path"`
23975    fi
23976    if test "x$new_path" = x; then
23977      # It's still not found. Now this is an unrecoverable error.
23978      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
23979$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
23980      has_space=`$ECHO "$complete" | $GREP " "`
23981      if test "x$has_space" != x; then
23982        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23983$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23984      fi
23985      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
23986    fi
23987  fi
23988
23989  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23990  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23991  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23992  # "foo.exe" is OK but "foo" is an error.
23993  #
23994  # This test is therefore slightly more accurate than "test -f" to check for file presence.
23995  # It is also a way to make sure we got the proper file name for the real test later on.
23996  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23997  if test "x$test_shortpath" = x; then
23998    # Short path failed, file does not exist as specified.
23999    # Try adding .exe or .cmd
24000    if test -f "${new_path}.exe"; then
24001      input_to_shortpath="${new_path}.exe"
24002    elif test -f "${new_path}.cmd"; then
24003      input_to_shortpath="${new_path}.cmd"
24004    else
24005      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
24006$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
24007      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24008$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24009      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
24010    fi
24011  else
24012    input_to_shortpath="$new_path"
24013  fi
24014
24015  # Call helper function which possibly converts this using DOS-style short mode.
24016  # If so, the updated path is stored in $new_path.
24017  new_path="$input_to_shortpath"
24018
24019  input_path="$input_to_shortpath"
24020  # Check if we need to convert this using DOS-style short mode. If the path
24021  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24022  # take no chances and rewrite it.
24023  # Note: m4 eats our [], so we need to use [ and ] instead.
24024  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24025  if test "x$has_forbidden_chars" != x; then
24026    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24027    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24028    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24029    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24030      # Going to short mode and back again did indeed matter. Since short mode is
24031      # case insensitive, let's make it lowercase to improve readability.
24032      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24033      # Now convert it back to Unix-stile (cygpath)
24034      input_path=`$CYGPATH -u "$shortmode_path"`
24035      new_path="$input_path"
24036    fi
24037  fi
24038
24039  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24040  if test "x$test_cygdrive_prefix" = x; then
24041    # As a simple fix, exclude /usr/bin since it's not a real path.
24042    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24043      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24044      # a path prefixed by /cygdrive for fixpath to work.
24045      new_path="$CYGWIN_ROOT_PATH$input_path"
24046    fi
24047  fi
24048
24049  # remove trailing .exe if any
24050  new_path="${new_path/%.exe/}"
24051
24052  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24053
24054  # First separate the path from the arguments. This will split at the first
24055  # space.
24056  complete="$DUMPBIN"
24057  path="${complete%% *}"
24058  tmp="$complete EOL"
24059  arguments="${tmp#* }"
24060
24061  # Input might be given as Windows format, start by converting to
24062  # unix format.
24063  new_path="$path"
24064
24065  windows_path="$new_path"
24066  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24067    unix_path=`$CYGPATH -u "$windows_path"`
24068    new_path="$unix_path"
24069  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24070    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24071    new_path="$unix_path"
24072  fi
24073
24074
24075  # Now try to locate executable using which
24076  new_path=`$WHICH "$new_path" 2> /dev/null`
24077
24078  if test "x$new_path" = x; then
24079    # Oops. Which didn't find the executable.
24080    # The splitting of arguments from the executable at a space might have been incorrect,
24081    # since paths with space are more likely in Windows. Give it another try with the whole
24082    # argument.
24083    path="$complete"
24084    arguments="EOL"
24085    new_path="$path"
24086
24087  windows_path="$new_path"
24088  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24089    unix_path=`$CYGPATH -u "$windows_path"`
24090    new_path="$unix_path"
24091  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24092    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24093    new_path="$unix_path"
24094  fi
24095
24096
24097    new_path=`$WHICH "$new_path" 2> /dev/null`
24098
24099    if test "x$new_path" = x; then
24100      # It's still not found. Now this is an unrecoverable error.
24101      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
24102$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
24103      has_space=`$ECHO "$complete" | $GREP " "`
24104      if test "x$has_space" != x; then
24105        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24106$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24107      fi
24108      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
24109    fi
24110  fi
24111
24112  # Now new_path has a complete unix path to the binary
24113  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24114    # Keep paths in /bin as-is, but remove trailing .exe if any
24115    new_path="${new_path/%.exe/}"
24116    # Do not save /bin paths to all_fixpath_prefixes!
24117  else
24118    # Not in mixed or Windows style, start by that.
24119    new_path=`cmd //c echo $new_path`
24120
24121  input_path="$new_path"
24122  # Check if we need to convert this using DOS-style short mode. If the path
24123  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24124  # take no chances and rewrite it.
24125  # Note: m4 eats our [], so we need to use [ and ] instead.
24126  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24127  if test "x$has_forbidden_chars" != x; then
24128    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24129    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24130  fi
24131
24132    # Output is in $new_path
24133
24134  windows_path="$new_path"
24135  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24136    unix_path=`$CYGPATH -u "$windows_path"`
24137    new_path="$unix_path"
24138  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24139    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24140    new_path="$unix_path"
24141  fi
24142
24143    # remove trailing .exe if any
24144    new_path="${new_path/%.exe/}"
24145
24146    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24147    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24148  fi
24149
24150  else
24151    # We're on a posix platform. Hooray! :)
24152    # First separate the path from the arguments. This will split at the first
24153    # space.
24154    complete="$DUMPBIN"
24155    path="${complete%% *}"
24156    tmp="$complete EOL"
24157    arguments="${tmp#* }"
24158
24159    # Cannot rely on the command "which" here since it doesn't always work.
24160    is_absolute_path=`$ECHO "$path" | $GREP ^/`
24161    if test -z "$is_absolute_path"; then
24162      # Path to executable is not absolute. Find it.
24163      IFS_save="$IFS"
24164      IFS=:
24165      for p in $PATH; do
24166        if test -f "$p/$path" && test -x "$p/$path"; then
24167          new_path="$p/$path"
24168          break
24169        fi
24170      done
24171      IFS="$IFS_save"
24172    else
24173      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving DUMPBIN (as $path) failed, using $path directly." >&5
24174$as_echo "$as_me: Resolving DUMPBIN (as $path) failed, using $path directly." >&6;}
24175      new_path="$path"
24176    fi
24177
24178    if test "x$new_path" = x; then
24179      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
24180$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
24181      has_space=`$ECHO "$complete" | $GREP " "`
24182      if test "x$has_space" != x; then
24183        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24184$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24185      fi
24186      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
24187    fi
24188  fi
24189
24190  # Now join together the path and the arguments once again
24191  if test "x$arguments" != xEOL; then
24192    new_complete="$new_path ${arguments% *}"
24193  else
24194    new_complete="$new_path"
24195  fi
24196
24197  if test "x$complete" != "x$new_complete"; then
24198    DUMPBIN="$new_complete"
24199    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
24200$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
24201  fi
24202
24203
24204      COMPILER_TYPE=CL
24205      CCXXFLAGS="$CCXXFLAGS -nologo"
24206
24207fi
24208
24209
24210
24211  ac_ext=c
24212ac_cpp='$CPP $CPPFLAGS'
24213ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24214ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24215ac_compiler_gnu=$ac_cv_c_compiler_gnu
24216{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
24217$as_echo_n "checking how to run the C preprocessor... " >&6; }
24218# On Suns, sometimes $CPP names a directory.
24219if test -n "$CPP" && test -d "$CPP"; then
24220  CPP=
24221fi
24222if test -z "$CPP"; then
24223  if ${ac_cv_prog_CPP+:} false; then :
24224  $as_echo_n "(cached) " >&6
24225else
24226      # Double quotes because CPP needs to be expanded
24227    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
24228    do
24229      ac_preproc_ok=false
24230for ac_c_preproc_warn_flag in '' yes
24231do
24232  # Use a header file that comes with gcc, so configuring glibc
24233  # with a fresh cross-compiler works.
24234  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24235  # <limits.h> exists even on freestanding compilers.
24236  # On the NeXT, cc -E runs the code through the compiler's parser,
24237  # not just through cpp. "Syntax error" is here to catch this case.
24238  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24239/* end confdefs.h.  */
24240#ifdef __STDC__
24241# include <limits.h>
24242#else
24243# include <assert.h>
24244#endif
24245		     Syntax error
24246_ACEOF
24247if ac_fn_c_try_cpp "$LINENO"; then :
24248
24249else
24250  # Broken: fails on valid input.
24251continue
24252fi
24253rm -f conftest.err conftest.i conftest.$ac_ext
24254
24255  # OK, works on sane cases.  Now check whether nonexistent headers
24256  # can be detected and how.
24257  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24258/* end confdefs.h.  */
24259#include <ac_nonexistent.h>
24260_ACEOF
24261if ac_fn_c_try_cpp "$LINENO"; then :
24262  # Broken: success on invalid input.
24263continue
24264else
24265  # Passes both tests.
24266ac_preproc_ok=:
24267break
24268fi
24269rm -f conftest.err conftest.i conftest.$ac_ext
24270
24271done
24272# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24273rm -f conftest.i conftest.err conftest.$ac_ext
24274if $ac_preproc_ok; then :
24275  break
24276fi
24277
24278    done
24279    ac_cv_prog_CPP=$CPP
24280
24281fi
24282  CPP=$ac_cv_prog_CPP
24283else
24284  ac_cv_prog_CPP=$CPP
24285fi
24286{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
24287$as_echo "$CPP" >&6; }
24288ac_preproc_ok=false
24289for ac_c_preproc_warn_flag in '' yes
24290do
24291  # Use a header file that comes with gcc, so configuring glibc
24292  # with a fresh cross-compiler works.
24293  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24294  # <limits.h> exists even on freestanding compilers.
24295  # On the NeXT, cc -E runs the code through the compiler's parser,
24296  # not just through cpp. "Syntax error" is here to catch this case.
24297  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24298/* end confdefs.h.  */
24299#ifdef __STDC__
24300# include <limits.h>
24301#else
24302# include <assert.h>
24303#endif
24304		     Syntax error
24305_ACEOF
24306if ac_fn_c_try_cpp "$LINENO"; then :
24307
24308else
24309  # Broken: fails on valid input.
24310continue
24311fi
24312rm -f conftest.err conftest.i conftest.$ac_ext
24313
24314  # OK, works on sane cases.  Now check whether nonexistent headers
24315  # can be detected and how.
24316  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24317/* end confdefs.h.  */
24318#include <ac_nonexistent.h>
24319_ACEOF
24320if ac_fn_c_try_cpp "$LINENO"; then :
24321  # Broken: success on invalid input.
24322continue
24323else
24324  # Passes both tests.
24325ac_preproc_ok=:
24326break
24327fi
24328rm -f conftest.err conftest.i conftest.$ac_ext
24329
24330done
24331# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24332rm -f conftest.i conftest.err conftest.$ac_ext
24333if $ac_preproc_ok; then :
24334
24335else
24336  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
24337$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
24338as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
24339See \`config.log' for more details" "$LINENO" 5; }
24340fi
24341
24342ac_ext=cpp
24343ac_cpp='$CXXCPP $CPPFLAGS'
24344ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24345ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24346ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24347
24348
24349  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24350
24351  # First separate the path from the arguments. This will split at the first
24352  # space.
24353  complete="$CPP"
24354  path="${complete%% *}"
24355  tmp="$complete EOL"
24356  arguments="${tmp#* }"
24357
24358  # Input might be given as Windows format, start by converting to
24359  # unix format.
24360  new_path=`$CYGPATH -u "$path"`
24361
24362  # Now try to locate executable using which
24363  new_path=`$WHICH "$new_path" 2> /dev/null`
24364  # bat and cmd files are not always considered executable in cygwin causing which
24365  # to not find them
24366  if test "x$new_path" = x \
24367      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24368      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24369    new_path=`$CYGPATH -u "$path"`
24370  fi
24371  if test "x$new_path" = x; then
24372    # Oops. Which didn't find the executable.
24373    # The splitting of arguments from the executable at a space might have been incorrect,
24374    # since paths with space are more likely in Windows. Give it another try with the whole
24375    # argument.
24376    path="$complete"
24377    arguments="EOL"
24378    new_path=`$CYGPATH -u "$path"`
24379    new_path=`$WHICH "$new_path" 2> /dev/null`
24380    # bat and cmd files are not always considered executable in cygwin causing which
24381    # to not find them
24382    if test "x$new_path" = x \
24383        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24384        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24385      new_path=`$CYGPATH -u "$path"`
24386    fi
24387    if test "x$new_path" = x; then
24388      # It's still not found. Now this is an unrecoverable error.
24389      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
24390$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
24391      has_space=`$ECHO "$complete" | $GREP " "`
24392      if test "x$has_space" != x; then
24393        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24394$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24395      fi
24396      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24397    fi
24398  fi
24399
24400  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24401  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24402  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24403  # "foo.exe" is OK but "foo" is an error.
24404  #
24405  # This test is therefore slightly more accurate than "test -f" to check for file presence.
24406  # It is also a way to make sure we got the proper file name for the real test later on.
24407  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24408  if test "x$test_shortpath" = x; then
24409    # Short path failed, file does not exist as specified.
24410    # Try adding .exe or .cmd
24411    if test -f "${new_path}.exe"; then
24412      input_to_shortpath="${new_path}.exe"
24413    elif test -f "${new_path}.cmd"; then
24414      input_to_shortpath="${new_path}.cmd"
24415    else
24416      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
24417$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
24418      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24419$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24420      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24421    fi
24422  else
24423    input_to_shortpath="$new_path"
24424  fi
24425
24426  # Call helper function which possibly converts this using DOS-style short mode.
24427  # If so, the updated path is stored in $new_path.
24428  new_path="$input_to_shortpath"
24429
24430  input_path="$input_to_shortpath"
24431  # Check if we need to convert this using DOS-style short mode. If the path
24432  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24433  # take no chances and rewrite it.
24434  # Note: m4 eats our [], so we need to use [ and ] instead.
24435  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24436  if test "x$has_forbidden_chars" != x; then
24437    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24438    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24439    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24440    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24441      # Going to short mode and back again did indeed matter. Since short mode is
24442      # case insensitive, let's make it lowercase to improve readability.
24443      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24444      # Now convert it back to Unix-stile (cygpath)
24445      input_path=`$CYGPATH -u "$shortmode_path"`
24446      new_path="$input_path"
24447    fi
24448  fi
24449
24450  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24451  if test "x$test_cygdrive_prefix" = x; then
24452    # As a simple fix, exclude /usr/bin since it's not a real path.
24453    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24454      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24455      # a path prefixed by /cygdrive for fixpath to work.
24456      new_path="$CYGWIN_ROOT_PATH$input_path"
24457    fi
24458  fi
24459
24460  # remove trailing .exe if any
24461  new_path="${new_path/%.exe/}"
24462
24463  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24464
24465  # First separate the path from the arguments. This will split at the first
24466  # space.
24467  complete="$CPP"
24468  path="${complete%% *}"
24469  tmp="$complete EOL"
24470  arguments="${tmp#* }"
24471
24472  # Input might be given as Windows format, start by converting to
24473  # unix format.
24474  new_path="$path"
24475
24476  windows_path="$new_path"
24477  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24478    unix_path=`$CYGPATH -u "$windows_path"`
24479    new_path="$unix_path"
24480  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24481    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24482    new_path="$unix_path"
24483  fi
24484
24485
24486  # Now try to locate executable using which
24487  new_path=`$WHICH "$new_path" 2> /dev/null`
24488
24489  if test "x$new_path" = x; then
24490    # Oops. Which didn't find the executable.
24491    # The splitting of arguments from the executable at a space might have been incorrect,
24492    # since paths with space are more likely in Windows. Give it another try with the whole
24493    # argument.
24494    path="$complete"
24495    arguments="EOL"
24496    new_path="$path"
24497
24498  windows_path="$new_path"
24499  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24500    unix_path=`$CYGPATH -u "$windows_path"`
24501    new_path="$unix_path"
24502  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24503    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24504    new_path="$unix_path"
24505  fi
24506
24507
24508    new_path=`$WHICH "$new_path" 2> /dev/null`
24509
24510    if test "x$new_path" = x; then
24511      # It's still not found. Now this is an unrecoverable error.
24512      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
24513$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
24514      has_space=`$ECHO "$complete" | $GREP " "`
24515      if test "x$has_space" != x; then
24516        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24517$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24518      fi
24519      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24520    fi
24521  fi
24522
24523  # Now new_path has a complete unix path to the binary
24524  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24525    # Keep paths in /bin as-is, but remove trailing .exe if any
24526    new_path="${new_path/%.exe/}"
24527    # Do not save /bin paths to all_fixpath_prefixes!
24528  else
24529    # Not in mixed or Windows style, start by that.
24530    new_path=`cmd //c echo $new_path`
24531
24532  input_path="$new_path"
24533  # Check if we need to convert this using DOS-style short mode. If the path
24534  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24535  # take no chances and rewrite it.
24536  # Note: m4 eats our [], so we need to use [ and ] instead.
24537  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24538  if test "x$has_forbidden_chars" != x; then
24539    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24540    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24541  fi
24542
24543    # Output is in $new_path
24544
24545  windows_path="$new_path"
24546  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24547    unix_path=`$CYGPATH -u "$windows_path"`
24548    new_path="$unix_path"
24549  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24550    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24551    new_path="$unix_path"
24552  fi
24553
24554    # remove trailing .exe if any
24555    new_path="${new_path/%.exe/}"
24556
24557    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24558    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24559  fi
24560
24561  else
24562    # We're on a posix platform. Hooray! :)
24563    # First separate the path from the arguments. This will split at the first
24564    # space.
24565    complete="$CPP"
24566    path="${complete%% *}"
24567    tmp="$complete EOL"
24568    arguments="${tmp#* }"
24569
24570    # Cannot rely on the command "which" here since it doesn't always work.
24571    is_absolute_path=`$ECHO "$path" | $GREP ^/`
24572    if test -z "$is_absolute_path"; then
24573      # Path to executable is not absolute. Find it.
24574      IFS_save="$IFS"
24575      IFS=:
24576      for p in $PATH; do
24577        if test -f "$p/$path" && test -x "$p/$path"; then
24578          new_path="$p/$path"
24579          break
24580        fi
24581      done
24582      IFS="$IFS_save"
24583    else
24584      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CPP (as $path) failed, using $path directly." >&5
24585$as_echo "$as_me: Resolving CPP (as $path) failed, using $path directly." >&6;}
24586      new_path="$path"
24587    fi
24588
24589    if test "x$new_path" = x; then
24590      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
24591$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
24592      has_space=`$ECHO "$complete" | $GREP " "`
24593      if test "x$has_space" != x; then
24594        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24595$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24596      fi
24597      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24598    fi
24599  fi
24600
24601  # Now join together the path and the arguments once again
24602  if test "x$arguments" != xEOL; then
24603    new_complete="$new_path ${arguments% *}"
24604  else
24605    new_complete="$new_path"
24606  fi
24607
24608  if test "x$complete" != "x$new_complete"; then
24609    CPP="$new_complete"
24610    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
24611$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
24612  fi
24613
24614
24615  ac_ext=cpp
24616ac_cpp='$CXXCPP $CPPFLAGS'
24617ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24618ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24619ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24620{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
24621$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
24622if test -z "$CXXCPP"; then
24623  if ${ac_cv_prog_CXXCPP+:} false; then :
24624  $as_echo_n "(cached) " >&6
24625else
24626      # Double quotes because CXXCPP needs to be expanded
24627    for CXXCPP in "$CXX -E" "/lib/cpp"
24628    do
24629      ac_preproc_ok=false
24630for ac_cxx_preproc_warn_flag in '' yes
24631do
24632  # Use a header file that comes with gcc, so configuring glibc
24633  # with a fresh cross-compiler works.
24634  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24635  # <limits.h> exists even on freestanding compilers.
24636  # On the NeXT, cc -E runs the code through the compiler's parser,
24637  # not just through cpp. "Syntax error" is here to catch this case.
24638  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24639/* end confdefs.h.  */
24640#ifdef __STDC__
24641# include <limits.h>
24642#else
24643# include <assert.h>
24644#endif
24645		     Syntax error
24646_ACEOF
24647if ac_fn_cxx_try_cpp "$LINENO"; then :
24648
24649else
24650  # Broken: fails on valid input.
24651continue
24652fi
24653rm -f conftest.err conftest.i conftest.$ac_ext
24654
24655  # OK, works on sane cases.  Now check whether nonexistent headers
24656  # can be detected and how.
24657  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24658/* end confdefs.h.  */
24659#include <ac_nonexistent.h>
24660_ACEOF
24661if ac_fn_cxx_try_cpp "$LINENO"; then :
24662  # Broken: success on invalid input.
24663continue
24664else
24665  # Passes both tests.
24666ac_preproc_ok=:
24667break
24668fi
24669rm -f conftest.err conftest.i conftest.$ac_ext
24670
24671done
24672# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24673rm -f conftest.i conftest.err conftest.$ac_ext
24674if $ac_preproc_ok; then :
24675  break
24676fi
24677
24678    done
24679    ac_cv_prog_CXXCPP=$CXXCPP
24680
24681fi
24682  CXXCPP=$ac_cv_prog_CXXCPP
24683else
24684  ac_cv_prog_CXXCPP=$CXXCPP
24685fi
24686{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
24687$as_echo "$CXXCPP" >&6; }
24688ac_preproc_ok=false
24689for ac_cxx_preproc_warn_flag in '' yes
24690do
24691  # Use a header file that comes with gcc, so configuring glibc
24692  # with a fresh cross-compiler works.
24693  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24694  # <limits.h> exists even on freestanding compilers.
24695  # On the NeXT, cc -E runs the code through the compiler's parser,
24696  # not just through cpp. "Syntax error" is here to catch this case.
24697  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24698/* end confdefs.h.  */
24699#ifdef __STDC__
24700# include <limits.h>
24701#else
24702# include <assert.h>
24703#endif
24704		     Syntax error
24705_ACEOF
24706if ac_fn_cxx_try_cpp "$LINENO"; then :
24707
24708else
24709  # Broken: fails on valid input.
24710continue
24711fi
24712rm -f conftest.err conftest.i conftest.$ac_ext
24713
24714  # OK, works on sane cases.  Now check whether nonexistent headers
24715  # can be detected and how.
24716  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24717/* end confdefs.h.  */
24718#include <ac_nonexistent.h>
24719_ACEOF
24720if ac_fn_cxx_try_cpp "$LINENO"; then :
24721  # Broken: success on invalid input.
24722continue
24723else
24724  # Passes both tests.
24725ac_preproc_ok=:
24726break
24727fi
24728rm -f conftest.err conftest.i conftest.$ac_ext
24729
24730done
24731# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24732rm -f conftest.i conftest.err conftest.$ac_ext
24733if $ac_preproc_ok; then :
24734
24735else
24736  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
24737$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
24738as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
24739See \`config.log' for more details" "$LINENO" 5; }
24740fi
24741
24742ac_ext=cpp
24743ac_cpp='$CXXCPP $CPPFLAGS'
24744ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24745ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24746ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24747
24748
24749  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24750
24751  # First separate the path from the arguments. This will split at the first
24752  # space.
24753  complete="$CXXCPP"
24754  path="${complete%% *}"
24755  tmp="$complete EOL"
24756  arguments="${tmp#* }"
24757
24758  # Input might be given as Windows format, start by converting to
24759  # unix format.
24760  new_path=`$CYGPATH -u "$path"`
24761
24762  # Now try to locate executable using which
24763  new_path=`$WHICH "$new_path" 2> /dev/null`
24764  # bat and cmd files are not always considered executable in cygwin causing which
24765  # to not find them
24766  if test "x$new_path" = x \
24767      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24768      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24769    new_path=`$CYGPATH -u "$path"`
24770  fi
24771  if test "x$new_path" = x; then
24772    # Oops. Which didn't find the executable.
24773    # The splitting of arguments from the executable at a space might have been incorrect,
24774    # since paths with space are more likely in Windows. Give it another try with the whole
24775    # argument.
24776    path="$complete"
24777    arguments="EOL"
24778    new_path=`$CYGPATH -u "$path"`
24779    new_path=`$WHICH "$new_path" 2> /dev/null`
24780    # bat and cmd files are not always considered executable in cygwin causing which
24781    # to not find them
24782    if test "x$new_path" = x \
24783        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24784        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24785      new_path=`$CYGPATH -u "$path"`
24786    fi
24787    if test "x$new_path" = x; then
24788      # It's still not found. Now this is an unrecoverable error.
24789      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
24790$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
24791      has_space=`$ECHO "$complete" | $GREP " "`
24792      if test "x$has_space" != x; then
24793        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24794$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24795      fi
24796      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
24797    fi
24798  fi
24799
24800  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24801  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24802  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24803  # "foo.exe" is OK but "foo" is an error.
24804  #
24805  # This test is therefore slightly more accurate than "test -f" to check for file presence.
24806  # It is also a way to make sure we got the proper file name for the real test later on.
24807  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24808  if test "x$test_shortpath" = x; then
24809    # Short path failed, file does not exist as specified.
24810    # Try adding .exe or .cmd
24811    if test -f "${new_path}.exe"; then
24812      input_to_shortpath="${new_path}.exe"
24813    elif test -f "${new_path}.cmd"; then
24814      input_to_shortpath="${new_path}.cmd"
24815    else
24816      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
24817$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
24818      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24819$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24820      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
24821    fi
24822  else
24823    input_to_shortpath="$new_path"
24824  fi
24825
24826  # Call helper function which possibly converts this using DOS-style short mode.
24827  # If so, the updated path is stored in $new_path.
24828  new_path="$input_to_shortpath"
24829
24830  input_path="$input_to_shortpath"
24831  # Check if we need to convert this using DOS-style short mode. If the path
24832  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24833  # take no chances and rewrite it.
24834  # Note: m4 eats our [], so we need to use [ and ] instead.
24835  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24836  if test "x$has_forbidden_chars" != x; then
24837    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24838    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24839    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24840    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24841      # Going to short mode and back again did indeed matter. Since short mode is
24842      # case insensitive, let's make it lowercase to improve readability.
24843      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24844      # Now convert it back to Unix-stile (cygpath)
24845      input_path=`$CYGPATH -u "$shortmode_path"`
24846      new_path="$input_path"
24847    fi
24848  fi
24849
24850  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24851  if test "x$test_cygdrive_prefix" = x; then
24852    # As a simple fix, exclude /usr/bin since it's not a real path.
24853    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24854      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24855      # a path prefixed by /cygdrive for fixpath to work.
24856      new_path="$CYGWIN_ROOT_PATH$input_path"
24857    fi
24858  fi
24859
24860  # remove trailing .exe if any
24861  new_path="${new_path/%.exe/}"
24862
24863  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24864
24865  # First separate the path from the arguments. This will split at the first
24866  # space.
24867  complete="$CXXCPP"
24868  path="${complete%% *}"
24869  tmp="$complete EOL"
24870  arguments="${tmp#* }"
24871
24872  # Input might be given as Windows format, start by converting to
24873  # unix format.
24874  new_path="$path"
24875
24876  windows_path="$new_path"
24877  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24878    unix_path=`$CYGPATH -u "$windows_path"`
24879    new_path="$unix_path"
24880  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24881    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24882    new_path="$unix_path"
24883  fi
24884
24885
24886  # Now try to locate executable using which
24887  new_path=`$WHICH "$new_path" 2> /dev/null`
24888
24889  if test "x$new_path" = x; then
24890    # Oops. Which didn't find the executable.
24891    # The splitting of arguments from the executable at a space might have been incorrect,
24892    # since paths with space are more likely in Windows. Give it another try with the whole
24893    # argument.
24894    path="$complete"
24895    arguments="EOL"
24896    new_path="$path"
24897
24898  windows_path="$new_path"
24899  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24900    unix_path=`$CYGPATH -u "$windows_path"`
24901    new_path="$unix_path"
24902  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24903    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24904    new_path="$unix_path"
24905  fi
24906
24907
24908    new_path=`$WHICH "$new_path" 2> /dev/null`
24909
24910    if test "x$new_path" = x; then
24911      # It's still not found. Now this is an unrecoverable error.
24912      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
24913$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
24914      has_space=`$ECHO "$complete" | $GREP " "`
24915      if test "x$has_space" != x; then
24916        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24917$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24918      fi
24919      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
24920    fi
24921  fi
24922
24923  # Now new_path has a complete unix path to the binary
24924  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24925    # Keep paths in /bin as-is, but remove trailing .exe if any
24926    new_path="${new_path/%.exe/}"
24927    # Do not save /bin paths to all_fixpath_prefixes!
24928  else
24929    # Not in mixed or Windows style, start by that.
24930    new_path=`cmd //c echo $new_path`
24931
24932  input_path="$new_path"
24933  # Check if we need to convert this using DOS-style short mode. If the path
24934  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24935  # take no chances and rewrite it.
24936  # Note: m4 eats our [], so we need to use [ and ] instead.
24937  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24938  if test "x$has_forbidden_chars" != x; then
24939    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24940    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24941  fi
24942
24943    # Output is in $new_path
24944
24945  windows_path="$new_path"
24946  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24947    unix_path=`$CYGPATH -u "$windows_path"`
24948    new_path="$unix_path"
24949  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24950    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24951    new_path="$unix_path"
24952  fi
24953
24954    # remove trailing .exe if any
24955    new_path="${new_path/%.exe/}"
24956
24957    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24958    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24959  fi
24960
24961  else
24962    # We're on a posix platform. Hooray! :)
24963    # First separate the path from the arguments. This will split at the first
24964    # space.
24965    complete="$CXXCPP"
24966    path="${complete%% *}"
24967    tmp="$complete EOL"
24968    arguments="${tmp#* }"
24969
24970    # Cannot rely on the command "which" here since it doesn't always work.
24971    is_absolute_path=`$ECHO "$path" | $GREP ^/`
24972    if test -z "$is_absolute_path"; then
24973      # Path to executable is not absolute. Find it.
24974      IFS_save="$IFS"
24975      IFS=:
24976      for p in $PATH; do
24977        if test -f "$p/$path" && test -x "$p/$path"; then
24978          new_path="$p/$path"
24979          break
24980        fi
24981      done
24982      IFS="$IFS_save"
24983    else
24984      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXXCPP (as $path) failed, using $path directly." >&5
24985$as_echo "$as_me: Resolving CXXCPP (as $path) failed, using $path directly." >&6;}
24986      new_path="$path"
24987    fi
24988
24989    if test "x$new_path" = x; then
24990      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
24991$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
24992      has_space=`$ECHO "$complete" | $GREP " "`
24993      if test "x$has_space" != x; then
24994        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24995$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24996      fi
24997      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
24998    fi
24999  fi
25000
25001  # Now join together the path and the arguments once again
25002  if test "x$arguments" != xEOL; then
25003    new_complete="$new_path ${arguments% *}"
25004  else
25005    new_complete="$new_path"
25006  fi
25007
25008  if test "x$complete" != "x$new_complete"; then
25009    CXXCPP="$new_complete"
25010    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
25011$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
25012  fi
25013
25014
25015  if test "x$COMPILE_TYPE" != "xcross"; then
25016    # If we are not cross compiling, use the same compilers for
25017    # building the build platform executables. The cross-compilation
25018    # case needed to be done earlier, but this can only be done after
25019    # the native tools have been localized.
25020    BUILD_CC="$CC"
25021    BUILD_CXX="$CXX"
25022    BUILD_LD="$LD"
25023  fi
25024
25025  # for solaris we really need solaris tools, and not gnu equivalent
25026  #   these seems to normally reside in /usr/ccs/bin so add that to path before
25027  #   starting to probe
25028  #
25029  #   NOTE: I add this /usr/ccs/bin after TOOLS but before OLD_PATH
25030  #         so that it can be overriden --with-tools-dir
25031  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
25032    PATH="${TOOLS_DIR}:/usr/ccs/bin:${OLD_PATH}"
25033  fi
25034
25035  # Find the right assembler.
25036  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
25037    # Extract the first word of "as", so it can be a program name with args.
25038set dummy as; ac_word=$2
25039{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25040$as_echo_n "checking for $ac_word... " >&6; }
25041if ${ac_cv_path_AS+:} false; then :
25042  $as_echo_n "(cached) " >&6
25043else
25044  case $AS in
25045  [\\/]* | ?:[\\/]*)
25046  ac_cv_path_AS="$AS" # Let the user override the test with a path.
25047  ;;
25048  *)
25049  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25050for as_dir in $PATH
25051do
25052  IFS=$as_save_IFS
25053  test -z "$as_dir" && as_dir=.
25054    for ac_exec_ext in '' $ac_executable_extensions; do
25055  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25056    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
25057    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25058    break 2
25059  fi
25060done
25061  done
25062IFS=$as_save_IFS
25063
25064  ;;
25065esac
25066fi
25067AS=$ac_cv_path_AS
25068if test -n "$AS"; then
25069  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
25070$as_echo "$AS" >&6; }
25071else
25072  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25073$as_echo "no" >&6; }
25074fi
25075
25076
25077
25078  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25079
25080  # First separate the path from the arguments. This will split at the first
25081  # space.
25082  complete="$AS"
25083  path="${complete%% *}"
25084  tmp="$complete EOL"
25085  arguments="${tmp#* }"
25086
25087  # Input might be given as Windows format, start by converting to
25088  # unix format.
25089  new_path=`$CYGPATH -u "$path"`
25090
25091  # Now try to locate executable using which
25092  new_path=`$WHICH "$new_path" 2> /dev/null`
25093  # bat and cmd files are not always considered executable in cygwin causing which
25094  # to not find them
25095  if test "x$new_path" = x \
25096      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25097      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25098    new_path=`$CYGPATH -u "$path"`
25099  fi
25100  if test "x$new_path" = x; then
25101    # Oops. Which didn't find the executable.
25102    # The splitting of arguments from the executable at a space might have been incorrect,
25103    # since paths with space are more likely in Windows. Give it another try with the whole
25104    # argument.
25105    path="$complete"
25106    arguments="EOL"
25107    new_path=`$CYGPATH -u "$path"`
25108    new_path=`$WHICH "$new_path" 2> /dev/null`
25109    # bat and cmd files are not always considered executable in cygwin causing which
25110    # to not find them
25111    if test "x$new_path" = x \
25112        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25113        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25114      new_path=`$CYGPATH -u "$path"`
25115    fi
25116    if test "x$new_path" = x; then
25117      # It's still not found. Now this is an unrecoverable error.
25118      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
25119$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
25120      has_space=`$ECHO "$complete" | $GREP " "`
25121      if test "x$has_space" != x; then
25122        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25123$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25124      fi
25125      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25126    fi
25127  fi
25128
25129  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25130  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25131  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25132  # "foo.exe" is OK but "foo" is an error.
25133  #
25134  # This test is therefore slightly more accurate than "test -f" to check for file presence.
25135  # It is also a way to make sure we got the proper file name for the real test later on.
25136  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25137  if test "x$test_shortpath" = x; then
25138    # Short path failed, file does not exist as specified.
25139    # Try adding .exe or .cmd
25140    if test -f "${new_path}.exe"; then
25141      input_to_shortpath="${new_path}.exe"
25142    elif test -f "${new_path}.cmd"; then
25143      input_to_shortpath="${new_path}.cmd"
25144    else
25145      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
25146$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
25147      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25148$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25149      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25150    fi
25151  else
25152    input_to_shortpath="$new_path"
25153  fi
25154
25155  # Call helper function which possibly converts this using DOS-style short mode.
25156  # If so, the updated path is stored in $new_path.
25157  new_path="$input_to_shortpath"
25158
25159  input_path="$input_to_shortpath"
25160  # Check if we need to convert this using DOS-style short mode. If the path
25161  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25162  # take no chances and rewrite it.
25163  # Note: m4 eats our [], so we need to use [ and ] instead.
25164  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25165  if test "x$has_forbidden_chars" != x; then
25166    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25167    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25168    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25169    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25170      # Going to short mode and back again did indeed matter. Since short mode is
25171      # case insensitive, let's make it lowercase to improve readability.
25172      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25173      # Now convert it back to Unix-stile (cygpath)
25174      input_path=`$CYGPATH -u "$shortmode_path"`
25175      new_path="$input_path"
25176    fi
25177  fi
25178
25179  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25180  if test "x$test_cygdrive_prefix" = x; then
25181    # As a simple fix, exclude /usr/bin since it's not a real path.
25182    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25183      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25184      # a path prefixed by /cygdrive for fixpath to work.
25185      new_path="$CYGWIN_ROOT_PATH$input_path"
25186    fi
25187  fi
25188
25189  # remove trailing .exe if any
25190  new_path="${new_path/%.exe/}"
25191
25192  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25193
25194  # First separate the path from the arguments. This will split at the first
25195  # space.
25196  complete="$AS"
25197  path="${complete%% *}"
25198  tmp="$complete EOL"
25199  arguments="${tmp#* }"
25200
25201  # Input might be given as Windows format, start by converting to
25202  # unix format.
25203  new_path="$path"
25204
25205  windows_path="$new_path"
25206  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25207    unix_path=`$CYGPATH -u "$windows_path"`
25208    new_path="$unix_path"
25209  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25210    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25211    new_path="$unix_path"
25212  fi
25213
25214
25215  # Now try to locate executable using which
25216  new_path=`$WHICH "$new_path" 2> /dev/null`
25217
25218  if test "x$new_path" = x; then
25219    # Oops. Which didn't find the executable.
25220    # The splitting of arguments from the executable at a space might have been incorrect,
25221    # since paths with space are more likely in Windows. Give it another try with the whole
25222    # argument.
25223    path="$complete"
25224    arguments="EOL"
25225    new_path="$path"
25226
25227  windows_path="$new_path"
25228  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25229    unix_path=`$CYGPATH -u "$windows_path"`
25230    new_path="$unix_path"
25231  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25232    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25233    new_path="$unix_path"
25234  fi
25235
25236
25237    new_path=`$WHICH "$new_path" 2> /dev/null`
25238
25239    if test "x$new_path" = x; then
25240      # It's still not found. Now this is an unrecoverable error.
25241      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
25242$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
25243      has_space=`$ECHO "$complete" | $GREP " "`
25244      if test "x$has_space" != x; then
25245        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25246$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25247      fi
25248      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25249    fi
25250  fi
25251
25252  # Now new_path has a complete unix path to the binary
25253  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25254    # Keep paths in /bin as-is, but remove trailing .exe if any
25255    new_path="${new_path/%.exe/}"
25256    # Do not save /bin paths to all_fixpath_prefixes!
25257  else
25258    # Not in mixed or Windows style, start by that.
25259    new_path=`cmd //c echo $new_path`
25260
25261  input_path="$new_path"
25262  # Check if we need to convert this using DOS-style short mode. If the path
25263  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25264  # take no chances and rewrite it.
25265  # Note: m4 eats our [], so we need to use [ and ] instead.
25266  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25267  if test "x$has_forbidden_chars" != x; then
25268    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25269    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25270  fi
25271
25272    # Output is in $new_path
25273
25274  windows_path="$new_path"
25275  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25276    unix_path=`$CYGPATH -u "$windows_path"`
25277    new_path="$unix_path"
25278  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25279    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25280    new_path="$unix_path"
25281  fi
25282
25283    # remove trailing .exe if any
25284    new_path="${new_path/%.exe/}"
25285
25286    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25287    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25288  fi
25289
25290  else
25291    # We're on a posix platform. Hooray! :)
25292    # First separate the path from the arguments. This will split at the first
25293    # space.
25294    complete="$AS"
25295    path="${complete%% *}"
25296    tmp="$complete EOL"
25297    arguments="${tmp#* }"
25298
25299    # Cannot rely on the command "which" here since it doesn't always work.
25300    is_absolute_path=`$ECHO "$path" | $GREP ^/`
25301    if test -z "$is_absolute_path"; then
25302      # Path to executable is not absolute. Find it.
25303      IFS_save="$IFS"
25304      IFS=:
25305      for p in $PATH; do
25306        if test -f "$p/$path" && test -x "$p/$path"; then
25307          new_path="$p/$path"
25308          break
25309        fi
25310      done
25311      IFS="$IFS_save"
25312    else
25313      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AS (as $path) failed, using $path directly." >&5
25314$as_echo "$as_me: Resolving AS (as $path) failed, using $path directly." >&6;}
25315      new_path="$path"
25316    fi
25317
25318    if test "x$new_path" = x; then
25319      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
25320$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
25321      has_space=`$ECHO "$complete" | $GREP " "`
25322      if test "x$has_space" != x; then
25323        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25324$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25325      fi
25326      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25327    fi
25328  fi
25329
25330  # Now join together the path and the arguments once again
25331  if test "x$arguments" != xEOL; then
25332    new_complete="$new_path ${arguments% *}"
25333  else
25334    new_complete="$new_path"
25335  fi
25336
25337  if test "x$complete" != "x$new_complete"; then
25338    AS="$new_complete"
25339    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
25340$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
25341  fi
25342
25343  else
25344    AS="$CC -c"
25345  fi
25346
25347
25348  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
25349    # Extract the first word of "nm", so it can be a program name with args.
25350set dummy nm; ac_word=$2
25351{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25352$as_echo_n "checking for $ac_word... " >&6; }
25353if ${ac_cv_path_NM+:} false; then :
25354  $as_echo_n "(cached) " >&6
25355else
25356  case $NM in
25357  [\\/]* | ?:[\\/]*)
25358  ac_cv_path_NM="$NM" # Let the user override the test with a path.
25359  ;;
25360  *)
25361  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25362for as_dir in $PATH
25363do
25364  IFS=$as_save_IFS
25365  test -z "$as_dir" && as_dir=.
25366    for ac_exec_ext in '' $ac_executable_extensions; do
25367  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25368    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
25369    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25370    break 2
25371  fi
25372done
25373  done
25374IFS=$as_save_IFS
25375
25376  ;;
25377esac
25378fi
25379NM=$ac_cv_path_NM
25380if test -n "$NM"; then
25381  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
25382$as_echo "$NM" >&6; }
25383else
25384  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25385$as_echo "no" >&6; }
25386fi
25387
25388
25389
25390  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25391
25392  # First separate the path from the arguments. This will split at the first
25393  # space.
25394  complete="$NM"
25395  path="${complete%% *}"
25396  tmp="$complete EOL"
25397  arguments="${tmp#* }"
25398
25399  # Input might be given as Windows format, start by converting to
25400  # unix format.
25401  new_path=`$CYGPATH -u "$path"`
25402
25403  # Now try to locate executable using which
25404  new_path=`$WHICH "$new_path" 2> /dev/null`
25405  # bat and cmd files are not always considered executable in cygwin causing which
25406  # to not find them
25407  if test "x$new_path" = x \
25408      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25409      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25410    new_path=`$CYGPATH -u "$path"`
25411  fi
25412  if test "x$new_path" = x; then
25413    # Oops. Which didn't find the executable.
25414    # The splitting of arguments from the executable at a space might have been incorrect,
25415    # since paths with space are more likely in Windows. Give it another try with the whole
25416    # argument.
25417    path="$complete"
25418    arguments="EOL"
25419    new_path=`$CYGPATH -u "$path"`
25420    new_path=`$WHICH "$new_path" 2> /dev/null`
25421    # bat and cmd files are not always considered executable in cygwin causing which
25422    # to not find them
25423    if test "x$new_path" = x \
25424        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25425        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25426      new_path=`$CYGPATH -u "$path"`
25427    fi
25428    if test "x$new_path" = x; then
25429      # It's still not found. Now this is an unrecoverable error.
25430      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25431$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25432      has_space=`$ECHO "$complete" | $GREP " "`
25433      if test "x$has_space" != x; then
25434        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25435$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25436      fi
25437      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25438    fi
25439  fi
25440
25441  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25442  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25443  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25444  # "foo.exe" is OK but "foo" is an error.
25445  #
25446  # This test is therefore slightly more accurate than "test -f" to check for file presence.
25447  # It is also a way to make sure we got the proper file name for the real test later on.
25448  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25449  if test "x$test_shortpath" = x; then
25450    # Short path failed, file does not exist as specified.
25451    # Try adding .exe or .cmd
25452    if test -f "${new_path}.exe"; then
25453      input_to_shortpath="${new_path}.exe"
25454    elif test -f "${new_path}.cmd"; then
25455      input_to_shortpath="${new_path}.cmd"
25456    else
25457      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
25458$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
25459      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25460$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25461      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25462    fi
25463  else
25464    input_to_shortpath="$new_path"
25465  fi
25466
25467  # Call helper function which possibly converts this using DOS-style short mode.
25468  # If so, the updated path is stored in $new_path.
25469  new_path="$input_to_shortpath"
25470
25471  input_path="$input_to_shortpath"
25472  # Check if we need to convert this using DOS-style short mode. If the path
25473  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25474  # take no chances and rewrite it.
25475  # Note: m4 eats our [], so we need to use [ and ] instead.
25476  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25477  if test "x$has_forbidden_chars" != x; then
25478    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25479    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25480    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25481    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25482      # Going to short mode and back again did indeed matter. Since short mode is
25483      # case insensitive, let's make it lowercase to improve readability.
25484      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25485      # Now convert it back to Unix-stile (cygpath)
25486      input_path=`$CYGPATH -u "$shortmode_path"`
25487      new_path="$input_path"
25488    fi
25489  fi
25490
25491  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25492  if test "x$test_cygdrive_prefix" = x; then
25493    # As a simple fix, exclude /usr/bin since it's not a real path.
25494    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25495      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25496      # a path prefixed by /cygdrive for fixpath to work.
25497      new_path="$CYGWIN_ROOT_PATH$input_path"
25498    fi
25499  fi
25500
25501  # remove trailing .exe if any
25502  new_path="${new_path/%.exe/}"
25503
25504  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25505
25506  # First separate the path from the arguments. This will split at the first
25507  # space.
25508  complete="$NM"
25509  path="${complete%% *}"
25510  tmp="$complete EOL"
25511  arguments="${tmp#* }"
25512
25513  # Input might be given as Windows format, start by converting to
25514  # unix format.
25515  new_path="$path"
25516
25517  windows_path="$new_path"
25518  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25519    unix_path=`$CYGPATH -u "$windows_path"`
25520    new_path="$unix_path"
25521  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25522    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25523    new_path="$unix_path"
25524  fi
25525
25526
25527  # Now try to locate executable using which
25528  new_path=`$WHICH "$new_path" 2> /dev/null`
25529
25530  if test "x$new_path" = x; then
25531    # Oops. Which didn't find the executable.
25532    # The splitting of arguments from the executable at a space might have been incorrect,
25533    # since paths with space are more likely in Windows. Give it another try with the whole
25534    # argument.
25535    path="$complete"
25536    arguments="EOL"
25537    new_path="$path"
25538
25539  windows_path="$new_path"
25540  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25541    unix_path=`$CYGPATH -u "$windows_path"`
25542    new_path="$unix_path"
25543  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25544    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25545    new_path="$unix_path"
25546  fi
25547
25548
25549    new_path=`$WHICH "$new_path" 2> /dev/null`
25550
25551    if test "x$new_path" = x; then
25552      # It's still not found. Now this is an unrecoverable error.
25553      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25554$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25555      has_space=`$ECHO "$complete" | $GREP " "`
25556      if test "x$has_space" != x; then
25557        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25558$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25559      fi
25560      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25561    fi
25562  fi
25563
25564  # Now new_path has a complete unix path to the binary
25565  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25566    # Keep paths in /bin as-is, but remove trailing .exe if any
25567    new_path="${new_path/%.exe/}"
25568    # Do not save /bin paths to all_fixpath_prefixes!
25569  else
25570    # Not in mixed or Windows style, start by that.
25571    new_path=`cmd //c echo $new_path`
25572
25573  input_path="$new_path"
25574  # Check if we need to convert this using DOS-style short mode. If the path
25575  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25576  # take no chances and rewrite it.
25577  # Note: m4 eats our [], so we need to use [ and ] instead.
25578  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25579  if test "x$has_forbidden_chars" != x; then
25580    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25581    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25582  fi
25583
25584    # Output is in $new_path
25585
25586  windows_path="$new_path"
25587  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25588    unix_path=`$CYGPATH -u "$windows_path"`
25589    new_path="$unix_path"
25590  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25591    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25592    new_path="$unix_path"
25593  fi
25594
25595    # remove trailing .exe if any
25596    new_path="${new_path/%.exe/}"
25597
25598    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25599    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25600  fi
25601
25602  else
25603    # We're on a posix platform. Hooray! :)
25604    # First separate the path from the arguments. This will split at the first
25605    # space.
25606    complete="$NM"
25607    path="${complete%% *}"
25608    tmp="$complete EOL"
25609    arguments="${tmp#* }"
25610
25611    # Cannot rely on the command "which" here since it doesn't always work.
25612    is_absolute_path=`$ECHO "$path" | $GREP ^/`
25613    if test -z "$is_absolute_path"; then
25614      # Path to executable is not absolute. Find it.
25615      IFS_save="$IFS"
25616      IFS=:
25617      for p in $PATH; do
25618        if test -f "$p/$path" && test -x "$p/$path"; then
25619          new_path="$p/$path"
25620          break
25621        fi
25622      done
25623      IFS="$IFS_save"
25624    else
25625      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) failed, using $path directly." >&5
25626$as_echo "$as_me: Resolving NM (as $path) failed, using $path directly." >&6;}
25627      new_path="$path"
25628    fi
25629
25630    if test "x$new_path" = x; then
25631      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25632$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25633      has_space=`$ECHO "$complete" | $GREP " "`
25634      if test "x$has_space" != x; then
25635        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25636$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25637      fi
25638      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25639    fi
25640  fi
25641
25642  # Now join together the path and the arguments once again
25643  if test "x$arguments" != xEOL; then
25644    new_complete="$new_path ${arguments% *}"
25645  else
25646    new_complete="$new_path"
25647  fi
25648
25649  if test "x$complete" != "x$new_complete"; then
25650    NM="$new_complete"
25651    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
25652$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
25653  fi
25654
25655    # Extract the first word of "gnm", so it can be a program name with args.
25656set dummy gnm; ac_word=$2
25657{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25658$as_echo_n "checking for $ac_word... " >&6; }
25659if ${ac_cv_path_GNM+:} false; then :
25660  $as_echo_n "(cached) " >&6
25661else
25662  case $GNM in
25663  [\\/]* | ?:[\\/]*)
25664  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
25665  ;;
25666  *)
25667  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25668for as_dir in $PATH
25669do
25670  IFS=$as_save_IFS
25671  test -z "$as_dir" && as_dir=.
25672    for ac_exec_ext in '' $ac_executable_extensions; do
25673  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25674    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
25675    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25676    break 2
25677  fi
25678done
25679  done
25680IFS=$as_save_IFS
25681
25682  ;;
25683esac
25684fi
25685GNM=$ac_cv_path_GNM
25686if test -n "$GNM"; then
25687  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
25688$as_echo "$GNM" >&6; }
25689else
25690  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25691$as_echo "no" >&6; }
25692fi
25693
25694
25695
25696  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25697
25698  # First separate the path from the arguments. This will split at the first
25699  # space.
25700  complete="$GNM"
25701  path="${complete%% *}"
25702  tmp="$complete EOL"
25703  arguments="${tmp#* }"
25704
25705  # Input might be given as Windows format, start by converting to
25706  # unix format.
25707  new_path=`$CYGPATH -u "$path"`
25708
25709  # Now try to locate executable using which
25710  new_path=`$WHICH "$new_path" 2> /dev/null`
25711  # bat and cmd files are not always considered executable in cygwin causing which
25712  # to not find them
25713  if test "x$new_path" = x \
25714      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25715      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25716    new_path=`$CYGPATH -u "$path"`
25717  fi
25718  if test "x$new_path" = x; then
25719    # Oops. Which didn't find the executable.
25720    # The splitting of arguments from the executable at a space might have been incorrect,
25721    # since paths with space are more likely in Windows. Give it another try with the whole
25722    # argument.
25723    path="$complete"
25724    arguments="EOL"
25725    new_path=`$CYGPATH -u "$path"`
25726    new_path=`$WHICH "$new_path" 2> /dev/null`
25727    # bat and cmd files are not always considered executable in cygwin causing which
25728    # to not find them
25729    if test "x$new_path" = x \
25730        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25731        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25732      new_path=`$CYGPATH -u "$path"`
25733    fi
25734    if test "x$new_path" = x; then
25735      # It's still not found. Now this is an unrecoverable error.
25736      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
25737$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
25738      has_space=`$ECHO "$complete" | $GREP " "`
25739      if test "x$has_space" != x; then
25740        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25741$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25742      fi
25743      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
25744    fi
25745  fi
25746
25747  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25748  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25749  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25750  # "foo.exe" is OK but "foo" is an error.
25751  #
25752  # This test is therefore slightly more accurate than "test -f" to check for file presence.
25753  # It is also a way to make sure we got the proper file name for the real test later on.
25754  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25755  if test "x$test_shortpath" = x; then
25756    # Short path failed, file does not exist as specified.
25757    # Try adding .exe or .cmd
25758    if test -f "${new_path}.exe"; then
25759      input_to_shortpath="${new_path}.exe"
25760    elif test -f "${new_path}.cmd"; then
25761      input_to_shortpath="${new_path}.cmd"
25762    else
25763      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
25764$as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
25765      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25766$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25767      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
25768    fi
25769  else
25770    input_to_shortpath="$new_path"
25771  fi
25772
25773  # Call helper function which possibly converts this using DOS-style short mode.
25774  # If so, the updated path is stored in $new_path.
25775  new_path="$input_to_shortpath"
25776
25777  input_path="$input_to_shortpath"
25778  # Check if we need to convert this using DOS-style short mode. If the path
25779  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25780  # take no chances and rewrite it.
25781  # Note: m4 eats our [], so we need to use [ and ] instead.
25782  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25783  if test "x$has_forbidden_chars" != x; then
25784    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25785    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25786    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25787    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25788      # Going to short mode and back again did indeed matter. Since short mode is
25789      # case insensitive, let's make it lowercase to improve readability.
25790      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25791      # Now convert it back to Unix-stile (cygpath)
25792      input_path=`$CYGPATH -u "$shortmode_path"`
25793      new_path="$input_path"
25794    fi
25795  fi
25796
25797  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25798  if test "x$test_cygdrive_prefix" = x; then
25799    # As a simple fix, exclude /usr/bin since it's not a real path.
25800    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25801      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25802      # a path prefixed by /cygdrive for fixpath to work.
25803      new_path="$CYGWIN_ROOT_PATH$input_path"
25804    fi
25805  fi
25806
25807  # remove trailing .exe if any
25808  new_path="${new_path/%.exe/}"
25809
25810  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25811
25812  # First separate the path from the arguments. This will split at the first
25813  # space.
25814  complete="$GNM"
25815  path="${complete%% *}"
25816  tmp="$complete EOL"
25817  arguments="${tmp#* }"
25818
25819  # Input might be given as Windows format, start by converting to
25820  # unix format.
25821  new_path="$path"
25822
25823  windows_path="$new_path"
25824  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25825    unix_path=`$CYGPATH -u "$windows_path"`
25826    new_path="$unix_path"
25827  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25828    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25829    new_path="$unix_path"
25830  fi
25831
25832
25833  # Now try to locate executable using which
25834  new_path=`$WHICH "$new_path" 2> /dev/null`
25835
25836  if test "x$new_path" = x; then
25837    # Oops. Which didn't find the executable.
25838    # The splitting of arguments from the executable at a space might have been incorrect,
25839    # since paths with space are more likely in Windows. Give it another try with the whole
25840    # argument.
25841    path="$complete"
25842    arguments="EOL"
25843    new_path="$path"
25844
25845  windows_path="$new_path"
25846  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25847    unix_path=`$CYGPATH -u "$windows_path"`
25848    new_path="$unix_path"
25849  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25850    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25851    new_path="$unix_path"
25852  fi
25853
25854
25855    new_path=`$WHICH "$new_path" 2> /dev/null`
25856
25857    if test "x$new_path" = x; then
25858      # It's still not found. Now this is an unrecoverable error.
25859      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
25860$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
25861      has_space=`$ECHO "$complete" | $GREP " "`
25862      if test "x$has_space" != x; then
25863        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25864$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25865      fi
25866      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
25867    fi
25868  fi
25869
25870  # Now new_path has a complete unix path to the binary
25871  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25872    # Keep paths in /bin as-is, but remove trailing .exe if any
25873    new_path="${new_path/%.exe/}"
25874    # Do not save /bin paths to all_fixpath_prefixes!
25875  else
25876    # Not in mixed or Windows style, start by that.
25877    new_path=`cmd //c echo $new_path`
25878
25879  input_path="$new_path"
25880  # Check if we need to convert this using DOS-style short mode. If the path
25881  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25882  # take no chances and rewrite it.
25883  # Note: m4 eats our [], so we need to use [ and ] instead.
25884  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25885  if test "x$has_forbidden_chars" != x; then
25886    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25887    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25888  fi
25889
25890    # Output is in $new_path
25891
25892  windows_path="$new_path"
25893  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25894    unix_path=`$CYGPATH -u "$windows_path"`
25895    new_path="$unix_path"
25896  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25897    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25898    new_path="$unix_path"
25899  fi
25900
25901    # remove trailing .exe if any
25902    new_path="${new_path/%.exe/}"
25903
25904    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25905    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25906  fi
25907
25908  else
25909    # We're on a posix platform. Hooray! :)
25910    # First separate the path from the arguments. This will split at the first
25911    # space.
25912    complete="$GNM"
25913    path="${complete%% *}"
25914    tmp="$complete EOL"
25915    arguments="${tmp#* }"
25916
25917    # Cannot rely on the command "which" here since it doesn't always work.
25918    is_absolute_path=`$ECHO "$path" | $GREP ^/`
25919    if test -z "$is_absolute_path"; then
25920      # Path to executable is not absolute. Find it.
25921      IFS_save="$IFS"
25922      IFS=:
25923      for p in $PATH; do
25924        if test -f "$p/$path" && test -x "$p/$path"; then
25925          new_path="$p/$path"
25926          break
25927        fi
25928      done
25929      IFS="$IFS_save"
25930    else
25931      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving GNM (as $path) failed, using $path directly." >&5
25932$as_echo "$as_me: Resolving GNM (as $path) failed, using $path directly." >&6;}
25933      new_path="$path"
25934    fi
25935
25936    if test "x$new_path" = x; then
25937      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
25938$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
25939      has_space=`$ECHO "$complete" | $GREP " "`
25940      if test "x$has_space" != x; then
25941        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25942$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25943      fi
25944      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
25945    fi
25946  fi
25947
25948  # Now join together the path and the arguments once again
25949  if test "x$arguments" != xEOL; then
25950    new_complete="$new_path ${arguments% *}"
25951  else
25952    new_complete="$new_path"
25953  fi
25954
25955  if test "x$complete" != "x$new_complete"; then
25956    GNM="$new_complete"
25957    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
25958$as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
25959  fi
25960
25961    # Extract the first word of "strip", so it can be a program name with args.
25962set dummy strip; ac_word=$2
25963{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25964$as_echo_n "checking for $ac_word... " >&6; }
25965if ${ac_cv_path_STRIP+:} false; then :
25966  $as_echo_n "(cached) " >&6
25967else
25968  case $STRIP in
25969  [\\/]* | ?:[\\/]*)
25970  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
25971  ;;
25972  *)
25973  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25974for as_dir in $PATH
25975do
25976  IFS=$as_save_IFS
25977  test -z "$as_dir" && as_dir=.
25978    for ac_exec_ext in '' $ac_executable_extensions; do
25979  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25980    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
25981    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25982    break 2
25983  fi
25984done
25985  done
25986IFS=$as_save_IFS
25987
25988  ;;
25989esac
25990fi
25991STRIP=$ac_cv_path_STRIP
25992if test -n "$STRIP"; then
25993  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
25994$as_echo "$STRIP" >&6; }
25995else
25996  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25997$as_echo "no" >&6; }
25998fi
25999
26000
26001
26002  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26003
26004  # First separate the path from the arguments. This will split at the first
26005  # space.
26006  complete="$STRIP"
26007  path="${complete%% *}"
26008  tmp="$complete EOL"
26009  arguments="${tmp#* }"
26010
26011  # Input might be given as Windows format, start by converting to
26012  # unix format.
26013  new_path=`$CYGPATH -u "$path"`
26014
26015  # Now try to locate executable using which
26016  new_path=`$WHICH "$new_path" 2> /dev/null`
26017  # bat and cmd files are not always considered executable in cygwin causing which
26018  # to not find them
26019  if test "x$new_path" = x \
26020      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26021      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26022    new_path=`$CYGPATH -u "$path"`
26023  fi
26024  if test "x$new_path" = x; then
26025    # Oops. Which didn't find the executable.
26026    # The splitting of arguments from the executable at a space might have been incorrect,
26027    # since paths with space are more likely in Windows. Give it another try with the whole
26028    # argument.
26029    path="$complete"
26030    arguments="EOL"
26031    new_path=`$CYGPATH -u "$path"`
26032    new_path=`$WHICH "$new_path" 2> /dev/null`
26033    # bat and cmd files are not always considered executable in cygwin causing which
26034    # to not find them
26035    if test "x$new_path" = x \
26036        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26037        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26038      new_path=`$CYGPATH -u "$path"`
26039    fi
26040    if test "x$new_path" = x; then
26041      # It's still not found. Now this is an unrecoverable error.
26042      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26043$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26044      has_space=`$ECHO "$complete" | $GREP " "`
26045      if test "x$has_space" != x; then
26046        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26047$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26048      fi
26049      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26050    fi
26051  fi
26052
26053  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26054  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26055  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26056  # "foo.exe" is OK but "foo" is an error.
26057  #
26058  # This test is therefore slightly more accurate than "test -f" to check for file presence.
26059  # It is also a way to make sure we got the proper file name for the real test later on.
26060  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26061  if test "x$test_shortpath" = x; then
26062    # Short path failed, file does not exist as specified.
26063    # Try adding .exe or .cmd
26064    if test -f "${new_path}.exe"; then
26065      input_to_shortpath="${new_path}.exe"
26066    elif test -f "${new_path}.cmd"; then
26067      input_to_shortpath="${new_path}.cmd"
26068    else
26069      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
26070$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
26071      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26072$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26073      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26074    fi
26075  else
26076    input_to_shortpath="$new_path"
26077  fi
26078
26079  # Call helper function which possibly converts this using DOS-style short mode.
26080  # If so, the updated path is stored in $new_path.
26081  new_path="$input_to_shortpath"
26082
26083  input_path="$input_to_shortpath"
26084  # Check if we need to convert this using DOS-style short mode. If the path
26085  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26086  # take no chances and rewrite it.
26087  # Note: m4 eats our [], so we need to use [ and ] instead.
26088  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26089  if test "x$has_forbidden_chars" != x; then
26090    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26091    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26092    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26093    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26094      # Going to short mode and back again did indeed matter. Since short mode is
26095      # case insensitive, let's make it lowercase to improve readability.
26096      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26097      # Now convert it back to Unix-stile (cygpath)
26098      input_path=`$CYGPATH -u "$shortmode_path"`
26099      new_path="$input_path"
26100    fi
26101  fi
26102
26103  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26104  if test "x$test_cygdrive_prefix" = x; then
26105    # As a simple fix, exclude /usr/bin since it's not a real path.
26106    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26107      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26108      # a path prefixed by /cygdrive for fixpath to work.
26109      new_path="$CYGWIN_ROOT_PATH$input_path"
26110    fi
26111  fi
26112
26113  # remove trailing .exe if any
26114  new_path="${new_path/%.exe/}"
26115
26116  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26117
26118  # First separate the path from the arguments. This will split at the first
26119  # space.
26120  complete="$STRIP"
26121  path="${complete%% *}"
26122  tmp="$complete EOL"
26123  arguments="${tmp#* }"
26124
26125  # Input might be given as Windows format, start by converting to
26126  # unix format.
26127  new_path="$path"
26128
26129  windows_path="$new_path"
26130  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26131    unix_path=`$CYGPATH -u "$windows_path"`
26132    new_path="$unix_path"
26133  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26134    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26135    new_path="$unix_path"
26136  fi
26137
26138
26139  # Now try to locate executable using which
26140  new_path=`$WHICH "$new_path" 2> /dev/null`
26141
26142  if test "x$new_path" = x; then
26143    # Oops. Which didn't find the executable.
26144    # The splitting of arguments from the executable at a space might have been incorrect,
26145    # since paths with space are more likely in Windows. Give it another try with the whole
26146    # argument.
26147    path="$complete"
26148    arguments="EOL"
26149    new_path="$path"
26150
26151  windows_path="$new_path"
26152  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26153    unix_path=`$CYGPATH -u "$windows_path"`
26154    new_path="$unix_path"
26155  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26156    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26157    new_path="$unix_path"
26158  fi
26159
26160
26161    new_path=`$WHICH "$new_path" 2> /dev/null`
26162
26163    if test "x$new_path" = x; then
26164      # It's still not found. Now this is an unrecoverable error.
26165      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26166$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26167      has_space=`$ECHO "$complete" | $GREP " "`
26168      if test "x$has_space" != x; then
26169        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26170$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26171      fi
26172      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26173    fi
26174  fi
26175
26176  # Now new_path has a complete unix path to the binary
26177  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26178    # Keep paths in /bin as-is, but remove trailing .exe if any
26179    new_path="${new_path/%.exe/}"
26180    # Do not save /bin paths to all_fixpath_prefixes!
26181  else
26182    # Not in mixed or Windows style, start by that.
26183    new_path=`cmd //c echo $new_path`
26184
26185  input_path="$new_path"
26186  # Check if we need to convert this using DOS-style short mode. If the path
26187  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26188  # take no chances and rewrite it.
26189  # Note: m4 eats our [], so we need to use [ and ] instead.
26190  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26191  if test "x$has_forbidden_chars" != x; then
26192    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26193    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26194  fi
26195
26196    # Output is in $new_path
26197
26198  windows_path="$new_path"
26199  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26200    unix_path=`$CYGPATH -u "$windows_path"`
26201    new_path="$unix_path"
26202  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26203    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26204    new_path="$unix_path"
26205  fi
26206
26207    # remove trailing .exe if any
26208    new_path="${new_path/%.exe/}"
26209
26210    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26211    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26212  fi
26213
26214  else
26215    # We're on a posix platform. Hooray! :)
26216    # First separate the path from the arguments. This will split at the first
26217    # space.
26218    complete="$STRIP"
26219    path="${complete%% *}"
26220    tmp="$complete EOL"
26221    arguments="${tmp#* }"
26222
26223    # Cannot rely on the command "which" here since it doesn't always work.
26224    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26225    if test -z "$is_absolute_path"; then
26226      # Path to executable is not absolute. Find it.
26227      IFS_save="$IFS"
26228      IFS=:
26229      for p in $PATH; do
26230        if test -f "$p/$path" && test -x "$p/$path"; then
26231          new_path="$p/$path"
26232          break
26233        fi
26234      done
26235      IFS="$IFS_save"
26236    else
26237      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) failed, using $path directly." >&5
26238$as_echo "$as_me: Resolving STRIP (as $path) failed, using $path directly." >&6;}
26239      new_path="$path"
26240    fi
26241
26242    if test "x$new_path" = x; then
26243      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26244$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26245      has_space=`$ECHO "$complete" | $GREP " "`
26246      if test "x$has_space" != x; then
26247        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26248$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26249      fi
26250      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26251    fi
26252  fi
26253
26254  # Now join together the path and the arguments once again
26255  if test "x$arguments" != xEOL; then
26256    new_complete="$new_path ${arguments% *}"
26257  else
26258    new_complete="$new_path"
26259  fi
26260
26261  if test "x$complete" != "x$new_complete"; then
26262    STRIP="$new_complete"
26263    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
26264$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
26265  fi
26266
26267    # Extract the first word of "mcs", so it can be a program name with args.
26268set dummy mcs; ac_word=$2
26269{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26270$as_echo_n "checking for $ac_word... " >&6; }
26271if ${ac_cv_path_MCS+:} false; then :
26272  $as_echo_n "(cached) " >&6
26273else
26274  case $MCS in
26275  [\\/]* | ?:[\\/]*)
26276  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
26277  ;;
26278  *)
26279  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26280for as_dir in $PATH
26281do
26282  IFS=$as_save_IFS
26283  test -z "$as_dir" && as_dir=.
26284    for ac_exec_ext in '' $ac_executable_extensions; do
26285  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26286    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
26287    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26288    break 2
26289  fi
26290done
26291  done
26292IFS=$as_save_IFS
26293
26294  ;;
26295esac
26296fi
26297MCS=$ac_cv_path_MCS
26298if test -n "$MCS"; then
26299  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
26300$as_echo "$MCS" >&6; }
26301else
26302  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26303$as_echo "no" >&6; }
26304fi
26305
26306
26307
26308  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26309
26310  # First separate the path from the arguments. This will split at the first
26311  # space.
26312  complete="$MCS"
26313  path="${complete%% *}"
26314  tmp="$complete EOL"
26315  arguments="${tmp#* }"
26316
26317  # Input might be given as Windows format, start by converting to
26318  # unix format.
26319  new_path=`$CYGPATH -u "$path"`
26320
26321  # Now try to locate executable using which
26322  new_path=`$WHICH "$new_path" 2> /dev/null`
26323  # bat and cmd files are not always considered executable in cygwin causing which
26324  # to not find them
26325  if test "x$new_path" = x \
26326      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26327      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26328    new_path=`$CYGPATH -u "$path"`
26329  fi
26330  if test "x$new_path" = x; then
26331    # Oops. Which didn't find the executable.
26332    # The splitting of arguments from the executable at a space might have been incorrect,
26333    # since paths with space are more likely in Windows. Give it another try with the whole
26334    # argument.
26335    path="$complete"
26336    arguments="EOL"
26337    new_path=`$CYGPATH -u "$path"`
26338    new_path=`$WHICH "$new_path" 2> /dev/null`
26339    # bat and cmd files are not always considered executable in cygwin causing which
26340    # to not find them
26341    if test "x$new_path" = x \
26342        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26343        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26344      new_path=`$CYGPATH -u "$path"`
26345    fi
26346    if test "x$new_path" = x; then
26347      # It's still not found. Now this is an unrecoverable error.
26348      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
26349$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
26350      has_space=`$ECHO "$complete" | $GREP " "`
26351      if test "x$has_space" != x; then
26352        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26353$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26354      fi
26355      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
26356    fi
26357  fi
26358
26359  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26360  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26361  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26362  # "foo.exe" is OK but "foo" is an error.
26363  #
26364  # This test is therefore slightly more accurate than "test -f" to check for file presence.
26365  # It is also a way to make sure we got the proper file name for the real test later on.
26366  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26367  if test "x$test_shortpath" = x; then
26368    # Short path failed, file does not exist as specified.
26369    # Try adding .exe or .cmd
26370    if test -f "${new_path}.exe"; then
26371      input_to_shortpath="${new_path}.exe"
26372    elif test -f "${new_path}.cmd"; then
26373      input_to_shortpath="${new_path}.cmd"
26374    else
26375      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$new_path\", is invalid." >&5
26376$as_echo "$as_me: The path of MCS, which resolves as \"$new_path\", is invalid." >&6;}
26377      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26378$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26379      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
26380    fi
26381  else
26382    input_to_shortpath="$new_path"
26383  fi
26384
26385  # Call helper function which possibly converts this using DOS-style short mode.
26386  # If so, the updated path is stored in $new_path.
26387  new_path="$input_to_shortpath"
26388
26389  input_path="$input_to_shortpath"
26390  # Check if we need to convert this using DOS-style short mode. If the path
26391  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26392  # take no chances and rewrite it.
26393  # Note: m4 eats our [], so we need to use [ and ] instead.
26394  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26395  if test "x$has_forbidden_chars" != x; then
26396    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26397    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26398    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26399    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26400      # Going to short mode and back again did indeed matter. Since short mode is
26401      # case insensitive, let's make it lowercase to improve readability.
26402      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26403      # Now convert it back to Unix-stile (cygpath)
26404      input_path=`$CYGPATH -u "$shortmode_path"`
26405      new_path="$input_path"
26406    fi
26407  fi
26408
26409  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26410  if test "x$test_cygdrive_prefix" = x; then
26411    # As a simple fix, exclude /usr/bin since it's not a real path.
26412    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26413      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26414      # a path prefixed by /cygdrive for fixpath to work.
26415      new_path="$CYGWIN_ROOT_PATH$input_path"
26416    fi
26417  fi
26418
26419  # remove trailing .exe if any
26420  new_path="${new_path/%.exe/}"
26421
26422  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26423
26424  # First separate the path from the arguments. This will split at the first
26425  # space.
26426  complete="$MCS"
26427  path="${complete%% *}"
26428  tmp="$complete EOL"
26429  arguments="${tmp#* }"
26430
26431  # Input might be given as Windows format, start by converting to
26432  # unix format.
26433  new_path="$path"
26434
26435  windows_path="$new_path"
26436  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26437    unix_path=`$CYGPATH -u "$windows_path"`
26438    new_path="$unix_path"
26439  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26440    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26441    new_path="$unix_path"
26442  fi
26443
26444
26445  # Now try to locate executable using which
26446  new_path=`$WHICH "$new_path" 2> /dev/null`
26447
26448  if test "x$new_path" = x; then
26449    # Oops. Which didn't find the executable.
26450    # The splitting of arguments from the executable at a space might have been incorrect,
26451    # since paths with space are more likely in Windows. Give it another try with the whole
26452    # argument.
26453    path="$complete"
26454    arguments="EOL"
26455    new_path="$path"
26456
26457  windows_path="$new_path"
26458  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26459    unix_path=`$CYGPATH -u "$windows_path"`
26460    new_path="$unix_path"
26461  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26462    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26463    new_path="$unix_path"
26464  fi
26465
26466
26467    new_path=`$WHICH "$new_path" 2> /dev/null`
26468
26469    if test "x$new_path" = x; then
26470      # It's still not found. Now this is an unrecoverable error.
26471      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
26472$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
26473      has_space=`$ECHO "$complete" | $GREP " "`
26474      if test "x$has_space" != x; then
26475        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26476$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26477      fi
26478      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
26479    fi
26480  fi
26481
26482  # Now new_path has a complete unix path to the binary
26483  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26484    # Keep paths in /bin as-is, but remove trailing .exe if any
26485    new_path="${new_path/%.exe/}"
26486    # Do not save /bin paths to all_fixpath_prefixes!
26487  else
26488    # Not in mixed or Windows style, start by that.
26489    new_path=`cmd //c echo $new_path`
26490
26491  input_path="$new_path"
26492  # Check if we need to convert this using DOS-style short mode. If the path
26493  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26494  # take no chances and rewrite it.
26495  # Note: m4 eats our [], so we need to use [ and ] instead.
26496  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26497  if test "x$has_forbidden_chars" != x; then
26498    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26499    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26500  fi
26501
26502    # Output is in $new_path
26503
26504  windows_path="$new_path"
26505  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26506    unix_path=`$CYGPATH -u "$windows_path"`
26507    new_path="$unix_path"
26508  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26509    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26510    new_path="$unix_path"
26511  fi
26512
26513    # remove trailing .exe if any
26514    new_path="${new_path/%.exe/}"
26515
26516    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26517    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26518  fi
26519
26520  else
26521    # We're on a posix platform. Hooray! :)
26522    # First separate the path from the arguments. This will split at the first
26523    # space.
26524    complete="$MCS"
26525    path="${complete%% *}"
26526    tmp="$complete EOL"
26527    arguments="${tmp#* }"
26528
26529    # Cannot rely on the command "which" here since it doesn't always work.
26530    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26531    if test -z "$is_absolute_path"; then
26532      # Path to executable is not absolute. Find it.
26533      IFS_save="$IFS"
26534      IFS=:
26535      for p in $PATH; do
26536        if test -f "$p/$path" && test -x "$p/$path"; then
26537          new_path="$p/$path"
26538          break
26539        fi
26540      done
26541      IFS="$IFS_save"
26542    else
26543      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MCS (as $path) failed, using $path directly." >&5
26544$as_echo "$as_me: Resolving MCS (as $path) failed, using $path directly." >&6;}
26545      new_path="$path"
26546    fi
26547
26548    if test "x$new_path" = x; then
26549      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
26550$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
26551      has_space=`$ECHO "$complete" | $GREP " "`
26552      if test "x$has_space" != x; then
26553        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26554$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26555      fi
26556      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
26557    fi
26558  fi
26559
26560  # Now join together the path and the arguments once again
26561  if test "x$arguments" != xEOL; then
26562    new_complete="$new_path ${arguments% *}"
26563  else
26564    new_complete="$new_path"
26565  fi
26566
26567  if test "x$complete" != "x$new_complete"; then
26568    MCS="$new_complete"
26569    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MCS to \"$new_complete\"" >&5
26570$as_echo "$as_me: Rewriting MCS to \"$new_complete\"" >&6;}
26571  fi
26572
26573  elif test "x$OPENJDK_TARGET_OS" != xwindows; then
26574    if test -n "$ac_tool_prefix"; then
26575  # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
26576set dummy ${ac_tool_prefix}nm; ac_word=$2
26577{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26578$as_echo_n "checking for $ac_word... " >&6; }
26579if ${ac_cv_prog_NM+:} false; then :
26580  $as_echo_n "(cached) " >&6
26581else
26582  if test -n "$NM"; then
26583  ac_cv_prog_NM="$NM" # Let the user override the test.
26584else
26585as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26586for as_dir in $PATH
26587do
26588  IFS=$as_save_IFS
26589  test -z "$as_dir" && as_dir=.
26590    for ac_exec_ext in '' $ac_executable_extensions; do
26591  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26592    ac_cv_prog_NM="${ac_tool_prefix}nm"
26593    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26594    break 2
26595  fi
26596done
26597  done
26598IFS=$as_save_IFS
26599
26600fi
26601fi
26602NM=$ac_cv_prog_NM
26603if test -n "$NM"; then
26604  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
26605$as_echo "$NM" >&6; }
26606else
26607  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26608$as_echo "no" >&6; }
26609fi
26610
26611
26612fi
26613if test -z "$ac_cv_prog_NM"; then
26614  ac_ct_NM=$NM
26615  # Extract the first word of "nm", so it can be a program name with args.
26616set dummy nm; ac_word=$2
26617{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26618$as_echo_n "checking for $ac_word... " >&6; }
26619if ${ac_cv_prog_ac_ct_NM+:} false; then :
26620  $as_echo_n "(cached) " >&6
26621else
26622  if test -n "$ac_ct_NM"; then
26623  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
26624else
26625as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26626for as_dir in $PATH
26627do
26628  IFS=$as_save_IFS
26629  test -z "$as_dir" && as_dir=.
26630    for ac_exec_ext in '' $ac_executable_extensions; do
26631  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26632    ac_cv_prog_ac_ct_NM="nm"
26633    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26634    break 2
26635  fi
26636done
26637  done
26638IFS=$as_save_IFS
26639
26640fi
26641fi
26642ac_ct_NM=$ac_cv_prog_ac_ct_NM
26643if test -n "$ac_ct_NM"; then
26644  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
26645$as_echo "$ac_ct_NM" >&6; }
26646else
26647  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26648$as_echo "no" >&6; }
26649fi
26650
26651  if test "x$ac_ct_NM" = x; then
26652    NM=""
26653  else
26654    case $cross_compiling:$ac_tool_warned in
26655yes:)
26656{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
26657$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
26658ac_tool_warned=yes ;;
26659esac
26660    NM=$ac_ct_NM
26661  fi
26662else
26663  NM="$ac_cv_prog_NM"
26664fi
26665
26666
26667  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26668
26669  # First separate the path from the arguments. This will split at the first
26670  # space.
26671  complete="$NM"
26672  path="${complete%% *}"
26673  tmp="$complete EOL"
26674  arguments="${tmp#* }"
26675
26676  # Input might be given as Windows format, start by converting to
26677  # unix format.
26678  new_path=`$CYGPATH -u "$path"`
26679
26680  # Now try to locate executable using which
26681  new_path=`$WHICH "$new_path" 2> /dev/null`
26682  # bat and cmd files are not always considered executable in cygwin causing which
26683  # to not find them
26684  if test "x$new_path" = x \
26685      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26686      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26687    new_path=`$CYGPATH -u "$path"`
26688  fi
26689  if test "x$new_path" = x; then
26690    # Oops. Which didn't find the executable.
26691    # The splitting of arguments from the executable at a space might have been incorrect,
26692    # since paths with space are more likely in Windows. Give it another try with the whole
26693    # argument.
26694    path="$complete"
26695    arguments="EOL"
26696    new_path=`$CYGPATH -u "$path"`
26697    new_path=`$WHICH "$new_path" 2> /dev/null`
26698    # bat and cmd files are not always considered executable in cygwin causing which
26699    # to not find them
26700    if test "x$new_path" = x \
26701        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26702        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26703      new_path=`$CYGPATH -u "$path"`
26704    fi
26705    if test "x$new_path" = x; then
26706      # It's still not found. Now this is an unrecoverable error.
26707      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
26708$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
26709      has_space=`$ECHO "$complete" | $GREP " "`
26710      if test "x$has_space" != x; then
26711        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26712$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26713      fi
26714      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
26715    fi
26716  fi
26717
26718  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26719  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26720  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26721  # "foo.exe" is OK but "foo" is an error.
26722  #
26723  # This test is therefore slightly more accurate than "test -f" to check for file presence.
26724  # It is also a way to make sure we got the proper file name for the real test later on.
26725  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26726  if test "x$test_shortpath" = x; then
26727    # Short path failed, file does not exist as specified.
26728    # Try adding .exe or .cmd
26729    if test -f "${new_path}.exe"; then
26730      input_to_shortpath="${new_path}.exe"
26731    elif test -f "${new_path}.cmd"; then
26732      input_to_shortpath="${new_path}.cmd"
26733    else
26734      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
26735$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
26736      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26737$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26738      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
26739    fi
26740  else
26741    input_to_shortpath="$new_path"
26742  fi
26743
26744  # Call helper function which possibly converts this using DOS-style short mode.
26745  # If so, the updated path is stored in $new_path.
26746  new_path="$input_to_shortpath"
26747
26748  input_path="$input_to_shortpath"
26749  # Check if we need to convert this using DOS-style short mode. If the path
26750  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26751  # take no chances and rewrite it.
26752  # Note: m4 eats our [], so we need to use [ and ] instead.
26753  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26754  if test "x$has_forbidden_chars" != x; then
26755    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26756    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26757    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26758    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26759      # Going to short mode and back again did indeed matter. Since short mode is
26760      # case insensitive, let's make it lowercase to improve readability.
26761      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26762      # Now convert it back to Unix-stile (cygpath)
26763      input_path=`$CYGPATH -u "$shortmode_path"`
26764      new_path="$input_path"
26765    fi
26766  fi
26767
26768  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26769  if test "x$test_cygdrive_prefix" = x; then
26770    # As a simple fix, exclude /usr/bin since it's not a real path.
26771    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26772      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26773      # a path prefixed by /cygdrive for fixpath to work.
26774      new_path="$CYGWIN_ROOT_PATH$input_path"
26775    fi
26776  fi
26777
26778  # remove trailing .exe if any
26779  new_path="${new_path/%.exe/}"
26780
26781  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26782
26783  # First separate the path from the arguments. This will split at the first
26784  # space.
26785  complete="$NM"
26786  path="${complete%% *}"
26787  tmp="$complete EOL"
26788  arguments="${tmp#* }"
26789
26790  # Input might be given as Windows format, start by converting to
26791  # unix format.
26792  new_path="$path"
26793
26794  windows_path="$new_path"
26795  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26796    unix_path=`$CYGPATH -u "$windows_path"`
26797    new_path="$unix_path"
26798  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26799    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26800    new_path="$unix_path"
26801  fi
26802
26803
26804  # Now try to locate executable using which
26805  new_path=`$WHICH "$new_path" 2> /dev/null`
26806
26807  if test "x$new_path" = x; then
26808    # Oops. Which didn't find the executable.
26809    # The splitting of arguments from the executable at a space might have been incorrect,
26810    # since paths with space are more likely in Windows. Give it another try with the whole
26811    # argument.
26812    path="$complete"
26813    arguments="EOL"
26814    new_path="$path"
26815
26816  windows_path="$new_path"
26817  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26818    unix_path=`$CYGPATH -u "$windows_path"`
26819    new_path="$unix_path"
26820  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26821    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26822    new_path="$unix_path"
26823  fi
26824
26825
26826    new_path=`$WHICH "$new_path" 2> /dev/null`
26827
26828    if test "x$new_path" = x; then
26829      # It's still not found. Now this is an unrecoverable error.
26830      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
26831$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
26832      has_space=`$ECHO "$complete" | $GREP " "`
26833      if test "x$has_space" != x; then
26834        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26835$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26836      fi
26837      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
26838    fi
26839  fi
26840
26841  # Now new_path has a complete unix path to the binary
26842  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26843    # Keep paths in /bin as-is, but remove trailing .exe if any
26844    new_path="${new_path/%.exe/}"
26845    # Do not save /bin paths to all_fixpath_prefixes!
26846  else
26847    # Not in mixed or Windows style, start by that.
26848    new_path=`cmd //c echo $new_path`
26849
26850  input_path="$new_path"
26851  # Check if we need to convert this using DOS-style short mode. If the path
26852  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26853  # take no chances and rewrite it.
26854  # Note: m4 eats our [], so we need to use [ and ] instead.
26855  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26856  if test "x$has_forbidden_chars" != x; then
26857    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26858    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26859  fi
26860
26861    # Output is in $new_path
26862
26863  windows_path="$new_path"
26864  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26865    unix_path=`$CYGPATH -u "$windows_path"`
26866    new_path="$unix_path"
26867  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26868    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26869    new_path="$unix_path"
26870  fi
26871
26872    # remove trailing .exe if any
26873    new_path="${new_path/%.exe/}"
26874
26875    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26876    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26877  fi
26878
26879  else
26880    # We're on a posix platform. Hooray! :)
26881    # First separate the path from the arguments. This will split at the first
26882    # space.
26883    complete="$NM"
26884    path="${complete%% *}"
26885    tmp="$complete EOL"
26886    arguments="${tmp#* }"
26887
26888    # Cannot rely on the command "which" here since it doesn't always work.
26889    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26890    if test -z "$is_absolute_path"; then
26891      # Path to executable is not absolute. Find it.
26892      IFS_save="$IFS"
26893      IFS=:
26894      for p in $PATH; do
26895        if test -f "$p/$path" && test -x "$p/$path"; then
26896          new_path="$p/$path"
26897          break
26898        fi
26899      done
26900      IFS="$IFS_save"
26901    else
26902      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) failed, using $path directly." >&5
26903$as_echo "$as_me: Resolving NM (as $path) failed, using $path directly." >&6;}
26904      new_path="$path"
26905    fi
26906
26907    if test "x$new_path" = x; then
26908      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
26909$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
26910      has_space=`$ECHO "$complete" | $GREP " "`
26911      if test "x$has_space" != x; then
26912        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26913$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26914      fi
26915      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
26916    fi
26917  fi
26918
26919  # Now join together the path and the arguments once again
26920  if test "x$arguments" != xEOL; then
26921    new_complete="$new_path ${arguments% *}"
26922  else
26923    new_complete="$new_path"
26924  fi
26925
26926  if test "x$complete" != "x$new_complete"; then
26927    NM="$new_complete"
26928    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
26929$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
26930  fi
26931
26932    GNM="$NM"
26933
26934    if test -n "$ac_tool_prefix"; then
26935  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
26936set dummy ${ac_tool_prefix}strip; ac_word=$2
26937{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26938$as_echo_n "checking for $ac_word... " >&6; }
26939if ${ac_cv_prog_STRIP+:} false; then :
26940  $as_echo_n "(cached) " >&6
26941else
26942  if test -n "$STRIP"; then
26943  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
26944else
26945as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26946for as_dir in $PATH
26947do
26948  IFS=$as_save_IFS
26949  test -z "$as_dir" && as_dir=.
26950    for ac_exec_ext in '' $ac_executable_extensions; do
26951  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26952    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
26953    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26954    break 2
26955  fi
26956done
26957  done
26958IFS=$as_save_IFS
26959
26960fi
26961fi
26962STRIP=$ac_cv_prog_STRIP
26963if test -n "$STRIP"; then
26964  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
26965$as_echo "$STRIP" >&6; }
26966else
26967  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26968$as_echo "no" >&6; }
26969fi
26970
26971
26972fi
26973if test -z "$ac_cv_prog_STRIP"; then
26974  ac_ct_STRIP=$STRIP
26975  # Extract the first word of "strip", so it can be a program name with args.
26976set dummy strip; ac_word=$2
26977{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26978$as_echo_n "checking for $ac_word... " >&6; }
26979if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
26980  $as_echo_n "(cached) " >&6
26981else
26982  if test -n "$ac_ct_STRIP"; then
26983  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
26984else
26985as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26986for as_dir in $PATH
26987do
26988  IFS=$as_save_IFS
26989  test -z "$as_dir" && as_dir=.
26990    for ac_exec_ext in '' $ac_executable_extensions; do
26991  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26992    ac_cv_prog_ac_ct_STRIP="strip"
26993    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26994    break 2
26995  fi
26996done
26997  done
26998IFS=$as_save_IFS
26999
27000fi
27001fi
27002ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
27003if test -n "$ac_ct_STRIP"; then
27004  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
27005$as_echo "$ac_ct_STRIP" >&6; }
27006else
27007  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27008$as_echo "no" >&6; }
27009fi
27010
27011  if test "x$ac_ct_STRIP" = x; then
27012    STRIP=""
27013  else
27014    case $cross_compiling:$ac_tool_warned in
27015yes:)
27016{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
27017$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
27018ac_tool_warned=yes ;;
27019esac
27020    STRIP=$ac_ct_STRIP
27021  fi
27022else
27023  STRIP="$ac_cv_prog_STRIP"
27024fi
27025
27026
27027  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27028
27029  # First separate the path from the arguments. This will split at the first
27030  # space.
27031  complete="$STRIP"
27032  path="${complete%% *}"
27033  tmp="$complete EOL"
27034  arguments="${tmp#* }"
27035
27036  # Input might be given as Windows format, start by converting to
27037  # unix format.
27038  new_path=`$CYGPATH -u "$path"`
27039
27040  # Now try to locate executable using which
27041  new_path=`$WHICH "$new_path" 2> /dev/null`
27042  # bat and cmd files are not always considered executable in cygwin causing which
27043  # to not find them
27044  if test "x$new_path" = x \
27045      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27046      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27047    new_path=`$CYGPATH -u "$path"`
27048  fi
27049  if test "x$new_path" = x; then
27050    # Oops. Which didn't find the executable.
27051    # The splitting of arguments from the executable at a space might have been incorrect,
27052    # since paths with space are more likely in Windows. Give it another try with the whole
27053    # argument.
27054    path="$complete"
27055    arguments="EOL"
27056    new_path=`$CYGPATH -u "$path"`
27057    new_path=`$WHICH "$new_path" 2> /dev/null`
27058    # bat and cmd files are not always considered executable in cygwin causing which
27059    # to not find them
27060    if test "x$new_path" = x \
27061        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27062        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27063      new_path=`$CYGPATH -u "$path"`
27064    fi
27065    if test "x$new_path" = x; then
27066      # It's still not found. Now this is an unrecoverable error.
27067      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
27068$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
27069      has_space=`$ECHO "$complete" | $GREP " "`
27070      if test "x$has_space" != x; then
27071        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27072$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27073      fi
27074      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
27075    fi
27076  fi
27077
27078  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27079  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27080  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27081  # "foo.exe" is OK but "foo" is an error.
27082  #
27083  # This test is therefore slightly more accurate than "test -f" to check for file presence.
27084  # It is also a way to make sure we got the proper file name for the real test later on.
27085  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27086  if test "x$test_shortpath" = x; then
27087    # Short path failed, file does not exist as specified.
27088    # Try adding .exe or .cmd
27089    if test -f "${new_path}.exe"; then
27090      input_to_shortpath="${new_path}.exe"
27091    elif test -f "${new_path}.cmd"; then
27092      input_to_shortpath="${new_path}.cmd"
27093    else
27094      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
27095$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
27096      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27097$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27098      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
27099    fi
27100  else
27101    input_to_shortpath="$new_path"
27102  fi
27103
27104  # Call helper function which possibly converts this using DOS-style short mode.
27105  # If so, the updated path is stored in $new_path.
27106  new_path="$input_to_shortpath"
27107
27108  input_path="$input_to_shortpath"
27109  # Check if we need to convert this using DOS-style short mode. If the path
27110  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27111  # take no chances and rewrite it.
27112  # Note: m4 eats our [], so we need to use [ and ] instead.
27113  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27114  if test "x$has_forbidden_chars" != x; then
27115    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27116    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27117    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27118    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27119      # Going to short mode and back again did indeed matter. Since short mode is
27120      # case insensitive, let's make it lowercase to improve readability.
27121      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27122      # Now convert it back to Unix-stile (cygpath)
27123      input_path=`$CYGPATH -u "$shortmode_path"`
27124      new_path="$input_path"
27125    fi
27126  fi
27127
27128  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27129  if test "x$test_cygdrive_prefix" = x; then
27130    # As a simple fix, exclude /usr/bin since it's not a real path.
27131    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27132      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27133      # a path prefixed by /cygdrive for fixpath to work.
27134      new_path="$CYGWIN_ROOT_PATH$input_path"
27135    fi
27136  fi
27137
27138  # remove trailing .exe if any
27139  new_path="${new_path/%.exe/}"
27140
27141  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27142
27143  # First separate the path from the arguments. This will split at the first
27144  # space.
27145  complete="$STRIP"
27146  path="${complete%% *}"
27147  tmp="$complete EOL"
27148  arguments="${tmp#* }"
27149
27150  # Input might be given as Windows format, start by converting to
27151  # unix format.
27152  new_path="$path"
27153
27154  windows_path="$new_path"
27155  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27156    unix_path=`$CYGPATH -u "$windows_path"`
27157    new_path="$unix_path"
27158  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27159    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27160    new_path="$unix_path"
27161  fi
27162
27163
27164  # Now try to locate executable using which
27165  new_path=`$WHICH "$new_path" 2> /dev/null`
27166
27167  if test "x$new_path" = x; then
27168    # Oops. Which didn't find the executable.
27169    # The splitting of arguments from the executable at a space might have been incorrect,
27170    # since paths with space are more likely in Windows. Give it another try with the whole
27171    # argument.
27172    path="$complete"
27173    arguments="EOL"
27174    new_path="$path"
27175
27176  windows_path="$new_path"
27177  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27178    unix_path=`$CYGPATH -u "$windows_path"`
27179    new_path="$unix_path"
27180  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27181    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27182    new_path="$unix_path"
27183  fi
27184
27185
27186    new_path=`$WHICH "$new_path" 2> /dev/null`
27187
27188    if test "x$new_path" = x; then
27189      # It's still not found. Now this is an unrecoverable error.
27190      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
27191$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
27192      has_space=`$ECHO "$complete" | $GREP " "`
27193      if test "x$has_space" != x; then
27194        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27195$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27196      fi
27197      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
27198    fi
27199  fi
27200
27201  # Now new_path has a complete unix path to the binary
27202  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27203    # Keep paths in /bin as-is, but remove trailing .exe if any
27204    new_path="${new_path/%.exe/}"
27205    # Do not save /bin paths to all_fixpath_prefixes!
27206  else
27207    # Not in mixed or Windows style, start by that.
27208    new_path=`cmd //c echo $new_path`
27209
27210  input_path="$new_path"
27211  # Check if we need to convert this using DOS-style short mode. If the path
27212  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27213  # take no chances and rewrite it.
27214  # Note: m4 eats our [], so we need to use [ and ] instead.
27215  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27216  if test "x$has_forbidden_chars" != x; then
27217    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27218    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27219  fi
27220
27221    # Output is in $new_path
27222
27223  windows_path="$new_path"
27224  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27225    unix_path=`$CYGPATH -u "$windows_path"`
27226    new_path="$unix_path"
27227  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27228    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27229    new_path="$unix_path"
27230  fi
27231
27232    # remove trailing .exe if any
27233    new_path="${new_path/%.exe/}"
27234
27235    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27236    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27237  fi
27238
27239  else
27240    # We're on a posix platform. Hooray! :)
27241    # First separate the path from the arguments. This will split at the first
27242    # space.
27243    complete="$STRIP"
27244    path="${complete%% *}"
27245    tmp="$complete EOL"
27246    arguments="${tmp#* }"
27247
27248    # Cannot rely on the command "which" here since it doesn't always work.
27249    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27250    if test -z "$is_absolute_path"; then
27251      # Path to executable is not absolute. Find it.
27252      IFS_save="$IFS"
27253      IFS=:
27254      for p in $PATH; do
27255        if test -f "$p/$path" && test -x "$p/$path"; then
27256          new_path="$p/$path"
27257          break
27258        fi
27259      done
27260      IFS="$IFS_save"
27261    else
27262      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) failed, using $path directly." >&5
27263$as_echo "$as_me: Resolving STRIP (as $path) failed, using $path directly." >&6;}
27264      new_path="$path"
27265    fi
27266
27267    if test "x$new_path" = x; then
27268      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
27269$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
27270      has_space=`$ECHO "$complete" | $GREP " "`
27271      if test "x$has_space" != x; then
27272        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27273$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27274      fi
27275      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
27276    fi
27277  fi
27278
27279  # Now join together the path and the arguments once again
27280  if test "x$arguments" != xEOL; then
27281    new_complete="$new_path ${arguments% *}"
27282  else
27283    new_complete="$new_path"
27284  fi
27285
27286  if test "x$complete" != "x$new_complete"; then
27287    STRIP="$new_complete"
27288    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
27289$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
27290  fi
27291
27292  fi
27293
27294  # objcopy is used for moving debug symbols to separate files when
27295  # full debug symbols are enabled.
27296  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
27297    if test -n "$ac_tool_prefix"; then
27298  for ac_prog in gobjcopy objcopy
27299  do
27300    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
27301set dummy $ac_tool_prefix$ac_prog; ac_word=$2
27302{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27303$as_echo_n "checking for $ac_word... " >&6; }
27304if ${ac_cv_prog_OBJCOPY+:} false; then :
27305  $as_echo_n "(cached) " >&6
27306else
27307  if test -n "$OBJCOPY"; then
27308  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
27309else
27310as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27311for as_dir in $PATH
27312do
27313  IFS=$as_save_IFS
27314  test -z "$as_dir" && as_dir=.
27315    for ac_exec_ext in '' $ac_executable_extensions; do
27316  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27317    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
27318    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27319    break 2
27320  fi
27321done
27322  done
27323IFS=$as_save_IFS
27324
27325fi
27326fi
27327OBJCOPY=$ac_cv_prog_OBJCOPY
27328if test -n "$OBJCOPY"; then
27329  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
27330$as_echo "$OBJCOPY" >&6; }
27331else
27332  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27333$as_echo "no" >&6; }
27334fi
27335
27336
27337    test -n "$OBJCOPY" && break
27338  done
27339fi
27340if test -z "$OBJCOPY"; then
27341  ac_ct_OBJCOPY=$OBJCOPY
27342  for ac_prog in gobjcopy objcopy
27343do
27344  # Extract the first word of "$ac_prog", so it can be a program name with args.
27345set dummy $ac_prog; ac_word=$2
27346{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27347$as_echo_n "checking for $ac_word... " >&6; }
27348if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
27349  $as_echo_n "(cached) " >&6
27350else
27351  if test -n "$ac_ct_OBJCOPY"; then
27352  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
27353else
27354as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27355for as_dir in $PATH
27356do
27357  IFS=$as_save_IFS
27358  test -z "$as_dir" && as_dir=.
27359    for ac_exec_ext in '' $ac_executable_extensions; do
27360  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27361    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
27362    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27363    break 2
27364  fi
27365done
27366  done
27367IFS=$as_save_IFS
27368
27369fi
27370fi
27371ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
27372if test -n "$ac_ct_OBJCOPY"; then
27373  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
27374$as_echo "$ac_ct_OBJCOPY" >&6; }
27375else
27376  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27377$as_echo "no" >&6; }
27378fi
27379
27380
27381  test -n "$ac_ct_OBJCOPY" && break
27382done
27383
27384  if test "x$ac_ct_OBJCOPY" = x; then
27385    OBJCOPY=""
27386  else
27387    case $cross_compiling:$ac_tool_warned in
27388yes:)
27389{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
27390$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
27391ac_tool_warned=yes ;;
27392esac
27393    OBJCOPY=$ac_ct_OBJCOPY
27394  fi
27395fi
27396
27397    # Only call fixup if objcopy was found.
27398    if test -n "$OBJCOPY"; then
27399
27400  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27401
27402  # First separate the path from the arguments. This will split at the first
27403  # space.
27404  complete="$OBJCOPY"
27405  path="${complete%% *}"
27406  tmp="$complete EOL"
27407  arguments="${tmp#* }"
27408
27409  # Input might be given as Windows format, start by converting to
27410  # unix format.
27411  new_path=`$CYGPATH -u "$path"`
27412
27413  # Now try to locate executable using which
27414  new_path=`$WHICH "$new_path" 2> /dev/null`
27415  # bat and cmd files are not always considered executable in cygwin causing which
27416  # to not find them
27417  if test "x$new_path" = x \
27418      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27419      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27420    new_path=`$CYGPATH -u "$path"`
27421  fi
27422  if test "x$new_path" = x; then
27423    # Oops. Which didn't find the executable.
27424    # The splitting of arguments from the executable at a space might have been incorrect,
27425    # since paths with space are more likely in Windows. Give it another try with the whole
27426    # argument.
27427    path="$complete"
27428    arguments="EOL"
27429    new_path=`$CYGPATH -u "$path"`
27430    new_path=`$WHICH "$new_path" 2> /dev/null`
27431    # bat and cmd files are not always considered executable in cygwin causing which
27432    # to not find them
27433    if test "x$new_path" = x \
27434        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27435        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27436      new_path=`$CYGPATH -u "$path"`
27437    fi
27438    if test "x$new_path" = x; then
27439      # It's still not found. Now this is an unrecoverable error.
27440      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
27441$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
27442      has_space=`$ECHO "$complete" | $GREP " "`
27443      if test "x$has_space" != x; then
27444        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27445$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27446      fi
27447      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
27448    fi
27449  fi
27450
27451  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27452  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27453  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27454  # "foo.exe" is OK but "foo" is an error.
27455  #
27456  # This test is therefore slightly more accurate than "test -f" to check for file presence.
27457  # It is also a way to make sure we got the proper file name for the real test later on.
27458  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27459  if test "x$test_shortpath" = x; then
27460    # Short path failed, file does not exist as specified.
27461    # Try adding .exe or .cmd
27462    if test -f "${new_path}.exe"; then
27463      input_to_shortpath="${new_path}.exe"
27464    elif test -f "${new_path}.cmd"; then
27465      input_to_shortpath="${new_path}.cmd"
27466    else
27467      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
27468$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
27469      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27470$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27471      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
27472    fi
27473  else
27474    input_to_shortpath="$new_path"
27475  fi
27476
27477  # Call helper function which possibly converts this using DOS-style short mode.
27478  # If so, the updated path is stored in $new_path.
27479  new_path="$input_to_shortpath"
27480
27481  input_path="$input_to_shortpath"
27482  # Check if we need to convert this using DOS-style short mode. If the path
27483  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27484  # take no chances and rewrite it.
27485  # Note: m4 eats our [], so we need to use [ and ] instead.
27486  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27487  if test "x$has_forbidden_chars" != x; then
27488    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27489    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27490    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27491    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27492      # Going to short mode and back again did indeed matter. Since short mode is
27493      # case insensitive, let's make it lowercase to improve readability.
27494      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27495      # Now convert it back to Unix-stile (cygpath)
27496      input_path=`$CYGPATH -u "$shortmode_path"`
27497      new_path="$input_path"
27498    fi
27499  fi
27500
27501  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27502  if test "x$test_cygdrive_prefix" = x; then
27503    # As a simple fix, exclude /usr/bin since it's not a real path.
27504    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27505      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27506      # a path prefixed by /cygdrive for fixpath to work.
27507      new_path="$CYGWIN_ROOT_PATH$input_path"
27508    fi
27509  fi
27510
27511  # remove trailing .exe if any
27512  new_path="${new_path/%.exe/}"
27513
27514  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27515
27516  # First separate the path from the arguments. This will split at the first
27517  # space.
27518  complete="$OBJCOPY"
27519  path="${complete%% *}"
27520  tmp="$complete EOL"
27521  arguments="${tmp#* }"
27522
27523  # Input might be given as Windows format, start by converting to
27524  # unix format.
27525  new_path="$path"
27526
27527  windows_path="$new_path"
27528  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27529    unix_path=`$CYGPATH -u "$windows_path"`
27530    new_path="$unix_path"
27531  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27532    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27533    new_path="$unix_path"
27534  fi
27535
27536
27537  # Now try to locate executable using which
27538  new_path=`$WHICH "$new_path" 2> /dev/null`
27539
27540  if test "x$new_path" = x; then
27541    # Oops. Which didn't find the executable.
27542    # The splitting of arguments from the executable at a space might have been incorrect,
27543    # since paths with space are more likely in Windows. Give it another try with the whole
27544    # argument.
27545    path="$complete"
27546    arguments="EOL"
27547    new_path="$path"
27548
27549  windows_path="$new_path"
27550  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27551    unix_path=`$CYGPATH -u "$windows_path"`
27552    new_path="$unix_path"
27553  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27554    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27555    new_path="$unix_path"
27556  fi
27557
27558
27559    new_path=`$WHICH "$new_path" 2> /dev/null`
27560
27561    if test "x$new_path" = x; then
27562      # It's still not found. Now this is an unrecoverable error.
27563      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
27564$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
27565      has_space=`$ECHO "$complete" | $GREP " "`
27566      if test "x$has_space" != x; then
27567        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27568$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27569      fi
27570      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
27571    fi
27572  fi
27573
27574  # Now new_path has a complete unix path to the binary
27575  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27576    # Keep paths in /bin as-is, but remove trailing .exe if any
27577    new_path="${new_path/%.exe/}"
27578    # Do not save /bin paths to all_fixpath_prefixes!
27579  else
27580    # Not in mixed or Windows style, start by that.
27581    new_path=`cmd //c echo $new_path`
27582
27583  input_path="$new_path"
27584  # Check if we need to convert this using DOS-style short mode. If the path
27585  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27586  # take no chances and rewrite it.
27587  # Note: m4 eats our [], so we need to use [ and ] instead.
27588  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27589  if test "x$has_forbidden_chars" != x; then
27590    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27591    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27592  fi
27593
27594    # Output is in $new_path
27595
27596  windows_path="$new_path"
27597  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27598    unix_path=`$CYGPATH -u "$windows_path"`
27599    new_path="$unix_path"
27600  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27601    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27602    new_path="$unix_path"
27603  fi
27604
27605    # remove trailing .exe if any
27606    new_path="${new_path/%.exe/}"
27607
27608    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27609    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27610  fi
27611
27612  else
27613    # We're on a posix platform. Hooray! :)
27614    # First separate the path from the arguments. This will split at the first
27615    # space.
27616    complete="$OBJCOPY"
27617    path="${complete%% *}"
27618    tmp="$complete EOL"
27619    arguments="${tmp#* }"
27620
27621    # Cannot rely on the command "which" here since it doesn't always work.
27622    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27623    if test -z "$is_absolute_path"; then
27624      # Path to executable is not absolute. Find it.
27625      IFS_save="$IFS"
27626      IFS=:
27627      for p in $PATH; do
27628        if test -f "$p/$path" && test -x "$p/$path"; then
27629          new_path="$p/$path"
27630          break
27631        fi
27632      done
27633      IFS="$IFS_save"
27634    else
27635      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJCOPY (as $path) failed, using $path directly." >&5
27636$as_echo "$as_me: Resolving OBJCOPY (as $path) failed, using $path directly." >&6;}
27637      new_path="$path"
27638    fi
27639
27640    if test "x$new_path" = x; then
27641      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
27642$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
27643      has_space=`$ECHO "$complete" | $GREP " "`
27644      if test "x$has_space" != x; then
27645        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27646$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27647      fi
27648      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
27649    fi
27650  fi
27651
27652  # Now join together the path and the arguments once again
27653  if test "x$arguments" != xEOL; then
27654    new_complete="$new_path ${arguments% *}"
27655  else
27656    new_complete="$new_path"
27657  fi
27658
27659  if test "x$complete" != "x$new_complete"; then
27660    OBJCOPY="$new_complete"
27661    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
27662$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
27663  fi
27664
27665    fi
27666  fi
27667
27668  if test -n "$ac_tool_prefix"; then
27669  for ac_prog in gobjdump objdump
27670  do
27671    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
27672set dummy $ac_tool_prefix$ac_prog; ac_word=$2
27673{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27674$as_echo_n "checking for $ac_word... " >&6; }
27675if ${ac_cv_prog_OBJDUMP+:} false; then :
27676  $as_echo_n "(cached) " >&6
27677else
27678  if test -n "$OBJDUMP"; then
27679  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
27680else
27681as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27682for as_dir in $PATH
27683do
27684  IFS=$as_save_IFS
27685  test -z "$as_dir" && as_dir=.
27686    for ac_exec_ext in '' $ac_executable_extensions; do
27687  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27688    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
27689    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27690    break 2
27691  fi
27692done
27693  done
27694IFS=$as_save_IFS
27695
27696fi
27697fi
27698OBJDUMP=$ac_cv_prog_OBJDUMP
27699if test -n "$OBJDUMP"; then
27700  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
27701$as_echo "$OBJDUMP" >&6; }
27702else
27703  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27704$as_echo "no" >&6; }
27705fi
27706
27707
27708    test -n "$OBJDUMP" && break
27709  done
27710fi
27711if test -z "$OBJDUMP"; then
27712  ac_ct_OBJDUMP=$OBJDUMP
27713  for ac_prog in gobjdump objdump
27714do
27715  # Extract the first word of "$ac_prog", so it can be a program name with args.
27716set dummy $ac_prog; ac_word=$2
27717{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27718$as_echo_n "checking for $ac_word... " >&6; }
27719if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
27720  $as_echo_n "(cached) " >&6
27721else
27722  if test -n "$ac_ct_OBJDUMP"; then
27723  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
27724else
27725as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27726for as_dir in $PATH
27727do
27728  IFS=$as_save_IFS
27729  test -z "$as_dir" && as_dir=.
27730    for ac_exec_ext in '' $ac_executable_extensions; do
27731  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27732    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
27733    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27734    break 2
27735  fi
27736done
27737  done
27738IFS=$as_save_IFS
27739
27740fi
27741fi
27742ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
27743if test -n "$ac_ct_OBJDUMP"; then
27744  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
27745$as_echo "$ac_ct_OBJDUMP" >&6; }
27746else
27747  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27748$as_echo "no" >&6; }
27749fi
27750
27751
27752  test -n "$ac_ct_OBJDUMP" && break
27753done
27754
27755  if test "x$ac_ct_OBJDUMP" = x; then
27756    OBJDUMP=""
27757  else
27758    case $cross_compiling:$ac_tool_warned in
27759yes:)
27760{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
27761$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
27762ac_tool_warned=yes ;;
27763esac
27764    OBJDUMP=$ac_ct_OBJDUMP
27765  fi
27766fi
27767
27768  if test "x$OBJDUMP" != x; then
27769    # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE bails if argument is missing.
27770
27771  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27772
27773  # First separate the path from the arguments. This will split at the first
27774  # space.
27775  complete="$OBJDUMP"
27776  path="${complete%% *}"
27777  tmp="$complete EOL"
27778  arguments="${tmp#* }"
27779
27780  # Input might be given as Windows format, start by converting to
27781  # unix format.
27782  new_path=`$CYGPATH -u "$path"`
27783
27784  # Now try to locate executable using which
27785  new_path=`$WHICH "$new_path" 2> /dev/null`
27786  # bat and cmd files are not always considered executable in cygwin causing which
27787  # to not find them
27788  if test "x$new_path" = x \
27789      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27790      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27791    new_path=`$CYGPATH -u "$path"`
27792  fi
27793  if test "x$new_path" = x; then
27794    # Oops. Which didn't find the executable.
27795    # The splitting of arguments from the executable at a space might have been incorrect,
27796    # since paths with space are more likely in Windows. Give it another try with the whole
27797    # argument.
27798    path="$complete"
27799    arguments="EOL"
27800    new_path=`$CYGPATH -u "$path"`
27801    new_path=`$WHICH "$new_path" 2> /dev/null`
27802    # bat and cmd files are not always considered executable in cygwin causing which
27803    # to not find them
27804    if test "x$new_path" = x \
27805        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27806        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27807      new_path=`$CYGPATH -u "$path"`
27808    fi
27809    if test "x$new_path" = x; then
27810      # It's still not found. Now this is an unrecoverable error.
27811      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
27812$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
27813      has_space=`$ECHO "$complete" | $GREP " "`
27814      if test "x$has_space" != x; then
27815        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27816$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27817      fi
27818      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
27819    fi
27820  fi
27821
27822  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27823  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27824  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27825  # "foo.exe" is OK but "foo" is an error.
27826  #
27827  # This test is therefore slightly more accurate than "test -f" to check for file presence.
27828  # It is also a way to make sure we got the proper file name for the real test later on.
27829  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27830  if test "x$test_shortpath" = x; then
27831    # Short path failed, file does not exist as specified.
27832    # Try adding .exe or .cmd
27833    if test -f "${new_path}.exe"; then
27834      input_to_shortpath="${new_path}.exe"
27835    elif test -f "${new_path}.cmd"; then
27836      input_to_shortpath="${new_path}.cmd"
27837    else
27838      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
27839$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
27840      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27841$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27842      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
27843    fi
27844  else
27845    input_to_shortpath="$new_path"
27846  fi
27847
27848  # Call helper function which possibly converts this using DOS-style short mode.
27849  # If so, the updated path is stored in $new_path.
27850  new_path="$input_to_shortpath"
27851
27852  input_path="$input_to_shortpath"
27853  # Check if we need to convert this using DOS-style short mode. If the path
27854  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27855  # take no chances and rewrite it.
27856  # Note: m4 eats our [], so we need to use [ and ] instead.
27857  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27858  if test "x$has_forbidden_chars" != x; then
27859    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27860    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27861    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27862    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27863      # Going to short mode and back again did indeed matter. Since short mode is
27864      # case insensitive, let's make it lowercase to improve readability.
27865      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27866      # Now convert it back to Unix-stile (cygpath)
27867      input_path=`$CYGPATH -u "$shortmode_path"`
27868      new_path="$input_path"
27869    fi
27870  fi
27871
27872  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27873  if test "x$test_cygdrive_prefix" = x; then
27874    # As a simple fix, exclude /usr/bin since it's not a real path.
27875    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27876      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27877      # a path prefixed by /cygdrive for fixpath to work.
27878      new_path="$CYGWIN_ROOT_PATH$input_path"
27879    fi
27880  fi
27881
27882  # remove trailing .exe if any
27883  new_path="${new_path/%.exe/}"
27884
27885  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27886
27887  # First separate the path from the arguments. This will split at the first
27888  # space.
27889  complete="$OBJDUMP"
27890  path="${complete%% *}"
27891  tmp="$complete EOL"
27892  arguments="${tmp#* }"
27893
27894  # Input might be given as Windows format, start by converting to
27895  # unix format.
27896  new_path="$path"
27897
27898  windows_path="$new_path"
27899  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27900    unix_path=`$CYGPATH -u "$windows_path"`
27901    new_path="$unix_path"
27902  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27903    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27904    new_path="$unix_path"
27905  fi
27906
27907
27908  # Now try to locate executable using which
27909  new_path=`$WHICH "$new_path" 2> /dev/null`
27910
27911  if test "x$new_path" = x; then
27912    # Oops. Which didn't find the executable.
27913    # The splitting of arguments from the executable at a space might have been incorrect,
27914    # since paths with space are more likely in Windows. Give it another try with the whole
27915    # argument.
27916    path="$complete"
27917    arguments="EOL"
27918    new_path="$path"
27919
27920  windows_path="$new_path"
27921  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27922    unix_path=`$CYGPATH -u "$windows_path"`
27923    new_path="$unix_path"
27924  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27925    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27926    new_path="$unix_path"
27927  fi
27928
27929
27930    new_path=`$WHICH "$new_path" 2> /dev/null`
27931
27932    if test "x$new_path" = x; then
27933      # It's still not found. Now this is an unrecoverable error.
27934      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
27935$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
27936      has_space=`$ECHO "$complete" | $GREP " "`
27937      if test "x$has_space" != x; then
27938        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27939$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27940      fi
27941      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
27942    fi
27943  fi
27944
27945  # Now new_path has a complete unix path to the binary
27946  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27947    # Keep paths in /bin as-is, but remove trailing .exe if any
27948    new_path="${new_path/%.exe/}"
27949    # Do not save /bin paths to all_fixpath_prefixes!
27950  else
27951    # Not in mixed or Windows style, start by that.
27952    new_path=`cmd //c echo $new_path`
27953
27954  input_path="$new_path"
27955  # Check if we need to convert this using DOS-style short mode. If the path
27956  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27957  # take no chances and rewrite it.
27958  # Note: m4 eats our [], so we need to use [ and ] instead.
27959  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27960  if test "x$has_forbidden_chars" != x; then
27961    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27962    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27963  fi
27964
27965    # Output is in $new_path
27966
27967  windows_path="$new_path"
27968  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27969    unix_path=`$CYGPATH -u "$windows_path"`
27970    new_path="$unix_path"
27971  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27972    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27973    new_path="$unix_path"
27974  fi
27975
27976    # remove trailing .exe if any
27977    new_path="${new_path/%.exe/}"
27978
27979    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27980    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27981  fi
27982
27983  else
27984    # We're on a posix platform. Hooray! :)
27985    # First separate the path from the arguments. This will split at the first
27986    # space.
27987    complete="$OBJDUMP"
27988    path="${complete%% *}"
27989    tmp="$complete EOL"
27990    arguments="${tmp#* }"
27991
27992    # Cannot rely on the command "which" here since it doesn't always work.
27993    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27994    if test -z "$is_absolute_path"; then
27995      # Path to executable is not absolute. Find it.
27996      IFS_save="$IFS"
27997      IFS=:
27998      for p in $PATH; do
27999        if test -f "$p/$path" && test -x "$p/$path"; then
28000          new_path="$p/$path"
28001          break
28002        fi
28003      done
28004      IFS="$IFS_save"
28005    else
28006      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJDUMP (as $path) failed, using $path directly." >&5
28007$as_echo "$as_me: Resolving OBJDUMP (as $path) failed, using $path directly." >&6;}
28008      new_path="$path"
28009    fi
28010
28011    if test "x$new_path" = x; then
28012      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
28013$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
28014      has_space=`$ECHO "$complete" | $GREP " "`
28015      if test "x$has_space" != x; then
28016        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28017$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28018      fi
28019      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
28020    fi
28021  fi
28022
28023  # Now join together the path and the arguments once again
28024  if test "x$arguments" != xEOL; then
28025    new_complete="$new_path ${arguments% *}"
28026  else
28027    new_complete="$new_path"
28028  fi
28029
28030  if test "x$complete" != "x$new_complete"; then
28031    OBJDUMP="$new_complete"
28032    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
28033$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
28034  fi
28035
28036  fi
28037
28038  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
28039    # Extract the first word of "lipo", so it can be a program name with args.
28040set dummy lipo; ac_word=$2
28041{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28042$as_echo_n "checking for $ac_word... " >&6; }
28043if ${ac_cv_path_LIPO+:} false; then :
28044  $as_echo_n "(cached) " >&6
28045else
28046  case $LIPO in
28047  [\\/]* | ?:[\\/]*)
28048  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
28049  ;;
28050  *)
28051  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28052for as_dir in $PATH
28053do
28054  IFS=$as_save_IFS
28055  test -z "$as_dir" && as_dir=.
28056    for ac_exec_ext in '' $ac_executable_extensions; do
28057  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28058    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
28059    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28060    break 2
28061  fi
28062done
28063  done
28064IFS=$as_save_IFS
28065
28066  ;;
28067esac
28068fi
28069LIPO=$ac_cv_path_LIPO
28070if test -n "$LIPO"; then
28071  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
28072$as_echo "$LIPO" >&6; }
28073else
28074  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28075$as_echo "no" >&6; }
28076fi
28077
28078
28079
28080  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28081
28082  # First separate the path from the arguments. This will split at the first
28083  # space.
28084  complete="$LIPO"
28085  path="${complete%% *}"
28086  tmp="$complete EOL"
28087  arguments="${tmp#* }"
28088
28089  # Input might be given as Windows format, start by converting to
28090  # unix format.
28091  new_path=`$CYGPATH -u "$path"`
28092
28093  # Now try to locate executable using which
28094  new_path=`$WHICH "$new_path" 2> /dev/null`
28095  # bat and cmd files are not always considered executable in cygwin causing which
28096  # to not find them
28097  if test "x$new_path" = x \
28098      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28099      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28100    new_path=`$CYGPATH -u "$path"`
28101  fi
28102  if test "x$new_path" = x; then
28103    # Oops. Which didn't find the executable.
28104    # The splitting of arguments from the executable at a space might have been incorrect,
28105    # since paths with space are more likely in Windows. Give it another try with the whole
28106    # argument.
28107    path="$complete"
28108    arguments="EOL"
28109    new_path=`$CYGPATH -u "$path"`
28110    new_path=`$WHICH "$new_path" 2> /dev/null`
28111    # bat and cmd files are not always considered executable in cygwin causing which
28112    # to not find them
28113    if test "x$new_path" = x \
28114        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28115        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28116      new_path=`$CYGPATH -u "$path"`
28117    fi
28118    if test "x$new_path" = x; then
28119      # It's still not found. Now this is an unrecoverable error.
28120      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
28121$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
28122      has_space=`$ECHO "$complete" | $GREP " "`
28123      if test "x$has_space" != x; then
28124        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28125$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28126      fi
28127      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
28128    fi
28129  fi
28130
28131  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28132  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28133  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28134  # "foo.exe" is OK but "foo" is an error.
28135  #
28136  # This test is therefore slightly more accurate than "test -f" to check for file presence.
28137  # It is also a way to make sure we got the proper file name for the real test later on.
28138  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28139  if test "x$test_shortpath" = x; then
28140    # Short path failed, file does not exist as specified.
28141    # Try adding .exe or .cmd
28142    if test -f "${new_path}.exe"; then
28143      input_to_shortpath="${new_path}.exe"
28144    elif test -f "${new_path}.cmd"; then
28145      input_to_shortpath="${new_path}.cmd"
28146    else
28147      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
28148$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
28149      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
28150$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
28151      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
28152    fi
28153  else
28154    input_to_shortpath="$new_path"
28155  fi
28156
28157  # Call helper function which possibly converts this using DOS-style short mode.
28158  # If so, the updated path is stored in $new_path.
28159  new_path="$input_to_shortpath"
28160
28161  input_path="$input_to_shortpath"
28162  # Check if we need to convert this using DOS-style short mode. If the path
28163  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28164  # take no chances and rewrite it.
28165  # Note: m4 eats our [], so we need to use [ and ] instead.
28166  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28167  if test "x$has_forbidden_chars" != x; then
28168    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28169    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28170    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28171    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28172      # Going to short mode and back again did indeed matter. Since short mode is
28173      # case insensitive, let's make it lowercase to improve readability.
28174      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28175      # Now convert it back to Unix-stile (cygpath)
28176      input_path=`$CYGPATH -u "$shortmode_path"`
28177      new_path="$input_path"
28178    fi
28179  fi
28180
28181  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28182  if test "x$test_cygdrive_prefix" = x; then
28183    # As a simple fix, exclude /usr/bin since it's not a real path.
28184    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28185      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28186      # a path prefixed by /cygdrive for fixpath to work.
28187      new_path="$CYGWIN_ROOT_PATH$input_path"
28188    fi
28189  fi
28190
28191  # remove trailing .exe if any
28192  new_path="${new_path/%.exe/}"
28193
28194  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28195
28196  # First separate the path from the arguments. This will split at the first
28197  # space.
28198  complete="$LIPO"
28199  path="${complete%% *}"
28200  tmp="$complete EOL"
28201  arguments="${tmp#* }"
28202
28203  # Input might be given as Windows format, start by converting to
28204  # unix format.
28205  new_path="$path"
28206
28207  windows_path="$new_path"
28208  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28209    unix_path=`$CYGPATH -u "$windows_path"`
28210    new_path="$unix_path"
28211  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28212    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28213    new_path="$unix_path"
28214  fi
28215
28216
28217  # Now try to locate executable using which
28218  new_path=`$WHICH "$new_path" 2> /dev/null`
28219
28220  if test "x$new_path" = x; then
28221    # Oops. Which didn't find the executable.
28222    # The splitting of arguments from the executable at a space might have been incorrect,
28223    # since paths with space are more likely in Windows. Give it another try with the whole
28224    # argument.
28225    path="$complete"
28226    arguments="EOL"
28227    new_path="$path"
28228
28229  windows_path="$new_path"
28230  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28231    unix_path=`$CYGPATH -u "$windows_path"`
28232    new_path="$unix_path"
28233  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28234    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28235    new_path="$unix_path"
28236  fi
28237
28238
28239    new_path=`$WHICH "$new_path" 2> /dev/null`
28240
28241    if test "x$new_path" = x; then
28242      # It's still not found. Now this is an unrecoverable error.
28243      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
28244$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
28245      has_space=`$ECHO "$complete" | $GREP " "`
28246      if test "x$has_space" != x; then
28247        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28248$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28249      fi
28250      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
28251    fi
28252  fi
28253
28254  # Now new_path has a complete unix path to the binary
28255  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28256    # Keep paths in /bin as-is, but remove trailing .exe if any
28257    new_path="${new_path/%.exe/}"
28258    # Do not save /bin paths to all_fixpath_prefixes!
28259  else
28260    # Not in mixed or Windows style, start by that.
28261    new_path=`cmd //c echo $new_path`
28262
28263  input_path="$new_path"
28264  # Check if we need to convert this using DOS-style short mode. If the path
28265  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28266  # take no chances and rewrite it.
28267  # Note: m4 eats our [], so we need to use [ and ] instead.
28268  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28269  if test "x$has_forbidden_chars" != x; then
28270    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28271    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28272  fi
28273
28274    # Output is in $new_path
28275
28276  windows_path="$new_path"
28277  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28278    unix_path=`$CYGPATH -u "$windows_path"`
28279    new_path="$unix_path"
28280  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28281    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28282    new_path="$unix_path"
28283  fi
28284
28285    # remove trailing .exe if any
28286    new_path="${new_path/%.exe/}"
28287
28288    # Save the first 10 bytes of this path to the storage, so fixpath can work.
28289    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28290  fi
28291
28292  else
28293    # We're on a posix platform. Hooray! :)
28294    # First separate the path from the arguments. This will split at the first
28295    # space.
28296    complete="$LIPO"
28297    path="${complete%% *}"
28298    tmp="$complete EOL"
28299    arguments="${tmp#* }"
28300
28301    # Cannot rely on the command "which" here since it doesn't always work.
28302    is_absolute_path=`$ECHO "$path" | $GREP ^/`
28303    if test -z "$is_absolute_path"; then
28304      # Path to executable is not absolute. Find it.
28305      IFS_save="$IFS"
28306      IFS=:
28307      for p in $PATH; do
28308        if test -f "$p/$path" && test -x "$p/$path"; then
28309          new_path="$p/$path"
28310          break
28311        fi
28312      done
28313      IFS="$IFS_save"
28314    else
28315      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving LIPO (as $path) failed, using $path directly." >&5
28316$as_echo "$as_me: Resolving LIPO (as $path) failed, using $path directly." >&6;}
28317      new_path="$path"
28318    fi
28319
28320    if test "x$new_path" = x; then
28321      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
28322$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
28323      has_space=`$ECHO "$complete" | $GREP " "`
28324      if test "x$has_space" != x; then
28325        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28326$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28327      fi
28328      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
28329    fi
28330  fi
28331
28332  # Now join together the path and the arguments once again
28333  if test "x$arguments" != xEOL; then
28334    new_complete="$new_path ${arguments% *}"
28335  else
28336    new_complete="$new_path"
28337  fi
28338
28339  if test "x$complete" != "x$new_complete"; then
28340    LIPO="$new_complete"
28341    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
28342$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
28343  fi
28344
28345  fi
28346
28347
28348
28349  # Restore old path without tools dir
28350  PATH="$OLD_PATH"
28351
28352
28353# FIXME: Currently we must test this after paths but before flags. Fix!
28354
28355# And we can test some aspects on the target using configure macros.
28356
28357
28358{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
28359$as_echo_n "checking for ANSI C header files... " >&6; }
28360if ${ac_cv_header_stdc+:} false; then :
28361  $as_echo_n "(cached) " >&6
28362else
28363  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28364/* end confdefs.h.  */
28365#include <stdlib.h>
28366#include <stdarg.h>
28367#include <string.h>
28368#include <float.h>
28369
28370int
28371main ()
28372{
28373
28374  ;
28375  return 0;
28376}
28377_ACEOF
28378if ac_fn_cxx_try_compile "$LINENO"; then :
28379  ac_cv_header_stdc=yes
28380else
28381  ac_cv_header_stdc=no
28382fi
28383rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28384
28385if test $ac_cv_header_stdc = yes; then
28386  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
28387  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28388/* end confdefs.h.  */
28389#include <string.h>
28390
28391_ACEOF
28392if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28393  $EGREP "memchr" >/dev/null 2>&1; then :
28394
28395else
28396  ac_cv_header_stdc=no
28397fi
28398rm -f conftest*
28399
28400fi
28401
28402if test $ac_cv_header_stdc = yes; then
28403  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
28404  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28405/* end confdefs.h.  */
28406#include <stdlib.h>
28407
28408_ACEOF
28409if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28410  $EGREP "free" >/dev/null 2>&1; then :
28411
28412else
28413  ac_cv_header_stdc=no
28414fi
28415rm -f conftest*
28416
28417fi
28418
28419if test $ac_cv_header_stdc = yes; then
28420  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
28421  if test "$cross_compiling" = yes; then :
28422  :
28423else
28424  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28425/* end confdefs.h.  */
28426#include <ctype.h>
28427#include <stdlib.h>
28428#if ((' ' & 0x0FF) == 0x020)
28429# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
28430# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
28431#else
28432# define ISLOWER(c) \
28433		   (('a' <= (c) && (c) <= 'i') \
28434		     || ('j' <= (c) && (c) <= 'r') \
28435		     || ('s' <= (c) && (c) <= 'z'))
28436# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
28437#endif
28438
28439#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
28440int
28441main ()
28442{
28443  int i;
28444  for (i = 0; i < 256; i++)
28445    if (XOR (islower (i), ISLOWER (i))
28446	|| toupper (i) != TOUPPER (i))
28447      return 2;
28448  return 0;
28449}
28450_ACEOF
28451if ac_fn_cxx_try_run "$LINENO"; then :
28452
28453else
28454  ac_cv_header_stdc=no
28455fi
28456rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28457  conftest.$ac_objext conftest.beam conftest.$ac_ext
28458fi
28459
28460fi
28461fi
28462{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
28463$as_echo "$ac_cv_header_stdc" >&6; }
28464if test $ac_cv_header_stdc = yes; then
28465
28466$as_echo "#define STDC_HEADERS 1" >>confdefs.h
28467
28468fi
28469
28470# On IRIX 5.3, sys/types and inttypes.h are conflicting.
28471for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
28472		  inttypes.h stdint.h unistd.h
28473do :
28474  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
28475ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
28476"
28477if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
28478  cat >>confdefs.h <<_ACEOF
28479#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
28480_ACEOF
28481
28482fi
28483
28484done
28485
28486
28487
28488  ###############################################################################
28489  #
28490  # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
28491  # (The JVM can use 32 or 64 bit Java pointers but that decision
28492  # is made at runtime.)
28493  #
28494
28495  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28496    # Always specify -m flags on Solaris
28497
28498  # When we add flags to the "official" CFLAGS etc, we need to
28499  # keep track of these additions in ADDED_CFLAGS etc. These
28500  # will later be checked to make sure only controlled additions
28501  # have been made to CFLAGS etc.
28502  ADDED_CFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28503  ADDED_CXXFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28504  ADDED_LDFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28505
28506  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
28507  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
28508  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
28509
28510  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
28511  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
28512  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
28513
28514  elif test "x$COMPILE_TYPE" = xreduced; then
28515    if test "x$OPENJDK_TARGET_OS" != xwindows; then
28516      # Specify -m if running reduced on other Posix platforms
28517
28518  # When we add flags to the "official" CFLAGS etc, we need to
28519  # keep track of these additions in ADDED_CFLAGS etc. These
28520  # will later be checked to make sure only controlled additions
28521  # have been made to CFLAGS etc.
28522  ADDED_CFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28523  ADDED_CXXFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28524  ADDED_LDFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28525
28526  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
28527  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
28528  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
28529
28530  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
28531  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
28532  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
28533
28534    fi
28535  fi
28536
28537  # Make compilation sanity check
28538  for ac_header in stdio.h
28539do :
28540  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
28541if test "x$ac_cv_header_stdio_h" = xyes; then :
28542  cat >>confdefs.h <<_ACEOF
28543#define HAVE_STDIO_H 1
28544_ACEOF
28545
28546else
28547
28548    { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
28549$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
28550    if test "x$COMPILE_TYPE" = xreduced; then
28551      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed." >&5
28552$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed." >&6;}
28553    elif test "x$COMPILE_TYPE" = xcross; then
28554      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
28555$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
28556    fi
28557    as_fn_error $? "Cannot continue." "$LINENO" 5
28558
28559fi
28560
28561done
28562
28563
28564  # The cast to long int works around a bug in the HP C Compiler
28565# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
28566# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
28567# This bug is HP SR number 8606223364.
28568{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
28569$as_echo_n "checking size of int *... " >&6; }
28570if ${ac_cv_sizeof_int_p+:} false; then :
28571  $as_echo_n "(cached) " >&6
28572else
28573  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
28574
28575else
28576  if test "$ac_cv_type_int_p" = yes; then
28577     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
28578$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
28579as_fn_error 77 "cannot compute sizeof (int *)
28580See \`config.log' for more details" "$LINENO" 5; }
28581   else
28582     ac_cv_sizeof_int_p=0
28583   fi
28584fi
28585
28586fi
28587{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
28588$as_echo "$ac_cv_sizeof_int_p" >&6; }
28589
28590
28591
28592cat >>confdefs.h <<_ACEOF
28593#define SIZEOF_INT_P $ac_cv_sizeof_int_p
28594_ACEOF
28595
28596
28597
28598  if test "x$SIZEOF_INT_P" != "x$ac_cv_sizeof_int_p"; then
28599    # Workaround autoconf bug, see http://lists.gnu.org/archive/html/autoconf/2010-07/msg00004.html
28600    SIZEOF_INT_P="$ac_cv_sizeof_int_p"
28601  fi
28602
28603  if test "x$SIZEOF_INT_P" = x; then
28604    # The test failed, lets stick to the assumed value.
28605    { $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
28606$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
28607  else
28608    TESTED_TARGET_CPU_BITS=`expr 8 \* $SIZEOF_INT_P`
28609
28610    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
28611      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
28612    fi
28613  fi
28614
28615  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
28616$as_echo_n "checking for target address size... " >&6; }
28617  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
28618$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
28619
28620
28621  ###############################################################################
28622  #
28623  # Is the target little of big endian?
28624  #
28625   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
28626$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
28627if ${ac_cv_c_bigendian+:} false; then :
28628  $as_echo_n "(cached) " >&6
28629else
28630  ac_cv_c_bigendian=unknown
28631    # See if we're dealing with a universal compiler.
28632    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28633/* end confdefs.h.  */
28634#ifndef __APPLE_CC__
28635	       not a universal capable compiler
28636	     #endif
28637	     typedef int dummy;
28638
28639_ACEOF
28640if ac_fn_cxx_try_compile "$LINENO"; then :
28641
28642	# Check for potential -arch flags.  It is not universal unless
28643	# there are at least two -arch flags with different values.
28644	ac_arch=
28645	ac_prev=
28646	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
28647	 if test -n "$ac_prev"; then
28648	   case $ac_word in
28649	     i?86 | x86_64 | ppc | ppc64)
28650	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
28651		 ac_arch=$ac_word
28652	       else
28653		 ac_cv_c_bigendian=universal
28654		 break
28655	       fi
28656	       ;;
28657	   esac
28658	   ac_prev=
28659	 elif test "x$ac_word" = "x-arch"; then
28660	   ac_prev=arch
28661	 fi
28662       done
28663fi
28664rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28665    if test $ac_cv_c_bigendian = unknown; then
28666      # See if sys/param.h defines the BYTE_ORDER macro.
28667      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28668/* end confdefs.h.  */
28669#include <sys/types.h>
28670	     #include <sys/param.h>
28671
28672int
28673main ()
28674{
28675#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
28676		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
28677		     && LITTLE_ENDIAN)
28678	      bogus endian macros
28679	     #endif
28680
28681  ;
28682  return 0;
28683}
28684_ACEOF
28685if ac_fn_cxx_try_compile "$LINENO"; then :
28686  # It does; now see whether it defined to BIG_ENDIAN or not.
28687	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28688/* end confdefs.h.  */
28689#include <sys/types.h>
28690		#include <sys/param.h>
28691
28692int
28693main ()
28694{
28695#if BYTE_ORDER != BIG_ENDIAN
28696		 not big endian
28697		#endif
28698
28699  ;
28700  return 0;
28701}
28702_ACEOF
28703if ac_fn_cxx_try_compile "$LINENO"; then :
28704  ac_cv_c_bigendian=yes
28705else
28706  ac_cv_c_bigendian=no
28707fi
28708rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28709fi
28710rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28711    fi
28712    if test $ac_cv_c_bigendian = unknown; then
28713      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
28714      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28715/* end confdefs.h.  */
28716#include <limits.h>
28717
28718int
28719main ()
28720{
28721#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
28722	      bogus endian macros
28723	     #endif
28724
28725  ;
28726  return 0;
28727}
28728_ACEOF
28729if ac_fn_cxx_try_compile "$LINENO"; then :
28730  # It does; now see whether it defined to _BIG_ENDIAN or not.
28731	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28732/* end confdefs.h.  */
28733#include <limits.h>
28734
28735int
28736main ()
28737{
28738#ifndef _BIG_ENDIAN
28739		 not big endian
28740		#endif
28741
28742  ;
28743  return 0;
28744}
28745_ACEOF
28746if ac_fn_cxx_try_compile "$LINENO"; then :
28747  ac_cv_c_bigendian=yes
28748else
28749  ac_cv_c_bigendian=no
28750fi
28751rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28752fi
28753rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28754    fi
28755    if test $ac_cv_c_bigendian = unknown; then
28756      # Compile a test program.
28757      if test "$cross_compiling" = yes; then :
28758  # Try to guess by grepping values from an object file.
28759	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28760/* end confdefs.h.  */
28761short int ascii_mm[] =
28762		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
28763		short int ascii_ii[] =
28764		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
28765		int use_ascii (int i) {
28766		  return ascii_mm[i] + ascii_ii[i];
28767		}
28768		short int ebcdic_ii[] =
28769		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
28770		short int ebcdic_mm[] =
28771		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
28772		int use_ebcdic (int i) {
28773		  return ebcdic_mm[i] + ebcdic_ii[i];
28774		}
28775		extern int foo;
28776
28777int
28778main ()
28779{
28780return use_ascii (foo) == use_ebcdic (foo);
28781  ;
28782  return 0;
28783}
28784_ACEOF
28785if ac_fn_cxx_try_compile "$LINENO"; then :
28786  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
28787	      ac_cv_c_bigendian=yes
28788	    fi
28789	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
28790	      if test "$ac_cv_c_bigendian" = unknown; then
28791		ac_cv_c_bigendian=no
28792	      else
28793		# finding both strings is unlikely to happen, but who knows?
28794		ac_cv_c_bigendian=unknown
28795	      fi
28796	    fi
28797fi
28798rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28799else
28800  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28801/* end confdefs.h.  */
28802$ac_includes_default
28803int
28804main ()
28805{
28806
28807	     /* Are we little or big endian?  From Harbison&Steele.  */
28808	     union
28809	     {
28810	       long int l;
28811	       char c[sizeof (long int)];
28812	     } u;
28813	     u.l = 1;
28814	     return u.c[sizeof (long int) - 1] == 1;
28815
28816  ;
28817  return 0;
28818}
28819_ACEOF
28820if ac_fn_cxx_try_run "$LINENO"; then :
28821  ac_cv_c_bigendian=no
28822else
28823  ac_cv_c_bigendian=yes
28824fi
28825rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28826  conftest.$ac_objext conftest.beam conftest.$ac_ext
28827fi
28828
28829    fi
28830fi
28831{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
28832$as_echo "$ac_cv_c_bigendian" >&6; }
28833 case $ac_cv_c_bigendian in #(
28834   yes)
28835     ENDIAN="big";; #(
28836   no)
28837     ENDIAN="little" ;; #(
28838   universal)
28839     ENDIAN="universal_endianness"
28840     ;; #(
28841   *)
28842     ENDIAN="unknown" ;;
28843 esac
28844
28845
28846  if test "x$ENDIAN" = xuniversal_endianness; then
28847    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
28848  fi
28849  if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
28850    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
28851  fi
28852
28853
28854# Configure flags for the tools
28855
28856
28857  ###############################################################################
28858  #
28859  # How to compile shared libraries.
28860  #
28861
28862  if test "x$GCC" = xyes; then
28863    COMPILER_NAME=gcc
28864    PICFLAG="-fPIC"
28865    LIBRARY_PREFIX=lib
28866    SHARED_LIBRARY='lib$1.so'
28867    STATIC_LIBRARY='lib$1.a'
28868    SHARED_LIBRARY_FLAGS="-shared"
28869    SHARED_LIBRARY_SUFFIX='.so'
28870    STATIC_LIBRARY_SUFFIX='.a'
28871    OBJ_SUFFIX='.o'
28872    EXE_SUFFIX=''
28873    SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
28874    SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
28875    C_FLAG_REORDER=''
28876    CXX_FLAG_REORDER=''
28877    SET_SHARED_LIBRARY_ORIGIN='-Xlinker -z -Xlinker origin -Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
28878    SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
28879    LD="$CC"
28880    LDEXE="$CC"
28881    LDCXX="$CXX"
28882    LDEXECXX="$CXX"
28883    POST_STRIP_CMD="$STRIP -g"
28884
28885    # Linking is different on MacOSX
28886    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
28887      # Might change in the future to clang.
28888      COMPILER_NAME=gcc
28889      SHARED_LIBRARY='lib$1.dylib'
28890      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
28891      SHARED_LIBRARY_SUFFIX='.dylib'
28892      EXE_SUFFIX=''
28893      SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
28894      SET_SHARED_LIBRARY_MAPFILE=''
28895      SET_SHARED_LIBRARY_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
28896      SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
28897      POST_STRIP_CMD="$STRIP -S"
28898    fi
28899  else
28900    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28901      # If it is not gcc, then assume it is the Oracle Solaris Studio Compiler
28902      COMPILER_NAME=ossc
28903      PICFLAG="-KPIC"
28904      LIBRARY_PREFIX=lib
28905      SHARED_LIBRARY='lib$1.so'
28906      STATIC_LIBRARY='lib$1.a'
28907      SHARED_LIBRARY_FLAGS="-G"
28908      SHARED_LIBRARY_SUFFIX='.so'
28909      STATIC_LIBRARY_SUFFIX='.a'
28910      OBJ_SUFFIX='.o'
28911      EXE_SUFFIX=''
28912      SET_SHARED_LIBRARY_NAME=''
28913      SET_SHARED_LIBRARY_MAPFILE='-M$1'
28914      C_FLAG_REORDER='-xF'
28915      CXX_FLAG_REORDER='-xF'
28916      SET_SHARED_LIBRARY_ORIGIN='-R\$$$$ORIGIN$1'
28917      SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
28918      CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
28919      CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
28920      CFLAGS_JDKLIB_EXTRA='-xstrconst'
28921      POST_STRIP_CMD="$STRIP -x"
28922      POST_MCS_CMD="$MCS -d -a \"JDK $FULL_VERSION\""
28923    fi
28924    if test "x$OPENJDK_TARGET_OS" = xwindows; then
28925      # If it is not gcc, then assume it is the MS Visual Studio compiler
28926      COMPILER_NAME=cl
28927      PICFLAG=""
28928      LIBRARY_PREFIX=
28929      SHARED_LIBRARY='$1.dll'
28930      STATIC_LIBRARY='$1.lib'
28931      SHARED_LIBRARY_FLAGS="-LD"
28932      SHARED_LIBRARY_SUFFIX='.dll'
28933      STATIC_LIBRARY_SUFFIX='.lib'
28934      OBJ_SUFFIX='.obj'
28935      EXE_SUFFIX='.exe'
28936      SET_SHARED_LIBRARY_NAME=''
28937      SET_SHARED_LIBRARY_MAPFILE=''
28938      SET_SHARED_LIBRARY_ORIGIN=''
28939      SET_EXECUTABLE_ORIGIN=''
28940    fi
28941  fi
28942
28943
28944
28945
28946
28947
28948
28949
28950
28951
28952
28953
28954
28955
28956
28957
28958
28959
28960
28961  # The (cross) compiler is now configured, we can now test capabilities
28962  # of the target platform.
28963
28964
28965
28966  ###############################################################################
28967  #
28968  # Setup the opt flags for different compilers
28969  # and different operating systems.
28970  #
28971
28972  #
28973  # NOTE: check for -mstackrealign needs to be below potential addition of -m32
28974  #
28975  if test "x$OPENJDK_TARGET_CPU_BITS" = x32 && test "x$OPENJDK_TARGET_OS" = xmacosx; then
28976    # On 32-bit MacOSX the OS requires C-entry points to be 16 byte aligned.
28977    # While waiting for a better solution, the current workaround is to use -mstackrealign.
28978    CFLAGS="$CFLAGS -mstackrealign"
28979    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if 32-bit compiler supports -mstackrealign" >&5
28980$as_echo_n "checking if 32-bit compiler supports -mstackrealign... " >&6; }
28981    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28982/* end confdefs.h.  */
28983int main() { return 0; }
28984_ACEOF
28985if ac_fn_cxx_try_link "$LINENO"; then :
28986
28987          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
28988$as_echo "yes" >&6; }
28989
28990else
28991
28992          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28993$as_echo "no" >&6; }
28994          as_fn_error $? "The selected compiler $CXX does not support -mstackrealign! Try to put another compiler in the path." "$LINENO" 5
28995
28996
28997fi
28998rm -f core conftest.err conftest.$ac_objext \
28999    conftest$ac_exeext conftest.$ac_ext
29000  fi
29001
29002  C_FLAG_DEPS="-MMD -MF"
29003  CXX_FLAG_DEPS="-MMD -MF"
29004
29005  case $COMPILER_TYPE in
29006    CC )
29007      case $COMPILER_NAME in
29008        gcc )
29009          case $OPENJDK_TARGET_OS in
29010            macosx )
29011              # On MacOSX we optimize for size, something
29012              # we should do for all platforms?
29013              C_O_FLAG_HI="-Os"
29014              C_O_FLAG_NORM="-Os"
29015              C_O_FLAG_NONE=""
29016              ;;
29017            *)
29018              C_O_FLAG_HI="-O3"
29019              C_O_FLAG_NORM="-O2"
29020              C_O_FLAG_NONE="-O0"
29021              ;;
29022          esac
29023          CXX_O_FLAG_HI="$C_O_FLAG_HI"
29024          CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
29025          CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
29026          CFLAGS_DEBUG_SYMBOLS="-g"
29027          CXXFLAGS_DEBUG_SYMBOLS="-g"
29028          if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
29029            CFLAGS_DEBUG_SYMBOLS="-g1"
29030            CXXFLAGS_DEBUG_SYMBOLS="-g1"
29031          fi
29032          ;;
29033        ossc )
29034          #
29035          # Forte has different names for this with their C++ compiler...
29036          #
29037          C_FLAG_DEPS="-xMMD -xMF"
29038          CXX_FLAG_DEPS="-xMMD -xMF"
29039
29040          # Extra options used with HIGHEST
29041          #
29042          # WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
29043          #          done with care, there are some assumptions below that need to
29044          #          be understood about the use of pointers, and IEEE behavior.
29045          #
29046          # Use non-standard floating point mode (not IEEE 754)
29047          CC_HIGHEST="$CC_HIGHEST -fns"
29048          # Do some simplification of floating point arithmetic (not IEEE 754)
29049          CC_HIGHEST="$CC_HIGHEST -fsimple"
29050          # Use single precision floating point with 'float'
29051          CC_HIGHEST="$CC_HIGHEST -fsingle"
29052          # Assume memory references via basic pointer types do not alias
29053          #   (Source with excessing pointer casting and data access with mixed
29054          #    pointer types are not recommended)
29055          CC_HIGHEST="$CC_HIGHEST -xalias_level=basic"
29056          # Use intrinsic or inline versions for math/std functions
29057          #   (If you expect perfect errno behavior, do not use this)
29058          CC_HIGHEST="$CC_HIGHEST -xbuiltin=%all"
29059          # Loop data dependency optimizations (need -xO3 or higher)
29060          CC_HIGHEST="$CC_HIGHEST -xdepend"
29061          # Pointer parameters to functions do not overlap
29062          #   (Similar to -xalias_level=basic usage, but less obvious sometimes.
29063          #    If you pass in multiple pointers to the same data, do not use this)
29064          CC_HIGHEST="$CC_HIGHEST -xrestrict"
29065          # Inline some library routines
29066          #   (If you expect perfect errno behavior, do not use this)
29067          CC_HIGHEST="$CC_HIGHEST -xlibmil"
29068          # Use optimized math routines
29069          #   (If you expect perfect errno behavior, do not use this)
29070          #  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
29071          #CC_HIGHEST="$CC_HIGHEST -xlibmopt"
29072
29073          if test "x$OPENJDK_TARGET_CPU" = xsparc; then
29074            CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
29075            CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
29076          fi
29077
29078          case $OPENJDK_TARGET_CPU_ARCH in
29079            x86)
29080              C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xregs=no%frameptr"
29081              C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
29082              C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
29083              C_O_FLAG_NONE="-xregs=no%frameptr"
29084              CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
29085              CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
29086              CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
29087              CXX_O_FLAG_NONE="-xregs=no%frameptr"
29088              if test "x$OPENJDK_TARGET_CPU" = xx86; then
29089                C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
29090                CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
29091              fi
29092              ;;
29093            sparc)
29094              CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
29095              CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
29096              C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
29097              C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
29098              C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
29099              C_O_FLAG_NONE=""
29100              CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
29101              CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
29102              CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
29103              CXX_O_FLAG_NONE=""
29104              ;;
29105          esac
29106
29107          CFLAGS_DEBUG_SYMBOLS="-g -xs"
29108          CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
29109      esac
29110      ;;
29111    CL )
29112      C_O_FLAG_HIGHEST="-O2"
29113      C_O_FLAG_HI="-O1"
29114      C_O_FLAG_NORM="-O1"
29115      C_O_FLAG_NONE="-Od"
29116      CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
29117      CXX_O_FLAG_HI="$C_O_FLAG_HI"
29118      CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
29119      CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
29120      ;;
29121  esac
29122
29123  if test -z "$C_O_FLAG_HIGHEST"; then
29124    C_O_FLAG_HIGHEST="$C_O_FLAG_HI"
29125  fi
29126
29127  if test -z "$CXX_O_FLAG_HIGHEST"; then
29128    CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HI"
29129  fi
29130
29131
29132
29133
29134
29135
29136
29137
29138
29139
29140
29141
29142
29143
29144  if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
29145    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
29146$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
29147  fi
29148
29149  if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
29150    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
29151$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
29152  fi
29153
29154  if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
29155    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
29156$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
29157  fi
29158
29159
29160# Check whether --with-extra-cflags was given.
29161if test "${with_extra_cflags+set}" = set; then :
29162  withval=$with_extra_cflags;
29163fi
29164
29165
29166
29167# Check whether --with-extra-cxxflags was given.
29168if test "${with_extra_cxxflags+set}" = set; then :
29169  withval=$with_extra_cxxflags;
29170fi
29171
29172
29173
29174# Check whether --with-extra-ldflags was given.
29175if test "${with_extra_ldflags+set}" = set; then :
29176  withval=$with_extra_ldflags;
29177fi
29178
29179
29180  CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags"
29181  CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags"
29182  LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags"
29183
29184  # Hotspot needs these set in their legacy form
29185  LEGACY_EXTRA_CFLAGS=$with_extra_cflags
29186  LEGACY_EXTRA_CXXFLAGS=$with_extra_cxxflags
29187  LEGACY_EXTRA_LDFLAGS=$with_extra_ldflags
29188
29189
29190
29191
29192
29193  ###############################################################################
29194  #
29195  # Now setup the CFLAGS and LDFLAGS for the JDK build.
29196  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
29197  #
29198  case $COMPILER_NAME in
29199    gcc )
29200      CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -W -Wall -Wno-unused -Wno-parentheses \
29201      -pipe \
29202      -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
29203      case $OPENJDK_TARGET_CPU_ARCH in
29204        arm )
29205          # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
29206          CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
29207          ;;
29208        ppc )
29209          # on ppc we don't prevent gcc to omit frame pointer nor strict-aliasing
29210          ;;
29211        * )
29212          CCXXFLAGS_JDK="$CCXXFLAGS_JDK -fno-omit-frame-pointer"
29213          CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
29214          ;;
29215      esac
29216      ;;
29217    ossc )
29218      CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
29219      case $OPENJDK_TARGET_CPU_ARCH in
29220        x86 )
29221          CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
29222          CFLAGS_JDK="$CFLAGS_JDK -erroff=E_BAD_PRAGMA_PACK_VALUE"
29223          ;;
29224      esac
29225
29226      CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
29227      CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
29228
29229      LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
29230      LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
29231      ;;
29232    cl )
29233      CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
29234      -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB -DWIN32_LEAN_AND_MEAN \
29235      -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
29236      -DWIN32 -DIAL"
29237      case $OPENJDK_TARGET_CPU in
29238        x86 )
29239          CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_X86_ -Dx86"
29240          ;;
29241        x86_64 )
29242          CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_AMD64_ -Damd64"
29243          ;;
29244      esac
29245      ;;
29246  esac
29247
29248  ###############################################################################
29249
29250  # Adjust flags according to debug level.
29251  case $DEBUG_LEVEL in
29252    fastdebug )
29253      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS"
29254      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS"
29255      C_O_FLAG_HI="$C_O_FLAG_NORM"
29256      C_O_FLAG_NORM="$C_O_FLAG_NORM"
29257      CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
29258      CXX_O_FLAG_NORM="$CXX_O_FLAG_NORM"
29259      JAVAC_FLAGS="$JAVAC_FLAGS -g"
29260      ;;
29261    slowdebug )
29262      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS"
29263      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS"
29264      C_O_FLAG_HI="$C_O_FLAG_NONE"
29265      C_O_FLAG_NORM="$C_O_FLAG_NONE"
29266      CXX_O_FLAG_HI="$CXX_O_FLAG_NONE"
29267      CXX_O_FLAG_NORM="$CXX_O_FLAG_NONE"
29268      JAVAC_FLAGS="$JAVAC_FLAGS -g"
29269      ;;
29270  esac
29271
29272  CCXXFLAGS_JDK="$CCXXFLAGS_JDK $ADD_LP64"
29273
29274  # The package path is used only on macosx?
29275  PACKAGE_PATH=/opt/local
29276
29277
29278  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
29279    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
29280    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
29281    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
29282    #   Note: -Dmacro         is the same as    #define macro 1
29283    #         -Dmacro=        is the same as    #define macro
29284    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29285      CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
29286    else
29287      CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
29288    fi
29289  else
29290    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_BIG_ENDIAN"
29291  fi
29292  if test "x$OPENJDK_TARGET_OS" = xlinux; then
29293    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DLINUX"
29294  fi
29295  if test "x$OPENJDK_TARGET_OS" = xwindows; then
29296    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DWINDOWS"
29297  fi
29298  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29299    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DSOLARIS"
29300  fi
29301  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29302    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMACOSX -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
29303    # Setting these parameters makes it an error to link to macosx APIs that are
29304    # newer than the given OS version and makes the linked binaries compatible even
29305    # if built on a newer version of the OS.
29306    # The expected format is X.Y.Z
29307    MACOSX_VERSION_MIN=10.7.0
29308
29309    # The macro takes the version with no dots, ex: 1070
29310    # Let the flags variables get resolved in make for easier override on make
29311    # command line.
29312    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
29313    LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
29314  fi
29315  if test "x$OPENJDK_TARGET_OS" = xbsd; then
29316    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DBSD -D_ALLBSD_SOURCE"
29317  fi
29318  if test "x$DEBUG_LEVEL" = xrelease; then
29319    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DNDEBUG"
29320  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29321    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DTRIMMED"
29322  fi
29323  else
29324    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DDEBUG"
29325  fi
29326
29327  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
29328  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DRELEASE='\"$RELEASE\"'"
29329
29330  CCXXFLAGS_JDK="$CCXXFLAGS_JDK \
29331      -I${JDK_OUTPUTDIR}/include \
29332      -I${JDK_OUTPUTDIR}/include/$OPENJDK_TARGET_OS \
29333      -I${JDK_TOPDIR}/src/share/javavm/export \
29334      -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/javavm/export \
29335      -I${JDK_TOPDIR}/src/share/native/common \
29336      -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/native/common"
29337
29338  # The shared libraries are compiled using the picflag.
29339  CFLAGS_JDKLIB="$CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
29340  CXXFLAGS_JDKLIB="$CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA "
29341
29342  # Executable flags
29343  CFLAGS_JDKEXE="$CCXXFLAGS_JDK $CFLAGS_JDK"
29344  CXXFLAGS_JDKEXE="$CCXXFLAGS_JDK $CXXFLAGS_JDK"
29345
29346  # Now this is odd. The JDK native libraries have to link against libjvm.so
29347  # On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
29348  # Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
29349  # is identical for client and server? Yes. Which is picked at runtime (client or server)?
29350  # Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
29351  # libraries will link to whatever is in memory. Yuck.
29352  #
29353  # Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
29354  if test "x$COMPILER_NAME" = xcl; then
29355    LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
29356    if test "x$OPENJDK_TARGET_CPU" = xx86; then
29357      LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
29358    fi
29359    # TODO: make -debug optional "--disable-full-debug-symbols"
29360    LDFLAGS_JDK="$LDFLAGS_JDK -debug"
29361    LDFLAGS_JDKLIB="${LDFLAGS_JDK} -dll -libpath:${JDK_OUTPUTDIR}/lib"
29362    LDFLAGS_JDKLIB_SUFFIX=""
29363    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
29364      LDFLAGS_STACK_SIZE=1048576
29365    else
29366      LDFLAGS_STACK_SIZE=327680
29367    fi
29368    LDFLAGS_JDKEXE="${LDFLAGS_JDK} /STACK:$LDFLAGS_STACK_SIZE"
29369  else
29370    if test "x$COMPILER_NAME" = xgcc; then
29371      # If this is a --hash-style=gnu system, use --hash-style=both, why?
29372      HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
29373      if test -n "$HAS_GNU_HASH"; then
29374        LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both "
29375      fi
29376      if test "x$OPENJDK_TARGET_OS" = xlinux; then
29377        # And since we now know that the linker is gnu, then add -z defs, to forbid
29378        # undefined symbols in object files.
29379        LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs"
29380        if test "x$DEBUG_LEVEL" = "xrelease"; then
29381          # When building release libraries, tell the linker optimize them.
29382          # Should this be supplied to the OSS linker as well?
29383          LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
29384        fi
29385      fi
29386    fi
29387    LDFLAGS_JDKLIB="${LDFLAGS_JDK} $SHARED_LIBRARY_FLAGS \
29388        -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}"
29389
29390    # On some platforms (mac) the linker warns about non existing -L dirs.
29391    # Add server first if available. Linking aginst client does not always produce the same results.
29392    # Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
29393    # Default to server for other variants.
29394    if test "x$JVM_VARIANT_SERVER" = xtrue; then
29395      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
29396    elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
29397      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/client"
29398    elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
29399      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
29400    else
29401      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
29402    fi
29403
29404    LDFLAGS_JDKLIB_SUFFIX="-ljava -ljvm"
29405    if test "x$COMPILER_NAME" = xossc; then
29406      LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc"
29407    fi
29408
29409    LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
29410    if test "x$OPENJDK_TARGET_OS" = xlinux; then
29411      LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
29412    fi
29413  fi
29414
29415
29416
29417
29418
29419
29420
29421
29422
29423
29424
29425
29426
29427
29428
29429  # Some Zero and Shark settings.
29430  # ZERO_ARCHFLAG tells the compiler which mode to build for
29431  case "${OPENJDK_TARGET_CPU}" in
29432    s390)
29433      ZERO_ARCHFLAG="-m31"
29434      ;;
29435    *)
29436      ZERO_ARCHFLAG="-m${OPENJDK_TARGET_CPU_BITS}"
29437  esac
29438
29439  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$ZERO_ARCHFLAG\"" >&5
29440$as_echo_n "checking if compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
29441  supports=yes
29442
29443  saved_cflags="$CFLAGS"
29444  CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
29445  ac_ext=c
29446ac_cpp='$CPP $CPPFLAGS'
29447ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29448ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29449ac_compiler_gnu=$ac_cv_c_compiler_gnu
29450
29451  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29452/* end confdefs.h.  */
29453int i;
29454_ACEOF
29455if ac_fn_c_try_compile "$LINENO"; then :
29456
29457else
29458  supports=no
29459fi
29460rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29461  ac_ext=cpp
29462ac_cpp='$CXXCPP $CPPFLAGS'
29463ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29464ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29465ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29466
29467  CFLAGS="$saved_cflags"
29468
29469  saved_cxxflags="$CXXFLAGS"
29470  CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
29471  ac_ext=cpp
29472ac_cpp='$CXXCPP $CPPFLAGS'
29473ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29474ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29475ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29476
29477  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29478/* end confdefs.h.  */
29479int i;
29480_ACEOF
29481if ac_fn_cxx_try_compile "$LINENO"; then :
29482
29483else
29484  supports=no
29485fi
29486rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29487  ac_ext=cpp
29488ac_cpp='$CXXCPP $CPPFLAGS'
29489ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29490ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29491ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29492
29493  CXXFLAGS="$saved_cxxflags"
29494
29495  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
29496$as_echo "$supports" >&6; }
29497  if test "x$supports" = "xyes" ; then
29498    :
29499  else
29500    ZERO_ARCHFLAG=""
29501  fi
29502
29503
29504
29505  # Check that the compiler supports -mX flags
29506  # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
29507
29508  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"-m${OPENJDK_TARGET_CPU_BITS}\"" >&5
29509$as_echo_n "checking if compiler supports \"-m${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
29510  supports=yes
29511
29512  saved_cflags="$CFLAGS"
29513  CFLAGS="$CFLAGS -m${OPENJDK_TARGET_CPU_BITS}"
29514  ac_ext=c
29515ac_cpp='$CPP $CPPFLAGS'
29516ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29517ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29518ac_compiler_gnu=$ac_cv_c_compiler_gnu
29519
29520  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29521/* end confdefs.h.  */
29522int i;
29523_ACEOF
29524if ac_fn_c_try_compile "$LINENO"; then :
29525
29526else
29527  supports=no
29528fi
29529rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29530  ac_ext=cpp
29531ac_cpp='$CXXCPP $CPPFLAGS'
29532ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29533ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29534ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29535
29536  CFLAGS="$saved_cflags"
29537
29538  saved_cxxflags="$CXXFLAGS"
29539  CXXFLAGS="$CXXFLAG -m${OPENJDK_TARGET_CPU_BITS}"
29540  ac_ext=cpp
29541ac_cpp='$CXXCPP $CPPFLAGS'
29542ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29543ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29544ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29545
29546  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29547/* end confdefs.h.  */
29548int i;
29549_ACEOF
29550if ac_fn_cxx_try_compile "$LINENO"; then :
29551
29552else
29553  supports=no
29554fi
29555rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29556  ac_ext=cpp
29557ac_cpp='$CXXCPP $CPPFLAGS'
29558ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29559ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29560ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29561
29562  CXXFLAGS="$saved_cxxflags"
29563
29564  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
29565$as_echo "$supports" >&6; }
29566  if test "x$supports" = "xyes" ; then
29567    COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
29568  else
29569    COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
29570  fi
29571
29572
29573
29574
29575# Setup debug symbols (need objcopy from the toolchain for that)
29576
29577  #
29578  # ENABLE_DEBUG_SYMBOLS
29579  # This must be done after the toolchain is setup, since we're looking at objcopy.
29580  #
29581  # Check whether --enable-debug-symbols was given.
29582if test "${enable_debug_symbols+set}" = set; then :
29583  enableval=$enable_debug_symbols;
29584fi
29585
29586
29587  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should generate debug symbols" >&5
29588$as_echo_n "checking if we should generate debug symbols... " >&6; }
29589
29590  if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then
29591    # explicit enabling of enable-debug-symbols and can't find objcopy
29592    #   this is an error
29593    as_fn_error $? "Unable to find objcopy, cannot enable debug-symbols" "$LINENO" 5
29594  fi
29595
29596  if test "x$enable_debug_symbols" = "xyes"; then
29597    ENABLE_DEBUG_SYMBOLS=true
29598  elif test "x$enable_debug_symbols" = "xno"; then
29599    ENABLE_DEBUG_SYMBOLS=false
29600  else
29601  # Default is on if objcopy is found
29602  if test "x$OBJCOPY" != x; then
29603    ENABLE_DEBUG_SYMBOLS=true
29604  # MacOS X and Windows don't use objcopy but default is on for those OSes
29605  elif test "x$OPENJDK_TARGET_OS" = xmacosx || test "x$OPENJDK_TARGET_OS" = xwindows; then
29606      ENABLE_DEBUG_SYMBOLS=true
29607    else
29608      ENABLE_DEBUG_SYMBOLS=false
29609    fi
29610  fi
29611
29612  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_DEBUG_SYMBOLS" >&5
29613$as_echo "$ENABLE_DEBUG_SYMBOLS" >&6; }
29614
29615  #
29616  # ZIP_DEBUGINFO_FILES
29617  #
29618  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should zip debug-info files" >&5
29619$as_echo_n "checking if we should zip debug-info files... " >&6; }
29620  # Check whether --enable-zip-debug-info was given.
29621if test "${enable_zip_debug_info+set}" = set; then :
29622  enableval=$enable_zip_debug_info; enable_zip_debug_info="${enableval}"
29623else
29624  enable_zip_debug_info="yes"
29625fi
29626
29627  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_zip_debug_info}" >&5
29628$as_echo "${enable_zip_debug_info}" >&6; }
29629
29630  if test "x${enable_zip_debug_info}" = "xno"; then
29631    ZIP_DEBUGINFO_FILES=false
29632  else
29633    ZIP_DEBUGINFO_FILES=true
29634  fi
29635
29636
29637
29638
29639
29640
29641
29642###############################################################################
29643#
29644# Check dependencies for external and internal libraries.
29645#
29646###############################################################################
29647
29648
29649
29650  ###############################################################################
29651  #
29652  # OS specific settings that we never will need to probe.
29653  #
29654  if test "x$OPENJDK_TARGET_OS" = xlinux; then
29655    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Linux?" >&5
29656$as_echo_n "checking what is not needed on Linux?... " >&6; }
29657    PULSE_NOT_NEEDED=yes
29658    { $as_echo "$as_me:${as_lineno-$LINENO}: result: pulse" >&5
29659$as_echo "pulse" >&6; }
29660  fi
29661
29662  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29663    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Solaris?" >&5
29664$as_echo_n "checking what is not needed on Solaris?... " >&6; }
29665    ALSA_NOT_NEEDED=yes
29666    PULSE_NOT_NEEDED=yes
29667    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
29668$as_echo "alsa pulse" >&6; }
29669  fi
29670
29671  if test "x$OPENJDK_TARGET_OS" = xwindows; then
29672    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Windows?" >&5
29673$as_echo_n "checking what is not needed on Windows?... " >&6; }
29674    CUPS_NOT_NEEDED=yes
29675    ALSA_NOT_NEEDED=yes
29676    PULSE_NOT_NEEDED=yes
29677    X11_NOT_NEEDED=yes
29678    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa cups pulse x11" >&5
29679$as_echo "alsa cups pulse x11" >&6; }
29680  fi
29681
29682  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29683    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on MacOSX?" >&5
29684$as_echo_n "checking what is not needed on MacOSX?... " >&6; }
29685    ALSA_NOT_NEEDED=yes
29686    PULSE_NOT_NEEDED=yes
29687    X11_NOT_NEEDED=yes
29688    FREETYPE2_NOT_NEEDED=yes
29689    # If the java runtime framework is disabled, then we need X11.
29690    # This will be adjusted below.
29691    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse x11" >&5
29692$as_echo "alsa pulse x11" >&6; }
29693  fi
29694
29695  if test "x$OPENJDK_TARGET_OS" = xbsd; then
29696    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on bsd?" >&5
29697$as_echo_n "checking what is not needed on bsd?... " >&6; }
29698    ALSA_NOT_NEEDED=yes
29699    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa" >&5
29700$as_echo "alsa" >&6; }
29701  fi
29702
29703  if test "x$OPENJDK" = "xfalse"; then
29704    FREETYPE2_NOT_NEEDED=yes
29705  fi
29706
29707  if test "x$SUPPORT_HEADFUL" = xno; then
29708    X11_NOT_NEEDED=yes
29709  fi
29710
29711  ###############################################################################
29712  #
29713  # Check for MacOSX support for OpenJDK. If this exists, try to build a JVM
29714  # that uses this API.
29715  #
29716  # Check whether --enable-macosx-runtime-support was given.
29717if test "${enable_macosx_runtime_support+set}" = set; then :
29718  enableval=$enable_macosx_runtime_support; MACOSX_RUNTIME_SUPPORT="${enableval}"
29719else
29720  MACOSX_RUNTIME_SUPPORT="no"
29721fi
29722
29723
29724  USE_MACOSX_RUNTIME_SUPPORT=no
29725  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for explicit Java runtime support in the OS" >&5
29726$as_echo_n "checking for explicit Java runtime support in the OS... " >&6; }
29727  if test -f /System/Library/Frameworks/JavaVM.framework/Frameworks/JavaRuntimeSupport.framework/Headers/JavaRuntimeSupport.h; then
29728    if test "x$MACOSX_RUNTIME_SUPPORT" != xno; then
29729      MACOSX_RUNTIME_SUPPORT=yes
29730      USE_MACOSX_RUNTIME_SUPPORT=yes
29731      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, does not need alsa freetype2 pulse and X11" >&5
29732$as_echo "yes, does not need alsa freetype2 pulse and X11" >&6; }
29733    else
29734      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, but explicitly disabled." >&5
29735$as_echo "yes, but explicitly disabled." >&6; }
29736    fi
29737  else
29738    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29739$as_echo "no" >&6; }
29740  fi
29741
29742  if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$USE_MACOSX_RUNTIME_SUPPORT" = xno; then
29743    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on an X11 build on MacOSX?" >&5
29744$as_echo_n "checking what is not needed on an X11 build on MacOSX?... " >&6; }
29745    X11_NOT_NEEDED=
29746    FREETYPE2_NOT_NEEDED=
29747    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
29748$as_echo "alsa pulse" >&6; }
29749  fi
29750
29751
29752
29753  ###############################################################################
29754  #
29755  # Check for X Windows
29756  #
29757
29758  # Check if the user has specified sysroot, but not --x-includes or --x-libraries.
29759  # Make a simple check for the libraries at the sysroot, and setup --x-includes and
29760  # --x-libraries for the sysroot, if that seems to be correct.
29761  if test "x$SYS_ROOT" != "x/"; then
29762    if test "x$x_includes" = xNONE; then
29763      if test -f "$SYS_ROOT/usr/X11R6/include/X11/Xlib.h"; then
29764        x_includes="$SYS_ROOT/usr/X11R6/include"
29765      elif test -f "$SYS_ROOT/usr/include/X11/Xlib.h"; then
29766        x_includes="$SYS_ROOT/usr/include"
29767      fi
29768    fi
29769    if test "x$x_libraries" = xNONE; then
29770      if test -f "$SYS_ROOT/usr/X11R6/lib/libX11.so"; then
29771        x_libraries="$SYS_ROOT/usr/X11R6/lib"
29772      elif test "$SYS_ROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
29773        x_libraries="$SYS_ROOT/usr/lib64"
29774      elif test -f "$SYS_ROOT/usr/lib/libX11.so"; then
29775        x_libraries="$SYS_ROOT/usr/lib"
29776      fi
29777    fi
29778  fi
29779
29780  # Now let autoconf do it's magic
29781  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
29782$as_echo_n "checking for X... " >&6; }
29783
29784
29785# Check whether --with-x was given.
29786if test "${with_x+set}" = set; then :
29787  withval=$with_x;
29788fi
29789
29790# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
29791if test "x$with_x" = xno; then
29792  # The user explicitly disabled X.
29793  have_x=disabled
29794else
29795  case $x_includes,$x_libraries in #(
29796    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
29797    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
29798  $as_echo_n "(cached) " >&6
29799else
29800  # One or both of the vars are not set, and there is no cached value.
29801ac_x_includes=no ac_x_libraries=no
29802rm -f -r conftest.dir
29803if mkdir conftest.dir; then
29804  cd conftest.dir
29805  cat >Imakefile <<'_ACEOF'
29806incroot:
29807	@echo incroot='${INCROOT}'
29808usrlibdir:
29809	@echo usrlibdir='${USRLIBDIR}'
29810libdir:
29811	@echo libdir='${LIBDIR}'
29812_ACEOF
29813  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
29814    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
29815    for ac_var in incroot usrlibdir libdir; do
29816      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
29817    done
29818    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
29819    for ac_extension in a so sl dylib la dll; do
29820      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
29821	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
29822	ac_im_usrlibdir=$ac_im_libdir; break
29823      fi
29824    done
29825    # Screen out bogus values from the imake configuration.  They are
29826    # bogus both because they are the default anyway, and because
29827    # using them would break gcc on systems where it needs fixed includes.
29828    case $ac_im_incroot in
29829	/usr/include) ac_x_includes= ;;
29830	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
29831    esac
29832    case $ac_im_usrlibdir in
29833	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
29834	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
29835    esac
29836  fi
29837  cd ..
29838  rm -f -r conftest.dir
29839fi
29840
29841# Standard set of common directories for X headers.
29842# Check X11 before X11Rn because it is often a symlink to the current release.
29843ac_x_header_dirs='
29844/usr/X11/include
29845/usr/X11R7/include
29846/usr/X11R6/include
29847/usr/X11R5/include
29848/usr/X11R4/include
29849
29850/usr/include/X11
29851/usr/include/X11R7
29852/usr/include/X11R6
29853/usr/include/X11R5
29854/usr/include/X11R4
29855
29856/usr/local/X11/include
29857/usr/local/X11R7/include
29858/usr/local/X11R6/include
29859/usr/local/X11R5/include
29860/usr/local/X11R4/include
29861
29862/usr/local/include/X11
29863/usr/local/include/X11R7
29864/usr/local/include/X11R6
29865/usr/local/include/X11R5
29866/usr/local/include/X11R4
29867
29868/usr/X386/include
29869/usr/x386/include
29870/usr/XFree86/include/X11
29871
29872/usr/include
29873/usr/local/include
29874/usr/unsupported/include
29875/usr/athena/include
29876/usr/local/x11r5/include
29877/usr/lpp/Xamples/include
29878
29879/usr/openwin/include
29880/usr/openwin/share/include'
29881
29882if test "$ac_x_includes" = no; then
29883  # Guess where to find include files, by looking for Xlib.h.
29884  # First, try using that file with no special directory specified.
29885  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29886/* end confdefs.h.  */
29887#include <X11/Xlib.h>
29888_ACEOF
29889if ac_fn_cxx_try_cpp "$LINENO"; then :
29890  # We can compile using X headers with no special include directory.
29891ac_x_includes=
29892else
29893  for ac_dir in $ac_x_header_dirs; do
29894  if test -r "$ac_dir/X11/Xlib.h"; then
29895    ac_x_includes=$ac_dir
29896    break
29897  fi
29898done
29899fi
29900rm -f conftest.err conftest.i conftest.$ac_ext
29901fi # $ac_x_includes = no
29902
29903if test "$ac_x_libraries" = no; then
29904  # Check for the libraries.
29905  # See if we find them without any special options.
29906  # Don't add to $LIBS permanently.
29907  ac_save_LIBS=$LIBS
29908  LIBS="-lX11 $LIBS"
29909  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29910/* end confdefs.h.  */
29911#include <X11/Xlib.h>
29912int
29913main ()
29914{
29915XrmInitialize ()
29916  ;
29917  return 0;
29918}
29919_ACEOF
29920if ac_fn_cxx_try_link "$LINENO"; then :
29921  LIBS=$ac_save_LIBS
29922# We can link X programs with no special library path.
29923ac_x_libraries=
29924else
29925  LIBS=$ac_save_LIBS
29926for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
29927do
29928  # Don't even attempt the hair of trying to link an X program!
29929  for ac_extension in a so sl dylib la dll; do
29930    if test -r "$ac_dir/libX11.$ac_extension"; then
29931      ac_x_libraries=$ac_dir
29932      break 2
29933    fi
29934  done
29935done
29936fi
29937rm -f core conftest.err conftest.$ac_objext \
29938    conftest$ac_exeext conftest.$ac_ext
29939fi # $ac_x_libraries = no
29940
29941case $ac_x_includes,$ac_x_libraries in #(
29942  no,* | *,no | *\'*)
29943    # Didn't find X, or a directory has "'" in its name.
29944    ac_cv_have_x="have_x=no";; #(
29945  *)
29946    # Record where we found X for the cache.
29947    ac_cv_have_x="have_x=yes\
29948	ac_x_includes='$ac_x_includes'\
29949	ac_x_libraries='$ac_x_libraries'"
29950esac
29951fi
29952;; #(
29953    *) have_x=yes;;
29954  esac
29955  eval "$ac_cv_have_x"
29956fi # $with_x != no
29957
29958if test "$have_x" != yes; then
29959  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
29960$as_echo "$have_x" >&6; }
29961  no_x=yes
29962else
29963  # If each of the values was on the command line, it overrides each guess.
29964  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
29965  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
29966  # Update the cache value to reflect the command line values.
29967  ac_cv_have_x="have_x=yes\
29968	ac_x_includes='$x_includes'\
29969	ac_x_libraries='$x_libraries'"
29970  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
29971$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
29972fi
29973
29974  if test "$no_x" = yes; then
29975  # Not all programs may use this symbol, but it does not hurt to define it.
29976
29977$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
29978
29979  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
29980else
29981  if test -n "$x_includes"; then
29982    X_CFLAGS="$X_CFLAGS -I$x_includes"
29983  fi
29984
29985  # It would also be nice to do this for all -L options, not just this one.
29986  if test -n "$x_libraries"; then
29987    X_LIBS="$X_LIBS -L$x_libraries"
29988    # For Solaris; some versions of Sun CC require a space after -R and
29989    # others require no space.  Words are not sufficient . . . .
29990    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
29991$as_echo_n "checking whether -R must be followed by a space... " >&6; }
29992    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
29993    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
29994    ac_cxx_werror_flag=yes
29995    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29996/* end confdefs.h.  */
29997
29998int
29999main ()
30000{
30001
30002  ;
30003  return 0;
30004}
30005_ACEOF
30006if ac_fn_cxx_try_link "$LINENO"; then :
30007  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30008$as_echo "no" >&6; }
30009       X_LIBS="$X_LIBS -R$x_libraries"
30010else
30011  LIBS="$ac_xsave_LIBS -R $x_libraries"
30012       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30013/* end confdefs.h.  */
30014
30015int
30016main ()
30017{
30018
30019  ;
30020  return 0;
30021}
30022_ACEOF
30023if ac_fn_cxx_try_link "$LINENO"; then :
30024  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30025$as_echo "yes" >&6; }
30026	  X_LIBS="$X_LIBS -R $x_libraries"
30027else
30028  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
30029$as_echo "neither works" >&6; }
30030fi
30031rm -f core conftest.err conftest.$ac_objext \
30032    conftest$ac_exeext conftest.$ac_ext
30033fi
30034rm -f core conftest.err conftest.$ac_objext \
30035    conftest$ac_exeext conftest.$ac_ext
30036    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
30037    LIBS=$ac_xsave_LIBS
30038  fi
30039
30040  # Check for system-dependent libraries X programs must link with.
30041  # Do this before checking for the system-independent R6 libraries
30042  # (-lICE), since we may need -lsocket or whatever for X linking.
30043
30044  if test "$ISC" = yes; then
30045    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
30046  else
30047    # Martyn Johnson says this is needed for Ultrix, if the X
30048    # libraries were built with DECnet support.  And Karl Berry says
30049    # the Alpha needs dnet_stub (dnet does not exist).
30050    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
30051    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30052/* end confdefs.h.  */
30053
30054/* Override any GCC internal prototype to avoid an error.
30055   Use char because int might match the return type of a GCC
30056   builtin and then its argument prototype would still apply.  */
30057#ifdef __cplusplus
30058extern "C"
30059#endif
30060char XOpenDisplay ();
30061int
30062main ()
30063{
30064return XOpenDisplay ();
30065  ;
30066  return 0;
30067}
30068_ACEOF
30069if ac_fn_cxx_try_link "$LINENO"; then :
30070
30071else
30072  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
30073$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
30074if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
30075  $as_echo_n "(cached) " >&6
30076else
30077  ac_check_lib_save_LIBS=$LIBS
30078LIBS="-ldnet  $LIBS"
30079cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30080/* end confdefs.h.  */
30081
30082/* Override any GCC internal prototype to avoid an error.
30083   Use char because int might match the return type of a GCC
30084   builtin and then its argument prototype would still apply.  */
30085#ifdef __cplusplus
30086extern "C"
30087#endif
30088char dnet_ntoa ();
30089int
30090main ()
30091{
30092return dnet_ntoa ();
30093  ;
30094  return 0;
30095}
30096_ACEOF
30097if ac_fn_cxx_try_link "$LINENO"; then :
30098  ac_cv_lib_dnet_dnet_ntoa=yes
30099else
30100  ac_cv_lib_dnet_dnet_ntoa=no
30101fi
30102rm -f core conftest.err conftest.$ac_objext \
30103    conftest$ac_exeext conftest.$ac_ext
30104LIBS=$ac_check_lib_save_LIBS
30105fi
30106{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
30107$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
30108if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
30109  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
30110fi
30111
30112    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
30113      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
30114$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
30115if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
30116  $as_echo_n "(cached) " >&6
30117else
30118  ac_check_lib_save_LIBS=$LIBS
30119LIBS="-ldnet_stub  $LIBS"
30120cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30121/* end confdefs.h.  */
30122
30123/* Override any GCC internal prototype to avoid an error.
30124   Use char because int might match the return type of a GCC
30125   builtin and then its argument prototype would still apply.  */
30126#ifdef __cplusplus
30127extern "C"
30128#endif
30129char dnet_ntoa ();
30130int
30131main ()
30132{
30133return dnet_ntoa ();
30134  ;
30135  return 0;
30136}
30137_ACEOF
30138if ac_fn_cxx_try_link "$LINENO"; then :
30139  ac_cv_lib_dnet_stub_dnet_ntoa=yes
30140else
30141  ac_cv_lib_dnet_stub_dnet_ntoa=no
30142fi
30143rm -f core conftest.err conftest.$ac_objext \
30144    conftest$ac_exeext conftest.$ac_ext
30145LIBS=$ac_check_lib_save_LIBS
30146fi
30147{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
30148$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
30149if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
30150  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
30151fi
30152
30153    fi
30154fi
30155rm -f core conftest.err conftest.$ac_objext \
30156    conftest$ac_exeext conftest.$ac_ext
30157    LIBS="$ac_xsave_LIBS"
30158
30159    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
30160    # to get the SysV transport functions.
30161    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
30162    # needs -lnsl.
30163    # The nsl library prevents programs from opening the X display
30164    # on Irix 5.2, according to T.E. Dickey.
30165    # The functions gethostbyname, getservbyname, and inet_addr are
30166    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
30167    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
30168if test "x$ac_cv_func_gethostbyname" = xyes; then :
30169
30170fi
30171
30172    if test $ac_cv_func_gethostbyname = no; then
30173      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
30174$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
30175if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
30176  $as_echo_n "(cached) " >&6
30177else
30178  ac_check_lib_save_LIBS=$LIBS
30179LIBS="-lnsl  $LIBS"
30180cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30181/* end confdefs.h.  */
30182
30183/* Override any GCC internal prototype to avoid an error.
30184   Use char because int might match the return type of a GCC
30185   builtin and then its argument prototype would still apply.  */
30186#ifdef __cplusplus
30187extern "C"
30188#endif
30189char gethostbyname ();
30190int
30191main ()
30192{
30193return gethostbyname ();
30194  ;
30195  return 0;
30196}
30197_ACEOF
30198if ac_fn_cxx_try_link "$LINENO"; then :
30199  ac_cv_lib_nsl_gethostbyname=yes
30200else
30201  ac_cv_lib_nsl_gethostbyname=no
30202fi
30203rm -f core conftest.err conftest.$ac_objext \
30204    conftest$ac_exeext conftest.$ac_ext
30205LIBS=$ac_check_lib_save_LIBS
30206fi
30207{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
30208$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
30209if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
30210  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
30211fi
30212
30213      if test $ac_cv_lib_nsl_gethostbyname = no; then
30214	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
30215$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
30216if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
30217  $as_echo_n "(cached) " >&6
30218else
30219  ac_check_lib_save_LIBS=$LIBS
30220LIBS="-lbsd  $LIBS"
30221cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30222/* end confdefs.h.  */
30223
30224/* Override any GCC internal prototype to avoid an error.
30225   Use char because int might match the return type of a GCC
30226   builtin and then its argument prototype would still apply.  */
30227#ifdef __cplusplus
30228extern "C"
30229#endif
30230char gethostbyname ();
30231int
30232main ()
30233{
30234return gethostbyname ();
30235  ;
30236  return 0;
30237}
30238_ACEOF
30239if ac_fn_cxx_try_link "$LINENO"; then :
30240  ac_cv_lib_bsd_gethostbyname=yes
30241else
30242  ac_cv_lib_bsd_gethostbyname=no
30243fi
30244rm -f core conftest.err conftest.$ac_objext \
30245    conftest$ac_exeext conftest.$ac_ext
30246LIBS=$ac_check_lib_save_LIBS
30247fi
30248{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
30249$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
30250if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
30251  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
30252fi
30253
30254      fi
30255    fi
30256
30257    # lieder@skyler.mavd.honeywell.com says without -lsocket,
30258    # socket/setsockopt and other routines are undefined under SCO ODT
30259    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
30260    # on later versions), says Simon Leinen: it contains gethostby*
30261    # variants that don't use the name server (or something).  -lsocket
30262    # must be given before -lnsl if both are needed.  We assume that
30263    # if connect needs -lnsl, so does gethostbyname.
30264    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
30265if test "x$ac_cv_func_connect" = xyes; then :
30266
30267fi
30268
30269    if test $ac_cv_func_connect = no; then
30270      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
30271$as_echo_n "checking for connect in -lsocket... " >&6; }
30272if ${ac_cv_lib_socket_connect+:} false; then :
30273  $as_echo_n "(cached) " >&6
30274else
30275  ac_check_lib_save_LIBS=$LIBS
30276LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
30277cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30278/* end confdefs.h.  */
30279
30280/* Override any GCC internal prototype to avoid an error.
30281   Use char because int might match the return type of a GCC
30282   builtin and then its argument prototype would still apply.  */
30283#ifdef __cplusplus
30284extern "C"
30285#endif
30286char connect ();
30287int
30288main ()
30289{
30290return connect ();
30291  ;
30292  return 0;
30293}
30294_ACEOF
30295if ac_fn_cxx_try_link "$LINENO"; then :
30296  ac_cv_lib_socket_connect=yes
30297else
30298  ac_cv_lib_socket_connect=no
30299fi
30300rm -f core conftest.err conftest.$ac_objext \
30301    conftest$ac_exeext conftest.$ac_ext
30302LIBS=$ac_check_lib_save_LIBS
30303fi
30304{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
30305$as_echo "$ac_cv_lib_socket_connect" >&6; }
30306if test "x$ac_cv_lib_socket_connect" = xyes; then :
30307  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
30308fi
30309
30310    fi
30311
30312    # Guillermo Gomez says -lposix is necessary on A/UX.
30313    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
30314if test "x$ac_cv_func_remove" = xyes; then :
30315
30316fi
30317
30318    if test $ac_cv_func_remove = no; then
30319      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
30320$as_echo_n "checking for remove in -lposix... " >&6; }
30321if ${ac_cv_lib_posix_remove+:} false; then :
30322  $as_echo_n "(cached) " >&6
30323else
30324  ac_check_lib_save_LIBS=$LIBS
30325LIBS="-lposix  $LIBS"
30326cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30327/* end confdefs.h.  */
30328
30329/* Override any GCC internal prototype to avoid an error.
30330   Use char because int might match the return type of a GCC
30331   builtin and then its argument prototype would still apply.  */
30332#ifdef __cplusplus
30333extern "C"
30334#endif
30335char remove ();
30336int
30337main ()
30338{
30339return remove ();
30340  ;
30341  return 0;
30342}
30343_ACEOF
30344if ac_fn_cxx_try_link "$LINENO"; then :
30345  ac_cv_lib_posix_remove=yes
30346else
30347  ac_cv_lib_posix_remove=no
30348fi
30349rm -f core conftest.err conftest.$ac_objext \
30350    conftest$ac_exeext conftest.$ac_ext
30351LIBS=$ac_check_lib_save_LIBS
30352fi
30353{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
30354$as_echo "$ac_cv_lib_posix_remove" >&6; }
30355if test "x$ac_cv_lib_posix_remove" = xyes; then :
30356  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
30357fi
30358
30359    fi
30360
30361    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
30362    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
30363if test "x$ac_cv_func_shmat" = xyes; then :
30364
30365fi
30366
30367    if test $ac_cv_func_shmat = no; then
30368      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
30369$as_echo_n "checking for shmat in -lipc... " >&6; }
30370if ${ac_cv_lib_ipc_shmat+:} false; then :
30371  $as_echo_n "(cached) " >&6
30372else
30373  ac_check_lib_save_LIBS=$LIBS
30374LIBS="-lipc  $LIBS"
30375cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30376/* end confdefs.h.  */
30377
30378/* Override any GCC internal prototype to avoid an error.
30379   Use char because int might match the return type of a GCC
30380   builtin and then its argument prototype would still apply.  */
30381#ifdef __cplusplus
30382extern "C"
30383#endif
30384char shmat ();
30385int
30386main ()
30387{
30388return shmat ();
30389  ;
30390  return 0;
30391}
30392_ACEOF
30393if ac_fn_cxx_try_link "$LINENO"; then :
30394  ac_cv_lib_ipc_shmat=yes
30395else
30396  ac_cv_lib_ipc_shmat=no
30397fi
30398rm -f core conftest.err conftest.$ac_objext \
30399    conftest$ac_exeext conftest.$ac_ext
30400LIBS=$ac_check_lib_save_LIBS
30401fi
30402{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
30403$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
30404if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
30405  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
30406fi
30407
30408    fi
30409  fi
30410
30411  # Check for libraries that X11R6 Xt/Xaw programs need.
30412  ac_save_LDFLAGS=$LDFLAGS
30413  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
30414  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
30415  # check for ICE first), but we must link in the order -lSM -lICE or
30416  # we get undefined symbols.  So assume we have SM if we have ICE.
30417  # These have to be linked with before -lX11, unlike the other
30418  # libraries we check for below, so use a different variable.
30419  # John Interrante, Karl Berry
30420  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
30421$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
30422if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
30423  $as_echo_n "(cached) " >&6
30424else
30425  ac_check_lib_save_LIBS=$LIBS
30426LIBS="-lICE $X_EXTRA_LIBS $LIBS"
30427cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30428/* end confdefs.h.  */
30429
30430/* Override any GCC internal prototype to avoid an error.
30431   Use char because int might match the return type of a GCC
30432   builtin and then its argument prototype would still apply.  */
30433#ifdef __cplusplus
30434extern "C"
30435#endif
30436char IceConnectionNumber ();
30437int
30438main ()
30439{
30440return IceConnectionNumber ();
30441  ;
30442  return 0;
30443}
30444_ACEOF
30445if ac_fn_cxx_try_link "$LINENO"; then :
30446  ac_cv_lib_ICE_IceConnectionNumber=yes
30447else
30448  ac_cv_lib_ICE_IceConnectionNumber=no
30449fi
30450rm -f core conftest.err conftest.$ac_objext \
30451    conftest$ac_exeext conftest.$ac_ext
30452LIBS=$ac_check_lib_save_LIBS
30453fi
30454{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
30455$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
30456if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
30457  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
30458fi
30459
30460  LDFLAGS=$ac_save_LDFLAGS
30461
30462fi
30463
30464
30465  # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
30466  # this doesn't make sense so we remove it.
30467  if test "x$COMPILE_TYPE" = xcross; then
30468    X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
30469  fi
30470
30471  if test "x$no_x" = xyes && test "x$X11_NOT_NEEDED" != xyes; then
30472
30473  # Print a helpful message on how to acquire the necessary build dependency.
30474  # x11 is the help tag: freetyp2, cups, pulse, alsa etc
30475  MISSING_DEPENDENCY=x11
30476  PKGHANDLER_COMMAND=
30477
30478  case $PKGHANDLER in
30479    apt-get)
30480      apt_help     $MISSING_DEPENDENCY ;;
30481    yum)
30482      yum_help     $MISSING_DEPENDENCY ;;
30483    port)
30484      port_help    $MISSING_DEPENDENCY ;;
30485    pkgutil)
30486      pkgutil_help $MISSING_DEPENDENCY ;;
30487    pkgadd)
30488      pkgadd_help  $MISSING_DEPENDENCY ;;
30489    * )
30490      break ;;
30491  esac
30492
30493  if test "x$PKGHANDLER_COMMAND" != x; then
30494    HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30495  fi
30496
30497    as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
30498  fi
30499
30500  # Some of the old makefiles require a setting of OPENWIN_HOME
30501  # Since the X11R6 directory has disappeared on later Linuxes,
30502  # we need to probe for it.
30503  if test "x$OPENJDK_TARGET_OS" = xlinux; then
30504    if test -d "$SYS_ROOT/usr/X11R6"; then
30505      OPENWIN_HOME="$SYS_ROOT/usr/X11R6"
30506    elif test -d "$SYS_ROOT/usr/include/X11"; then
30507      OPENWIN_HOME="$SYS_ROOT/usr"
30508    fi
30509  fi
30510  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
30511    OPENWIN_HOME="/usr/openwin"
30512  fi
30513
30514
30515
30516  #
30517  # Weird Sol10 something check...TODO change to try compile
30518  #
30519  if test "x${OPENJDK_TARGET_OS}" = xsolaris; then
30520    if test "`uname -r`" = "5.10"; then
30521      if test "`${EGREP} -c XLinearGradient ${OPENWIN_HOME}/share/include/X11/extensions/Xrender.h`" = "0"; then
30522        X_CFLAGS="${X_CFLAGS} -DSOLARIS10_NO_XRENDER_STRUCTS"
30523      fi
30524    fi
30525  fi
30526
30527  ac_ext=c
30528ac_cpp='$CPP $CPPFLAGS'
30529ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30530ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30531ac_compiler_gnu=$ac_cv_c_compiler_gnu
30532
30533  OLD_CFLAGS="$CFLAGS"
30534  CFLAGS="$CFLAGS $X_CFLAGS"
30535
30536  # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
30537  for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
30538do :
30539  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
30540ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
30541        # include <X11/Xlib.h>
30542        # include <X11/Xutil.h>
30543
30544
30545"
30546if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
30547  cat >>confdefs.h <<_ACEOF
30548#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
30549_ACEOF
30550 X11_A_OK=yes
30551else
30552  X11_A_OK=no; break
30553fi
30554
30555done
30556
30557
30558  CFLAGS="$OLD_CFLAGS"
30559  ac_ext=cpp
30560ac_cpp='$CXXCPP $CPPFLAGS'
30561ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30562ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30563ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30564
30565
30566  if test "x$X11_A_OK" = xno && test "x$X11_NOT_NEEDED" != xyes; then
30567
30568  # Print a helpful message on how to acquire the necessary build dependency.
30569  # x11 is the help tag: freetyp2, cups, pulse, alsa etc
30570  MISSING_DEPENDENCY=x11
30571  PKGHANDLER_COMMAND=
30572
30573  case $PKGHANDLER in
30574    apt-get)
30575      apt_help     $MISSING_DEPENDENCY ;;
30576    yum)
30577      yum_help     $MISSING_DEPENDENCY ;;
30578    port)
30579      port_help    $MISSING_DEPENDENCY ;;
30580    pkgutil)
30581      pkgutil_help $MISSING_DEPENDENCY ;;
30582    pkgadd)
30583      pkgadd_help  $MISSING_DEPENDENCY ;;
30584    * )
30585      break ;;
30586  esac
30587
30588  if test "x$PKGHANDLER_COMMAND" != x; then
30589    HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30590  fi
30591
30592    as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
30593  fi
30594
30595
30596
30597
30598
30599
30600  ###############################################################################
30601  #
30602  # The common unix printing system cups is used to print from java.
30603  #
30604
30605# Check whether --with-cups was given.
30606if test "${with_cups+set}" = set; then :
30607  withval=$with_cups;
30608fi
30609
30610
30611# Check whether --with-cups-include was given.
30612if test "${with_cups_include+set}" = set; then :
30613  withval=$with_cups_include;
30614fi
30615
30616
30617  if test "x$CUPS_NOT_NEEDED" = xyes; then
30618    if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then
30619      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups is ignored" >&5
30620$as_echo "$as_me: WARNING: cups not used, so --with-cups is ignored" >&2;}
30621    fi
30622    CUPS_CFLAGS=
30623  else
30624    CUPS_FOUND=no
30625
30626    if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
30627      as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
30628    fi
30629
30630    if test "x${with_cups}" != x; then
30631      CUPS_CFLAGS="-I${with_cups}/include"
30632      CUPS_FOUND=yes
30633    fi
30634    if test "x${with_cups_include}" != x; then
30635      CUPS_CFLAGS="-I${with_cups_include}"
30636      CUPS_FOUND=yes
30637    fi
30638    if test "x$CUPS_FOUND" = xno; then
30639
30640
30641  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
30642    # Source the builddeps file again, to make sure it uses the latest variables!
30643    . $builddepsfile
30644    # Look for a target and build machine specific resource!
30645    eval resource=\${builddep_cups_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
30646    if test "x$resource" = x; then
30647      # Ok, lets instead look for a target specific resource
30648      eval resource=\${builddep_cups_TARGET_${rewritten_target_var}}
30649    fi
30650    if test "x$resource" = x; then
30651      # Ok, lets instead look for a build specific resource
30652      eval resource=\${builddep_cups_BUILD_${rewritten_build_var}}
30653    fi
30654    if test "x$resource" = x; then
30655      # Ok, lets instead look for a generic resource
30656      # (The cups comes from M4 and not the shell, thus no need for eval here.)
30657      resource=${builddep_cups}
30658    fi
30659    if test "x$resource" != x; then
30660      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for cups" >&5
30661$as_echo "$as_me: Using builddeps $resource for cups" >&6;}
30662      # If the resource in the builddeps.conf file is an existing directory,
30663      # for example /java/linux/cups
30664      if test -d ${resource}; then
30665        depdir=${resource}
30666      else
30667
30668  # cups is for example mymodule
30669  # $resource is for example libs/general/libmymod_1_2_3.zip
30670  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
30671  # $with_builddeps_dir is for example /localhome/builddeps
30672  # depdir is the name of the variable into which we store the depdir, eg MYMOD
30673  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
30674  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
30675  filename=`basename $resource`
30676  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
30677  filebase=${filename%%.*}
30678  extension=${filename#*.}
30679  installdir=$with_builddeps_dir/$filebase
30680  if test ! -f $installdir/$filename.unpacked; then
30681    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&5
30682$as_echo "$as_me: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&6;}
30683    if test ! -d $installdir; then
30684      mkdir -p $installdir
30685    fi
30686    if test ! -d $installdir; then
30687      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
30688    fi
30689    tmpfile=`mktemp $installdir/cups.XXXXXXXXX`
30690    touch $tmpfile
30691    if test ! -f $tmpfile; then
30692      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
30693    fi
30694
30695  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
30696  # $tmpfile is the local file name for the downloaded file.
30697  VALID_TOOL=no
30698  if test "x$BDEPS_FTP" = xwget; then
30699    VALID_TOOL=yes
30700    wget -O $tmpfile $with_builddeps_server/$resource
30701  fi
30702  if test "x$BDEPS_FTP" = xlftp; then
30703    VALID_TOOL=yes
30704    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
30705  fi
30706  if test "x$BDEPS_FTP" = xftp; then
30707    VALID_TOOL=yes
30708    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
30709    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
30710    FTPUSERPWD=${FTPSERVER%%@*}
30711    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
30712      FTPUSER=${userpwd%%:*}
30713      FTPPWD=${userpwd#*@}
30714      FTPSERVER=${FTPSERVER#*@}
30715    else
30716      FTPUSER=ftp
30717      FTPPWD=ftp
30718    fi
30719    # the "pass" command does not work on some
30720    # ftp clients (read ftp.exe) but if it works,
30721    # passive mode is better!
30722    ( \
30723        echo "user $FTPUSER $FTPPWD"        ; \
30724        echo "pass"                         ; \
30725        echo "bin"                          ; \
30726        echo "get $FTPPATH $tmpfile"              ; \
30727    ) | ftp -in $FTPSERVER
30728  fi
30729  if test "x$VALID_TOOL" != xyes; then
30730    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
30731  fi
30732
30733    mv $tmpfile $installdir/$filename
30734    if test ! -s $installdir/$filename; then
30735      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
30736    fi
30737    case "$extension" in
30738      zip)  echo "Unzipping $installdir/$filename..."
30739        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
30740        ;;
30741      tar.gz) echo "Untaring $installdir/$filename..."
30742        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
30743        ;;
30744      tgz) echo "Untaring $installdir/$filename..."
30745        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
30746        ;;
30747      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
30748        ;;
30749    esac
30750  fi
30751  if test -f $installdir/$filename.unpacked; then
30752    depdir=$installdir
30753  fi
30754
30755      fi
30756      # Source the builddeps file again, because in the previous command, the depdir
30757      # was updated to point at the current build dependency install directory.
30758      . $builddepsfile
30759      # Now extract variables from the builddeps.conf files.
30760      theroot=${builddep_cups_ROOT}
30761      thecflags=${builddep_cups_CFLAGS}
30762      thelibs=${builddep_cups_LIBS}
30763      if test "x$depdir" = x; then
30764        as_fn_error $? "Could not download build dependency cups" "$LINENO" 5
30765      fi
30766      CUPS=$depdir
30767      if test "x$theroot" != x; then
30768        CUPS="$theroot"
30769      fi
30770      if test "x$thecflags" != x; then
30771        CUPS_CFLAGS="$thecflags"
30772      fi
30773      if test "x$thelibs" != x; then
30774        CUPS_LIBS="$thelibs"
30775      fi
30776      CUPS_FOUND=yes
30777
30778    fi
30779
30780  fi
30781
30782    fi
30783    if test "x$CUPS_FOUND" = xno; then
30784      # Are the cups headers installed in the default /usr/include location?
30785      for ac_header in cups/cups.h cups/ppd.h
30786do :
30787  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
30788ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
30789if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
30790  cat >>confdefs.h <<_ACEOF
30791#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
30792_ACEOF
30793
30794            CUPS_FOUND=yes
30795            CUPS_CFLAGS=
30796            DEFAULT_CUPS=yes
30797
30798
30799fi
30800
30801done
30802
30803    fi
30804    if test "x$CUPS_FOUND" = xno; then
30805      # Getting nervous now? Lets poke around for standard Solaris third-party
30806      # package installation locations.
30807      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
30808$as_echo_n "checking for cups headers... " >&6; }
30809      if test -s /opt/sfw/cups/include/cups/cups.h; then
30810        # An SFW package seems to be installed!
30811        CUPS_FOUND=yes
30812        CUPS_CFLAGS="-I/opt/sfw/cups/include"
30813      elif test -s /opt/csw/include/cups/cups.h; then
30814        # A CSW package seems to be installed!
30815        CUPS_FOUND=yes
30816        CUPS_CFLAGS="-I/opt/csw/include"
30817      fi
30818      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
30819$as_echo "$CUPS_FOUND" >&6; }
30820    fi
30821    if test "x$CUPS_FOUND" = xno; then
30822
30823  # Print a helpful message on how to acquire the necessary build dependency.
30824  # cups is the help tag: freetyp2, cups, pulse, alsa etc
30825  MISSING_DEPENDENCY=cups
30826  PKGHANDLER_COMMAND=
30827
30828  case $PKGHANDLER in
30829    apt-get)
30830      apt_help     $MISSING_DEPENDENCY ;;
30831    yum)
30832      yum_help     $MISSING_DEPENDENCY ;;
30833    port)
30834      port_help    $MISSING_DEPENDENCY ;;
30835    pkgutil)
30836      pkgutil_help $MISSING_DEPENDENCY ;;
30837    pkgadd)
30838      pkgadd_help  $MISSING_DEPENDENCY ;;
30839    * )
30840      break ;;
30841  esac
30842
30843  if test "x$PKGHANDLER_COMMAND" != x; then
30844    HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30845  fi
30846
30847      as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
30848    fi
30849  fi
30850
30851
30852
30853
30854
30855
30856  ###############################################################################
30857  #
30858  # The ubiquitous freetype2 library is used to render fonts.
30859  #
30860
30861# Check whether --with-freetype was given.
30862if test "${with_freetype+set}" = set; then :
30863  withval=$with_freetype;
30864fi
30865
30866
30867  # If we are using the OS installed system lib for freetype, then we do not need to copy it to the build tree
30868  USING_SYSTEM_FT_LIB=false
30869
30870  if test "x$FREETYPE2_NOT_NEEDED" = xyes; then
30871    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
30872      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype is ignored" >&5
30873$as_echo "$as_me: WARNING: freetype not used, so --with-freetype is ignored" >&2;}
30874    fi
30875    FREETYPE2_CFLAGS=
30876    FREETYPE2_LIBS=
30877    FREETYPE2_LIB_PATH=
30878  else
30879    FREETYPE2_FOUND=no
30880
30881    if test "x$with_freetype" != x; then
30882
30883  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30884
30885  # Input might be given as Windows format, start by converting to
30886  # unix format.
30887  path="$with_freetype"
30888  new_path=`$CYGPATH -u "$path"`
30889
30890  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30891  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30892  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30893  # "foo.exe" is OK but "foo" is an error.
30894  #
30895  # This test is therefore slightly more accurate than "test -f" to check for file precense.
30896  # It is also a way to make sure we got the proper file name for the real test later on.
30897  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30898  if test "x$test_shortpath" = x; then
30899    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_freetype, which resolves as \"$path\", is invalid." >&5
30900$as_echo "$as_me: The path of with_freetype, which resolves as \"$path\", is invalid." >&6;}
30901    as_fn_error $? "Cannot locate the the path of with_freetype" "$LINENO" 5
30902  fi
30903
30904  # Call helper function which possibly converts this using DOS-style short mode.
30905  # If so, the updated path is stored in $new_path.
30906
30907  input_path="$new_path"
30908  # Check if we need to convert this using DOS-style short mode. If the path
30909  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30910  # take no chances and rewrite it.
30911  # Note: m4 eats our [], so we need to use [ and ] instead.
30912  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30913  if test "x$has_forbidden_chars" != x; then
30914    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30915    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30916    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30917    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30918      # Going to short mode and back again did indeed matter. Since short mode is
30919      # case insensitive, let's make it lowercase to improve readability.
30920      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30921      # Now convert it back to Unix-stile (cygpath)
30922      input_path=`$CYGPATH -u "$shortmode_path"`
30923      new_path="$input_path"
30924    fi
30925  fi
30926
30927  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30928  if test "x$test_cygdrive_prefix" = x; then
30929    # As a simple fix, exclude /usr/bin since it's not a real path.
30930    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30931      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30932      # a path prefixed by /cygdrive for fixpath to work.
30933      new_path="$CYGWIN_ROOT_PATH$input_path"
30934    fi
30935  fi
30936
30937
30938  if test "x$path" != "x$new_path"; then
30939    with_freetype="$new_path"
30940    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_freetype to \"$new_path\"" >&5
30941$as_echo "$as_me: Rewriting with_freetype to \"$new_path\"" >&6;}
30942  fi
30943
30944  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30945
30946  path="$with_freetype"
30947  has_colon=`$ECHO $path | $GREP ^.:`
30948  new_path="$path"
30949  if test "x$has_colon" = x; then
30950    # Not in mixed or Windows style, start by that.
30951    new_path=`cmd //c echo $path`
30952  fi
30953
30954
30955  input_path="$new_path"
30956  # Check if we need to convert this using DOS-style short mode. If the path
30957  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30958  # take no chances and rewrite it.
30959  # Note: m4 eats our [], so we need to use [ and ] instead.
30960  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30961  if test "x$has_forbidden_chars" != x; then
30962    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30963    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30964  fi
30965
30966
30967  windows_path="$new_path"
30968  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30969    unix_path=`$CYGPATH -u "$windows_path"`
30970    new_path="$unix_path"
30971  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30972    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30973    new_path="$unix_path"
30974  fi
30975
30976  if test "x$path" != "x$new_path"; then
30977    with_freetype="$new_path"
30978    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_freetype to \"$new_path\"" >&5
30979$as_echo "$as_me: Rewriting with_freetype to \"$new_path\"" >&6;}
30980  fi
30981
30982  # Save the first 10 bytes of this path to the storage, so fixpath can work.
30983  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30984
30985  else
30986    # We're on a posix platform. Hooray! :)
30987    path="$with_freetype"
30988    has_space=`$ECHO "$path" | $GREP " "`
30989    if test "x$has_space" != x; then
30990      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_freetype, which resolves as \"$path\", is invalid." >&5
30991$as_echo "$as_me: The path of with_freetype, which resolves as \"$path\", is invalid." >&6;}
30992      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30993    fi
30994
30995    # Use eval to expand a potential ~
30996    eval path="$path"
30997    if test ! -f "$path" && test ! -d "$path"; then
30998      as_fn_error $? "The path of with_freetype, which resolves as \"$path\", is not found." "$LINENO" 5
30999    fi
31000
31001    with_freetype="`cd "$path"; $THEPWDCMD -L`"
31002  fi
31003
31004      FREETYPE2_LIBS="-L$with_freetype/lib -lfreetype"
31005      FREETYPE2_LIB_PATH="$with_freetype/lib"
31006      if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -d "$with_freetype/lib/amd64"; then
31007        FREETYPE2_LIBS="-L$with_freetype/lib/amd64 -lfreetype"
31008        FREETYPE2_LIB_PATH="$with_freetype/lib/amd64"
31009      fi
31010      if test "x$OPENJDK_TARGET_OS" = xwindows; then
31011        FREETYPE2_LIBS="$with_freetype/lib/freetype.lib"
31012      fi
31013      FREETYPE2_CFLAGS="-I$with_freetype/include"
31014      if test -s $with_freetype/include/ft2build.h && test -d $with_freetype/include/freetype2/freetype; then
31015        FREETYPE2_CFLAGS="-I$with_freetype/include/freetype2 -I$with_freetype/include"
31016      fi
31017      FREETYPE2_FOUND=yes
31018      if test "x$FREETYPE2_FOUND" = xyes; then
31019        # Verify that the directories exist
31020        if ! test -d "$with_freetype/lib" || ! test -d "$with_freetype/include"; then
31021          as_fn_error $? "Could not find the expected directories $with_freetype/lib and $with_freetype/include" "$LINENO" 5
31022        fi
31023        # List the contents of the lib.
31024        FREETYPELIB=`ls $with_freetype/lib/libfreetype.so $with_freetype/lib/freetype.dll 2> /dev/null`
31025        if test "x$FREETYPELIB" = x; then
31026          as_fn_error $? "Could not find libfreetype.so nor freetype.dll in $with_freetype/lib" "$LINENO" 5
31027        fi
31028        # Check one h-file
31029        if ! test -s "$with_freetype/include/ft2build.h"; then
31030          as_fn_error $? "Could not find $with_freetype/include/ft2build.h" "$LINENO" 5
31031        fi
31032      fi
31033    fi
31034    if test "x$FREETYPE2_FOUND" = xno; then
31035
31036
31037  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
31038    # Source the builddeps file again, to make sure it uses the latest variables!
31039    . $builddepsfile
31040    # Look for a target and build machine specific resource!
31041    eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
31042    if test "x$resource" = x; then
31043      # Ok, lets instead look for a target specific resource
31044      eval resource=\${builddep_freetype2_TARGET_${rewritten_target_var}}
31045    fi
31046    if test "x$resource" = x; then
31047      # Ok, lets instead look for a build specific resource
31048      eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}}
31049    fi
31050    if test "x$resource" = x; then
31051      # Ok, lets instead look for a generic resource
31052      # (The freetype2 comes from M4 and not the shell, thus no need for eval here.)
31053      resource=${builddep_freetype2}
31054    fi
31055    if test "x$resource" != x; then
31056      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for freetype2" >&5
31057$as_echo "$as_me: Using builddeps $resource for freetype2" >&6;}
31058      # If the resource in the builddeps.conf file is an existing directory,
31059      # for example /java/linux/cups
31060      if test -d ${resource}; then
31061        depdir=${resource}
31062      else
31063
31064  # freetype2 is for example mymodule
31065  # $resource is for example libs/general/libmymod_1_2_3.zip
31066  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
31067  # $with_builddeps_dir is for example /localhome/builddeps
31068  # depdir is the name of the variable into which we store the depdir, eg MYMOD
31069  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
31070  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
31071  filename=`basename $resource`
31072  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
31073  filebase=${filename%%.*}
31074  extension=${filename#*.}
31075  installdir=$with_builddeps_dir/$filebase
31076  if test ! -f $installdir/$filename.unpacked; then
31077    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&5
31078$as_echo "$as_me: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&6;}
31079    if test ! -d $installdir; then
31080      mkdir -p $installdir
31081    fi
31082    if test ! -d $installdir; then
31083      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
31084    fi
31085    tmpfile=`mktemp $installdir/freetype2.XXXXXXXXX`
31086    touch $tmpfile
31087    if test ! -f $tmpfile; then
31088      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
31089    fi
31090
31091  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
31092  # $tmpfile is the local file name for the downloaded file.
31093  VALID_TOOL=no
31094  if test "x$BDEPS_FTP" = xwget; then
31095    VALID_TOOL=yes
31096    wget -O $tmpfile $with_builddeps_server/$resource
31097  fi
31098  if test "x$BDEPS_FTP" = xlftp; then
31099    VALID_TOOL=yes
31100    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
31101  fi
31102  if test "x$BDEPS_FTP" = xftp; then
31103    VALID_TOOL=yes
31104    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
31105    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
31106    FTPUSERPWD=${FTPSERVER%%@*}
31107    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
31108      FTPUSER=${userpwd%%:*}
31109      FTPPWD=${userpwd#*@}
31110      FTPSERVER=${FTPSERVER#*@}
31111    else
31112      FTPUSER=ftp
31113      FTPPWD=ftp
31114    fi
31115    # the "pass" command does not work on some
31116    # ftp clients (read ftp.exe) but if it works,
31117    # passive mode is better!
31118    ( \
31119        echo "user $FTPUSER $FTPPWD"        ; \
31120        echo "pass"                         ; \
31121        echo "bin"                          ; \
31122        echo "get $FTPPATH $tmpfile"              ; \
31123    ) | ftp -in $FTPSERVER
31124  fi
31125  if test "x$VALID_TOOL" != xyes; then
31126    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
31127  fi
31128
31129    mv $tmpfile $installdir/$filename
31130    if test ! -s $installdir/$filename; then
31131      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
31132    fi
31133    case "$extension" in
31134      zip)  echo "Unzipping $installdir/$filename..."
31135        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
31136        ;;
31137      tar.gz) echo "Untaring $installdir/$filename..."
31138        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31139        ;;
31140      tgz) echo "Untaring $installdir/$filename..."
31141        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31142        ;;
31143      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
31144        ;;
31145    esac
31146  fi
31147  if test -f $installdir/$filename.unpacked; then
31148    depdir=$installdir
31149  fi
31150
31151      fi
31152      # Source the builddeps file again, because in the previous command, the depdir
31153      # was updated to point at the current build dependency install directory.
31154      . $builddepsfile
31155      # Now extract variables from the builddeps.conf files.
31156      theroot=${builddep_freetype2_ROOT}
31157      thecflags=${builddep_freetype2_CFLAGS}
31158      thelibs=${builddep_freetype2_LIBS}
31159      if test "x$depdir" = x; then
31160        as_fn_error $? "Could not download build dependency freetype2" "$LINENO" 5
31161      fi
31162      FREETYPE2=$depdir
31163      if test "x$theroot" != x; then
31164        FREETYPE2="$theroot"
31165      fi
31166      if test "x$thecflags" != x; then
31167        FREETYPE2_CFLAGS="$thecflags"
31168      fi
31169      if test "x$thelibs" != x; then
31170        FREETYPE2_LIBS="$thelibs"
31171      fi
31172      FREETYPE2_FOUND=yes
31173      else FREETYPE2_FOUND=no
31174
31175    fi
31176    else FREETYPE2_FOUND=no
31177
31178  fi
31179
31180      USING_SYSTEM_FT_LIB=true
31181    fi
31182    if test "x$FREETYPE2_FOUND" = xno && test "x$OPENJDK_TARGET_OS" = xwindows; then
31183      FREETYPELOCATION="$PROGRAMFILES/GnuWin32"
31184
31185  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31186
31187  # Input might be given as Windows format, start by converting to
31188  # unix format.
31189  path="$FREETYPELOCATION"
31190  new_path=`$CYGPATH -u "$path"`
31191
31192  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31193  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31194  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31195  # "foo.exe" is OK but "foo" is an error.
31196  #
31197  # This test is therefore slightly more accurate than "test -f" to check for file precense.
31198  # It is also a way to make sure we got the proper file name for the real test later on.
31199  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31200  if test "x$test_shortpath" = x; then
31201    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&5
31202$as_echo "$as_me: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&6;}
31203    as_fn_error $? "Cannot locate the the path of FREETYPELOCATION" "$LINENO" 5
31204  fi
31205
31206  # Call helper function which possibly converts this using DOS-style short mode.
31207  # If so, the updated path is stored in $new_path.
31208
31209  input_path="$new_path"
31210  # Check if we need to convert this using DOS-style short mode. If the path
31211  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31212  # take no chances and rewrite it.
31213  # Note: m4 eats our [], so we need to use [ and ] instead.
31214  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31215  if test "x$has_forbidden_chars" != x; then
31216    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31217    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31218    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31219    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31220      # Going to short mode and back again did indeed matter. Since short mode is
31221      # case insensitive, let's make it lowercase to improve readability.
31222      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31223      # Now convert it back to Unix-stile (cygpath)
31224      input_path=`$CYGPATH -u "$shortmode_path"`
31225      new_path="$input_path"
31226    fi
31227  fi
31228
31229  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31230  if test "x$test_cygdrive_prefix" = x; then
31231    # As a simple fix, exclude /usr/bin since it's not a real path.
31232    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31233      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31234      # a path prefixed by /cygdrive for fixpath to work.
31235      new_path="$CYGWIN_ROOT_PATH$input_path"
31236    fi
31237  fi
31238
31239
31240  if test "x$path" != "x$new_path"; then
31241    FREETYPELOCATION="$new_path"
31242    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPELOCATION to \"$new_path\"" >&5
31243$as_echo "$as_me: Rewriting FREETYPELOCATION to \"$new_path\"" >&6;}
31244  fi
31245
31246  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31247
31248  path="$FREETYPELOCATION"
31249  has_colon=`$ECHO $path | $GREP ^.:`
31250  new_path="$path"
31251  if test "x$has_colon" = x; then
31252    # Not in mixed or Windows style, start by that.
31253    new_path=`cmd //c echo $path`
31254  fi
31255
31256
31257  input_path="$new_path"
31258  # Check if we need to convert this using DOS-style short mode. If the path
31259  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31260  # take no chances and rewrite it.
31261  # Note: m4 eats our [], so we need to use [ and ] instead.
31262  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31263  if test "x$has_forbidden_chars" != x; then
31264    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31265    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31266  fi
31267
31268
31269  windows_path="$new_path"
31270  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31271    unix_path=`$CYGPATH -u "$windows_path"`
31272    new_path="$unix_path"
31273  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31274    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31275    new_path="$unix_path"
31276  fi
31277
31278  if test "x$path" != "x$new_path"; then
31279    FREETYPELOCATION="$new_path"
31280    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPELOCATION to \"$new_path\"" >&5
31281$as_echo "$as_me: Rewriting FREETYPELOCATION to \"$new_path\"" >&6;}
31282  fi
31283
31284  # Save the first 10 bytes of this path to the storage, so fixpath can work.
31285  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31286
31287  else
31288    # We're on a posix platform. Hooray! :)
31289    path="$FREETYPELOCATION"
31290    has_space=`$ECHO "$path" | $GREP " "`
31291    if test "x$has_space" != x; then
31292      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&5
31293$as_echo "$as_me: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&6;}
31294      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31295    fi
31296
31297    # Use eval to expand a potential ~
31298    eval path="$path"
31299    if test ! -f "$path" && test ! -d "$path"; then
31300      as_fn_error $? "The path of FREETYPELOCATION, which resolves as \"$path\", is not found." "$LINENO" 5
31301    fi
31302
31303    FREETYPELOCATION="`cd "$path"; $THEPWDCMD -L`"
31304  fi
31305
31306      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype in some standard windows locations" >&5
31307$as_echo_n "checking for freetype in some standard windows locations... " >&6; }
31308      if test -s "$FREETYPELOCATION/include/ft2build.h" && test -d "$FREETYPELOCATION/include/freetype2/freetype"; then
31309        FREETYPE2_CFLAGS="-I$FREETYPELOCATION/include/freetype2 -I$FREETYPELOCATION/include"
31310        FREETYPE2_LIBS="$FREETYPELOCATION/lib/freetype.lib"
31311        FREETYPE2_LIB_PATH="$FREETYPELOCATION/lib"
31312        if ! test -s "$FREETYPE2_LIBS"; then
31313          as_fn_error $? "Could not find $FREETYPE2_LIBS" "$LINENO" 5
31314        fi
31315        if ! test -s "$FREETYPE2_LIB_PATH/freetype.dll"; then
31316          as_fn_error $? "Could not find $FREETYPE2_LIB_PATH/freetype.dll" "$LINENO" 5
31317        fi
31318        USING_SYSTEM_FT_LIB=true
31319        FREETYPE2_FOUND=yes
31320      fi
31321      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE2_FOUND" >&5
31322$as_echo "$FREETYPE2_FOUND" >&6; }
31323    fi
31324    if test "x$FREETYPE2_FOUND" = xno; then
31325
31326pkg_failed=no
31327{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE2" >&5
31328$as_echo_n "checking for FREETYPE2... " >&6; }
31329
31330if test -n "$FREETYPE2_CFLAGS"; then
31331    pkg_cv_FREETYPE2_CFLAGS="$FREETYPE2_CFLAGS"
31332 elif test -n "$PKG_CONFIG"; then
31333    if test -n "$PKG_CONFIG" && \
31334    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
31335  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
31336  ac_status=$?
31337  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31338  test $ac_status = 0; }; then
31339  pkg_cv_FREETYPE2_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
31340else
31341  pkg_failed=yes
31342fi
31343 else
31344    pkg_failed=untried
31345fi
31346if test -n "$FREETYPE2_LIBS"; then
31347    pkg_cv_FREETYPE2_LIBS="$FREETYPE2_LIBS"
31348 elif test -n "$PKG_CONFIG"; then
31349    if test -n "$PKG_CONFIG" && \
31350    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
31351  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
31352  ac_status=$?
31353  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31354  test $ac_status = 0; }; then
31355  pkg_cv_FREETYPE2_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
31356else
31357  pkg_failed=yes
31358fi
31359 else
31360    pkg_failed=untried
31361fi
31362
31363
31364
31365if test $pkg_failed = yes; then
31366
31367if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
31368        _pkg_short_errors_supported=yes
31369else
31370        _pkg_short_errors_supported=no
31371fi
31372        if test $_pkg_short_errors_supported = yes; then
31373	        FREETYPE2_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
31374        else
31375	        FREETYPE2_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
31376        fi
31377	# Put the nasty error message in config.log where it belongs
31378	echo "$FREETYPE2_PKG_ERRORS" >&5
31379
31380	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31381$as_echo "no" >&6; }
31382                FREETYPE2_FOUND=no
31383elif test $pkg_failed = untried; then
31384	FREETYPE2_FOUND=no
31385else
31386	FREETYPE2_CFLAGS=$pkg_cv_FREETYPE2_CFLAGS
31387	FREETYPE2_LIBS=$pkg_cv_FREETYPE2_LIBS
31388        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31389$as_echo "yes" >&6; }
31390	FREETYPE2_FOUND=yes
31391fi
31392      # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
31393      FREETYPE2_LIBS=`$ECHO $FREETYPE2_LIBS | $SED 's/-lz//g'`
31394      USING_SYSTEM_FT_LIB=true
31395      # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
31396      if test "x$FREETYPE2_FOUND" = xyes && test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
31397        FREETYPE2_LIBS=`$ECHO $FREETYPE2_LIBS | $SED 's?/lib?/lib/amd64?g'`
31398      fi
31399    fi
31400    if test "x$FREETYPE2_FOUND" = xno; then
31401      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype in some standard locations" >&5
31402$as_echo_n "checking for freetype in some standard locations... " >&6; }
31403
31404      if test -s $SYS_ROOT/usr/X11/include/ft2build.h && test -d $SYS_ROOT/usr/X11/include/freetype2/freetype; then
31405        DEFAULT_FREETYPE_CFLAGS="-I$SYS_ROOT/usr/X11/include/freetype2 -I$SYS_ROOT/usr/X11/include"
31406        DEFAULT_FREETYPE_LIBS="-L$SYS_ROOT/usr/X11/lib -lfreetype"
31407      fi
31408      if test -s $SYS_ROOT/usr/include/ft2build.h && test -d $SYS_ROOT/usr/include/freetype2/freetype; then
31409        DEFAULT_FREETYPE_CFLAGS="-I$SYS_ROOT/usr/include/freetype2"
31410        DEFAULT_FREETYPE_LIBS="-lfreetype"
31411      fi
31412
31413      PREV_CXXCFLAGS="$CXXFLAGS"
31414      PREV_LDFLAGS="$LDFLAGS"
31415      CXXFLAGS="$CXXFLAGS $DEFAULT_FREETYPE_CFLAGS"
31416      LDFLAGS="$LDFLAGS $DEFAULT_FREETYPE_LIBS"
31417      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31418/* end confdefs.h.  */
31419
31420            #include<ft2build.h>
31421            #include FT_FREETYPE_H
31422            int main() { return 0; }
31423
31424_ACEOF
31425if ac_fn_cxx_try_link "$LINENO"; then :
31426
31427            # Yes, the default cflags and libs did the trick.
31428            FREETYPE2_FOUND=yes
31429            FREETYPE2_CFLAGS="$DEFAULT_FREETYPE_CFLAGS"
31430            FREETYPE2_LIBS="$DEFAULT_FREETYPE_LIBS"
31431
31432else
31433
31434            FREETYPE2_FOUND=no
31435
31436
31437fi
31438rm -f core conftest.err conftest.$ac_objext \
31439    conftest$ac_exeext conftest.$ac_ext
31440      CXXCFLAGS="$PREV_CXXFLAGS"
31441      LDFLAGS="$PREV_LDFLAGS"
31442      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE2_FOUND" >&5
31443$as_echo "$FREETYPE2_FOUND" >&6; }
31444      USING_SYSTEM_FT_LIB=true
31445    fi
31446    if test "x$FREETYPE2_FOUND" = xno; then
31447
31448  # Print a helpful message on how to acquire the necessary build dependency.
31449  # freetype2 is the help tag: freetyp2, cups, pulse, alsa etc
31450  MISSING_DEPENDENCY=freetype2
31451  PKGHANDLER_COMMAND=
31452
31453  case $PKGHANDLER in
31454    apt-get)
31455      apt_help     $MISSING_DEPENDENCY ;;
31456    yum)
31457      yum_help     $MISSING_DEPENDENCY ;;
31458    port)
31459      port_help    $MISSING_DEPENDENCY ;;
31460    pkgutil)
31461      pkgutil_help $MISSING_DEPENDENCY ;;
31462    pkgadd)
31463      pkgadd_help  $MISSING_DEPENDENCY ;;
31464    * )
31465      break ;;
31466  esac
31467
31468  if test "x$PKGHANDLER_COMMAND" != x; then
31469    HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
31470  fi
31471
31472      as_fn_error $? "Could not find freetype2! $HELP_MSG " "$LINENO" 5
31473    fi
31474
31475    if test "x$OPENJDK_TARGET_OS" != xwindows; then
31476      # AC_CHECK_LIB does not support use of cl.exe
31477      PREV_LDFLAGS="$LDFLAGS"
31478      LDFLAGS="$FREETYPE2_LIBS"
31479      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FT_Init_FreeType in -lfreetype" >&5
31480$as_echo_n "checking for FT_Init_FreeType in -lfreetype... " >&6; }
31481if ${ac_cv_lib_freetype_FT_Init_FreeType+:} false; then :
31482  $as_echo_n "(cached) " >&6
31483else
31484  ac_check_lib_save_LIBS=$LIBS
31485LIBS="-lfreetype  $LIBS"
31486cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31487/* end confdefs.h.  */
31488
31489/* Override any GCC internal prototype to avoid an error.
31490   Use char because int might match the return type of a GCC
31491   builtin and then its argument prototype would still apply.  */
31492#ifdef __cplusplus
31493extern "C"
31494#endif
31495char FT_Init_FreeType ();
31496int
31497main ()
31498{
31499return FT_Init_FreeType ();
31500  ;
31501  return 0;
31502}
31503_ACEOF
31504if ac_fn_cxx_try_link "$LINENO"; then :
31505  ac_cv_lib_freetype_FT_Init_FreeType=yes
31506else
31507  ac_cv_lib_freetype_FT_Init_FreeType=no
31508fi
31509rm -f core conftest.err conftest.$ac_objext \
31510    conftest$ac_exeext conftest.$ac_ext
31511LIBS=$ac_check_lib_save_LIBS
31512fi
31513{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_freetype_FT_Init_FreeType" >&5
31514$as_echo "$ac_cv_lib_freetype_FT_Init_FreeType" >&6; }
31515if test "x$ac_cv_lib_freetype_FT_Init_FreeType" = xyes; then :
31516  FREETYPE2_FOUND=true
31517else
31518  as_fn_error $? "Could not find freetype2! $HELP_MSG " "$LINENO" 5
31519fi
31520
31521      LDFLAGS="$PREV_LDFLAGS"
31522    fi
31523  fi
31524
31525
31526
31527
31528
31529
31530
31531
31532  ###############################################################################
31533  #
31534  # Check for alsa headers and libraries. Used on Linux/GNU systems.
31535  #
31536
31537# Check whether --with-alsa was given.
31538if test "${with_alsa+set}" = set; then :
31539  withval=$with_alsa;
31540fi
31541
31542
31543# Check whether --with-alsa-include was given.
31544if test "${with_alsa_include+set}" = set; then :
31545  withval=$with_alsa_include;
31546fi
31547
31548
31549# Check whether --with-alsa-lib was given.
31550if test "${with_alsa_lib+set}" = set; then :
31551  withval=$with_alsa_lib;
31552fi
31553
31554
31555  if test "x$ALSA_NOT_NEEDED" = xyes; then
31556    if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then
31557      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa is ignored" >&5
31558$as_echo "$as_me: WARNING: alsa not used, so --with-alsa is ignored" >&2;}
31559    fi
31560    ALSA_CFLAGS=
31561    ALSA_LIBS=
31562  else
31563    ALSA_FOUND=no
31564
31565    if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
31566      as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
31567    fi
31568
31569    if test "x${with_alsa}" != x; then
31570      ALSA_LIBS="-L${with_alsa}/lib -lalsa"
31571      ALSA_CFLAGS="-I${with_alsa}/include"
31572      ALSA_FOUND=yes
31573    fi
31574    if test "x${with_alsa_include}" != x; then
31575      ALSA_CFLAGS="-I${with_alsa_include}"
31576      ALSA_FOUND=yes
31577    fi
31578    if test "x${with_alsa_lib}" != x; then
31579      ALSA_LIBS="-L${with_alsa_lib} -lalsa"
31580      ALSA_FOUND=yes
31581    fi
31582    if test "x$ALSA_FOUND" = xno; then
31583
31584
31585  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
31586    # Source the builddeps file again, to make sure it uses the latest variables!
31587    . $builddepsfile
31588    # Look for a target and build machine specific resource!
31589    eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
31590    if test "x$resource" = x; then
31591      # Ok, lets instead look for a target specific resource
31592      eval resource=\${builddep_alsa_TARGET_${rewritten_target_var}}
31593    fi
31594    if test "x$resource" = x; then
31595      # Ok, lets instead look for a build specific resource
31596      eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}}
31597    fi
31598    if test "x$resource" = x; then
31599      # Ok, lets instead look for a generic resource
31600      # (The alsa comes from M4 and not the shell, thus no need for eval here.)
31601      resource=${builddep_alsa}
31602    fi
31603    if test "x$resource" != x; then
31604      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for alsa" >&5
31605$as_echo "$as_me: Using builddeps $resource for alsa" >&6;}
31606      # If the resource in the builddeps.conf file is an existing directory,
31607      # for example /java/linux/cups
31608      if test -d ${resource}; then
31609        depdir=${resource}
31610      else
31611
31612  # alsa is for example mymodule
31613  # $resource is for example libs/general/libmymod_1_2_3.zip
31614  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
31615  # $with_builddeps_dir is for example /localhome/builddeps
31616  # depdir is the name of the variable into which we store the depdir, eg MYMOD
31617  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
31618  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
31619  filename=`basename $resource`
31620  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
31621  filebase=${filename%%.*}
31622  extension=${filename#*.}
31623  installdir=$with_builddeps_dir/$filebase
31624  if test ! -f $installdir/$filename.unpacked; then
31625    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&5
31626$as_echo "$as_me: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&6;}
31627    if test ! -d $installdir; then
31628      mkdir -p $installdir
31629    fi
31630    if test ! -d $installdir; then
31631      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
31632    fi
31633    tmpfile=`mktemp $installdir/alsa.XXXXXXXXX`
31634    touch $tmpfile
31635    if test ! -f $tmpfile; then
31636      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
31637    fi
31638
31639  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
31640  # $tmpfile is the local file name for the downloaded file.
31641  VALID_TOOL=no
31642  if test "x$BDEPS_FTP" = xwget; then
31643    VALID_TOOL=yes
31644    wget -O $tmpfile $with_builddeps_server/$resource
31645  fi
31646  if test "x$BDEPS_FTP" = xlftp; then
31647    VALID_TOOL=yes
31648    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
31649  fi
31650  if test "x$BDEPS_FTP" = xftp; then
31651    VALID_TOOL=yes
31652    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
31653    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
31654    FTPUSERPWD=${FTPSERVER%%@*}
31655    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
31656      FTPUSER=${userpwd%%:*}
31657      FTPPWD=${userpwd#*@}
31658      FTPSERVER=${FTPSERVER#*@}
31659    else
31660      FTPUSER=ftp
31661      FTPPWD=ftp
31662    fi
31663    # the "pass" command does not work on some
31664    # ftp clients (read ftp.exe) but if it works,
31665    # passive mode is better!
31666    ( \
31667        echo "user $FTPUSER $FTPPWD"        ; \
31668        echo "pass"                         ; \
31669        echo "bin"                          ; \
31670        echo "get $FTPPATH $tmpfile"              ; \
31671    ) | ftp -in $FTPSERVER
31672  fi
31673  if test "x$VALID_TOOL" != xyes; then
31674    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
31675  fi
31676
31677    mv $tmpfile $installdir/$filename
31678    if test ! -s $installdir/$filename; then
31679      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
31680    fi
31681    case "$extension" in
31682      zip)  echo "Unzipping $installdir/$filename..."
31683        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
31684        ;;
31685      tar.gz) echo "Untaring $installdir/$filename..."
31686        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31687        ;;
31688      tgz) echo "Untaring $installdir/$filename..."
31689        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31690        ;;
31691      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
31692        ;;
31693    esac
31694  fi
31695  if test -f $installdir/$filename.unpacked; then
31696    depdir=$installdir
31697  fi
31698
31699      fi
31700      # Source the builddeps file again, because in the previous command, the depdir
31701      # was updated to point at the current build dependency install directory.
31702      . $builddepsfile
31703      # Now extract variables from the builddeps.conf files.
31704      theroot=${builddep_alsa_ROOT}
31705      thecflags=${builddep_alsa_CFLAGS}
31706      thelibs=${builddep_alsa_LIBS}
31707      if test "x$depdir" = x; then
31708        as_fn_error $? "Could not download build dependency alsa" "$LINENO" 5
31709      fi
31710      ALSA=$depdir
31711      if test "x$theroot" != x; then
31712        ALSA="$theroot"
31713      fi
31714      if test "x$thecflags" != x; then
31715        ALSA_CFLAGS="$thecflags"
31716      fi
31717      if test "x$thelibs" != x; then
31718        ALSA_LIBS="$thelibs"
31719      fi
31720      ALSA_FOUND=yes
31721      else ALSA_FOUND=no
31722
31723    fi
31724    else ALSA_FOUND=no
31725
31726  fi
31727
31728    fi
31729    if test "x$ALSA_FOUND" = xno; then
31730
31731pkg_failed=no
31732{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
31733$as_echo_n "checking for ALSA... " >&6; }
31734
31735if test -n "$ALSA_CFLAGS"; then
31736    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
31737 elif test -n "$PKG_CONFIG"; then
31738    if test -n "$PKG_CONFIG" && \
31739    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
31740  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
31741  ac_status=$?
31742  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31743  test $ac_status = 0; }; then
31744  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
31745else
31746  pkg_failed=yes
31747fi
31748 else
31749    pkg_failed=untried
31750fi
31751if test -n "$ALSA_LIBS"; then
31752    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
31753 elif test -n "$PKG_CONFIG"; then
31754    if test -n "$PKG_CONFIG" && \
31755    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
31756  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
31757  ac_status=$?
31758  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31759  test $ac_status = 0; }; then
31760  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
31761else
31762  pkg_failed=yes
31763fi
31764 else
31765    pkg_failed=untried
31766fi
31767
31768
31769
31770if test $pkg_failed = yes; then
31771
31772if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
31773        _pkg_short_errors_supported=yes
31774else
31775        _pkg_short_errors_supported=no
31776fi
31777        if test $_pkg_short_errors_supported = yes; then
31778	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
31779        else
31780	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
31781        fi
31782	# Put the nasty error message in config.log where it belongs
31783	echo "$ALSA_PKG_ERRORS" >&5
31784
31785	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31786$as_echo "no" >&6; }
31787                ALSA_FOUND=no
31788elif test $pkg_failed = untried; then
31789	ALSA_FOUND=no
31790else
31791	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
31792	ALSA_LIBS=$pkg_cv_ALSA_LIBS
31793        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31794$as_echo "yes" >&6; }
31795	ALSA_FOUND=yes
31796fi
31797    fi
31798    if test "x$ALSA_FOUND" = xno; then
31799      for ac_header in alsa/asoundlib.h
31800do :
31801  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
31802if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
31803  cat >>confdefs.h <<_ACEOF
31804#define HAVE_ALSA_ASOUNDLIB_H 1
31805_ACEOF
31806
31807            ALSA_FOUND=yes
31808            ALSA_CFLAGS=-Iignoreme
31809            ALSA_LIBS=-lasound
31810            DEFAULT_ALSA=yes
31811
31812else
31813  ALSA_FOUND=no
31814fi
31815
31816done
31817
31818    fi
31819    if test "x$ALSA_FOUND" = xno; then
31820
31821  # Print a helpful message on how to acquire the necessary build dependency.
31822  # alsa is the help tag: freetyp2, cups, pulse, alsa etc
31823  MISSING_DEPENDENCY=alsa
31824  PKGHANDLER_COMMAND=
31825
31826  case $PKGHANDLER in
31827    apt-get)
31828      apt_help     $MISSING_DEPENDENCY ;;
31829    yum)
31830      yum_help     $MISSING_DEPENDENCY ;;
31831    port)
31832      port_help    $MISSING_DEPENDENCY ;;
31833    pkgutil)
31834      pkgutil_help $MISSING_DEPENDENCY ;;
31835    pkgadd)
31836      pkgadd_help  $MISSING_DEPENDENCY ;;
31837    * )
31838      break ;;
31839  esac
31840
31841  if test "x$PKGHANDLER_COMMAND" != x; then
31842    HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
31843  fi
31844
31845      as_fn_error $? "Could not find alsa! $HELP_MSG " "$LINENO" 5
31846    fi
31847  fi
31848
31849
31850
31851
31852
31853
31854  ###############################################################################
31855  #
31856  # Check for the jpeg library
31857  #
31858
31859  USE_EXTERNAL_LIBJPEG=true
31860  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -ljpeg" >&5
31861$as_echo_n "checking for main in -ljpeg... " >&6; }
31862if ${ac_cv_lib_jpeg_main+:} false; then :
31863  $as_echo_n "(cached) " >&6
31864else
31865  ac_check_lib_save_LIBS=$LIBS
31866LIBS="-ljpeg  $LIBS"
31867cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31868/* end confdefs.h.  */
31869
31870
31871int
31872main ()
31873{
31874return main ();
31875  ;
31876  return 0;
31877}
31878_ACEOF
31879if ac_fn_cxx_try_link "$LINENO"; then :
31880  ac_cv_lib_jpeg_main=yes
31881else
31882  ac_cv_lib_jpeg_main=no
31883fi
31884rm -f core conftest.err conftest.$ac_objext \
31885    conftest$ac_exeext conftest.$ac_ext
31886LIBS=$ac_check_lib_save_LIBS
31887fi
31888{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_main" >&5
31889$as_echo "$ac_cv_lib_jpeg_main" >&6; }
31890if test "x$ac_cv_lib_jpeg_main" = xyes; then :
31891  cat >>confdefs.h <<_ACEOF
31892#define HAVE_LIBJPEG 1
31893_ACEOF
31894
31895  LIBS="-ljpeg $LIBS"
31896
31897else
31898   USE_EXTERNAL_LIBJPEG=false
31899      { $as_echo "$as_me:${as_lineno-$LINENO}: Will use jpeg decoder bundled with the OpenJDK source" >&5
31900$as_echo "$as_me: Will use jpeg decoder bundled with the OpenJDK source" >&6;}
31901
31902fi
31903
31904
31905
31906  ###############################################################################
31907  #
31908  # Check for the gif library
31909  #
31910
31911
31912# Check whether --with-giflib was given.
31913if test "${with_giflib+set}" = set; then :
31914  withval=$with_giflib;
31915fi
31916
31917
31918
31919  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
31920$as_echo_n "checking for which giflib to use... " >&6; }
31921
31922  # default is bundled
31923  DEFAULT_GIFLIB=bundled
31924
31925  #
31926  # if user didn't specify, use DEFAULT_GIFLIB
31927  #
31928  if test "x${with_giflib}" = "x"; then
31929    with_giflib=${DEFAULT_GIFLIB}
31930  fi
31931
31932  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
31933$as_echo "${with_giflib}" >&6; }
31934
31935  if test "x${with_giflib}" = "xbundled"; then
31936    USE_EXTERNAL_LIBGIF=false
31937  elif test "x${with_giflib}" = "xsystem"; then
31938    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
31939if test "x$ac_cv_header_gif_lib_h" = xyes; then :
31940
31941else
31942   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
31943fi
31944
31945
31946    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
31947$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
31948if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
31949  $as_echo_n "(cached) " >&6
31950else
31951  ac_check_lib_save_LIBS=$LIBS
31952LIBS="-lgif  $LIBS"
31953cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31954/* end confdefs.h.  */
31955
31956/* Override any GCC internal prototype to avoid an error.
31957   Use char because int might match the return type of a GCC
31958   builtin and then its argument prototype would still apply.  */
31959#ifdef __cplusplus
31960extern "C"
31961#endif
31962char DGifGetCode ();
31963int
31964main ()
31965{
31966return DGifGetCode ();
31967  ;
31968  return 0;
31969}
31970_ACEOF
31971if ac_fn_cxx_try_link "$LINENO"; then :
31972  ac_cv_lib_gif_DGifGetCode=yes
31973else
31974  ac_cv_lib_gif_DGifGetCode=no
31975fi
31976rm -f core conftest.err conftest.$ac_objext \
31977    conftest$ac_exeext conftest.$ac_ext
31978LIBS=$ac_check_lib_save_LIBS
31979fi
31980{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
31981$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
31982if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
31983  cat >>confdefs.h <<_ACEOF
31984#define HAVE_LIBGIF 1
31985_ACEOF
31986
31987  LIBS="-lgif $LIBS"
31988
31989else
31990   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
31991fi
31992
31993
31994    USE_EXTERNAL_LIBGIF=true
31995  else
31996    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
31997  fi
31998
31999
32000  ###############################################################################
32001  #
32002  # Check for the zlib library
32003  #
32004
32005
32006# Check whether --with-zlib was given.
32007if test "${with_zlib+set}" = set; then :
32008  withval=$with_zlib;
32009fi
32010
32011
32012  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
32013$as_echo_n "checking for compress in -lz... " >&6; }
32014if ${ac_cv_lib_z_compress+:} false; then :
32015  $as_echo_n "(cached) " >&6
32016else
32017  ac_check_lib_save_LIBS=$LIBS
32018LIBS="-lz  $LIBS"
32019cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32020/* end confdefs.h.  */
32021
32022/* Override any GCC internal prototype to avoid an error.
32023   Use char because int might match the return type of a GCC
32024   builtin and then its argument prototype would still apply.  */
32025#ifdef __cplusplus
32026extern "C"
32027#endif
32028char compress ();
32029int
32030main ()
32031{
32032return compress ();
32033  ;
32034  return 0;
32035}
32036_ACEOF
32037if ac_fn_cxx_try_link "$LINENO"; then :
32038  ac_cv_lib_z_compress=yes
32039else
32040  ac_cv_lib_z_compress=no
32041fi
32042rm -f core conftest.err conftest.$ac_objext \
32043    conftest$ac_exeext conftest.$ac_ext
32044LIBS=$ac_check_lib_save_LIBS
32045fi
32046{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
32047$as_echo "$ac_cv_lib_z_compress" >&6; }
32048if test "x$ac_cv_lib_z_compress" = xyes; then :
32049   ZLIB_FOUND=yes
32050else
32051   ZLIB_FOUND=no
32052fi
32053
32054
32055  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
32056$as_echo_n "checking for which zlib to use... " >&6; }
32057
32058  DEFAULT_ZLIB=bundled
32059  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
32060    #
32061    # On macosx default is system...on others default is
32062    #
32063    DEFAULT_ZLIB=system
32064  fi
32065
32066  if test "x${ZLIB_FOUND}" != "xyes"; then
32067    #
32068    # If we don't find any system...set default to bundled
32069    #
32070    DEFAULT_ZLIB=bundled
32071  fi
32072
32073  #
32074  # If user didn't specify, use DEFAULT_ZLIB
32075  #
32076  if test "x${with_zlib}" = "x"; then
32077    with_zlib=${DEFAULT_ZLIB}
32078  fi
32079
32080  if test "x${with_zlib}" = "xbundled"; then
32081    USE_EXTERNAL_LIBZ=false
32082    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
32083$as_echo "bundled" >&6; }
32084  elif test "x${with_zlib}" = "xsystem"; then
32085    if test "x${ZLIB_FOUND}" = "xyes"; then
32086      USE_EXTERNAL_LIBZ=true
32087      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
32088$as_echo "system" >&6; }
32089    else
32090      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
32091$as_echo "system not found" >&6; }
32092      as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
32093    fi
32094  else
32095    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
32096  fi
32097
32098
32099
32100  ###############################################################################
32101  LIBZIP_CAN_USE_MMAP=true
32102
32103
32104
32105  ###############################################################################
32106  #
32107  # Check if altzone exists in time.h
32108  #
32109
32110  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32111/* end confdefs.h.  */
32112#include <time.h>
32113int
32114main ()
32115{
32116return (int)altzone;
32117  ;
32118  return 0;
32119}
32120_ACEOF
32121if ac_fn_cxx_try_link "$LINENO"; then :
32122  has_altzone=yes
32123else
32124  has_altzone=no
32125fi
32126rm -f core conftest.err conftest.$ac_objext \
32127    conftest$ac_exeext conftest.$ac_ext
32128  if test "x$has_altzone" = xyes; then
32129
32130$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
32131
32132  fi
32133
32134  ###############################################################################
32135  #
32136  # Check the maths library
32137  #
32138
32139  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
32140$as_echo_n "checking for cos in -lm... " >&6; }
32141if ${ac_cv_lib_m_cos+:} false; then :
32142  $as_echo_n "(cached) " >&6
32143else
32144  ac_check_lib_save_LIBS=$LIBS
32145LIBS="-lm  $LIBS"
32146cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32147/* end confdefs.h.  */
32148
32149/* Override any GCC internal prototype to avoid an error.
32150   Use char because int might match the return type of a GCC
32151   builtin and then its argument prototype would still apply.  */
32152#ifdef __cplusplus
32153extern "C"
32154#endif
32155char cos ();
32156int
32157main ()
32158{
32159return cos ();
32160  ;
32161  return 0;
32162}
32163_ACEOF
32164if ac_fn_cxx_try_link "$LINENO"; then :
32165  ac_cv_lib_m_cos=yes
32166else
32167  ac_cv_lib_m_cos=no
32168fi
32169rm -f core conftest.err conftest.$ac_objext \
32170    conftest$ac_exeext conftest.$ac_ext
32171LIBS=$ac_check_lib_save_LIBS
32172fi
32173{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
32174$as_echo "$ac_cv_lib_m_cos" >&6; }
32175if test "x$ac_cv_lib_m_cos" = xyes; then :
32176  cat >>confdefs.h <<_ACEOF
32177#define HAVE_LIBM 1
32178_ACEOF
32179
32180  LIBS="-lm $LIBS"
32181
32182else
32183
32184        { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
32185$as_echo "$as_me: Maths library was not found" >&6;}
32186
32187
32188fi
32189
32190
32191
32192  ###############################################################################
32193  #
32194  # Check for libdl.so
32195
32196  save_LIBS="$LIBS"
32197  LIBS=""
32198  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
32199$as_echo_n "checking for dlopen in -ldl... " >&6; }
32200if ${ac_cv_lib_dl_dlopen+:} false; then :
32201  $as_echo_n "(cached) " >&6
32202else
32203  ac_check_lib_save_LIBS=$LIBS
32204LIBS="-ldl  $LIBS"
32205cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32206/* end confdefs.h.  */
32207
32208/* Override any GCC internal prototype to avoid an error.
32209   Use char because int might match the return type of a GCC
32210   builtin and then its argument prototype would still apply.  */
32211#ifdef __cplusplus
32212extern "C"
32213#endif
32214char dlopen ();
32215int
32216main ()
32217{
32218return dlopen ();
32219  ;
32220  return 0;
32221}
32222_ACEOF
32223if ac_fn_cxx_try_link "$LINENO"; then :
32224  ac_cv_lib_dl_dlopen=yes
32225else
32226  ac_cv_lib_dl_dlopen=no
32227fi
32228rm -f core conftest.err conftest.$ac_objext \
32229    conftest$ac_exeext conftest.$ac_ext
32230LIBS=$ac_check_lib_save_LIBS
32231fi
32232{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
32233$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
32234if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
32235  cat >>confdefs.h <<_ACEOF
32236#define HAVE_LIBDL 1
32237_ACEOF
32238
32239  LIBS="-ldl $LIBS"
32240
32241fi
32242
32243  LIBDL="$LIBS"
32244
32245  LIBS="$save_LIBS"
32246
32247
32248  ###############################################################################
32249  #
32250  # statically link libstdc++ before C++ ABI is stablized on Linux unless
32251  # dynamic build is configured on command line.
32252  #
32253
32254# Check whether --with-stdc++lib was given.
32255if test "${with_stdc__lib+set}" = set; then :
32256  withval=$with_stdc__lib;
32257        if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
32258                && test "x$with_stdc__lib" != xdefault; then
32259          as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
32260        fi
32261
32262else
32263  with_stdc__lib=default
32264
32265fi
32266
32267
32268  if test "x$OPENJDK_TARGET_OS" = xlinux; then
32269    # Test if -lstdc++ works.
32270    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
32271$as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
32272    ac_ext=cpp
32273ac_cpp='$CXXCPP $CPPFLAGS'
32274ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32275ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32276ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32277
32278    OLD_CXXFLAGS="$CXXFLAGS"
32279    CXXFLAGS="$CXXFLAGS -lstdc++"
32280    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32281/* end confdefs.h.  */
32282
32283int
32284main ()
32285{
32286return 0;
32287  ;
32288  return 0;
32289}
32290_ACEOF
32291if ac_fn_cxx_try_link "$LINENO"; then :
32292  has_dynamic_libstdcxx=yes
32293else
32294  has_dynamic_libstdcxx=no
32295fi
32296rm -f core conftest.err conftest.$ac_objext \
32297    conftest$ac_exeext conftest.$ac_ext
32298    CXXFLAGS="$OLD_CXXFLAGS"
32299    ac_ext=cpp
32300ac_cpp='$CXXCPP $CPPFLAGS'
32301ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32302ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32303ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32304
32305    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
32306$as_echo "$has_dynamic_libstdcxx" >&6; }
32307
32308    # Test if stdc++ can be linked statically.
32309    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
32310$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
32311    STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
32312    ac_ext=cpp
32313ac_cpp='$CXXCPP $CPPFLAGS'
32314ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32315ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32316ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32317
32318    OLD_LIBS="$LIBS"
32319    OLD_CXX="$CXX"
32320    LIBS="$STATIC_STDCXX_FLAGS"
32321    CXX="$CC"
32322    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32323/* end confdefs.h.  */
32324
32325int
32326main ()
32327{
32328return 0;
32329  ;
32330  return 0;
32331}
32332_ACEOF
32333if ac_fn_cxx_try_link "$LINENO"; then :
32334  has_static_libstdcxx=yes
32335else
32336  has_static_libstdcxx=no
32337fi
32338rm -f core conftest.err conftest.$ac_objext \
32339    conftest$ac_exeext conftest.$ac_ext
32340    LIBS="$OLD_LIBS"
32341    CXX="$OLD_CXX"
32342    ac_ext=cpp
32343ac_cpp='$CXXCPP $CPPFLAGS'
32344ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32345ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32346ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32347
32348    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
32349$as_echo "$has_static_libstdcxx" >&6; }
32350
32351    if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
32352      as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
32353    fi
32354
32355    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
32356      as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
32357    fi
32358
32359    if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
32360      as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
32361    fi
32362
32363    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
32364$as_echo_n "checking how to link with libstdc++... " >&6; }
32365    # If dynamic was requested, it's available since it would fail above otherwise.
32366    # If dynamic wasn't requested, go with static unless it isn't available.
32367    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
32368      LIBCXX="$LIBCXX -lstdc++"
32369      LDCXX="$CXX"
32370      STATIC_CXX_SETTING="STATIC_CXX=false"
32371      { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
32372$as_echo "dynamic" >&6; }
32373    else
32374      LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
32375      LDCXX="$CC"
32376      STATIC_CXX_SETTING="STATIC_CXX=true"
32377      { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
32378$as_echo "static" >&6; }
32379    fi
32380  fi
32381
32382
32383  if test "x$JVM_VARIANT_ZERO" = xtrue || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
32384    # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
32385
32386pkg_failed=no
32387{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
32388$as_echo_n "checking for LIBFFI... " >&6; }
32389
32390if test -n "$LIBFFI_CFLAGS"; then
32391    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
32392 elif test -n "$PKG_CONFIG"; then
32393    if test -n "$PKG_CONFIG" && \
32394    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
32395  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
32396  ac_status=$?
32397  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32398  test $ac_status = 0; }; then
32399  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
32400else
32401  pkg_failed=yes
32402fi
32403 else
32404    pkg_failed=untried
32405fi
32406if test -n "$LIBFFI_LIBS"; then
32407    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
32408 elif test -n "$PKG_CONFIG"; then
32409    if test -n "$PKG_CONFIG" && \
32410    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
32411  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
32412  ac_status=$?
32413  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32414  test $ac_status = 0; }; then
32415  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
32416else
32417  pkg_failed=yes
32418fi
32419 else
32420    pkg_failed=untried
32421fi
32422
32423
32424
32425if test $pkg_failed = yes; then
32426
32427if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
32428        _pkg_short_errors_supported=yes
32429else
32430        _pkg_short_errors_supported=no
32431fi
32432        if test $_pkg_short_errors_supported = yes; then
32433	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
32434        else
32435	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
32436        fi
32437	# Put the nasty error message in config.log where it belongs
32438	echo "$LIBFFI_PKG_ERRORS" >&5
32439
32440	as_fn_error $? "Package requirements (libffi) were not met:
32441
32442$LIBFFI_PKG_ERRORS
32443
32444Consider adjusting the PKG_CONFIG_PATH environment variable if you
32445installed software in a non-standard prefix.
32446
32447Alternatively, you may set the environment variables LIBFFI_CFLAGS
32448and LIBFFI_LIBS to avoid the need to call pkg-config.
32449See the pkg-config man page for more details.
32450" "$LINENO" 5
32451elif test $pkg_failed = untried; then
32452	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32453$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32454as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
32455is in your PATH or set the PKG_CONFIG environment variable to the full
32456path to pkg-config.
32457
32458Alternatively, you may set the environment variables LIBFFI_CFLAGS
32459and LIBFFI_LIBS to avoid the need to call pkg-config.
32460See the pkg-config man page for more details.
32461
32462To get pkg-config, see <http://pkg-config.freedesktop.org/>.
32463See \`config.log' for more details" "$LINENO" 5; }
32464else
32465	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
32466	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
32467        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32468$as_echo "yes" >&6; }
32469	:
32470fi
32471
32472  fi
32473
32474  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
32475    # Extract the first word of "llvm-config", so it can be a program name with args.
32476set dummy llvm-config; ac_word=$2
32477{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32478$as_echo_n "checking for $ac_word... " >&6; }
32479if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
32480  $as_echo_n "(cached) " >&6
32481else
32482  if test -n "$LLVM_CONFIG"; then
32483  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
32484else
32485as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32486for as_dir in $PATH
32487do
32488  IFS=$as_save_IFS
32489  test -z "$as_dir" && as_dir=.
32490    for ac_exec_ext in '' $ac_executable_extensions; do
32491  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32492    ac_cv_prog_LLVM_CONFIG="llvm-config"
32493    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32494    break 2
32495  fi
32496done
32497  done
32498IFS=$as_save_IFS
32499
32500fi
32501fi
32502LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
32503if test -n "$LLVM_CONFIG"; then
32504  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
32505$as_echo "$LLVM_CONFIG" >&6; }
32506else
32507  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32508$as_echo "no" >&6; }
32509fi
32510
32511
32512
32513    if test "x$LLVM_CONFIG" != xllvm-config; then
32514      as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
32515    fi
32516
32517    llvm_components="jit mcjit engine nativecodegen native"
32518    unset LLVM_CFLAGS
32519    for flag in $("$LLVM_CONFIG" --cxxflags); do
32520      if echo "${flag}" | grep -q '^-[ID]'; then
32521        if test "${flag}" != "-D_DEBUG" ; then
32522          if test "${LLVM_CFLAGS}" != "" ; then
32523            LLVM_CFLAGS="${LLVM_CFLAGS} "
32524          fi
32525          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
32526        fi
32527      fi
32528    done
32529    llvm_version=$("${LLVM_CONFIG}" --version | sed 's/\.//; s/svn.*//')
32530    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
32531
32532    unset LLVM_LDFLAGS
32533    for flag in $("${LLVM_CONFIG}" --ldflags); do
32534      if echo "${flag}" | grep -q '^-L'; then
32535        if test "${LLVM_LDFLAGS}" != ""; then
32536          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
32537        fi
32538        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
32539      fi
32540    done
32541
32542    unset LLVM_LIBS
32543    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
32544      if echo "${flag}" | grep -q '^-l'; then
32545        if test "${LLVM_LIBS}" != ""; then
32546          LLVM_LIBS="${LLVM_LIBS} "
32547        fi
32548        LLVM_LIBS="${LLVM_LIBS}${flag}"
32549      fi
32550    done
32551
32552
32553
32554
32555  fi
32556
32557  # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
32558  if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$LIBCXX" = x; then
32559    LIBCXX="/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
32560  fi
32561
32562  # TODO better (platform agnostic) test
32563  if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$GCC" = xyes; then
32564    LIBCXX="-lstdc++"
32565  fi
32566
32567
32568
32569
32570# After we have toolchain and the paths to all libraries (needed by msys), we can compile the fixpath helper
32571
32572  # When using cygwin or msys, we need a wrapper binary that renames
32573  # /cygdrive/c/ arguments into c:/ arguments and peeks into
32574  # @files and rewrites these too! This wrapper binary is
32575  # called fixpath.
32576  FIXPATH=
32577  if test "x$OPENJDK_BUILD_OS" = xwindows; then
32578    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
32579$as_echo_n "checking if fixpath can be created... " >&6; }
32580    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
32581    FIXPATH_BIN="$OUTPUT_ROOT/fixpath.exe"
32582    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
32583      FIXPATH_SRC=`$CYGPATH -m $FIXPATH_SRC`
32584      FIXPATH_BIN=`$CYGPATH -m $FIXPATH_BIN`
32585      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
32586      FIXPATH="$OUTPUT_ROOT/fixpath.exe -c"
32587    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
32588      FIXPATH_SRC=`cmd //c echo $FIXPATH_SRC`
32589      FIXPATH_BIN=`cmd //c echo $FIXPATH_BIN`
32590
32591      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
32592      # @ was chosen as separator to minimize risk of other tools messing around with it
32593      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" | tr ' ' '\n' | grep '^/./' | sort | uniq`
32594      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
32595
32596      FIXPATH="$OUTPUT_ROOT/fixpath -m$fixpath_argument_list"
32597    fi
32598    rm -f $OUTPUT_ROOT/fixpath*
32599    cd $OUTPUT_ROOT
32600    $CC $FIXPATH_SRC -Fe$FIXPATH_BIN > $OUTPUT_ROOT/fixpath1.log 2>&1
32601    cd $CURDIR
32602
32603    if test ! -x $OUTPUT_ROOT/fixpath.exe; then
32604      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32605$as_echo "no" >&6; }
32606      cat $OUTPUT_ROOT/fixpath1.log
32607      as_fn_error $? "Could not create $OUTPUT_ROOT/fixpath.exe" "$LINENO" 5
32608    fi
32609    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32610$as_echo "yes" >&6; }
32611    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
32612$as_echo_n "checking if fixpath.exe works... " >&6; }
32613    cd $OUTPUT_ROOT
32614    $FIXPATH $CC $SRC_ROOT/common/src/fixpath.c -Fe$OUTPUT_ROOT/fixpath2.exe > $OUTPUT_ROOT/fixpath2.log 2>&1
32615    cd $CURDIR
32616    if test ! -x $OUTPUT_ROOT/fixpath2.exe; then
32617      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32618$as_echo "no" >&6; }
32619      cat $OUTPUT_ROOT/fixpath2.log
32620      as_fn_error $? "fixpath did not work!" "$LINENO" 5
32621    fi
32622    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32623$as_echo "yes" >&6; }
32624    rm -f $OUTPUT_ROOT/fixpath?.??? $OUTPUT_ROOT/fixpath.obj
32625  fi
32626
32627
32628
32629
32630###############################################################################
32631#
32632# We need to do some final tweaking, when everything else is done.
32633#
32634###############################################################################
32635
32636
32637  HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
32638
32639
32640  # The name of the Service Agent jar.
32641  SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
32642  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
32643    SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
32644  fi
32645
32646
32647
32648    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
32649$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
32650
32651    if test -d "${SRC_ROOT}/jdk/src/share/native/sun/security/ec/impl"; then
32652      ENABLE_INTREE_EC=yes
32653      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32654$as_echo "yes" >&6; }
32655    else
32656      ENABLE_INTREE_EC=no
32657      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32658$as_echo "no" >&6; }
32659    fi
32660
32661
32662
32663
32664###############################################################################
32665#
32666# Configure parts of the build that only affect the build performance,
32667# not the result.
32668#
32669###############################################################################
32670
32671
32672  # How many cores do we have on this build system?
32673
32674# Check whether --with-num-cores was given.
32675if test "${with_num_cores+set}" = set; then :
32676  withval=$with_num_cores;
32677fi
32678
32679  if test "x$with_num_cores" = x; then
32680    # The number of cores were not specified, try to probe them.
32681
32682  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
32683$as_echo_n "checking for number of cores... " >&6; }
32684  NUM_CORES=1
32685  FOUND_CORES=no
32686
32687  if test -f /proc/cpuinfo; then
32688    # Looks like a Linux (or cygwin) system
32689    NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
32690    FOUND_CORES=yes
32691  elif test -x /usr/sbin/psrinfo; then
32692    # Looks like a Solaris system
32693    NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
32694    FOUND_CORES=yes
32695  elif test -x /usr/sbin/system_profiler; then
32696    # Looks like a MacOSX system
32697    NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print $5}'`
32698    FOUND_CORES=yes
32699  elif test -n "$NUMBER_OF_PROCESSORS"; then
32700    # On windows, look in the env
32701    NUM_CORES=$NUMBER_OF_PROCESSORS
32702    FOUND_CORES=yes
32703  fi
32704
32705  if test "x$FOUND_CORES" = xyes; then
32706    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
32707$as_echo "$NUM_CORES" >&6; }
32708  else
32709    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
32710$as_echo "could not detect number of cores, defaulting to 1" >&6; }
32711    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
32712$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
32713  fi
32714
32715  else
32716    NUM_CORES=$with_num_cores
32717  fi
32718
32719
32720
32721  # How much memory do we have on this build system?
32722
32723# Check whether --with-memory-size was given.
32724if test "${with_memory_size+set}" = set; then :
32725  withval=$with_memory_size;
32726fi
32727
32728  if test "x$with_memory_size" = x; then
32729    # The memory size was not specified, try to probe it.
32730
32731  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
32732$as_echo_n "checking for memory size... " >&6; }
32733  # Default to 1024 MB
32734  MEMORY_SIZE=1024
32735  FOUND_MEM=no
32736
32737  if test -f /proc/meminfo; then
32738    # Looks like a Linux (or cygwin) system
32739    MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
32740    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
32741    FOUND_MEM=yes
32742  elif test -x /usr/sbin/prtconf; then
32743    # Looks like a Solaris system
32744    MEMORY_SIZE=`/usr/sbin/prtconf | grep "Memory size" | awk '{ print $3 }'`
32745    FOUND_MEM=yes
32746  elif test -x /usr/sbin/system_profiler; then
32747    # Looks like a MacOSX system
32748    MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print $2}'`
32749    MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
32750    FOUND_MEM=yes
32751  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
32752    # Windows, but without cygwin
32753    MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
32754    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
32755    FOUND_MEM=yes
32756  fi
32757
32758  if test "x$FOUND_MEM" = xyes; then
32759    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
32760$as_echo "$MEMORY_SIZE MB" >&6; }
32761  else
32762    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to 1024 MB" >&5
32763$as_echo "could not detect memory size, defaulting to 1024 MB" >&6; }
32764    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
32765$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
32766  fi
32767
32768  else
32769    MEMORY_SIZE=$with_memory_size
32770  fi
32771
32772
32773
32774  # Provide a decent default number of parallel jobs for make depending on
32775  # number of cores, amount of memory and machine architecture.
32776
32777# Check whether --with-jobs was given.
32778if test "${with_jobs+set}" = set; then :
32779  withval=$with_jobs;
32780fi
32781
32782  if test "x$with_jobs" = x; then
32783    # Number of jobs was not specified, calculate.
32784    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
32785$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
32786    # Approximate memory in GB, rounding up a bit.
32787    memory_gb=`expr $MEMORY_SIZE / 1100`
32788    # Pick the lowest of memory in gb and number of cores.
32789    if test "$memory_gb" -lt "$NUM_CORES"; then
32790      JOBS="$memory_gb"
32791    else
32792      JOBS="$NUM_CORES"
32793      # On bigger machines, leave some room for other processes to run
32794      if test "$JOBS" -gt "4"; then
32795        JOBS=`expr $JOBS '*' 90 / 100`
32796      fi
32797    fi
32798    # Cap number of jobs to 16
32799    if test "$JOBS" -gt "16"; then
32800      JOBS=16
32801    fi
32802    if test "$JOBS" -eq "0"; then
32803      JOBS=1
32804    fi
32805    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
32806$as_echo "$JOBS" >&6; }
32807  else
32808    JOBS=$with_jobs
32809  fi
32810
32811
32812
32813# Setup smart javac (after cores and memory have been setup)
32814
32815
32816# Check whether --with-sjavac-server-java was given.
32817if test "${with_sjavac_server_java+set}" = set; then :
32818  withval=$with_sjavac_server_java;
32819fi
32820
32821
32822  if test "x$with_sjavac_server_java" != x; then
32823    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
32824    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
32825    if test "x$FOUND_VERSION" = x; then
32826      as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
32827    fi
32828  else
32829    SJAVAC_SERVER_JAVA=""
32830    # Hotspot specific options.
32831
32832  $ECHO "Check if jvm arg is ok: -verbosegc" >&5
32833  $ECHO "Command: $JAVA -verbosegc -version" >&5
32834  OUTPUT=`$JAVA -verbosegc -version 2>&1`
32835  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
32836  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
32837  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32838    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -verbosegc"
32839    JVM_ARG_OK=true
32840  else
32841    $ECHO "Arg failed:" >&5
32842    $ECHO "$OUTPUT" >&5
32843    JVM_ARG_OK=false
32844  fi
32845
32846    # JRockit specific options.
32847
32848  $ECHO "Check if jvm arg is ok: -Xverbose:gc" >&5
32849  $ECHO "Command: $JAVA -Xverbose:gc -version" >&5
32850  OUTPUT=`$JAVA -Xverbose:gc -version 2>&1`
32851  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
32852  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
32853  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32854    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xverbose:gc"
32855    JVM_ARG_OK=true
32856  else
32857    $ECHO "Arg failed:" >&5
32858    $ECHO "$OUTPUT" >&5
32859    JVM_ARG_OK=false
32860  fi
32861
32862    SJAVAC_SERVER_JAVA="$JAVA $SJAVAC_SERVER_JAVA"
32863  fi
32864
32865
32866  if test "$MEMORY_SIZE" -gt "2500"; then
32867
32868  $ECHO "Check if jvm arg is ok: -d64" >&5
32869  $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
32870  OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
32871  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
32872  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
32873  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32874    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
32875    JVM_ARG_OK=true
32876  else
32877    $ECHO "Arg failed:" >&5
32878    $ECHO "$OUTPUT" >&5
32879    JVM_ARG_OK=false
32880  fi
32881
32882    if test "$JVM_ARG_OK" = true; then
32883      JVM_64BIT=true
32884      JVM_ARG_OK=false
32885    fi
32886  fi
32887
32888  if test "$JVM_64BIT" = true; then
32889    if test "$MEMORY_SIZE" -gt "17000"; then
32890
32891  $ECHO "Check if jvm arg is ok: -Xms10G -Xmx10G" >&5
32892  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version" >&5
32893  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version 2>&1`
32894  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
32895  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
32896  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32897    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G"
32898    JVM_ARG_OK=true
32899  else
32900    $ECHO "Arg failed:" >&5
32901    $ECHO "$OUTPUT" >&5
32902    JVM_ARG_OK=false
32903  fi
32904
32905    fi
32906    if test "$MEMORY_SIZE" -gt "10000" && test "$JVM_ARG_OK" = false; then
32907
32908  $ECHO "Check if jvm arg is ok: -Xms6G -Xmx6G" >&5
32909  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version" >&5
32910  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version 2>&1`
32911  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
32912  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
32913  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32914    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G"
32915    JVM_ARG_OK=true
32916  else
32917    $ECHO "Arg failed:" >&5
32918    $ECHO "$OUTPUT" >&5
32919    JVM_ARG_OK=false
32920  fi
32921
32922    fi
32923    if test "$MEMORY_SIZE" -gt "5000" && test "$JVM_ARG_OK" = false; then
32924
32925  $ECHO "Check if jvm arg is ok: -Xms1G -Xmx3G" >&5
32926  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version" >&5
32927  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version 2>&1`
32928  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
32929  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
32930  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32931    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G"
32932    JVM_ARG_OK=true
32933  else
32934    $ECHO "Arg failed:" >&5
32935    $ECHO "$OUTPUT" >&5
32936    JVM_ARG_OK=false
32937  fi
32938
32939    fi
32940    if test "$MEMORY_SIZE" -gt "3800" && test "$JVM_ARG_OK" = false; then
32941
32942  $ECHO "Check if jvm arg is ok: -Xms1G -Xmx2500M" >&5
32943  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version" >&5
32944  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version 2>&1`
32945  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
32946  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
32947  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32948    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M"
32949    JVM_ARG_OK=true
32950  else
32951    $ECHO "Arg failed:" >&5
32952    $ECHO "$OUTPUT" >&5
32953    JVM_ARG_OK=false
32954  fi
32955
32956    fi
32957  fi
32958  if test "$MEMORY_SIZE" -gt "2500" && test "$JVM_ARG_OK" = false; then
32959
32960  $ECHO "Check if jvm arg is ok: -Xms1000M -Xmx1500M" >&5
32961  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M -version" >&5
32962  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M -version 2>&1`
32963  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
32964  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
32965  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32966    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M"
32967    JVM_ARG_OK=true
32968  else
32969    $ECHO "Arg failed:" >&5
32970    $ECHO "$OUTPUT" >&5
32971    JVM_ARG_OK=false
32972  fi
32973
32974  fi
32975  if test "$MEMORY_SIZE" -gt "1000" && test "$JVM_ARG_OK" = false; then
32976
32977  $ECHO "Check if jvm arg is ok: -Xms400M -Xmx1100M" >&5
32978  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version" >&5
32979  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version 2>&1`
32980  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
32981  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
32982  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32983    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M"
32984    JVM_ARG_OK=true
32985  else
32986    $ECHO "Arg failed:" >&5
32987    $ECHO "$OUTPUT" >&5
32988    JVM_ARG_OK=false
32989  fi
32990
32991  fi
32992  if test "$JVM_ARG_OK" = false; then
32993
32994  $ECHO "Check if jvm arg is ok: -Xms256M -Xmx512M" >&5
32995  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version" >&5
32996  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version 2>&1`
32997  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
32998  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
32999  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33000    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M"
33001    JVM_ARG_OK=true
33002  else
33003    $ECHO "Arg failed:" >&5
33004    $ECHO "$OUTPUT" >&5
33005    JVM_ARG_OK=false
33006  fi
33007
33008  fi
33009
33010  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
33011$as_echo_n "checking whether to use sjavac... " >&6; }
33012  # Check whether --enable-sjavac was given.
33013if test "${enable_sjavac+set}" = set; then :
33014  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
33015else
33016  ENABLE_SJAVAC='no'
33017fi
33018
33019  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
33020$as_echo "$ENABLE_SJAVAC" >&6; }
33021
33022
33023  if test "x$ENABLE_SJAVAC" = xyes; then
33024    SJAVAC_SERVER_DIR="$OUTPUT_ROOT/javacservers"
33025  else
33026    SJAVAC_SERVER_DIR=
33027  fi
33028
33029
33030
33031# Can the C/C++ compiler use precompiled headers?
33032
33033
33034  ###############################################################################
33035  #
33036  # Can the C/C++ compiler use precompiled headers?
33037  #
33038  # Check whether --enable-precompiled-headers was given.
33039if test "${enable_precompiled_headers+set}" = set; then :
33040  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
33041else
33042  ENABLE_PRECOMPH=yes
33043fi
33044
33045
33046  USE_PRECOMPILED_HEADER=1
33047  if test "x$ENABLE_PRECOMPH" = xno; then
33048    USE_PRECOMPILED_HEADER=0
33049  fi
33050
33051  if test "x$ENABLE_PRECOMPH" = xyes; then
33052    # Check that the compiler actually supports precomp headers.
33053    if test "x$GCC" = xyes; then
33054      { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
33055$as_echo_n "checking that precompiled headers work... " >&6; }
33056      echo "int alfa();" > conftest.h
33057      $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
33058      if test ! -f conftest.hpp.gch; then
33059        USE_PRECOMPILED_HEADER=0
33060        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33061$as_echo "no" >&6; }
33062      else
33063        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
33064$as_echo "yes" >&6; }
33065      fi
33066      rm -f conftest.h conftest.hpp.gch
33067    fi
33068  fi
33069
33070
33071
33072
33073# Setup use of ccache, if available
33074
33075  # Check whether --enable-ccache was given.
33076if test "${enable_ccache+set}" = set; then :
33077  enableval=$enable_ccache; ENABLE_CCACHE=${enable_ccache}
33078else
33079  ENABLE_CCACHE=yes
33080fi
33081
33082  if test "x$ENABLE_CCACHE" = xyes; then
33083    OLD_PATH="$PATH"
33084    if test "x$TOOLS_DIR" != x; then
33085      PATH=$TOOLS_DIR:$PATH
33086    fi
33087    # Extract the first word of "ccache", so it can be a program name with args.
33088set dummy ccache; ac_word=$2
33089{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33090$as_echo_n "checking for $ac_word... " >&6; }
33091if ${ac_cv_path_CCACHE+:} false; then :
33092  $as_echo_n "(cached) " >&6
33093else
33094  case $CCACHE in
33095  [\\/]* | ?:[\\/]*)
33096  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
33097  ;;
33098  *)
33099  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33100for as_dir in $PATH
33101do
33102  IFS=$as_save_IFS
33103  test -z "$as_dir" && as_dir=.
33104    for ac_exec_ext in '' $ac_executable_extensions; do
33105  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33106    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
33107    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33108    break 2
33109  fi
33110done
33111  done
33112IFS=$as_save_IFS
33113
33114  ;;
33115esac
33116fi
33117CCACHE=$ac_cv_path_CCACHE
33118if test -n "$CCACHE"; then
33119  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
33120$as_echo "$CCACHE" >&6; }
33121else
33122  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33123$as_echo "no" >&6; }
33124fi
33125
33126
33127    PATH="$OLD_PATH"
33128  else
33129    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ccache" >&5
33130$as_echo_n "checking for ccache... " >&6; }
33131    { $as_echo "$as_me:${as_lineno-$LINENO}: result: explicitly disabled" >&5
33132$as_echo "explicitly disabled" >&6; }
33133    CCACHE=
33134  fi
33135
33136
33137
33138# Check whether --with-ccache-dir was given.
33139if test "${with_ccache_dir+set}" = set; then :
33140  withval=$with_ccache_dir;
33141fi
33142
33143
33144  if test "x$with_ccache_dir" != x; then
33145    # When using a non home ccache directory, assume the use is to share ccache files
33146    # with other users. Thus change the umask.
33147    SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
33148  fi
33149  CCACHE_FOUND=""
33150  if test "x$CCACHE" != x; then
33151
33152  if test "x$CCACHE" != x; then
33153    CCACHE_FOUND="true"
33154    # Only use ccache if it is 3.1.4 or later, which supports
33155    # precompiled headers.
33156    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ccache supports precompiled headers" >&5
33157$as_echo_n "checking if ccache supports precompiled headers... " >&6; }
33158    HAS_GOOD_CCACHE=`($CCACHE --version | head -n 1 | grep -E 3.1.[456789]) 2> /dev/null`
33159    if test "x$HAS_GOOD_CCACHE" = x; then
33160      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccache" >&5
33161$as_echo "no, disabling ccache" >&6; }
33162      CCACHE=
33163    else
33164      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
33165$as_echo "yes" >&6; }
33166      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
33167$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
33168      PUSHED_FLAGS="$CXXFLAGS"
33169      CXXFLAGS="-fpch-preprocess $CXXFLAGS"
33170      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33171/* end confdefs.h.  */
33172
33173int
33174main ()
33175{
33176
33177  ;
33178  return 0;
33179}
33180_ACEOF
33181if ac_fn_cxx_try_compile "$LINENO"; then :
33182  CC_KNOWS_CCACHE_TRICK=yes
33183else
33184  CC_KNOWS_CCACHE_TRICK=no
33185fi
33186rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33187      CXXFLAGS="$PUSHED_FLAGS"
33188      if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
33189        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
33190$as_echo "yes" >&6; }
33191      else
33192        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccaching of precompiled headers" >&5
33193$as_echo "no, disabling ccaching of precompiled headers" >&6; }
33194        CCACHE=
33195      fi
33196    fi
33197  fi
33198
33199  if test "x$CCACHE" != x; then
33200    CCACHE_SLOPPINESS=time_macros
33201    CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS $CCACHE"
33202    CCACHE_FLAGS=-fpch-preprocess
33203
33204    if test "x$SET_CCACHE_DIR" != x; then
33205      mkdir -p $CCACHE_DIR > /dev/null 2>&1
33206      chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
33207    fi
33208  fi
33209
33210  fi
33211
33212
33213###############################################################################
33214#
33215# And now the finish...
33216#
33217###############################################################################
33218
33219# Check for some common pitfalls
33220
33221  if test x"$OPENJDK_BUILD_OS" = xwindows; then
33222    file_to_test="$SRC_ROOT/LICENSE"
33223    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
33224      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
33225    fi
33226  fi
33227
33228
33229  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
33230$as_echo_n "checking if build directory is on local disk... " >&6; }
33231
33232  # df -l lists only local disks; if the given directory is not found then
33233  # a non-zero exit code is given
33234  if test "x$DF" = x; then
33235    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33236      # msys does not have df; use Windows "net use" instead.
33237      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
33238      if test "x$IS_NETWORK_DISK" = x; then
33239        OUTPUT_DIR_IS_LOCAL="yes"
33240      else
33241        OUTPUT_DIR_IS_LOCAL="no"
33242      fi
33243    else
33244      # No df here, say it's local
33245      OUTPUT_DIR_IS_LOCAL="yes"
33246    fi
33247  else
33248    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
33249      OUTPUT_DIR_IS_LOCAL="yes"
33250    else
33251      OUTPUT_DIR_IS_LOCAL="no"
33252    fi
33253  fi
33254
33255  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
33256$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
33257
33258
33259
33260  # Check if the user has any old-style ALT_ variables set.
33261  FOUND_ALT_VARIABLES=`env | grep ^ALT_`
33262
33263  # Before generating output files, test if they exist. If they do, this is a reconfigure.
33264  # Since we can't properly handle the dependencies for this, warn the user about the situation
33265  if test -e $OUTPUT_ROOT/spec.gmk; then
33266    IS_RECONFIGURE=yes
33267  else
33268    IS_RECONFIGURE=no
33269  fi
33270
33271  if test -e $SRC_ROOT/build/.hide-configure-performance-hints; then
33272    HIDE_PERFORMANCE_HINTS=yes
33273  else
33274    HIDE_PERFORMANCE_HINTS=no
33275    # Hide it the next time around...
33276    $TOUCH $SRC_ROOT/build/.hide-configure-performance-hints > /dev/null 2>&1
33277  fi
33278
33279
33280# At the end, call the custom hook. (Dummy macro if no custom sources available)
33281
33282
33283# We're messing a bit with internal autoconf variables to put the config.status
33284# in the output directory instead of the current directory.
33285CONFIG_STATUS="$OUTPUT_ROOT/config.status"
33286
33287# Create the actual output files. Now the main work of configure is done.
33288cat >confcache <<\_ACEOF
33289# This file is a shell script that caches the results of configure
33290# tests run on this system so they can be shared between configure
33291# scripts and configure runs, see configure's option --config-cache.
33292# It is not useful on other systems.  If it contains results you don't
33293# want to keep, you may remove or edit it.
33294#
33295# config.status only pays attention to the cache file if you give it
33296# the --recheck option to rerun configure.
33297#
33298# `ac_cv_env_foo' variables (set or unset) will be overridden when
33299# loading this file, other *unset* `ac_cv_foo' will be assigned the
33300# following values.
33301
33302_ACEOF
33303
33304# The following way of writing the cache mishandles newlines in values,
33305# but we know of no workaround that is simple, portable, and efficient.
33306# So, we kill variables containing newlines.
33307# Ultrix sh set writes to stderr and can't be redirected directly,
33308# and sets the high bit in the cache file unless we assign to the vars.
33309(
33310  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
33311    eval ac_val=\$$ac_var
33312    case $ac_val in #(
33313    *${as_nl}*)
33314      case $ac_var in #(
33315      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
33316$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
33317      esac
33318      case $ac_var in #(
33319      _ | IFS | as_nl) ;; #(
33320      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
33321      *) { eval $ac_var=; unset $ac_var;} ;;
33322      esac ;;
33323    esac
33324  done
33325
33326  (set) 2>&1 |
33327    case $as_nl`(ac_space=' '; set) 2>&1` in #(
33328    *${as_nl}ac_space=\ *)
33329      # `set' does not quote correctly, so add quotes: double-quote
33330      # substitution turns \\\\ into \\, and sed turns \\ into \.
33331      sed -n \
33332	"s/'/'\\\\''/g;
33333	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
33334      ;; #(
33335    *)
33336      # `set' quotes correctly as required by POSIX, so do not add quotes.
33337      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
33338      ;;
33339    esac |
33340    sort
33341) |
33342  sed '
33343     /^ac_cv_env_/b end
33344     t clear
33345     :clear
33346     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
33347     t end
33348     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
33349     :end' >>confcache
33350if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
33351  if test -w "$cache_file"; then
33352    if test "x$cache_file" != "x/dev/null"; then
33353      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
33354$as_echo "$as_me: updating cache $cache_file" >&6;}
33355      if test ! -f "$cache_file" || test -h "$cache_file"; then
33356	cat confcache >"$cache_file"
33357      else
33358        case $cache_file in #(
33359        */* | ?:*)
33360	  mv -f confcache "$cache_file"$$ &&
33361	  mv -f "$cache_file"$$ "$cache_file" ;; #(
33362        *)
33363	  mv -f confcache "$cache_file" ;;
33364	esac
33365      fi
33366    fi
33367  else
33368    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
33369$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
33370  fi
33371fi
33372rm -f confcache
33373
33374test "x$prefix" = xNONE && prefix=$ac_default_prefix
33375# Let make expand exec_prefix.
33376test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
33377
33378DEFS=-DHAVE_CONFIG_H
33379
33380ac_libobjs=
33381ac_ltlibobjs=
33382U=
33383for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
33384  # 1. Remove the extension, and $U if already installed.
33385  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
33386  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
33387  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
33388  #    will be set to the directory where LIBOBJS objects are built.
33389  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
33390  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
33391done
33392LIBOBJS=$ac_libobjs
33393
33394LTLIBOBJS=$ac_ltlibobjs
33395
33396
33397
33398: "${CONFIG_STATUS=./config.status}"
33399ac_write_fail=0
33400ac_clean_files_save=$ac_clean_files
33401ac_clean_files="$ac_clean_files $CONFIG_STATUS"
33402{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
33403$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
33404as_write_fail=0
33405cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
33406#! $SHELL
33407# Generated by $as_me.
33408# Run this file to recreate the current configuration.
33409# Compiler output produced by configure, useful for debugging
33410# configure, is in config.log if it exists.
33411
33412debug=false
33413ac_cs_recheck=false
33414ac_cs_silent=false
33415
33416SHELL=\${CONFIG_SHELL-$SHELL}
33417export SHELL
33418_ASEOF
33419cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
33420## -------------------- ##
33421## M4sh Initialization. ##
33422## -------------------- ##
33423
33424# Be more Bourne compatible
33425DUALCASE=1; export DUALCASE # for MKS sh
33426if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
33427  emulate sh
33428  NULLCMD=:
33429  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
33430  # is contrary to our usage.  Disable this feature.
33431  alias -g '${1+"$@"}'='"$@"'
33432  setopt NO_GLOB_SUBST
33433else
33434  case `(set -o) 2>/dev/null` in #(
33435  *posix*) :
33436    set -o posix ;; #(
33437  *) :
33438     ;;
33439esac
33440fi
33441
33442
33443as_nl='
33444'
33445export as_nl
33446# Printing a long string crashes Solaris 7 /usr/bin/printf.
33447as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
33448as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
33449as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
33450# Prefer a ksh shell builtin over an external printf program on Solaris,
33451# but without wasting forks for bash or zsh.
33452if test -z "$BASH_VERSION$ZSH_VERSION" \
33453    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
33454  as_echo='print -r --'
33455  as_echo_n='print -rn --'
33456elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
33457  as_echo='printf %s\n'
33458  as_echo_n='printf %s'
33459else
33460  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
33461    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
33462    as_echo_n='/usr/ucb/echo -n'
33463  else
33464    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
33465    as_echo_n_body='eval
33466      arg=$1;
33467      case $arg in #(
33468      *"$as_nl"*)
33469	expr "X$arg" : "X\\(.*\\)$as_nl";
33470	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
33471      esac;
33472      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
33473    '
33474    export as_echo_n_body
33475    as_echo_n='sh -c $as_echo_n_body as_echo'
33476  fi
33477  export as_echo_body
33478  as_echo='sh -c $as_echo_body as_echo'
33479fi
33480
33481# The user is always right.
33482if test "${PATH_SEPARATOR+set}" != set; then
33483  PATH_SEPARATOR=:
33484  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
33485    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
33486      PATH_SEPARATOR=';'
33487  }
33488fi
33489
33490
33491# IFS
33492# We need space, tab and new line, in precisely that order.  Quoting is
33493# there to prevent editors from complaining about space-tab.
33494# (If _AS_PATH_WALK were called with IFS unset, it would disable word
33495# splitting by setting IFS to empty value.)
33496IFS=" ""	$as_nl"
33497
33498# Find who we are.  Look in the path if we contain no directory separator.
33499as_myself=
33500case $0 in #((
33501  *[\\/]* ) as_myself=$0 ;;
33502  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33503for as_dir in $PATH
33504do
33505  IFS=$as_save_IFS
33506  test -z "$as_dir" && as_dir=.
33507    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
33508  done
33509IFS=$as_save_IFS
33510
33511     ;;
33512esac
33513# We did not find ourselves, most probably we were run as `sh COMMAND'
33514# in which case we are not to be found in the path.
33515if test "x$as_myself" = x; then
33516  as_myself=$0
33517fi
33518if test ! -f "$as_myself"; then
33519  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
33520  exit 1
33521fi
33522
33523# Unset variables that we do not need and which cause bugs (e.g. in
33524# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
33525# suppresses any "Segmentation fault" message there.  '((' could
33526# trigger a bug in pdksh 5.2.14.
33527for as_var in BASH_ENV ENV MAIL MAILPATH
33528do eval test x\${$as_var+set} = xset \
33529  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
33530done
33531PS1='$ '
33532PS2='> '
33533PS4='+ '
33534
33535# NLS nuisances.
33536LC_ALL=C
33537export LC_ALL
33538LANGUAGE=C
33539export LANGUAGE
33540
33541# CDPATH.
33542(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
33543
33544
33545# as_fn_error STATUS ERROR [LINENO LOG_FD]
33546# ----------------------------------------
33547# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
33548# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
33549# script with STATUS, using 1 if that was 0.
33550as_fn_error ()
33551{
33552  as_status=$1; test $as_status -eq 0 && as_status=1
33553  if test "$4"; then
33554    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
33555    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
33556  fi
33557  $as_echo "$as_me: error: $2" >&2
33558  as_fn_exit $as_status
33559} # as_fn_error
33560
33561
33562# as_fn_set_status STATUS
33563# -----------------------
33564# Set $? to STATUS, without forking.
33565as_fn_set_status ()
33566{
33567  return $1
33568} # as_fn_set_status
33569
33570# as_fn_exit STATUS
33571# -----------------
33572# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
33573as_fn_exit ()
33574{
33575  set +e
33576  as_fn_set_status $1
33577  exit $1
33578} # as_fn_exit
33579
33580# as_fn_unset VAR
33581# ---------------
33582# Portably unset VAR.
33583as_fn_unset ()
33584{
33585  { eval $1=; unset $1;}
33586}
33587as_unset=as_fn_unset
33588# as_fn_append VAR VALUE
33589# ----------------------
33590# Append the text in VALUE to the end of the definition contained in VAR. Take
33591# advantage of any shell optimizations that allow amortized linear growth over
33592# repeated appends, instead of the typical quadratic growth present in naive
33593# implementations.
33594if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
33595  eval 'as_fn_append ()
33596  {
33597    eval $1+=\$2
33598  }'
33599else
33600  as_fn_append ()
33601  {
33602    eval $1=\$$1\$2
33603  }
33604fi # as_fn_append
33605
33606# as_fn_arith ARG...
33607# ------------------
33608# Perform arithmetic evaluation on the ARGs, and store the result in the
33609# global $as_val. Take advantage of shells that can avoid forks. The arguments
33610# must be portable across $(()) and expr.
33611if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
33612  eval 'as_fn_arith ()
33613  {
33614    as_val=$(( $* ))
33615  }'
33616else
33617  as_fn_arith ()
33618  {
33619    as_val=`expr "$@" || test $? -eq 1`
33620  }
33621fi # as_fn_arith
33622
33623
33624if expr a : '\(a\)' >/dev/null 2>&1 &&
33625   test "X`expr 00001 : '.*\(...\)'`" = X001; then
33626  as_expr=expr
33627else
33628  as_expr=false
33629fi
33630
33631if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
33632  as_basename=basename
33633else
33634  as_basename=false
33635fi
33636
33637if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
33638  as_dirname=dirname
33639else
33640  as_dirname=false
33641fi
33642
33643as_me=`$as_basename -- "$0" ||
33644$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
33645	 X"$0" : 'X\(//\)$' \| \
33646	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
33647$as_echo X/"$0" |
33648    sed '/^.*\/\([^/][^/]*\)\/*$/{
33649	    s//\1/
33650	    q
33651	  }
33652	  /^X\/\(\/\/\)$/{
33653	    s//\1/
33654	    q
33655	  }
33656	  /^X\/\(\/\).*/{
33657	    s//\1/
33658	    q
33659	  }
33660	  s/.*/./; q'`
33661
33662# Avoid depending upon Character Ranges.
33663as_cr_letters='abcdefghijklmnopqrstuvwxyz'
33664as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
33665as_cr_Letters=$as_cr_letters$as_cr_LETTERS
33666as_cr_digits='0123456789'
33667as_cr_alnum=$as_cr_Letters$as_cr_digits
33668
33669ECHO_C= ECHO_N= ECHO_T=
33670case `echo -n x` in #(((((
33671-n*)
33672  case `echo 'xy\c'` in
33673  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
33674  xy)  ECHO_C='\c';;
33675  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
33676       ECHO_T='	';;
33677  esac;;
33678*)
33679  ECHO_N='-n';;
33680esac
33681
33682rm -f conf$$ conf$$.exe conf$$.file
33683if test -d conf$$.dir; then
33684  rm -f conf$$.dir/conf$$.file
33685else
33686  rm -f conf$$.dir
33687  mkdir conf$$.dir 2>/dev/null
33688fi
33689if (echo >conf$$.file) 2>/dev/null; then
33690  if ln -s conf$$.file conf$$ 2>/dev/null; then
33691    as_ln_s='ln -s'
33692    # ... but there are two gotchas:
33693    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
33694    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
33695    # In both cases, we have to default to `cp -pR'.
33696    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
33697      as_ln_s='cp -pR'
33698  elif ln conf$$.file conf$$ 2>/dev/null; then
33699    as_ln_s=ln
33700  else
33701    as_ln_s='cp -pR'
33702  fi
33703else
33704  as_ln_s='cp -pR'
33705fi
33706rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
33707rmdir conf$$.dir 2>/dev/null
33708
33709
33710# as_fn_mkdir_p
33711# -------------
33712# Create "$as_dir" as a directory, including parents if necessary.
33713as_fn_mkdir_p ()
33714{
33715
33716  case $as_dir in #(
33717  -*) as_dir=./$as_dir;;
33718  esac
33719  test -d "$as_dir" || eval $as_mkdir_p || {
33720    as_dirs=
33721    while :; do
33722      case $as_dir in #(
33723      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
33724      *) as_qdir=$as_dir;;
33725      esac
33726      as_dirs="'$as_qdir' $as_dirs"
33727      as_dir=`$as_dirname -- "$as_dir" ||
33728$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
33729	 X"$as_dir" : 'X\(//\)[^/]' \| \
33730	 X"$as_dir" : 'X\(//\)$' \| \
33731	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
33732$as_echo X"$as_dir" |
33733    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
33734	    s//\1/
33735	    q
33736	  }
33737	  /^X\(\/\/\)[^/].*/{
33738	    s//\1/
33739	    q
33740	  }
33741	  /^X\(\/\/\)$/{
33742	    s//\1/
33743	    q
33744	  }
33745	  /^X\(\/\).*/{
33746	    s//\1/
33747	    q
33748	  }
33749	  s/.*/./; q'`
33750      test -d "$as_dir" && break
33751    done
33752    test -z "$as_dirs" || eval "mkdir $as_dirs"
33753  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
33754
33755
33756} # as_fn_mkdir_p
33757if mkdir -p . 2>/dev/null; then
33758  as_mkdir_p='mkdir -p "$as_dir"'
33759else
33760  test -d ./-p && rmdir ./-p
33761  as_mkdir_p=false
33762fi
33763
33764
33765# as_fn_executable_p FILE
33766# -----------------------
33767# Test if FILE is an executable regular file.
33768as_fn_executable_p ()
33769{
33770  test -f "$1" && test -x "$1"
33771} # as_fn_executable_p
33772as_test_x='test -x'
33773as_executable_p=as_fn_executable_p
33774
33775# Sed expression to map a string onto a valid CPP name.
33776as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
33777
33778# Sed expression to map a string onto a valid variable name.
33779as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
33780
33781
33782exec 6>&1
33783## ----------------------------------- ##
33784## Main body of $CONFIG_STATUS script. ##
33785## ----------------------------------- ##
33786_ASEOF
33787test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
33788
33789cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
33790# Save the log message, to keep $0 and so on meaningful, and to
33791# report actual input values of CONFIG_FILES etc. instead of their
33792# values after options handling.
33793ac_log="
33794This file was extended by OpenJDK $as_me jdk8, which was
33795generated by GNU Autoconf 2.69.  Invocation command line was
33796
33797  CONFIG_FILES    = $CONFIG_FILES
33798  CONFIG_HEADERS  = $CONFIG_HEADERS
33799  CONFIG_LINKS    = $CONFIG_LINKS
33800  CONFIG_COMMANDS = $CONFIG_COMMANDS
33801  $ $0 $@
33802
33803on `(hostname || uname -n) 2>/dev/null | sed 1q`
33804"
33805
33806_ACEOF
33807
33808case $ac_config_files in *"
33809"*) set x $ac_config_files; shift; ac_config_files=$*;;
33810esac
33811
33812case $ac_config_headers in *"
33813"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
33814esac
33815
33816
33817cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
33818# Files that config.status was made for.
33819config_files="$ac_config_files"
33820config_headers="$ac_config_headers"
33821
33822_ACEOF
33823
33824cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
33825ac_cs_usage="\
33826\`$as_me' instantiates files and other configuration actions
33827from templates according to the current configuration.  Unless the files
33828and actions are specified as TAGs, all are instantiated by default.
33829
33830Usage: $0 [OPTION]... [TAG]...
33831
33832  -h, --help       print this help, then exit
33833  -V, --version    print version number and configuration settings, then exit
33834      --config     print configuration, then exit
33835  -q, --quiet, --silent
33836                   do not print progress messages
33837  -d, --debug      don't remove temporary files
33838      --recheck    update $as_me by reconfiguring in the same conditions
33839      --file=FILE[:TEMPLATE]
33840                   instantiate the configuration file FILE
33841      --header=FILE[:TEMPLATE]
33842                   instantiate the configuration header FILE
33843
33844Configuration files:
33845$config_files
33846
33847Configuration headers:
33848$config_headers
33849
33850Report bugs to <build-dev@openjdk.java.net>.
33851OpenJDK home page: <http://openjdk.java.net>."
33852
33853_ACEOF
33854cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
33855ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
33856ac_cs_version="\\
33857OpenJDK config.status jdk8
33858configured by $0, generated by GNU Autoconf 2.69,
33859  with options \\"\$ac_cs_config\\"
33860
33861Copyright (C) 2012 Free Software Foundation, Inc.
33862This config.status script is free software; the Free Software Foundation
33863gives unlimited permission to copy, distribute and modify it."
33864
33865ac_pwd='$ac_pwd'
33866srcdir='$srcdir'
33867AWK='$AWK'
33868test -n "\$AWK" || AWK=awk
33869_ACEOF
33870
33871cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
33872# The default lists apply if the user does not specify any file.
33873ac_need_defaults=:
33874while test $# != 0
33875do
33876  case $1 in
33877  --*=?*)
33878    ac_option=`expr "X$1" : 'X\([^=]*\)='`
33879    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
33880    ac_shift=:
33881    ;;
33882  --*=)
33883    ac_option=`expr "X$1" : 'X\([^=]*\)='`
33884    ac_optarg=
33885    ac_shift=:
33886    ;;
33887  *)
33888    ac_option=$1
33889    ac_optarg=$2
33890    ac_shift=shift
33891    ;;
33892  esac
33893
33894  case $ac_option in
33895  # Handling of the options.
33896  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
33897    ac_cs_recheck=: ;;
33898  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
33899    $as_echo "$ac_cs_version"; exit ;;
33900  --config | --confi | --conf | --con | --co | --c )
33901    $as_echo "$ac_cs_config"; exit ;;
33902  --debug | --debu | --deb | --de | --d | -d )
33903    debug=: ;;
33904  --file | --fil | --fi | --f )
33905    $ac_shift
33906    case $ac_optarg in
33907    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
33908    '') as_fn_error $? "missing file argument" ;;
33909    esac
33910    as_fn_append CONFIG_FILES " '$ac_optarg'"
33911    ac_need_defaults=false;;
33912  --header | --heade | --head | --hea )
33913    $ac_shift
33914    case $ac_optarg in
33915    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
33916    esac
33917    as_fn_append CONFIG_HEADERS " '$ac_optarg'"
33918    ac_need_defaults=false;;
33919  --he | --h)
33920    # Conflict between --help and --header
33921    as_fn_error $? "ambiguous option: \`$1'
33922Try \`$0 --help' for more information.";;
33923  --help | --hel | -h )
33924    $as_echo "$ac_cs_usage"; exit ;;
33925  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
33926  | -silent | --silent | --silen | --sile | --sil | --si | --s)
33927    ac_cs_silent=: ;;
33928
33929  # This is an error.
33930  -*) as_fn_error $? "unrecognized option: \`$1'
33931Try \`$0 --help' for more information." ;;
33932
33933  *) as_fn_append ac_config_targets " $1"
33934     ac_need_defaults=false ;;
33935
33936  esac
33937  shift
33938done
33939
33940ac_configure_extra_args=
33941
33942if $ac_cs_silent; then
33943  exec 6>/dev/null
33944  ac_configure_extra_args="$ac_configure_extra_args --silent"
33945fi
33946
33947_ACEOF
33948cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
33949if \$ac_cs_recheck; then
33950  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
33951  shift
33952  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
33953  CONFIG_SHELL='$SHELL'
33954  export CONFIG_SHELL
33955  exec "\$@"
33956fi
33957
33958_ACEOF
33959cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
33960exec 5>>config.log
33961{
33962  echo
33963  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
33964## Running $as_me. ##
33965_ASBOX
33966  $as_echo "$ac_log"
33967} >&5
33968
33969_ACEOF
33970cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
33971_ACEOF
33972
33973cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
33974
33975# Handling of arguments.
33976for ac_config_target in $ac_config_targets
33977do
33978  case $ac_config_target in
33979    "$OUTPUT_ROOT/config.h") CONFIG_HEADERS="$CONFIG_HEADERS $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in" ;;
33980    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
33981    "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
33982    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
33983    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
33984    "$OUTPUT_ROOT/spec.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in" ;;
33985    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
33986
33987  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
33988  esac
33989done
33990
33991
33992# If the user did not use the arguments to specify the items to instantiate,
33993# then the envvar interface is used.  Set only those that are not.
33994# We use the long form for the default assignment because of an extremely
33995# bizarre bug on SunOS 4.1.3.
33996if $ac_need_defaults; then
33997  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
33998  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
33999fi
34000
34001# Have a temporary directory for convenience.  Make it in the build tree
34002# simply because there is no reason against having it here, and in addition,
34003# creating and moving files from /tmp can sometimes cause problems.
34004# Hook for its removal unless debugging.
34005# Note that there is a small window in which the directory will not be cleaned:
34006# after its creation but before its name has been assigned to `$tmp'.
34007$debug ||
34008{
34009  tmp= ac_tmp=
34010  trap 'exit_status=$?
34011  : "${ac_tmp:=$tmp}"
34012  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
34013' 0
34014  trap 'as_fn_exit 1' 1 2 13 15
34015}
34016# Create a (secure) tmp directory for tmp files.
34017
34018{
34019  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
34020  test -d "$tmp"
34021}  ||
34022{
34023  tmp=./conf$$-$RANDOM
34024  (umask 077 && mkdir "$tmp")
34025} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
34026ac_tmp=$tmp
34027
34028# Set up the scripts for CONFIG_FILES section.
34029# No need to generate them if there are no CONFIG_FILES.
34030# This happens for instance with `./config.status config.h'.
34031if test -n "$CONFIG_FILES"; then
34032
34033
34034ac_cr=`echo X | tr X '\015'`
34035# On cygwin, bash can eat \r inside `` if the user requested igncr.
34036# But we know of no other shell where ac_cr would be empty at this
34037# point, so we can use a bashism as a fallback.
34038if test "x$ac_cr" = x; then
34039  eval ac_cr=\$\'\\r\'
34040fi
34041ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
34042if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
34043  ac_cs_awk_cr='\\r'
34044else
34045  ac_cs_awk_cr=$ac_cr
34046fi
34047
34048echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
34049_ACEOF
34050
34051
34052{
34053  echo "cat >conf$$subs.awk <<_ACEOF" &&
34054  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
34055  echo "_ACEOF"
34056} >conf$$subs.sh ||
34057  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
34058ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
34059ac_delim='%!_!# '
34060for ac_last_try in false false false false false :; do
34061  . ./conf$$subs.sh ||
34062    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
34063
34064  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
34065  if test $ac_delim_n = $ac_delim_num; then
34066    break
34067  elif $ac_last_try; then
34068    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
34069  else
34070    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
34071  fi
34072done
34073rm -f conf$$subs.sh
34074
34075cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34076cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
34077_ACEOF
34078sed -n '
34079h
34080s/^/S["/; s/!.*/"]=/
34081p
34082g
34083s/^[^!]*!//
34084:repl
34085t repl
34086s/'"$ac_delim"'$//
34087t delim
34088:nl
34089h
34090s/\(.\{148\}\)..*/\1/
34091t more1
34092s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
34093p
34094n
34095b repl
34096:more1
34097s/["\\]/\\&/g; s/^/"/; s/$/"\\/
34098p
34099g
34100s/.\{148\}//
34101t nl
34102:delim
34103h
34104s/\(.\{148\}\)..*/\1/
34105t more2
34106s/["\\]/\\&/g; s/^/"/; s/$/"/
34107p
34108b
34109:more2
34110s/["\\]/\\&/g; s/^/"/; s/$/"\\/
34111p
34112g
34113s/.\{148\}//
34114t delim
34115' <conf$$subs.awk | sed '
34116/^[^""]/{
34117  N
34118  s/\n//
34119}
34120' >>$CONFIG_STATUS || ac_write_fail=1
34121rm -f conf$$subs.awk
34122cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34123_ACAWK
34124cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
34125  for (key in S) S_is_set[key] = 1
34126  FS = ""
34127
34128}
34129{
34130  line = $ 0
34131  nfields = split(line, field, "@")
34132  substed = 0
34133  len = length(field[1])
34134  for (i = 2; i < nfields; i++) {
34135    key = field[i]
34136    keylen = length(key)
34137    if (S_is_set[key]) {
34138      value = S[key]
34139      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
34140      len += length(value) + length(field[++i])
34141      substed = 1
34142    } else
34143      len += 1 + keylen
34144  }
34145
34146  print line
34147}
34148
34149_ACAWK
34150_ACEOF
34151cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34152if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
34153  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
34154else
34155  cat
34156fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
34157  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
34158_ACEOF
34159
34160# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
34161# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
34162# trailing colons and then remove the whole line if VPATH becomes empty
34163# (actually we leave an empty line to preserve line numbers).
34164if test "x$srcdir" = x.; then
34165  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
34166h
34167s///
34168s/^/:/
34169s/[	 ]*$/:/
34170s/:\$(srcdir):/:/g
34171s/:\${srcdir}:/:/g
34172s/:@srcdir@:/:/g
34173s/^:*//
34174s/:*$//
34175x
34176s/\(=[	 ]*\).*/\1/
34177G
34178s/\n//
34179s/^[^=]*=[	 ]*$//
34180}'
34181fi
34182
34183cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34184fi # test -n "$CONFIG_FILES"
34185
34186# Set up the scripts for CONFIG_HEADERS section.
34187# No need to generate them if there are no CONFIG_HEADERS.
34188# This happens for instance with `./config.status Makefile'.
34189if test -n "$CONFIG_HEADERS"; then
34190cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
34191BEGIN {
34192_ACEOF
34193
34194# Transform confdefs.h into an awk script `defines.awk', embedded as
34195# here-document in config.status, that substitutes the proper values into
34196# config.h.in to produce config.h.
34197
34198# Create a delimiter string that does not exist in confdefs.h, to ease
34199# handling of long lines.
34200ac_delim='%!_!# '
34201for ac_last_try in false false :; do
34202  ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
34203  if test -z "$ac_tt"; then
34204    break
34205  elif $ac_last_try; then
34206    as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
34207  else
34208    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
34209  fi
34210done
34211
34212# For the awk script, D is an array of macro values keyed by name,
34213# likewise P contains macro parameters if any.  Preserve backslash
34214# newline sequences.
34215
34216ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
34217sed -n '
34218s/.\{148\}/&'"$ac_delim"'/g
34219t rset
34220:rset
34221s/^[	 ]*#[	 ]*define[	 ][	 ]*/ /
34222t def
34223d
34224:def
34225s/\\$//
34226t bsnl
34227s/["\\]/\\&/g
34228s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
34229D["\1"]=" \3"/p
34230s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2"/p
34231d
34232:bsnl
34233s/["\\]/\\&/g
34234s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
34235D["\1"]=" \3\\\\\\n"\\/p
34236t cont
34237s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
34238t cont
34239d
34240:cont
34241n
34242s/.\{148\}/&'"$ac_delim"'/g
34243t clear
34244:clear
34245s/\\$//
34246t bsnlc
34247s/["\\]/\\&/g; s/^/"/; s/$/"/p
34248d
34249:bsnlc
34250s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
34251b cont
34252' <confdefs.h | sed '
34253s/'"$ac_delim"'/"\\\
34254"/g' >>$CONFIG_STATUS || ac_write_fail=1
34255
34256cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34257  for (key in D) D_is_set[key] = 1
34258  FS = ""
34259}
34260/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
34261  line = \$ 0
34262  split(line, arg, " ")
34263  if (arg[1] == "#") {
34264    defundef = arg[2]
34265    mac1 = arg[3]
34266  } else {
34267    defundef = substr(arg[1], 2)
34268    mac1 = arg[2]
34269  }
34270  split(mac1, mac2, "(") #)
34271  macro = mac2[1]
34272  prefix = substr(line, 1, index(line, defundef) - 1)
34273  if (D_is_set[macro]) {
34274    # Preserve the white space surrounding the "#".
34275    print prefix "define", macro P[macro] D[macro]
34276    next
34277  } else {
34278    # Replace #undef with comments.  This is necessary, for example,
34279    # in the case of _POSIX_SOURCE, which is predefined and required
34280    # on some systems where configure will not decide to define it.
34281    if (defundef == "undef") {
34282      print "/*", prefix defundef, macro, "*/"
34283      next
34284    }
34285  }
34286}
34287{ print }
34288_ACAWK
34289_ACEOF
34290cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34291  as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
34292fi # test -n "$CONFIG_HEADERS"
34293
34294
34295eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    "
34296shift
34297for ac_tag
34298do
34299  case $ac_tag in
34300  :[FHLC]) ac_mode=$ac_tag; continue;;
34301  esac
34302  case $ac_mode$ac_tag in
34303  :[FHL]*:*);;
34304  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
34305  :[FH]-) ac_tag=-:-;;
34306  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
34307  esac
34308  ac_save_IFS=$IFS
34309  IFS=:
34310  set x $ac_tag
34311  IFS=$ac_save_IFS
34312  shift
34313  ac_file=$1
34314  shift
34315
34316  case $ac_mode in
34317  :L) ac_source=$1;;
34318  :[FH])
34319    ac_file_inputs=
34320    for ac_f
34321    do
34322      case $ac_f in
34323      -) ac_f="$ac_tmp/stdin";;
34324      *) # Look for the file first in the build tree, then in the source tree
34325	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
34326	 # because $ac_f cannot contain `:'.
34327	 test -f "$ac_f" ||
34328	   case $ac_f in
34329	   [\\/$]*) false;;
34330	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
34331	   esac ||
34332	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
34333      esac
34334      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
34335      as_fn_append ac_file_inputs " '$ac_f'"
34336    done
34337
34338    # Let's still pretend it is `configure' which instantiates (i.e., don't
34339    # use $as_me), people would be surprised to read:
34340    #    /* config.h.  Generated by config.status.  */
34341    configure_input='Generated from '`
34342	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
34343	`' by configure.'
34344    if test x"$ac_file" != x-; then
34345      configure_input="$ac_file.  $configure_input"
34346      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
34347$as_echo "$as_me: creating $ac_file" >&6;}
34348    fi
34349    # Neutralize special characters interpreted by sed in replacement strings.
34350    case $configure_input in #(
34351    *\&* | *\|* | *\\* )
34352       ac_sed_conf_input=`$as_echo "$configure_input" |
34353       sed 's/[\\\\&|]/\\\\&/g'`;; #(
34354    *) ac_sed_conf_input=$configure_input;;
34355    esac
34356
34357    case $ac_tag in
34358    *:-:* | *:-) cat >"$ac_tmp/stdin" \
34359      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
34360    esac
34361    ;;
34362  esac
34363
34364  ac_dir=`$as_dirname -- "$ac_file" ||
34365$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
34366	 X"$ac_file" : 'X\(//\)[^/]' \| \
34367	 X"$ac_file" : 'X\(//\)$' \| \
34368	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
34369$as_echo X"$ac_file" |
34370    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
34371	    s//\1/
34372	    q
34373	  }
34374	  /^X\(\/\/\)[^/].*/{
34375	    s//\1/
34376	    q
34377	  }
34378	  /^X\(\/\/\)$/{
34379	    s//\1/
34380	    q
34381	  }
34382	  /^X\(\/\).*/{
34383	    s//\1/
34384	    q
34385	  }
34386	  s/.*/./; q'`
34387  as_dir="$ac_dir"; as_fn_mkdir_p
34388  ac_builddir=.
34389
34390case "$ac_dir" in
34391.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
34392*)
34393  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
34394  # A ".." for each directory in $ac_dir_suffix.
34395  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
34396  case $ac_top_builddir_sub in
34397  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
34398  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
34399  esac ;;
34400esac
34401ac_abs_top_builddir=$ac_pwd
34402ac_abs_builddir=$ac_pwd$ac_dir_suffix
34403# for backward compatibility:
34404ac_top_builddir=$ac_top_build_prefix
34405
34406case $srcdir in
34407  .)  # We are building in place.
34408    ac_srcdir=.
34409    ac_top_srcdir=$ac_top_builddir_sub
34410    ac_abs_top_srcdir=$ac_pwd ;;
34411  [\\/]* | ?:[\\/]* )  # Absolute name.
34412    ac_srcdir=$srcdir$ac_dir_suffix;
34413    ac_top_srcdir=$srcdir
34414    ac_abs_top_srcdir=$srcdir ;;
34415  *) # Relative name.
34416    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
34417    ac_top_srcdir=$ac_top_build_prefix$srcdir
34418    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
34419esac
34420ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
34421
34422
34423  case $ac_mode in
34424  :F)
34425  #
34426  # CONFIG_FILE
34427  #
34428
34429_ACEOF
34430
34431cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34432# If the template does not know about datarootdir, expand it.
34433# FIXME: This hack should be removed a few years after 2.60.
34434ac_datarootdir_hack=; ac_datarootdir_seen=
34435ac_sed_dataroot='
34436/datarootdir/ {
34437  p
34438  q
34439}
34440/@datadir@/p
34441/@docdir@/p
34442/@infodir@/p
34443/@localedir@/p
34444/@mandir@/p'
34445case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
34446*datarootdir*) ac_datarootdir_seen=yes;;
34447*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
34448  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
34449$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
34450_ACEOF
34451cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34452  ac_datarootdir_hack='
34453  s&@datadir@&$datadir&g
34454  s&@docdir@&$docdir&g
34455  s&@infodir@&$infodir&g
34456  s&@localedir@&$localedir&g
34457  s&@mandir@&$mandir&g
34458  s&\\\${datarootdir}&$datarootdir&g' ;;
34459esac
34460_ACEOF
34461
34462# Neutralize VPATH when `$srcdir' = `.'.
34463# Shell code in configure.ac might set extrasub.
34464# FIXME: do we really want to maintain this feature?
34465cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34466ac_sed_extra="$ac_vpsub
34467$extrasub
34468_ACEOF
34469cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34470:t
34471/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
34472s|@configure_input@|$ac_sed_conf_input|;t t
34473s&@top_builddir@&$ac_top_builddir_sub&;t t
34474s&@top_build_prefix@&$ac_top_build_prefix&;t t
34475s&@srcdir@&$ac_srcdir&;t t
34476s&@abs_srcdir@&$ac_abs_srcdir&;t t
34477s&@top_srcdir@&$ac_top_srcdir&;t t
34478s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
34479s&@builddir@&$ac_builddir&;t t
34480s&@abs_builddir@&$ac_abs_builddir&;t t
34481s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
34482$ac_datarootdir_hack
34483"
34484eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
34485  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
34486
34487test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
34488  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
34489  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
34490      "$ac_tmp/out"`; test -z "$ac_out"; } &&
34491  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
34492which seems to be undefined.  Please make sure it is defined" >&5
34493$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
34494which seems to be undefined.  Please make sure it is defined" >&2;}
34495
34496  rm -f "$ac_tmp/stdin"
34497  case $ac_file in
34498  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
34499  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
34500  esac \
34501  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
34502 ;;
34503  :H)
34504  #
34505  # CONFIG_HEADER
34506  #
34507  if test x"$ac_file" != x-; then
34508    {
34509      $as_echo "/* $configure_input  */" \
34510      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
34511    } >"$ac_tmp/config.h" \
34512      || as_fn_error $? "could not create $ac_file" "$LINENO" 5
34513    if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
34514      { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
34515$as_echo "$as_me: $ac_file is unchanged" >&6;}
34516    else
34517      rm -f "$ac_file"
34518      mv "$ac_tmp/config.h" "$ac_file" \
34519	|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
34520    fi
34521  else
34522    $as_echo "/* $configure_input  */" \
34523      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
34524      || as_fn_error $? "could not create -" "$LINENO" 5
34525  fi
34526 ;;
34527
34528
34529  esac
34530
34531done # for ac_tag
34532
34533
34534as_fn_exit 0
34535_ACEOF
34536ac_clean_files=$ac_clean_files_save
34537
34538test $ac_write_fail = 0 ||
34539  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
34540
34541
34542# configure is writing to config.log, and then calls config.status.
34543# config.status does its own redirection, appending to config.log.
34544# Unfortunately, on DOS this fails, as config.log is still kept open
34545# by configure, so config.status won't be able to write to it; its
34546# output is simply discarded.  So we exec the FD to /dev/null,
34547# effectively closing config.log, so it can be properly (re)opened and
34548# appended to by config.status.  When coming back to configure, we
34549# need to make the FD available again.
34550if test "$no_create" != yes; then
34551  ac_cs_success=:
34552  ac_config_status_args=
34553  test "$silent" = yes &&
34554    ac_config_status_args="$ac_config_status_args --quiet"
34555  exec 5>/dev/null
34556  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
34557  exec 5>>config.log
34558  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
34559  # would make configure fail if this is the last instruction.
34560  $ac_cs_success || as_fn_exit 1
34561fi
34562if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
34563  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
34564$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
34565fi
34566
34567
34568# Try to move the config.log file to the output directory.
34569if test -e ./config.log; then
34570  $MV -f ./config.log "$OUTPUT_ROOT/config.log" 2> /dev/null
34571fi
34572
34573# Make the compare script executable
34574$CHMOD +x $OUTPUT_ROOT/compare.sh
34575
34576# Finally output some useful information to the user
34577
34578  # Finally output some useful information to the user
34579
34580  if test "x$CCACHE_FOUND" != x; then
34581    if  test "x$HAS_GOOD_CCACHE" = x; then
34582      CCACHE_STATUS="installed, but disabled (version older than 3.1.4)"
34583      CCACHE_HELP_MSG="You have ccache installed, but it is a version prior to 3.1.4. Try upgrading."
34584    else
34585      CCACHE_STATUS="installed and in use"
34586    fi
34587  else
34588    if test "x$GCC" = xyes; then
34589      CCACHE_STATUS="not installed (consider installing)"
34590      CCACHE_HELP_MSG="You do not have ccache installed. Try installing it."
34591    else
34592      CCACHE_STATUS="not available for your system"
34593    fi
34594  fi
34595
34596  printf "\n"
34597  printf "====================================================\n"
34598  printf "A new configuration has been successfully created in\n"
34599  printf "$OUTPUT_ROOT\n"
34600  if test "x$CONFIGURE_COMMAND_LINE" != x; then
34601    printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
34602  else
34603    printf "using default settings.\n"
34604  fi
34605
34606  printf "\n"
34607  printf "Configuration summary:\n"
34608  printf "* Debug level:    $DEBUG_LEVEL\n"
34609  printf "* JDK variant:    $JDK_VARIANT\n"
34610  printf "* JVM variants:   $with_jvm_variants\n"
34611  printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
34612
34613  printf "\n"
34614  printf "Tools summary:\n"
34615  if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
34616    printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
34617  fi
34618  printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
34619  printf "* C Compiler:     $CC_VENDOR version $CC_VERSION (at $CC)\n"
34620  printf "* C++ Compiler:   $CXX_VENDOR version $CXX_VERSION (at $CXX)\n"
34621
34622  printf "\n"
34623  printf "Build performance summary:\n"
34624  printf "* Cores to use:   $JOBS\n"
34625  printf "* Memory limit:   $MEMORY_SIZE MB\n"
34626  printf "* ccache status:  $CCACHE_STATUS\n"
34627  printf "\n"
34628
34629  if test "x$CCACHE_HELP_MSG" != x && test "x$HIDE_PERFORMANCE_HINTS" = "xno"; then
34630    printf "Build performance tip: ccache gives a tremendous speedup for C++ recompilations.\n"
34631    printf "$CCACHE_HELP_MSG\n"
34632
34633  # Print a helpful message on how to acquire the necessary build dependency.
34634  # ccache is the help tag: freetyp2, cups, pulse, alsa etc
34635  MISSING_DEPENDENCY=ccache
34636  PKGHANDLER_COMMAND=
34637
34638  case $PKGHANDLER in
34639    apt-get)
34640      apt_help     $MISSING_DEPENDENCY ;;
34641    yum)
34642      yum_help     $MISSING_DEPENDENCY ;;
34643    port)
34644      port_help    $MISSING_DEPENDENCY ;;
34645    pkgutil)
34646      pkgutil_help $MISSING_DEPENDENCY ;;
34647    pkgadd)
34648      pkgadd_help  $MISSING_DEPENDENCY ;;
34649    * )
34650      break ;;
34651  esac
34652
34653  if test "x$PKGHANDLER_COMMAND" != x; then
34654    HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
34655  fi
34656
34657    printf "$HELP_MSG\n"
34658    printf "\n"
34659  fi
34660
34661  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
34662    printf "NOTE: You have requested to build more than one version of the JVM, which\n"
34663    printf "will result in longer build times.\n"
34664    printf "\n"
34665  fi
34666
34667  if test "x$FOUND_ALT_VARIABLES" != "x"; then
34668    printf "WARNING: You have old-style ALT_ environment variables set.\n"
34669    printf "These are not respected, and will be ignored. It is recommended\n"
34670    printf "that you clean your environment. The following variables are set:\n"
34671    printf "$FOUND_ALT_VARIABLES\n"
34672    printf "\n"
34673  fi
34674
34675  if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
34676    printf "WARNING: Your build output directory is not on a local disk.\n"
34677    printf "This will severely degrade build performance!\n"
34678    printf "It is recommended that you create an output directory on a local disk,\n"
34679    printf "and run the configure script again from that directory.\n"
34680    printf "\n"
34681  fi
34682
34683  if test "x$IS_RECONFIGURE" = "xyes"; then
34684    printf "WARNING: The result of this configuration has overridden an older\n"
34685    printf "configuration. You *should* run 'make clean' to make sure you get a\n"
34686    printf "proper build. Failure to do so might result in strange build problems.\n"
34687    printf "\n"
34688  fi
34689
34690