generated-configure.sh revision 811:9b102ab97693
1#! /bin/sh
2# Guess values for system-dependent variables and create Makefiles.
3# Generated by GNU Autoconf 2.69 for OpenJDK jdk8.
4#
5# Report bugs to <build-dev@openjdk.java.net>.
6#
7#
8# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
9#
10#
11# This configure script is free software; the Free Software Foundation
12# gives unlimited permission to copy, distribute and modify it.
13## -------------------- ##
14## M4sh Initialization. ##
15## -------------------- ##
16
17# Be more Bourne compatible
18DUALCASE=1; export DUALCASE # for MKS sh
19if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
20  emulate sh
21  NULLCMD=:
22  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
23  # is contrary to our usage.  Disable this feature.
24  alias -g '${1+"$@"}'='"$@"'
25  setopt NO_GLOB_SUBST
26else
27  case `(set -o) 2>/dev/null` in #(
28  *posix*) :
29    set -o posix ;; #(
30  *) :
31     ;;
32esac
33fi
34
35
36as_nl='
37'
38export as_nl
39# Printing a long string crashes Solaris 7 /usr/bin/printf.
40as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
41as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
42as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
43# Prefer a ksh shell builtin over an external printf program on Solaris,
44# but without wasting forks for bash or zsh.
45if test -z "$BASH_VERSION$ZSH_VERSION" \
46    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
47  as_echo='print -r --'
48  as_echo_n='print -rn --'
49elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
50  as_echo='printf %s\n'
51  as_echo_n='printf %s'
52else
53  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
54    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
55    as_echo_n='/usr/ucb/echo -n'
56  else
57    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
58    as_echo_n_body='eval
59      arg=$1;
60      case $arg in #(
61      *"$as_nl"*)
62	expr "X$arg" : "X\\(.*\\)$as_nl";
63	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
64      esac;
65      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
66    '
67    export as_echo_n_body
68    as_echo_n='sh -c $as_echo_n_body as_echo'
69  fi
70  export as_echo_body
71  as_echo='sh -c $as_echo_body as_echo'
72fi
73
74# The user is always right.
75if test "${PATH_SEPARATOR+set}" != set; then
76  PATH_SEPARATOR=:
77  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
78    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
79      PATH_SEPARATOR=';'
80  }
81fi
82
83
84# IFS
85# We need space, tab and new line, in precisely that order.  Quoting is
86# there to prevent editors from complaining about space-tab.
87# (If _AS_PATH_WALK were called with IFS unset, it would disable word
88# splitting by setting IFS to empty value.)
89IFS=" ""	$as_nl"
90
91# Find who we are.  Look in the path if we contain no directory separator.
92as_myself=
93case $0 in #((
94  *[\\/]* ) as_myself=$0 ;;
95  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
96for as_dir in $PATH
97do
98  IFS=$as_save_IFS
99  test -z "$as_dir" && as_dir=.
100    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
101  done
102IFS=$as_save_IFS
103
104     ;;
105esac
106# We did not find ourselves, most probably we were run as `sh COMMAND'
107# in which case we are not to be found in the path.
108if test "x$as_myself" = x; then
109  as_myself=$0
110fi
111if test ! -f "$as_myself"; then
112  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
113  exit 1
114fi
115
116# Unset variables that we do not need and which cause bugs (e.g. in
117# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
118# suppresses any "Segmentation fault" message there.  '((' could
119# trigger a bug in pdksh 5.2.14.
120for as_var in BASH_ENV ENV MAIL MAILPATH
121do eval test x\${$as_var+set} = xset \
122  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
123done
124PS1='$ '
125PS2='> '
126PS4='+ '
127
128# NLS nuisances.
129LC_ALL=C
130export LC_ALL
131LANGUAGE=C
132export LANGUAGE
133
134# CDPATH.
135(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
136
137# Use a proper internal environment variable to ensure we don't fall
138  # into an infinite loop, continuously re-executing ourselves.
139  if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
140    _as_can_reexec=no; export _as_can_reexec;
141    # We cannot yet assume a decent shell, so we have to provide a
142# neutralization value for shells without unset; and this also
143# works around shells that cannot unset nonexistent variables.
144# Preserve -v and -x to the replacement shell.
145BASH_ENV=/dev/null
146ENV=/dev/null
147(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
148case $- in # ((((
149  *v*x* | *x*v* ) as_opts=-vx ;;
150  *v* ) as_opts=-v ;;
151  *x* ) as_opts=-x ;;
152  * ) as_opts= ;;
153esac
154exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
155# Admittedly, this is quite paranoid, since all the known shells bail
156# out after a failed `exec'.
157$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
158as_fn_exit 255
159  fi
160  # We don't want this to propagate to other subprocesses.
161          { _as_can_reexec=; unset _as_can_reexec;}
162if test "x$CONFIG_SHELL" = x; then
163  as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
164  emulate sh
165  NULLCMD=:
166  # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
167  # is contrary to our usage.  Disable this feature.
168  alias -g '\${1+\"\$@\"}'='\"\$@\"'
169  setopt NO_GLOB_SUBST
170else
171  case \`(set -o) 2>/dev/null\` in #(
172  *posix*) :
173    set -o posix ;; #(
174  *) :
175     ;;
176esac
177fi
178"
179  as_required="as_fn_return () { (exit \$1); }
180as_fn_success () { as_fn_return 0; }
181as_fn_failure () { as_fn_return 1; }
182as_fn_ret_success () { return 0; }
183as_fn_ret_failure () { return 1; }
184
185exitcode=0
186as_fn_success || { exitcode=1; echo as_fn_success failed.; }
187as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
188as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
189as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
190if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
191
192else
193  exitcode=1; echo positional parameters were not saved.
194fi
195test x\$exitcode = x0 || exit 1
196test -x / || exit 1"
197  as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
198  as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
199  eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
200  test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
201test \$(( 1 + 1 )) = 2 || exit 1"
202  if (eval "$as_required") 2>/dev/null; then :
203  as_have_required=yes
204else
205  as_have_required=no
206fi
207  if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
208
209else
210  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
211as_found=false
212for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
213do
214  IFS=$as_save_IFS
215  test -z "$as_dir" && as_dir=.
216  as_found=:
217  case $as_dir in #(
218	 /*)
219	   for as_base in sh bash ksh sh5; do
220	     # Try only shells that exist, to save several forks.
221	     as_shell=$as_dir/$as_base
222	     if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
223		    { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
224  CONFIG_SHELL=$as_shell as_have_required=yes
225		   if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
226  break 2
227fi
228fi
229	   done;;
230       esac
231  as_found=false
232done
233$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
234	      { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
235  CONFIG_SHELL=$SHELL as_have_required=yes
236fi; }
237IFS=$as_save_IFS
238
239
240      if test "x$CONFIG_SHELL" != x; then :
241  export CONFIG_SHELL
242             # We cannot yet assume a decent shell, so we have to provide a
243# neutralization value for shells without unset; and this also
244# works around shells that cannot unset nonexistent variables.
245# Preserve -v and -x to the replacement shell.
246BASH_ENV=/dev/null
247ENV=/dev/null
248(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
249case $- in # ((((
250  *v*x* | *x*v* ) as_opts=-vx ;;
251  *v* ) as_opts=-v ;;
252  *x* ) as_opts=-x ;;
253  * ) as_opts= ;;
254esac
255exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
256# Admittedly, this is quite paranoid, since all the known shells bail
257# out after a failed `exec'.
258$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
259exit 255
260fi
261
262    if test x$as_have_required = xno; then :
263  $as_echo "$0: This script requires a shell more modern than all"
264  $as_echo "$0: the shells that I found on your system."
265  if test x${ZSH_VERSION+set} = xset ; then
266    $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
267    $as_echo "$0: be upgraded to zsh 4.3.4 or later."
268  else
269    $as_echo "$0: Please tell bug-autoconf@gnu.org and
270$0: build-dev@openjdk.java.net about your system, including
271$0: any error possibly output before this message. Then
272$0: install a modern shell, or manually run the script
273$0: under such a shell if you do have one."
274  fi
275  exit 1
276fi
277fi
278fi
279SHELL=${CONFIG_SHELL-/bin/sh}
280export SHELL
281# Unset more variables known to interfere with behavior of common tools.
282CLICOLOR_FORCE= GREP_OPTIONS=
283unset CLICOLOR_FORCE GREP_OPTIONS
284
285## --------------------- ##
286## M4sh Shell Functions. ##
287## --------------------- ##
288# as_fn_unset VAR
289# ---------------
290# Portably unset VAR.
291as_fn_unset ()
292{
293  { eval $1=; unset $1;}
294}
295as_unset=as_fn_unset
296
297# as_fn_set_status STATUS
298# -----------------------
299# Set $? to STATUS, without forking.
300as_fn_set_status ()
301{
302  return $1
303} # as_fn_set_status
304
305# as_fn_exit STATUS
306# -----------------
307# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
308as_fn_exit ()
309{
310  set +e
311  as_fn_set_status $1
312  exit $1
313} # as_fn_exit
314
315# as_fn_mkdir_p
316# -------------
317# Create "$as_dir" as a directory, including parents if necessary.
318as_fn_mkdir_p ()
319{
320
321  case $as_dir in #(
322  -*) as_dir=./$as_dir;;
323  esac
324  test -d "$as_dir" || eval $as_mkdir_p || {
325    as_dirs=
326    while :; do
327      case $as_dir in #(
328      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
329      *) as_qdir=$as_dir;;
330      esac
331      as_dirs="'$as_qdir' $as_dirs"
332      as_dir=`$as_dirname -- "$as_dir" ||
333$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
334	 X"$as_dir" : 'X\(//\)[^/]' \| \
335	 X"$as_dir" : 'X\(//\)$' \| \
336	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
337$as_echo X"$as_dir" |
338    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
339	    s//\1/
340	    q
341	  }
342	  /^X\(\/\/\)[^/].*/{
343	    s//\1/
344	    q
345	  }
346	  /^X\(\/\/\)$/{
347	    s//\1/
348	    q
349	  }
350	  /^X\(\/\).*/{
351	    s//\1/
352	    q
353	  }
354	  s/.*/./; q'`
355      test -d "$as_dir" && break
356    done
357    test -z "$as_dirs" || eval "mkdir $as_dirs"
358  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
359
360
361} # as_fn_mkdir_p
362
363# as_fn_executable_p FILE
364# -----------------------
365# Test if FILE is an executable regular file.
366as_fn_executable_p ()
367{
368  test -f "$1" && test -x "$1"
369} # as_fn_executable_p
370# as_fn_append VAR VALUE
371# ----------------------
372# Append the text in VALUE to the end of the definition contained in VAR. Take
373# advantage of any shell optimizations that allow amortized linear growth over
374# repeated appends, instead of the typical quadratic growth present in naive
375# implementations.
376if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
377  eval 'as_fn_append ()
378  {
379    eval $1+=\$2
380  }'
381else
382  as_fn_append ()
383  {
384    eval $1=\$$1\$2
385  }
386fi # as_fn_append
387
388# as_fn_arith ARG...
389# ------------------
390# Perform arithmetic evaluation on the ARGs, and store the result in the
391# global $as_val. Take advantage of shells that can avoid forks. The arguments
392# must be portable across $(()) and expr.
393if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
394  eval 'as_fn_arith ()
395  {
396    as_val=$(( $* ))
397  }'
398else
399  as_fn_arith ()
400  {
401    as_val=`expr "$@" || test $? -eq 1`
402  }
403fi # as_fn_arith
404
405
406# as_fn_error STATUS ERROR [LINENO LOG_FD]
407# ----------------------------------------
408# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
409# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
410# script with STATUS, using 1 if that was 0.
411as_fn_error ()
412{
413  as_status=$1; test $as_status -eq 0 && as_status=1
414  if test "$4"; then
415    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
416    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
417  fi
418  $as_echo "$as_me: error: $2" >&2
419  as_fn_exit $as_status
420} # as_fn_error
421
422if expr a : '\(a\)' >/dev/null 2>&1 &&
423   test "X`expr 00001 : '.*\(...\)'`" = X001; then
424  as_expr=expr
425else
426  as_expr=false
427fi
428
429if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
430  as_basename=basename
431else
432  as_basename=false
433fi
434
435if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
436  as_dirname=dirname
437else
438  as_dirname=false
439fi
440
441as_me=`$as_basename -- "$0" ||
442$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
443	 X"$0" : 'X\(//\)$' \| \
444	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
445$as_echo X/"$0" |
446    sed '/^.*\/\([^/][^/]*\)\/*$/{
447	    s//\1/
448	    q
449	  }
450	  /^X\/\(\/\/\)$/{
451	    s//\1/
452	    q
453	  }
454	  /^X\/\(\/\).*/{
455	    s//\1/
456	    q
457	  }
458	  s/.*/./; q'`
459
460# Avoid depending upon Character Ranges.
461as_cr_letters='abcdefghijklmnopqrstuvwxyz'
462as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
463as_cr_Letters=$as_cr_letters$as_cr_LETTERS
464as_cr_digits='0123456789'
465as_cr_alnum=$as_cr_Letters$as_cr_digits
466
467
468  as_lineno_1=$LINENO as_lineno_1a=$LINENO
469  as_lineno_2=$LINENO as_lineno_2a=$LINENO
470  eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
471  test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
472  # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
473  sed -n '
474    p
475    /[$]LINENO/=
476  ' <$as_myself |
477    sed '
478      s/[$]LINENO.*/&-/
479      t lineno
480      b
481      :lineno
482      N
483      :loop
484      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
485      t loop
486      s/-\n.*//
487    ' >$as_me.lineno &&
488  chmod +x "$as_me.lineno" ||
489    { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
490
491  # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
492  # already done that, so ensure we don't try to do so again and fall
493  # in an infinite loop.  This has already happened in practice.
494  _as_can_reexec=no; export _as_can_reexec
495  # Don't try to exec as it changes $[0], causing all sort of problems
496  # (the dirname of $[0] is not the place where we might find the
497  # original and so on.  Autoconf is especially sensitive to this).
498  . "./$as_me.lineno"
499  # Exit status is that of the last command.
500  exit
501}
502
503ECHO_C= ECHO_N= ECHO_T=
504case `echo -n x` in #(((((
505-n*)
506  case `echo 'xy\c'` in
507  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
508  xy)  ECHO_C='\c';;
509  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
510       ECHO_T='	';;
511  esac;;
512*)
513  ECHO_N='-n';;
514esac
515
516rm -f conf$$ conf$$.exe conf$$.file
517if test -d conf$$.dir; then
518  rm -f conf$$.dir/conf$$.file
519else
520  rm -f conf$$.dir
521  mkdir conf$$.dir 2>/dev/null
522fi
523if (echo >conf$$.file) 2>/dev/null; then
524  if ln -s conf$$.file conf$$ 2>/dev/null; then
525    as_ln_s='ln -s'
526    # ... but there are two gotchas:
527    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
528    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
529    # In both cases, we have to default to `cp -pR'.
530    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
531      as_ln_s='cp -pR'
532  elif ln conf$$.file conf$$ 2>/dev/null; then
533    as_ln_s=ln
534  else
535    as_ln_s='cp -pR'
536  fi
537else
538  as_ln_s='cp -pR'
539fi
540rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
541rmdir conf$$.dir 2>/dev/null
542
543if mkdir -p . 2>/dev/null; then
544  as_mkdir_p='mkdir -p "$as_dir"'
545else
546  test -d ./-p && rmdir ./-p
547  as_mkdir_p=false
548fi
549
550as_test_x='test -x'
551as_executable_p=as_fn_executable_p
552
553# Sed expression to map a string onto a valid CPP name.
554as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
555
556# Sed expression to map a string onto a valid variable name.
557as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
558
559
560test -n "$DJDIR" || exec 7<&0 </dev/null
561exec 6>&1
562
563# Name of the host.
564# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
565# so uname gets run too.
566ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
567
568#
569# Initializations.
570#
571ac_default_prefix=/usr/local
572ac_clean_files=
573ac_config_libobj_dir=.
574LIBOBJS=
575cross_compiling=no
576subdirs=
577MFLAGS=
578MAKEFLAGS=
579
580# Identity of this package.
581PACKAGE_NAME='OpenJDK'
582PACKAGE_TARNAME='openjdk'
583PACKAGE_VERSION='jdk8'
584PACKAGE_STRING='OpenJDK jdk8'
585PACKAGE_BUGREPORT='build-dev@openjdk.java.net'
586PACKAGE_URL='http://openjdk.java.net'
587
588# Factoring default headers for most tests.
589ac_includes_default="\
590#include <stdio.h>
591#ifdef HAVE_SYS_TYPES_H
592# include <sys/types.h>
593#endif
594#ifdef HAVE_SYS_STAT_H
595# include <sys/stat.h>
596#endif
597#ifdef STDC_HEADERS
598# include <stdlib.h>
599# include <stddef.h>
600#else
601# ifdef HAVE_STDLIB_H
602#  include <stdlib.h>
603# endif
604#endif
605#ifdef HAVE_STRING_H
606# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
607#  include <memory.h>
608# endif
609# include <string.h>
610#endif
611#ifdef HAVE_STRINGS_H
612# include <strings.h>
613#endif
614#ifdef HAVE_INTTYPES_H
615# include <inttypes.h>
616#endif
617#ifdef HAVE_STDINT_H
618# include <stdint.h>
619#endif
620#ifdef HAVE_UNISTD_H
621# include <unistd.h>
622#endif"
623
624ac_subst_vars='LTLIBOBJS
625LIBOBJS
626CCACHE
627USE_PRECOMPILED_HEADER
628SJAVAC_SERVER_DIR
629ENABLE_SJAVAC
630SJAVAC_SERVER_JAVA
631JOBS
632MEMORY_SIZE
633NUM_CORES
634ENABLE_INTREE_EC
635SALIB_NAME
636HOTSPOT_MAKE_ARGS
637FIXPATH
638LIBCXX
639LLVM_LIBS
640LLVM_LDFLAGS
641LLVM_CFLAGS
642LLVM_CONFIG
643LIBFFI_LIBS
644LIBFFI_CFLAGS
645STATIC_CXX_SETTING
646LIBDL
647LIBM
648LIBZIP_CAN_USE_MMAP
649USE_EXTERNAL_LIBZ
650USE_EXTERNAL_LIBGIF
651USE_EXTERNAL_LIBJPEG
652ALSA_LIBS
653ALSA_CFLAGS
654FREETYPE2_LIB_PATH
655USING_SYSTEM_FT_LIB
656FREETYPE2_LIBS
657FREETYPE2_CFLAGS
658CUPS_CFLAGS
659OPENWIN_HOME
660X_EXTRA_LIBS
661X_LIBS
662X_PRE_LIBS
663X_CFLAGS
664XMKMF
665CXXFLAGS_DEBUG_SYMBOLS
666CFLAGS_DEBUG_SYMBOLS
667ZIP_DEBUGINFO_FILES
668ENABLE_DEBUG_SYMBOLS
669COMPILER_SUPPORTS_TARGET_BITS_FLAG
670ZERO_ARCHFLAG
671LDFLAGS_CXX_JDK
672LDFLAGS_JDKEXE_SUFFIX
673LDFLAGS_JDKLIB_SUFFIX
674LDFLAGS_JDKEXE
675LDFLAGS_JDKLIB
676CXXFLAGS_JDKEXE
677CXXFLAGS_JDKLIB
678CFLAGS_JDKEXE
679CFLAGS_JDKLIB
680MACOSX_VERSION_MIN
681PACKAGE_PATH
682LEGACY_EXTRA_LDFLAGS
683LEGACY_EXTRA_CXXFLAGS
684LEGACY_EXTRA_CFLAGS
685CXX_FLAG_DEPS
686C_FLAG_DEPS
687CXX_O_FLAG_NONE
688CXX_O_FLAG_NORM
689CXX_O_FLAG_HI
690CXX_O_FLAG_HIGHEST
691C_O_FLAG_NONE
692C_O_FLAG_NORM
693C_O_FLAG_HI
694C_O_FLAG_HIGHEST
695POST_MCS_CMD
696POST_STRIP_CMD
697SET_EXECUTABLE_ORIGIN
698SET_SHARED_LIBRARY_ORIGIN
699CXX_FLAG_REORDER
700C_FLAG_REORDER
701SET_SHARED_LIBRARY_MAPFILE
702SET_SHARED_LIBRARY_NAME
703SHARED_LIBRARY_FLAGS
704EXE_SUFFIX
705STATIC_LIBRARY_SUFFIX
706SHARED_LIBRARY_SUFFIX
707LIBRARY_PREFIX
708STATIC_LIBRARY
709SHARED_LIBRARY
710OBJ_SUFFIX
711COMPILER_NAME
712JT_HOME
713JTREGEXE
714LIPO
715ac_ct_OBJDUMP
716OBJDUMP
717ac_ct_OBJCOPY
718OBJCOPY
719MCS
720STRIP
721GNM
722NM
723AS
724CXXCPP
725CPP
726COMPILER_TYPE
727RC_FLAGS
728DUMPBIN
729WINAR
730HOTSPOT_RC
731HOTSPOT_MT
732RC
733MT
734WINLD
735HOTSPOT_LD
736HOTSPOT_CXX
737ARFLAGS
738AR
739LDEXECXX
740LDCXX
741LDEXE
742LD
743ac_ct_OBJC
744OBJCFLAGS
745OBJC
746ac_ct_CXX
747CXXFLAGS
748CXX
749ac_ct_PROPER_COMPILER_CXX
750PROPER_COMPILER_CXX
751POTENTIAL_CXX
752TOOLS_DIR_CXX
753OBJEXT
754EXEEXT
755ac_ct_CC
756CPPFLAGS
757LDFLAGS
758CFLAGS
759CC
760ac_ct_PROPER_COMPILER_CC
761PROPER_COMPILER_CC
762POTENTIAL_CC
763TOOLS_DIR_CC
764BUILD_LD
765BUILD_CXX
766BUILD_CC
767MSVCR_DLL
768VS_PATH
769VS_LIB
770VS_INCLUDE
771CYGWIN_LINK
772AR_OUT_OPTION
773LD_OUT_OPTION
774EXE_OUT_OPTION
775CC_OUT_OPTION
776BUILD_HOTSPOT
777HOTSPOT_DIST
778BUILD_OUTPUT
779OVERRIDE_SRC_ROOT
780ADD_SRC_ROOT
781JDK_TOPDIR
782NASHORN_TOPDIR
783HOTSPOT_TOPDIR
784JAXWS_TOPDIR
785JAXP_TOPDIR
786CORBA_TOPDIR
787LANGTOOLS_TOPDIR
788BOOT_JDK_JVMARGS
789JAVAC_FLAGS
790BOOT_JDK_SOURCETARGET
791BOOT_JDK
792BOOT_TOOLSJAR
793BOOT_RTJAR
794JAVA_CHECK
795JAVAC_CHECK
796COOKED_BUILD_NUMBER
797JDK_VERSION
798COPYRIGHT_YEAR
799MACOSX_BUNDLE_ID_BASE
800MACOSX_BUNDLE_NAME_BASE
801COMPANY_NAME
802JDK_RC_PLATFORM_NAME
803PRODUCT_SUFFIX
804PRODUCT_NAME
805LAUNCHER_NAME
806MILESTONE
807JDK_BUILD_NUMBER
808JDK_UPDATE_VERSION
809JDK_MICRO_VERSION
810JDK_MINOR_VERSION
811JDK_MAJOR_VERSION
812USER_RELEASE_SUFFIX
813COMPRESS_JARS
814UNLIMITED_CRYPTO
815CACERTS_FILE
816TEST_IN_BUILD
817BUILD_HEADLESS
818SUPPORT_HEADFUL
819SUPPORT_HEADLESS
820BDEPS_FTP
821BDEPS_UNZIP
822OS_VERSION_MICRO
823OS_VERSION_MINOR
824OS_VERSION_MAJOR
825PKG_CONFIG
826CODESIGN
827XATTR
828IS_GNU_TIME
829TIME
830STAT
831HG
832READELF
833OTOOL
834LDD
835ZIP
836UNZIP
837FIND_DELETE
838MAKE
839CHECK_TOOLSDIR_MAKE
840CHECK_TOOLSDIR_GMAKE
841CHECK_MAKE
842CHECK_GMAKE
843PKGHANDLER
844OUTPUT_ROOT
845CONF_NAME
846SPEC
847BUILD_VARIANT_RELEASE
848DEBUG_CLASSFILES
849FASTDEBUG
850VARIANT
851DEBUG_LEVEL
852MACOSX_UNIVERSAL
853INCLUDE_SA
854JVM_VARIANT_ZEROSHARK
855JVM_VARIANT_ZERO
856JVM_VARIANT_KERNEL
857JVM_VARIANT_MINIMAL1
858JVM_VARIANT_CLIENT
859JVM_VARIANT_SERVER
860JVM_VARIANTS
861JDK_VARIANT
862SET_OPENJDK
863BUILD_LOG_WRAPPER
864BUILD_LOG_PREVIOUS
865BUILD_LOG
866SYS_ROOT
867PATH_SEP
868SRC_ROOT
869ZERO_ARCHDEF
870DEFINE_CROSS_COMPILE_ARCH
871LP64
872OPENJDK_TARGET_OS_API_DIR
873OPENJDK_TARGET_CPU_JLI_CFLAGS
874OPENJDK_TARGET_CPU_OSARCH
875OPENJDK_TARGET_CPU_ISADIR
876OPENJDK_TARGET_CPU_LIBDIR
877OPENJDK_TARGET_CPU_LEGACY_LIB
878OPENJDK_TARGET_CPU_LEGACY
879REQUIRED_OS_VERSION
880REQUIRED_OS_NAME
881COMPILE_TYPE
882OPENJDK_TARGET_CPU_ENDIAN
883OPENJDK_TARGET_CPU_BITS
884OPENJDK_TARGET_CPU_ARCH
885OPENJDK_TARGET_CPU
886OPENJDK_TARGET_OS_API
887OPENJDK_TARGET_OS
888OPENJDK_BUILD_CPU_ENDIAN
889OPENJDK_BUILD_CPU_BITS
890OPENJDK_BUILD_CPU_ARCH
891OPENJDK_BUILD_CPU
892OPENJDK_BUILD_OS_API
893OPENJDK_BUILD_OS
894OPENJDK_BUILD_AUTOCONF_NAME
895OPENJDK_TARGET_AUTOCONF_NAME
896target_os
897target_vendor
898target_cpu
899target
900host_os
901host_vendor
902host_cpu
903host
904build_os
905build_vendor
906build_cpu
907build
908SETFILE
909DF
910READLINK
911CYGPATH
912NAWK
913SED
914FGREP
915EGREP
916GREP
917AWK
918XARGS
919WHICH
920WC
921UNIQ
922UNAME
923TR
924TOUCH
925TEE
926TAR
927TAIL
928SORT
929SH
930RM
931PRINTF
932MV
933MKTEMP
934MKDIR
935LS
936LN
937HEAD
938FIND
939FILE
940EXPR
941ECHO
942DIRNAME
943DIFF
944DATE
945CUT
946CPIO
947CP
948COMM
949CMP
950CHMOD
951CAT
952BASH
953BASENAME
954DATE_WHEN_CONFIGURED
955CONFIGURE_COMMAND_LINE
956CUSTOM_MAKE_DIR
957target_alias
958host_alias
959build_alias
960LIBS
961ECHO_T
962ECHO_N
963ECHO_C
964DEFS
965mandir
966localedir
967libdir
968psdir
969pdfdir
970dvidir
971htmldir
972infodir
973docdir
974oldincludedir
975includedir
976localstatedir
977sharedstatedir
978sysconfdir
979datadir
980datarootdir
981libexecdir
982sbindir
983bindir
984program_transform_name
985prefix
986exec_prefix
987PACKAGE_URL
988PACKAGE_BUGREPORT
989PACKAGE_STRING
990PACKAGE_VERSION
991PACKAGE_TARNAME
992PACKAGE_NAME
993PATH_SEPARATOR
994SHELL'
995ac_subst_files=''
996ac_user_opts='
997enable_option_checking
998with_custom_make_dir
999with_target_bits
1000with_sys_root
1001with_tools_dir
1002with_devkit
1003enable_openjdk_only
1004with_jdk_variant
1005with_jvm_variants
1006enable_debug
1007with_debug_level
1008with_conf_name
1009with_builddeps_conf
1010with_builddeps_server
1011with_builddeps_dir
1012with_builddeps_group
1013enable_headful
1014enable_hotspot_test_in_build
1015with_cacerts_file
1016enable_unlimited_crypto
1017with_milestone
1018with_update_version
1019with_user_release_suffix
1020with_build_number
1021with_boot_jdk
1022with_boot_jdk_jvmargs
1023with_add_source_root
1024with_override_source_root
1025with_adds_and_overrides
1026with_override_langtools
1027with_override_corba
1028with_override_jaxp
1029with_override_jaxws
1030with_override_hotspot
1031with_override_nashorn
1032with_override_jdk
1033with_import_hotspot
1034with_msvcr_dll
1035with_dxsdk
1036with_dxsdk_lib
1037with_dxsdk_include
1038with_jtreg
1039with_extra_cflags
1040with_extra_cxxflags
1041with_extra_ldflags
1042enable_debug_symbols
1043enable_zip_debug_info
1044enable_macosx_runtime_support
1045with_x
1046with_cups
1047with_cups_include
1048with_freetype
1049with_alsa
1050with_alsa_include
1051with_alsa_lib
1052with_giflib
1053with_zlib
1054with_stdc__lib
1055with_num_cores
1056with_memory_size
1057with_jobs
1058with_sjavac_server_java
1059enable_sjavac
1060enable_precompiled_headers
1061enable_ccache
1062with_ccache_dir
1063'
1064      ac_precious_vars='build_alias
1065host_alias
1066target_alias
1067PKG_CONFIG
1068CC
1069CFLAGS
1070LDFLAGS
1071LIBS
1072CPPFLAGS
1073CXX
1074CXXFLAGS
1075CCC
1076OBJC
1077OBJCFLAGS
1078CPP
1079CXXCPP
1080XMKMF
1081FREETYPE2_CFLAGS
1082FREETYPE2_LIBS
1083ALSA_CFLAGS
1084ALSA_LIBS
1085LIBFFI_CFLAGS
1086LIBFFI_LIBS'
1087
1088
1089# Initialize some variables set by options.
1090ac_init_help=
1091ac_init_version=false
1092ac_unrecognized_opts=
1093ac_unrecognized_sep=
1094# The variables have the same names as the options, with
1095# dashes changed to underlines.
1096cache_file=/dev/null
1097exec_prefix=NONE
1098no_create=
1099no_recursion=
1100prefix=NONE
1101program_prefix=NONE
1102program_suffix=NONE
1103program_transform_name=s,x,x,
1104silent=
1105site=
1106srcdir=
1107verbose=
1108x_includes=NONE
1109x_libraries=NONE
1110
1111# Installation directory options.
1112# These are left unexpanded so users can "make install exec_prefix=/foo"
1113# and all the variables that are supposed to be based on exec_prefix
1114# by default will actually change.
1115# Use braces instead of parens because sh, perl, etc. also accept them.
1116# (The list follows the same order as the GNU Coding Standards.)
1117bindir='${exec_prefix}/bin'
1118sbindir='${exec_prefix}/sbin'
1119libexecdir='${exec_prefix}/libexec'
1120datarootdir='${prefix}/share'
1121datadir='${datarootdir}'
1122sysconfdir='${prefix}/etc'
1123sharedstatedir='${prefix}/com'
1124localstatedir='${prefix}/var'
1125includedir='${prefix}/include'
1126oldincludedir='/usr/include'
1127docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1128infodir='${datarootdir}/info'
1129htmldir='${docdir}'
1130dvidir='${docdir}'
1131pdfdir='${docdir}'
1132psdir='${docdir}'
1133libdir='${exec_prefix}/lib'
1134localedir='${datarootdir}/locale'
1135mandir='${datarootdir}/man'
1136
1137ac_prev=
1138ac_dashdash=
1139for ac_option
1140do
1141  # If the previous option needs an argument, assign it.
1142  if test -n "$ac_prev"; then
1143    eval $ac_prev=\$ac_option
1144    ac_prev=
1145    continue
1146  fi
1147
1148  case $ac_option in
1149  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1150  *=)   ac_optarg= ;;
1151  *)    ac_optarg=yes ;;
1152  esac
1153
1154  # Accept the important Cygnus configure options, so we can diagnose typos.
1155
1156  case $ac_dashdash$ac_option in
1157  --)
1158    ac_dashdash=yes ;;
1159
1160  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1161    ac_prev=bindir ;;
1162  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1163    bindir=$ac_optarg ;;
1164
1165  -build | --build | --buil | --bui | --bu)
1166    ac_prev=build_alias ;;
1167  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1168    build_alias=$ac_optarg ;;
1169
1170  -cache-file | --cache-file | --cache-fil | --cache-fi \
1171  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1172    ac_prev=cache_file ;;
1173  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1174  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1175    cache_file=$ac_optarg ;;
1176
1177  --config-cache | -C)
1178    cache_file=config.cache ;;
1179
1180  -datadir | --datadir | --datadi | --datad)
1181    ac_prev=datadir ;;
1182  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1183    datadir=$ac_optarg ;;
1184
1185  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1186  | --dataroo | --dataro | --datar)
1187    ac_prev=datarootdir ;;
1188  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1189  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1190    datarootdir=$ac_optarg ;;
1191
1192  -disable-* | --disable-*)
1193    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1194    # Reject names that are not valid shell variable names.
1195    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1196      as_fn_error $? "invalid feature name: $ac_useropt"
1197    ac_useropt_orig=$ac_useropt
1198    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1199    case $ac_user_opts in
1200      *"
1201"enable_$ac_useropt"
1202"*) ;;
1203      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1204	 ac_unrecognized_sep=', ';;
1205    esac
1206    eval enable_$ac_useropt=no ;;
1207
1208  -docdir | --docdir | --docdi | --doc | --do)
1209    ac_prev=docdir ;;
1210  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1211    docdir=$ac_optarg ;;
1212
1213  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1214    ac_prev=dvidir ;;
1215  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1216    dvidir=$ac_optarg ;;
1217
1218  -enable-* | --enable-*)
1219    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1220    # Reject names that are not valid shell variable names.
1221    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1222      as_fn_error $? "invalid feature name: $ac_useropt"
1223    ac_useropt_orig=$ac_useropt
1224    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1225    case $ac_user_opts in
1226      *"
1227"enable_$ac_useropt"
1228"*) ;;
1229      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1230	 ac_unrecognized_sep=', ';;
1231    esac
1232    eval enable_$ac_useropt=\$ac_optarg ;;
1233
1234  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1235  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1236  | --exec | --exe | --ex)
1237    ac_prev=exec_prefix ;;
1238  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1239  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1240  | --exec=* | --exe=* | --ex=*)
1241    exec_prefix=$ac_optarg ;;
1242
1243  -gas | --gas | --ga | --g)
1244    # Obsolete; use --with-gas.
1245    with_gas=yes ;;
1246
1247  -help | --help | --hel | --he | -h)
1248    ac_init_help=long ;;
1249  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1250    ac_init_help=recursive ;;
1251  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1252    ac_init_help=short ;;
1253
1254  -host | --host | --hos | --ho)
1255    ac_prev=host_alias ;;
1256  -host=* | --host=* | --hos=* | --ho=*)
1257    host_alias=$ac_optarg ;;
1258
1259  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1260    ac_prev=htmldir ;;
1261  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1262  | --ht=*)
1263    htmldir=$ac_optarg ;;
1264
1265  -includedir | --includedir | --includedi | --included | --include \
1266  | --includ | --inclu | --incl | --inc)
1267    ac_prev=includedir ;;
1268  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1269  | --includ=* | --inclu=* | --incl=* | --inc=*)
1270    includedir=$ac_optarg ;;
1271
1272  -infodir | --infodir | --infodi | --infod | --info | --inf)
1273    ac_prev=infodir ;;
1274  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1275    infodir=$ac_optarg ;;
1276
1277  -libdir | --libdir | --libdi | --libd)
1278    ac_prev=libdir ;;
1279  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1280    libdir=$ac_optarg ;;
1281
1282  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1283  | --libexe | --libex | --libe)
1284    ac_prev=libexecdir ;;
1285  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1286  | --libexe=* | --libex=* | --libe=*)
1287    libexecdir=$ac_optarg ;;
1288
1289  -localedir | --localedir | --localedi | --localed | --locale)
1290    ac_prev=localedir ;;
1291  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1292    localedir=$ac_optarg ;;
1293
1294  -localstatedir | --localstatedir | --localstatedi | --localstated \
1295  | --localstate | --localstat | --localsta | --localst | --locals)
1296    ac_prev=localstatedir ;;
1297  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1298  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1299    localstatedir=$ac_optarg ;;
1300
1301  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1302    ac_prev=mandir ;;
1303  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1304    mandir=$ac_optarg ;;
1305
1306  -nfp | --nfp | --nf)
1307    # Obsolete; use --without-fp.
1308    with_fp=no ;;
1309
1310  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1311  | --no-cr | --no-c | -n)
1312    no_create=yes ;;
1313
1314  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1315  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1316    no_recursion=yes ;;
1317
1318  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1319  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1320  | --oldin | --oldi | --old | --ol | --o)
1321    ac_prev=oldincludedir ;;
1322  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1323  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1324  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1325    oldincludedir=$ac_optarg ;;
1326
1327  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1328    ac_prev=prefix ;;
1329  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1330    prefix=$ac_optarg ;;
1331
1332  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1333  | --program-pre | --program-pr | --program-p)
1334    ac_prev=program_prefix ;;
1335  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1336  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1337    program_prefix=$ac_optarg ;;
1338
1339  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1340  | --program-suf | --program-su | --program-s)
1341    ac_prev=program_suffix ;;
1342  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1343  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1344    program_suffix=$ac_optarg ;;
1345
1346  -program-transform-name | --program-transform-name \
1347  | --program-transform-nam | --program-transform-na \
1348  | --program-transform-n | --program-transform- \
1349  | --program-transform | --program-transfor \
1350  | --program-transfo | --program-transf \
1351  | --program-trans | --program-tran \
1352  | --progr-tra | --program-tr | --program-t)
1353    ac_prev=program_transform_name ;;
1354  -program-transform-name=* | --program-transform-name=* \
1355  | --program-transform-nam=* | --program-transform-na=* \
1356  | --program-transform-n=* | --program-transform-=* \
1357  | --program-transform=* | --program-transfor=* \
1358  | --program-transfo=* | --program-transf=* \
1359  | --program-trans=* | --program-tran=* \
1360  | --progr-tra=* | --program-tr=* | --program-t=*)
1361    program_transform_name=$ac_optarg ;;
1362
1363  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1364    ac_prev=pdfdir ;;
1365  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1366    pdfdir=$ac_optarg ;;
1367
1368  -psdir | --psdir | --psdi | --psd | --ps)
1369    ac_prev=psdir ;;
1370  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1371    psdir=$ac_optarg ;;
1372
1373  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1374  | -silent | --silent | --silen | --sile | --sil)
1375    silent=yes ;;
1376
1377  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1378    ac_prev=sbindir ;;
1379  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1380  | --sbi=* | --sb=*)
1381    sbindir=$ac_optarg ;;
1382
1383  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1384  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1385  | --sharedst | --shareds | --shared | --share | --shar \
1386  | --sha | --sh)
1387    ac_prev=sharedstatedir ;;
1388  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1389  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1390  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1391  | --sha=* | --sh=*)
1392    sharedstatedir=$ac_optarg ;;
1393
1394  -site | --site | --sit)
1395    ac_prev=site ;;
1396  -site=* | --site=* | --sit=*)
1397    site=$ac_optarg ;;
1398
1399  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1400    ac_prev=srcdir ;;
1401  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1402    srcdir=$ac_optarg ;;
1403
1404  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1405  | --syscon | --sysco | --sysc | --sys | --sy)
1406    ac_prev=sysconfdir ;;
1407  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1408  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1409    sysconfdir=$ac_optarg ;;
1410
1411  -target | --target | --targe | --targ | --tar | --ta | --t)
1412    ac_prev=target_alias ;;
1413  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1414    target_alias=$ac_optarg ;;
1415
1416  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1417    verbose=yes ;;
1418
1419  -version | --version | --versio | --versi | --vers | -V)
1420    ac_init_version=: ;;
1421
1422  -with-* | --with-*)
1423    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1424    # Reject names that are not valid shell variable names.
1425    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1426      as_fn_error $? "invalid package name: $ac_useropt"
1427    ac_useropt_orig=$ac_useropt
1428    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1429    case $ac_user_opts in
1430      *"
1431"with_$ac_useropt"
1432"*) ;;
1433      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1434	 ac_unrecognized_sep=', ';;
1435    esac
1436    eval with_$ac_useropt=\$ac_optarg ;;
1437
1438  -without-* | --without-*)
1439    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1440    # Reject names that are not valid shell variable names.
1441    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1442      as_fn_error $? "invalid package name: $ac_useropt"
1443    ac_useropt_orig=$ac_useropt
1444    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1445    case $ac_user_opts in
1446      *"
1447"with_$ac_useropt"
1448"*) ;;
1449      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1450	 ac_unrecognized_sep=', ';;
1451    esac
1452    eval with_$ac_useropt=no ;;
1453
1454  --x)
1455    # Obsolete; use --with-x.
1456    with_x=yes ;;
1457
1458  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1459  | --x-incl | --x-inc | --x-in | --x-i)
1460    ac_prev=x_includes ;;
1461  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1462  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1463    x_includes=$ac_optarg ;;
1464
1465  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1466  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1467    ac_prev=x_libraries ;;
1468  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1469  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1470    x_libraries=$ac_optarg ;;
1471
1472  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1473Try \`$0 --help' for more information"
1474    ;;
1475
1476  *=*)
1477    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1478    # Reject names that are not valid shell variable names.
1479    case $ac_envvar in #(
1480      '' | [0-9]* | *[!_$as_cr_alnum]* )
1481      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1482    esac
1483    eval $ac_envvar=\$ac_optarg
1484    export $ac_envvar ;;
1485
1486  *)
1487    # FIXME: should be removed in autoconf 3.0.
1488    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1489    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1490      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1491    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1492    ;;
1493
1494  esac
1495done
1496
1497if test -n "$ac_prev"; then
1498  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1499  as_fn_error $? "missing argument to $ac_option"
1500fi
1501
1502if test -n "$ac_unrecognized_opts"; then
1503  case $enable_option_checking in
1504    no) ;;
1505    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1506    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1507  esac
1508fi
1509
1510# Check all directory arguments for consistency.
1511for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1512		datadir sysconfdir sharedstatedir localstatedir includedir \
1513		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1514		libdir localedir mandir
1515do
1516  eval ac_val=\$$ac_var
1517  # Remove trailing slashes.
1518  case $ac_val in
1519    */ )
1520      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1521      eval $ac_var=\$ac_val;;
1522  esac
1523  # Be sure to have absolute directory names.
1524  case $ac_val in
1525    [\\/$]* | ?:[\\/]* )  continue;;
1526    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1527  esac
1528  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1529done
1530
1531# There might be people who depend on the old broken behavior: `$host'
1532# used to hold the argument of --host etc.
1533# FIXME: To remove some day.
1534build=$build_alias
1535host=$host_alias
1536target=$target_alias
1537
1538# FIXME: To remove some day.
1539if test "x$host_alias" != x; then
1540  if test "x$build_alias" = x; then
1541    cross_compiling=maybe
1542  elif test "x$build_alias" != "x$host_alias"; then
1543    cross_compiling=yes
1544  fi
1545fi
1546
1547ac_tool_prefix=
1548test -n "$host_alias" && ac_tool_prefix=$host_alias-
1549
1550test "$silent" = yes && exec 6>/dev/null
1551
1552
1553ac_pwd=`pwd` && test -n "$ac_pwd" &&
1554ac_ls_di=`ls -di .` &&
1555ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1556  as_fn_error $? "working directory cannot be determined"
1557test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1558  as_fn_error $? "pwd does not report name of working directory"
1559
1560
1561# Find the source files, if location was not specified.
1562if test -z "$srcdir"; then
1563  ac_srcdir_defaulted=yes
1564  # Try the directory containing this script, then the parent directory.
1565  ac_confdir=`$as_dirname -- "$as_myself" ||
1566$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1567	 X"$as_myself" : 'X\(//\)[^/]' \| \
1568	 X"$as_myself" : 'X\(//\)$' \| \
1569	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1570$as_echo X"$as_myself" |
1571    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1572	    s//\1/
1573	    q
1574	  }
1575	  /^X\(\/\/\)[^/].*/{
1576	    s//\1/
1577	    q
1578	  }
1579	  /^X\(\/\/\)$/{
1580	    s//\1/
1581	    q
1582	  }
1583	  /^X\(\/\).*/{
1584	    s//\1/
1585	    q
1586	  }
1587	  s/.*/./; q'`
1588  srcdir=$ac_confdir
1589  if test ! -r "$srcdir/$ac_unique_file"; then
1590    srcdir=..
1591  fi
1592else
1593  ac_srcdir_defaulted=no
1594fi
1595if test ! -r "$srcdir/$ac_unique_file"; then
1596  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1597  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1598fi
1599ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1600ac_abs_confdir=`(
1601	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1602	pwd)`
1603# When building in place, set srcdir=.
1604if test "$ac_abs_confdir" = "$ac_pwd"; then
1605  srcdir=.
1606fi
1607# Remove unnecessary trailing slashes from srcdir.
1608# Double slashes in file names in object file debugging info
1609# mess up M-x gdb in Emacs.
1610case $srcdir in
1611*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1612esac
1613for ac_var in $ac_precious_vars; do
1614  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1615  eval ac_env_${ac_var}_value=\$${ac_var}
1616  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1617  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1618done
1619
1620#
1621# Report the --help message.
1622#
1623if test "$ac_init_help" = "long"; then
1624  # Omit some internal or obsolete options to make the list less imposing.
1625  # This message is too long to be a string in the A/UX 3.1 sh.
1626  cat <<_ACEOF
1627\`configure' configures OpenJDK jdk8 to adapt to many kinds of systems.
1628
1629Usage: $0 [OPTION]... [VAR=VALUE]...
1630
1631To assign environment variables (e.g., CC, CFLAGS...), specify them as
1632VAR=VALUE.  See below for descriptions of some of the useful variables.
1633
1634Defaults for the options are specified in brackets.
1635
1636Configuration:
1637  -h, --help              display this help and exit
1638      --help=short        display options specific to this package
1639      --help=recursive    display the short help of all the included packages
1640  -V, --version           display version information and exit
1641  -q, --quiet, --silent   do not print \`checking ...' messages
1642      --cache-file=FILE   cache test results in FILE [disabled]
1643  -C, --config-cache      alias for \`--cache-file=config.cache'
1644  -n, --no-create         do not create output files
1645      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1646
1647Installation directories:
1648  --prefix=PREFIX         install architecture-independent files in PREFIX
1649                          [$ac_default_prefix]
1650  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1651                          [PREFIX]
1652
1653By default, \`make install' will install all the files in
1654\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1655an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1656for instance \`--prefix=\$HOME'.
1657
1658For better control, use the options below.
1659
1660Fine tuning of the installation directories:
1661  --bindir=DIR            user executables [EPREFIX/bin]
1662  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1663  --libexecdir=DIR        program executables [EPREFIX/libexec]
1664  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1665  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1666  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1667  --libdir=DIR            object code libraries [EPREFIX/lib]
1668  --includedir=DIR        C header files [PREFIX/include]
1669  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1670  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1671  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1672  --infodir=DIR           info documentation [DATAROOTDIR/info]
1673  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1674  --mandir=DIR            man documentation [DATAROOTDIR/man]
1675  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1676  --htmldir=DIR           html documentation [DOCDIR]
1677  --dvidir=DIR            dvi documentation [DOCDIR]
1678  --pdfdir=DIR            pdf documentation [DOCDIR]
1679  --psdir=DIR             ps documentation [DOCDIR]
1680_ACEOF
1681
1682  cat <<\_ACEOF
1683
1684X features:
1685  --x-includes=DIR    X include files are in DIR
1686  --x-libraries=DIR   X library files are in DIR
1687
1688System types:
1689  --build=BUILD     configure for building on BUILD [guessed]
1690  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1691  --target=TARGET   configure for building compilers for TARGET [HOST]
1692_ACEOF
1693fi
1694
1695if test -n "$ac_init_help"; then
1696  case $ac_init_help in
1697     short | recursive ) echo "Configuration of OpenJDK jdk8:";;
1698   esac
1699  cat <<\_ACEOF
1700
1701Optional Features:
1702  --disable-option-checking  ignore unrecognized --enable/--with options
1703  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1704  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1705  --enable-openjdk-only   suppress building custom source even if present
1706                          [disabled]
1707  --enable-debug          set the debug level to fastdebug (shorthand for
1708                          --with-debug-level=fastdebug) [disabled]
1709  --disable-headful       disable building headful support (graphical UI
1710                          support) [enabled]
1711  --enable-hotspot-test-in-build
1712                          run the Queens test after Hotspot build [disabled]
1713  --enable-unlimited-crypto
1714                          Enable unlimited crypto policy [disabled]
1715  --disable-debug-symbols disable generation of debug symbols [enabled]
1716  --disable-zip-debug-info
1717                          disable zipping of debug-info files [enabled]
1718  --disable-macosx-runtime-support
1719                          disable the use of MacOSX Java runtime support
1720                          framework [enabled]
1721  --enable-sjavac         use sjavac to do fast incremental compiles
1722                          [disabled]
1723  --disable-precompiled-headers
1724                          disable using precompiled headers when compiling C++
1725                          [enabled]
1726  --disable-ccache        disable using ccache to speed up recompilations
1727                          [enabled]
1728
1729Optional Packages:
1730  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1731  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1732  --with-custom-make-dir  use this directory for custom build/make files
1733  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
1734                          support it), e.g. --with-target-bits=32 [guessed]
1735  --with-sys-root         pass this sys-root to the compilers and tools (for
1736                          cross-compiling)
1737  --with-tools-dir        search this directory for compilers and tools (for
1738                          cross-compiling)
1739  --with-devkit           use this directory as base for tools-dir and
1740                          sys-root (for cross-compiling)
1741  --with-jdk-variant      JDK variant to build (normal) [normal]
1742  --with-jvm-variants     JVM variants (separated by commas) to build (server,
1743                          client, minimal1, kernel, zero, zeroshark) [server]
1744  --with-debug-level      set the debug level (release, fastdebug, slowdebug)
1745                          [release]
1746  --with-conf-name        use this as the name of the configuration [generated
1747                          from important configuration options]
1748  --with-builddeps-conf   use this configuration file for the builddeps
1749  --with-builddeps-server download and use build dependencies from this server
1750                          url
1751  --with-builddeps-dir    store downloaded build dependencies here
1752                          [/localhome/builddeps]
1753  --with-builddeps-group  chgrp the downloaded build dependencies to this
1754                          group
1755  --with-cacerts-file     specify alternative cacerts file
1756  --with-milestone        Set milestone value for build [internal]
1757  --with-update-version   Set update version value for build [b00]
1758  --with-user-release-suffix
1759                          Add a custom string to the version string if build
1760                          number isn't set.[username_builddateb00]
1761  --with-build-number     Set build number value for build [b00]
1762  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
1763  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all
1764                          invocations of the Boot JDK, overriding the default
1765                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
1766                          -enableassertions"
1767  --with-add-source-root  for each and every source directory, look in this
1768                          additional source root for the same directory; if it
1769                          exists and have files in it, include it in the build
1770  --with-override-source-root
1771                          for each and every source directory, look in this
1772                          override source root for the same directory; if it
1773                          exists, use that directory instead and ignore the
1774                          directory in the original source root
1775  --with-adds-and-overrides
1776                          use the subdirs 'adds' and 'overrides' in the
1777                          specified directory as add-source-root and
1778                          override-source-root
1779  --with-override-langtools
1780                          use this langtools dir for the build
1781  --with-override-corba   use this corba dir for the build
1782  --with-override-jaxp    use this jaxp dir for the build
1783  --with-override-jaxws   use this jaxws dir for the build
1784  --with-override-hotspot use this hotspot dir for the build
1785  --with-override-nashorn use this nashorn dir for the build
1786  --with-override-jdk     use this jdk dir for the build
1787  --with-import-hotspot   import hotspot binaries from this jdk image or
1788                          hotspot build dist dir instead of building from
1789                          source
1790  --with-msvcr-dll        copy this msvcr100.dll into the built JDK (Windows
1791                          only) [probed]
1792  --with-dxsdk            Deprecated. Option is kept for backwards
1793                          compatibility and is ignored
1794  --with-dxsdk-lib        Deprecated. Option is kept for backwards
1795                          compatibility and is ignored
1796  --with-dxsdk-include    Deprecated. Option is kept for backwards
1797                          compatibility and is ignored
1798  --with-jtreg            Regression Test Harness [probed]
1799  --with-extra-cflags     extra flags to be used when compiling jdk c-files
1800  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
1801  --with-extra-ldflags    extra flags to be used when linking jdk
1802  --with-x                use the X Window System
1803  --with-cups             specify prefix directory for the cups package
1804                          (expecting the headers under PATH/include)
1805  --with-cups-include     specify directory for the cups include files
1806  --with-freetype         specify prefix directory for the freetype2 package
1807                          (expecting the libraries under PATH/lib and the
1808                          headers under PATH/include)
1809  --with-alsa             specify prefix directory for the alsa package
1810                          (expecting the libraries under PATH/lib and the
1811                          headers under PATH/include)
1812  --with-alsa-include     specify directory for the alsa include files
1813  --with-alsa-lib         specify directory for the alsa library
1814  --with-giflib           use giflib from build system or OpenJDK source
1815                          (system, bundled) [bundled]
1816  --with-zlib             use zlib from build system or OpenJDK source
1817                          (system, bundled) [bundled]
1818  --with-stdc++lib=<static>,<dynamic>,<default>
1819                          force linking of the C++ runtime on Linux to either
1820                          static or dynamic, default is static with dynamic as
1821                          fallback
1822  --with-num-cores        number of cores in the build system, e.g.
1823                          --with-num-cores=8 [probed]
1824  --with-memory-size      memory (in MB) available in the build system, e.g.
1825                          --with-memory-size=1024 [probed]
1826  --with-jobs             number of parallel jobs to let make run [calculated
1827                          based on cores and memory]
1828  --with-sjavac-server-java
1829                          use this java binary for running the sjavac
1830                          background server [Boot JDK java]
1831  --with-ccache-dir       where to store ccache files [~/.ccache]
1832
1833Some influential environment variables:
1834  PKG_CONFIG  path to pkg-config utility
1835  CC          C compiler command
1836  CFLAGS      C compiler flags
1837  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1838              nonstandard directory <lib dir>
1839  LIBS        libraries to pass to the linker, e.g. -l<library>
1840  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1841              you have headers in a nonstandard directory <include dir>
1842  CXX         C++ compiler command
1843  CXXFLAGS    C++ compiler flags
1844  OBJC        Objective C compiler command
1845  OBJCFLAGS   Objective C compiler flags
1846  CPP         C preprocessor
1847  CXXCPP      C++ preprocessor
1848  XMKMF       Path to xmkmf, Makefile generator for X Window System
1849  FREETYPE2_CFLAGS
1850              C compiler flags for FREETYPE2, overriding pkg-config
1851  FREETYPE2_LIBS
1852              linker flags for FREETYPE2, overriding pkg-config
1853  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
1854  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
1855  LIBFFI_CFLAGS
1856              C compiler flags for LIBFFI, overriding pkg-config
1857  LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
1858
1859Use these variables to override the choices made by `configure' or to help
1860it to find libraries and programs with nonstandard names/locations.
1861
1862Report bugs to <build-dev@openjdk.java.net>.
1863OpenJDK home page: <http://openjdk.java.net>.
1864_ACEOF
1865ac_status=$?
1866fi
1867
1868if test "$ac_init_help" = "recursive"; then
1869  # If there are subdirs, report their specific --help.
1870  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1871    test -d "$ac_dir" ||
1872      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1873      continue
1874    ac_builddir=.
1875
1876case "$ac_dir" in
1877.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1878*)
1879  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1880  # A ".." for each directory in $ac_dir_suffix.
1881  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1882  case $ac_top_builddir_sub in
1883  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1884  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1885  esac ;;
1886esac
1887ac_abs_top_builddir=$ac_pwd
1888ac_abs_builddir=$ac_pwd$ac_dir_suffix
1889# for backward compatibility:
1890ac_top_builddir=$ac_top_build_prefix
1891
1892case $srcdir in
1893  .)  # We are building in place.
1894    ac_srcdir=.
1895    ac_top_srcdir=$ac_top_builddir_sub
1896    ac_abs_top_srcdir=$ac_pwd ;;
1897  [\\/]* | ?:[\\/]* )  # Absolute name.
1898    ac_srcdir=$srcdir$ac_dir_suffix;
1899    ac_top_srcdir=$srcdir
1900    ac_abs_top_srcdir=$srcdir ;;
1901  *) # Relative name.
1902    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1903    ac_top_srcdir=$ac_top_build_prefix$srcdir
1904    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1905esac
1906ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1907
1908    cd "$ac_dir" || { ac_status=$?; continue; }
1909    # Check for guested configure.
1910    if test -f "$ac_srcdir/configure.gnu"; then
1911      echo &&
1912      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1913    elif test -f "$ac_srcdir/configure"; then
1914      echo &&
1915      $SHELL "$ac_srcdir/configure" --help=recursive
1916    else
1917      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1918    fi || ac_status=$?
1919    cd "$ac_pwd" || { ac_status=$?; break; }
1920  done
1921fi
1922
1923test -n "$ac_init_help" && exit $ac_status
1924if $ac_init_version; then
1925  cat <<\_ACEOF
1926OpenJDK configure jdk8
1927generated by GNU Autoconf 2.69
1928
1929Copyright (C) 2012 Free Software Foundation, Inc.
1930This configure script is free software; the Free Software Foundation
1931gives unlimited permission to copy, distribute and modify it.
1932_ACEOF
1933  exit
1934fi
1935
1936## ------------------------ ##
1937## Autoconf initialization. ##
1938## ------------------------ ##
1939
1940# ac_fn_c_try_compile LINENO
1941# --------------------------
1942# Try to compile conftest.$ac_ext, and return whether this succeeded.
1943ac_fn_c_try_compile ()
1944{
1945  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1946  rm -f conftest.$ac_objext
1947  if { { ac_try="$ac_compile"
1948case "(($ac_try" in
1949  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1950  *) ac_try_echo=$ac_try;;
1951esac
1952eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1953$as_echo "$ac_try_echo"; } >&5
1954  (eval "$ac_compile") 2>conftest.err
1955  ac_status=$?
1956  if test -s conftest.err; then
1957    grep -v '^ *+' conftest.err >conftest.er1
1958    cat conftest.er1 >&5
1959    mv -f conftest.er1 conftest.err
1960  fi
1961  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1962  test $ac_status = 0; } && {
1963	 test -z "$ac_c_werror_flag" ||
1964	 test ! -s conftest.err
1965       } && test -s conftest.$ac_objext; then :
1966  ac_retval=0
1967else
1968  $as_echo "$as_me: failed program was:" >&5
1969sed 's/^/| /' conftest.$ac_ext >&5
1970
1971	ac_retval=1
1972fi
1973  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1974  as_fn_set_status $ac_retval
1975
1976} # ac_fn_c_try_compile
1977
1978# ac_fn_cxx_try_compile LINENO
1979# ----------------------------
1980# Try to compile conftest.$ac_ext, and return whether this succeeded.
1981ac_fn_cxx_try_compile ()
1982{
1983  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1984  rm -f conftest.$ac_objext
1985  if { { ac_try="$ac_compile"
1986case "(($ac_try" in
1987  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1988  *) ac_try_echo=$ac_try;;
1989esac
1990eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1991$as_echo "$ac_try_echo"; } >&5
1992  (eval "$ac_compile") 2>conftest.err
1993  ac_status=$?
1994  if test -s conftest.err; then
1995    grep -v '^ *+' conftest.err >conftest.er1
1996    cat conftest.er1 >&5
1997    mv -f conftest.er1 conftest.err
1998  fi
1999  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2000  test $ac_status = 0; } && {
2001	 test -z "$ac_cxx_werror_flag" ||
2002	 test ! -s conftest.err
2003       } && test -s conftest.$ac_objext; then :
2004  ac_retval=0
2005else
2006  $as_echo "$as_me: failed program was:" >&5
2007sed 's/^/| /' conftest.$ac_ext >&5
2008
2009	ac_retval=1
2010fi
2011  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2012  as_fn_set_status $ac_retval
2013
2014} # ac_fn_cxx_try_compile
2015
2016# ac_fn_objc_try_compile LINENO
2017# -----------------------------
2018# Try to compile conftest.$ac_ext, and return whether this succeeded.
2019ac_fn_objc_try_compile ()
2020{
2021  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2022  rm -f conftest.$ac_objext
2023  if { { ac_try="$ac_compile"
2024case "(($ac_try" in
2025  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2026  *) ac_try_echo=$ac_try;;
2027esac
2028eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2029$as_echo "$ac_try_echo"; } >&5
2030  (eval "$ac_compile") 2>conftest.err
2031  ac_status=$?
2032  if test -s conftest.err; then
2033    grep -v '^ *+' conftest.err >conftest.er1
2034    cat conftest.er1 >&5
2035    mv -f conftest.er1 conftest.err
2036  fi
2037  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2038  test $ac_status = 0; } && {
2039	 test -z "$ac_objc_werror_flag" ||
2040	 test ! -s conftest.err
2041       } && test -s conftest.$ac_objext; then :
2042  ac_retval=0
2043else
2044  $as_echo "$as_me: failed program was:" >&5
2045sed 's/^/| /' conftest.$ac_ext >&5
2046
2047	ac_retval=1
2048fi
2049  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2050  as_fn_set_status $ac_retval
2051
2052} # ac_fn_objc_try_compile
2053
2054# ac_fn_c_try_cpp LINENO
2055# ----------------------
2056# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2057ac_fn_c_try_cpp ()
2058{
2059  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2060  if { { ac_try="$ac_cpp conftest.$ac_ext"
2061case "(($ac_try" in
2062  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2063  *) ac_try_echo=$ac_try;;
2064esac
2065eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2066$as_echo "$ac_try_echo"; } >&5
2067  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2068  ac_status=$?
2069  if test -s conftest.err; then
2070    grep -v '^ *+' conftest.err >conftest.er1
2071    cat conftest.er1 >&5
2072    mv -f conftest.er1 conftest.err
2073  fi
2074  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2075  test $ac_status = 0; } > conftest.i && {
2076	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2077	 test ! -s conftest.err
2078       }; then :
2079  ac_retval=0
2080else
2081  $as_echo "$as_me: failed program was:" >&5
2082sed 's/^/| /' conftest.$ac_ext >&5
2083
2084    ac_retval=1
2085fi
2086  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2087  as_fn_set_status $ac_retval
2088
2089} # ac_fn_c_try_cpp
2090
2091# ac_fn_cxx_try_cpp LINENO
2092# ------------------------
2093# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2094ac_fn_cxx_try_cpp ()
2095{
2096  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2097  if { { ac_try="$ac_cpp conftest.$ac_ext"
2098case "(($ac_try" in
2099  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2100  *) ac_try_echo=$ac_try;;
2101esac
2102eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2103$as_echo "$ac_try_echo"; } >&5
2104  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2105  ac_status=$?
2106  if test -s conftest.err; then
2107    grep -v '^ *+' conftest.err >conftest.er1
2108    cat conftest.er1 >&5
2109    mv -f conftest.er1 conftest.err
2110  fi
2111  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2112  test $ac_status = 0; } > conftest.i && {
2113	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2114	 test ! -s conftest.err
2115       }; then :
2116  ac_retval=0
2117else
2118  $as_echo "$as_me: failed program was:" >&5
2119sed 's/^/| /' conftest.$ac_ext >&5
2120
2121    ac_retval=1
2122fi
2123  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2124  as_fn_set_status $ac_retval
2125
2126} # ac_fn_cxx_try_cpp
2127
2128# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2129# ---------------------------------------------------------
2130# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2131# the include files in INCLUDES and setting the cache variable VAR
2132# accordingly.
2133ac_fn_cxx_check_header_mongrel ()
2134{
2135  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2136  if eval \${$3+:} false; then :
2137  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2138$as_echo_n "checking for $2... " >&6; }
2139if eval \${$3+:} false; then :
2140  $as_echo_n "(cached) " >&6
2141fi
2142eval ac_res=\$$3
2143	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2144$as_echo "$ac_res" >&6; }
2145else
2146  # Is the header compilable?
2147{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2148$as_echo_n "checking $2 usability... " >&6; }
2149cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2150/* end confdefs.h.  */
2151$4
2152#include <$2>
2153_ACEOF
2154if ac_fn_cxx_try_compile "$LINENO"; then :
2155  ac_header_compiler=yes
2156else
2157  ac_header_compiler=no
2158fi
2159rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2160{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2161$as_echo "$ac_header_compiler" >&6; }
2162
2163# Is the header present?
2164{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2165$as_echo_n "checking $2 presence... " >&6; }
2166cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2167/* end confdefs.h.  */
2168#include <$2>
2169_ACEOF
2170if ac_fn_cxx_try_cpp "$LINENO"; then :
2171  ac_header_preproc=yes
2172else
2173  ac_header_preproc=no
2174fi
2175rm -f conftest.err conftest.i conftest.$ac_ext
2176{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2177$as_echo "$ac_header_preproc" >&6; }
2178
2179# So?  What about this header?
2180case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2181  yes:no: )
2182    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2183$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2184    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2185$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2186    ;;
2187  no:yes:* )
2188    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2189$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2190    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2191$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2192    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2193$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2194    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2195$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2196    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2197$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2198( $as_echo "## ----------------------------------------- ##
2199## Report this to build-dev@openjdk.java.net ##
2200## ----------------------------------------- ##"
2201     ) | sed "s/^/$as_me: WARNING:     /" >&2
2202    ;;
2203esac
2204  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2205$as_echo_n "checking for $2... " >&6; }
2206if eval \${$3+:} false; then :
2207  $as_echo_n "(cached) " >&6
2208else
2209  eval "$3=\$ac_header_compiler"
2210fi
2211eval ac_res=\$$3
2212	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2213$as_echo "$ac_res" >&6; }
2214fi
2215  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2216
2217} # ac_fn_cxx_check_header_mongrel
2218
2219# ac_fn_cxx_try_run LINENO
2220# ------------------------
2221# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2222# that executables *can* be run.
2223ac_fn_cxx_try_run ()
2224{
2225  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2226  if { { ac_try="$ac_link"
2227case "(($ac_try" in
2228  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2229  *) ac_try_echo=$ac_try;;
2230esac
2231eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2232$as_echo "$ac_try_echo"; } >&5
2233  (eval "$ac_link") 2>&5
2234  ac_status=$?
2235  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2236  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2237  { { case "(($ac_try" in
2238  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2239  *) ac_try_echo=$ac_try;;
2240esac
2241eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2242$as_echo "$ac_try_echo"; } >&5
2243  (eval "$ac_try") 2>&5
2244  ac_status=$?
2245  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2246  test $ac_status = 0; }; }; then :
2247  ac_retval=0
2248else
2249  $as_echo "$as_me: program exited with status $ac_status" >&5
2250       $as_echo "$as_me: failed program was:" >&5
2251sed 's/^/| /' conftest.$ac_ext >&5
2252
2253       ac_retval=$ac_status
2254fi
2255  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2256  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2257  as_fn_set_status $ac_retval
2258
2259} # ac_fn_cxx_try_run
2260
2261# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2262# ---------------------------------------------------------
2263# Tests whether HEADER exists and can be compiled using the include files in
2264# INCLUDES, setting the cache variable VAR accordingly.
2265ac_fn_cxx_check_header_compile ()
2266{
2267  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2268  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2269$as_echo_n "checking for $2... " >&6; }
2270if eval \${$3+:} false; then :
2271  $as_echo_n "(cached) " >&6
2272else
2273  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2274/* end confdefs.h.  */
2275$4
2276#include <$2>
2277_ACEOF
2278if ac_fn_cxx_try_compile "$LINENO"; then :
2279  eval "$3=yes"
2280else
2281  eval "$3=no"
2282fi
2283rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2284fi
2285eval ac_res=\$$3
2286	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2287$as_echo "$ac_res" >&6; }
2288  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2289
2290} # ac_fn_cxx_check_header_compile
2291
2292# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2293# ----------------------------------------------
2294# Tries to find the compile-time value of EXPR in a program that includes
2295# INCLUDES, setting VAR accordingly. Returns whether the value could be
2296# computed
2297ac_fn_cxx_compute_int ()
2298{
2299  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2300  if test "$cross_compiling" = yes; then
2301    # Depending upon the size, compute the lo and hi bounds.
2302cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2303/* end confdefs.h.  */
2304$4
2305int
2306main ()
2307{
2308static int test_array [1 - 2 * !(($2) >= 0)];
2309test_array [0] = 0;
2310return test_array [0];
2311
2312  ;
2313  return 0;
2314}
2315_ACEOF
2316if ac_fn_cxx_try_compile "$LINENO"; then :
2317  ac_lo=0 ac_mid=0
2318  while :; do
2319    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2320/* end confdefs.h.  */
2321$4
2322int
2323main ()
2324{
2325static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2326test_array [0] = 0;
2327return test_array [0];
2328
2329  ;
2330  return 0;
2331}
2332_ACEOF
2333if ac_fn_cxx_try_compile "$LINENO"; then :
2334  ac_hi=$ac_mid; break
2335else
2336  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2337			if test $ac_lo -le $ac_mid; then
2338			  ac_lo= ac_hi=
2339			  break
2340			fi
2341			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2342fi
2343rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2344  done
2345else
2346  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2347/* end confdefs.h.  */
2348$4
2349int
2350main ()
2351{
2352static int test_array [1 - 2 * !(($2) < 0)];
2353test_array [0] = 0;
2354return test_array [0];
2355
2356  ;
2357  return 0;
2358}
2359_ACEOF
2360if ac_fn_cxx_try_compile "$LINENO"; then :
2361  ac_hi=-1 ac_mid=-1
2362  while :; do
2363    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2364/* end confdefs.h.  */
2365$4
2366int
2367main ()
2368{
2369static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2370test_array [0] = 0;
2371return test_array [0];
2372
2373  ;
2374  return 0;
2375}
2376_ACEOF
2377if ac_fn_cxx_try_compile "$LINENO"; then :
2378  ac_lo=$ac_mid; break
2379else
2380  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2381			if test $ac_mid -le $ac_hi; then
2382			  ac_lo= ac_hi=
2383			  break
2384			fi
2385			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2386fi
2387rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2388  done
2389else
2390  ac_lo= ac_hi=
2391fi
2392rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2393fi
2394rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2395# Binary search between lo and hi bounds.
2396while test "x$ac_lo" != "x$ac_hi"; do
2397  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2398  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2399/* end confdefs.h.  */
2400$4
2401int
2402main ()
2403{
2404static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2405test_array [0] = 0;
2406return test_array [0];
2407
2408  ;
2409  return 0;
2410}
2411_ACEOF
2412if ac_fn_cxx_try_compile "$LINENO"; then :
2413  ac_hi=$ac_mid
2414else
2415  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2416fi
2417rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2418done
2419case $ac_lo in #((
2420?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2421'') ac_retval=1 ;;
2422esac
2423  else
2424    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2425/* end confdefs.h.  */
2426$4
2427static long int longval () { return $2; }
2428static unsigned long int ulongval () { return $2; }
2429#include <stdio.h>
2430#include <stdlib.h>
2431int
2432main ()
2433{
2434
2435  FILE *f = fopen ("conftest.val", "w");
2436  if (! f)
2437    return 1;
2438  if (($2) < 0)
2439    {
2440      long int i = longval ();
2441      if (i != ($2))
2442	return 1;
2443      fprintf (f, "%ld", i);
2444    }
2445  else
2446    {
2447      unsigned long int i = ulongval ();
2448      if (i != ($2))
2449	return 1;
2450      fprintf (f, "%lu", i);
2451    }
2452  /* Do not output a trailing newline, as this causes \r\n confusion
2453     on some platforms.  */
2454  return ferror (f) || fclose (f) != 0;
2455
2456  ;
2457  return 0;
2458}
2459_ACEOF
2460if ac_fn_cxx_try_run "$LINENO"; then :
2461  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2462else
2463  ac_retval=1
2464fi
2465rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2466  conftest.$ac_objext conftest.beam conftest.$ac_ext
2467rm -f conftest.val
2468
2469  fi
2470  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2471  as_fn_set_status $ac_retval
2472
2473} # ac_fn_cxx_compute_int
2474
2475# ac_fn_cxx_try_link LINENO
2476# -------------------------
2477# Try to link conftest.$ac_ext, and return whether this succeeded.
2478ac_fn_cxx_try_link ()
2479{
2480  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2481  rm -f conftest.$ac_objext conftest$ac_exeext
2482  if { { ac_try="$ac_link"
2483case "(($ac_try" in
2484  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2485  *) ac_try_echo=$ac_try;;
2486esac
2487eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2488$as_echo "$ac_try_echo"; } >&5
2489  (eval "$ac_link") 2>conftest.err
2490  ac_status=$?
2491  if test -s conftest.err; then
2492    grep -v '^ *+' conftest.err >conftest.er1
2493    cat conftest.er1 >&5
2494    mv -f conftest.er1 conftest.err
2495  fi
2496  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2497  test $ac_status = 0; } && {
2498	 test -z "$ac_cxx_werror_flag" ||
2499	 test ! -s conftest.err
2500       } && test -s conftest$ac_exeext && {
2501	 test "$cross_compiling" = yes ||
2502	 test -x conftest$ac_exeext
2503       }; then :
2504  ac_retval=0
2505else
2506  $as_echo "$as_me: failed program was:" >&5
2507sed 's/^/| /' conftest.$ac_ext >&5
2508
2509	ac_retval=1
2510fi
2511  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2512  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2513  # interfere with the next link command; also delete a directory that is
2514  # left behind by Apple's compiler.  We do this before executing the actions.
2515  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2516  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2517  as_fn_set_status $ac_retval
2518
2519} # ac_fn_cxx_try_link
2520
2521# ac_fn_cxx_check_func LINENO FUNC VAR
2522# ------------------------------------
2523# Tests whether FUNC exists, setting the cache variable VAR accordingly
2524ac_fn_cxx_check_func ()
2525{
2526  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2527  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2528$as_echo_n "checking for $2... " >&6; }
2529if eval \${$3+:} false; then :
2530  $as_echo_n "(cached) " >&6
2531else
2532  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2533/* end confdefs.h.  */
2534/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2535   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2536#define $2 innocuous_$2
2537
2538/* System header to define __stub macros and hopefully few prototypes,
2539    which can conflict with char $2 (); below.
2540    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2541    <limits.h> exists even on freestanding compilers.  */
2542
2543#ifdef __STDC__
2544# include <limits.h>
2545#else
2546# include <assert.h>
2547#endif
2548
2549#undef $2
2550
2551/* Override any GCC internal prototype to avoid an error.
2552   Use char because int might match the return type of a GCC
2553   builtin and then its argument prototype would still apply.  */
2554#ifdef __cplusplus
2555extern "C"
2556#endif
2557char $2 ();
2558/* The GNU C library defines this for functions which it implements
2559    to always fail with ENOSYS.  Some functions are actually named
2560    something starting with __ and the normal name is an alias.  */
2561#if defined __stub_$2 || defined __stub___$2
2562choke me
2563#endif
2564
2565int
2566main ()
2567{
2568return $2 ();
2569  ;
2570  return 0;
2571}
2572_ACEOF
2573if ac_fn_cxx_try_link "$LINENO"; then :
2574  eval "$3=yes"
2575else
2576  eval "$3=no"
2577fi
2578rm -f core conftest.err conftest.$ac_objext \
2579    conftest$ac_exeext conftest.$ac_ext
2580fi
2581eval ac_res=\$$3
2582	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2583$as_echo "$ac_res" >&6; }
2584  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2585
2586} # ac_fn_cxx_check_func
2587
2588# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2589# -------------------------------------------------------
2590# Tests whether HEADER exists and can be compiled using the include files in
2591# INCLUDES, setting the cache variable VAR accordingly.
2592ac_fn_c_check_header_compile ()
2593{
2594  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2595  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2596$as_echo_n "checking for $2... " >&6; }
2597if eval \${$3+:} false; then :
2598  $as_echo_n "(cached) " >&6
2599else
2600  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2601/* end confdefs.h.  */
2602$4
2603#include <$2>
2604_ACEOF
2605if ac_fn_c_try_compile "$LINENO"; then :
2606  eval "$3=yes"
2607else
2608  eval "$3=no"
2609fi
2610rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2611fi
2612eval ac_res=\$$3
2613	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2614$as_echo "$ac_res" >&6; }
2615  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2616
2617} # ac_fn_c_check_header_compile
2618cat >config.log <<_ACEOF
2619This file contains any messages produced by compilers while
2620running configure, to aid debugging if configure makes a mistake.
2621
2622It was created by OpenJDK $as_me jdk8, which was
2623generated by GNU Autoconf 2.69.  Invocation command line was
2624
2625  $ $0 $@
2626
2627_ACEOF
2628exec 5>>config.log
2629{
2630cat <<_ASUNAME
2631## --------- ##
2632## Platform. ##
2633## --------- ##
2634
2635hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2636uname -m = `(uname -m) 2>/dev/null || echo unknown`
2637uname -r = `(uname -r) 2>/dev/null || echo unknown`
2638uname -s = `(uname -s) 2>/dev/null || echo unknown`
2639uname -v = `(uname -v) 2>/dev/null || echo unknown`
2640
2641/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2642/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2643
2644/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2645/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2646/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2647/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2648/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2649/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2650/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2651
2652_ASUNAME
2653
2654as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2655for as_dir in $PATH
2656do
2657  IFS=$as_save_IFS
2658  test -z "$as_dir" && as_dir=.
2659    $as_echo "PATH: $as_dir"
2660  done
2661IFS=$as_save_IFS
2662
2663} >&5
2664
2665cat >&5 <<_ACEOF
2666
2667
2668## ----------- ##
2669## Core tests. ##
2670## ----------- ##
2671
2672_ACEOF
2673
2674
2675# Keep a trace of the command line.
2676# Strip out --no-create and --no-recursion so they do not pile up.
2677# Strip out --silent because we don't want to record it for future runs.
2678# Also quote any args containing shell meta-characters.
2679# Make two passes to allow for proper duplicate-argument suppression.
2680ac_configure_args=
2681ac_configure_args0=
2682ac_configure_args1=
2683ac_must_keep_next=false
2684for ac_pass in 1 2
2685do
2686  for ac_arg
2687  do
2688    case $ac_arg in
2689    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2690    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2691    | -silent | --silent | --silen | --sile | --sil)
2692      continue ;;
2693    *\'*)
2694      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2695    esac
2696    case $ac_pass in
2697    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2698    2)
2699      as_fn_append ac_configure_args1 " '$ac_arg'"
2700      if test $ac_must_keep_next = true; then
2701	ac_must_keep_next=false # Got value, back to normal.
2702      else
2703	case $ac_arg in
2704	  *=* | --config-cache | -C | -disable-* | --disable-* \
2705	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2706	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2707	  | -with-* | --with-* | -without-* | --without-* | --x)
2708	    case "$ac_configure_args0 " in
2709	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2710	    esac
2711	    ;;
2712	  -* ) ac_must_keep_next=true ;;
2713	esac
2714      fi
2715      as_fn_append ac_configure_args " '$ac_arg'"
2716      ;;
2717    esac
2718  done
2719done
2720{ ac_configure_args0=; unset ac_configure_args0;}
2721{ ac_configure_args1=; unset ac_configure_args1;}
2722
2723# When interrupted or exit'd, cleanup temporary files, and complete
2724# config.log.  We remove comments because anyway the quotes in there
2725# would cause problems or look ugly.
2726# WARNING: Use '\'' to represent an apostrophe within the trap.
2727# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2728trap 'exit_status=$?
2729  # Save into config.log some information that might help in debugging.
2730  {
2731    echo
2732
2733    $as_echo "## ---------------- ##
2734## Cache variables. ##
2735## ---------------- ##"
2736    echo
2737    # The following way of writing the cache mishandles newlines in values,
2738(
2739  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2740    eval ac_val=\$$ac_var
2741    case $ac_val in #(
2742    *${as_nl}*)
2743      case $ac_var in #(
2744      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2745$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2746      esac
2747      case $ac_var in #(
2748      _ | IFS | as_nl) ;; #(
2749      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2750      *) { eval $ac_var=; unset $ac_var;} ;;
2751      esac ;;
2752    esac
2753  done
2754  (set) 2>&1 |
2755    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2756    *${as_nl}ac_space=\ *)
2757      sed -n \
2758	"s/'\''/'\''\\\\'\'''\''/g;
2759	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2760      ;; #(
2761    *)
2762      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2763      ;;
2764    esac |
2765    sort
2766)
2767    echo
2768
2769    $as_echo "## ----------------- ##
2770## Output variables. ##
2771## ----------------- ##"
2772    echo
2773    for ac_var in $ac_subst_vars
2774    do
2775      eval ac_val=\$$ac_var
2776      case $ac_val in
2777      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2778      esac
2779      $as_echo "$ac_var='\''$ac_val'\''"
2780    done | sort
2781    echo
2782
2783    if test -n "$ac_subst_files"; then
2784      $as_echo "## ------------------- ##
2785## File substitutions. ##
2786## ------------------- ##"
2787      echo
2788      for ac_var in $ac_subst_files
2789      do
2790	eval ac_val=\$$ac_var
2791	case $ac_val in
2792	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2793	esac
2794	$as_echo "$ac_var='\''$ac_val'\''"
2795      done | sort
2796      echo
2797    fi
2798
2799    if test -s confdefs.h; then
2800      $as_echo "## ----------- ##
2801## confdefs.h. ##
2802## ----------- ##"
2803      echo
2804      cat confdefs.h
2805      echo
2806    fi
2807    test "$ac_signal" != 0 &&
2808      $as_echo "$as_me: caught signal $ac_signal"
2809    $as_echo "$as_me: exit $exit_status"
2810  } >&5
2811  rm -f core *.core core.conftest.* &&
2812    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2813    exit $exit_status
2814' 0
2815for ac_signal in 1 2 13 15; do
2816  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2817done
2818ac_signal=0
2819
2820# confdefs.h avoids OS command line length limits that DEFS can exceed.
2821rm -f -r conftest* confdefs.h
2822
2823$as_echo "/* confdefs.h */" > confdefs.h
2824
2825# Predefined preprocessor variables.
2826
2827cat >>confdefs.h <<_ACEOF
2828#define PACKAGE_NAME "$PACKAGE_NAME"
2829_ACEOF
2830
2831cat >>confdefs.h <<_ACEOF
2832#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2833_ACEOF
2834
2835cat >>confdefs.h <<_ACEOF
2836#define PACKAGE_VERSION "$PACKAGE_VERSION"
2837_ACEOF
2838
2839cat >>confdefs.h <<_ACEOF
2840#define PACKAGE_STRING "$PACKAGE_STRING"
2841_ACEOF
2842
2843cat >>confdefs.h <<_ACEOF
2844#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2845_ACEOF
2846
2847cat >>confdefs.h <<_ACEOF
2848#define PACKAGE_URL "$PACKAGE_URL"
2849_ACEOF
2850
2851
2852# Let the site file select an alternate cache file if it wants to.
2853# Prefer an explicitly selected file to automatically selected ones.
2854ac_site_file1=NONE
2855ac_site_file2=NONE
2856if test -n "$CONFIG_SITE"; then
2857  # We do not want a PATH search for config.site.
2858  case $CONFIG_SITE in #((
2859    -*)  ac_site_file1=./$CONFIG_SITE;;
2860    */*) ac_site_file1=$CONFIG_SITE;;
2861    *)   ac_site_file1=./$CONFIG_SITE;;
2862  esac
2863elif test "x$prefix" != xNONE; then
2864  ac_site_file1=$prefix/share/config.site
2865  ac_site_file2=$prefix/etc/config.site
2866else
2867  ac_site_file1=$ac_default_prefix/share/config.site
2868  ac_site_file2=$ac_default_prefix/etc/config.site
2869fi
2870for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2871do
2872  test "x$ac_site_file" = xNONE && continue
2873  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2874    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2875$as_echo "$as_me: loading site script $ac_site_file" >&6;}
2876    sed 's/^/| /' "$ac_site_file" >&5
2877    . "$ac_site_file" \
2878      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2879$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2880as_fn_error $? "failed to load site script $ac_site_file
2881See \`config.log' for more details" "$LINENO" 5; }
2882  fi
2883done
2884
2885if test -r "$cache_file"; then
2886  # Some versions of bash will fail to source /dev/null (special files
2887  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
2888  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2889    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2890$as_echo "$as_me: loading cache $cache_file" >&6;}
2891    case $cache_file in
2892      [\\/]* | ?:[\\/]* ) . "$cache_file";;
2893      *)                      . "./$cache_file";;
2894    esac
2895  fi
2896else
2897  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2898$as_echo "$as_me: creating cache $cache_file" >&6;}
2899  >$cache_file
2900fi
2901
2902# Check that the precious variables saved in the cache have kept the same
2903# value.
2904ac_cache_corrupted=false
2905for ac_var in $ac_precious_vars; do
2906  eval ac_old_set=\$ac_cv_env_${ac_var}_set
2907  eval ac_new_set=\$ac_env_${ac_var}_set
2908  eval ac_old_val=\$ac_cv_env_${ac_var}_value
2909  eval ac_new_val=\$ac_env_${ac_var}_value
2910  case $ac_old_set,$ac_new_set in
2911    set,)
2912      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2913$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2914      ac_cache_corrupted=: ;;
2915    ,set)
2916      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2917$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2918      ac_cache_corrupted=: ;;
2919    ,);;
2920    *)
2921      if test "x$ac_old_val" != "x$ac_new_val"; then
2922	# differences in whitespace do not lead to failure.
2923	ac_old_val_w=`echo x $ac_old_val`
2924	ac_new_val_w=`echo x $ac_new_val`
2925	if test "$ac_old_val_w" != "$ac_new_val_w"; then
2926	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2927$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2928	  ac_cache_corrupted=:
2929	else
2930	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2931$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2932	  eval $ac_var=\$ac_old_val
2933	fi
2934	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
2935$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
2936	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
2937$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
2938      fi;;
2939  esac
2940  # Pass precious variables to config.status.
2941  if test "$ac_new_set" = set; then
2942    case $ac_new_val in
2943    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2944    *) ac_arg=$ac_var=$ac_new_val ;;
2945    esac
2946    case " $ac_configure_args " in
2947      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
2948      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2949    esac
2950  fi
2951done
2952if $ac_cache_corrupted; then
2953  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2954$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2955  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2956$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2957  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2958fi
2959## -------------------- ##
2960## Main body of script. ##
2961## -------------------- ##
2962
2963ac_ext=c
2964ac_cpp='$CPP $CPPFLAGS'
2965ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2966ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2967ac_compiler_gnu=$ac_cv_c_compiler_gnu
2968
2969
2970
2971ac_aux_dir=
2972for ac_dir in build-aux "$srcdir"/build-aux; do
2973  if test -f "$ac_dir/install-sh"; then
2974    ac_aux_dir=$ac_dir
2975    ac_install_sh="$ac_aux_dir/install-sh -c"
2976    break
2977  elif test -f "$ac_dir/install.sh"; then
2978    ac_aux_dir=$ac_dir
2979    ac_install_sh="$ac_aux_dir/install.sh -c"
2980    break
2981  elif test -f "$ac_dir/shtool"; then
2982    ac_aux_dir=$ac_dir
2983    ac_install_sh="$ac_aux_dir/shtool install -c"
2984    break
2985  fi
2986done
2987if test -z "$ac_aux_dir"; then
2988  as_fn_error $? "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5
2989fi
2990
2991# These three variables are undocumented and unsupported,
2992# and are intended to be withdrawn in a future Autoconf release.
2993# They can cause serious problems if a builder's source tree is in a directory
2994# whose full name contains unusual characters.
2995ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
2996ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
2997ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
2998
2999
3000# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3001
3002#
3003# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3004# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3005#
3006# This code is free software; you can redistribute it and/or modify it
3007# under the terms of the GNU General Public License version 2 only, as
3008# published by the Free Software Foundation.  Oracle designates this
3009# particular file as subject to the "Classpath" exception as provided
3010# by Oracle in the LICENSE file that accompanied this code.
3011#
3012# This code is distributed in the hope that it will be useful, but WITHOUT
3013# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3014# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3015# version 2 for more details (a copy is included in the LICENSE file that
3016# accompanied this code).
3017#
3018# You should have received a copy of the GNU General Public License version
3019# 2 along with this work; if not, write to the Free Software Foundation,
3020# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3021#
3022# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3023# or visit www.oracle.com if you need additional information or have any
3024# questions.
3025#
3026
3027#
3028# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
3029#
3030# This program is free software; you can redistribute it and/or modify
3031# it under the terms of the GNU General Public License as published by
3032# the Free Software Foundation; either version 2 of the License, or
3033# (at your option) any later version.
3034#
3035# This program is distributed in the hope that it will be useful, but
3036# WITHOUT ANY WARRANTY; without even the implied warranty of
3037# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3038# General Public License for more details.
3039#
3040# You should have received a copy of the GNU General Public License
3041# along with this program; if not, write to the Free Software
3042# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3043#
3044# As a special exception to the GNU General Public License, if you
3045# distribute this file as part of a program that contains a
3046# configuration script generated by Autoconf, you may include it under
3047# the same distribution terms that you use for the rest of that program.
3048
3049# PKG_PROG_PKG_CONFIG([MIN-VERSION])
3050# ----------------------------------
3051# PKG_PROG_PKG_CONFIG
3052
3053# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3054#
3055# Check to see whether a particular set of modules exists.  Similar
3056# to PKG_CHECK_MODULES(), but does not set variables or print errors.
3057#
3058#
3059# Similar to PKG_CHECK_MODULES, make sure that the first instance of
3060# this or PKG_CHECK_MODULES is called, or make sure to call
3061# PKG_CHECK_EXISTS manually
3062# --------------------------------------------------------------
3063
3064
3065
3066# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3067# ---------------------------------------------
3068# _PKG_CONFIG
3069
3070# _PKG_SHORT_ERRORS_SUPPORTED
3071# -----------------------------
3072# _PKG_SHORT_ERRORS_SUPPORTED
3073
3074
3075# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3076# [ACTION-IF-NOT-FOUND])
3077#
3078#
3079# Note that if there is a possibility the first call to
3080# PKG_CHECK_MODULES might not happen, you should be sure to include an
3081# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3082#
3083#
3084# --------------------------------------------------------------
3085# PKG_CHECK_MODULES
3086
3087
3088# Include these first...
3089#
3090# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
3091# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3092#
3093# This code is free software; you can redistribute it and/or modify it
3094# under the terms of the GNU General Public License version 2 only, as
3095# published by the Free Software Foundation.  Oracle designates this
3096# particular file as subject to the "Classpath" exception as provided
3097# by Oracle in the LICENSE file that accompanied this code.
3098#
3099# This code is distributed in the hope that it will be useful, but WITHOUT
3100# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3101# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3102# version 2 for more details (a copy is included in the LICENSE file that
3103# accompanied this code).
3104#
3105# You should have received a copy of the GNU General Public License version
3106# 2 along with this work; if not, write to the Free Software Foundation,
3107# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3108#
3109# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3110# or visit www.oracle.com if you need additional information or have any
3111# questions.
3112#
3113
3114# Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3115# If so, then append $1 to $2\
3116# Also set JVM_ARG_OK to true/false depending on outcome.
3117
3118
3119# Appends a string to a path variable, only adding the : when needed.
3120
3121
3122# This will make sure the given variable points to a full and proper
3123# path. This means:
3124# 1) There will be no spaces in the path. On posix platforms,
3125#    spaces in the path will result in an error. On Windows,
3126#    the path will be rewritten using short-style to be space-free.
3127# 2) The path will be absolute, and it will be in unix-style (on
3128#     cygwin).
3129# $1: The name of the variable to fix
3130
3131
3132# This will make sure the given variable points to a executable
3133# with a full and proper path. This means:
3134# 1) There will be no spaces in the path. On posix platforms,
3135#    spaces in the path will result in an error. On Windows,
3136#    the path will be rewritten using short-style to be space-free.
3137# 2) The path will be absolute, and it will be in unix-style (on
3138#     cygwin).
3139# Any arguments given to the executable is preserved.
3140# If the input variable does not have a directory specification, then
3141# it need to be in the PATH.
3142# $1: The name of the variable to fix
3143
3144
3145
3146
3147# Register a --with argument but mark it as deprecated
3148# $1: The name of the with argument to deprecate, not including --with-
3149
3150
3151
3152
3153# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3154# $1: variable to check
3155# $2: executable name to print in warning (optional)
3156
3157
3158# Does AC_PATH_PROG followed by BASIC_CHECK_NONEMPTY.
3159# Arguments as AC_PATH_PROG:
3160# $1: variable to set
3161# $2: executable name to look for
3162
3163
3164# Setup the most fundamental tools that relies on not much else to set up,
3165# but is used by much of the early bootstrap code.
3166
3167
3168# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3169
3170
3171
3172
3173
3174
3175
3176#%%% Simple tools %%%
3177
3178# Check if we have found a usable version of make
3179# $1: the path to a potential make binary (or empty)
3180# $2: the description on how we found this
3181
3182
3183# Goes looking for a usable version of GNU make.
3184
3185
3186
3187
3188
3189
3190# Check if build directory is on local disk. If not possible to determine,
3191# we prefer to claim it's local.
3192# Argument 1: directory to test
3193# Argument 2: what to do if it is on local disk
3194# Argument 3: what to do otherwise (remote disk or failure)
3195
3196
3197# Check that source files have basic read permissions set. This might
3198# not be the case in cygwin in certain conditions.
3199
3200
3201
3202
3203#
3204# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3205# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3206#
3207# This code is free software; you can redistribute it and/or modify it
3208# under the terms of the GNU General Public License version 2 only, as
3209# published by the Free Software Foundation.  Oracle designates this
3210# particular file as subject to the "Classpath" exception as provided
3211# by Oracle in the LICENSE file that accompanied this code.
3212#
3213# This code is distributed in the hope that it will be useful, but WITHOUT
3214# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3215# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3216# version 2 for more details (a copy is included in the LICENSE file that
3217# accompanied this code).
3218#
3219# You should have received a copy of the GNU General Public License version
3220# 2 along with this work; if not, write to the Free Software Foundation,
3221# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3222#
3223# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3224# or visit www.oracle.com if you need additional information or have any
3225# questions.
3226#
3227
3228
3229
3230
3231
3232# Helper function which possibly converts a path using DOS-style short mode.
3233# If so, the updated path is stored in $new_path.
3234# $1: The path to check
3235
3236
3237# Helper function which possibly converts a path using DOS-style short mode.
3238# If so, the updated path is stored in $new_path.
3239# $1: The path to check
3240
3241
3242# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3243# and could probably be heavily simplified. However, all changes in this
3244# area tend to need lot of testing in different scenarios, and in lack of
3245# proper unit testing, cleaning this up has not been deemed worth the effort
3246# at the moment.
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3257
3258
3259
3260
3261#
3262# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3263# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3264#
3265# This code is free software; you can redistribute it and/or modify it
3266# under the terms of the GNU General Public License version 2 only, as
3267# published by the Free Software Foundation.  Oracle designates this
3268# particular file as subject to the "Classpath" exception as provided
3269# by Oracle in the LICENSE file that accompanied this code.
3270#
3271# This code is distributed in the hope that it will be useful, but WITHOUT
3272# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3273# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3274# version 2 for more details (a copy is included in the LICENSE file that
3275# accompanied this code).
3276#
3277# You should have received a copy of the GNU General Public License version
3278# 2 along with this work; if not, write to the Free Software Foundation,
3279# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3280#
3281# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3282# or visit www.oracle.com if you need additional information or have any
3283# questions.
3284#
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296# ... then the rest
3297#
3298# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3299# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3300#
3301# This code is free software; you can redistribute it and/or modify it
3302# under the terms of the GNU General Public License version 2 only, as
3303# published by the Free Software Foundation.  Oracle designates this
3304# particular file as subject to the "Classpath" exception as provided
3305# by Oracle in the LICENSE file that accompanied this code.
3306#
3307# This code is distributed in the hope that it will be useful, but WITHOUT
3308# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3309# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3310# version 2 for more details (a copy is included in the LICENSE file that
3311# accompanied this code).
3312#
3313# You should have received a copy of the GNU General Public License version
3314# 2 along with this work; if not, write to the Free Software Foundation,
3315# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3316#
3317# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3318# or visit www.oracle.com if you need additional information or have any
3319# questions.
3320#
3321
3322# Execute the check given as argument, and verify the result
3323# If the Boot JDK was previously found, do nothing
3324# $1 A command line (typically autoconf macro) to execute
3325
3326
3327# Test: Is bootjdk explicitely set by command line arguments?
3328
3329
3330# Test: Is bootjdk available from builddeps?
3331
3332
3333# Test: Is $JAVA_HOME set?
3334
3335
3336# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3337
3338
3339# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3340
3341
3342# Look for a jdk in the given path. If there are multiple, try to select the newest.
3343# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3344# $1 = Path to directory containing jdk installations.
3345# $2 = String to append to the found JDK directory to get the proper JDK home
3346
3347
3348# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3349# environmental variable as base for where to look.
3350# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3351
3352
3353# Test: Is there a JDK installed in default, well-known locations?
3354
3355
3356# Check that a command-line tool in the Boot JDK is correct
3357# $1 = name of variable to assign
3358# $2 = name of binary
3359
3360
3361###############################################################################
3362#
3363# We need a Boot JDK to bootstrap the build.
3364#
3365
3366
3367
3368
3369
3370#
3371# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3372# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3373#
3374# This code is free software; you can redistribute it and/or modify it
3375# under the terms of the GNU General Public License version 2 only, as
3376# published by the Free Software Foundation.  Oracle designates this
3377# particular file as subject to the "Classpath" exception as provided
3378# by Oracle in the LICENSE file that accompanied this code.
3379#
3380# This code is distributed in the hope that it will be useful, but WITHOUT
3381# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3382# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3383# version 2 for more details (a copy is included in the LICENSE file that
3384# accompanied this code).
3385#
3386# You should have received a copy of the GNU General Public License version
3387# 2 along with this work; if not, write to the Free Software Foundation,
3388# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3389#
3390# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3391# or visit www.oracle.com if you need additional information or have any
3392# questions.
3393#
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414#
3415# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3416# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3417#
3418# This code is free software; you can redistribute it and/or modify it
3419# under the terms of the GNU General Public License version 2 only, as
3420# published by the Free Software Foundation.  Oracle designates this
3421# particular file as subject to the "Classpath" exception as provided
3422# by Oracle in the LICENSE file that accompanied this code.
3423#
3424# This code is distributed in the hope that it will be useful, but WITHOUT
3425# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3426# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3427# version 2 for more details (a copy is included in the LICENSE file that
3428# accompanied this code).
3429#
3430# You should have received a copy of the GNU General Public License version
3431# 2 along with this work; if not, write to the Free Software Foundation,
3432# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3433#
3434# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3435# or visit www.oracle.com if you need additional information or have any
3436# questions.
3437#
3438
3439
3440
3441
3442
3443cygwin_help() {
3444    case $1 in
3445    unzip)
3446        PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip" ;;
3447    zip)
3448        PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P zip" ;;
3449    make)
3450        PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P make" ;;
3451    * )
3452       break ;;
3453    esac
3454}
3455
3456apt_help() {
3457    case $1 in
3458    devkit)
3459        PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
3460    openjdk)
3461        PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
3462    alsa)
3463        PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
3464    cups)
3465        PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
3466    freetype2)
3467        PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
3468    pulse)
3469        PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;;
3470    x11)
3471        PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
3472    ccache)
3473        PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
3474    * )
3475       break ;;
3476    esac
3477}
3478
3479yum_help() {
3480    case $1 in
3481    devkit)
3482        PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
3483    openjdk)
3484        PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
3485    alsa)
3486        PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
3487    cups)
3488        PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
3489    freetype2)
3490        PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
3491    pulse)
3492        PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;;
3493    x11)
3494        PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel" ;;
3495    ccache)
3496        PKGHANDLER_COMMAND="sudo yum install ccache" ;;
3497    * )
3498       break ;;
3499    esac
3500}
3501
3502port_help() {
3503    PKGHANDLER_COMMAND=""
3504}
3505
3506pkgutil_help() {
3507    PKGHANDLER_COMMAND=""
3508}
3509
3510pkgadd_help() {
3511    PKGHANDLER_COMMAND=""
3512}
3513
3514
3515
3516#
3517# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
3518# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3519#
3520# This code is free software; you can redistribute it and/or modify it
3521# under the terms of the GNU General Public License version 2 only, as
3522# published by the Free Software Foundation.  Oracle designates this
3523# particular file as subject to the "Classpath" exception as provided
3524# by Oracle in the LICENSE file that accompanied this code.
3525#
3526# This code is distributed in the hope that it will be useful, but WITHOUT
3527# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3528# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3529# version 2 for more details (a copy is included in the LICENSE file that
3530# accompanied this code).
3531#
3532# You should have received a copy of the GNU General Public License version
3533# 2 along with this work; if not, write to the Free Software Foundation,
3534# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3535#
3536# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3537# or visit www.oracle.com if you need additional information or have any
3538# questions.
3539#
3540
3541
3542
3543
3544
3545
3546
3547
3548###############################################################################
3549#
3550# Should we build only OpenJDK even if closed sources are present?
3551#
3552
3553
3554
3555
3556###############################################################################
3557#
3558# Setup version numbers
3559#
3560
3561
3562
3563
3564
3565
3566# Support for customization of the build process. Some build files
3567# will include counterparts from this location, if they exist. This allows
3568# for a degree of customization of the build targets and the rules/recipes
3569# to create them
3570
3571# Check whether --with-custom-make-dir was given.
3572if test "${with_custom_make_dir+set}" = set; then :
3573  withval=$with_custom_make_dir; CUSTOM_MAKE_DIR=$with_custom_make_dir
3574fi
3575
3576
3577
3578#
3579# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3580# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3581#
3582# This code is free software; you can redistribute it and/or modify it
3583# under the terms of the GNU General Public License version 2 only, as
3584# published by the Free Software Foundation.  Oracle designates this
3585# particular file as subject to the "Classpath" exception as provided
3586# by Oracle in the LICENSE file that accompanied this code.
3587#
3588# This code is distributed in the hope that it will be useful, but WITHOUT
3589# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3590# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3591# version 2 for more details (a copy is included in the LICENSE file that
3592# accompanied this code).
3593#
3594# You should have received a copy of the GNU General Public License version
3595# 2 along with this work; if not, write to the Free Software Foundation,
3596# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3597#
3598# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3599# or visit www.oracle.com if you need additional information or have any
3600# questions.
3601#
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617#
3618# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3619# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3620#
3621# This code is free software; you can redistribute it and/or modify it
3622# under the terms of the GNU General Public License version 2 only, as
3623# published by the Free Software Foundation.  Oracle designates this
3624# particular file as subject to the "Classpath" exception as provided
3625# by Oracle in the LICENSE file that accompanied this code.
3626#
3627# This code is distributed in the hope that it will be useful, but WITHOUT
3628# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3629# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3630# version 2 for more details (a copy is included in the LICENSE file that
3631# accompanied this code).
3632#
3633# You should have received a copy of the GNU General Public License version
3634# 2 along with this work; if not, write to the Free Software Foundation,
3635# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3636#
3637# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3638# or visit www.oracle.com if you need additional information or have any
3639# questions.
3640#
3641
3642# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
3643# Converts autoconf style CPU name to OpenJDK style, into
3644# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
3645
3646
3647# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
3648# Converts autoconf style OS name to OpenJDK style, into
3649# VAR_OS and VAR_OS_API.
3650
3651
3652# Expects $host_os $host_cpu $build_os and $build_cpu
3653# and $with_target_bits to have been setup!
3654#
3655# Translate the standard triplet(quadruplet) definition
3656# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
3657# OPENJDK_BUILD_OS, etc.
3658
3659
3660# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
3661# accordingly. Must be done after setting up build and target system, but before
3662# doing anything else with these values.
3663
3664
3665    # Setup the legacy variables, for controlling the old makefiles.
3666    #
3667
3668
3669
3670
3671#%%% Build and target systems %%%
3672
3673
3674
3675
3676# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
3677# Add -mX to various FLAGS variables.
3678
3679
3680
3681
3682
3683
3684#
3685# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3686# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3687#
3688# This code is free software; you can redistribute it and/or modify it
3689# under the terms of the GNU General Public License version 2 only, as
3690# published by the Free Software Foundation.  Oracle designates this
3691# particular file as subject to the "Classpath" exception as provided
3692# by Oracle in the LICENSE file that accompanied this code.
3693#
3694# This code is distributed in the hope that it will be useful, but WITHOUT
3695# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3696# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3697# version 2 for more details (a copy is included in the LICENSE file that
3698# accompanied this code).
3699#
3700# You should have received a copy of the GNU General Public License version
3701# 2 along with this work; if not, write to the Free Software Foundation,
3702# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3703#
3704# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3705# or visit www.oracle.com if you need additional information or have any
3706# questions.
3707#
3708
3709
3710
3711
3712
3713
3714
3715
3716#
3717# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3718# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3719#
3720# This code is free software; you can redistribute it and/or modify it
3721# under the terms of the GNU General Public License version 2 only, as
3722# published by the Free Software Foundation.  Oracle designates this
3723# particular file as subject to the "Classpath" exception as provided
3724# by Oracle in the LICENSE file that accompanied this code.
3725#
3726# This code is distributed in the hope that it will be useful, but WITHOUT
3727# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3728# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3729# version 2 for more details (a copy is included in the LICENSE file that
3730# accompanied this code).
3731#
3732# You should have received a copy of the GNU General Public License version
3733# 2 along with this work; if not, write to the Free Software Foundation,
3734# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3735#
3736# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3737# or visit www.oracle.com if you need additional information or have any
3738# questions.
3739#
3740
3741# $1 = compiler to test (CC or CXX)
3742# $2 = human readable name of compiler (C or C++)
3743
3744
3745
3746
3747
3748# $1 = compiler to test (CC or CXX)
3749# $2 = human readable name of compiler (C or C++)
3750# $3 = list of compiler names to search for
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764# TOOLCHAIN_COMPILER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3765#                                   [RUN-IF-FALSE])
3766# ------------------------------------------------------------
3767# Check that the c and c++ compilers support an argument
3768
3769
3770
3771
3772# Setup the JTREG paths
3773
3774
3775#
3776# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3777# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3778#
3779# This code is free software; you can redistribute it and/or modify it
3780# under the terms of the GNU General Public License version 2 only, as
3781# published by the Free Software Foundation.  Oracle designates this
3782# particular file as subject to the "Classpath" exception as provided
3783# by Oracle in the LICENSE file that accompanied this code.
3784#
3785# This code is distributed in the hope that it will be useful, but WITHOUT
3786# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3787# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3788# version 2 for more details (a copy is included in the LICENSE file that
3789# accompanied this code).
3790#
3791# You should have received a copy of the GNU General Public License version
3792# 2 along with this work; if not, write to the Free Software Foundation,
3793# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3794#
3795# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3796# or visit www.oracle.com if you need additional information or have any
3797# questions.
3798#
3799
3800
3801
3802
3803
3804
3805
3806# Check if the VS env variables were setup prior to running configure.
3807# If not, then find vcvarsall.bat and run it automatically, and integrate
3808# the set env variables into the spec file.
3809
3810
3811
3812
3813
3814
3815# This line needs to be here, verbatim, after all includes and the dummy hook
3816# definitions. It is replaced with custom functionality when building
3817# custom sources.
3818#CUSTOM_AUTOCONF_INCLUDE
3819
3820# Do not change or remove the following line, it is needed for consistency checks:
3821DATE_WHEN_GENERATED=1381162713
3822
3823###############################################################################
3824#
3825# Initialization / Boot-strapping
3826#
3827# The bootstrapping process needs to solve the "chicken or the egg" problem,
3828# thus it jumps back and forth, each time gaining something needed later on.
3829#
3830###############################################################################
3831
3832# Basic initialization that must happen first of all
3833
3834# Save the original command line. This is passed to us by the wrapper configure script.
3835
3836DATE_WHEN_CONFIGURED=`LANG=C date`
3837
3838{ $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
3839$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
3840{ $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
3841$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
3842
3843
3844
3845# Start with tools that do not need have cross compilation support
3846# and can be expected to be found in the default PATH. These tools are
3847# used by configure. Nor are these tools expected to be found in the
3848# devkit from the builddeps server either, since they are
3849# needed to download the devkit.
3850
3851# First are all the simple required tools.
3852
3853    for ac_prog in basename
3854do
3855  # Extract the first word of "$ac_prog", so it can be a program name with args.
3856set dummy $ac_prog; ac_word=$2
3857{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3858$as_echo_n "checking for $ac_word... " >&6; }
3859if ${ac_cv_path_BASENAME+:} false; then :
3860  $as_echo_n "(cached) " >&6
3861else
3862  case $BASENAME in
3863  [\\/]* | ?:[\\/]*)
3864  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
3865  ;;
3866  *)
3867  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3868for as_dir in $PATH
3869do
3870  IFS=$as_save_IFS
3871  test -z "$as_dir" && as_dir=.
3872    for ac_exec_ext in '' $ac_executable_extensions; do
3873  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3874    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
3875    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3876    break 2
3877  fi
3878done
3879  done
3880IFS=$as_save_IFS
3881
3882  ;;
3883esac
3884fi
3885BASENAME=$ac_cv_path_BASENAME
3886if test -n "$BASENAME"; then
3887  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
3888$as_echo "$BASENAME" >&6; }
3889else
3890  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3891$as_echo "no" >&6; }
3892fi
3893
3894
3895  test -n "$BASENAME" && break
3896done
3897
3898
3899    if test "x$BASENAME" = x; then
3900        if test "xbasename" = x; then
3901          PROG_NAME=basename
3902        else
3903          PROG_NAME=basename
3904        fi
3905        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3906$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3907        as_fn_error $? "Cannot continue" "$LINENO" 5
3908    fi
3909
3910
3911
3912    for ac_prog in bash
3913do
3914  # Extract the first word of "$ac_prog", so it can be a program name with args.
3915set dummy $ac_prog; ac_word=$2
3916{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3917$as_echo_n "checking for $ac_word... " >&6; }
3918if ${ac_cv_path_BASH+:} false; then :
3919  $as_echo_n "(cached) " >&6
3920else
3921  case $BASH in
3922  [\\/]* | ?:[\\/]*)
3923  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
3924  ;;
3925  *)
3926  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3927for as_dir in $PATH
3928do
3929  IFS=$as_save_IFS
3930  test -z "$as_dir" && as_dir=.
3931    for ac_exec_ext in '' $ac_executable_extensions; do
3932  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3933    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
3934    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3935    break 2
3936  fi
3937done
3938  done
3939IFS=$as_save_IFS
3940
3941  ;;
3942esac
3943fi
3944BASH=$ac_cv_path_BASH
3945if test -n "$BASH"; then
3946  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
3947$as_echo "$BASH" >&6; }
3948else
3949  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3950$as_echo "no" >&6; }
3951fi
3952
3953
3954  test -n "$BASH" && break
3955done
3956
3957
3958    if test "x$BASH" = x; then
3959        if test "xbash" = x; then
3960          PROG_NAME=bash
3961        else
3962          PROG_NAME=bash
3963        fi
3964        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3965$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3966        as_fn_error $? "Cannot continue" "$LINENO" 5
3967    fi
3968
3969
3970
3971    for ac_prog in cat
3972do
3973  # Extract the first word of "$ac_prog", so it can be a program name with args.
3974set dummy $ac_prog; ac_word=$2
3975{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3976$as_echo_n "checking for $ac_word... " >&6; }
3977if ${ac_cv_path_CAT+:} false; then :
3978  $as_echo_n "(cached) " >&6
3979else
3980  case $CAT in
3981  [\\/]* | ?:[\\/]*)
3982  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
3983  ;;
3984  *)
3985  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3986for as_dir in $PATH
3987do
3988  IFS=$as_save_IFS
3989  test -z "$as_dir" && as_dir=.
3990    for ac_exec_ext in '' $ac_executable_extensions; do
3991  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3992    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
3993    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3994    break 2
3995  fi
3996done
3997  done
3998IFS=$as_save_IFS
3999
4000  ;;
4001esac
4002fi
4003CAT=$ac_cv_path_CAT
4004if test -n "$CAT"; then
4005  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4006$as_echo "$CAT" >&6; }
4007else
4008  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4009$as_echo "no" >&6; }
4010fi
4011
4012
4013  test -n "$CAT" && break
4014done
4015
4016
4017    if test "x$CAT" = x; then
4018        if test "xcat" = x; then
4019          PROG_NAME=cat
4020        else
4021          PROG_NAME=cat
4022        fi
4023        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4024$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4025        as_fn_error $? "Cannot continue" "$LINENO" 5
4026    fi
4027
4028
4029
4030    for ac_prog in chmod
4031do
4032  # Extract the first word of "$ac_prog", so it can be a program name with args.
4033set dummy $ac_prog; ac_word=$2
4034{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4035$as_echo_n "checking for $ac_word... " >&6; }
4036if ${ac_cv_path_CHMOD+:} false; then :
4037  $as_echo_n "(cached) " >&6
4038else
4039  case $CHMOD in
4040  [\\/]* | ?:[\\/]*)
4041  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
4042  ;;
4043  *)
4044  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4045for as_dir in $PATH
4046do
4047  IFS=$as_save_IFS
4048  test -z "$as_dir" && as_dir=.
4049    for ac_exec_ext in '' $ac_executable_extensions; do
4050  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4051    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
4052    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4053    break 2
4054  fi
4055done
4056  done
4057IFS=$as_save_IFS
4058
4059  ;;
4060esac
4061fi
4062CHMOD=$ac_cv_path_CHMOD
4063if test -n "$CHMOD"; then
4064  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
4065$as_echo "$CHMOD" >&6; }
4066else
4067  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4068$as_echo "no" >&6; }
4069fi
4070
4071
4072  test -n "$CHMOD" && break
4073done
4074
4075
4076    if test "x$CHMOD" = x; then
4077        if test "xchmod" = x; then
4078          PROG_NAME=chmod
4079        else
4080          PROG_NAME=chmod
4081        fi
4082        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4083$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4084        as_fn_error $? "Cannot continue" "$LINENO" 5
4085    fi
4086
4087
4088
4089    for ac_prog in cmp
4090do
4091  # Extract the first word of "$ac_prog", so it can be a program name with args.
4092set dummy $ac_prog; ac_word=$2
4093{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4094$as_echo_n "checking for $ac_word... " >&6; }
4095if ${ac_cv_path_CMP+:} false; then :
4096  $as_echo_n "(cached) " >&6
4097else
4098  case $CMP in
4099  [\\/]* | ?:[\\/]*)
4100  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
4101  ;;
4102  *)
4103  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4104for as_dir in $PATH
4105do
4106  IFS=$as_save_IFS
4107  test -z "$as_dir" && as_dir=.
4108    for ac_exec_ext in '' $ac_executable_extensions; do
4109  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4110    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
4111    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4112    break 2
4113  fi
4114done
4115  done
4116IFS=$as_save_IFS
4117
4118  ;;
4119esac
4120fi
4121CMP=$ac_cv_path_CMP
4122if test -n "$CMP"; then
4123  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
4124$as_echo "$CMP" >&6; }
4125else
4126  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4127$as_echo "no" >&6; }
4128fi
4129
4130
4131  test -n "$CMP" && break
4132done
4133
4134
4135    if test "x$CMP" = x; then
4136        if test "xcmp" = x; then
4137          PROG_NAME=cmp
4138        else
4139          PROG_NAME=cmp
4140        fi
4141        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4142$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4143        as_fn_error $? "Cannot continue" "$LINENO" 5
4144    fi
4145
4146
4147
4148    for ac_prog in comm
4149do
4150  # Extract the first word of "$ac_prog", so it can be a program name with args.
4151set dummy $ac_prog; ac_word=$2
4152{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4153$as_echo_n "checking for $ac_word... " >&6; }
4154if ${ac_cv_path_COMM+:} false; then :
4155  $as_echo_n "(cached) " >&6
4156else
4157  case $COMM in
4158  [\\/]* | ?:[\\/]*)
4159  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
4160  ;;
4161  *)
4162  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4163for as_dir in $PATH
4164do
4165  IFS=$as_save_IFS
4166  test -z "$as_dir" && as_dir=.
4167    for ac_exec_ext in '' $ac_executable_extensions; do
4168  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4169    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
4170    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4171    break 2
4172  fi
4173done
4174  done
4175IFS=$as_save_IFS
4176
4177  ;;
4178esac
4179fi
4180COMM=$ac_cv_path_COMM
4181if test -n "$COMM"; then
4182  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
4183$as_echo "$COMM" >&6; }
4184else
4185  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4186$as_echo "no" >&6; }
4187fi
4188
4189
4190  test -n "$COMM" && break
4191done
4192
4193
4194    if test "x$COMM" = x; then
4195        if test "xcomm" = x; then
4196          PROG_NAME=comm
4197        else
4198          PROG_NAME=comm
4199        fi
4200        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4201$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4202        as_fn_error $? "Cannot continue" "$LINENO" 5
4203    fi
4204
4205
4206
4207    for ac_prog in cp
4208do
4209  # Extract the first word of "$ac_prog", so it can be a program name with args.
4210set dummy $ac_prog; ac_word=$2
4211{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4212$as_echo_n "checking for $ac_word... " >&6; }
4213if ${ac_cv_path_CP+:} false; then :
4214  $as_echo_n "(cached) " >&6
4215else
4216  case $CP in
4217  [\\/]* | ?:[\\/]*)
4218  ac_cv_path_CP="$CP" # Let the user override the test with a path.
4219  ;;
4220  *)
4221  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4222for as_dir in $PATH
4223do
4224  IFS=$as_save_IFS
4225  test -z "$as_dir" && as_dir=.
4226    for ac_exec_ext in '' $ac_executable_extensions; do
4227  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4228    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
4229    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4230    break 2
4231  fi
4232done
4233  done
4234IFS=$as_save_IFS
4235
4236  ;;
4237esac
4238fi
4239CP=$ac_cv_path_CP
4240if test -n "$CP"; then
4241  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
4242$as_echo "$CP" >&6; }
4243else
4244  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4245$as_echo "no" >&6; }
4246fi
4247
4248
4249  test -n "$CP" && break
4250done
4251
4252
4253    if test "x$CP" = x; then
4254        if test "xcp" = x; then
4255          PROG_NAME=cp
4256        else
4257          PROG_NAME=cp
4258        fi
4259        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4260$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4261        as_fn_error $? "Cannot continue" "$LINENO" 5
4262    fi
4263
4264
4265
4266    for ac_prog in cpio
4267do
4268  # Extract the first word of "$ac_prog", so it can be a program name with args.
4269set dummy $ac_prog; ac_word=$2
4270{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4271$as_echo_n "checking for $ac_word... " >&6; }
4272if ${ac_cv_path_CPIO+:} false; then :
4273  $as_echo_n "(cached) " >&6
4274else
4275  case $CPIO in
4276  [\\/]* | ?:[\\/]*)
4277  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
4278  ;;
4279  *)
4280  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4281for as_dir in $PATH
4282do
4283  IFS=$as_save_IFS
4284  test -z "$as_dir" && as_dir=.
4285    for ac_exec_ext in '' $ac_executable_extensions; do
4286  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4287    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
4288    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4289    break 2
4290  fi
4291done
4292  done
4293IFS=$as_save_IFS
4294
4295  ;;
4296esac
4297fi
4298CPIO=$ac_cv_path_CPIO
4299if test -n "$CPIO"; then
4300  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
4301$as_echo "$CPIO" >&6; }
4302else
4303  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4304$as_echo "no" >&6; }
4305fi
4306
4307
4308  test -n "$CPIO" && break
4309done
4310
4311
4312    if test "x$CPIO" = x; then
4313        if test "xcpio" = x; then
4314          PROG_NAME=cpio
4315        else
4316          PROG_NAME=cpio
4317        fi
4318        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4319$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4320        as_fn_error $? "Cannot continue" "$LINENO" 5
4321    fi
4322
4323
4324
4325    for ac_prog in cut
4326do
4327  # Extract the first word of "$ac_prog", so it can be a program name with args.
4328set dummy $ac_prog; ac_word=$2
4329{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4330$as_echo_n "checking for $ac_word... " >&6; }
4331if ${ac_cv_path_CUT+:} false; then :
4332  $as_echo_n "(cached) " >&6
4333else
4334  case $CUT in
4335  [\\/]* | ?:[\\/]*)
4336  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
4337  ;;
4338  *)
4339  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4340for as_dir in $PATH
4341do
4342  IFS=$as_save_IFS
4343  test -z "$as_dir" && as_dir=.
4344    for ac_exec_ext in '' $ac_executable_extensions; do
4345  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4346    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
4347    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4348    break 2
4349  fi
4350done
4351  done
4352IFS=$as_save_IFS
4353
4354  ;;
4355esac
4356fi
4357CUT=$ac_cv_path_CUT
4358if test -n "$CUT"; then
4359  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
4360$as_echo "$CUT" >&6; }
4361else
4362  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4363$as_echo "no" >&6; }
4364fi
4365
4366
4367  test -n "$CUT" && break
4368done
4369
4370
4371    if test "x$CUT" = x; then
4372        if test "xcut" = x; then
4373          PROG_NAME=cut
4374        else
4375          PROG_NAME=cut
4376        fi
4377        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4378$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4379        as_fn_error $? "Cannot continue" "$LINENO" 5
4380    fi
4381
4382
4383
4384    for ac_prog in date
4385do
4386  # Extract the first word of "$ac_prog", so it can be a program name with args.
4387set dummy $ac_prog; ac_word=$2
4388{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4389$as_echo_n "checking for $ac_word... " >&6; }
4390if ${ac_cv_path_DATE+:} false; then :
4391  $as_echo_n "(cached) " >&6
4392else
4393  case $DATE in
4394  [\\/]* | ?:[\\/]*)
4395  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
4396  ;;
4397  *)
4398  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4399for as_dir in $PATH
4400do
4401  IFS=$as_save_IFS
4402  test -z "$as_dir" && as_dir=.
4403    for ac_exec_ext in '' $ac_executable_extensions; do
4404  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4405    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
4406    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4407    break 2
4408  fi
4409done
4410  done
4411IFS=$as_save_IFS
4412
4413  ;;
4414esac
4415fi
4416DATE=$ac_cv_path_DATE
4417if test -n "$DATE"; then
4418  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
4419$as_echo "$DATE" >&6; }
4420else
4421  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4422$as_echo "no" >&6; }
4423fi
4424
4425
4426  test -n "$DATE" && break
4427done
4428
4429
4430    if test "x$DATE" = x; then
4431        if test "xdate" = x; then
4432          PROG_NAME=date
4433        else
4434          PROG_NAME=date
4435        fi
4436        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4437$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4438        as_fn_error $? "Cannot continue" "$LINENO" 5
4439    fi
4440
4441
4442
4443    for ac_prog in gdiff diff
4444do
4445  # Extract the first word of "$ac_prog", so it can be a program name with args.
4446set dummy $ac_prog; ac_word=$2
4447{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4448$as_echo_n "checking for $ac_word... " >&6; }
4449if ${ac_cv_path_DIFF+:} false; then :
4450  $as_echo_n "(cached) " >&6
4451else
4452  case $DIFF in
4453  [\\/]* | ?:[\\/]*)
4454  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
4455  ;;
4456  *)
4457  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4458for as_dir in $PATH
4459do
4460  IFS=$as_save_IFS
4461  test -z "$as_dir" && as_dir=.
4462    for ac_exec_ext in '' $ac_executable_extensions; do
4463  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4464    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
4465    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4466    break 2
4467  fi
4468done
4469  done
4470IFS=$as_save_IFS
4471
4472  ;;
4473esac
4474fi
4475DIFF=$ac_cv_path_DIFF
4476if test -n "$DIFF"; then
4477  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
4478$as_echo "$DIFF" >&6; }
4479else
4480  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4481$as_echo "no" >&6; }
4482fi
4483
4484
4485  test -n "$DIFF" && break
4486done
4487
4488
4489    if test "x$DIFF" = x; then
4490        if test "xgdiff diff" = x; then
4491          PROG_NAME=diff
4492        else
4493          PROG_NAME=gdiff diff
4494        fi
4495        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4496$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4497        as_fn_error $? "Cannot continue" "$LINENO" 5
4498    fi
4499
4500
4501
4502    for ac_prog in dirname
4503do
4504  # Extract the first word of "$ac_prog", so it can be a program name with args.
4505set dummy $ac_prog; ac_word=$2
4506{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4507$as_echo_n "checking for $ac_word... " >&6; }
4508if ${ac_cv_path_DIRNAME+:} false; then :
4509  $as_echo_n "(cached) " >&6
4510else
4511  case $DIRNAME in
4512  [\\/]* | ?:[\\/]*)
4513  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
4514  ;;
4515  *)
4516  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4517for as_dir in $PATH
4518do
4519  IFS=$as_save_IFS
4520  test -z "$as_dir" && as_dir=.
4521    for ac_exec_ext in '' $ac_executable_extensions; do
4522  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4523    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
4524    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4525    break 2
4526  fi
4527done
4528  done
4529IFS=$as_save_IFS
4530
4531  ;;
4532esac
4533fi
4534DIRNAME=$ac_cv_path_DIRNAME
4535if test -n "$DIRNAME"; then
4536  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
4537$as_echo "$DIRNAME" >&6; }
4538else
4539  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4540$as_echo "no" >&6; }
4541fi
4542
4543
4544  test -n "$DIRNAME" && break
4545done
4546
4547
4548    if test "x$DIRNAME" = x; then
4549        if test "xdirname" = x; then
4550          PROG_NAME=dirname
4551        else
4552          PROG_NAME=dirname
4553        fi
4554        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4555$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4556        as_fn_error $? "Cannot continue" "$LINENO" 5
4557    fi
4558
4559
4560
4561    for ac_prog in echo
4562do
4563  # Extract the first word of "$ac_prog", so it can be a program name with args.
4564set dummy $ac_prog; ac_word=$2
4565{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4566$as_echo_n "checking for $ac_word... " >&6; }
4567if ${ac_cv_path_ECHO+:} false; then :
4568  $as_echo_n "(cached) " >&6
4569else
4570  case $ECHO in
4571  [\\/]* | ?:[\\/]*)
4572  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
4573  ;;
4574  *)
4575  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4576for as_dir in $PATH
4577do
4578  IFS=$as_save_IFS
4579  test -z "$as_dir" && as_dir=.
4580    for ac_exec_ext in '' $ac_executable_extensions; do
4581  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4582    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
4583    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4584    break 2
4585  fi
4586done
4587  done
4588IFS=$as_save_IFS
4589
4590  ;;
4591esac
4592fi
4593ECHO=$ac_cv_path_ECHO
4594if test -n "$ECHO"; then
4595  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
4596$as_echo "$ECHO" >&6; }
4597else
4598  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4599$as_echo "no" >&6; }
4600fi
4601
4602
4603  test -n "$ECHO" && break
4604done
4605
4606
4607    if test "x$ECHO" = x; then
4608        if test "xecho" = x; then
4609          PROG_NAME=echo
4610        else
4611          PROG_NAME=echo
4612        fi
4613        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4614$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4615        as_fn_error $? "Cannot continue" "$LINENO" 5
4616    fi
4617
4618
4619
4620    for ac_prog in expr
4621do
4622  # Extract the first word of "$ac_prog", so it can be a program name with args.
4623set dummy $ac_prog; ac_word=$2
4624{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4625$as_echo_n "checking for $ac_word... " >&6; }
4626if ${ac_cv_path_EXPR+:} false; then :
4627  $as_echo_n "(cached) " >&6
4628else
4629  case $EXPR in
4630  [\\/]* | ?:[\\/]*)
4631  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
4632  ;;
4633  *)
4634  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4635for as_dir in $PATH
4636do
4637  IFS=$as_save_IFS
4638  test -z "$as_dir" && as_dir=.
4639    for ac_exec_ext in '' $ac_executable_extensions; do
4640  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4641    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
4642    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4643    break 2
4644  fi
4645done
4646  done
4647IFS=$as_save_IFS
4648
4649  ;;
4650esac
4651fi
4652EXPR=$ac_cv_path_EXPR
4653if test -n "$EXPR"; then
4654  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
4655$as_echo "$EXPR" >&6; }
4656else
4657  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4658$as_echo "no" >&6; }
4659fi
4660
4661
4662  test -n "$EXPR" && break
4663done
4664
4665
4666    if test "x$EXPR" = x; then
4667        if test "xexpr" = x; then
4668          PROG_NAME=expr
4669        else
4670          PROG_NAME=expr
4671        fi
4672        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4673$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4674        as_fn_error $? "Cannot continue" "$LINENO" 5
4675    fi
4676
4677
4678
4679    for ac_prog in file
4680do
4681  # Extract the first word of "$ac_prog", so it can be a program name with args.
4682set dummy $ac_prog; ac_word=$2
4683{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4684$as_echo_n "checking for $ac_word... " >&6; }
4685if ${ac_cv_path_FILE+:} false; then :
4686  $as_echo_n "(cached) " >&6
4687else
4688  case $FILE in
4689  [\\/]* | ?:[\\/]*)
4690  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
4691  ;;
4692  *)
4693  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4694for as_dir in $PATH
4695do
4696  IFS=$as_save_IFS
4697  test -z "$as_dir" && as_dir=.
4698    for ac_exec_ext in '' $ac_executable_extensions; do
4699  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4700    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
4701    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4702    break 2
4703  fi
4704done
4705  done
4706IFS=$as_save_IFS
4707
4708  ;;
4709esac
4710fi
4711FILE=$ac_cv_path_FILE
4712if test -n "$FILE"; then
4713  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
4714$as_echo "$FILE" >&6; }
4715else
4716  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4717$as_echo "no" >&6; }
4718fi
4719
4720
4721  test -n "$FILE" && break
4722done
4723
4724
4725    if test "x$FILE" = x; then
4726        if test "xfile" = x; then
4727          PROG_NAME=file
4728        else
4729          PROG_NAME=file
4730        fi
4731        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4732$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4733        as_fn_error $? "Cannot continue" "$LINENO" 5
4734    fi
4735
4736
4737
4738    for ac_prog in find
4739do
4740  # Extract the first word of "$ac_prog", so it can be a program name with args.
4741set dummy $ac_prog; ac_word=$2
4742{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4743$as_echo_n "checking for $ac_word... " >&6; }
4744if ${ac_cv_path_FIND+:} false; then :
4745  $as_echo_n "(cached) " >&6
4746else
4747  case $FIND in
4748  [\\/]* | ?:[\\/]*)
4749  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
4750  ;;
4751  *)
4752  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4753for as_dir in $PATH
4754do
4755  IFS=$as_save_IFS
4756  test -z "$as_dir" && as_dir=.
4757    for ac_exec_ext in '' $ac_executable_extensions; do
4758  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4759    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
4760    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4761    break 2
4762  fi
4763done
4764  done
4765IFS=$as_save_IFS
4766
4767  ;;
4768esac
4769fi
4770FIND=$ac_cv_path_FIND
4771if test -n "$FIND"; then
4772  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
4773$as_echo "$FIND" >&6; }
4774else
4775  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4776$as_echo "no" >&6; }
4777fi
4778
4779
4780  test -n "$FIND" && break
4781done
4782
4783
4784    if test "x$FIND" = x; then
4785        if test "xfind" = x; then
4786          PROG_NAME=find
4787        else
4788          PROG_NAME=find
4789        fi
4790        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4791$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4792        as_fn_error $? "Cannot continue" "$LINENO" 5
4793    fi
4794
4795
4796
4797    for ac_prog in head
4798do
4799  # Extract the first word of "$ac_prog", so it can be a program name with args.
4800set dummy $ac_prog; ac_word=$2
4801{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4802$as_echo_n "checking for $ac_word... " >&6; }
4803if ${ac_cv_path_HEAD+:} false; then :
4804  $as_echo_n "(cached) " >&6
4805else
4806  case $HEAD in
4807  [\\/]* | ?:[\\/]*)
4808  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
4809  ;;
4810  *)
4811  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4812for as_dir in $PATH
4813do
4814  IFS=$as_save_IFS
4815  test -z "$as_dir" && as_dir=.
4816    for ac_exec_ext in '' $ac_executable_extensions; do
4817  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4818    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
4819    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4820    break 2
4821  fi
4822done
4823  done
4824IFS=$as_save_IFS
4825
4826  ;;
4827esac
4828fi
4829HEAD=$ac_cv_path_HEAD
4830if test -n "$HEAD"; then
4831  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
4832$as_echo "$HEAD" >&6; }
4833else
4834  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4835$as_echo "no" >&6; }
4836fi
4837
4838
4839  test -n "$HEAD" && break
4840done
4841
4842
4843    if test "x$HEAD" = x; then
4844        if test "xhead" = x; then
4845          PROG_NAME=head
4846        else
4847          PROG_NAME=head
4848        fi
4849        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4850$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4851        as_fn_error $? "Cannot continue" "$LINENO" 5
4852    fi
4853
4854
4855
4856    for ac_prog in ln
4857do
4858  # Extract the first word of "$ac_prog", so it can be a program name with args.
4859set dummy $ac_prog; ac_word=$2
4860{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4861$as_echo_n "checking for $ac_word... " >&6; }
4862if ${ac_cv_path_LN+:} false; then :
4863  $as_echo_n "(cached) " >&6
4864else
4865  case $LN in
4866  [\\/]* | ?:[\\/]*)
4867  ac_cv_path_LN="$LN" # Let the user override the test with a path.
4868  ;;
4869  *)
4870  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4871for as_dir in $PATH
4872do
4873  IFS=$as_save_IFS
4874  test -z "$as_dir" && as_dir=.
4875    for ac_exec_ext in '' $ac_executable_extensions; do
4876  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4877    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
4878    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4879    break 2
4880  fi
4881done
4882  done
4883IFS=$as_save_IFS
4884
4885  ;;
4886esac
4887fi
4888LN=$ac_cv_path_LN
4889if test -n "$LN"; then
4890  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
4891$as_echo "$LN" >&6; }
4892else
4893  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4894$as_echo "no" >&6; }
4895fi
4896
4897
4898  test -n "$LN" && break
4899done
4900
4901
4902    if test "x$LN" = x; then
4903        if test "xln" = x; then
4904          PROG_NAME=ln
4905        else
4906          PROG_NAME=ln
4907        fi
4908        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4909$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4910        as_fn_error $? "Cannot continue" "$LINENO" 5
4911    fi
4912
4913
4914
4915    for ac_prog in ls
4916do
4917  # Extract the first word of "$ac_prog", so it can be a program name with args.
4918set dummy $ac_prog; ac_word=$2
4919{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4920$as_echo_n "checking for $ac_word... " >&6; }
4921if ${ac_cv_path_LS+:} false; then :
4922  $as_echo_n "(cached) " >&6
4923else
4924  case $LS in
4925  [\\/]* | ?:[\\/]*)
4926  ac_cv_path_LS="$LS" # Let the user override the test with a path.
4927  ;;
4928  *)
4929  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4930for as_dir in $PATH
4931do
4932  IFS=$as_save_IFS
4933  test -z "$as_dir" && as_dir=.
4934    for ac_exec_ext in '' $ac_executable_extensions; do
4935  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4936    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
4937    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4938    break 2
4939  fi
4940done
4941  done
4942IFS=$as_save_IFS
4943
4944  ;;
4945esac
4946fi
4947LS=$ac_cv_path_LS
4948if test -n "$LS"; then
4949  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
4950$as_echo "$LS" >&6; }
4951else
4952  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4953$as_echo "no" >&6; }
4954fi
4955
4956
4957  test -n "$LS" && break
4958done
4959
4960
4961    if test "x$LS" = x; then
4962        if test "xls" = x; then
4963          PROG_NAME=ls
4964        else
4965          PROG_NAME=ls
4966        fi
4967        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4968$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4969        as_fn_error $? "Cannot continue" "$LINENO" 5
4970    fi
4971
4972
4973
4974    for ac_prog in mkdir
4975do
4976  # Extract the first word of "$ac_prog", so it can be a program name with args.
4977set dummy $ac_prog; ac_word=$2
4978{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4979$as_echo_n "checking for $ac_word... " >&6; }
4980if ${ac_cv_path_MKDIR+:} false; then :
4981  $as_echo_n "(cached) " >&6
4982else
4983  case $MKDIR in
4984  [\\/]* | ?:[\\/]*)
4985  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
4986  ;;
4987  *)
4988  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4989for as_dir in $PATH
4990do
4991  IFS=$as_save_IFS
4992  test -z "$as_dir" && as_dir=.
4993    for ac_exec_ext in '' $ac_executable_extensions; do
4994  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4995    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
4996    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4997    break 2
4998  fi
4999done
5000  done
5001IFS=$as_save_IFS
5002
5003  ;;
5004esac
5005fi
5006MKDIR=$ac_cv_path_MKDIR
5007if test -n "$MKDIR"; then
5008  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
5009$as_echo "$MKDIR" >&6; }
5010else
5011  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5012$as_echo "no" >&6; }
5013fi
5014
5015
5016  test -n "$MKDIR" && break
5017done
5018
5019
5020    if test "x$MKDIR" = x; then
5021        if test "xmkdir" = x; then
5022          PROG_NAME=mkdir
5023        else
5024          PROG_NAME=mkdir
5025        fi
5026        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5027$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5028        as_fn_error $? "Cannot continue" "$LINENO" 5
5029    fi
5030
5031
5032
5033    for ac_prog in mktemp
5034do
5035  # Extract the first word of "$ac_prog", so it can be a program name with args.
5036set dummy $ac_prog; ac_word=$2
5037{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5038$as_echo_n "checking for $ac_word... " >&6; }
5039if ${ac_cv_path_MKTEMP+:} false; then :
5040  $as_echo_n "(cached) " >&6
5041else
5042  case $MKTEMP in
5043  [\\/]* | ?:[\\/]*)
5044  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
5045  ;;
5046  *)
5047  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5048for as_dir in $PATH
5049do
5050  IFS=$as_save_IFS
5051  test -z "$as_dir" && as_dir=.
5052    for ac_exec_ext in '' $ac_executable_extensions; do
5053  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5054    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
5055    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5056    break 2
5057  fi
5058done
5059  done
5060IFS=$as_save_IFS
5061
5062  ;;
5063esac
5064fi
5065MKTEMP=$ac_cv_path_MKTEMP
5066if test -n "$MKTEMP"; then
5067  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
5068$as_echo "$MKTEMP" >&6; }
5069else
5070  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5071$as_echo "no" >&6; }
5072fi
5073
5074
5075  test -n "$MKTEMP" && break
5076done
5077
5078
5079    if test "x$MKTEMP" = x; then
5080        if test "xmktemp" = x; then
5081          PROG_NAME=mktemp
5082        else
5083          PROG_NAME=mktemp
5084        fi
5085        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5086$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5087        as_fn_error $? "Cannot continue" "$LINENO" 5
5088    fi
5089
5090
5091
5092    for ac_prog in mv
5093do
5094  # Extract the first word of "$ac_prog", so it can be a program name with args.
5095set dummy $ac_prog; ac_word=$2
5096{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5097$as_echo_n "checking for $ac_word... " >&6; }
5098if ${ac_cv_path_MV+:} false; then :
5099  $as_echo_n "(cached) " >&6
5100else
5101  case $MV in
5102  [\\/]* | ?:[\\/]*)
5103  ac_cv_path_MV="$MV" # Let the user override the test with a path.
5104  ;;
5105  *)
5106  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5107for as_dir in $PATH
5108do
5109  IFS=$as_save_IFS
5110  test -z "$as_dir" && as_dir=.
5111    for ac_exec_ext in '' $ac_executable_extensions; do
5112  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5113    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
5114    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5115    break 2
5116  fi
5117done
5118  done
5119IFS=$as_save_IFS
5120
5121  ;;
5122esac
5123fi
5124MV=$ac_cv_path_MV
5125if test -n "$MV"; then
5126  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
5127$as_echo "$MV" >&6; }
5128else
5129  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5130$as_echo "no" >&6; }
5131fi
5132
5133
5134  test -n "$MV" && break
5135done
5136
5137
5138    if test "x$MV" = x; then
5139        if test "xmv" = x; then
5140          PROG_NAME=mv
5141        else
5142          PROG_NAME=mv
5143        fi
5144        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5145$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5146        as_fn_error $? "Cannot continue" "$LINENO" 5
5147    fi
5148
5149
5150
5151    for ac_prog in printf
5152do
5153  # Extract the first word of "$ac_prog", so it can be a program name with args.
5154set dummy $ac_prog; ac_word=$2
5155{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5156$as_echo_n "checking for $ac_word... " >&6; }
5157if ${ac_cv_path_PRINTF+:} false; then :
5158  $as_echo_n "(cached) " >&6
5159else
5160  case $PRINTF in
5161  [\\/]* | ?:[\\/]*)
5162  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
5163  ;;
5164  *)
5165  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5166for as_dir in $PATH
5167do
5168  IFS=$as_save_IFS
5169  test -z "$as_dir" && as_dir=.
5170    for ac_exec_ext in '' $ac_executable_extensions; do
5171  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5172    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
5173    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5174    break 2
5175  fi
5176done
5177  done
5178IFS=$as_save_IFS
5179
5180  ;;
5181esac
5182fi
5183PRINTF=$ac_cv_path_PRINTF
5184if test -n "$PRINTF"; then
5185  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
5186$as_echo "$PRINTF" >&6; }
5187else
5188  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5189$as_echo "no" >&6; }
5190fi
5191
5192
5193  test -n "$PRINTF" && break
5194done
5195
5196
5197    if test "x$PRINTF" = x; then
5198        if test "xprintf" = x; then
5199          PROG_NAME=printf
5200        else
5201          PROG_NAME=printf
5202        fi
5203        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5204$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5205        as_fn_error $? "Cannot continue" "$LINENO" 5
5206    fi
5207
5208
5209
5210    for ac_prog in rm
5211do
5212  # Extract the first word of "$ac_prog", so it can be a program name with args.
5213set dummy $ac_prog; ac_word=$2
5214{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5215$as_echo_n "checking for $ac_word... " >&6; }
5216if ${ac_cv_path_RM+:} false; then :
5217  $as_echo_n "(cached) " >&6
5218else
5219  case $RM in
5220  [\\/]* | ?:[\\/]*)
5221  ac_cv_path_RM="$RM" # Let the user override the test with a path.
5222  ;;
5223  *)
5224  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5225for as_dir in $PATH
5226do
5227  IFS=$as_save_IFS
5228  test -z "$as_dir" && as_dir=.
5229    for ac_exec_ext in '' $ac_executable_extensions; do
5230  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5231    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
5232    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5233    break 2
5234  fi
5235done
5236  done
5237IFS=$as_save_IFS
5238
5239  ;;
5240esac
5241fi
5242RM=$ac_cv_path_RM
5243if test -n "$RM"; then
5244  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
5245$as_echo "$RM" >&6; }
5246else
5247  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5248$as_echo "no" >&6; }
5249fi
5250
5251
5252  test -n "$RM" && break
5253done
5254
5255
5256    if test "x$RM" = x; then
5257        if test "xrm" = x; then
5258          PROG_NAME=rm
5259        else
5260          PROG_NAME=rm
5261        fi
5262        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5263$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5264        as_fn_error $? "Cannot continue" "$LINENO" 5
5265    fi
5266
5267
5268
5269    for ac_prog in sh
5270do
5271  # Extract the first word of "$ac_prog", so it can be a program name with args.
5272set dummy $ac_prog; ac_word=$2
5273{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5274$as_echo_n "checking for $ac_word... " >&6; }
5275if ${ac_cv_path_SH+:} false; then :
5276  $as_echo_n "(cached) " >&6
5277else
5278  case $SH in
5279  [\\/]* | ?:[\\/]*)
5280  ac_cv_path_SH="$SH" # Let the user override the test with a path.
5281  ;;
5282  *)
5283  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5284for as_dir in $PATH
5285do
5286  IFS=$as_save_IFS
5287  test -z "$as_dir" && as_dir=.
5288    for ac_exec_ext in '' $ac_executable_extensions; do
5289  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5290    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
5291    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5292    break 2
5293  fi
5294done
5295  done
5296IFS=$as_save_IFS
5297
5298  ;;
5299esac
5300fi
5301SH=$ac_cv_path_SH
5302if test -n "$SH"; then
5303  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
5304$as_echo "$SH" >&6; }
5305else
5306  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5307$as_echo "no" >&6; }
5308fi
5309
5310
5311  test -n "$SH" && break
5312done
5313
5314
5315    if test "x$SH" = x; then
5316        if test "xsh" = x; then
5317          PROG_NAME=sh
5318        else
5319          PROG_NAME=sh
5320        fi
5321        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5322$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5323        as_fn_error $? "Cannot continue" "$LINENO" 5
5324    fi
5325
5326
5327
5328    for ac_prog in sort
5329do
5330  # Extract the first word of "$ac_prog", so it can be a program name with args.
5331set dummy $ac_prog; ac_word=$2
5332{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5333$as_echo_n "checking for $ac_word... " >&6; }
5334if ${ac_cv_path_SORT+:} false; then :
5335  $as_echo_n "(cached) " >&6
5336else
5337  case $SORT in
5338  [\\/]* | ?:[\\/]*)
5339  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
5340  ;;
5341  *)
5342  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5343for as_dir in $PATH
5344do
5345  IFS=$as_save_IFS
5346  test -z "$as_dir" && as_dir=.
5347    for ac_exec_ext in '' $ac_executable_extensions; do
5348  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5349    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
5350    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5351    break 2
5352  fi
5353done
5354  done
5355IFS=$as_save_IFS
5356
5357  ;;
5358esac
5359fi
5360SORT=$ac_cv_path_SORT
5361if test -n "$SORT"; then
5362  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
5363$as_echo "$SORT" >&6; }
5364else
5365  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5366$as_echo "no" >&6; }
5367fi
5368
5369
5370  test -n "$SORT" && break
5371done
5372
5373
5374    if test "x$SORT" = x; then
5375        if test "xsort" = x; then
5376          PROG_NAME=sort
5377        else
5378          PROG_NAME=sort
5379        fi
5380        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5381$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5382        as_fn_error $? "Cannot continue" "$LINENO" 5
5383    fi
5384
5385
5386
5387    for ac_prog in tail
5388do
5389  # Extract the first word of "$ac_prog", so it can be a program name with args.
5390set dummy $ac_prog; ac_word=$2
5391{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5392$as_echo_n "checking for $ac_word... " >&6; }
5393if ${ac_cv_path_TAIL+:} false; then :
5394  $as_echo_n "(cached) " >&6
5395else
5396  case $TAIL in
5397  [\\/]* | ?:[\\/]*)
5398  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
5399  ;;
5400  *)
5401  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5402for as_dir in $PATH
5403do
5404  IFS=$as_save_IFS
5405  test -z "$as_dir" && as_dir=.
5406    for ac_exec_ext in '' $ac_executable_extensions; do
5407  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5408    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
5409    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5410    break 2
5411  fi
5412done
5413  done
5414IFS=$as_save_IFS
5415
5416  ;;
5417esac
5418fi
5419TAIL=$ac_cv_path_TAIL
5420if test -n "$TAIL"; then
5421  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
5422$as_echo "$TAIL" >&6; }
5423else
5424  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5425$as_echo "no" >&6; }
5426fi
5427
5428
5429  test -n "$TAIL" && break
5430done
5431
5432
5433    if test "x$TAIL" = x; then
5434        if test "xtail" = x; then
5435          PROG_NAME=tail
5436        else
5437          PROG_NAME=tail
5438        fi
5439        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5440$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5441        as_fn_error $? "Cannot continue" "$LINENO" 5
5442    fi
5443
5444
5445
5446    for ac_prog in tar
5447do
5448  # Extract the first word of "$ac_prog", so it can be a program name with args.
5449set dummy $ac_prog; ac_word=$2
5450{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5451$as_echo_n "checking for $ac_word... " >&6; }
5452if ${ac_cv_path_TAR+:} false; then :
5453  $as_echo_n "(cached) " >&6
5454else
5455  case $TAR in
5456  [\\/]* | ?:[\\/]*)
5457  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
5458  ;;
5459  *)
5460  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5461for as_dir in $PATH
5462do
5463  IFS=$as_save_IFS
5464  test -z "$as_dir" && as_dir=.
5465    for ac_exec_ext in '' $ac_executable_extensions; do
5466  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5467    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
5468    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5469    break 2
5470  fi
5471done
5472  done
5473IFS=$as_save_IFS
5474
5475  ;;
5476esac
5477fi
5478TAR=$ac_cv_path_TAR
5479if test -n "$TAR"; then
5480  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
5481$as_echo "$TAR" >&6; }
5482else
5483  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5484$as_echo "no" >&6; }
5485fi
5486
5487
5488  test -n "$TAR" && break
5489done
5490
5491
5492    if test "x$TAR" = x; then
5493        if test "xtar" = x; then
5494          PROG_NAME=tar
5495        else
5496          PROG_NAME=tar
5497        fi
5498        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5499$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5500        as_fn_error $? "Cannot continue" "$LINENO" 5
5501    fi
5502
5503
5504
5505    for ac_prog in tee
5506do
5507  # Extract the first word of "$ac_prog", so it can be a program name with args.
5508set dummy $ac_prog; ac_word=$2
5509{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5510$as_echo_n "checking for $ac_word... " >&6; }
5511if ${ac_cv_path_TEE+:} false; then :
5512  $as_echo_n "(cached) " >&6
5513else
5514  case $TEE in
5515  [\\/]* | ?:[\\/]*)
5516  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
5517  ;;
5518  *)
5519  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5520for as_dir in $PATH
5521do
5522  IFS=$as_save_IFS
5523  test -z "$as_dir" && as_dir=.
5524    for ac_exec_ext in '' $ac_executable_extensions; do
5525  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5526    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
5527    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5528    break 2
5529  fi
5530done
5531  done
5532IFS=$as_save_IFS
5533
5534  ;;
5535esac
5536fi
5537TEE=$ac_cv_path_TEE
5538if test -n "$TEE"; then
5539  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
5540$as_echo "$TEE" >&6; }
5541else
5542  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5543$as_echo "no" >&6; }
5544fi
5545
5546
5547  test -n "$TEE" && break
5548done
5549
5550
5551    if test "x$TEE" = x; then
5552        if test "xtee" = x; then
5553          PROG_NAME=tee
5554        else
5555          PROG_NAME=tee
5556        fi
5557        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5558$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5559        as_fn_error $? "Cannot continue" "$LINENO" 5
5560    fi
5561
5562
5563
5564    for ac_prog in touch
5565do
5566  # Extract the first word of "$ac_prog", so it can be a program name with args.
5567set dummy $ac_prog; ac_word=$2
5568{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5569$as_echo_n "checking for $ac_word... " >&6; }
5570if ${ac_cv_path_TOUCH+:} false; then :
5571  $as_echo_n "(cached) " >&6
5572else
5573  case $TOUCH in
5574  [\\/]* | ?:[\\/]*)
5575  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
5576  ;;
5577  *)
5578  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5579for as_dir in $PATH
5580do
5581  IFS=$as_save_IFS
5582  test -z "$as_dir" && as_dir=.
5583    for ac_exec_ext in '' $ac_executable_extensions; do
5584  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5585    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
5586    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5587    break 2
5588  fi
5589done
5590  done
5591IFS=$as_save_IFS
5592
5593  ;;
5594esac
5595fi
5596TOUCH=$ac_cv_path_TOUCH
5597if test -n "$TOUCH"; then
5598  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
5599$as_echo "$TOUCH" >&6; }
5600else
5601  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5602$as_echo "no" >&6; }
5603fi
5604
5605
5606  test -n "$TOUCH" && break
5607done
5608
5609
5610    if test "x$TOUCH" = x; then
5611        if test "xtouch" = x; then
5612          PROG_NAME=touch
5613        else
5614          PROG_NAME=touch
5615        fi
5616        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5617$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5618        as_fn_error $? "Cannot continue" "$LINENO" 5
5619    fi
5620
5621
5622
5623    for ac_prog in tr
5624do
5625  # Extract the first word of "$ac_prog", so it can be a program name with args.
5626set dummy $ac_prog; ac_word=$2
5627{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5628$as_echo_n "checking for $ac_word... " >&6; }
5629if ${ac_cv_path_TR+:} false; then :
5630  $as_echo_n "(cached) " >&6
5631else
5632  case $TR in
5633  [\\/]* | ?:[\\/]*)
5634  ac_cv_path_TR="$TR" # Let the user override the test with a path.
5635  ;;
5636  *)
5637  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5638for as_dir in $PATH
5639do
5640  IFS=$as_save_IFS
5641  test -z "$as_dir" && as_dir=.
5642    for ac_exec_ext in '' $ac_executable_extensions; do
5643  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5644    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
5645    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5646    break 2
5647  fi
5648done
5649  done
5650IFS=$as_save_IFS
5651
5652  ;;
5653esac
5654fi
5655TR=$ac_cv_path_TR
5656if test -n "$TR"; then
5657  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
5658$as_echo "$TR" >&6; }
5659else
5660  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5661$as_echo "no" >&6; }
5662fi
5663
5664
5665  test -n "$TR" && break
5666done
5667
5668
5669    if test "x$TR" = x; then
5670        if test "xtr" = x; then
5671          PROG_NAME=tr
5672        else
5673          PROG_NAME=tr
5674        fi
5675        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5676$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5677        as_fn_error $? "Cannot continue" "$LINENO" 5
5678    fi
5679
5680
5681
5682    for ac_prog in uname
5683do
5684  # Extract the first word of "$ac_prog", so it can be a program name with args.
5685set dummy $ac_prog; ac_word=$2
5686{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5687$as_echo_n "checking for $ac_word... " >&6; }
5688if ${ac_cv_path_UNAME+:} false; then :
5689  $as_echo_n "(cached) " >&6
5690else
5691  case $UNAME in
5692  [\\/]* | ?:[\\/]*)
5693  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
5694  ;;
5695  *)
5696  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5697for as_dir in $PATH
5698do
5699  IFS=$as_save_IFS
5700  test -z "$as_dir" && as_dir=.
5701    for ac_exec_ext in '' $ac_executable_extensions; do
5702  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5703    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
5704    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5705    break 2
5706  fi
5707done
5708  done
5709IFS=$as_save_IFS
5710
5711  ;;
5712esac
5713fi
5714UNAME=$ac_cv_path_UNAME
5715if test -n "$UNAME"; then
5716  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
5717$as_echo "$UNAME" >&6; }
5718else
5719  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5720$as_echo "no" >&6; }
5721fi
5722
5723
5724  test -n "$UNAME" && break
5725done
5726
5727
5728    if test "x$UNAME" = x; then
5729        if test "xuname" = x; then
5730          PROG_NAME=uname
5731        else
5732          PROG_NAME=uname
5733        fi
5734        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5735$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5736        as_fn_error $? "Cannot continue" "$LINENO" 5
5737    fi
5738
5739
5740
5741    for ac_prog in uniq
5742do
5743  # Extract the first word of "$ac_prog", so it can be a program name with args.
5744set dummy $ac_prog; ac_word=$2
5745{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5746$as_echo_n "checking for $ac_word... " >&6; }
5747if ${ac_cv_path_UNIQ+:} false; then :
5748  $as_echo_n "(cached) " >&6
5749else
5750  case $UNIQ in
5751  [\\/]* | ?:[\\/]*)
5752  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
5753  ;;
5754  *)
5755  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5756for as_dir in $PATH
5757do
5758  IFS=$as_save_IFS
5759  test -z "$as_dir" && as_dir=.
5760    for ac_exec_ext in '' $ac_executable_extensions; do
5761  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5762    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
5763    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5764    break 2
5765  fi
5766done
5767  done
5768IFS=$as_save_IFS
5769
5770  ;;
5771esac
5772fi
5773UNIQ=$ac_cv_path_UNIQ
5774if test -n "$UNIQ"; then
5775  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
5776$as_echo "$UNIQ" >&6; }
5777else
5778  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5779$as_echo "no" >&6; }
5780fi
5781
5782
5783  test -n "$UNIQ" && break
5784done
5785
5786
5787    if test "x$UNIQ" = x; then
5788        if test "xuniq" = x; then
5789          PROG_NAME=uniq
5790        else
5791          PROG_NAME=uniq
5792        fi
5793        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5794$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5795        as_fn_error $? "Cannot continue" "$LINENO" 5
5796    fi
5797
5798
5799
5800    for ac_prog in wc
5801do
5802  # Extract the first word of "$ac_prog", so it can be a program name with args.
5803set dummy $ac_prog; ac_word=$2
5804{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5805$as_echo_n "checking for $ac_word... " >&6; }
5806if ${ac_cv_path_WC+:} false; then :
5807  $as_echo_n "(cached) " >&6
5808else
5809  case $WC in
5810  [\\/]* | ?:[\\/]*)
5811  ac_cv_path_WC="$WC" # Let the user override the test with a path.
5812  ;;
5813  *)
5814  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5815for as_dir in $PATH
5816do
5817  IFS=$as_save_IFS
5818  test -z "$as_dir" && as_dir=.
5819    for ac_exec_ext in '' $ac_executable_extensions; do
5820  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5821    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
5822    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5823    break 2
5824  fi
5825done
5826  done
5827IFS=$as_save_IFS
5828
5829  ;;
5830esac
5831fi
5832WC=$ac_cv_path_WC
5833if test -n "$WC"; then
5834  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
5835$as_echo "$WC" >&6; }
5836else
5837  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5838$as_echo "no" >&6; }
5839fi
5840
5841
5842  test -n "$WC" && break
5843done
5844
5845
5846    if test "x$WC" = x; then
5847        if test "xwc" = x; then
5848          PROG_NAME=wc
5849        else
5850          PROG_NAME=wc
5851        fi
5852        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5853$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5854        as_fn_error $? "Cannot continue" "$LINENO" 5
5855    fi
5856
5857
5858
5859    for ac_prog in which
5860do
5861  # Extract the first word of "$ac_prog", so it can be a program name with args.
5862set dummy $ac_prog; ac_word=$2
5863{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5864$as_echo_n "checking for $ac_word... " >&6; }
5865if ${ac_cv_path_WHICH+:} false; then :
5866  $as_echo_n "(cached) " >&6
5867else
5868  case $WHICH in
5869  [\\/]* | ?:[\\/]*)
5870  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
5871  ;;
5872  *)
5873  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5874for as_dir in $PATH
5875do
5876  IFS=$as_save_IFS
5877  test -z "$as_dir" && as_dir=.
5878    for ac_exec_ext in '' $ac_executable_extensions; do
5879  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5880    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
5881    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5882    break 2
5883  fi
5884done
5885  done
5886IFS=$as_save_IFS
5887
5888  ;;
5889esac
5890fi
5891WHICH=$ac_cv_path_WHICH
5892if test -n "$WHICH"; then
5893  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
5894$as_echo "$WHICH" >&6; }
5895else
5896  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5897$as_echo "no" >&6; }
5898fi
5899
5900
5901  test -n "$WHICH" && break
5902done
5903
5904
5905    if test "x$WHICH" = x; then
5906        if test "xwhich" = x; then
5907          PROG_NAME=which
5908        else
5909          PROG_NAME=which
5910        fi
5911        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5912$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5913        as_fn_error $? "Cannot continue" "$LINENO" 5
5914    fi
5915
5916
5917
5918    for ac_prog in xargs
5919do
5920  # Extract the first word of "$ac_prog", so it can be a program name with args.
5921set dummy $ac_prog; ac_word=$2
5922{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5923$as_echo_n "checking for $ac_word... " >&6; }
5924if ${ac_cv_path_XARGS+:} false; then :
5925  $as_echo_n "(cached) " >&6
5926else
5927  case $XARGS in
5928  [\\/]* | ?:[\\/]*)
5929  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
5930  ;;
5931  *)
5932  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5933for as_dir in $PATH
5934do
5935  IFS=$as_save_IFS
5936  test -z "$as_dir" && as_dir=.
5937    for ac_exec_ext in '' $ac_executable_extensions; do
5938  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5939    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
5940    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5941    break 2
5942  fi
5943done
5944  done
5945IFS=$as_save_IFS
5946
5947  ;;
5948esac
5949fi
5950XARGS=$ac_cv_path_XARGS
5951if test -n "$XARGS"; then
5952  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
5953$as_echo "$XARGS" >&6; }
5954else
5955  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5956$as_echo "no" >&6; }
5957fi
5958
5959
5960  test -n "$XARGS" && break
5961done
5962
5963
5964    if test "x$XARGS" = x; then
5965        if test "xxargs" = x; then
5966          PROG_NAME=xargs
5967        else
5968          PROG_NAME=xargs
5969        fi
5970        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5971$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5972        as_fn_error $? "Cannot continue" "$LINENO" 5
5973    fi
5974
5975
5976
5977# Then required tools that require some special treatment.
5978for ac_prog in gawk mawk nawk awk
5979do
5980  # Extract the first word of "$ac_prog", so it can be a program name with args.
5981set dummy $ac_prog; ac_word=$2
5982{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5983$as_echo_n "checking for $ac_word... " >&6; }
5984if ${ac_cv_prog_AWK+:} false; then :
5985  $as_echo_n "(cached) " >&6
5986else
5987  if test -n "$AWK"; then
5988  ac_cv_prog_AWK="$AWK" # Let the user override the test.
5989else
5990as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5991for as_dir in $PATH
5992do
5993  IFS=$as_save_IFS
5994  test -z "$as_dir" && as_dir=.
5995    for ac_exec_ext in '' $ac_executable_extensions; do
5996  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5997    ac_cv_prog_AWK="$ac_prog"
5998    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5999    break 2
6000  fi
6001done
6002  done
6003IFS=$as_save_IFS
6004
6005fi
6006fi
6007AWK=$ac_cv_prog_AWK
6008if test -n "$AWK"; then
6009  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
6010$as_echo "$AWK" >&6; }
6011else
6012  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6013$as_echo "no" >&6; }
6014fi
6015
6016
6017  test -n "$AWK" && break
6018done
6019
6020
6021    if test "x$AWK" = x; then
6022        if test "x" = x; then
6023          PROG_NAME=awk
6024        else
6025          PROG_NAME=
6026        fi
6027        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6028$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6029        as_fn_error $? "Cannot continue" "$LINENO" 5
6030    fi
6031
6032{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
6033$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
6034if ${ac_cv_path_GREP+:} false; then :
6035  $as_echo_n "(cached) " >&6
6036else
6037  if test -z "$GREP"; then
6038  ac_path_GREP_found=false
6039  # Loop through the user's path and test for each of PROGNAME-LIST
6040  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6041for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6042do
6043  IFS=$as_save_IFS
6044  test -z "$as_dir" && as_dir=.
6045    for ac_prog in grep ggrep; do
6046    for ac_exec_ext in '' $ac_executable_extensions; do
6047      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
6048      as_fn_executable_p "$ac_path_GREP" || continue
6049# Check for GNU ac_path_GREP and select it if it is found.
6050  # Check for GNU $ac_path_GREP
6051case `"$ac_path_GREP" --version 2>&1` in
6052*GNU*)
6053  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
6054*)
6055  ac_count=0
6056  $as_echo_n 0123456789 >"conftest.in"
6057  while :
6058  do
6059    cat "conftest.in" "conftest.in" >"conftest.tmp"
6060    mv "conftest.tmp" "conftest.in"
6061    cp "conftest.in" "conftest.nl"
6062    $as_echo 'GREP' >> "conftest.nl"
6063    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6064    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6065    as_fn_arith $ac_count + 1 && ac_count=$as_val
6066    if test $ac_count -gt ${ac_path_GREP_max-0}; then
6067      # Best one so far, save it but keep looking for a better one
6068      ac_cv_path_GREP="$ac_path_GREP"
6069      ac_path_GREP_max=$ac_count
6070    fi
6071    # 10*(2^10) chars as input seems more than enough
6072    test $ac_count -gt 10 && break
6073  done
6074  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6075esac
6076
6077      $ac_path_GREP_found && break 3
6078    done
6079  done
6080  done
6081IFS=$as_save_IFS
6082  if test -z "$ac_cv_path_GREP"; then
6083    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6084  fi
6085else
6086  ac_cv_path_GREP=$GREP
6087fi
6088
6089fi
6090{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
6091$as_echo "$ac_cv_path_GREP" >&6; }
6092 GREP="$ac_cv_path_GREP"
6093
6094
6095
6096    if test "x$GREP" = x; then
6097        if test "x" = x; then
6098          PROG_NAME=grep
6099        else
6100          PROG_NAME=
6101        fi
6102        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6103$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6104        as_fn_error $? "Cannot continue" "$LINENO" 5
6105    fi
6106
6107{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
6108$as_echo_n "checking for egrep... " >&6; }
6109if ${ac_cv_path_EGREP+:} false; then :
6110  $as_echo_n "(cached) " >&6
6111else
6112  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
6113   then ac_cv_path_EGREP="$GREP -E"
6114   else
6115     if test -z "$EGREP"; then
6116  ac_path_EGREP_found=false
6117  # Loop through the user's path and test for each of PROGNAME-LIST
6118  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6119for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6120do
6121  IFS=$as_save_IFS
6122  test -z "$as_dir" && as_dir=.
6123    for ac_prog in egrep; do
6124    for ac_exec_ext in '' $ac_executable_extensions; do
6125      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
6126      as_fn_executable_p "$ac_path_EGREP" || continue
6127# Check for GNU ac_path_EGREP and select it if it is found.
6128  # Check for GNU $ac_path_EGREP
6129case `"$ac_path_EGREP" --version 2>&1` in
6130*GNU*)
6131  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
6132*)
6133  ac_count=0
6134  $as_echo_n 0123456789 >"conftest.in"
6135  while :
6136  do
6137    cat "conftest.in" "conftest.in" >"conftest.tmp"
6138    mv "conftest.tmp" "conftest.in"
6139    cp "conftest.in" "conftest.nl"
6140    $as_echo 'EGREP' >> "conftest.nl"
6141    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6142    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6143    as_fn_arith $ac_count + 1 && ac_count=$as_val
6144    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
6145      # Best one so far, save it but keep looking for a better one
6146      ac_cv_path_EGREP="$ac_path_EGREP"
6147      ac_path_EGREP_max=$ac_count
6148    fi
6149    # 10*(2^10) chars as input seems more than enough
6150    test $ac_count -gt 10 && break
6151  done
6152  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6153esac
6154
6155      $ac_path_EGREP_found && break 3
6156    done
6157  done
6158  done
6159IFS=$as_save_IFS
6160  if test -z "$ac_cv_path_EGREP"; then
6161    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6162  fi
6163else
6164  ac_cv_path_EGREP=$EGREP
6165fi
6166
6167   fi
6168fi
6169{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
6170$as_echo "$ac_cv_path_EGREP" >&6; }
6171 EGREP="$ac_cv_path_EGREP"
6172
6173
6174
6175    if test "x$EGREP" = x; then
6176        if test "x" = x; then
6177          PROG_NAME=egrep
6178        else
6179          PROG_NAME=
6180        fi
6181        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6182$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6183        as_fn_error $? "Cannot continue" "$LINENO" 5
6184    fi
6185
6186{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
6187$as_echo_n "checking for fgrep... " >&6; }
6188if ${ac_cv_path_FGREP+:} false; then :
6189  $as_echo_n "(cached) " >&6
6190else
6191  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
6192   then ac_cv_path_FGREP="$GREP -F"
6193   else
6194     if test -z "$FGREP"; then
6195  ac_path_FGREP_found=false
6196  # Loop through the user's path and test for each of PROGNAME-LIST
6197  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6198for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6199do
6200  IFS=$as_save_IFS
6201  test -z "$as_dir" && as_dir=.
6202    for ac_prog in fgrep; do
6203    for ac_exec_ext in '' $ac_executable_extensions; do
6204      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
6205      as_fn_executable_p "$ac_path_FGREP" || continue
6206# Check for GNU ac_path_FGREP and select it if it is found.
6207  # Check for GNU $ac_path_FGREP
6208case `"$ac_path_FGREP" --version 2>&1` in
6209*GNU*)
6210  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
6211*)
6212  ac_count=0
6213  $as_echo_n 0123456789 >"conftest.in"
6214  while :
6215  do
6216    cat "conftest.in" "conftest.in" >"conftest.tmp"
6217    mv "conftest.tmp" "conftest.in"
6218    cp "conftest.in" "conftest.nl"
6219    $as_echo 'FGREP' >> "conftest.nl"
6220    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
6221    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6222    as_fn_arith $ac_count + 1 && ac_count=$as_val
6223    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
6224      # Best one so far, save it but keep looking for a better one
6225      ac_cv_path_FGREP="$ac_path_FGREP"
6226      ac_path_FGREP_max=$ac_count
6227    fi
6228    # 10*(2^10) chars as input seems more than enough
6229    test $ac_count -gt 10 && break
6230  done
6231  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6232esac
6233
6234      $ac_path_FGREP_found && break 3
6235    done
6236  done
6237  done
6238IFS=$as_save_IFS
6239  if test -z "$ac_cv_path_FGREP"; then
6240    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6241  fi
6242else
6243  ac_cv_path_FGREP=$FGREP
6244fi
6245
6246   fi
6247fi
6248{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
6249$as_echo "$ac_cv_path_FGREP" >&6; }
6250 FGREP="$ac_cv_path_FGREP"
6251
6252
6253
6254    if test "x$FGREP" = x; then
6255        if test "x" = x; then
6256          PROG_NAME=fgrep
6257        else
6258          PROG_NAME=
6259        fi
6260        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6261$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6262        as_fn_error $? "Cannot continue" "$LINENO" 5
6263    fi
6264
6265{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
6266$as_echo_n "checking for a sed that does not truncate output... " >&6; }
6267if ${ac_cv_path_SED+:} false; then :
6268  $as_echo_n "(cached) " >&6
6269else
6270            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
6271     for ac_i in 1 2 3 4 5 6 7; do
6272       ac_script="$ac_script$as_nl$ac_script"
6273     done
6274     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
6275     { ac_script=; unset ac_script;}
6276     if test -z "$SED"; then
6277  ac_path_SED_found=false
6278  # Loop through the user's path and test for each of PROGNAME-LIST
6279  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6280for as_dir in $PATH
6281do
6282  IFS=$as_save_IFS
6283  test -z "$as_dir" && as_dir=.
6284    for ac_prog in sed gsed; do
6285    for ac_exec_ext in '' $ac_executable_extensions; do
6286      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
6287      as_fn_executable_p "$ac_path_SED" || continue
6288# Check for GNU ac_path_SED and select it if it is found.
6289  # Check for GNU $ac_path_SED
6290case `"$ac_path_SED" --version 2>&1` in
6291*GNU*)
6292  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
6293*)
6294  ac_count=0
6295  $as_echo_n 0123456789 >"conftest.in"
6296  while :
6297  do
6298    cat "conftest.in" "conftest.in" >"conftest.tmp"
6299    mv "conftest.tmp" "conftest.in"
6300    cp "conftest.in" "conftest.nl"
6301    $as_echo '' >> "conftest.nl"
6302    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
6303    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6304    as_fn_arith $ac_count + 1 && ac_count=$as_val
6305    if test $ac_count -gt ${ac_path_SED_max-0}; then
6306      # Best one so far, save it but keep looking for a better one
6307      ac_cv_path_SED="$ac_path_SED"
6308      ac_path_SED_max=$ac_count
6309    fi
6310    # 10*(2^10) chars as input seems more than enough
6311    test $ac_count -gt 10 && break
6312  done
6313  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6314esac
6315
6316      $ac_path_SED_found && break 3
6317    done
6318  done
6319  done
6320IFS=$as_save_IFS
6321  if test -z "$ac_cv_path_SED"; then
6322    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
6323  fi
6324else
6325  ac_cv_path_SED=$SED
6326fi
6327
6328fi
6329{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
6330$as_echo "$ac_cv_path_SED" >&6; }
6331 SED="$ac_cv_path_SED"
6332  rm -f conftest.sed
6333
6334
6335    if test "x$SED" = x; then
6336        if test "x" = x; then
6337          PROG_NAME=sed
6338        else
6339          PROG_NAME=
6340        fi
6341        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6342$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6343        as_fn_error $? "Cannot continue" "$LINENO" 5
6344    fi
6345
6346
6347for ac_prog in nawk gawk awk
6348do
6349  # Extract the first word of "$ac_prog", so it can be a program name with args.
6350set dummy $ac_prog; ac_word=$2
6351{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6352$as_echo_n "checking for $ac_word... " >&6; }
6353if ${ac_cv_path_NAWK+:} false; then :
6354  $as_echo_n "(cached) " >&6
6355else
6356  case $NAWK in
6357  [\\/]* | ?:[\\/]*)
6358  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
6359  ;;
6360  *)
6361  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6362for as_dir in $PATH
6363do
6364  IFS=$as_save_IFS
6365  test -z "$as_dir" && as_dir=.
6366    for ac_exec_ext in '' $ac_executable_extensions; do
6367  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6368    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
6369    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6370    break 2
6371  fi
6372done
6373  done
6374IFS=$as_save_IFS
6375
6376  ;;
6377esac
6378fi
6379NAWK=$ac_cv_path_NAWK
6380if test -n "$NAWK"; then
6381  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
6382$as_echo "$NAWK" >&6; }
6383else
6384  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6385$as_echo "no" >&6; }
6386fi
6387
6388
6389  test -n "$NAWK" && break
6390done
6391
6392
6393    if test "x$NAWK" = x; then
6394        if test "x" = x; then
6395          PROG_NAME=nawk
6396        else
6397          PROG_NAME=
6398        fi
6399        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6400$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6401        as_fn_error $? "Cannot continue" "$LINENO" 5
6402    fi
6403
6404
6405# Always force rm.
6406RM="$RM -f"
6407
6408# pwd behaves differently on various platforms and some don't support the -L flag.
6409# Always use the bash builtin pwd to get uniform behavior.
6410THEPWDCMD=pwd
6411
6412# These are not required on all platforms
6413# Extract the first word of "cygpath", so it can be a program name with args.
6414set dummy cygpath; ac_word=$2
6415{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6416$as_echo_n "checking for $ac_word... " >&6; }
6417if ${ac_cv_path_CYGPATH+:} false; then :
6418  $as_echo_n "(cached) " >&6
6419else
6420  case $CYGPATH in
6421  [\\/]* | ?:[\\/]*)
6422  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
6423  ;;
6424  *)
6425  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6426for as_dir in $PATH
6427do
6428  IFS=$as_save_IFS
6429  test -z "$as_dir" && as_dir=.
6430    for ac_exec_ext in '' $ac_executable_extensions; do
6431  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6432    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
6433    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6434    break 2
6435  fi
6436done
6437  done
6438IFS=$as_save_IFS
6439
6440  ;;
6441esac
6442fi
6443CYGPATH=$ac_cv_path_CYGPATH
6444if test -n "$CYGPATH"; then
6445  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
6446$as_echo "$CYGPATH" >&6; }
6447else
6448  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6449$as_echo "no" >&6; }
6450fi
6451
6452
6453# Extract the first word of "readlink", so it can be a program name with args.
6454set dummy readlink; ac_word=$2
6455{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6456$as_echo_n "checking for $ac_word... " >&6; }
6457if ${ac_cv_path_READLINK+:} false; then :
6458  $as_echo_n "(cached) " >&6
6459else
6460  case $READLINK in
6461  [\\/]* | ?:[\\/]*)
6462  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
6463  ;;
6464  *)
6465  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6466for as_dir in $PATH
6467do
6468  IFS=$as_save_IFS
6469  test -z "$as_dir" && as_dir=.
6470    for ac_exec_ext in '' $ac_executable_extensions; do
6471  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6472    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
6473    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6474    break 2
6475  fi
6476done
6477  done
6478IFS=$as_save_IFS
6479
6480  ;;
6481esac
6482fi
6483READLINK=$ac_cv_path_READLINK
6484if test -n "$READLINK"; then
6485  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
6486$as_echo "$READLINK" >&6; }
6487else
6488  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6489$as_echo "no" >&6; }
6490fi
6491
6492
6493# Extract the first word of "df", so it can be a program name with args.
6494set dummy df; ac_word=$2
6495{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6496$as_echo_n "checking for $ac_word... " >&6; }
6497if ${ac_cv_path_DF+:} false; then :
6498  $as_echo_n "(cached) " >&6
6499else
6500  case $DF in
6501  [\\/]* | ?:[\\/]*)
6502  ac_cv_path_DF="$DF" # Let the user override the test with a path.
6503  ;;
6504  *)
6505  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6506for as_dir in $PATH
6507do
6508  IFS=$as_save_IFS
6509  test -z "$as_dir" && as_dir=.
6510    for ac_exec_ext in '' $ac_executable_extensions; do
6511  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6512    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
6513    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6514    break 2
6515  fi
6516done
6517  done
6518IFS=$as_save_IFS
6519
6520  ;;
6521esac
6522fi
6523DF=$ac_cv_path_DF
6524if test -n "$DF"; then
6525  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
6526$as_echo "$DF" >&6; }
6527else
6528  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6529$as_echo "no" >&6; }
6530fi
6531
6532
6533# Extract the first word of "SetFile", so it can be a program name with args.
6534set dummy SetFile; ac_word=$2
6535{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6536$as_echo_n "checking for $ac_word... " >&6; }
6537if ${ac_cv_path_SETFILE+:} false; then :
6538  $as_echo_n "(cached) " >&6
6539else
6540  case $SETFILE in
6541  [\\/]* | ?:[\\/]*)
6542  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
6543  ;;
6544  *)
6545  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6546for as_dir in $PATH
6547do
6548  IFS=$as_save_IFS
6549  test -z "$as_dir" && as_dir=.
6550    for ac_exec_ext in '' $ac_executable_extensions; do
6551  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6552    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
6553    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6554    break 2
6555  fi
6556done
6557  done
6558IFS=$as_save_IFS
6559
6560  ;;
6561esac
6562fi
6563SETFILE=$ac_cv_path_SETFILE
6564if test -n "$SETFILE"; then
6565  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
6566$as_echo "$SETFILE" >&6; }
6567else
6568  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6569$as_echo "no" >&6; }
6570fi
6571
6572
6573
6574
6575# Now we can determine OpenJDK build and target platforms. This is required to
6576# have early on.
6577# Make sure we can run config.sub.
6578$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
6579  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
6580
6581{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
6582$as_echo_n "checking build system type... " >&6; }
6583if ${ac_cv_build+:} false; then :
6584  $as_echo_n "(cached) " >&6
6585else
6586  ac_build_alias=$build_alias
6587test "x$ac_build_alias" = x &&
6588  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
6589test "x$ac_build_alias" = x &&
6590  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
6591ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
6592  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
6593
6594fi
6595{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
6596$as_echo "$ac_cv_build" >&6; }
6597case $ac_cv_build in
6598*-*-*) ;;
6599*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
6600esac
6601build=$ac_cv_build
6602ac_save_IFS=$IFS; IFS='-'
6603set x $ac_cv_build
6604shift
6605build_cpu=$1
6606build_vendor=$2
6607shift; shift
6608# Remember, the first character of IFS is used to create $*,
6609# except with old shells:
6610build_os=$*
6611IFS=$ac_save_IFS
6612case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
6613
6614
6615{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
6616$as_echo_n "checking host system type... " >&6; }
6617if ${ac_cv_host+:} false; then :
6618  $as_echo_n "(cached) " >&6
6619else
6620  if test "x$host_alias" = x; then
6621  ac_cv_host=$ac_cv_build
6622else
6623  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
6624    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
6625fi
6626
6627fi
6628{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
6629$as_echo "$ac_cv_host" >&6; }
6630case $ac_cv_host in
6631*-*-*) ;;
6632*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
6633esac
6634host=$ac_cv_host
6635ac_save_IFS=$IFS; IFS='-'
6636set x $ac_cv_host
6637shift
6638host_cpu=$1
6639host_vendor=$2
6640shift; shift
6641# Remember, the first character of IFS is used to create $*,
6642# except with old shells:
6643host_os=$*
6644IFS=$ac_save_IFS
6645case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
6646
6647
6648{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
6649$as_echo_n "checking target system type... " >&6; }
6650if ${ac_cv_target+:} false; then :
6651  $as_echo_n "(cached) " >&6
6652else
6653  if test "x$target_alias" = x; then
6654  ac_cv_target=$ac_cv_host
6655else
6656  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
6657    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
6658fi
6659
6660fi
6661{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
6662$as_echo "$ac_cv_target" >&6; }
6663case $ac_cv_target in
6664*-*-*) ;;
6665*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
6666esac
6667target=$ac_cv_target
6668ac_save_IFS=$IFS; IFS='-'
6669set x $ac_cv_target
6670shift
6671target_cpu=$1
6672target_vendor=$2
6673shift; shift
6674# Remember, the first character of IFS is used to create $*,
6675# except with old shells:
6676target_os=$*
6677IFS=$ac_save_IFS
6678case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
6679
6680
6681# The aliases save the names the user supplied, while $host etc.
6682# will get canonicalized.
6683test -n "$target_alias" &&
6684  test "$program_prefix$program_suffix$program_transform_name" = \
6685    NONENONEs,x,x, &&
6686  program_prefix=${target_alias}-
6687
6688# Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
6689# is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
6690# product you're building. The target of this build is called "host". Since this is confusing to most people, we
6691# have not adopted that system, but use "target" as the platform we are building for. In some places though we need
6692# to use the configure naming style.
6693
6694
6695
6696
6697
6698    # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
6699    # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
6700    # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
6701    # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
6702    OPENJDK_TARGET_AUTOCONF_NAME="$host"
6703    OPENJDK_BUILD_AUTOCONF_NAME="$build"
6704
6705
6706
6707    # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
6708
6709  case "$build_os" in
6710    *linux*)
6711      VAR_OS=linux
6712      VAR_OS_API=posix
6713      VAR_OS_ENV=linux
6714      ;;
6715    *solaris*)
6716      VAR_OS=solaris
6717      VAR_OS_API=posix
6718      VAR_OS_ENV=solaris
6719      ;;
6720    *darwin*)
6721      VAR_OS=macosx
6722      VAR_OS_API=posix
6723      VAR_OS_ENV=macosx
6724      ;;
6725    *bsd*)
6726      VAR_OS=bsd
6727      VAR_OS_API=posix
6728      VAR_OS_ENV=bsd
6729      ;;
6730    *cygwin*)
6731      VAR_OS=windows
6732      VAR_OS_API=winapi
6733      VAR_OS_ENV=windows.cygwin
6734      ;;
6735    *mingw*)
6736      VAR_OS=windows
6737      VAR_OS_API=winapi
6738      VAR_OS_ENV=windows.msys
6739      ;;
6740    *)
6741      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
6742      ;;
6743  esac
6744
6745
6746  # First argument is the cpu name from the trip/quad
6747  case "$build_cpu" in
6748    x86_64)
6749      VAR_CPU=x86_64
6750      VAR_CPU_ARCH=x86
6751      VAR_CPU_BITS=64
6752      VAR_CPU_ENDIAN=little
6753      ;;
6754    i?86)
6755      VAR_CPU=x86
6756      VAR_CPU_ARCH=x86
6757      VAR_CPU_BITS=32
6758      VAR_CPU_ENDIAN=little
6759      ;;
6760    arm*)
6761      VAR_CPU=arm
6762      VAR_CPU_ARCH=arm
6763      VAR_CPU_BITS=32
6764      VAR_CPU_ENDIAN=little
6765      ;;
6766    powerpc)
6767      VAR_CPU=ppc
6768      VAR_CPU_ARCH=ppc
6769      VAR_CPU_BITS=32
6770      VAR_CPU_ENDIAN=big
6771       ;;
6772    powerpc64)
6773      VAR_CPU=ppc64
6774      VAR_CPU_ARCH=ppc
6775      VAR_CPU_BITS=64
6776      VAR_CPU_ENDIAN=big
6777       ;;
6778    s390)
6779      VAR_CPU=s390
6780      VAR_CPU_ARCH=s390
6781      VAR_CPU_BITS=32
6782      VAR_CPU_ENDIAN=big
6783       ;;
6784    s390x)
6785      VAR_CPU=s390x
6786      VAR_CPU_ARCH=s390
6787      VAR_CPU_BITS=64
6788      VAR_CPU_ENDIAN=big
6789       ;;
6790    sparc)
6791      VAR_CPU=sparc
6792      VAR_CPU_ARCH=sparc
6793      VAR_CPU_BITS=32
6794      VAR_CPU_ENDIAN=big
6795       ;;
6796    sparcv9)
6797      VAR_CPU=sparcv9
6798      VAR_CPU_ARCH=sparc
6799      VAR_CPU_BITS=64
6800      VAR_CPU_ENDIAN=big
6801       ;;
6802    *)
6803      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
6804      ;;
6805  esac
6806
6807    # ..and setup our own variables. (Do this explicitely to facilitate searching)
6808    OPENJDK_BUILD_OS="$VAR_OS"
6809    OPENJDK_BUILD_OS_API="$VAR_OS_API"
6810    OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
6811    OPENJDK_BUILD_CPU="$VAR_CPU"
6812    OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
6813    OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
6814    OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
6815
6816
6817
6818
6819
6820
6821
6822    { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
6823$as_echo_n "checking openjdk-build os-cpu... " >&6; }
6824    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
6825$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
6826
6827    # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
6828
6829  case "$host_os" in
6830    *linux*)
6831      VAR_OS=linux
6832      VAR_OS_API=posix
6833      VAR_OS_ENV=linux
6834      ;;
6835    *solaris*)
6836      VAR_OS=solaris
6837      VAR_OS_API=posix
6838      VAR_OS_ENV=solaris
6839      ;;
6840    *darwin*)
6841      VAR_OS=macosx
6842      VAR_OS_API=posix
6843      VAR_OS_ENV=macosx
6844      ;;
6845    *bsd*)
6846      VAR_OS=bsd
6847      VAR_OS_API=posix
6848      VAR_OS_ENV=bsd
6849      ;;
6850    *cygwin*)
6851      VAR_OS=windows
6852      VAR_OS_API=winapi
6853      VAR_OS_ENV=windows.cygwin
6854      ;;
6855    *mingw*)
6856      VAR_OS=windows
6857      VAR_OS_API=winapi
6858      VAR_OS_ENV=windows.msys
6859      ;;
6860    *)
6861      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
6862      ;;
6863  esac
6864
6865
6866  # First argument is the cpu name from the trip/quad
6867  case "$host_cpu" in
6868    x86_64)
6869      VAR_CPU=x86_64
6870      VAR_CPU_ARCH=x86
6871      VAR_CPU_BITS=64
6872      VAR_CPU_ENDIAN=little
6873      ;;
6874    i?86)
6875      VAR_CPU=x86
6876      VAR_CPU_ARCH=x86
6877      VAR_CPU_BITS=32
6878      VAR_CPU_ENDIAN=little
6879      ;;
6880    arm*)
6881      VAR_CPU=arm
6882      VAR_CPU_ARCH=arm
6883      VAR_CPU_BITS=32
6884      VAR_CPU_ENDIAN=little
6885      ;;
6886    powerpc)
6887      VAR_CPU=ppc
6888      VAR_CPU_ARCH=ppc
6889      VAR_CPU_BITS=32
6890      VAR_CPU_ENDIAN=big
6891       ;;
6892    powerpc64)
6893      VAR_CPU=ppc64
6894      VAR_CPU_ARCH=ppc
6895      VAR_CPU_BITS=64
6896      VAR_CPU_ENDIAN=big
6897       ;;
6898    s390)
6899      VAR_CPU=s390
6900      VAR_CPU_ARCH=s390
6901      VAR_CPU_BITS=32
6902      VAR_CPU_ENDIAN=big
6903       ;;
6904    s390x)
6905      VAR_CPU=s390x
6906      VAR_CPU_ARCH=s390
6907      VAR_CPU_BITS=64
6908      VAR_CPU_ENDIAN=big
6909       ;;
6910    sparc)
6911      VAR_CPU=sparc
6912      VAR_CPU_ARCH=sparc
6913      VAR_CPU_BITS=32
6914      VAR_CPU_ENDIAN=big
6915       ;;
6916    sparcv9)
6917      VAR_CPU=sparcv9
6918      VAR_CPU_ARCH=sparc
6919      VAR_CPU_BITS=64
6920      VAR_CPU_ENDIAN=big
6921       ;;
6922    *)
6923      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
6924      ;;
6925  esac
6926
6927    # ... and setup our own variables. (Do this explicitely to facilitate searching)
6928    OPENJDK_TARGET_OS="$VAR_OS"
6929    OPENJDK_TARGET_OS_API="$VAR_OS_API"
6930    OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
6931    OPENJDK_TARGET_CPU="$VAR_CPU"
6932    OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
6933    OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
6934    OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
6935
6936
6937
6938
6939
6940
6941
6942    { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
6943$as_echo_n "checking openjdk-target os-cpu... " >&6; }
6944    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
6945$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
6946
6947
6948
6949# Check whether --with-target-bits was given.
6950if test "${with_target_bits+set}" = set; then :
6951  withval=$with_target_bits;
6952fi
6953
6954
6955  # We have three types of compiles:
6956  # native  == normal compilation, target system == build system
6957  # cross   == traditional cross compilation, target system != build system; special toolchain needed
6958  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
6959  #
6960  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
6961    # We're doing a proper cross-compilation
6962    COMPILE_TYPE="cross"
6963  else
6964    COMPILE_TYPE="native"
6965  fi
6966
6967  if test "x$with_target_bits" != x; then
6968    if test "x$COMPILE_TYPE" = "xcross"; then
6969      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
6970    fi
6971
6972    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
6973      # A reduced build is requested
6974      COMPILE_TYPE="reduced"
6975      OPENJDK_TARGET_CPU_BITS=32
6976      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
6977        OPENJDK_TARGET_CPU=x86
6978      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
6979        OPENJDK_TARGET_CPU=sparc
6980      else
6981        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
6982      fi
6983    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
6984      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
6985    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
6986      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
6987$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
6988    else
6989      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
6990    fi
6991  fi
6992
6993
6994{ $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
6995$as_echo_n "checking compilation type... " >&6; }
6996{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
6997$as_echo "$COMPILE_TYPE" >&6; }
6998
6999
7000    if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
7001       REQUIRED_OS_NAME=SunOS
7002       REQUIRED_OS_VERSION=5.10
7003    fi
7004    if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
7005       REQUIRED_OS_NAME=Linux
7006       REQUIRED_OS_VERSION=2.6
7007    fi
7008    if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
7009        REQUIRED_OS_NAME=Windows
7010        if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
7011            REQUIRED_OS_VERSION=5.2
7012        else
7013            REQUIRED_OS_VERSION=5.1
7014        fi
7015    fi
7016    if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
7017        REQUIRED_OS_NAME=Darwin
7018        REQUIRED_OS_VERSION=11.2
7019    fi
7020
7021
7022
7023
7024
7025    # Also store the legacy naming of the cpu.
7026    # Ie i586 and amd64 instead of x86 and x86_64
7027    OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
7028    if test "x$OPENJDK_TARGET_CPU" = xx86; then
7029      OPENJDK_TARGET_CPU_LEGACY="i586"
7030    elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7031      # On all platforms except MacOSX replace x86_64 with amd64.
7032      OPENJDK_TARGET_CPU_LEGACY="amd64"
7033    fi
7034
7035
7036    # And the second legacy naming of the cpu.
7037    # Ie i386 and amd64 instead of x86 and x86_64.
7038    OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
7039    if test "x$OPENJDK_TARGET_CPU" = xx86; then
7040      OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
7041    elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7042      OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
7043    fi
7044
7045
7046    # This is the name of the cpu (but using i386 and amd64 instead of
7047    # x86 and x86_64, respectively), preceeded by a /, to be used when
7048    # locating libraries. On macosx, it's empty, though.
7049    OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
7050    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
7051        OPENJDK_TARGET_CPU_LIBDIR=""
7052    fi
7053
7054
7055    # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
7056    # /amd64 or /sparcv9. This string is appended to some library paths, like this:
7057    # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
7058    OPENJDK_TARGET_CPU_ISADIR=""
7059    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
7060      if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7061          OPENJDK_TARGET_CPU_ISADIR="/amd64"
7062      elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
7063          OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
7064      fi
7065    fi
7066
7067
7068    # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
7069    OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
7070    if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
7071      # On linux only, we replace x86 with i386.
7072      OPENJDK_TARGET_CPU_OSARCH="i386"
7073    elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7074      # On all platforms except macosx, we replace x86_64 with amd64.
7075      OPENJDK_TARGET_CPU_OSARCH="amd64"
7076    fi
7077
7078
7079    OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
7080    if test "x$OPENJDK_TARGET_CPU" = xx86; then
7081      OPENJDK_TARGET_CPU_JLI="i386"
7082    elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7083      # On all platforms except macosx, we replace x86_64 with amd64.
7084      OPENJDK_TARGET_CPU_JLI="amd64"
7085    fi
7086    # Now setup the -D flags for building libjli.
7087    OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
7088    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
7089      if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
7090        OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
7091      elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
7092        OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
7093      fi
7094    fi
7095
7096
7097    # Setup OPENJDK_TARGET_OS_API_DIR, used in source paths.
7098    if test "x$OPENJDK_TARGET_OS_API" = xposix; then
7099        OPENJDK_TARGET_OS_API_DIR="solaris"
7100    fi
7101    if test "x$OPENJDK_TARGET_OS_API" = xwinapi; then
7102        OPENJDK_TARGET_OS_API_DIR="windows"
7103    fi
7104
7105
7106    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7107        A_LP64="LP64:="
7108        # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
7109        # unpack200.exe
7110        if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
7111            ADD_LP64="-D_LP64=1"
7112        fi
7113    fi
7114    LP64=$A_LP64
7115
7116
7117    if test "x$COMPILE_TYPE" = "xcross"; then
7118      # FIXME: ... or should this include reduced builds..?
7119      DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
7120    else
7121      DEFINE_CROSS_COMPILE_ARCH=""
7122    fi
7123
7124
7125    # ZERO_ARCHDEF is used to enable architecture-specific code
7126    case "${OPENJDK_TARGET_CPU}" in
7127      ppc*)    ZERO_ARCHDEF=PPC   ;;
7128      s390*)   ZERO_ARCHDEF=S390  ;;
7129      sparc*)  ZERO_ARCHDEF=SPARC ;;
7130      x86_64*) ZERO_ARCHDEF=AMD64 ;;
7131      x86)     ZERO_ARCHDEF=IA32  ;;
7132      *)      ZERO_ARCHDEF=$(echo "${OPENJDK_TARGET_CPU_LEGACY_LIB}" | tr a-z A-Z)
7133    esac
7134
7135
7136
7137
7138
7139# Continue setting up basic stuff. Most remaining code require fundamental tools.
7140
7141# Locate the directory of this script.
7142SCRIPT="$0"
7143AUTOCONF_DIR=`cd \`$DIRNAME $SCRIPT\`; $THEPWDCMD -L`
7144
7145# Where is the source? It is located two levels above the configure script.
7146CURDIR="$PWD"
7147cd "$AUTOCONF_DIR/../.."
7148SRC_ROOT="`$THEPWDCMD -L`"
7149
7150if 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
7242else
7243  PATH_SEP=":"
7244fi
7245
7246
7247
7248cd "$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
7495if 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"
7498fi
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
7509if test "x$with_sys_root" != x; then
7510  SYS_ROOT=$with_sys_root
7511else
7512  SYS_ROOT=/
7513fi
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.
7671BUILD_LOG='$(OUTPUT_ROOT)/build.log'
7672BUILD_LOG_PREVIOUS='$(OUTPUT_ROOT)/build.log.old'
7673BUILD_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
7748if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
7749    JDK_VARIANT="normal"
7750else
7751    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
7752fi
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
7781if test "x$with_jvm_variants" = x; then
7782     with_jvm_variants="server"
7783fi
7784
7785JVM_VARIANTS=",$with_jvm_variants,"
7786TEST_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,//' -e 's/client,//'  -e 's/minimal1,//' -e 's/kernel,//' -e 's/zero,//' -e 's/zeroshark,//'`
7787
7788if test "x$TEST_VARIANTS" != "x,"; then
7789   as_fn_error $? "The available JVM variants are: server, client, minimal1, kernel, zero, zeroshark" "$LINENO" 5
7790fi
7791{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
7792$as_echo "$with_jvm_variants" >&6; }
7793
7794JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
7795JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
7796JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
7797JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
7798JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
7799JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
7800
7801if 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
7805fi
7806if 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
7810fi
7811if 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
7815fi
7816
7817# Replace the commas with AND for use in the build directory name.
7818ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/'`
7819COUNT_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/'`
7820if test "x$COUNT_VARIANTS" != "x,1"; then
7821    BUILDING_MULTIPLE_JVM_VARIANTS=yes
7822else
7823    BUILDING_MULTIPLE_JVM_VARIANTS=no
7824fi
7825
7826
7827
7828
7829
7830
7831
7832
7833
7834INCLUDE_SA=true
7835if test "x$JVM_VARIANT_ZERO" = xtrue ; then
7836    INCLUDE_SA=false
7837fi
7838if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then
7839    INCLUDE_SA=false
7840fi
7841
7842
7843if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
7844   MACOSX_UNIVERSAL="true"
7845fi
7846
7847
7848
7849
7850
7851###############################################################################
7852#
7853# Set the debug level
7854#    release: no debug information, all optimizations, no asserts.
7855#    fastdebug: debug information (-g), all optimizations, all asserts
7856#    slowdebug: debug information (-g), no optimizations, all asserts
7857#
7858DEBUG_LEVEL="release"
7859{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
7860$as_echo_n "checking which debug level to use... " >&6; }
7861# Check whether --enable-debug was given.
7862if test "${enable_debug+set}" = set; then :
7863  enableval=$enable_debug;
7864        ENABLE_DEBUG="${enableval}"
7865        DEBUG_LEVEL="fastdebug"
7866
7867else
7868  ENABLE_DEBUG="no"
7869fi
7870
7871
7872
7873# Check whether --with-debug-level was given.
7874if test "${with_debug_level+set}" = set; then :
7875  withval=$with_debug_level;
7876        DEBUG_LEVEL="${withval}"
7877        if test "x$ENABLE_DEBUG" = xyes; then
7878			as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
7879        fi
7880
7881fi
7882
7883{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
7884$as_echo "$DEBUG_LEVEL" >&6; }
7885
7886if test "x$DEBUG_LEVEL" != xrelease && \
7887   test "x$DEBUG_LEVEL" != xfastdebug && \
7888   test "x$DEBUG_LEVEL" != xslowdebug; then
7889   as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
7890fi
7891
7892
7893###############################################################################
7894#
7895# Setup legacy vars/targets and new vars to deal with different debug levels.
7896#
7897
7898case $DEBUG_LEVEL in
7899      release )
7900          VARIANT="OPT"
7901          FASTDEBUG="false"
7902          DEBUG_CLASSFILES="false"
7903          BUILD_VARIANT_RELEASE=""
7904          HOTSPOT_DEBUG_LEVEL="product"
7905          HOTSPOT_EXPORT="product"
7906           ;;
7907      fastdebug )
7908          VARIANT="DBG"
7909          FASTDEBUG="true"
7910          DEBUG_CLASSFILES="true"
7911          BUILD_VARIANT_RELEASE="-fastdebug"
7912          HOTSPOT_DEBUG_LEVEL="fastdebug"
7913          HOTSPOT_EXPORT="fastdebug"
7914           ;;
7915      slowdebug )
7916          VARIANT="DBG"
7917          FASTDEBUG="false"
7918          DEBUG_CLASSFILES="true"
7919          BUILD_VARIANT_RELEASE="-debug"
7920          HOTSPOT_DEBUG_LEVEL="jvmg"
7921          HOTSPOT_EXPORT="debug"
7922           ;;
7923esac
7924
7925#####
7926# Generate the legacy makefile targets for hotspot.
7927# The hotspot api for selecting the build artifacts, really, needs to be improved.
7928# JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
7929# determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
7930# But until then ...
7931HOTSPOT_TARGET=""
7932
7933if test "x$JVM_VARIANT_SERVER" = xtrue; then
7934    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
7935fi
7936
7937if test "x$JVM_VARIANT_CLIENT" = xtrue; then
7938    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
7939fi
7940
7941if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
7942    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
7943fi
7944
7945if test "x$JVM_VARIANT_KERNEL" = xtrue; then
7946    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
7947fi
7948
7949if test "x$JVM_VARIANT_ZERO" = xtrue; then
7950    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
7951fi
7952
7953if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
7954    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
7955fi
7956
7957HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
7958
7959# On Macosx universal binaries are produced, but they only contain
7960# 64 bit intel. This invalidates control of which jvms are built
7961# from configure, but only server is valid anyway. Fix this
7962# when hotspot makefiles are rewritten.
7963if test "x$MACOSX_UNIVERSAL" = xtrue; then
7964    HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
7965fi
7966
7967#####
7968
7969
7970
7971
7972
7973
7974
7975
7976# With basic setup done, call the custom early hook.
7977
7978
7979# To properly create a configuration name, we need to have the OpenJDK target
7980# and options (variants and debug level) parsed.
7981
7982
7983
7984# Check whether --with-conf-name was given.
7985if test "${with_conf_name+set}" = set; then :
7986  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
7987fi
7988
7989
7990# Test from where we are running configure, in or outside of src root.
7991if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
7992        || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
7993        || test "x$CURDIR" = "x$SRC_ROOT/common/makefiles" ; then
7994    # We are running configure from the src root.
7995    # Create a default ./build/target-variant-debuglevel output root.
7996    if test "x${CONF_NAME}" = x; then
7997        CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
7998    fi
7999    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
8000    $MKDIR -p "$OUTPUT_ROOT"
8001    if test ! -d "$OUTPUT_ROOT"; then
8002        as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
8003    fi
8004else
8005    # We are running configure from outside of the src dir.
8006    # Then use the current directory as output dir!
8007    # If configuration is situated in normal build directory, just use the build
8008    # directory name as configuration name, otherwise use the complete path.
8009    if test "x${CONF_NAME}" = x; then
8010        CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
8011    fi
8012    OUTPUT_ROOT="$CURDIR"
8013
8014    # WARNING: This might be a bad thing to do. You need to be sure you want to
8015    # have a configuration in this directory. Do some sanity checks!
8016
8017    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
8018      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
8019      # other files
8020      files_present=`$LS $OUTPUT_ROOT`
8021      # Configure has already touched config.log and confdefs.h in the current dir when this check
8022      # is performed.
8023      filtered_files=`$ECHO "$files_present" | $SED -e 's/config.log//g' -e 's/confdefs.h//g' -e 's/ //g' \
8024                                             | $TR -d '\n'`
8025      if test "x$filtered_files" != x; then
8026        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
8027$as_echo "$as_me: Current directory is $CURDIR." >&6;}
8028        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
8029$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
8030        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
8031$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
8032        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
8033$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
8034        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
8035$as_echo "$as_me: seriously mess up just about everything." >&6;}
8036        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
8037$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
8038        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
8039$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
8040        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
8041      fi
8042    fi
8043fi
8044{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
8045$as_echo_n "checking what configuration name to use... " >&6; }
8046{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
8047$as_echo "$CONF_NAME" >&6; }
8048
8049
8050  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8051
8052  # Input might be given as Windows format, start by converting to
8053  # unix format.
8054  path="$OUTPUT_ROOT"
8055  new_path=`$CYGPATH -u "$path"`
8056
8057  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8058  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8059  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8060  # "foo.exe" is OK but "foo" is an error.
8061  #
8062  # This test is therefore slightly more accurate than "test -f" to check for file precense.
8063  # It is also a way to make sure we got the proper file name for the real test later on.
8064  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8065  if test "x$test_shortpath" = x; then
8066    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
8067$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
8068    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
8069  fi
8070
8071  # Call helper function which possibly converts this using DOS-style short mode.
8072  # If so, the updated path is stored in $new_path.
8073
8074  input_path="$new_path"
8075  # Check if we need to convert this using DOS-style short mode. If the path
8076  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8077  # take no chances and rewrite it.
8078  # Note: m4 eats our [], so we need to use [ and ] instead.
8079  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8080  if test "x$has_forbidden_chars" != x; then
8081    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8082    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8083    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8084    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8085      # Going to short mode and back again did indeed matter. Since short mode is
8086      # case insensitive, let's make it lowercase to improve readability.
8087      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8088      # Now convert it back to Unix-stile (cygpath)
8089      input_path=`$CYGPATH -u "$shortmode_path"`
8090      new_path="$input_path"
8091    fi
8092  fi
8093
8094  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8095  if test "x$test_cygdrive_prefix" = x; then
8096    # As a simple fix, exclude /usr/bin since it's not a real path.
8097    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
8098      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8099      # a path prefixed by /cygdrive for fixpath to work.
8100      new_path="$CYGWIN_ROOT_PATH$input_path"
8101    fi
8102  fi
8103
8104
8105  if test "x$path" != "x$new_path"; then
8106    OUTPUT_ROOT="$new_path"
8107    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
8108$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
8109  fi
8110
8111  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8112
8113  path="$OUTPUT_ROOT"
8114  has_colon=`$ECHO $path | $GREP ^.:`
8115  new_path="$path"
8116  if test "x$has_colon" = x; then
8117    # Not in mixed or Windows style, start by that.
8118    new_path=`cmd //c echo $path`
8119  fi
8120
8121
8122  input_path="$new_path"
8123  # Check if we need to convert this using DOS-style short mode. If the path
8124  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8125  # take no chances and rewrite it.
8126  # Note: m4 eats our [], so we need to use [ and ] instead.
8127  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8128  if test "x$has_forbidden_chars" != x; then
8129    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8130    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8131  fi
8132
8133
8134  windows_path="$new_path"
8135  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8136    unix_path=`$CYGPATH -u "$windows_path"`
8137    new_path="$unix_path"
8138  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8139    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8140    new_path="$unix_path"
8141  fi
8142
8143  if test "x$path" != "x$new_path"; then
8144    OUTPUT_ROOT="$new_path"
8145    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
8146$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
8147  fi
8148
8149  # Save the first 10 bytes of this path to the storage, so fixpath can work.
8150  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8151
8152  else
8153    # We're on a posix platform. Hooray! :)
8154    path="$OUTPUT_ROOT"
8155    has_space=`$ECHO "$path" | $GREP " "`
8156    if test "x$has_space" != x; then
8157      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
8158$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
8159      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
8160    fi
8161
8162    # Use eval to expand a potential ~
8163    eval path="$path"
8164    if test ! -f "$path" && test ! -d "$path"; then
8165      as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
8166    fi
8167
8168    OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
8169  fi
8170
8171
8172SPEC=$OUTPUT_ROOT/spec.gmk
8173
8174CONF_NAME=$CONF_NAME
8175
8176OUTPUT_ROOT=$OUTPUT_ROOT
8177
8178
8179# Most of the probed defines are put into config.h
8180ac_config_headers="$ac_config_headers $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in"
8181
8182# The spec.gmk file contains all variables for the make system.
8183ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
8184
8185# The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
8186ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
8187
8188# The bootcycle-spec.gmk file contains support for boot cycle builds.
8189ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
8190
8191# The compare.sh is used to compare the build output to other builds.
8192ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
8193
8194# Spec.sh is currently used by compare-objects.sh
8195ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in"
8196
8197# The generated Makefile knows where the spec.gmk is and where the source is.
8198# You can run make from the OUTPUT_ROOT, or from the top-level Makefile
8199# which will look for generated configurations
8200ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
8201
8202
8203# Save the arguments given to us
8204echo "$CONFIGURE_COMMAND_LINE" > $OUTPUT_ROOT/configure-arguments
8205
8206
8207# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
8208
8209    for ac_prog in apt-get yum port pkgutil pkgadd
8210do
8211  # Extract the first word of "$ac_prog", so it can be a program name with args.
8212set dummy $ac_prog; ac_word=$2
8213{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8214$as_echo_n "checking for $ac_word... " >&6; }
8215if ${ac_cv_prog_PKGHANDLER+:} false; then :
8216  $as_echo_n "(cached) " >&6
8217else
8218  if test -n "$PKGHANDLER"; then
8219  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
8220else
8221as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8222for as_dir in $PATH
8223do
8224  IFS=$as_save_IFS
8225  test -z "$as_dir" && as_dir=.
8226    for ac_exec_ext in '' $ac_executable_extensions; do
8227  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8228    ac_cv_prog_PKGHANDLER="$ac_prog"
8229    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8230    break 2
8231  fi
8232done
8233  done
8234IFS=$as_save_IFS
8235
8236fi
8237fi
8238PKGHANDLER=$ac_cv_prog_PKGHANDLER
8239if test -n "$PKGHANDLER"; then
8240  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
8241$as_echo "$PKGHANDLER" >&6; }
8242else
8243  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8244$as_echo "no" >&6; }
8245fi
8246
8247
8248  test -n "$PKGHANDLER" && break
8249done
8250
8251
8252
8253# Setup tools that requires more complex handling, or that is not needed by the configure script.
8254
8255
8256  # We need to find a recent version of GNU make. Especially on Solaris, this can be tricky.
8257  if test "x$MAKE" != x; then
8258    # User has supplied a make, test it.
8259    if test ! -f "$MAKE"; then
8260      as_fn_error $? "The specified make (by MAKE=$MAKE) is not found." "$LINENO" 5
8261    fi
8262
8263  MAKE_CANDIDATE=""$MAKE""
8264  DESCRIPTION="user supplied MAKE=$MAKE"
8265  if test "x$MAKE_CANDIDATE" != x; then
8266    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8267$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8268    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8269    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8270    if test "x$IS_GNU_MAKE" = x; then
8271      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8272$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8273    else
8274      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8275      if test "x$IS_MODERN_MAKE" = x; then
8276        { $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
8277$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;}
8278      else
8279        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8280          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8281            MAKE_EXPECTED_ENV='cygwin'
8282          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8283            MAKE_EXPECTED_ENV='msys'
8284          else
8285            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8286          fi
8287          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8288          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8289        else
8290          # Not relevant for non-Windows
8291          IS_MAKE_CORRECT_ENV=true
8292        fi
8293        if test "x$IS_MAKE_CORRECT_ENV" = x; then
8294          { $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
8295$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;}
8296        else
8297          FOUND_MAKE=$MAKE_CANDIDATE
8298
8299  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8300
8301  # First separate the path from the arguments. This will split at the first
8302  # space.
8303  complete="$FOUND_MAKE"
8304  path="${complete%% *}"
8305  tmp="$complete EOL"
8306  arguments="${tmp#* }"
8307
8308  # Input might be given as Windows format, start by converting to
8309  # unix format.
8310  new_path=`$CYGPATH -u "$path"`
8311
8312  # Now try to locate executable using which
8313  new_path=`$WHICH "$new_path" 2> /dev/null`
8314  # bat and cmd files are not always considered executable in cygwin causing which
8315  # to not find them
8316  if test "x$new_path" = x \
8317           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8318           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8319    new_path=`$CYGPATH -u "$path"`
8320  fi
8321  if test "x$new_path" = x; then
8322    # Oops. Which didn't find the executable.
8323    # The splitting of arguments from the executable at a space might have been incorrect,
8324    # since paths with space are more likely in Windows. Give it another try with the whole
8325    # argument.
8326    path="$complete"
8327    arguments="EOL"
8328    new_path=`$CYGPATH -u "$path"`
8329    new_path=`$WHICH "$new_path" 2> /dev/null`
8330    # bat and cmd files are not always considered executable in cygwin causing which
8331    # to not find them
8332    if test "x$new_path" = x \
8333             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8334             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8335      new_path=`$CYGPATH -u "$path"`
8336    fi
8337    if test "x$new_path" = x; then
8338      # It's still not found. Now this is an unrecoverable error.
8339      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8340$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8341      has_space=`$ECHO "$complete" | $GREP " "`
8342      if test "x$has_space" != x; then
8343        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8344$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8345      fi
8346      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8347    fi
8348  fi
8349
8350  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8351  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8352  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8353  # "foo.exe" is OK but "foo" is an error.
8354  #
8355  # This test is therefore slightly more accurate than "test -f" to check for file presence.
8356  # It is also a way to make sure we got the proper file name for the real test later on.
8357  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8358  if test "x$test_shortpath" = x; then
8359    # Short path failed, file does not exist as specified.
8360    # Try adding .exe or .cmd
8361    if test -f "${new_path}.exe"; then
8362       input_to_shortpath="${new_path}.exe"
8363    elif test -f "${new_path}.cmd"; then
8364       input_to_shortpath="${new_path}.cmd"
8365    else
8366      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8367$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8368      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8369$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8370      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8371    fi
8372  else
8373    input_to_shortpath="$new_path"
8374  fi
8375
8376  # Call helper function which possibly converts this using DOS-style short mode.
8377  # If so, the updated path is stored in $new_path.
8378  new_path="$input_to_shortpath"
8379
8380  input_path="$input_to_shortpath"
8381  # Check if we need to convert this using DOS-style short mode. If the path
8382  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8383  # take no chances and rewrite it.
8384  # Note: m4 eats our [], so we need to use [ and ] instead.
8385  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8386  if test "x$has_forbidden_chars" != x; then
8387    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8388    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8389    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8390    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8391      # Going to short mode and back again did indeed matter. Since short mode is
8392      # case insensitive, let's make it lowercase to improve readability.
8393      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8394      # Now convert it back to Unix-stile (cygpath)
8395      input_path=`$CYGPATH -u "$shortmode_path"`
8396      new_path="$input_path"
8397    fi
8398  fi
8399
8400  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8401  if test "x$test_cygdrive_prefix" = x; then
8402    # As a simple fix, exclude /usr/bin since it's not a real path.
8403    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8404      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8405      # a path prefixed by /cygdrive for fixpath to work.
8406      new_path="$CYGWIN_ROOT_PATH$input_path"
8407    fi
8408  fi
8409
8410  # remove trailing .exe if any
8411  new_path="${new_path/%.exe/}"
8412
8413  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8414
8415  # First separate the path from the arguments. This will split at the first
8416  # space.
8417  complete="$FOUND_MAKE"
8418  path="${complete%% *}"
8419  tmp="$complete EOL"
8420  arguments="${tmp#* }"
8421
8422  # Input might be given as Windows format, start by converting to
8423  # unix format.
8424  new_path="$path"
8425
8426  windows_path="$new_path"
8427  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8428    unix_path=`$CYGPATH -u "$windows_path"`
8429    new_path="$unix_path"
8430  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8431    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8432    new_path="$unix_path"
8433  fi
8434
8435
8436  # Now try to locate executable using which
8437  new_path=`$WHICH "$new_path" 2> /dev/null`
8438
8439  if test "x$new_path" = x; then
8440    # Oops. Which didn't find the executable.
8441    # The splitting of arguments from the executable at a space might have been incorrect,
8442    # since paths with space are more likely in Windows. Give it another try with the whole
8443    # argument.
8444    path="$complete"
8445    arguments="EOL"
8446    new_path="$path"
8447
8448  windows_path="$new_path"
8449  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8450    unix_path=`$CYGPATH -u "$windows_path"`
8451    new_path="$unix_path"
8452  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8453    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8454    new_path="$unix_path"
8455  fi
8456
8457
8458    new_path=`$WHICH "$new_path" 2> /dev/null`
8459
8460    if test "x$new_path" = x; then
8461      # It's still not found. Now this is an unrecoverable error.
8462      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8463$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8464      has_space=`$ECHO "$complete" | $GREP " "`
8465      if test "x$has_space" != x; then
8466        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8467$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8468      fi
8469      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8470    fi
8471  fi
8472
8473  # Now new_path has a complete unix path to the binary
8474  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8475    # Keep paths in /bin as-is, but remove trailing .exe if any
8476    new_path="${new_path/%.exe/}"
8477    # Do not save /bin paths to all_fixpath_prefixes!
8478  else
8479    # Not in mixed or Windows style, start by that.
8480    new_path=`cmd //c echo $new_path`
8481
8482  input_path="$new_path"
8483  # Check if we need to convert this using DOS-style short mode. If the path
8484  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8485  # take no chances and rewrite it.
8486  # Note: m4 eats our [], so we need to use [ and ] instead.
8487  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8488  if test "x$has_forbidden_chars" != x; then
8489    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8490    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8491  fi
8492
8493    # Output is in $new_path
8494
8495  windows_path="$new_path"
8496  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8497    unix_path=`$CYGPATH -u "$windows_path"`
8498    new_path="$unix_path"
8499  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8500    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8501    new_path="$unix_path"
8502  fi
8503
8504    # remove trailing .exe if any
8505    new_path="${new_path/%.exe/}"
8506
8507    # Save the first 10 bytes of this path to the storage, so fixpath can work.
8508    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8509  fi
8510
8511  else
8512    # We're on a posix platform. Hooray! :)
8513    # First separate the path from the arguments. This will split at the first
8514    # space.
8515    complete="$FOUND_MAKE"
8516    path="${complete%% *}"
8517    tmp="$complete EOL"
8518    arguments="${tmp#* }"
8519
8520    # Cannot rely on the command "which" here since it doesn't always work.
8521    is_absolute_path=`$ECHO "$path" | $GREP ^/`
8522    if test -z "$is_absolute_path"; then
8523      # Path to executable is not absolute. Find it.
8524      IFS_save="$IFS"
8525      IFS=:
8526      for p in $PATH; do
8527        if test -f "$p/$path" && test -x "$p/$path"; then
8528          new_path="$p/$path"
8529          break
8530        fi
8531      done
8532      IFS="$IFS_save"
8533    else
8534      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
8535$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
8536      new_path="$path"
8537    fi
8538
8539    if test "x$new_path" = x; then
8540        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8541$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8542        has_space=`$ECHO "$complete" | $GREP " "`
8543        if test "x$has_space" != x; then
8544          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
8545$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
8546        fi
8547        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8548      fi
8549  fi
8550
8551      # Now join together the path and the arguments once again
8552      if test "x$arguments" != xEOL; then
8553        new_complete="$new_path ${arguments% *}"
8554      else
8555        new_complete="$new_path"
8556      fi
8557
8558  if test "x$complete" != "x$new_complete"; then
8559      FOUND_MAKE="$new_complete"
8560      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
8561$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
8562    fi
8563
8564        fi
8565      fi
8566    fi
8567  fi
8568
8569    if test "x$FOUND_MAKE" = x; then
8570      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make 3.81 or newer." "$LINENO" 5
8571    fi
8572  else
8573    # Try our hardest to locate a correct version of GNU make
8574    for ac_prog in gmake
8575do
8576  # Extract the first word of "$ac_prog", so it can be a program name with args.
8577set dummy $ac_prog; ac_word=$2
8578{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8579$as_echo_n "checking for $ac_word... " >&6; }
8580if ${ac_cv_path_CHECK_GMAKE+:} false; then :
8581  $as_echo_n "(cached) " >&6
8582else
8583  case $CHECK_GMAKE in
8584  [\\/]* | ?:[\\/]*)
8585  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
8586  ;;
8587  *)
8588  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8589for as_dir in $PATH
8590do
8591  IFS=$as_save_IFS
8592  test -z "$as_dir" && as_dir=.
8593    for ac_exec_ext in '' $ac_executable_extensions; do
8594  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8595    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
8596    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8597    break 2
8598  fi
8599done
8600  done
8601IFS=$as_save_IFS
8602
8603  ;;
8604esac
8605fi
8606CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
8607if test -n "$CHECK_GMAKE"; then
8608  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
8609$as_echo "$CHECK_GMAKE" >&6; }
8610else
8611  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8612$as_echo "no" >&6; }
8613fi
8614
8615
8616  test -n "$CHECK_GMAKE" && break
8617done
8618
8619
8620  MAKE_CANDIDATE=""$CHECK_GMAKE""
8621  DESCRIPTION="gmake in PATH"
8622  if test "x$MAKE_CANDIDATE" != x; then
8623    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8624$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8625    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8626    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8627    if test "x$IS_GNU_MAKE" = x; then
8628      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8629$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8630    else
8631      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8632      if test "x$IS_MODERN_MAKE" = x; then
8633        { $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
8634$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;}
8635      else
8636        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8637          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8638            MAKE_EXPECTED_ENV='cygwin'
8639          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8640            MAKE_EXPECTED_ENV='msys'
8641          else
8642            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8643          fi
8644          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8645          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8646        else
8647          # Not relevant for non-Windows
8648          IS_MAKE_CORRECT_ENV=true
8649        fi
8650        if test "x$IS_MAKE_CORRECT_ENV" = x; then
8651          { $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
8652$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;}
8653        else
8654          FOUND_MAKE=$MAKE_CANDIDATE
8655
8656  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8657
8658  # First separate the path from the arguments. This will split at the first
8659  # space.
8660  complete="$FOUND_MAKE"
8661  path="${complete%% *}"
8662  tmp="$complete EOL"
8663  arguments="${tmp#* }"
8664
8665  # Input might be given as Windows format, start by converting to
8666  # unix format.
8667  new_path=`$CYGPATH -u "$path"`
8668
8669  # Now try to locate executable using which
8670  new_path=`$WHICH "$new_path" 2> /dev/null`
8671  # bat and cmd files are not always considered executable in cygwin causing which
8672  # to not find them
8673  if test "x$new_path" = x \
8674           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8675           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8676    new_path=`$CYGPATH -u "$path"`
8677  fi
8678  if test "x$new_path" = x; then
8679    # Oops. Which didn't find the executable.
8680    # The splitting of arguments from the executable at a space might have been incorrect,
8681    # since paths with space are more likely in Windows. Give it another try with the whole
8682    # argument.
8683    path="$complete"
8684    arguments="EOL"
8685    new_path=`$CYGPATH -u "$path"`
8686    new_path=`$WHICH "$new_path" 2> /dev/null`
8687    # bat and cmd files are not always considered executable in cygwin causing which
8688    # to not find them
8689    if test "x$new_path" = x \
8690             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8691             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8692      new_path=`$CYGPATH -u "$path"`
8693    fi
8694    if test "x$new_path" = x; then
8695      # It's still not found. Now this is an unrecoverable error.
8696      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8697$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8698      has_space=`$ECHO "$complete" | $GREP " "`
8699      if test "x$has_space" != x; then
8700        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8701$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8702      fi
8703      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8704    fi
8705  fi
8706
8707  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8708  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8709  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8710  # "foo.exe" is OK but "foo" is an error.
8711  #
8712  # This test is therefore slightly more accurate than "test -f" to check for file presence.
8713  # It is also a way to make sure we got the proper file name for the real test later on.
8714  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8715  if test "x$test_shortpath" = x; then
8716    # Short path failed, file does not exist as specified.
8717    # Try adding .exe or .cmd
8718    if test -f "${new_path}.exe"; then
8719       input_to_shortpath="${new_path}.exe"
8720    elif test -f "${new_path}.cmd"; then
8721       input_to_shortpath="${new_path}.cmd"
8722    else
8723      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8724$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8725      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8726$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8727      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8728    fi
8729  else
8730    input_to_shortpath="$new_path"
8731  fi
8732
8733  # Call helper function which possibly converts this using DOS-style short mode.
8734  # If so, the updated path is stored in $new_path.
8735  new_path="$input_to_shortpath"
8736
8737  input_path="$input_to_shortpath"
8738  # Check if we need to convert this using DOS-style short mode. If the path
8739  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8740  # take no chances and rewrite it.
8741  # Note: m4 eats our [], so we need to use [ and ] instead.
8742  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8743  if test "x$has_forbidden_chars" != x; then
8744    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8745    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8746    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8747    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8748      # Going to short mode and back again did indeed matter. Since short mode is
8749      # case insensitive, let's make it lowercase to improve readability.
8750      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8751      # Now convert it back to Unix-stile (cygpath)
8752      input_path=`$CYGPATH -u "$shortmode_path"`
8753      new_path="$input_path"
8754    fi
8755  fi
8756
8757  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8758  if test "x$test_cygdrive_prefix" = x; then
8759    # As a simple fix, exclude /usr/bin since it's not a real path.
8760    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8761      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8762      # a path prefixed by /cygdrive for fixpath to work.
8763      new_path="$CYGWIN_ROOT_PATH$input_path"
8764    fi
8765  fi
8766
8767  # remove trailing .exe if any
8768  new_path="${new_path/%.exe/}"
8769
8770  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8771
8772  # First separate the path from the arguments. This will split at the first
8773  # space.
8774  complete="$FOUND_MAKE"
8775  path="${complete%% *}"
8776  tmp="$complete EOL"
8777  arguments="${tmp#* }"
8778
8779  # Input might be given as Windows format, start by converting to
8780  # unix format.
8781  new_path="$path"
8782
8783  windows_path="$new_path"
8784  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8785    unix_path=`$CYGPATH -u "$windows_path"`
8786    new_path="$unix_path"
8787  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8788    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8789    new_path="$unix_path"
8790  fi
8791
8792
8793  # Now try to locate executable using which
8794  new_path=`$WHICH "$new_path" 2> /dev/null`
8795
8796  if test "x$new_path" = x; then
8797    # Oops. Which didn't find the executable.
8798    # The splitting of arguments from the executable at a space might have been incorrect,
8799    # since paths with space are more likely in Windows. Give it another try with the whole
8800    # argument.
8801    path="$complete"
8802    arguments="EOL"
8803    new_path="$path"
8804
8805  windows_path="$new_path"
8806  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8807    unix_path=`$CYGPATH -u "$windows_path"`
8808    new_path="$unix_path"
8809  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8810    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8811    new_path="$unix_path"
8812  fi
8813
8814
8815    new_path=`$WHICH "$new_path" 2> /dev/null`
8816
8817    if test "x$new_path" = x; then
8818      # It's still not found. Now this is an unrecoverable error.
8819      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8820$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8821      has_space=`$ECHO "$complete" | $GREP " "`
8822      if test "x$has_space" != x; then
8823        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8824$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8825      fi
8826      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8827    fi
8828  fi
8829
8830  # Now new_path has a complete unix path to the binary
8831  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8832    # Keep paths in /bin as-is, but remove trailing .exe if any
8833    new_path="${new_path/%.exe/}"
8834    # Do not save /bin paths to all_fixpath_prefixes!
8835  else
8836    # Not in mixed or Windows style, start by that.
8837    new_path=`cmd //c echo $new_path`
8838
8839  input_path="$new_path"
8840  # Check if we need to convert this using DOS-style short mode. If the path
8841  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8842  # take no chances and rewrite it.
8843  # Note: m4 eats our [], so we need to use [ and ] instead.
8844  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8845  if test "x$has_forbidden_chars" != x; then
8846    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8847    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8848  fi
8849
8850    # Output is in $new_path
8851
8852  windows_path="$new_path"
8853  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8854    unix_path=`$CYGPATH -u "$windows_path"`
8855    new_path="$unix_path"
8856  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8857    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8858    new_path="$unix_path"
8859  fi
8860
8861    # remove trailing .exe if any
8862    new_path="${new_path/%.exe/}"
8863
8864    # Save the first 10 bytes of this path to the storage, so fixpath can work.
8865    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8866  fi
8867
8868  else
8869    # We're on a posix platform. Hooray! :)
8870    # First separate the path from the arguments. This will split at the first
8871    # space.
8872    complete="$FOUND_MAKE"
8873    path="${complete%% *}"
8874    tmp="$complete EOL"
8875    arguments="${tmp#* }"
8876
8877    # Cannot rely on the command "which" here since it doesn't always work.
8878    is_absolute_path=`$ECHO "$path" | $GREP ^/`
8879    if test -z "$is_absolute_path"; then
8880      # Path to executable is not absolute. Find it.
8881      IFS_save="$IFS"
8882      IFS=:
8883      for p in $PATH; do
8884        if test -f "$p/$path" && test -x "$p/$path"; then
8885          new_path="$p/$path"
8886          break
8887        fi
8888      done
8889      IFS="$IFS_save"
8890    else
8891      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
8892$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
8893      new_path="$path"
8894    fi
8895
8896    if test "x$new_path" = x; then
8897        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8898$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8899        has_space=`$ECHO "$complete" | $GREP " "`
8900        if test "x$has_space" != x; then
8901          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
8902$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
8903        fi
8904        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8905      fi
8906  fi
8907
8908      # Now join together the path and the arguments once again
8909      if test "x$arguments" != xEOL; then
8910        new_complete="$new_path ${arguments% *}"
8911      else
8912        new_complete="$new_path"
8913      fi
8914
8915  if test "x$complete" != "x$new_complete"; then
8916      FOUND_MAKE="$new_complete"
8917      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
8918$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
8919    fi
8920
8921        fi
8922      fi
8923    fi
8924  fi
8925
8926
8927    if test "x$FOUND_MAKE" = x; then
8928      for ac_prog in make
8929do
8930  # Extract the first word of "$ac_prog", so it can be a program name with args.
8931set dummy $ac_prog; ac_word=$2
8932{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8933$as_echo_n "checking for $ac_word... " >&6; }
8934if ${ac_cv_path_CHECK_MAKE+:} false; then :
8935  $as_echo_n "(cached) " >&6
8936else
8937  case $CHECK_MAKE in
8938  [\\/]* | ?:[\\/]*)
8939  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
8940  ;;
8941  *)
8942  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8943for as_dir in $PATH
8944do
8945  IFS=$as_save_IFS
8946  test -z "$as_dir" && as_dir=.
8947    for ac_exec_ext in '' $ac_executable_extensions; do
8948  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8949    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
8950    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8951    break 2
8952  fi
8953done
8954  done
8955IFS=$as_save_IFS
8956
8957  ;;
8958esac
8959fi
8960CHECK_MAKE=$ac_cv_path_CHECK_MAKE
8961if test -n "$CHECK_MAKE"; then
8962  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
8963$as_echo "$CHECK_MAKE" >&6; }
8964else
8965  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8966$as_echo "no" >&6; }
8967fi
8968
8969
8970  test -n "$CHECK_MAKE" && break
8971done
8972
8973
8974  MAKE_CANDIDATE=""$CHECK_MAKE""
8975  DESCRIPTION="make in PATH"
8976  if test "x$MAKE_CANDIDATE" != x; then
8977    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8978$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8979    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8980    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8981    if test "x$IS_GNU_MAKE" = x; then
8982      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8983$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8984    else
8985      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8986      if test "x$IS_MODERN_MAKE" = x; then
8987        { $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
8988$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;}
8989      else
8990        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8991          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8992            MAKE_EXPECTED_ENV='cygwin'
8993          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8994            MAKE_EXPECTED_ENV='msys'
8995          else
8996            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8997          fi
8998          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8999          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
9000        else
9001          # Not relevant for non-Windows
9002          IS_MAKE_CORRECT_ENV=true
9003        fi
9004        if test "x$IS_MAKE_CORRECT_ENV" = x; then
9005          { $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
9006$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;}
9007        else
9008          FOUND_MAKE=$MAKE_CANDIDATE
9009
9010  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9011
9012  # First separate the path from the arguments. This will split at the first
9013  # space.
9014  complete="$FOUND_MAKE"
9015  path="${complete%% *}"
9016  tmp="$complete EOL"
9017  arguments="${tmp#* }"
9018
9019  # Input might be given as Windows format, start by converting to
9020  # unix format.
9021  new_path=`$CYGPATH -u "$path"`
9022
9023  # Now try to locate executable using which
9024  new_path=`$WHICH "$new_path" 2> /dev/null`
9025  # bat and cmd files are not always considered executable in cygwin causing which
9026  # to not find them
9027  if test "x$new_path" = x \
9028           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9029           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9030    new_path=`$CYGPATH -u "$path"`
9031  fi
9032  if test "x$new_path" = x; then
9033    # Oops. Which didn't find the executable.
9034    # The splitting of arguments from the executable at a space might have been incorrect,
9035    # since paths with space are more likely in Windows. Give it another try with the whole
9036    # argument.
9037    path="$complete"
9038    arguments="EOL"
9039    new_path=`$CYGPATH -u "$path"`
9040    new_path=`$WHICH "$new_path" 2> /dev/null`
9041    # bat and cmd files are not always considered executable in cygwin causing which
9042    # to not find them
9043    if test "x$new_path" = x \
9044             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9045             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9046      new_path=`$CYGPATH -u "$path"`
9047    fi
9048    if test "x$new_path" = x; then
9049      # It's still not found. Now this is an unrecoverable error.
9050      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9051$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9052      has_space=`$ECHO "$complete" | $GREP " "`
9053      if test "x$has_space" != x; then
9054        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9055$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9056      fi
9057      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9058    fi
9059  fi
9060
9061  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9062  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9063  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9064  # "foo.exe" is OK but "foo" is an error.
9065  #
9066  # This test is therefore slightly more accurate than "test -f" to check for file presence.
9067  # It is also a way to make sure we got the proper file name for the real test later on.
9068  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9069  if test "x$test_shortpath" = x; then
9070    # Short path failed, file does not exist as specified.
9071    # Try adding .exe or .cmd
9072    if test -f "${new_path}.exe"; then
9073       input_to_shortpath="${new_path}.exe"
9074    elif test -f "${new_path}.cmd"; then
9075       input_to_shortpath="${new_path}.cmd"
9076    else
9077      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9078$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9079      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9080$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9081      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9082    fi
9083  else
9084    input_to_shortpath="$new_path"
9085  fi
9086
9087  # Call helper function which possibly converts this using DOS-style short mode.
9088  # If so, the updated path is stored in $new_path.
9089  new_path="$input_to_shortpath"
9090
9091  input_path="$input_to_shortpath"
9092  # Check if we need to convert this using DOS-style short mode. If the path
9093  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9094  # take no chances and rewrite it.
9095  # Note: m4 eats our [], so we need to use [ and ] instead.
9096  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9097  if test "x$has_forbidden_chars" != x; then
9098    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9099    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9100    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9101    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9102      # Going to short mode and back again did indeed matter. Since short mode is
9103      # case insensitive, let's make it lowercase to improve readability.
9104      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9105      # Now convert it back to Unix-stile (cygpath)
9106      input_path=`$CYGPATH -u "$shortmode_path"`
9107      new_path="$input_path"
9108    fi
9109  fi
9110
9111  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9112  if test "x$test_cygdrive_prefix" = x; then
9113    # As a simple fix, exclude /usr/bin since it's not a real path.
9114    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9115      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9116      # a path prefixed by /cygdrive for fixpath to work.
9117      new_path="$CYGWIN_ROOT_PATH$input_path"
9118    fi
9119  fi
9120
9121  # remove trailing .exe if any
9122  new_path="${new_path/%.exe/}"
9123
9124  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9125
9126  # First separate the path from the arguments. This will split at the first
9127  # space.
9128  complete="$FOUND_MAKE"
9129  path="${complete%% *}"
9130  tmp="$complete EOL"
9131  arguments="${tmp#* }"
9132
9133  # Input might be given as Windows format, start by converting to
9134  # unix format.
9135  new_path="$path"
9136
9137  windows_path="$new_path"
9138  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9139    unix_path=`$CYGPATH -u "$windows_path"`
9140    new_path="$unix_path"
9141  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9142    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9143    new_path="$unix_path"
9144  fi
9145
9146
9147  # Now try to locate executable using which
9148  new_path=`$WHICH "$new_path" 2> /dev/null`
9149
9150  if test "x$new_path" = x; then
9151    # Oops. Which didn't find the executable.
9152    # The splitting of arguments from the executable at a space might have been incorrect,
9153    # since paths with space are more likely in Windows. Give it another try with the whole
9154    # argument.
9155    path="$complete"
9156    arguments="EOL"
9157    new_path="$path"
9158
9159  windows_path="$new_path"
9160  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9161    unix_path=`$CYGPATH -u "$windows_path"`
9162    new_path="$unix_path"
9163  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9164    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9165    new_path="$unix_path"
9166  fi
9167
9168
9169    new_path=`$WHICH "$new_path" 2> /dev/null`
9170
9171    if test "x$new_path" = x; then
9172      # It's still not found. Now this is an unrecoverable error.
9173      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9174$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9175      has_space=`$ECHO "$complete" | $GREP " "`
9176      if test "x$has_space" != x; then
9177        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9178$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9179      fi
9180      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9181    fi
9182  fi
9183
9184  # Now new_path has a complete unix path to the binary
9185  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9186    # Keep paths in /bin as-is, but remove trailing .exe if any
9187    new_path="${new_path/%.exe/}"
9188    # Do not save /bin paths to all_fixpath_prefixes!
9189  else
9190    # Not in mixed or Windows style, start by that.
9191    new_path=`cmd //c echo $new_path`
9192
9193  input_path="$new_path"
9194  # Check if we need to convert this using DOS-style short mode. If the path
9195  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9196  # take no chances and rewrite it.
9197  # Note: m4 eats our [], so we need to use [ and ] instead.
9198  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9199  if test "x$has_forbidden_chars" != x; then
9200    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9201    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9202  fi
9203
9204    # Output is in $new_path
9205
9206  windows_path="$new_path"
9207  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9208    unix_path=`$CYGPATH -u "$windows_path"`
9209    new_path="$unix_path"
9210  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9211    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9212    new_path="$unix_path"
9213  fi
9214
9215    # remove trailing .exe if any
9216    new_path="${new_path/%.exe/}"
9217
9218    # Save the first 10 bytes of this path to the storage, so fixpath can work.
9219    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9220  fi
9221
9222  else
9223    # We're on a posix platform. Hooray! :)
9224    # First separate the path from the arguments. This will split at the first
9225    # space.
9226    complete="$FOUND_MAKE"
9227    path="${complete%% *}"
9228    tmp="$complete EOL"
9229    arguments="${tmp#* }"
9230
9231    # Cannot rely on the command "which" here since it doesn't always work.
9232    is_absolute_path=`$ECHO "$path" | $GREP ^/`
9233    if test -z "$is_absolute_path"; then
9234      # Path to executable is not absolute. Find it.
9235      IFS_save="$IFS"
9236      IFS=:
9237      for p in $PATH; do
9238        if test -f "$p/$path" && test -x "$p/$path"; then
9239          new_path="$p/$path"
9240          break
9241        fi
9242      done
9243      IFS="$IFS_save"
9244    else
9245      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9246$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9247      new_path="$path"
9248    fi
9249
9250    if test "x$new_path" = x; then
9251        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9252$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9253        has_space=`$ECHO "$complete" | $GREP " "`
9254        if test "x$has_space" != x; then
9255          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9256$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9257        fi
9258        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9259      fi
9260  fi
9261
9262      # Now join together the path and the arguments once again
9263      if test "x$arguments" != xEOL; then
9264        new_complete="$new_path ${arguments% *}"
9265      else
9266        new_complete="$new_path"
9267      fi
9268
9269  if test "x$complete" != "x$new_complete"; then
9270      FOUND_MAKE="$new_complete"
9271      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9272$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9273    fi
9274
9275        fi
9276      fi
9277    fi
9278  fi
9279
9280    fi
9281
9282    if test "x$FOUND_MAKE" = x; then
9283      if test "x$TOOLS_DIR" != x; then
9284        # We have a tools-dir, check that as well before giving up.
9285        OLD_PATH=$PATH
9286        PATH=$TOOLS_DIR:$PATH
9287        for ac_prog in gmake
9288do
9289  # Extract the first word of "$ac_prog", so it can be a program name with args.
9290set dummy $ac_prog; ac_word=$2
9291{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9292$as_echo_n "checking for $ac_word... " >&6; }
9293if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
9294  $as_echo_n "(cached) " >&6
9295else
9296  case $CHECK_TOOLSDIR_GMAKE in
9297  [\\/]* | ?:[\\/]*)
9298  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
9299  ;;
9300  *)
9301  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9302for as_dir in $PATH
9303do
9304  IFS=$as_save_IFS
9305  test -z "$as_dir" && as_dir=.
9306    for ac_exec_ext in '' $ac_executable_extensions; do
9307  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9308    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
9309    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9310    break 2
9311  fi
9312done
9313  done
9314IFS=$as_save_IFS
9315
9316  ;;
9317esac
9318fi
9319CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
9320if test -n "$CHECK_TOOLSDIR_GMAKE"; then
9321  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
9322$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
9323else
9324  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9325$as_echo "no" >&6; }
9326fi
9327
9328
9329  test -n "$CHECK_TOOLSDIR_GMAKE" && break
9330done
9331
9332
9333  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
9334  DESCRIPTION="gmake in tools-dir"
9335  if test "x$MAKE_CANDIDATE" != x; then
9336    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
9337$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
9338    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
9339    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
9340    if test "x$IS_GNU_MAKE" = x; then
9341      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
9342$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
9343    else
9344      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
9345      if test "x$IS_MODERN_MAKE" = x; then
9346        { $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
9347$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;}
9348      else
9349        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9350          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9351            MAKE_EXPECTED_ENV='cygwin'
9352          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9353            MAKE_EXPECTED_ENV='msys'
9354          else
9355            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
9356          fi
9357          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
9358          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
9359        else
9360          # Not relevant for non-Windows
9361          IS_MAKE_CORRECT_ENV=true
9362        fi
9363        if test "x$IS_MAKE_CORRECT_ENV" = x; then
9364          { $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
9365$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;}
9366        else
9367          FOUND_MAKE=$MAKE_CANDIDATE
9368
9369  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9370
9371  # First separate the path from the arguments. This will split at the first
9372  # space.
9373  complete="$FOUND_MAKE"
9374  path="${complete%% *}"
9375  tmp="$complete EOL"
9376  arguments="${tmp#* }"
9377
9378  # Input might be given as Windows format, start by converting to
9379  # unix format.
9380  new_path=`$CYGPATH -u "$path"`
9381
9382  # Now try to locate executable using which
9383  new_path=`$WHICH "$new_path" 2> /dev/null`
9384  # bat and cmd files are not always considered executable in cygwin causing which
9385  # to not find them
9386  if test "x$new_path" = x \
9387           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9388           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9389    new_path=`$CYGPATH -u "$path"`
9390  fi
9391  if test "x$new_path" = x; then
9392    # Oops. Which didn't find the executable.
9393    # The splitting of arguments from the executable at a space might have been incorrect,
9394    # since paths with space are more likely in Windows. Give it another try with the whole
9395    # argument.
9396    path="$complete"
9397    arguments="EOL"
9398    new_path=`$CYGPATH -u "$path"`
9399    new_path=`$WHICH "$new_path" 2> /dev/null`
9400    # bat and cmd files are not always considered executable in cygwin causing which
9401    # to not find them
9402    if test "x$new_path" = x \
9403             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9404             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9405      new_path=`$CYGPATH -u "$path"`
9406    fi
9407    if test "x$new_path" = x; then
9408      # It's still not found. Now this is an unrecoverable error.
9409      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9410$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9411      has_space=`$ECHO "$complete" | $GREP " "`
9412      if test "x$has_space" != x; then
9413        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9414$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9415      fi
9416      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9417    fi
9418  fi
9419
9420  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9421  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9422  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9423  # "foo.exe" is OK but "foo" is an error.
9424  #
9425  # This test is therefore slightly more accurate than "test -f" to check for file presence.
9426  # It is also a way to make sure we got the proper file name for the real test later on.
9427  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9428  if test "x$test_shortpath" = x; then
9429    # Short path failed, file does not exist as specified.
9430    # Try adding .exe or .cmd
9431    if test -f "${new_path}.exe"; then
9432       input_to_shortpath="${new_path}.exe"
9433    elif test -f "${new_path}.cmd"; then
9434       input_to_shortpath="${new_path}.cmd"
9435    else
9436      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9437$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9438      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9439$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9440      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9441    fi
9442  else
9443    input_to_shortpath="$new_path"
9444  fi
9445
9446  # Call helper function which possibly converts this using DOS-style short mode.
9447  # If so, the updated path is stored in $new_path.
9448  new_path="$input_to_shortpath"
9449
9450  input_path="$input_to_shortpath"
9451  # Check if we need to convert this using DOS-style short mode. If the path
9452  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9453  # take no chances and rewrite it.
9454  # Note: m4 eats our [], so we need to use [ and ] instead.
9455  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9456  if test "x$has_forbidden_chars" != x; then
9457    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9458    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9459    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9460    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9461      # Going to short mode and back again did indeed matter. Since short mode is
9462      # case insensitive, let's make it lowercase to improve readability.
9463      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9464      # Now convert it back to Unix-stile (cygpath)
9465      input_path=`$CYGPATH -u "$shortmode_path"`
9466      new_path="$input_path"
9467    fi
9468  fi
9469
9470  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9471  if test "x$test_cygdrive_prefix" = x; then
9472    # As a simple fix, exclude /usr/bin since it's not a real path.
9473    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9474      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9475      # a path prefixed by /cygdrive for fixpath to work.
9476      new_path="$CYGWIN_ROOT_PATH$input_path"
9477    fi
9478  fi
9479
9480  # remove trailing .exe if any
9481  new_path="${new_path/%.exe/}"
9482
9483  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9484
9485  # First separate the path from the arguments. This will split at the first
9486  # space.
9487  complete="$FOUND_MAKE"
9488  path="${complete%% *}"
9489  tmp="$complete EOL"
9490  arguments="${tmp#* }"
9491
9492  # Input might be given as Windows format, start by converting to
9493  # unix format.
9494  new_path="$path"
9495
9496  windows_path="$new_path"
9497  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9498    unix_path=`$CYGPATH -u "$windows_path"`
9499    new_path="$unix_path"
9500  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9501    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9502    new_path="$unix_path"
9503  fi
9504
9505
9506  # Now try to locate executable using which
9507  new_path=`$WHICH "$new_path" 2> /dev/null`
9508
9509  if test "x$new_path" = x; then
9510    # Oops. Which didn't find the executable.
9511    # The splitting of arguments from the executable at a space might have been incorrect,
9512    # since paths with space are more likely in Windows. Give it another try with the whole
9513    # argument.
9514    path="$complete"
9515    arguments="EOL"
9516    new_path="$path"
9517
9518  windows_path="$new_path"
9519  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9520    unix_path=`$CYGPATH -u "$windows_path"`
9521    new_path="$unix_path"
9522  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9523    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9524    new_path="$unix_path"
9525  fi
9526
9527
9528    new_path=`$WHICH "$new_path" 2> /dev/null`
9529
9530    if test "x$new_path" = x; then
9531      # It's still not found. Now this is an unrecoverable error.
9532      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9533$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9534      has_space=`$ECHO "$complete" | $GREP " "`
9535      if test "x$has_space" != x; then
9536        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9537$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9538      fi
9539      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9540    fi
9541  fi
9542
9543  # Now new_path has a complete unix path to the binary
9544  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9545    # Keep paths in /bin as-is, but remove trailing .exe if any
9546    new_path="${new_path/%.exe/}"
9547    # Do not save /bin paths to all_fixpath_prefixes!
9548  else
9549    # Not in mixed or Windows style, start by that.
9550    new_path=`cmd //c echo $new_path`
9551
9552  input_path="$new_path"
9553  # Check if we need to convert this using DOS-style short mode. If the path
9554  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9555  # take no chances and rewrite it.
9556  # Note: m4 eats our [], so we need to use [ and ] instead.
9557  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9558  if test "x$has_forbidden_chars" != x; then
9559    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9560    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9561  fi
9562
9563    # Output is in $new_path
9564
9565  windows_path="$new_path"
9566  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9567    unix_path=`$CYGPATH -u "$windows_path"`
9568    new_path="$unix_path"
9569  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9570    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9571    new_path="$unix_path"
9572  fi
9573
9574    # remove trailing .exe if any
9575    new_path="${new_path/%.exe/}"
9576
9577    # Save the first 10 bytes of this path to the storage, so fixpath can work.
9578    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9579  fi
9580
9581  else
9582    # We're on a posix platform. Hooray! :)
9583    # First separate the path from the arguments. This will split at the first
9584    # space.
9585    complete="$FOUND_MAKE"
9586    path="${complete%% *}"
9587    tmp="$complete EOL"
9588    arguments="${tmp#* }"
9589
9590    # Cannot rely on the command "which" here since it doesn't always work.
9591    is_absolute_path=`$ECHO "$path" | $GREP ^/`
9592    if test -z "$is_absolute_path"; then
9593      # Path to executable is not absolute. Find it.
9594      IFS_save="$IFS"
9595      IFS=:
9596      for p in $PATH; do
9597        if test -f "$p/$path" && test -x "$p/$path"; then
9598          new_path="$p/$path"
9599          break
9600        fi
9601      done
9602      IFS="$IFS_save"
9603    else
9604      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9605$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9606      new_path="$path"
9607    fi
9608
9609    if test "x$new_path" = x; then
9610        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9611$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9612        has_space=`$ECHO "$complete" | $GREP " "`
9613        if test "x$has_space" != x; then
9614          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9615$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9616        fi
9617        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9618      fi
9619  fi
9620
9621      # Now join together the path and the arguments once again
9622      if test "x$arguments" != xEOL; then
9623        new_complete="$new_path ${arguments% *}"
9624      else
9625        new_complete="$new_path"
9626      fi
9627
9628  if test "x$complete" != "x$new_complete"; then
9629      FOUND_MAKE="$new_complete"
9630      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9631$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9632    fi
9633
9634        fi
9635      fi
9636    fi
9637  fi
9638
9639        if test "x$FOUND_MAKE" = x; then
9640          for ac_prog in make
9641do
9642  # Extract the first word of "$ac_prog", so it can be a program name with args.
9643set dummy $ac_prog; ac_word=$2
9644{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9645$as_echo_n "checking for $ac_word... " >&6; }
9646if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
9647  $as_echo_n "(cached) " >&6
9648else
9649  case $CHECK_TOOLSDIR_MAKE in
9650  [\\/]* | ?:[\\/]*)
9651  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
9652  ;;
9653  *)
9654  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9655for as_dir in $PATH
9656do
9657  IFS=$as_save_IFS
9658  test -z "$as_dir" && as_dir=.
9659    for ac_exec_ext in '' $ac_executable_extensions; do
9660  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9661    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
9662    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9663    break 2
9664  fi
9665done
9666  done
9667IFS=$as_save_IFS
9668
9669  ;;
9670esac
9671fi
9672CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
9673if test -n "$CHECK_TOOLSDIR_MAKE"; then
9674  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
9675$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
9676else
9677  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9678$as_echo "no" >&6; }
9679fi
9680
9681
9682  test -n "$CHECK_TOOLSDIR_MAKE" && break
9683done
9684
9685
9686  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
9687  DESCRIPTION="make in tools-dir"
9688  if test "x$MAKE_CANDIDATE" != x; then
9689    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
9690$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
9691    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
9692    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
9693    if test "x$IS_GNU_MAKE" = x; then
9694      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
9695$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
9696    else
9697      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
9698      if test "x$IS_MODERN_MAKE" = x; then
9699        { $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
9700$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;}
9701      else
9702        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9703          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9704            MAKE_EXPECTED_ENV='cygwin'
9705          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9706            MAKE_EXPECTED_ENV='msys'
9707          else
9708            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
9709          fi
9710          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
9711          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
9712        else
9713          # Not relevant for non-Windows
9714          IS_MAKE_CORRECT_ENV=true
9715        fi
9716        if test "x$IS_MAKE_CORRECT_ENV" = x; then
9717          { $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
9718$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;}
9719        else
9720          FOUND_MAKE=$MAKE_CANDIDATE
9721
9722  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9723
9724  # First separate the path from the arguments. This will split at the first
9725  # space.
9726  complete="$FOUND_MAKE"
9727  path="${complete%% *}"
9728  tmp="$complete EOL"
9729  arguments="${tmp#* }"
9730
9731  # Input might be given as Windows format, start by converting to
9732  # unix format.
9733  new_path=`$CYGPATH -u "$path"`
9734
9735  # Now try to locate executable using which
9736  new_path=`$WHICH "$new_path" 2> /dev/null`
9737  # bat and cmd files are not always considered executable in cygwin causing which
9738  # to not find them
9739  if test "x$new_path" = x \
9740           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9741           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9742    new_path=`$CYGPATH -u "$path"`
9743  fi
9744  if test "x$new_path" = x; then
9745    # Oops. Which didn't find the executable.
9746    # The splitting of arguments from the executable at a space might have been incorrect,
9747    # since paths with space are more likely in Windows. Give it another try with the whole
9748    # argument.
9749    path="$complete"
9750    arguments="EOL"
9751    new_path=`$CYGPATH -u "$path"`
9752    new_path=`$WHICH "$new_path" 2> /dev/null`
9753    # bat and cmd files are not always considered executable in cygwin causing which
9754    # to not find them
9755    if test "x$new_path" = x \
9756             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9757             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9758      new_path=`$CYGPATH -u "$path"`
9759    fi
9760    if test "x$new_path" = x; then
9761      # It's still not found. Now this is an unrecoverable error.
9762      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9763$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9764      has_space=`$ECHO "$complete" | $GREP " "`
9765      if test "x$has_space" != x; then
9766        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9767$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9768      fi
9769      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9770    fi
9771  fi
9772
9773  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9774  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9775  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9776  # "foo.exe" is OK but "foo" is an error.
9777  #
9778  # This test is therefore slightly more accurate than "test -f" to check for file presence.
9779  # It is also a way to make sure we got the proper file name for the real test later on.
9780  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9781  if test "x$test_shortpath" = x; then
9782    # Short path failed, file does not exist as specified.
9783    # Try adding .exe or .cmd
9784    if test -f "${new_path}.exe"; then
9785       input_to_shortpath="${new_path}.exe"
9786    elif test -f "${new_path}.cmd"; then
9787       input_to_shortpath="${new_path}.cmd"
9788    else
9789      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9790$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9791      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9792$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9793      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9794    fi
9795  else
9796    input_to_shortpath="$new_path"
9797  fi
9798
9799  # Call helper function which possibly converts this using DOS-style short mode.
9800  # If so, the updated path is stored in $new_path.
9801  new_path="$input_to_shortpath"
9802
9803  input_path="$input_to_shortpath"
9804  # Check if we need to convert this using DOS-style short mode. If the path
9805  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9806  # take no chances and rewrite it.
9807  # Note: m4 eats our [], so we need to use [ and ] instead.
9808  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9809  if test "x$has_forbidden_chars" != x; then
9810    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9811    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9812    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9813    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9814      # Going to short mode and back again did indeed matter. Since short mode is
9815      # case insensitive, let's make it lowercase to improve readability.
9816      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9817      # Now convert it back to Unix-stile (cygpath)
9818      input_path=`$CYGPATH -u "$shortmode_path"`
9819      new_path="$input_path"
9820    fi
9821  fi
9822
9823  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9824  if test "x$test_cygdrive_prefix" = x; then
9825    # As a simple fix, exclude /usr/bin since it's not a real path.
9826    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9827      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9828      # a path prefixed by /cygdrive for fixpath to work.
9829      new_path="$CYGWIN_ROOT_PATH$input_path"
9830    fi
9831  fi
9832
9833  # remove trailing .exe if any
9834  new_path="${new_path/%.exe/}"
9835
9836  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9837
9838  # First separate the path from the arguments. This will split at the first
9839  # space.
9840  complete="$FOUND_MAKE"
9841  path="${complete%% *}"
9842  tmp="$complete EOL"
9843  arguments="${tmp#* }"
9844
9845  # Input might be given as Windows format, start by converting to
9846  # unix format.
9847  new_path="$path"
9848
9849  windows_path="$new_path"
9850  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9851    unix_path=`$CYGPATH -u "$windows_path"`
9852    new_path="$unix_path"
9853  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9854    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9855    new_path="$unix_path"
9856  fi
9857
9858
9859  # Now try to locate executable using which
9860  new_path=`$WHICH "$new_path" 2> /dev/null`
9861
9862  if test "x$new_path" = x; then
9863    # Oops. Which didn't find the executable.
9864    # The splitting of arguments from the executable at a space might have been incorrect,
9865    # since paths with space are more likely in Windows. Give it another try with the whole
9866    # argument.
9867    path="$complete"
9868    arguments="EOL"
9869    new_path="$path"
9870
9871  windows_path="$new_path"
9872  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9873    unix_path=`$CYGPATH -u "$windows_path"`
9874    new_path="$unix_path"
9875  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9876    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9877    new_path="$unix_path"
9878  fi
9879
9880
9881    new_path=`$WHICH "$new_path" 2> /dev/null`
9882
9883    if test "x$new_path" = x; then
9884      # It's still not found. Now this is an unrecoverable error.
9885      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9886$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9887      has_space=`$ECHO "$complete" | $GREP " "`
9888      if test "x$has_space" != x; then
9889        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9890$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9891      fi
9892      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9893    fi
9894  fi
9895
9896  # Now new_path has a complete unix path to the binary
9897  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9898    # Keep paths in /bin as-is, but remove trailing .exe if any
9899    new_path="${new_path/%.exe/}"
9900    # Do not save /bin paths to all_fixpath_prefixes!
9901  else
9902    # Not in mixed or Windows style, start by that.
9903    new_path=`cmd //c echo $new_path`
9904
9905  input_path="$new_path"
9906  # Check if we need to convert this using DOS-style short mode. If the path
9907  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9908  # take no chances and rewrite it.
9909  # Note: m4 eats our [], so we need to use [ and ] instead.
9910  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9911  if test "x$has_forbidden_chars" != x; then
9912    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9913    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9914  fi
9915
9916    # Output is in $new_path
9917
9918  windows_path="$new_path"
9919  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9920    unix_path=`$CYGPATH -u "$windows_path"`
9921    new_path="$unix_path"
9922  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9923    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9924    new_path="$unix_path"
9925  fi
9926
9927    # remove trailing .exe if any
9928    new_path="${new_path/%.exe/}"
9929
9930    # Save the first 10 bytes of this path to the storage, so fixpath can work.
9931    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9932  fi
9933
9934  else
9935    # We're on a posix platform. Hooray! :)
9936    # First separate the path from the arguments. This will split at the first
9937    # space.
9938    complete="$FOUND_MAKE"
9939    path="${complete%% *}"
9940    tmp="$complete EOL"
9941    arguments="${tmp#* }"
9942
9943    # Cannot rely on the command "which" here since it doesn't always work.
9944    is_absolute_path=`$ECHO "$path" | $GREP ^/`
9945    if test -z "$is_absolute_path"; then
9946      # Path to executable is not absolute. Find it.
9947      IFS_save="$IFS"
9948      IFS=:
9949      for p in $PATH; do
9950        if test -f "$p/$path" && test -x "$p/$path"; then
9951          new_path="$p/$path"
9952          break
9953        fi
9954      done
9955      IFS="$IFS_save"
9956    else
9957      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9958$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9959      new_path="$path"
9960    fi
9961
9962    if test "x$new_path" = x; then
9963        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9964$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9965        has_space=`$ECHO "$complete" | $GREP " "`
9966        if test "x$has_space" != x; then
9967          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9968$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9969        fi
9970        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9971      fi
9972  fi
9973
9974      # Now join together the path and the arguments once again
9975      if test "x$arguments" != xEOL; then
9976        new_complete="$new_path ${arguments% *}"
9977      else
9978        new_complete="$new_path"
9979      fi
9980
9981  if test "x$complete" != "x$new_complete"; then
9982      FOUND_MAKE="$new_complete"
9983      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9984$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9985    fi
9986
9987        fi
9988      fi
9989    fi
9990  fi
9991
9992        fi
9993        PATH=$OLD_PATH
9994      fi
9995    fi
9996
9997    if test "x$FOUND_MAKE" = x; then
9998      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
9999    fi
10000  fi
10001
10002  MAKE=$FOUND_MAKE
10003
10004  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
10005$as_echo "$as_me: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
10006
10007
10008
10009    # Test if find supports -delete
10010    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
10011$as_echo_n "checking if find supports -delete... " >&6; }
10012    FIND_DELETE="-delete"
10013
10014    DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
10015
10016    echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
10017
10018    TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
10019    if test -f $DELETEDIR/TestIfFindSupportsDelete; then
10020        # No, it does not.
10021        rm $DELETEDIR/TestIfFindSupportsDelete
10022        FIND_DELETE="-exec rm \{\} \+"
10023        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10024$as_echo "no" >&6; }
10025    else
10026        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10027$as_echo "yes" >&6; }
10028    fi
10029    rmdir $DELETEDIR
10030
10031
10032
10033# These tools might not be installed by default,
10034# need hint on how to install them.
10035
10036    for ac_prog in unzip
10037do
10038  # Extract the first word of "$ac_prog", so it can be a program name with args.
10039set dummy $ac_prog; ac_word=$2
10040{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10041$as_echo_n "checking for $ac_word... " >&6; }
10042if ${ac_cv_path_UNZIP+:} false; then :
10043  $as_echo_n "(cached) " >&6
10044else
10045  case $UNZIP in
10046  [\\/]* | ?:[\\/]*)
10047  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
10048  ;;
10049  *)
10050  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10051for as_dir in $PATH
10052do
10053  IFS=$as_save_IFS
10054  test -z "$as_dir" && as_dir=.
10055    for ac_exec_ext in '' $ac_executable_extensions; do
10056  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10057    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
10058    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10059    break 2
10060  fi
10061done
10062  done
10063IFS=$as_save_IFS
10064
10065  ;;
10066esac
10067fi
10068UNZIP=$ac_cv_path_UNZIP
10069if test -n "$UNZIP"; then
10070  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
10071$as_echo "$UNZIP" >&6; }
10072else
10073  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10074$as_echo "no" >&6; }
10075fi
10076
10077
10078  test -n "$UNZIP" && break
10079done
10080
10081
10082    if test "x$UNZIP" = x; then
10083        if test "xunzip" = x; then
10084          PROG_NAME=unzip
10085        else
10086          PROG_NAME=unzip
10087        fi
10088        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10089$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10090        as_fn_error $? "Cannot continue" "$LINENO" 5
10091    fi
10092
10093
10094
10095    for ac_prog in zip
10096do
10097  # Extract the first word of "$ac_prog", so it can be a program name with args.
10098set dummy $ac_prog; ac_word=$2
10099{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10100$as_echo_n "checking for $ac_word... " >&6; }
10101if ${ac_cv_path_ZIP+:} false; then :
10102  $as_echo_n "(cached) " >&6
10103else
10104  case $ZIP in
10105  [\\/]* | ?:[\\/]*)
10106  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
10107  ;;
10108  *)
10109  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10110for as_dir in $PATH
10111do
10112  IFS=$as_save_IFS
10113  test -z "$as_dir" && as_dir=.
10114    for ac_exec_ext in '' $ac_executable_extensions; do
10115  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10116    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
10117    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10118    break 2
10119  fi
10120done
10121  done
10122IFS=$as_save_IFS
10123
10124  ;;
10125esac
10126fi
10127ZIP=$ac_cv_path_ZIP
10128if test -n "$ZIP"; then
10129  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
10130$as_echo "$ZIP" >&6; }
10131else
10132  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10133$as_echo "no" >&6; }
10134fi
10135
10136
10137  test -n "$ZIP" && break
10138done
10139
10140
10141    if test "x$ZIP" = x; then
10142        if test "xzip" = x; then
10143          PROG_NAME=zip
10144        else
10145          PROG_NAME=zip
10146        fi
10147        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10148$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10149        as_fn_error $? "Cannot continue" "$LINENO" 5
10150    fi
10151
10152
10153
10154# Non-required basic tools
10155
10156# Extract the first word of "ldd", so it can be a program name with args.
10157set dummy ldd; ac_word=$2
10158{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10159$as_echo_n "checking for $ac_word... " >&6; }
10160if ${ac_cv_path_LDD+:} false; then :
10161  $as_echo_n "(cached) " >&6
10162else
10163  case $LDD in
10164  [\\/]* | ?:[\\/]*)
10165  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
10166  ;;
10167  *)
10168  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10169for as_dir in $PATH
10170do
10171  IFS=$as_save_IFS
10172  test -z "$as_dir" && as_dir=.
10173    for ac_exec_ext in '' $ac_executable_extensions; do
10174  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10175    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
10176    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10177    break 2
10178  fi
10179done
10180  done
10181IFS=$as_save_IFS
10182
10183  ;;
10184esac
10185fi
10186LDD=$ac_cv_path_LDD
10187if test -n "$LDD"; then
10188  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
10189$as_echo "$LDD" >&6; }
10190else
10191  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10192$as_echo "no" >&6; }
10193fi
10194
10195
10196if test "x$LDD" = "x"; then
10197    # List shared lib dependencies is used for
10198    # debug output and checking for forbidden dependencies.
10199    # We can build without it.
10200    LDD="true"
10201fi
10202# Extract the first word of "otool", so it can be a program name with args.
10203set dummy otool; ac_word=$2
10204{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10205$as_echo_n "checking for $ac_word... " >&6; }
10206if ${ac_cv_path_OTOOL+:} false; then :
10207  $as_echo_n "(cached) " >&6
10208else
10209  case $OTOOL in
10210  [\\/]* | ?:[\\/]*)
10211  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
10212  ;;
10213  *)
10214  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10215for as_dir in $PATH
10216do
10217  IFS=$as_save_IFS
10218  test -z "$as_dir" && as_dir=.
10219    for ac_exec_ext in '' $ac_executable_extensions; do
10220  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10221    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
10222    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10223    break 2
10224  fi
10225done
10226  done
10227IFS=$as_save_IFS
10228
10229  ;;
10230esac
10231fi
10232OTOOL=$ac_cv_path_OTOOL
10233if test -n "$OTOOL"; then
10234  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
10235$as_echo "$OTOOL" >&6; }
10236else
10237  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10238$as_echo "no" >&6; }
10239fi
10240
10241
10242if test "x$OTOOL" = "x"; then
10243   OTOOL="true"
10244fi
10245for ac_prog in readelf greadelf
10246do
10247  # Extract the first word of "$ac_prog", so it can be a program name with args.
10248set dummy $ac_prog; ac_word=$2
10249{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10250$as_echo_n "checking for $ac_word... " >&6; }
10251if ${ac_cv_path_READELF+:} false; then :
10252  $as_echo_n "(cached) " >&6
10253else
10254  case $READELF in
10255  [\\/]* | ?:[\\/]*)
10256  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
10257  ;;
10258  *)
10259  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10260for as_dir in $PATH
10261do
10262  IFS=$as_save_IFS
10263  test -z "$as_dir" && as_dir=.
10264    for ac_exec_ext in '' $ac_executable_extensions; do
10265  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10266    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
10267    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10268    break 2
10269  fi
10270done
10271  done
10272IFS=$as_save_IFS
10273
10274  ;;
10275esac
10276fi
10277READELF=$ac_cv_path_READELF
10278if test -n "$READELF"; then
10279  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
10280$as_echo "$READELF" >&6; }
10281else
10282  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10283$as_echo "no" >&6; }
10284fi
10285
10286
10287  test -n "$READELF" && break
10288done
10289
10290# Extract the first word of "hg", so it can be a program name with args.
10291set dummy hg; ac_word=$2
10292{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10293$as_echo_n "checking for $ac_word... " >&6; }
10294if ${ac_cv_path_HG+:} false; then :
10295  $as_echo_n "(cached) " >&6
10296else
10297  case $HG in
10298  [\\/]* | ?:[\\/]*)
10299  ac_cv_path_HG="$HG" # Let the user override the test with a path.
10300  ;;
10301  *)
10302  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10303for as_dir in $PATH
10304do
10305  IFS=$as_save_IFS
10306  test -z "$as_dir" && as_dir=.
10307    for ac_exec_ext in '' $ac_executable_extensions; do
10308  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10309    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
10310    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10311    break 2
10312  fi
10313done
10314  done
10315IFS=$as_save_IFS
10316
10317  ;;
10318esac
10319fi
10320HG=$ac_cv_path_HG
10321if test -n "$HG"; then
10322  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
10323$as_echo "$HG" >&6; }
10324else
10325  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10326$as_echo "no" >&6; }
10327fi
10328
10329
10330# Extract the first word of "stat", so it can be a program name with args.
10331set dummy stat; ac_word=$2
10332{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10333$as_echo_n "checking for $ac_word... " >&6; }
10334if ${ac_cv_path_STAT+:} false; then :
10335  $as_echo_n "(cached) " >&6
10336else
10337  case $STAT in
10338  [\\/]* | ?:[\\/]*)
10339  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
10340  ;;
10341  *)
10342  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10343for as_dir in $PATH
10344do
10345  IFS=$as_save_IFS
10346  test -z "$as_dir" && as_dir=.
10347    for ac_exec_ext in '' $ac_executable_extensions; do
10348  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10349    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
10350    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10351    break 2
10352  fi
10353done
10354  done
10355IFS=$as_save_IFS
10356
10357  ;;
10358esac
10359fi
10360STAT=$ac_cv_path_STAT
10361if test -n "$STAT"; then
10362  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
10363$as_echo "$STAT" >&6; }
10364else
10365  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10366$as_echo "no" >&6; }
10367fi
10368
10369
10370# Extract the first word of "time", so it can be a program name with args.
10371set dummy time; ac_word=$2
10372{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10373$as_echo_n "checking for $ac_word... " >&6; }
10374if ${ac_cv_path_TIME+:} false; then :
10375  $as_echo_n "(cached) " >&6
10376else
10377  case $TIME in
10378  [\\/]* | ?:[\\/]*)
10379  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
10380  ;;
10381  *)
10382  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10383for as_dir in $PATH
10384do
10385  IFS=$as_save_IFS
10386  test -z "$as_dir" && as_dir=.
10387    for ac_exec_ext in '' $ac_executable_extensions; do
10388  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10389    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
10390    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10391    break 2
10392  fi
10393done
10394  done
10395IFS=$as_save_IFS
10396
10397  ;;
10398esac
10399fi
10400TIME=$ac_cv_path_TIME
10401if test -n "$TIME"; then
10402  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
10403$as_echo "$TIME" >&6; }
10404else
10405  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10406$as_echo "no" >&6; }
10407fi
10408
10409
10410# Check if it's GNU time
10411IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
10412if test "x$IS_GNU_TIME" != x; then
10413  IS_GNU_TIME=yes
10414else
10415  IS_GNU_TIME=no
10416fi
10417
10418
10419if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
10420
10421    for ac_prog in comm
10422do
10423  # Extract the first word of "$ac_prog", so it can be a program name with args.
10424set dummy $ac_prog; ac_word=$2
10425{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10426$as_echo_n "checking for $ac_word... " >&6; }
10427if ${ac_cv_path_COMM+:} false; then :
10428  $as_echo_n "(cached) " >&6
10429else
10430  case $COMM in
10431  [\\/]* | ?:[\\/]*)
10432  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
10433  ;;
10434  *)
10435  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10436for as_dir in $PATH
10437do
10438  IFS=$as_save_IFS
10439  test -z "$as_dir" && as_dir=.
10440    for ac_exec_ext in '' $ac_executable_extensions; do
10441  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10442    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
10443    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10444    break 2
10445  fi
10446done
10447  done
10448IFS=$as_save_IFS
10449
10450  ;;
10451esac
10452fi
10453COMM=$ac_cv_path_COMM
10454if test -n "$COMM"; then
10455  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
10456$as_echo "$COMM" >&6; }
10457else
10458  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10459$as_echo "no" >&6; }
10460fi
10461
10462
10463  test -n "$COMM" && break
10464done
10465
10466
10467    if test "x$COMM" = x; then
10468        if test "xcomm" = x; then
10469          PROG_NAME=comm
10470        else
10471          PROG_NAME=comm
10472        fi
10473        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10474$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10475        as_fn_error $? "Cannot continue" "$LINENO" 5
10476    fi
10477
10478
10479fi
10480
10481if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
10482
10483    for ac_prog in xattr
10484do
10485  # Extract the first word of "$ac_prog", so it can be a program name with args.
10486set dummy $ac_prog; ac_word=$2
10487{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10488$as_echo_n "checking for $ac_word... " >&6; }
10489if ${ac_cv_path_XATTR+:} false; then :
10490  $as_echo_n "(cached) " >&6
10491else
10492  case $XATTR in
10493  [\\/]* | ?:[\\/]*)
10494  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
10495  ;;
10496  *)
10497  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10498for as_dir in $PATH
10499do
10500  IFS=$as_save_IFS
10501  test -z "$as_dir" && as_dir=.
10502    for ac_exec_ext in '' $ac_executable_extensions; do
10503  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10504    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
10505    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10506    break 2
10507  fi
10508done
10509  done
10510IFS=$as_save_IFS
10511
10512  ;;
10513esac
10514fi
10515XATTR=$ac_cv_path_XATTR
10516if test -n "$XATTR"; then
10517  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
10518$as_echo "$XATTR" >&6; }
10519else
10520  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10521$as_echo "no" >&6; }
10522fi
10523
10524
10525  test -n "$XATTR" && break
10526done
10527
10528
10529    if test "x$XATTR" = x; then
10530        if test "xxattr" = x; then
10531          PROG_NAME=xattr
10532        else
10533          PROG_NAME=xattr
10534        fi
10535        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10536$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10537        as_fn_error $? "Cannot continue" "$LINENO" 5
10538    fi
10539
10540
10541  # Extract the first word of "codesign", so it can be a program name with args.
10542set dummy codesign; ac_word=$2
10543{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10544$as_echo_n "checking for $ac_word... " >&6; }
10545if ${ac_cv_path_CODESIGN+:} false; then :
10546  $as_echo_n "(cached) " >&6
10547else
10548  case $CODESIGN in
10549  [\\/]* | ?:[\\/]*)
10550  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
10551  ;;
10552  *)
10553  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10554for as_dir in $PATH
10555do
10556  IFS=$as_save_IFS
10557  test -z "$as_dir" && as_dir=.
10558    for ac_exec_ext in '' $ac_executable_extensions; do
10559  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10560    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
10561    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10562    break 2
10563  fi
10564done
10565  done
10566IFS=$as_save_IFS
10567
10568  ;;
10569esac
10570fi
10571CODESIGN=$ac_cv_path_CODESIGN
10572if test -n "$CODESIGN"; then
10573  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
10574$as_echo "$CODESIGN" >&6; }
10575else
10576  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10577$as_echo "no" >&6; }
10578fi
10579
10580
10581  if test "x$CODESIGN" != "x"; then
10582    # Verify that the openjdk_codesign certificate is present
10583    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
10584$as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
10585    rm -f codesign-testfile
10586    touch codesign-testfile
10587    codesign -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
10588    rm -f codesign-testfile
10589    if test "x$CODESIGN" = x; then
10590      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10591$as_echo "no" >&6; }
10592    else
10593      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10594$as_echo "yes" >&6; }
10595    fi
10596  fi
10597fi
10598
10599
10600# Check if pkg-config is available.
10601
10602
10603if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
10604	if test -n "$ac_tool_prefix"; then
10605  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
10606set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
10607{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10608$as_echo_n "checking for $ac_word... " >&6; }
10609if ${ac_cv_path_PKG_CONFIG+:} false; then :
10610  $as_echo_n "(cached) " >&6
10611else
10612  case $PKG_CONFIG in
10613  [\\/]* | ?:[\\/]*)
10614  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10615  ;;
10616  *)
10617  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10618for as_dir in $PATH
10619do
10620  IFS=$as_save_IFS
10621  test -z "$as_dir" && as_dir=.
10622    for ac_exec_ext in '' $ac_executable_extensions; do
10623  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10624    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10625    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10626    break 2
10627  fi
10628done
10629  done
10630IFS=$as_save_IFS
10631
10632  ;;
10633esac
10634fi
10635PKG_CONFIG=$ac_cv_path_PKG_CONFIG
10636if test -n "$PKG_CONFIG"; then
10637  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
10638$as_echo "$PKG_CONFIG" >&6; }
10639else
10640  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10641$as_echo "no" >&6; }
10642fi
10643
10644
10645fi
10646if test -z "$ac_cv_path_PKG_CONFIG"; then
10647  ac_pt_PKG_CONFIG=$PKG_CONFIG
10648  # Extract the first word of "pkg-config", so it can be a program name with args.
10649set dummy pkg-config; ac_word=$2
10650{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10651$as_echo_n "checking for $ac_word... " >&6; }
10652if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
10653  $as_echo_n "(cached) " >&6
10654else
10655  case $ac_pt_PKG_CONFIG in
10656  [\\/]* | ?:[\\/]*)
10657  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
10658  ;;
10659  *)
10660  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10661for as_dir in $PATH
10662do
10663  IFS=$as_save_IFS
10664  test -z "$as_dir" && as_dir=.
10665    for ac_exec_ext in '' $ac_executable_extensions; do
10666  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10667    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10668    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10669    break 2
10670  fi
10671done
10672  done
10673IFS=$as_save_IFS
10674
10675  ;;
10676esac
10677fi
10678ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
10679if test -n "$ac_pt_PKG_CONFIG"; then
10680  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
10681$as_echo "$ac_pt_PKG_CONFIG" >&6; }
10682else
10683  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10684$as_echo "no" >&6; }
10685fi
10686
10687  if test "x$ac_pt_PKG_CONFIG" = x; then
10688    PKG_CONFIG=""
10689  else
10690    case $cross_compiling:$ac_tool_warned in
10691yes:)
10692{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10693$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10694ac_tool_warned=yes ;;
10695esac
10696    PKG_CONFIG=$ac_pt_PKG_CONFIG
10697  fi
10698else
10699  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
10700fi
10701
10702fi
10703if test -n "$PKG_CONFIG"; then
10704	_pkg_min_version=0.9.0
10705	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
10706$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
10707	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
10708		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10709$as_echo "yes" >&6; }
10710	else
10711		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10712$as_echo "no" >&6; }
10713		PKG_CONFIG=""
10714	fi
10715
10716fi
10717
10718# After basic tools have been setup, we can check build os specific details.
10719
10720###############################################################################
10721
10722# Note that this is the build platform OS version!
10723
10724OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
10725OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
10726OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
10727OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
10728
10729
10730
10731
10732
10733# Setup builddeps, for automatic downloading of tools we need.
10734# This is needed before we can call BDEPS_CHECK_MODULE, which is done in
10735# boot-jdk setup, but we need to have basic tools setup first.
10736
10737
10738# Check whether --with-builddeps-conf was given.
10739if test "${with_builddeps_conf+set}" = set; then :
10740  withval=$with_builddeps_conf;
10741fi
10742
10743
10744
10745# Check whether --with-builddeps-server was given.
10746if test "${with_builddeps_server+set}" = set; then :
10747  withval=$with_builddeps_server;
10748fi
10749
10750
10751
10752# Check whether --with-builddeps-dir was given.
10753if test "${with_builddeps_dir+set}" = set; then :
10754  withval=$with_builddeps_dir;
10755else
10756  with_builddeps_dir=/localhome/builddeps
10757fi
10758
10759
10760
10761# Check whether --with-builddeps-group was given.
10762if test "${with_builddeps_group+set}" = set; then :
10763  withval=$with_builddeps_group;
10764fi
10765
10766
10767
10768
10769    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
10770        if test "x$with_builddeps_conf" != x; then
10771            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for supplied builddeps configuration file" >&5
10772$as_echo_n "checking for supplied builddeps configuration file... " >&6; }
10773            builddepsfile=$with_builddeps_conf
10774            if test -s $builddepsfile; then
10775                . $builddepsfile
10776                { $as_echo "$as_me:${as_lineno-$LINENO}: result: loaded!" >&5
10777$as_echo "loaded!" >&6; }
10778            else
10779               as_fn_error $? "The given builddeps conf file $with_builddeps_conf could not be loaded!" "$LINENO" 5
10780           fi
10781        else
10782            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builddeps.conf files in sources..." >&5
10783$as_echo_n "checking for builddeps.conf files in sources...... " >&6; }
10784            builddepsfile=`mktemp`
10785            touch $builddepsfile
10786            # Put all found confs into a single file.
10787            find ${SRC_ROOT} -name builddeps.conf -exec cat \{\} \; >> $builddepsfile
10788            # Source the file to acquire the variables
10789            if test -s $builddepsfile; then
10790                . $builddepsfile
10791                { $as_echo "$as_me:${as_lineno-$LINENO}: result: found at least one!" >&5
10792$as_echo "found at least one!" >&6; }
10793            else
10794               as_fn_error $? "Could not find any builddeps.conf at all!" "$LINENO" 5
10795           fi
10796        fi
10797        # Create build and target names that use _ instead of "-" and ".".
10798        # This is necessary to use them in variable names.
10799        build_var=`echo ${OPENJDK_BUILD_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
10800        target_var=`echo ${OPENJDK_TARGET_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
10801        # Extract rewrite information for build and target
10802        eval rewritten_build=\${REWRITE_${build_var}}
10803        if test "x$rewritten_build" = x; then
10804            rewritten_build=${OPENJDK_BUILD_AUTOCONF_NAME}
10805            echo Build stays the same $rewritten_build
10806        else
10807            echo Rewriting build for builddeps into $rewritten_build
10808        fi
10809        eval rewritten_target=\${REWRITE_${target_var}}
10810        if test "x$rewritten_target" = x; then
10811            rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME}
10812            echo Target stays the same $rewritten_target
10813        else
10814            echo Rewriting target for builddeps into $rewritten_target
10815        fi
10816        rewritten_build_var=`echo ${rewritten_build} | tr '-' '_' | tr '.' '_'`
10817        rewritten_target_var=`echo ${rewritten_target} | tr '-' '_' | tr '.' '_'`
10818    fi
10819    for ac_prog in 7z unzip
10820do
10821  # Extract the first word of "$ac_prog", so it can be a program name with args.
10822set dummy $ac_prog; ac_word=$2
10823{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10824$as_echo_n "checking for $ac_word... " >&6; }
10825if ${ac_cv_prog_BDEPS_UNZIP+:} false; then :
10826  $as_echo_n "(cached) " >&6
10827else
10828  if test -n "$BDEPS_UNZIP"; then
10829  ac_cv_prog_BDEPS_UNZIP="$BDEPS_UNZIP" # Let the user override the test.
10830else
10831as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10832for as_dir in $PATH
10833do
10834  IFS=$as_save_IFS
10835  test -z "$as_dir" && as_dir=.
10836    for ac_exec_ext in '' $ac_executable_extensions; do
10837  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10838    ac_cv_prog_BDEPS_UNZIP="$ac_prog"
10839    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10840    break 2
10841  fi
10842done
10843  done
10844IFS=$as_save_IFS
10845
10846fi
10847fi
10848BDEPS_UNZIP=$ac_cv_prog_BDEPS_UNZIP
10849if test -n "$BDEPS_UNZIP"; then
10850  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_UNZIP" >&5
10851$as_echo "$BDEPS_UNZIP" >&6; }
10852else
10853  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10854$as_echo "no" >&6; }
10855fi
10856
10857
10858  test -n "$BDEPS_UNZIP" && break
10859done
10860
10861    if test "x$BDEPS_UNZIP" = x7z; then
10862        BDEPS_UNZIP="7z x"
10863    fi
10864
10865    for ac_prog in wget lftp ftp
10866do
10867  # Extract the first word of "$ac_prog", so it can be a program name with args.
10868set dummy $ac_prog; ac_word=$2
10869{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10870$as_echo_n "checking for $ac_word... " >&6; }
10871if ${ac_cv_prog_BDEPS_FTP+:} false; then :
10872  $as_echo_n "(cached) " >&6
10873else
10874  if test -n "$BDEPS_FTP"; then
10875  ac_cv_prog_BDEPS_FTP="$BDEPS_FTP" # Let the user override the test.
10876else
10877as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10878for as_dir in $PATH
10879do
10880  IFS=$as_save_IFS
10881  test -z "$as_dir" && as_dir=.
10882    for ac_exec_ext in '' $ac_executable_extensions; do
10883  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10884    ac_cv_prog_BDEPS_FTP="$ac_prog"
10885    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10886    break 2
10887  fi
10888done
10889  done
10890IFS=$as_save_IFS
10891
10892fi
10893fi
10894BDEPS_FTP=$ac_cv_prog_BDEPS_FTP
10895if test -n "$BDEPS_FTP"; then
10896  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_FTP" >&5
10897$as_echo "$BDEPS_FTP" >&6; }
10898else
10899  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10900$as_echo "no" >&6; }
10901fi
10902
10903
10904  test -n "$BDEPS_FTP" && break
10905done
10906
10907
10908
10909###############################################################################
10910#
10911# Determine OpenJDK variants, options and version numbers.
10912#
10913###############################################################################
10914
10915# We need build & target for this.
10916
10917
10918###############################################################################
10919#
10920# Should we build a JDK/JVM with headful support (ie a graphical ui)?
10921# We always build headless support.
10922#
10923{ $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
10924$as_echo_n "checking headful support... " >&6; }
10925# Check whether --enable-headful was given.
10926if test "${enable_headful+set}" = set; then :
10927  enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
10928else
10929  SUPPORT_HEADFUL=yes
10930fi
10931
10932
10933SUPPORT_HEADLESS=yes
10934BUILD_HEADLESS="BUILD_HEADLESS:=true"
10935
10936if test "x$SUPPORT_HEADFUL" = xyes; then
10937    # We are building both headful and headless.
10938    headful_msg="include support for both headful and headless"
10939fi
10940
10941if test "x$SUPPORT_HEADFUL" = xno; then
10942    # Thus we are building headless only.
10943    BUILD_HEADLESS="BUILD_HEADLESS:=true"
10944    headful_msg="headless only"
10945fi
10946
10947{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
10948$as_echo "$headful_msg" >&6; }
10949
10950
10951
10952
10953
10954# Control wether Hotspot runs Queens test after build.
10955# Check whether --enable-hotspot-test-in-build was given.
10956if test "${enable_hotspot_test_in_build+set}" = set; then :
10957  enableval=$enable_hotspot_test_in_build;
10958else
10959  enable_hotspot_test_in_build=no
10960fi
10961
10962if test "x$enable_hotspot_test_in_build" = "xyes"; then
10963    TEST_IN_BUILD=true
10964else
10965    TEST_IN_BUILD=false
10966fi
10967
10968
10969###############################################################################
10970#
10971# Choose cacerts source file
10972#
10973
10974# Check whether --with-cacerts-file was given.
10975if test "${with_cacerts_file+set}" = set; then :
10976  withval=$with_cacerts_file;
10977fi
10978
10979if test "x$with_cacerts_file" != x; then
10980    CACERTS_FILE=$with_cacerts_file
10981else
10982    CACERTS_FILE=${SRC_ROOT}/jdk/src/share/lib/security/cacerts
10983fi
10984
10985
10986###############################################################################
10987#
10988# Enable or disable unlimited crypto
10989#
10990# Check whether --enable-unlimited-crypto was given.
10991if test "${enable_unlimited_crypto+set}" = set; then :
10992  enableval=$enable_unlimited_crypto;
10993else
10994  enable_unlimited_crypto=no
10995fi
10996
10997if test "x$enable_unlimited_crypto" = "xyes"; then
10998    UNLIMITED_CRYPTO=true
10999else
11000    UNLIMITED_CRYPTO=false
11001fi
11002
11003
11004###############################################################################
11005#
11006# Enable or disable the elliptic curve crypto implementation
11007#
11008
11009
11010###############################################################################
11011#
11012# Compress jars
11013#
11014COMPRESS_JARS=false
11015
11016
11017
11018
11019# Source the version numbers
11020. $AUTOCONF_DIR/version-numbers
11021
11022# Get the settings from parameters
11023
11024# Check whether --with-milestone was given.
11025if test "${with_milestone+set}" = set; then :
11026  withval=$with_milestone;
11027fi
11028
11029if test "x$with_milestone" = xyes; then
11030  as_fn_error $? "Milestone must have a value" "$LINENO" 5
11031elif test "x$with_milestone" != x; then
11032    MILESTONE="$with_milestone"
11033fi
11034if test "x$MILESTONE" = x; then
11035  MILESTONE=internal
11036fi
11037
11038
11039# Check whether --with-update-version was given.
11040if test "${with_update_version+set}" = set; then :
11041  withval=$with_update_version;
11042fi
11043
11044if test "x$with_update_version" = xyes; then
11045  as_fn_error $? "Update version must have a value" "$LINENO" 5
11046elif test "x$with_update_version" != x; then
11047  JDK_UPDATE_VERSION="$with_update_version"
11048fi
11049
11050
11051# Check whether --with-user-release-suffix was given.
11052if test "${with_user_release_suffix+set}" = set; then :
11053  withval=$with_user_release_suffix;
11054fi
11055
11056if test "x$with_user_release_suffix" = xyes; then
11057  as_fn_error $? "Release suffix must have a value" "$LINENO" 5
11058elif test "x$with_user_release_suffix" != x; then
11059  USER_RELEASE_SUFFIX="$with_user_release_suffix"
11060fi
11061
11062
11063# Check whether --with-build-number was given.
11064if test "${with_build_number+set}" = set; then :
11065  withval=$with_build_number;
11066fi
11067
11068if test "x$with_build_number" = xyes; then
11069  as_fn_error $? "Build number must have a value" "$LINENO" 5
11070elif test "x$with_build_number" != x; then
11071  JDK_BUILD_NUMBER="$with_build_number"
11072fi
11073# Define default USER_RELEASE_SUFFIX if BUILD_NUMBER and USER_RELEASE_SUFFIX are not set
11074if test "x$JDK_BUILD_NUMBER" = x; then
11075  JDK_BUILD_NUMBER=b00
11076  if test "x$USER_RELEASE_SUFFIX" = x; then
11077    BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
11078    # Avoid [:alnum:] since it depends on the locale.
11079    CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvqxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'`
11080    USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11081  fi
11082fi
11083
11084# Now set the JDK version, milestone, build number etc.
11085
11086
11087
11088
11089
11090
11091
11092
11093
11094
11095
11096
11097
11098
11099
11100COPYRIGHT_YEAR=`date +'%Y'`
11101
11102
11103if test "x$JDK_UPDATE_VERSION" != x; then
11104  JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
11105else
11106  JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
11107fi
11108
11109
11110COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
11111
11112
11113
11114###############################################################################
11115#
11116# Setup BootJDK, used to bootstrap the build.
11117#
11118###############################################################################
11119
11120
11121BOOT_JDK_FOUND=no
11122
11123# Check whether --with-boot-jdk was given.
11124if test "${with_boot_jdk+set}" = set; then :
11125  withval=$with_boot_jdk;
11126fi
11127
11128
11129# We look for the Boot JDK through various means, going from more certain to
11130# more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
11131# we detected something (if so, the path to the jdk is in BOOT_JDK). But we
11132# must check if this is indeed valid; otherwise we'll continue looking.
11133
11134# Test: Is bootjdk explicitely set by command line arguments?
11135
11136  if test "x$BOOT_JDK_FOUND" = xno; then
11137    # Now execute the test
11138
11139if test "x$with_boot_jdk" != x; then
11140    BOOT_JDK=$with_boot_jdk
11141    BOOT_JDK_FOUND=maybe
11142    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
11143$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
11144fi
11145
11146
11147    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11148    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11149      # Do we have a bin/java?
11150      if test ! -x "$BOOT_JDK/bin/java"; then
11151        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11152$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11153        BOOT_JDK_FOUND=no
11154      else
11155        # Do we have a bin/javac?
11156        if test ! -x "$BOOT_JDK/bin/javac"; then
11157          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11158$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11159          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11160$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11161          BOOT_JDK_FOUND=no
11162        else
11163          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11164          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11165            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11166$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11167            BOOT_JDK_FOUND=no
11168          else
11169            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11170            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11171
11172            # Extra M4 quote needed to protect [] in grep expression.
11173            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11174            if test "x$FOUND_VERSION_78" = x; then
11175              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11176$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11177              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11178$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11179              BOOT_JDK_FOUND=no
11180            else
11181              # We're done! :-)
11182              BOOT_JDK_FOUND=yes
11183
11184  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11185
11186  # Input might be given as Windows format, start by converting to
11187  # unix format.
11188  path="$BOOT_JDK"
11189  new_path=`$CYGPATH -u "$path"`
11190
11191  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11192  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11193  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11194  # "foo.exe" is OK but "foo" is an error.
11195  #
11196  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11197  # It is also a way to make sure we got the proper file name for the real test later on.
11198  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11199  if test "x$test_shortpath" = x; then
11200    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11201$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11202    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11203  fi
11204
11205  # Call helper function which possibly converts this using DOS-style short mode.
11206  # If so, the updated path is stored in $new_path.
11207
11208  input_path="$new_path"
11209  # Check if we need to convert this using DOS-style short mode. If the path
11210  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11211  # take no chances and rewrite it.
11212  # Note: m4 eats our [], so we need to use [ and ] instead.
11213  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11214  if test "x$has_forbidden_chars" != x; then
11215    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11216    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11217    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11218    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11219      # Going to short mode and back again did indeed matter. Since short mode is
11220      # case insensitive, let's make it lowercase to improve readability.
11221      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11222      # Now convert it back to Unix-stile (cygpath)
11223      input_path=`$CYGPATH -u "$shortmode_path"`
11224      new_path="$input_path"
11225    fi
11226  fi
11227
11228  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11229  if test "x$test_cygdrive_prefix" = x; then
11230    # As a simple fix, exclude /usr/bin since it's not a real path.
11231    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11232      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11233      # a path prefixed by /cygdrive for fixpath to work.
11234      new_path="$CYGWIN_ROOT_PATH$input_path"
11235    fi
11236  fi
11237
11238
11239  if test "x$path" != "x$new_path"; then
11240    BOOT_JDK="$new_path"
11241    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11242$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11243  fi
11244
11245  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11246
11247  path="$BOOT_JDK"
11248  has_colon=`$ECHO $path | $GREP ^.:`
11249  new_path="$path"
11250  if test "x$has_colon" = x; then
11251    # Not in mixed or Windows style, start by that.
11252    new_path=`cmd //c echo $path`
11253  fi
11254
11255
11256  input_path="$new_path"
11257  # Check if we need to convert this using DOS-style short mode. If the path
11258  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11259  # take no chances and rewrite it.
11260  # Note: m4 eats our [], so we need to use [ and ] instead.
11261  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11262  if test "x$has_forbidden_chars" != x; then
11263    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11264    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11265  fi
11266
11267
11268  windows_path="$new_path"
11269  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11270    unix_path=`$CYGPATH -u "$windows_path"`
11271    new_path="$unix_path"
11272  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11273    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11274    new_path="$unix_path"
11275  fi
11276
11277  if test "x$path" != "x$new_path"; then
11278    BOOT_JDK="$new_path"
11279    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11280$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11281  fi
11282
11283  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11284  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11285
11286  else
11287    # We're on a posix platform. Hooray! :)
11288    path="$BOOT_JDK"
11289    has_space=`$ECHO "$path" | $GREP " "`
11290    if test "x$has_space" != x; then
11291      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11292$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11293      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11294    fi
11295
11296    # Use eval to expand a potential ~
11297    eval path="$path"
11298    if test ! -f "$path" && test ! -d "$path"; then
11299      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11300    fi
11301
11302    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
11303  fi
11304
11305              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11306$as_echo_n "checking for Boot JDK... " >&6; }
11307              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11308$as_echo "$BOOT_JDK" >&6; }
11309              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11310$as_echo_n "checking Boot JDK version... " >&6; }
11311              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11312              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11313$as_echo "$BOOT_JDK_VERSION" >&6; }
11314            fi # end check jdk version
11315          fi # end check rt.jar
11316        fi # end check javac
11317      fi # end check java
11318    fi # end check boot jdk found
11319  fi
11320
11321if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
11322  # Having specified an argument which is incorrect will produce an instant failure;
11323  # we should not go on looking
11324  as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
11325fi
11326
11327# Test: Is bootjdk available from builddeps?
11328
11329  if test "x$BOOT_JDK_FOUND" = xno; then
11330    # Now execute the test
11331
11332
11333
11334    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
11335        # Source the builddeps file again, to make sure it uses the latest variables!
11336        . $builddepsfile
11337        # Look for a target and build machine specific resource!
11338        eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
11339        if test "x$resource" = x; then
11340            # Ok, lets instead look for a target specific resource
11341            eval resource=\${builddep_bootjdk_TARGET_${rewritten_target_var}}
11342        fi
11343        if test "x$resource" = x; then
11344            # Ok, lets instead look for a build specific resource
11345            eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}}
11346        fi
11347        if test "x$resource" = x; then
11348            # Ok, lets instead look for a generic resource
11349            # (The bootjdk comes from M4 and not the shell, thus no need for eval here.)
11350            resource=${builddep_bootjdk}
11351        fi
11352        if test "x$resource" != x; then
11353            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for bootjdk" >&5
11354$as_echo "$as_me: Using builddeps $resource for bootjdk" >&6;}
11355	    # If the resource in the builddeps.conf file is an existing directory,
11356	    # for example /java/linux/cups
11357	    if test -d ${resource}; then
11358	       depdir=${resource}
11359	    else
11360
11361# bootjdk is for example mymodule
11362# $resource is for example libs/general/libmymod_1_2_3.zip
11363# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
11364# $with_builddeps_dir is for example /localhome/builddeps
11365# depdir is the name of the variable into which we store the depdir, eg MYMOD
11366# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
11367# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
11368    filename=`basename $resource`
11369    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
11370    filebase=${filename%%.*}
11371    extension=${filename#*.}
11372    installdir=$with_builddeps_dir/$filebase
11373    if test ! -f $installdir/$filename.unpacked; then
11374        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&5
11375$as_echo "$as_me: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&6;}
11376        if test ! -d $installdir; then
11377            mkdir -p $installdir
11378        fi
11379        if test ! -d $installdir; then
11380            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
11381        fi
11382        tmpfile=`mktemp $installdir/bootjdk.XXXXXXXXX`
11383        touch $tmpfile
11384        if test ! -f $tmpfile; then
11385            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
11386        fi
11387
11388    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
11389    # $tmpfile is the local file name for the downloaded file.
11390    VALID_TOOL=no
11391    if test "x$BDEPS_FTP" = xwget; then
11392       VALID_TOOL=yes
11393       wget -O $tmpfile $with_builddeps_server/$resource
11394    fi
11395    if test "x$BDEPS_FTP" = xlftp; then
11396       VALID_TOOL=yes
11397       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
11398    fi
11399    if test "x$BDEPS_FTP" = xftp; then
11400        VALID_TOOL=yes
11401        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
11402        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
11403        FTPUSERPWD=${FTPSERVER%%@*}
11404        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
11405            FTPUSER=${userpwd%%:*}
11406            FTPPWD=${userpwd#*@}
11407            FTPSERVER=${FTPSERVER#*@}
11408        else
11409            FTPUSER=ftp
11410            FTPPWD=ftp
11411        fi
11412        # the "pass" command does not work on some
11413        # ftp clients (read ftp.exe) but if it works,
11414        # passive mode is better!
11415        (\
11416            echo "user $FTPUSER $FTPPWD"        ;\
11417            echo "pass"                         ;\
11418            echo "bin"                          ;\
11419            echo "get $FTPPATH $tmpfile"              ;\
11420        ) | ftp -in $FTPSERVER
11421    fi
11422    if test "x$VALID_TOOL" != xyes; then
11423       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
11424    fi
11425
11426        mv $tmpfile $installdir/$filename
11427        if test ! -s $installdir/$filename; then
11428            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
11429        fi
11430        case "$extension" in
11431            zip)  echo "Unzipping $installdir/$filename..."
11432               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
11433            ;;
11434            tar.gz) echo "Untaring $installdir/$filename..."
11435               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
11436            ;;
11437            tgz) echo "Untaring $installdir/$filename..."
11438               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
11439            ;;
11440            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
11441            ;;
11442        esac
11443    fi
11444    if test -f $installdir/$filename.unpacked; then
11445        depdir=$installdir
11446    fi
11447
11448	    fi
11449            # Source the builddeps file again, because in the previous command, the depdir
11450            # was updated to point at the current build dependency install directory.
11451            . $builddepsfile
11452            # Now extract variables from the builddeps.conf files.
11453            theroot=${builddep_bootjdk_ROOT}
11454            thecflags=${builddep_bootjdk_CFLAGS}
11455            thelibs=${builddep_bootjdk_LIBS}
11456            if test "x$depdir" = x; then
11457                as_fn_error $? "Could not download build dependency bootjdk" "$LINENO" 5
11458            fi
11459            BOOT_JDK=$depdir
11460            if test "x$theroot" != x; then
11461               BOOT_JDK="$theroot"
11462            fi
11463            if test "x$thecflags" != x; then
11464               BOOT_JDK_CFLAGS="$thecflags"
11465            fi
11466            if test "x$thelibs" != x; then
11467               BOOT_JDK_LIBS="$thelibs"
11468            fi
11469            BOOT_JDK_FOUND=maybe
11470            else BOOT_JDK_FOUND=no
11471
11472        fi
11473        else BOOT_JDK_FOUND=no
11474
11475    fi
11476
11477
11478
11479    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11480    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11481      # Do we have a bin/java?
11482      if test ! -x "$BOOT_JDK/bin/java"; then
11483        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11484$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11485        BOOT_JDK_FOUND=no
11486      else
11487        # Do we have a bin/javac?
11488        if test ! -x "$BOOT_JDK/bin/javac"; then
11489          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11490$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11491          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11492$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11493          BOOT_JDK_FOUND=no
11494        else
11495          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11496          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11497            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11498$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11499            BOOT_JDK_FOUND=no
11500          else
11501            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11502            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11503
11504            # Extra M4 quote needed to protect [] in grep expression.
11505            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11506            if test "x$FOUND_VERSION_78" = x; then
11507              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11508$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11509              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11510$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11511              BOOT_JDK_FOUND=no
11512            else
11513              # We're done! :-)
11514              BOOT_JDK_FOUND=yes
11515
11516  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11517
11518  # Input might be given as Windows format, start by converting to
11519  # unix format.
11520  path="$BOOT_JDK"
11521  new_path=`$CYGPATH -u "$path"`
11522
11523  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11524  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11525  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11526  # "foo.exe" is OK but "foo" is an error.
11527  #
11528  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11529  # It is also a way to make sure we got the proper file name for the real test later on.
11530  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11531  if test "x$test_shortpath" = x; then
11532    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11533$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11534    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11535  fi
11536
11537  # Call helper function which possibly converts this using DOS-style short mode.
11538  # If so, the updated path is stored in $new_path.
11539
11540  input_path="$new_path"
11541  # Check if we need to convert this using DOS-style short mode. If the path
11542  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11543  # take no chances and rewrite it.
11544  # Note: m4 eats our [], so we need to use [ and ] instead.
11545  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11546  if test "x$has_forbidden_chars" != x; then
11547    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11548    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11549    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11550    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11551      # Going to short mode and back again did indeed matter. Since short mode is
11552      # case insensitive, let's make it lowercase to improve readability.
11553      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11554      # Now convert it back to Unix-stile (cygpath)
11555      input_path=`$CYGPATH -u "$shortmode_path"`
11556      new_path="$input_path"
11557    fi
11558  fi
11559
11560  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11561  if test "x$test_cygdrive_prefix" = x; then
11562    # As a simple fix, exclude /usr/bin since it's not a real path.
11563    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11564      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11565      # a path prefixed by /cygdrive for fixpath to work.
11566      new_path="$CYGWIN_ROOT_PATH$input_path"
11567    fi
11568  fi
11569
11570
11571  if test "x$path" != "x$new_path"; then
11572    BOOT_JDK="$new_path"
11573    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11574$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11575  fi
11576
11577  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11578
11579  path="$BOOT_JDK"
11580  has_colon=`$ECHO $path | $GREP ^.:`
11581  new_path="$path"
11582  if test "x$has_colon" = x; then
11583    # Not in mixed or Windows style, start by that.
11584    new_path=`cmd //c echo $path`
11585  fi
11586
11587
11588  input_path="$new_path"
11589  # Check if we need to convert this using DOS-style short mode. If the path
11590  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11591  # take no chances and rewrite it.
11592  # Note: m4 eats our [], so we need to use [ and ] instead.
11593  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11594  if test "x$has_forbidden_chars" != x; then
11595    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11596    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11597  fi
11598
11599
11600  windows_path="$new_path"
11601  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11602    unix_path=`$CYGPATH -u "$windows_path"`
11603    new_path="$unix_path"
11604  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11605    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11606    new_path="$unix_path"
11607  fi
11608
11609  if test "x$path" != "x$new_path"; then
11610    BOOT_JDK="$new_path"
11611    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11612$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11613  fi
11614
11615  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11616  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11617
11618  else
11619    # We're on a posix platform. Hooray! :)
11620    path="$BOOT_JDK"
11621    has_space=`$ECHO "$path" | $GREP " "`
11622    if test "x$has_space" != x; then
11623      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11624$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11625      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11626    fi
11627
11628    # Use eval to expand a potential ~
11629    eval path="$path"
11630    if test ! -f "$path" && test ! -d "$path"; then
11631      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11632    fi
11633
11634    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
11635  fi
11636
11637              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11638$as_echo_n "checking for Boot JDK... " >&6; }
11639              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11640$as_echo "$BOOT_JDK" >&6; }
11641              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11642$as_echo_n "checking Boot JDK version... " >&6; }
11643              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11644              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11645$as_echo "$BOOT_JDK_VERSION" >&6; }
11646            fi # end check jdk version
11647          fi # end check rt.jar
11648        fi # end check javac
11649      fi # end check java
11650    fi # end check boot jdk found
11651  fi
11652
11653
11654# Test: Is $JAVA_HOME set?
11655
11656  if test "x$BOOT_JDK_FOUND" = xno; then
11657    # Now execute the test
11658
11659    if test "x$JAVA_HOME" != x; then
11660        JAVA_HOME_PROCESSED="$JAVA_HOME"
11661
11662  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11663
11664  # Input might be given as Windows format, start by converting to
11665  # unix format.
11666  path="$JAVA_HOME_PROCESSED"
11667  new_path=`$CYGPATH -u "$path"`
11668
11669  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11670  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11671  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11672  # "foo.exe" is OK but "foo" is an error.
11673  #
11674  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11675  # It is also a way to make sure we got the proper file name for the real test later on.
11676  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11677  if test "x$test_shortpath" = x; then
11678    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
11679$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
11680    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
11681  fi
11682
11683  # Call helper function which possibly converts this using DOS-style short mode.
11684  # If so, the updated path is stored in $new_path.
11685
11686  input_path="$new_path"
11687  # Check if we need to convert this using DOS-style short mode. If the path
11688  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11689  # take no chances and rewrite it.
11690  # Note: m4 eats our [], so we need to use [ and ] instead.
11691  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11692  if test "x$has_forbidden_chars" != x; then
11693    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11694    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11695    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11696    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11697      # Going to short mode and back again did indeed matter. Since short mode is
11698      # case insensitive, let's make it lowercase to improve readability.
11699      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11700      # Now convert it back to Unix-stile (cygpath)
11701      input_path=`$CYGPATH -u "$shortmode_path"`
11702      new_path="$input_path"
11703    fi
11704  fi
11705
11706  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11707  if test "x$test_cygdrive_prefix" = x; then
11708    # As a simple fix, exclude /usr/bin since it's not a real path.
11709    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11710      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11711      # a path prefixed by /cygdrive for fixpath to work.
11712      new_path="$CYGWIN_ROOT_PATH$input_path"
11713    fi
11714  fi
11715
11716
11717  if test "x$path" != "x$new_path"; then
11718    JAVA_HOME_PROCESSED="$new_path"
11719    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
11720$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
11721  fi
11722
11723  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11724
11725  path="$JAVA_HOME_PROCESSED"
11726  has_colon=`$ECHO $path | $GREP ^.:`
11727  new_path="$path"
11728  if test "x$has_colon" = x; then
11729    # Not in mixed or Windows style, start by that.
11730    new_path=`cmd //c echo $path`
11731  fi
11732
11733
11734  input_path="$new_path"
11735  # Check if we need to convert this using DOS-style short mode. If the path
11736  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11737  # take no chances and rewrite it.
11738  # Note: m4 eats our [], so we need to use [ and ] instead.
11739  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11740  if test "x$has_forbidden_chars" != x; then
11741    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11742    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11743  fi
11744
11745
11746  windows_path="$new_path"
11747  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11748    unix_path=`$CYGPATH -u "$windows_path"`
11749    new_path="$unix_path"
11750  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11751    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11752    new_path="$unix_path"
11753  fi
11754
11755  if test "x$path" != "x$new_path"; then
11756    JAVA_HOME_PROCESSED="$new_path"
11757    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
11758$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
11759  fi
11760
11761  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11762  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11763
11764  else
11765    # We're on a posix platform. Hooray! :)
11766    path="$JAVA_HOME_PROCESSED"
11767    has_space=`$ECHO "$path" | $GREP " "`
11768    if test "x$has_space" != x; then
11769      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
11770$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
11771      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11772    fi
11773
11774    # Use eval to expand a potential ~
11775    eval path="$path"
11776    if test ! -f "$path" && test ! -d "$path"; then
11777      as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
11778    fi
11779
11780    JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
11781  fi
11782
11783        if test ! -d "$JAVA_HOME_PROCESSED"; then
11784            { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
11785$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
11786        else
11787          # Aha, the user has set a JAVA_HOME
11788          # let us use that as the Boot JDK.
11789          BOOT_JDK="$JAVA_HOME_PROCESSED"
11790          BOOT_JDK_FOUND=maybe
11791          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
11792$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
11793        fi
11794    fi
11795
11796
11797    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11798    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11799      # Do we have a bin/java?
11800      if test ! -x "$BOOT_JDK/bin/java"; then
11801        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11802$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11803        BOOT_JDK_FOUND=no
11804      else
11805        # Do we have a bin/javac?
11806        if test ! -x "$BOOT_JDK/bin/javac"; then
11807          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11808$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11809          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11810$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11811          BOOT_JDK_FOUND=no
11812        else
11813          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11814          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11815            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11816$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11817            BOOT_JDK_FOUND=no
11818          else
11819            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11820            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11821
11822            # Extra M4 quote needed to protect [] in grep expression.
11823            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11824            if test "x$FOUND_VERSION_78" = x; then
11825              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11826$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11827              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11828$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11829              BOOT_JDK_FOUND=no
11830            else
11831              # We're done! :-)
11832              BOOT_JDK_FOUND=yes
11833
11834  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11835
11836  # Input might be given as Windows format, start by converting to
11837  # unix format.
11838  path="$BOOT_JDK"
11839  new_path=`$CYGPATH -u "$path"`
11840
11841  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11842  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11843  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11844  # "foo.exe" is OK but "foo" is an error.
11845  #
11846  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11847  # It is also a way to make sure we got the proper file name for the real test later on.
11848  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11849  if test "x$test_shortpath" = x; then
11850    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11851$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11852    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11853  fi
11854
11855  # Call helper function which possibly converts this using DOS-style short mode.
11856  # If so, the updated path is stored in $new_path.
11857
11858  input_path="$new_path"
11859  # Check if we need to convert this using DOS-style short mode. If the path
11860  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11861  # take no chances and rewrite it.
11862  # Note: m4 eats our [], so we need to use [ and ] instead.
11863  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11864  if test "x$has_forbidden_chars" != x; then
11865    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11866    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11867    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11868    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11869      # Going to short mode and back again did indeed matter. Since short mode is
11870      # case insensitive, let's make it lowercase to improve readability.
11871      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11872      # Now convert it back to Unix-stile (cygpath)
11873      input_path=`$CYGPATH -u "$shortmode_path"`
11874      new_path="$input_path"
11875    fi
11876  fi
11877
11878  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11879  if test "x$test_cygdrive_prefix" = x; then
11880    # As a simple fix, exclude /usr/bin since it's not a real path.
11881    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11882      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11883      # a path prefixed by /cygdrive for fixpath to work.
11884      new_path="$CYGWIN_ROOT_PATH$input_path"
11885    fi
11886  fi
11887
11888
11889  if test "x$path" != "x$new_path"; then
11890    BOOT_JDK="$new_path"
11891    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11892$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11893  fi
11894
11895  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11896
11897  path="$BOOT_JDK"
11898  has_colon=`$ECHO $path | $GREP ^.:`
11899  new_path="$path"
11900  if test "x$has_colon" = x; then
11901    # Not in mixed or Windows style, start by that.
11902    new_path=`cmd //c echo $path`
11903  fi
11904
11905
11906  input_path="$new_path"
11907  # Check if we need to convert this using DOS-style short mode. If the path
11908  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11909  # take no chances and rewrite it.
11910  # Note: m4 eats our [], so we need to use [ and ] instead.
11911  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11912  if test "x$has_forbidden_chars" != x; then
11913    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11914    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11915  fi
11916
11917
11918  windows_path="$new_path"
11919  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11920    unix_path=`$CYGPATH -u "$windows_path"`
11921    new_path="$unix_path"
11922  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11923    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11924    new_path="$unix_path"
11925  fi
11926
11927  if test "x$path" != "x$new_path"; then
11928    BOOT_JDK="$new_path"
11929    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11930$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11931  fi
11932
11933  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11934  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11935
11936  else
11937    # We're on a posix platform. Hooray! :)
11938    path="$BOOT_JDK"
11939    has_space=`$ECHO "$path" | $GREP " "`
11940    if test "x$has_space" != x; then
11941      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11942$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11943      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11944    fi
11945
11946    # Use eval to expand a potential ~
11947    eval path="$path"
11948    if test ! -f "$path" && test ! -d "$path"; then
11949      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11950    fi
11951
11952    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
11953  fi
11954
11955              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11956$as_echo_n "checking for Boot JDK... " >&6; }
11957              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11958$as_echo "$BOOT_JDK" >&6; }
11959              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11960$as_echo_n "checking Boot JDK version... " >&6; }
11961              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11962              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11963$as_echo "$BOOT_JDK_VERSION" >&6; }
11964            fi # end check jdk version
11965          fi # end check rt.jar
11966        fi # end check javac
11967      fi # end check java
11968    fi # end check boot jdk found
11969  fi
11970
11971
11972# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
11973
11974  if test "x$BOOT_JDK_FOUND" = xno; then
11975    # Now execute the test
11976
11977    if test -x /usr/libexec/java_home; then
11978        BOOT_JDK=`/usr/libexec/java_home`
11979        BOOT_JDK_FOUND=maybe
11980        { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home" >&5
11981$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home" >&6;}
11982    fi
11983
11984
11985    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11986    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11987      # Do we have a bin/java?
11988      if test ! -x "$BOOT_JDK/bin/java"; then
11989        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11990$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11991        BOOT_JDK_FOUND=no
11992      else
11993        # Do we have a bin/javac?
11994        if test ! -x "$BOOT_JDK/bin/javac"; then
11995          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11996$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11997          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11998$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11999          BOOT_JDK_FOUND=no
12000        else
12001          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12002          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12003            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12004$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12005            BOOT_JDK_FOUND=no
12006          else
12007            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12008            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12009
12010            # Extra M4 quote needed to protect [] in grep expression.
12011            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12012            if test "x$FOUND_VERSION_78" = x; then
12013              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12014$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12015              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12016$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12017              BOOT_JDK_FOUND=no
12018            else
12019              # We're done! :-)
12020              BOOT_JDK_FOUND=yes
12021
12022  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12023
12024  # Input might be given as Windows format, start by converting to
12025  # unix format.
12026  path="$BOOT_JDK"
12027  new_path=`$CYGPATH -u "$path"`
12028
12029  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12030  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12031  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12032  # "foo.exe" is OK but "foo" is an error.
12033  #
12034  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12035  # It is also a way to make sure we got the proper file name for the real test later on.
12036  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12037  if test "x$test_shortpath" = x; then
12038    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12039$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12040    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12041  fi
12042
12043  # Call helper function which possibly converts this using DOS-style short mode.
12044  # If so, the updated path is stored in $new_path.
12045
12046  input_path="$new_path"
12047  # Check if we need to convert this using DOS-style short mode. If the path
12048  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12049  # take no chances and rewrite it.
12050  # Note: m4 eats our [], so we need to use [ and ] instead.
12051  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12052  if test "x$has_forbidden_chars" != x; then
12053    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12054    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12055    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12056    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12057      # Going to short mode and back again did indeed matter. Since short mode is
12058      # case insensitive, let's make it lowercase to improve readability.
12059      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12060      # Now convert it back to Unix-stile (cygpath)
12061      input_path=`$CYGPATH -u "$shortmode_path"`
12062      new_path="$input_path"
12063    fi
12064  fi
12065
12066  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12067  if test "x$test_cygdrive_prefix" = x; then
12068    # As a simple fix, exclude /usr/bin since it's not a real path.
12069    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12070      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12071      # a path prefixed by /cygdrive for fixpath to work.
12072      new_path="$CYGWIN_ROOT_PATH$input_path"
12073    fi
12074  fi
12075
12076
12077  if test "x$path" != "x$new_path"; then
12078    BOOT_JDK="$new_path"
12079    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12080$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12081  fi
12082
12083  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12084
12085  path="$BOOT_JDK"
12086  has_colon=`$ECHO $path | $GREP ^.:`
12087  new_path="$path"
12088  if test "x$has_colon" = x; then
12089    # Not in mixed or Windows style, start by that.
12090    new_path=`cmd //c echo $path`
12091  fi
12092
12093
12094  input_path="$new_path"
12095  # Check if we need to convert this using DOS-style short mode. If the path
12096  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12097  # take no chances and rewrite it.
12098  # Note: m4 eats our [], so we need to use [ and ] instead.
12099  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12100  if test "x$has_forbidden_chars" != x; then
12101    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12102    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12103  fi
12104
12105
12106  windows_path="$new_path"
12107  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12108    unix_path=`$CYGPATH -u "$windows_path"`
12109    new_path="$unix_path"
12110  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12111    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12112    new_path="$unix_path"
12113  fi
12114
12115  if test "x$path" != "x$new_path"; then
12116    BOOT_JDK="$new_path"
12117    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12118$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12119  fi
12120
12121  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12122  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12123
12124  else
12125    # We're on a posix platform. Hooray! :)
12126    path="$BOOT_JDK"
12127    has_space=`$ECHO "$path" | $GREP " "`
12128    if test "x$has_space" != x; then
12129      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12130$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12131      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12132    fi
12133
12134    # Use eval to expand a potential ~
12135    eval path="$path"
12136    if test ! -f "$path" && test ! -d "$path"; then
12137      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12138    fi
12139
12140    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
12141  fi
12142
12143              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12144$as_echo_n "checking for Boot JDK... " >&6; }
12145              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12146$as_echo "$BOOT_JDK" >&6; }
12147              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12148$as_echo_n "checking Boot JDK version... " >&6; }
12149              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12150              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12151$as_echo "$BOOT_JDK_VERSION" >&6; }
12152            fi # end check jdk version
12153          fi # end check rt.jar
12154        fi # end check javac
12155      fi # end check java
12156    fi # end check boot jdk found
12157  fi
12158
12159
12160# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
12161
12162  if test "x$BOOT_JDK_FOUND" = xno; then
12163    # Now execute the test
12164
12165    # Extract the first word of "javac", so it can be a program name with args.
12166set dummy javac; ac_word=$2
12167{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12168$as_echo_n "checking for $ac_word... " >&6; }
12169if ${ac_cv_path_JAVAC_CHECK+:} false; then :
12170  $as_echo_n "(cached) " >&6
12171else
12172  case $JAVAC_CHECK in
12173  [\\/]* | ?:[\\/]*)
12174  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
12175  ;;
12176  *)
12177  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12178for as_dir in $PATH
12179do
12180  IFS=$as_save_IFS
12181  test -z "$as_dir" && as_dir=.
12182    for ac_exec_ext in '' $ac_executable_extensions; do
12183  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12184    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
12185    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12186    break 2
12187  fi
12188done
12189  done
12190IFS=$as_save_IFS
12191
12192  ;;
12193esac
12194fi
12195JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
12196if test -n "$JAVAC_CHECK"; then
12197  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
12198$as_echo "$JAVAC_CHECK" >&6; }
12199else
12200  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12201$as_echo "no" >&6; }
12202fi
12203
12204
12205    # Extract the first word of "java", so it can be a program name with args.
12206set dummy java; ac_word=$2
12207{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12208$as_echo_n "checking for $ac_word... " >&6; }
12209if ${ac_cv_path_JAVA_CHECK+:} false; then :
12210  $as_echo_n "(cached) " >&6
12211else
12212  case $JAVA_CHECK in
12213  [\\/]* | ?:[\\/]*)
12214  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
12215  ;;
12216  *)
12217  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12218for as_dir in $PATH
12219do
12220  IFS=$as_save_IFS
12221  test -z "$as_dir" && as_dir=.
12222    for ac_exec_ext in '' $ac_executable_extensions; do
12223  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12224    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
12225    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12226    break 2
12227  fi
12228done
12229  done
12230IFS=$as_save_IFS
12231
12232  ;;
12233esac
12234fi
12235JAVA_CHECK=$ac_cv_path_JAVA_CHECK
12236if test -n "$JAVA_CHECK"; then
12237  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
12238$as_echo "$JAVA_CHECK" >&6; }
12239else
12240  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12241$as_echo "no" >&6; }
12242fi
12243
12244
12245    BINARY="$JAVAC_CHECK"
12246    if test "x$JAVAC_CHECK" = x; then
12247        BINARY="$JAVA_CHECK"
12248    fi
12249    if test "x$BINARY" != x; then
12250        # So there is a java(c) binary, it might be part of a JDK.
12251        # Lets find the JDK/JRE directory by following symbolic links.
12252        # Linux/GNU systems often have links from /usr/bin/java to
12253        # /etc/alternatives/java to the real JDK binary.
12254
12255    if test "x$OPENJDK_BUILD_OS" != xwindows; then
12256        # Follow a chain of symbolic links. Use readlink
12257        # where it exists, else fall back to horribly
12258        # complicated shell code.
12259        if test "x$READLINK_TESTED" != yes; then
12260            # On MacOSX there is a readlink tool with a different
12261            # purpose than the GNU readlink tool. Check the found readlink.
12262            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
12263            if test "x$ISGNU" = x; then
12264                 # A readlink that we do not know how to use.
12265                 # Are there other non-GNU readlinks out there?
12266                 READLINK_TESTED=yes
12267                 READLINK=
12268            fi
12269        fi
12270
12271        if test "x$READLINK" != x; then
12272            BINARY=`$READLINK -f $BINARY`
12273        else
12274            # Save the current directory for restoring afterwards
12275            STARTDIR=$PWD
12276            COUNTER=0
12277            sym_link_dir=`$DIRNAME $BINARY`
12278            sym_link_file=`$BASENAME $BINARY`
12279            cd $sym_link_dir
12280            # Use -P flag to resolve symlinks in directories.
12281            cd `$THEPWDCMD -P`
12282            sym_link_dir=`$THEPWDCMD -P`
12283            # Resolve file symlinks
12284            while test $COUNTER -lt 20; do
12285                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
12286                if test "x$ISLINK" == x; then
12287                    # This is not a symbolic link! We are done!
12288                    break
12289                fi
12290                # Again resolve directory symlinks since the target of the just found
12291                # link could be in a different directory
12292                cd `$DIRNAME $ISLINK`
12293                sym_link_dir=`$THEPWDCMD -P`
12294                sym_link_file=`$BASENAME $ISLINK`
12295                let COUNTER=COUNTER+1
12296            done
12297            cd $STARTDIR
12298            BINARY=$sym_link_dir/$sym_link_file
12299        fi
12300    fi
12301
12302        BOOT_JDK=`dirname "$BINARY"`
12303        BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
12304        if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
12305            # Looks like we found ourselves an JDK
12306            BOOT_JDK_FOUND=maybe
12307            { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
12308$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
12309        fi
12310    fi
12311
12312
12313    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12314    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12315      # Do we have a bin/java?
12316      if test ! -x "$BOOT_JDK/bin/java"; then
12317        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12318$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12319        BOOT_JDK_FOUND=no
12320      else
12321        # Do we have a bin/javac?
12322        if test ! -x "$BOOT_JDK/bin/javac"; then
12323          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12324$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12325          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12326$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12327          BOOT_JDK_FOUND=no
12328        else
12329          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12330          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12331            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12332$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12333            BOOT_JDK_FOUND=no
12334          else
12335            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12336            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12337
12338            # Extra M4 quote needed to protect [] in grep expression.
12339            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12340            if test "x$FOUND_VERSION_78" = x; then
12341              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12342$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12343              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12344$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12345              BOOT_JDK_FOUND=no
12346            else
12347              # We're done! :-)
12348              BOOT_JDK_FOUND=yes
12349
12350  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12351
12352  # Input might be given as Windows format, start by converting to
12353  # unix format.
12354  path="$BOOT_JDK"
12355  new_path=`$CYGPATH -u "$path"`
12356
12357  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12358  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12359  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12360  # "foo.exe" is OK but "foo" is an error.
12361  #
12362  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12363  # It is also a way to make sure we got the proper file name for the real test later on.
12364  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12365  if test "x$test_shortpath" = x; then
12366    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12367$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12368    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12369  fi
12370
12371  # Call helper function which possibly converts this using DOS-style short mode.
12372  # If so, the updated path is stored in $new_path.
12373
12374  input_path="$new_path"
12375  # Check if we need to convert this using DOS-style short mode. If the path
12376  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12377  # take no chances and rewrite it.
12378  # Note: m4 eats our [], so we need to use [ and ] instead.
12379  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12380  if test "x$has_forbidden_chars" != x; then
12381    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12382    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12383    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12384    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12385      # Going to short mode and back again did indeed matter. Since short mode is
12386      # case insensitive, let's make it lowercase to improve readability.
12387      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12388      # Now convert it back to Unix-stile (cygpath)
12389      input_path=`$CYGPATH -u "$shortmode_path"`
12390      new_path="$input_path"
12391    fi
12392  fi
12393
12394  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12395  if test "x$test_cygdrive_prefix" = x; then
12396    # As a simple fix, exclude /usr/bin since it's not a real path.
12397    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12398      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12399      # a path prefixed by /cygdrive for fixpath to work.
12400      new_path="$CYGWIN_ROOT_PATH$input_path"
12401    fi
12402  fi
12403
12404
12405  if test "x$path" != "x$new_path"; then
12406    BOOT_JDK="$new_path"
12407    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12408$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12409  fi
12410
12411  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12412
12413  path="$BOOT_JDK"
12414  has_colon=`$ECHO $path | $GREP ^.:`
12415  new_path="$path"
12416  if test "x$has_colon" = x; then
12417    # Not in mixed or Windows style, start by that.
12418    new_path=`cmd //c echo $path`
12419  fi
12420
12421
12422  input_path="$new_path"
12423  # Check if we need to convert this using DOS-style short mode. If the path
12424  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12425  # take no chances and rewrite it.
12426  # Note: m4 eats our [], so we need to use [ and ] instead.
12427  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12428  if test "x$has_forbidden_chars" != x; then
12429    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12430    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12431  fi
12432
12433
12434  windows_path="$new_path"
12435  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12436    unix_path=`$CYGPATH -u "$windows_path"`
12437    new_path="$unix_path"
12438  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12439    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12440    new_path="$unix_path"
12441  fi
12442
12443  if test "x$path" != "x$new_path"; then
12444    BOOT_JDK="$new_path"
12445    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12446$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12447  fi
12448
12449  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12450  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12451
12452  else
12453    # We're on a posix platform. Hooray! :)
12454    path="$BOOT_JDK"
12455    has_space=`$ECHO "$path" | $GREP " "`
12456    if test "x$has_space" != x; then
12457      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12458$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12459      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12460    fi
12461
12462    # Use eval to expand a potential ~
12463    eval path="$path"
12464    if test ! -f "$path" && test ! -d "$path"; then
12465      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12466    fi
12467
12468    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
12469  fi
12470
12471              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12472$as_echo_n "checking for Boot JDK... " >&6; }
12473              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12474$as_echo "$BOOT_JDK" >&6; }
12475              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12476$as_echo_n "checking Boot JDK version... " >&6; }
12477              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12478              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12479$as_echo "$BOOT_JDK_VERSION" >&6; }
12480            fi # end check jdk version
12481          fi # end check rt.jar
12482        fi # end check javac
12483      fi # end check java
12484    fi # end check boot jdk found
12485  fi
12486
12487
12488# Test: Is there a JDK installed in default, well-known locations?
12489
12490  if test "x$BOOT_JDK_FOUND" = xno; then
12491    # Now execute the test
12492
12493  if test "x$OPENJDK_TARGET_OS" = xwindows; then
12494
12495  if test "x$BOOT_JDK_FOUND" = xno; then
12496    # Now execute the test
12497
12498  if test "x$ProgramW6432" != x; then
12499    VIRTUAL_DIR="$ProgramW6432/Java"
12500
12501  windows_path="$VIRTUAL_DIR"
12502  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12503    unix_path=`$CYGPATH -u "$windows_path"`
12504    VIRTUAL_DIR="$unix_path"
12505  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12506    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12507    VIRTUAL_DIR="$unix_path"
12508  fi
12509
12510
12511  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
12512  BOOT_JDK_SUFFIX=""
12513  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
12514  if test "x$ALL_JDKS_FOUND" != x; then
12515    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
12516
12517  if test "x$BOOT_JDK_FOUND" = xno; then
12518    # Now execute the test
12519
12520        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
12521        if test -d "$BOOT_JDK"; then
12522          BOOT_JDK_FOUND=maybe
12523          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
12524$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
12525        fi
12526
12527
12528    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12529    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12530      # Do we have a bin/java?
12531      if test ! -x "$BOOT_JDK/bin/java"; then
12532        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12533$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12534        BOOT_JDK_FOUND=no
12535      else
12536        # Do we have a bin/javac?
12537        if test ! -x "$BOOT_JDK/bin/javac"; then
12538          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12539$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12540          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12541$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12542          BOOT_JDK_FOUND=no
12543        else
12544          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12545          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12546            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12547$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12548            BOOT_JDK_FOUND=no
12549          else
12550            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12551            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12552
12553            # Extra M4 quote needed to protect [] in grep expression.
12554            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12555            if test "x$FOUND_VERSION_78" = x; then
12556              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12557$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12558              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12559$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12560              BOOT_JDK_FOUND=no
12561            else
12562              # We're done! :-)
12563              BOOT_JDK_FOUND=yes
12564
12565  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12566
12567  # Input might be given as Windows format, start by converting to
12568  # unix format.
12569  path="$BOOT_JDK"
12570  new_path=`$CYGPATH -u "$path"`
12571
12572  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12573  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12574  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12575  # "foo.exe" is OK but "foo" is an error.
12576  #
12577  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12578  # It is also a way to make sure we got the proper file name for the real test later on.
12579  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12580  if test "x$test_shortpath" = x; then
12581    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12582$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12583    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12584  fi
12585
12586  # Call helper function which possibly converts this using DOS-style short mode.
12587  # If so, the updated path is stored in $new_path.
12588
12589  input_path="$new_path"
12590  # Check if we need to convert this using DOS-style short mode. If the path
12591  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12592  # take no chances and rewrite it.
12593  # Note: m4 eats our [], so we need to use [ and ] instead.
12594  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12595  if test "x$has_forbidden_chars" != x; then
12596    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12597    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12598    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12599    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12600      # Going to short mode and back again did indeed matter. Since short mode is
12601      # case insensitive, let's make it lowercase to improve readability.
12602      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12603      # Now convert it back to Unix-stile (cygpath)
12604      input_path=`$CYGPATH -u "$shortmode_path"`
12605      new_path="$input_path"
12606    fi
12607  fi
12608
12609  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12610  if test "x$test_cygdrive_prefix" = x; then
12611    # As a simple fix, exclude /usr/bin since it's not a real path.
12612    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12613      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12614      # a path prefixed by /cygdrive for fixpath to work.
12615      new_path="$CYGWIN_ROOT_PATH$input_path"
12616    fi
12617  fi
12618
12619
12620  if test "x$path" != "x$new_path"; then
12621    BOOT_JDK="$new_path"
12622    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12623$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12624  fi
12625
12626  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12627
12628  path="$BOOT_JDK"
12629  has_colon=`$ECHO $path | $GREP ^.:`
12630  new_path="$path"
12631  if test "x$has_colon" = x; then
12632    # Not in mixed or Windows style, start by that.
12633    new_path=`cmd //c echo $path`
12634  fi
12635
12636
12637  input_path="$new_path"
12638  # Check if we need to convert this using DOS-style short mode. If the path
12639  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12640  # take no chances and rewrite it.
12641  # Note: m4 eats our [], so we need to use [ and ] instead.
12642  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12643  if test "x$has_forbidden_chars" != x; then
12644    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12645    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12646  fi
12647
12648
12649  windows_path="$new_path"
12650  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12651    unix_path=`$CYGPATH -u "$windows_path"`
12652    new_path="$unix_path"
12653  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12654    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12655    new_path="$unix_path"
12656  fi
12657
12658  if test "x$path" != "x$new_path"; then
12659    BOOT_JDK="$new_path"
12660    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12661$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12662  fi
12663
12664  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12665  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12666
12667  else
12668    # We're on a posix platform. Hooray! :)
12669    path="$BOOT_JDK"
12670    has_space=`$ECHO "$path" | $GREP " "`
12671    if test "x$has_space" != x; then
12672      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12673$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12674      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12675    fi
12676
12677    # Use eval to expand a potential ~
12678    eval path="$path"
12679    if test ! -f "$path" && test ! -d "$path"; then
12680      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12681    fi
12682
12683    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
12684  fi
12685
12686              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12687$as_echo_n "checking for Boot JDK... " >&6; }
12688              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12689$as_echo "$BOOT_JDK" >&6; }
12690              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12691$as_echo_n "checking Boot JDK version... " >&6; }
12692              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12693              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12694$as_echo "$BOOT_JDK_VERSION" >&6; }
12695            fi # end check jdk version
12696          fi # end check rt.jar
12697        fi # end check javac
12698      fi # end check java
12699    fi # end check boot jdk found
12700  fi
12701
12702    done
12703  fi
12704
12705  fi
12706
12707
12708    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12709    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12710      # Do we have a bin/java?
12711      if test ! -x "$BOOT_JDK/bin/java"; then
12712        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12713$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12714        BOOT_JDK_FOUND=no
12715      else
12716        # Do we have a bin/javac?
12717        if test ! -x "$BOOT_JDK/bin/javac"; then
12718          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12719$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12720          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12721$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12722          BOOT_JDK_FOUND=no
12723        else
12724          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12725          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12726            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12727$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12728            BOOT_JDK_FOUND=no
12729          else
12730            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12731            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12732
12733            # Extra M4 quote needed to protect [] in grep expression.
12734            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12735            if test "x$FOUND_VERSION_78" = x; then
12736              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12737$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12738              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12739$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12740              BOOT_JDK_FOUND=no
12741            else
12742              # We're done! :-)
12743              BOOT_JDK_FOUND=yes
12744
12745  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12746
12747  # Input might be given as Windows format, start by converting to
12748  # unix format.
12749  path="$BOOT_JDK"
12750  new_path=`$CYGPATH -u "$path"`
12751
12752  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12753  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12754  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12755  # "foo.exe" is OK but "foo" is an error.
12756  #
12757  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12758  # It is also a way to make sure we got the proper file name for the real test later on.
12759  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12760  if test "x$test_shortpath" = x; then
12761    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12762$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12763    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12764  fi
12765
12766  # Call helper function which possibly converts this using DOS-style short mode.
12767  # If so, the updated path is stored in $new_path.
12768
12769  input_path="$new_path"
12770  # Check if we need to convert this using DOS-style short mode. If the path
12771  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12772  # take no chances and rewrite it.
12773  # Note: m4 eats our [], so we need to use [ and ] instead.
12774  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12775  if test "x$has_forbidden_chars" != x; then
12776    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12777    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12778    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12779    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12780      # Going to short mode and back again did indeed matter. Since short mode is
12781      # case insensitive, let's make it lowercase to improve readability.
12782      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12783      # Now convert it back to Unix-stile (cygpath)
12784      input_path=`$CYGPATH -u "$shortmode_path"`
12785      new_path="$input_path"
12786    fi
12787  fi
12788
12789  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12790  if test "x$test_cygdrive_prefix" = x; then
12791    # As a simple fix, exclude /usr/bin since it's not a real path.
12792    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12793      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12794      # a path prefixed by /cygdrive for fixpath to work.
12795      new_path="$CYGWIN_ROOT_PATH$input_path"
12796    fi
12797  fi
12798
12799
12800  if test "x$path" != "x$new_path"; then
12801    BOOT_JDK="$new_path"
12802    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12803$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12804  fi
12805
12806  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12807
12808  path="$BOOT_JDK"
12809  has_colon=`$ECHO $path | $GREP ^.:`
12810  new_path="$path"
12811  if test "x$has_colon" = x; then
12812    # Not in mixed or Windows style, start by that.
12813    new_path=`cmd //c echo $path`
12814  fi
12815
12816
12817  input_path="$new_path"
12818  # Check if we need to convert this using DOS-style short mode. If the path
12819  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12820  # take no chances and rewrite it.
12821  # Note: m4 eats our [], so we need to use [ and ] instead.
12822  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12823  if test "x$has_forbidden_chars" != x; then
12824    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12825    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12826  fi
12827
12828
12829  windows_path="$new_path"
12830  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12831    unix_path=`$CYGPATH -u "$windows_path"`
12832    new_path="$unix_path"
12833  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12834    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12835    new_path="$unix_path"
12836  fi
12837
12838  if test "x$path" != "x$new_path"; then
12839    BOOT_JDK="$new_path"
12840    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12841$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12842  fi
12843
12844  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12845  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12846
12847  else
12848    # We're on a posix platform. Hooray! :)
12849    path="$BOOT_JDK"
12850    has_space=`$ECHO "$path" | $GREP " "`
12851    if test "x$has_space" != x; then
12852      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12853$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12854      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12855    fi
12856
12857    # Use eval to expand a potential ~
12858    eval path="$path"
12859    if test ! -f "$path" && test ! -d "$path"; then
12860      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12861    fi
12862
12863    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
12864  fi
12865
12866              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12867$as_echo_n "checking for Boot JDK... " >&6; }
12868              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12869$as_echo "$BOOT_JDK" >&6; }
12870              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12871$as_echo_n "checking Boot JDK version... " >&6; }
12872              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12873              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12874$as_echo "$BOOT_JDK_VERSION" >&6; }
12875            fi # end check jdk version
12876          fi # end check rt.jar
12877        fi # end check javac
12878      fi # end check java
12879    fi # end check boot jdk found
12880  fi
12881
12882
12883  if test "x$BOOT_JDK_FOUND" = xno; then
12884    # Now execute the test
12885
12886  if test "x$PROGRAMW6432" != x; then
12887    VIRTUAL_DIR="$PROGRAMW6432/Java"
12888
12889  windows_path="$VIRTUAL_DIR"
12890  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12891    unix_path=`$CYGPATH -u "$windows_path"`
12892    VIRTUAL_DIR="$unix_path"
12893  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12894    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12895    VIRTUAL_DIR="$unix_path"
12896  fi
12897
12898
12899  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
12900  BOOT_JDK_SUFFIX=""
12901  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
12902  if test "x$ALL_JDKS_FOUND" != x; then
12903    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
12904
12905  if test "x$BOOT_JDK_FOUND" = xno; then
12906    # Now execute the test
12907
12908        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
12909        if test -d "$BOOT_JDK"; then
12910          BOOT_JDK_FOUND=maybe
12911          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
12912$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
12913        fi
12914
12915
12916    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12917    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12918      # Do we have a bin/java?
12919      if test ! -x "$BOOT_JDK/bin/java"; then
12920        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12921$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12922        BOOT_JDK_FOUND=no
12923      else
12924        # Do we have a bin/javac?
12925        if test ! -x "$BOOT_JDK/bin/javac"; then
12926          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12927$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12928          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12929$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12930          BOOT_JDK_FOUND=no
12931        else
12932          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12933          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12934            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12935$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12936            BOOT_JDK_FOUND=no
12937          else
12938            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12939            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12940
12941            # Extra M4 quote needed to protect [] in grep expression.
12942            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12943            if test "x$FOUND_VERSION_78" = x; then
12944              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12945$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12946              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12947$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12948              BOOT_JDK_FOUND=no
12949            else
12950              # We're done! :-)
12951              BOOT_JDK_FOUND=yes
12952
12953  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12954
12955  # Input might be given as Windows format, start by converting to
12956  # unix format.
12957  path="$BOOT_JDK"
12958  new_path=`$CYGPATH -u "$path"`
12959
12960  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12961  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12962  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12963  # "foo.exe" is OK but "foo" is an error.
12964  #
12965  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12966  # It is also a way to make sure we got the proper file name for the real test later on.
12967  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12968  if test "x$test_shortpath" = x; then
12969    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12970$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12971    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12972  fi
12973
12974  # Call helper function which possibly converts this using DOS-style short mode.
12975  # If so, the updated path is stored in $new_path.
12976
12977  input_path="$new_path"
12978  # Check if we need to convert this using DOS-style short mode. If the path
12979  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12980  # take no chances and rewrite it.
12981  # Note: m4 eats our [], so we need to use [ and ] instead.
12982  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12983  if test "x$has_forbidden_chars" != x; then
12984    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12985    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12986    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12987    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12988      # Going to short mode and back again did indeed matter. Since short mode is
12989      # case insensitive, let's make it lowercase to improve readability.
12990      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12991      # Now convert it back to Unix-stile (cygpath)
12992      input_path=`$CYGPATH -u "$shortmode_path"`
12993      new_path="$input_path"
12994    fi
12995  fi
12996
12997  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12998  if test "x$test_cygdrive_prefix" = x; then
12999    # As a simple fix, exclude /usr/bin since it's not a real path.
13000    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13001      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13002      # a path prefixed by /cygdrive for fixpath to work.
13003      new_path="$CYGWIN_ROOT_PATH$input_path"
13004    fi
13005  fi
13006
13007
13008  if test "x$path" != "x$new_path"; then
13009    BOOT_JDK="$new_path"
13010    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13011$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13012  fi
13013
13014  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13015
13016  path="$BOOT_JDK"
13017  has_colon=`$ECHO $path | $GREP ^.:`
13018  new_path="$path"
13019  if test "x$has_colon" = x; then
13020    # Not in mixed or Windows style, start by that.
13021    new_path=`cmd //c echo $path`
13022  fi
13023
13024
13025  input_path="$new_path"
13026  # Check if we need to convert this using DOS-style short mode. If the path
13027  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13028  # take no chances and rewrite it.
13029  # Note: m4 eats our [], so we need to use [ and ] instead.
13030  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13031  if test "x$has_forbidden_chars" != x; then
13032    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13033    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13034  fi
13035
13036
13037  windows_path="$new_path"
13038  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13039    unix_path=`$CYGPATH -u "$windows_path"`
13040    new_path="$unix_path"
13041  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13042    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13043    new_path="$unix_path"
13044  fi
13045
13046  if test "x$path" != "x$new_path"; then
13047    BOOT_JDK="$new_path"
13048    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13049$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13050  fi
13051
13052  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13053  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13054
13055  else
13056    # We're on a posix platform. Hooray! :)
13057    path="$BOOT_JDK"
13058    has_space=`$ECHO "$path" | $GREP " "`
13059    if test "x$has_space" != x; then
13060      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13061$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13062      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13063    fi
13064
13065    # Use eval to expand a potential ~
13066    eval path="$path"
13067    if test ! -f "$path" && test ! -d "$path"; then
13068      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13069    fi
13070
13071    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13072  fi
13073
13074              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13075$as_echo_n "checking for Boot JDK... " >&6; }
13076              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13077$as_echo "$BOOT_JDK" >&6; }
13078              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13079$as_echo_n "checking Boot JDK version... " >&6; }
13080              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13081              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13082$as_echo "$BOOT_JDK_VERSION" >&6; }
13083            fi # end check jdk version
13084          fi # end check rt.jar
13085        fi # end check javac
13086      fi # end check java
13087    fi # end check boot jdk found
13088  fi
13089
13090    done
13091  fi
13092
13093  fi
13094
13095
13096    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13097    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13098      # Do we have a bin/java?
13099      if test ! -x "$BOOT_JDK/bin/java"; then
13100        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13101$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13102        BOOT_JDK_FOUND=no
13103      else
13104        # Do we have a bin/javac?
13105        if test ! -x "$BOOT_JDK/bin/javac"; then
13106          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13107$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13108          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13109$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13110          BOOT_JDK_FOUND=no
13111        else
13112          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13113          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13114            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13115$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13116            BOOT_JDK_FOUND=no
13117          else
13118            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13119            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13120
13121            # Extra M4 quote needed to protect [] in grep expression.
13122            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13123            if test "x$FOUND_VERSION_78" = x; then
13124              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13125$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13126              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13127$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13128              BOOT_JDK_FOUND=no
13129            else
13130              # We're done! :-)
13131              BOOT_JDK_FOUND=yes
13132
13133  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13134
13135  # Input might be given as Windows format, start by converting to
13136  # unix format.
13137  path="$BOOT_JDK"
13138  new_path=`$CYGPATH -u "$path"`
13139
13140  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13141  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13142  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13143  # "foo.exe" is OK but "foo" is an error.
13144  #
13145  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13146  # It is also a way to make sure we got the proper file name for the real test later on.
13147  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13148  if test "x$test_shortpath" = x; then
13149    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13150$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13151    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13152  fi
13153
13154  # Call helper function which possibly converts this using DOS-style short mode.
13155  # If so, the updated path is stored in $new_path.
13156
13157  input_path="$new_path"
13158  # Check if we need to convert this using DOS-style short mode. If the path
13159  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13160  # take no chances and rewrite it.
13161  # Note: m4 eats our [], so we need to use [ and ] instead.
13162  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13163  if test "x$has_forbidden_chars" != x; then
13164    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13165    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13166    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13167    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13168      # Going to short mode and back again did indeed matter. Since short mode is
13169      # case insensitive, let's make it lowercase to improve readability.
13170      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13171      # Now convert it back to Unix-stile (cygpath)
13172      input_path=`$CYGPATH -u "$shortmode_path"`
13173      new_path="$input_path"
13174    fi
13175  fi
13176
13177  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13178  if test "x$test_cygdrive_prefix" = x; then
13179    # As a simple fix, exclude /usr/bin since it's not a real path.
13180    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13181      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13182      # a path prefixed by /cygdrive for fixpath to work.
13183      new_path="$CYGWIN_ROOT_PATH$input_path"
13184    fi
13185  fi
13186
13187
13188  if test "x$path" != "x$new_path"; then
13189    BOOT_JDK="$new_path"
13190    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13191$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13192  fi
13193
13194  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13195
13196  path="$BOOT_JDK"
13197  has_colon=`$ECHO $path | $GREP ^.:`
13198  new_path="$path"
13199  if test "x$has_colon" = x; then
13200    # Not in mixed or Windows style, start by that.
13201    new_path=`cmd //c echo $path`
13202  fi
13203
13204
13205  input_path="$new_path"
13206  # Check if we need to convert this using DOS-style short mode. If the path
13207  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13208  # take no chances and rewrite it.
13209  # Note: m4 eats our [], so we need to use [ and ] instead.
13210  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13211  if test "x$has_forbidden_chars" != x; then
13212    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13213    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13214  fi
13215
13216
13217  windows_path="$new_path"
13218  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13219    unix_path=`$CYGPATH -u "$windows_path"`
13220    new_path="$unix_path"
13221  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13222    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13223    new_path="$unix_path"
13224  fi
13225
13226  if test "x$path" != "x$new_path"; then
13227    BOOT_JDK="$new_path"
13228    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13229$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13230  fi
13231
13232  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13233  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13234
13235  else
13236    # We're on a posix platform. Hooray! :)
13237    path="$BOOT_JDK"
13238    has_space=`$ECHO "$path" | $GREP " "`
13239    if test "x$has_space" != x; then
13240      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13241$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13242      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13243    fi
13244
13245    # Use eval to expand a potential ~
13246    eval path="$path"
13247    if test ! -f "$path" && test ! -d "$path"; then
13248      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13249    fi
13250
13251    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13252  fi
13253
13254              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13255$as_echo_n "checking for Boot JDK... " >&6; }
13256              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13257$as_echo "$BOOT_JDK" >&6; }
13258              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13259$as_echo_n "checking Boot JDK version... " >&6; }
13260              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13261              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13262$as_echo "$BOOT_JDK_VERSION" >&6; }
13263            fi # end check jdk version
13264          fi # end check rt.jar
13265        fi # end check javac
13266      fi # end check java
13267    fi # end check boot jdk found
13268  fi
13269
13270
13271  if test "x$BOOT_JDK_FOUND" = xno; then
13272    # Now execute the test
13273
13274  if test "x$PROGRAMFILES" != x; then
13275    VIRTUAL_DIR="$PROGRAMFILES/Java"
13276
13277  windows_path="$VIRTUAL_DIR"
13278  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13279    unix_path=`$CYGPATH -u "$windows_path"`
13280    VIRTUAL_DIR="$unix_path"
13281  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13282    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13283    VIRTUAL_DIR="$unix_path"
13284  fi
13285
13286
13287  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
13288  BOOT_JDK_SUFFIX=""
13289  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13290  if test "x$ALL_JDKS_FOUND" != x; then
13291    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13292
13293  if test "x$BOOT_JDK_FOUND" = xno; then
13294    # Now execute the test
13295
13296        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13297        if test -d "$BOOT_JDK"; then
13298          BOOT_JDK_FOUND=maybe
13299          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13300$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13301        fi
13302
13303
13304    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13305    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13306      # Do we have a bin/java?
13307      if test ! -x "$BOOT_JDK/bin/java"; then
13308        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13309$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13310        BOOT_JDK_FOUND=no
13311      else
13312        # Do we have a bin/javac?
13313        if test ! -x "$BOOT_JDK/bin/javac"; then
13314          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13315$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13316          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13317$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13318          BOOT_JDK_FOUND=no
13319        else
13320          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13321          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13322            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13323$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13324            BOOT_JDK_FOUND=no
13325          else
13326            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13327            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13328
13329            # Extra M4 quote needed to protect [] in grep expression.
13330            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13331            if test "x$FOUND_VERSION_78" = x; then
13332              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13333$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13334              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13335$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13336              BOOT_JDK_FOUND=no
13337            else
13338              # We're done! :-)
13339              BOOT_JDK_FOUND=yes
13340
13341  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13342
13343  # Input might be given as Windows format, start by converting to
13344  # unix format.
13345  path="$BOOT_JDK"
13346  new_path=`$CYGPATH -u "$path"`
13347
13348  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13349  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13350  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13351  # "foo.exe" is OK but "foo" is an error.
13352  #
13353  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13354  # It is also a way to make sure we got the proper file name for the real test later on.
13355  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13356  if test "x$test_shortpath" = x; then
13357    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13358$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13359    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13360  fi
13361
13362  # Call helper function which possibly converts this using DOS-style short mode.
13363  # If so, the updated path is stored in $new_path.
13364
13365  input_path="$new_path"
13366  # Check if we need to convert this using DOS-style short mode. If the path
13367  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13368  # take no chances and rewrite it.
13369  # Note: m4 eats our [], so we need to use [ and ] instead.
13370  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13371  if test "x$has_forbidden_chars" != x; then
13372    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13373    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13374    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13375    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13376      # Going to short mode and back again did indeed matter. Since short mode is
13377      # case insensitive, let's make it lowercase to improve readability.
13378      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13379      # Now convert it back to Unix-stile (cygpath)
13380      input_path=`$CYGPATH -u "$shortmode_path"`
13381      new_path="$input_path"
13382    fi
13383  fi
13384
13385  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13386  if test "x$test_cygdrive_prefix" = x; then
13387    # As a simple fix, exclude /usr/bin since it's not a real path.
13388    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13389      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13390      # a path prefixed by /cygdrive for fixpath to work.
13391      new_path="$CYGWIN_ROOT_PATH$input_path"
13392    fi
13393  fi
13394
13395
13396  if test "x$path" != "x$new_path"; then
13397    BOOT_JDK="$new_path"
13398    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13399$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13400  fi
13401
13402  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13403
13404  path="$BOOT_JDK"
13405  has_colon=`$ECHO $path | $GREP ^.:`
13406  new_path="$path"
13407  if test "x$has_colon" = x; then
13408    # Not in mixed or Windows style, start by that.
13409    new_path=`cmd //c echo $path`
13410  fi
13411
13412
13413  input_path="$new_path"
13414  # Check if we need to convert this using DOS-style short mode. If the path
13415  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13416  # take no chances and rewrite it.
13417  # Note: m4 eats our [], so we need to use [ and ] instead.
13418  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13419  if test "x$has_forbidden_chars" != x; then
13420    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13421    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13422  fi
13423
13424
13425  windows_path="$new_path"
13426  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13427    unix_path=`$CYGPATH -u "$windows_path"`
13428    new_path="$unix_path"
13429  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13430    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13431    new_path="$unix_path"
13432  fi
13433
13434  if test "x$path" != "x$new_path"; then
13435    BOOT_JDK="$new_path"
13436    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13437$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13438  fi
13439
13440  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13441  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13442
13443  else
13444    # We're on a posix platform. Hooray! :)
13445    path="$BOOT_JDK"
13446    has_space=`$ECHO "$path" | $GREP " "`
13447    if test "x$has_space" != x; then
13448      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13449$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13450      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13451    fi
13452
13453    # Use eval to expand a potential ~
13454    eval path="$path"
13455    if test ! -f "$path" && test ! -d "$path"; then
13456      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13457    fi
13458
13459    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13460  fi
13461
13462              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13463$as_echo_n "checking for Boot JDK... " >&6; }
13464              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13465$as_echo "$BOOT_JDK" >&6; }
13466              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13467$as_echo_n "checking Boot JDK version... " >&6; }
13468              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13469              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13470$as_echo "$BOOT_JDK_VERSION" >&6; }
13471            fi # end check jdk version
13472          fi # end check rt.jar
13473        fi # end check javac
13474      fi # end check java
13475    fi # end check boot jdk found
13476  fi
13477
13478    done
13479  fi
13480
13481  fi
13482
13483
13484    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13485    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13486      # Do we have a bin/java?
13487      if test ! -x "$BOOT_JDK/bin/java"; then
13488        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13489$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13490        BOOT_JDK_FOUND=no
13491      else
13492        # Do we have a bin/javac?
13493        if test ! -x "$BOOT_JDK/bin/javac"; then
13494          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13495$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13496          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13497$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13498          BOOT_JDK_FOUND=no
13499        else
13500          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13501          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13502            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13503$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13504            BOOT_JDK_FOUND=no
13505          else
13506            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13507            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13508
13509            # Extra M4 quote needed to protect [] in grep expression.
13510            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13511            if test "x$FOUND_VERSION_78" = x; then
13512              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13513$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13514              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13515$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13516              BOOT_JDK_FOUND=no
13517            else
13518              # We're done! :-)
13519              BOOT_JDK_FOUND=yes
13520
13521  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13522
13523  # Input might be given as Windows format, start by converting to
13524  # unix format.
13525  path="$BOOT_JDK"
13526  new_path=`$CYGPATH -u "$path"`
13527
13528  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13529  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13530  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13531  # "foo.exe" is OK but "foo" is an error.
13532  #
13533  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13534  # It is also a way to make sure we got the proper file name for the real test later on.
13535  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13536  if test "x$test_shortpath" = x; then
13537    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13538$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13539    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13540  fi
13541
13542  # Call helper function which possibly converts this using DOS-style short mode.
13543  # If so, the updated path is stored in $new_path.
13544
13545  input_path="$new_path"
13546  # Check if we need to convert this using DOS-style short mode. If the path
13547  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13548  # take no chances and rewrite it.
13549  # Note: m4 eats our [], so we need to use [ and ] instead.
13550  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13551  if test "x$has_forbidden_chars" != x; then
13552    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13553    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13554    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13555    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13556      # Going to short mode and back again did indeed matter. Since short mode is
13557      # case insensitive, let's make it lowercase to improve readability.
13558      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13559      # Now convert it back to Unix-stile (cygpath)
13560      input_path=`$CYGPATH -u "$shortmode_path"`
13561      new_path="$input_path"
13562    fi
13563  fi
13564
13565  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13566  if test "x$test_cygdrive_prefix" = x; then
13567    # As a simple fix, exclude /usr/bin since it's not a real path.
13568    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13569      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13570      # a path prefixed by /cygdrive for fixpath to work.
13571      new_path="$CYGWIN_ROOT_PATH$input_path"
13572    fi
13573  fi
13574
13575
13576  if test "x$path" != "x$new_path"; then
13577    BOOT_JDK="$new_path"
13578    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13579$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13580  fi
13581
13582  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13583
13584  path="$BOOT_JDK"
13585  has_colon=`$ECHO $path | $GREP ^.:`
13586  new_path="$path"
13587  if test "x$has_colon" = x; then
13588    # Not in mixed or Windows style, start by that.
13589    new_path=`cmd //c echo $path`
13590  fi
13591
13592
13593  input_path="$new_path"
13594  # Check if we need to convert this using DOS-style short mode. If the path
13595  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13596  # take no chances and rewrite it.
13597  # Note: m4 eats our [], so we need to use [ and ] instead.
13598  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13599  if test "x$has_forbidden_chars" != x; then
13600    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13601    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13602  fi
13603
13604
13605  windows_path="$new_path"
13606  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13607    unix_path=`$CYGPATH -u "$windows_path"`
13608    new_path="$unix_path"
13609  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13610    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13611    new_path="$unix_path"
13612  fi
13613
13614  if test "x$path" != "x$new_path"; then
13615    BOOT_JDK="$new_path"
13616    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13617$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13618  fi
13619
13620  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13621  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13622
13623  else
13624    # We're on a posix platform. Hooray! :)
13625    path="$BOOT_JDK"
13626    has_space=`$ECHO "$path" | $GREP " "`
13627    if test "x$has_space" != x; then
13628      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13629$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13630      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13631    fi
13632
13633    # Use eval to expand a potential ~
13634    eval path="$path"
13635    if test ! -f "$path" && test ! -d "$path"; then
13636      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13637    fi
13638
13639    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13640  fi
13641
13642              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13643$as_echo_n "checking for Boot JDK... " >&6; }
13644              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13645$as_echo "$BOOT_JDK" >&6; }
13646              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13647$as_echo_n "checking Boot JDK version... " >&6; }
13648              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13649              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13650$as_echo "$BOOT_JDK_VERSION" >&6; }
13651            fi # end check jdk version
13652          fi # end check rt.jar
13653        fi # end check javac
13654      fi # end check java
13655    fi # end check boot jdk found
13656  fi
13657
13658
13659  if test "x$BOOT_JDK_FOUND" = xno; then
13660    # Now execute the test
13661
13662  if test "x$ProgramFiles" != x; then
13663    VIRTUAL_DIR="$ProgramFiles/Java"
13664
13665  windows_path="$VIRTUAL_DIR"
13666  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13667    unix_path=`$CYGPATH -u "$windows_path"`
13668    VIRTUAL_DIR="$unix_path"
13669  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13670    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13671    VIRTUAL_DIR="$unix_path"
13672  fi
13673
13674
13675  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
13676  BOOT_JDK_SUFFIX=""
13677  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13678  if test "x$ALL_JDKS_FOUND" != x; then
13679    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13680
13681  if test "x$BOOT_JDK_FOUND" = xno; then
13682    # Now execute the test
13683
13684        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13685        if test -d "$BOOT_JDK"; then
13686          BOOT_JDK_FOUND=maybe
13687          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13688$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13689        fi
13690
13691
13692    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13693    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13694      # Do we have a bin/java?
13695      if test ! -x "$BOOT_JDK/bin/java"; then
13696        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13697$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13698        BOOT_JDK_FOUND=no
13699      else
13700        # Do we have a bin/javac?
13701        if test ! -x "$BOOT_JDK/bin/javac"; then
13702          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13703$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13704          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13705$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13706          BOOT_JDK_FOUND=no
13707        else
13708          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13709          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13710            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13711$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13712            BOOT_JDK_FOUND=no
13713          else
13714            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13715            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13716
13717            # Extra M4 quote needed to protect [] in grep expression.
13718            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13719            if test "x$FOUND_VERSION_78" = x; then
13720              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13721$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13722              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13723$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13724              BOOT_JDK_FOUND=no
13725            else
13726              # We're done! :-)
13727              BOOT_JDK_FOUND=yes
13728
13729  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13730
13731  # Input might be given as Windows format, start by converting to
13732  # unix format.
13733  path="$BOOT_JDK"
13734  new_path=`$CYGPATH -u "$path"`
13735
13736  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13737  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13738  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13739  # "foo.exe" is OK but "foo" is an error.
13740  #
13741  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13742  # It is also a way to make sure we got the proper file name for the real test later on.
13743  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13744  if test "x$test_shortpath" = x; then
13745    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13746$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13747    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13748  fi
13749
13750  # Call helper function which possibly converts this using DOS-style short mode.
13751  # If so, the updated path is stored in $new_path.
13752
13753  input_path="$new_path"
13754  # Check if we need to convert this using DOS-style short mode. If the path
13755  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13756  # take no chances and rewrite it.
13757  # Note: m4 eats our [], so we need to use [ and ] instead.
13758  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13759  if test "x$has_forbidden_chars" != x; then
13760    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13761    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13762    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13763    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13764      # Going to short mode and back again did indeed matter. Since short mode is
13765      # case insensitive, let's make it lowercase to improve readability.
13766      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13767      # Now convert it back to Unix-stile (cygpath)
13768      input_path=`$CYGPATH -u "$shortmode_path"`
13769      new_path="$input_path"
13770    fi
13771  fi
13772
13773  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13774  if test "x$test_cygdrive_prefix" = x; then
13775    # As a simple fix, exclude /usr/bin since it's not a real path.
13776    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13777      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13778      # a path prefixed by /cygdrive for fixpath to work.
13779      new_path="$CYGWIN_ROOT_PATH$input_path"
13780    fi
13781  fi
13782
13783
13784  if test "x$path" != "x$new_path"; then
13785    BOOT_JDK="$new_path"
13786    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13787$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13788  fi
13789
13790  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13791
13792  path="$BOOT_JDK"
13793  has_colon=`$ECHO $path | $GREP ^.:`
13794  new_path="$path"
13795  if test "x$has_colon" = x; then
13796    # Not in mixed or Windows style, start by that.
13797    new_path=`cmd //c echo $path`
13798  fi
13799
13800
13801  input_path="$new_path"
13802  # Check if we need to convert this using DOS-style short mode. If the path
13803  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13804  # take no chances and rewrite it.
13805  # Note: m4 eats our [], so we need to use [ and ] instead.
13806  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13807  if test "x$has_forbidden_chars" != x; then
13808    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13809    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13810  fi
13811
13812
13813  windows_path="$new_path"
13814  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13815    unix_path=`$CYGPATH -u "$windows_path"`
13816    new_path="$unix_path"
13817  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13818    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13819    new_path="$unix_path"
13820  fi
13821
13822  if test "x$path" != "x$new_path"; then
13823    BOOT_JDK="$new_path"
13824    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13825$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13826  fi
13827
13828  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13829  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13830
13831  else
13832    # We're on a posix platform. Hooray! :)
13833    path="$BOOT_JDK"
13834    has_space=`$ECHO "$path" | $GREP " "`
13835    if test "x$has_space" != x; then
13836      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13837$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13838      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13839    fi
13840
13841    # Use eval to expand a potential ~
13842    eval path="$path"
13843    if test ! -f "$path" && test ! -d "$path"; then
13844      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13845    fi
13846
13847    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13848  fi
13849
13850              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13851$as_echo_n "checking for Boot JDK... " >&6; }
13852              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13853$as_echo "$BOOT_JDK" >&6; }
13854              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13855$as_echo_n "checking Boot JDK version... " >&6; }
13856              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13857              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13858$as_echo "$BOOT_JDK_VERSION" >&6; }
13859            fi # end check jdk version
13860          fi # end check rt.jar
13861        fi # end check javac
13862      fi # end check java
13863    fi # end check boot jdk found
13864  fi
13865
13866    done
13867  fi
13868
13869  fi
13870
13871
13872    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13873    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13874      # Do we have a bin/java?
13875      if test ! -x "$BOOT_JDK/bin/java"; then
13876        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13877$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13878        BOOT_JDK_FOUND=no
13879      else
13880        # Do we have a bin/javac?
13881        if test ! -x "$BOOT_JDK/bin/javac"; then
13882          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13883$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13884          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13885$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13886          BOOT_JDK_FOUND=no
13887        else
13888          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13889          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13890            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13891$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13892            BOOT_JDK_FOUND=no
13893          else
13894            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13895            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13896
13897            # Extra M4 quote needed to protect [] in grep expression.
13898            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13899            if test "x$FOUND_VERSION_78" = x; then
13900              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13901$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13902              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13903$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13904              BOOT_JDK_FOUND=no
13905            else
13906              # We're done! :-)
13907              BOOT_JDK_FOUND=yes
13908
13909  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13910
13911  # Input might be given as Windows format, start by converting to
13912  # unix format.
13913  path="$BOOT_JDK"
13914  new_path=`$CYGPATH -u "$path"`
13915
13916  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13917  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13918  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13919  # "foo.exe" is OK but "foo" is an error.
13920  #
13921  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13922  # It is also a way to make sure we got the proper file name for the real test later on.
13923  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13924  if test "x$test_shortpath" = x; then
13925    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13926$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13927    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13928  fi
13929
13930  # Call helper function which possibly converts this using DOS-style short mode.
13931  # If so, the updated path is stored in $new_path.
13932
13933  input_path="$new_path"
13934  # Check if we need to convert this using DOS-style short mode. If the path
13935  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13936  # take no chances and rewrite it.
13937  # Note: m4 eats our [], so we need to use [ and ] instead.
13938  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13939  if test "x$has_forbidden_chars" != x; then
13940    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13941    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13942    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13943    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13944      # Going to short mode and back again did indeed matter. Since short mode is
13945      # case insensitive, let's make it lowercase to improve readability.
13946      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13947      # Now convert it back to Unix-stile (cygpath)
13948      input_path=`$CYGPATH -u "$shortmode_path"`
13949      new_path="$input_path"
13950    fi
13951  fi
13952
13953  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13954  if test "x$test_cygdrive_prefix" = x; then
13955    # As a simple fix, exclude /usr/bin since it's not a real path.
13956    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13957      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13958      # a path prefixed by /cygdrive for fixpath to work.
13959      new_path="$CYGWIN_ROOT_PATH$input_path"
13960    fi
13961  fi
13962
13963
13964  if test "x$path" != "x$new_path"; then
13965    BOOT_JDK="$new_path"
13966    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13967$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13968  fi
13969
13970  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13971
13972  path="$BOOT_JDK"
13973  has_colon=`$ECHO $path | $GREP ^.:`
13974  new_path="$path"
13975  if test "x$has_colon" = x; then
13976    # Not in mixed or Windows style, start by that.
13977    new_path=`cmd //c echo $path`
13978  fi
13979
13980
13981  input_path="$new_path"
13982  # Check if we need to convert this using DOS-style short mode. If the path
13983  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13984  # take no chances and rewrite it.
13985  # Note: m4 eats our [], so we need to use [ and ] instead.
13986  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13987  if test "x$has_forbidden_chars" != x; then
13988    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13989    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13990  fi
13991
13992
13993  windows_path="$new_path"
13994  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13995    unix_path=`$CYGPATH -u "$windows_path"`
13996    new_path="$unix_path"
13997  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13998    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13999    new_path="$unix_path"
14000  fi
14001
14002  if test "x$path" != "x$new_path"; then
14003    BOOT_JDK="$new_path"
14004    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14005$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14006  fi
14007
14008  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14009  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14010
14011  else
14012    # We're on a posix platform. Hooray! :)
14013    path="$BOOT_JDK"
14014    has_space=`$ECHO "$path" | $GREP " "`
14015    if test "x$has_space" != x; then
14016      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14017$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14018      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14019    fi
14020
14021    # Use eval to expand a potential ~
14022    eval path="$path"
14023    if test ! -f "$path" && test ! -d "$path"; then
14024      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14025    fi
14026
14027    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14028  fi
14029
14030              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14031$as_echo_n "checking for Boot JDK... " >&6; }
14032              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14033$as_echo "$BOOT_JDK" >&6; }
14034              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14035$as_echo_n "checking Boot JDK version... " >&6; }
14036              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14037              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14038$as_echo "$BOOT_JDK_VERSION" >&6; }
14039            fi # end check jdk version
14040          fi # end check rt.jar
14041        fi # end check javac
14042      fi # end check java
14043    fi # end check boot jdk found
14044  fi
14045
14046
14047  if test "x$BOOT_JDK_FOUND" = xno; then
14048    # Now execute the test
14049
14050  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
14051  BOOT_JDK_SUFFIX=""
14052  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14053  if test "x$ALL_JDKS_FOUND" != x; then
14054    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14055
14056  if test "x$BOOT_JDK_FOUND" = xno; then
14057    # Now execute the test
14058
14059        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14060        if test -d "$BOOT_JDK"; then
14061          BOOT_JDK_FOUND=maybe
14062          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14063$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14064        fi
14065
14066
14067    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14068    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14069      # Do we have a bin/java?
14070      if test ! -x "$BOOT_JDK/bin/java"; then
14071        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14072$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14073        BOOT_JDK_FOUND=no
14074      else
14075        # Do we have a bin/javac?
14076        if test ! -x "$BOOT_JDK/bin/javac"; then
14077          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14078$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14079          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14080$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14081          BOOT_JDK_FOUND=no
14082        else
14083          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14084          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14085            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14086$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14087            BOOT_JDK_FOUND=no
14088          else
14089            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14090            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14091
14092            # Extra M4 quote needed to protect [] in grep expression.
14093            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14094            if test "x$FOUND_VERSION_78" = x; then
14095              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14096$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14097              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14098$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14099              BOOT_JDK_FOUND=no
14100            else
14101              # We're done! :-)
14102              BOOT_JDK_FOUND=yes
14103
14104  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14105
14106  # Input might be given as Windows format, start by converting to
14107  # unix format.
14108  path="$BOOT_JDK"
14109  new_path=`$CYGPATH -u "$path"`
14110
14111  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14112  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14113  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14114  # "foo.exe" is OK but "foo" is an error.
14115  #
14116  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14117  # It is also a way to make sure we got the proper file name for the real test later on.
14118  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14119  if test "x$test_shortpath" = x; then
14120    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14121$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14122    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14123  fi
14124
14125  # Call helper function which possibly converts this using DOS-style short mode.
14126  # If so, the updated path is stored in $new_path.
14127
14128  input_path="$new_path"
14129  # Check if we need to convert this using DOS-style short mode. If the path
14130  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14131  # take no chances and rewrite it.
14132  # Note: m4 eats our [], so we need to use [ and ] instead.
14133  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14134  if test "x$has_forbidden_chars" != x; then
14135    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14136    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14137    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14138    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14139      # Going to short mode and back again did indeed matter. Since short mode is
14140      # case insensitive, let's make it lowercase to improve readability.
14141      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14142      # Now convert it back to Unix-stile (cygpath)
14143      input_path=`$CYGPATH -u "$shortmode_path"`
14144      new_path="$input_path"
14145    fi
14146  fi
14147
14148  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14149  if test "x$test_cygdrive_prefix" = x; then
14150    # As a simple fix, exclude /usr/bin since it's not a real path.
14151    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14152      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14153      # a path prefixed by /cygdrive for fixpath to work.
14154      new_path="$CYGWIN_ROOT_PATH$input_path"
14155    fi
14156  fi
14157
14158
14159  if test "x$path" != "x$new_path"; then
14160    BOOT_JDK="$new_path"
14161    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14162$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14163  fi
14164
14165  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14166
14167  path="$BOOT_JDK"
14168  has_colon=`$ECHO $path | $GREP ^.:`
14169  new_path="$path"
14170  if test "x$has_colon" = x; then
14171    # Not in mixed or Windows style, start by that.
14172    new_path=`cmd //c echo $path`
14173  fi
14174
14175
14176  input_path="$new_path"
14177  # Check if we need to convert this using DOS-style short mode. If the path
14178  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14179  # take no chances and rewrite it.
14180  # Note: m4 eats our [], so we need to use [ and ] instead.
14181  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14182  if test "x$has_forbidden_chars" != x; then
14183    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14184    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14185  fi
14186
14187
14188  windows_path="$new_path"
14189  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14190    unix_path=`$CYGPATH -u "$windows_path"`
14191    new_path="$unix_path"
14192  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14193    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14194    new_path="$unix_path"
14195  fi
14196
14197  if test "x$path" != "x$new_path"; then
14198    BOOT_JDK="$new_path"
14199    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14200$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14201  fi
14202
14203  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14204  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14205
14206  else
14207    # We're on a posix platform. Hooray! :)
14208    path="$BOOT_JDK"
14209    has_space=`$ECHO "$path" | $GREP " "`
14210    if test "x$has_space" != x; then
14211      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14212$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14213      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14214    fi
14215
14216    # Use eval to expand a potential ~
14217    eval path="$path"
14218    if test ! -f "$path" && test ! -d "$path"; then
14219      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14220    fi
14221
14222    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14223  fi
14224
14225              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14226$as_echo_n "checking for Boot JDK... " >&6; }
14227              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14228$as_echo "$BOOT_JDK" >&6; }
14229              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14230$as_echo_n "checking Boot JDK version... " >&6; }
14231              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14232              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14233$as_echo "$BOOT_JDK_VERSION" >&6; }
14234            fi # end check jdk version
14235          fi # end check rt.jar
14236        fi # end check javac
14237      fi # end check java
14238    fi # end check boot jdk found
14239  fi
14240
14241    done
14242  fi
14243
14244
14245    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14246    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14247      # Do we have a bin/java?
14248      if test ! -x "$BOOT_JDK/bin/java"; then
14249        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14250$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14251        BOOT_JDK_FOUND=no
14252      else
14253        # Do we have a bin/javac?
14254        if test ! -x "$BOOT_JDK/bin/javac"; then
14255          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14256$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14257          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14258$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14259          BOOT_JDK_FOUND=no
14260        else
14261          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14262          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14263            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14264$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14265            BOOT_JDK_FOUND=no
14266          else
14267            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14268            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14269
14270            # Extra M4 quote needed to protect [] in grep expression.
14271            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14272            if test "x$FOUND_VERSION_78" = x; then
14273              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14274$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14275              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14276$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14277              BOOT_JDK_FOUND=no
14278            else
14279              # We're done! :-)
14280              BOOT_JDK_FOUND=yes
14281
14282  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14283
14284  # Input might be given as Windows format, start by converting to
14285  # unix format.
14286  path="$BOOT_JDK"
14287  new_path=`$CYGPATH -u "$path"`
14288
14289  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14290  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14291  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14292  # "foo.exe" is OK but "foo" is an error.
14293  #
14294  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14295  # It is also a way to make sure we got the proper file name for the real test later on.
14296  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14297  if test "x$test_shortpath" = x; then
14298    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14299$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14300    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14301  fi
14302
14303  # Call helper function which possibly converts this using DOS-style short mode.
14304  # If so, the updated path is stored in $new_path.
14305
14306  input_path="$new_path"
14307  # Check if we need to convert this using DOS-style short mode. If the path
14308  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14309  # take no chances and rewrite it.
14310  # Note: m4 eats our [], so we need to use [ and ] instead.
14311  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14312  if test "x$has_forbidden_chars" != x; then
14313    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14314    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14315    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14316    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14317      # Going to short mode and back again did indeed matter. Since short mode is
14318      # case insensitive, let's make it lowercase to improve readability.
14319      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14320      # Now convert it back to Unix-stile (cygpath)
14321      input_path=`$CYGPATH -u "$shortmode_path"`
14322      new_path="$input_path"
14323    fi
14324  fi
14325
14326  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14327  if test "x$test_cygdrive_prefix" = x; then
14328    # As a simple fix, exclude /usr/bin since it's not a real path.
14329    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14330      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14331      # a path prefixed by /cygdrive for fixpath to work.
14332      new_path="$CYGWIN_ROOT_PATH$input_path"
14333    fi
14334  fi
14335
14336
14337  if test "x$path" != "x$new_path"; then
14338    BOOT_JDK="$new_path"
14339    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14340$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14341  fi
14342
14343  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14344
14345  path="$BOOT_JDK"
14346  has_colon=`$ECHO $path | $GREP ^.:`
14347  new_path="$path"
14348  if test "x$has_colon" = x; then
14349    # Not in mixed or Windows style, start by that.
14350    new_path=`cmd //c echo $path`
14351  fi
14352
14353
14354  input_path="$new_path"
14355  # Check if we need to convert this using DOS-style short mode. If the path
14356  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14357  # take no chances and rewrite it.
14358  # Note: m4 eats our [], so we need to use [ and ] instead.
14359  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14360  if test "x$has_forbidden_chars" != x; then
14361    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14362    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14363  fi
14364
14365
14366  windows_path="$new_path"
14367  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14368    unix_path=`$CYGPATH -u "$windows_path"`
14369    new_path="$unix_path"
14370  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14371    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14372    new_path="$unix_path"
14373  fi
14374
14375  if test "x$path" != "x$new_path"; then
14376    BOOT_JDK="$new_path"
14377    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14378$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14379  fi
14380
14381  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14382  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14383
14384  else
14385    # We're on a posix platform. Hooray! :)
14386    path="$BOOT_JDK"
14387    has_space=`$ECHO "$path" | $GREP " "`
14388    if test "x$has_space" != x; then
14389      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14390$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14391      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14392    fi
14393
14394    # Use eval to expand a potential ~
14395    eval path="$path"
14396    if test ! -f "$path" && test ! -d "$path"; then
14397      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14398    fi
14399
14400    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14401  fi
14402
14403              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14404$as_echo_n "checking for Boot JDK... " >&6; }
14405              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14406$as_echo "$BOOT_JDK" >&6; }
14407              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14408$as_echo_n "checking Boot JDK version... " >&6; }
14409              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14410              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14411$as_echo "$BOOT_JDK_VERSION" >&6; }
14412            fi # end check jdk version
14413          fi # end check rt.jar
14414        fi # end check javac
14415      fi # end check java
14416    fi # end check boot jdk found
14417  fi
14418
14419  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
14420
14421  if test "x$BOOT_JDK_FOUND" = xno; then
14422    # Now execute the test
14423
14424  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
14425  BOOT_JDK_SUFFIX="/Contents/Home"
14426  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14427  if test "x$ALL_JDKS_FOUND" != x; then
14428    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14429
14430  if test "x$BOOT_JDK_FOUND" = xno; then
14431    # Now execute the test
14432
14433        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14434        if test -d "$BOOT_JDK"; then
14435          BOOT_JDK_FOUND=maybe
14436          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14437$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14438        fi
14439
14440
14441    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14442    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14443      # Do we have a bin/java?
14444      if test ! -x "$BOOT_JDK/bin/java"; then
14445        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14446$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14447        BOOT_JDK_FOUND=no
14448      else
14449        # Do we have a bin/javac?
14450        if test ! -x "$BOOT_JDK/bin/javac"; then
14451          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14452$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14453          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14454$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14455          BOOT_JDK_FOUND=no
14456        else
14457          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14458          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14459            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14460$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14461            BOOT_JDK_FOUND=no
14462          else
14463            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14464            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14465
14466            # Extra M4 quote needed to protect [] in grep expression.
14467            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14468            if test "x$FOUND_VERSION_78" = x; then
14469              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14470$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14471              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14472$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14473              BOOT_JDK_FOUND=no
14474            else
14475              # We're done! :-)
14476              BOOT_JDK_FOUND=yes
14477
14478  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14479
14480  # Input might be given as Windows format, start by converting to
14481  # unix format.
14482  path="$BOOT_JDK"
14483  new_path=`$CYGPATH -u "$path"`
14484
14485  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14486  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14487  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14488  # "foo.exe" is OK but "foo" is an error.
14489  #
14490  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14491  # It is also a way to make sure we got the proper file name for the real test later on.
14492  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14493  if test "x$test_shortpath" = x; then
14494    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14495$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14496    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14497  fi
14498
14499  # Call helper function which possibly converts this using DOS-style short mode.
14500  # If so, the updated path is stored in $new_path.
14501
14502  input_path="$new_path"
14503  # Check if we need to convert this using DOS-style short mode. If the path
14504  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14505  # take no chances and rewrite it.
14506  # Note: m4 eats our [], so we need to use [ and ] instead.
14507  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14508  if test "x$has_forbidden_chars" != x; then
14509    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14510    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14511    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14512    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14513      # Going to short mode and back again did indeed matter. Since short mode is
14514      # case insensitive, let's make it lowercase to improve readability.
14515      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14516      # Now convert it back to Unix-stile (cygpath)
14517      input_path=`$CYGPATH -u "$shortmode_path"`
14518      new_path="$input_path"
14519    fi
14520  fi
14521
14522  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14523  if test "x$test_cygdrive_prefix" = x; then
14524    # As a simple fix, exclude /usr/bin since it's not a real path.
14525    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14526      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14527      # a path prefixed by /cygdrive for fixpath to work.
14528      new_path="$CYGWIN_ROOT_PATH$input_path"
14529    fi
14530  fi
14531
14532
14533  if test "x$path" != "x$new_path"; then
14534    BOOT_JDK="$new_path"
14535    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14536$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14537  fi
14538
14539  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14540
14541  path="$BOOT_JDK"
14542  has_colon=`$ECHO $path | $GREP ^.:`
14543  new_path="$path"
14544  if test "x$has_colon" = x; then
14545    # Not in mixed or Windows style, start by that.
14546    new_path=`cmd //c echo $path`
14547  fi
14548
14549
14550  input_path="$new_path"
14551  # Check if we need to convert this using DOS-style short mode. If the path
14552  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14553  # take no chances and rewrite it.
14554  # Note: m4 eats our [], so we need to use [ and ] instead.
14555  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14556  if test "x$has_forbidden_chars" != x; then
14557    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14558    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14559  fi
14560
14561
14562  windows_path="$new_path"
14563  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14564    unix_path=`$CYGPATH -u "$windows_path"`
14565    new_path="$unix_path"
14566  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14567    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14568    new_path="$unix_path"
14569  fi
14570
14571  if test "x$path" != "x$new_path"; then
14572    BOOT_JDK="$new_path"
14573    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14574$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14575  fi
14576
14577  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14578  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14579
14580  else
14581    # We're on a posix platform. Hooray! :)
14582    path="$BOOT_JDK"
14583    has_space=`$ECHO "$path" | $GREP " "`
14584    if test "x$has_space" != x; then
14585      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14586$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14587      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14588    fi
14589
14590    # Use eval to expand a potential ~
14591    eval path="$path"
14592    if test ! -f "$path" && test ! -d "$path"; then
14593      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14594    fi
14595
14596    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14597  fi
14598
14599              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14600$as_echo_n "checking for Boot JDK... " >&6; }
14601              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14602$as_echo "$BOOT_JDK" >&6; }
14603              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14604$as_echo_n "checking Boot JDK version... " >&6; }
14605              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14606              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14607$as_echo "$BOOT_JDK_VERSION" >&6; }
14608            fi # end check jdk version
14609          fi # end check rt.jar
14610        fi # end check javac
14611      fi # end check java
14612    fi # end check boot jdk found
14613  fi
14614
14615    done
14616  fi
14617
14618
14619    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14620    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14621      # Do we have a bin/java?
14622      if test ! -x "$BOOT_JDK/bin/java"; then
14623        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14624$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14625        BOOT_JDK_FOUND=no
14626      else
14627        # Do we have a bin/javac?
14628        if test ! -x "$BOOT_JDK/bin/javac"; then
14629          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14630$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14631          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14632$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14633          BOOT_JDK_FOUND=no
14634        else
14635          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14636          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14637            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14638$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14639            BOOT_JDK_FOUND=no
14640          else
14641            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14642            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14643
14644            # Extra M4 quote needed to protect [] in grep expression.
14645            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14646            if test "x$FOUND_VERSION_78" = x; then
14647              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14648$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14649              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14650$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14651              BOOT_JDK_FOUND=no
14652            else
14653              # We're done! :-)
14654              BOOT_JDK_FOUND=yes
14655
14656  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14657
14658  # Input might be given as Windows format, start by converting to
14659  # unix format.
14660  path="$BOOT_JDK"
14661  new_path=`$CYGPATH -u "$path"`
14662
14663  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14664  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14665  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14666  # "foo.exe" is OK but "foo" is an error.
14667  #
14668  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14669  # It is also a way to make sure we got the proper file name for the real test later on.
14670  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14671  if test "x$test_shortpath" = x; then
14672    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14673$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14674    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14675  fi
14676
14677  # Call helper function which possibly converts this using DOS-style short mode.
14678  # If so, the updated path is stored in $new_path.
14679
14680  input_path="$new_path"
14681  # Check if we need to convert this using DOS-style short mode. If the path
14682  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14683  # take no chances and rewrite it.
14684  # Note: m4 eats our [], so we need to use [ and ] instead.
14685  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14686  if test "x$has_forbidden_chars" != x; then
14687    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14688    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14689    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14690    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14691      # Going to short mode and back again did indeed matter. Since short mode is
14692      # case insensitive, let's make it lowercase to improve readability.
14693      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14694      # Now convert it back to Unix-stile (cygpath)
14695      input_path=`$CYGPATH -u "$shortmode_path"`
14696      new_path="$input_path"
14697    fi
14698  fi
14699
14700  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14701  if test "x$test_cygdrive_prefix" = x; then
14702    # As a simple fix, exclude /usr/bin since it's not a real path.
14703    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14704      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14705      # a path prefixed by /cygdrive for fixpath to work.
14706      new_path="$CYGWIN_ROOT_PATH$input_path"
14707    fi
14708  fi
14709
14710
14711  if test "x$path" != "x$new_path"; then
14712    BOOT_JDK="$new_path"
14713    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14714$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14715  fi
14716
14717  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14718
14719  path="$BOOT_JDK"
14720  has_colon=`$ECHO $path | $GREP ^.:`
14721  new_path="$path"
14722  if test "x$has_colon" = x; then
14723    # Not in mixed or Windows style, start by that.
14724    new_path=`cmd //c echo $path`
14725  fi
14726
14727
14728  input_path="$new_path"
14729  # Check if we need to convert this using DOS-style short mode. If the path
14730  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14731  # take no chances and rewrite it.
14732  # Note: m4 eats our [], so we need to use [ and ] instead.
14733  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14734  if test "x$has_forbidden_chars" != x; then
14735    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14736    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14737  fi
14738
14739
14740  windows_path="$new_path"
14741  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14742    unix_path=`$CYGPATH -u "$windows_path"`
14743    new_path="$unix_path"
14744  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14745    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14746    new_path="$unix_path"
14747  fi
14748
14749  if test "x$path" != "x$new_path"; then
14750    BOOT_JDK="$new_path"
14751    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14752$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14753  fi
14754
14755  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14756  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14757
14758  else
14759    # We're on a posix platform. Hooray! :)
14760    path="$BOOT_JDK"
14761    has_space=`$ECHO "$path" | $GREP " "`
14762    if test "x$has_space" != x; then
14763      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14764$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14765      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14766    fi
14767
14768    # Use eval to expand a potential ~
14769    eval path="$path"
14770    if test ! -f "$path" && test ! -d "$path"; then
14771      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14772    fi
14773
14774    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14775  fi
14776
14777              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14778$as_echo_n "checking for Boot JDK... " >&6; }
14779              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14780$as_echo "$BOOT_JDK" >&6; }
14781              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14782$as_echo_n "checking Boot JDK version... " >&6; }
14783              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14784              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14785$as_echo "$BOOT_JDK_VERSION" >&6; }
14786            fi # end check jdk version
14787          fi # end check rt.jar
14788        fi # end check javac
14789      fi # end check java
14790    fi # end check boot jdk found
14791  fi
14792
14793
14794  if test "x$BOOT_JDK_FOUND" = xno; then
14795    # Now execute the test
14796
14797  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
14798  BOOT_JDK_SUFFIX="/Contents/Home"
14799  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14800  if test "x$ALL_JDKS_FOUND" != x; then
14801    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14802
14803  if test "x$BOOT_JDK_FOUND" = xno; then
14804    # Now execute the test
14805
14806        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14807        if test -d "$BOOT_JDK"; then
14808          BOOT_JDK_FOUND=maybe
14809          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14810$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14811        fi
14812
14813
14814    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14815    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14816      # Do we have a bin/java?
14817      if test ! -x "$BOOT_JDK/bin/java"; then
14818        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14819$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14820        BOOT_JDK_FOUND=no
14821      else
14822        # Do we have a bin/javac?
14823        if test ! -x "$BOOT_JDK/bin/javac"; then
14824          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14825$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14826          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14827$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14828          BOOT_JDK_FOUND=no
14829        else
14830          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14831          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14832            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14833$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14834            BOOT_JDK_FOUND=no
14835          else
14836            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14837            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14838
14839            # Extra M4 quote needed to protect [] in grep expression.
14840            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14841            if test "x$FOUND_VERSION_78" = x; then
14842              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14843$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14844              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14845$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14846              BOOT_JDK_FOUND=no
14847            else
14848              # We're done! :-)
14849              BOOT_JDK_FOUND=yes
14850
14851  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14852
14853  # Input might be given as Windows format, start by converting to
14854  # unix format.
14855  path="$BOOT_JDK"
14856  new_path=`$CYGPATH -u "$path"`
14857
14858  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14859  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14860  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14861  # "foo.exe" is OK but "foo" is an error.
14862  #
14863  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14864  # It is also a way to make sure we got the proper file name for the real test later on.
14865  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14866  if test "x$test_shortpath" = x; then
14867    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14868$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14869    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14870  fi
14871
14872  # Call helper function which possibly converts this using DOS-style short mode.
14873  # If so, the updated path is stored in $new_path.
14874
14875  input_path="$new_path"
14876  # Check if we need to convert this using DOS-style short mode. If the path
14877  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14878  # take no chances and rewrite it.
14879  # Note: m4 eats our [], so we need to use [ and ] instead.
14880  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14881  if test "x$has_forbidden_chars" != x; then
14882    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14883    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14884    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14885    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14886      # Going to short mode and back again did indeed matter. Since short mode is
14887      # case insensitive, let's make it lowercase to improve readability.
14888      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14889      # Now convert it back to Unix-stile (cygpath)
14890      input_path=`$CYGPATH -u "$shortmode_path"`
14891      new_path="$input_path"
14892    fi
14893  fi
14894
14895  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14896  if test "x$test_cygdrive_prefix" = x; then
14897    # As a simple fix, exclude /usr/bin since it's not a real path.
14898    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14899      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14900      # a path prefixed by /cygdrive for fixpath to work.
14901      new_path="$CYGWIN_ROOT_PATH$input_path"
14902    fi
14903  fi
14904
14905
14906  if test "x$path" != "x$new_path"; then
14907    BOOT_JDK="$new_path"
14908    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14909$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14910  fi
14911
14912  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14913
14914  path="$BOOT_JDK"
14915  has_colon=`$ECHO $path | $GREP ^.:`
14916  new_path="$path"
14917  if test "x$has_colon" = x; then
14918    # Not in mixed or Windows style, start by that.
14919    new_path=`cmd //c echo $path`
14920  fi
14921
14922
14923  input_path="$new_path"
14924  # Check if we need to convert this using DOS-style short mode. If the path
14925  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14926  # take no chances and rewrite it.
14927  # Note: m4 eats our [], so we need to use [ and ] instead.
14928  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14929  if test "x$has_forbidden_chars" != x; then
14930    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14931    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14932  fi
14933
14934
14935  windows_path="$new_path"
14936  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14937    unix_path=`$CYGPATH -u "$windows_path"`
14938    new_path="$unix_path"
14939  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14940    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14941    new_path="$unix_path"
14942  fi
14943
14944  if test "x$path" != "x$new_path"; then
14945    BOOT_JDK="$new_path"
14946    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14947$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14948  fi
14949
14950  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14951  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14952
14953  else
14954    # We're on a posix platform. Hooray! :)
14955    path="$BOOT_JDK"
14956    has_space=`$ECHO "$path" | $GREP " "`
14957    if test "x$has_space" != x; then
14958      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14959$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14960      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14961    fi
14962
14963    # Use eval to expand a potential ~
14964    eval path="$path"
14965    if test ! -f "$path" && test ! -d "$path"; then
14966      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14967    fi
14968
14969    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14970  fi
14971
14972              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14973$as_echo_n "checking for Boot JDK... " >&6; }
14974              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14975$as_echo "$BOOT_JDK" >&6; }
14976              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14977$as_echo_n "checking Boot JDK version... " >&6; }
14978              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14979              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14980$as_echo "$BOOT_JDK_VERSION" >&6; }
14981            fi # end check jdk version
14982          fi # end check rt.jar
14983        fi # end check javac
14984      fi # end check java
14985    fi # end check boot jdk found
14986  fi
14987
14988    done
14989  fi
14990
14991
14992    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14993    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14994      # Do we have a bin/java?
14995      if test ! -x "$BOOT_JDK/bin/java"; then
14996        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14997$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14998        BOOT_JDK_FOUND=no
14999      else
15000        # Do we have a bin/javac?
15001        if test ! -x "$BOOT_JDK/bin/javac"; then
15002          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15003$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15004          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15005$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15006          BOOT_JDK_FOUND=no
15007        else
15008          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15009          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15010            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15011$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15012            BOOT_JDK_FOUND=no
15013          else
15014            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15015            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15016
15017            # Extra M4 quote needed to protect [] in grep expression.
15018            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15019            if test "x$FOUND_VERSION_78" = x; then
15020              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15021$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15022              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15023$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15024              BOOT_JDK_FOUND=no
15025            else
15026              # We're done! :-)
15027              BOOT_JDK_FOUND=yes
15028
15029  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15030
15031  # Input might be given as Windows format, start by converting to
15032  # unix format.
15033  path="$BOOT_JDK"
15034  new_path=`$CYGPATH -u "$path"`
15035
15036  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15037  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15038  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15039  # "foo.exe" is OK but "foo" is an error.
15040  #
15041  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15042  # It is also a way to make sure we got the proper file name for the real test later on.
15043  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15044  if test "x$test_shortpath" = x; then
15045    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15046$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15047    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15048  fi
15049
15050  # Call helper function which possibly converts this using DOS-style short mode.
15051  # If so, the updated path is stored in $new_path.
15052
15053  input_path="$new_path"
15054  # Check if we need to convert this using DOS-style short mode. If the path
15055  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15056  # take no chances and rewrite it.
15057  # Note: m4 eats our [], so we need to use [ and ] instead.
15058  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15059  if test "x$has_forbidden_chars" != x; then
15060    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15061    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15062    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15063    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15064      # Going to short mode and back again did indeed matter. Since short mode is
15065      # case insensitive, let's make it lowercase to improve readability.
15066      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15067      # Now convert it back to Unix-stile (cygpath)
15068      input_path=`$CYGPATH -u "$shortmode_path"`
15069      new_path="$input_path"
15070    fi
15071  fi
15072
15073  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15074  if test "x$test_cygdrive_prefix" = x; then
15075    # As a simple fix, exclude /usr/bin since it's not a real path.
15076    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15077      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15078      # a path prefixed by /cygdrive for fixpath to work.
15079      new_path="$CYGWIN_ROOT_PATH$input_path"
15080    fi
15081  fi
15082
15083
15084  if test "x$path" != "x$new_path"; then
15085    BOOT_JDK="$new_path"
15086    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15087$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15088  fi
15089
15090  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15091
15092  path="$BOOT_JDK"
15093  has_colon=`$ECHO $path | $GREP ^.:`
15094  new_path="$path"
15095  if test "x$has_colon" = x; then
15096    # Not in mixed or Windows style, start by that.
15097    new_path=`cmd //c echo $path`
15098  fi
15099
15100
15101  input_path="$new_path"
15102  # Check if we need to convert this using DOS-style short mode. If the path
15103  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15104  # take no chances and rewrite it.
15105  # Note: m4 eats our [], so we need to use [ and ] instead.
15106  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15107  if test "x$has_forbidden_chars" != x; then
15108    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15109    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15110  fi
15111
15112
15113  windows_path="$new_path"
15114  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15115    unix_path=`$CYGPATH -u "$windows_path"`
15116    new_path="$unix_path"
15117  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15118    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15119    new_path="$unix_path"
15120  fi
15121
15122  if test "x$path" != "x$new_path"; then
15123    BOOT_JDK="$new_path"
15124    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15125$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15126  fi
15127
15128  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15129  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15130
15131  else
15132    # We're on a posix platform. Hooray! :)
15133    path="$BOOT_JDK"
15134    has_space=`$ECHO "$path" | $GREP " "`
15135    if test "x$has_space" != x; then
15136      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15137$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15138      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15139    fi
15140
15141    # Use eval to expand a potential ~
15142    eval path="$path"
15143    if test ! -f "$path" && test ! -d "$path"; then
15144      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15145    fi
15146
15147    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
15148  fi
15149
15150              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15151$as_echo_n "checking for Boot JDK... " >&6; }
15152              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15153$as_echo "$BOOT_JDK" >&6; }
15154              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15155$as_echo_n "checking Boot JDK version... " >&6; }
15156              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15157              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15158$as_echo "$BOOT_JDK_VERSION" >&6; }
15159            fi # end check jdk version
15160          fi # end check rt.jar
15161        fi # end check javac
15162      fi # end check java
15163    fi # end check boot jdk found
15164  fi
15165
15166  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
15167
15168  if test "x$BOOT_JDK_FOUND" = xno; then
15169    # Now execute the test
15170
15171  BOOT_JDK_PREFIX="/usr/lib/jvm"
15172  BOOT_JDK_SUFFIX=""
15173  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
15174  if test "x$ALL_JDKS_FOUND" != x; then
15175    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
15176
15177  if test "x$BOOT_JDK_FOUND" = xno; then
15178    # Now execute the test
15179
15180        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
15181        if test -d "$BOOT_JDK"; then
15182          BOOT_JDK_FOUND=maybe
15183          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
15184$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
15185        fi
15186
15187
15188    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15189    if test "x$BOOT_JDK_FOUND" = xmaybe; then
15190      # Do we have a bin/java?
15191      if test ! -x "$BOOT_JDK/bin/java"; then
15192        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15193$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15194        BOOT_JDK_FOUND=no
15195      else
15196        # Do we have a bin/javac?
15197        if test ! -x "$BOOT_JDK/bin/javac"; then
15198          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15199$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15200          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15201$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15202          BOOT_JDK_FOUND=no
15203        else
15204          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15205          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15206            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15207$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15208            BOOT_JDK_FOUND=no
15209          else
15210            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15211            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15212
15213            # Extra M4 quote needed to protect [] in grep expression.
15214            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15215            if test "x$FOUND_VERSION_78" = x; then
15216              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15217$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15218              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15219$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15220              BOOT_JDK_FOUND=no
15221            else
15222              # We're done! :-)
15223              BOOT_JDK_FOUND=yes
15224
15225  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15226
15227  # Input might be given as Windows format, start by converting to
15228  # unix format.
15229  path="$BOOT_JDK"
15230  new_path=`$CYGPATH -u "$path"`
15231
15232  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15233  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15234  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15235  # "foo.exe" is OK but "foo" is an error.
15236  #
15237  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15238  # It is also a way to make sure we got the proper file name for the real test later on.
15239  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15240  if test "x$test_shortpath" = x; then
15241    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15242$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15243    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15244  fi
15245
15246  # Call helper function which possibly converts this using DOS-style short mode.
15247  # If so, the updated path is stored in $new_path.
15248
15249  input_path="$new_path"
15250  # Check if we need to convert this using DOS-style short mode. If the path
15251  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15252  # take no chances and rewrite it.
15253  # Note: m4 eats our [], so we need to use [ and ] instead.
15254  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15255  if test "x$has_forbidden_chars" != x; then
15256    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15257    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15258    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15259    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15260      # Going to short mode and back again did indeed matter. Since short mode is
15261      # case insensitive, let's make it lowercase to improve readability.
15262      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15263      # Now convert it back to Unix-stile (cygpath)
15264      input_path=`$CYGPATH -u "$shortmode_path"`
15265      new_path="$input_path"
15266    fi
15267  fi
15268
15269  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15270  if test "x$test_cygdrive_prefix" = x; then
15271    # As a simple fix, exclude /usr/bin since it's not a real path.
15272    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15273      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15274      # a path prefixed by /cygdrive for fixpath to work.
15275      new_path="$CYGWIN_ROOT_PATH$input_path"
15276    fi
15277  fi
15278
15279
15280  if test "x$path" != "x$new_path"; then
15281    BOOT_JDK="$new_path"
15282    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15283$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15284  fi
15285
15286  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15287
15288  path="$BOOT_JDK"
15289  has_colon=`$ECHO $path | $GREP ^.:`
15290  new_path="$path"
15291  if test "x$has_colon" = x; then
15292    # Not in mixed or Windows style, start by that.
15293    new_path=`cmd //c echo $path`
15294  fi
15295
15296
15297  input_path="$new_path"
15298  # Check if we need to convert this using DOS-style short mode. If the path
15299  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15300  # take no chances and rewrite it.
15301  # Note: m4 eats our [], so we need to use [ and ] instead.
15302  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15303  if test "x$has_forbidden_chars" != x; then
15304    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15305    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15306  fi
15307
15308
15309  windows_path="$new_path"
15310  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15311    unix_path=`$CYGPATH -u "$windows_path"`
15312    new_path="$unix_path"
15313  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15314    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15315    new_path="$unix_path"
15316  fi
15317
15318  if test "x$path" != "x$new_path"; then
15319    BOOT_JDK="$new_path"
15320    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15321$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15322  fi
15323
15324  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15325  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15326
15327  else
15328    # We're on a posix platform. Hooray! :)
15329    path="$BOOT_JDK"
15330    has_space=`$ECHO "$path" | $GREP " "`
15331    if test "x$has_space" != x; then
15332      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15333$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15334      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15335    fi
15336
15337    # Use eval to expand a potential ~
15338    eval path="$path"
15339    if test ! -f "$path" && test ! -d "$path"; then
15340      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15341    fi
15342
15343    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
15344  fi
15345
15346              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15347$as_echo_n "checking for Boot JDK... " >&6; }
15348              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15349$as_echo "$BOOT_JDK" >&6; }
15350              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15351$as_echo_n "checking Boot JDK version... " >&6; }
15352              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15353              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15354$as_echo "$BOOT_JDK_VERSION" >&6; }
15355            fi # end check jdk version
15356          fi # end check rt.jar
15357        fi # end check javac
15358      fi # end check java
15359    fi # end check boot jdk found
15360  fi
15361
15362    done
15363  fi
15364
15365
15366    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15367    if test "x$BOOT_JDK_FOUND" = xmaybe; then
15368      # Do we have a bin/java?
15369      if test ! -x "$BOOT_JDK/bin/java"; then
15370        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15371$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15372        BOOT_JDK_FOUND=no
15373      else
15374        # Do we have a bin/javac?
15375        if test ! -x "$BOOT_JDK/bin/javac"; then
15376          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15377$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15378          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15379$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15380          BOOT_JDK_FOUND=no
15381        else
15382          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15383          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15384            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15385$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15386            BOOT_JDK_FOUND=no
15387          else
15388            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15389            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15390
15391            # Extra M4 quote needed to protect [] in grep expression.
15392            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15393            if test "x$FOUND_VERSION_78" = x; then
15394              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15395$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15396              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15397$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15398              BOOT_JDK_FOUND=no
15399            else
15400              # We're done! :-)
15401              BOOT_JDK_FOUND=yes
15402
15403  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15404
15405  # Input might be given as Windows format, start by converting to
15406  # unix format.
15407  path="$BOOT_JDK"
15408  new_path=`$CYGPATH -u "$path"`
15409
15410  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15411  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15412  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15413  # "foo.exe" is OK but "foo" is an error.
15414  #
15415  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15416  # It is also a way to make sure we got the proper file name for the real test later on.
15417  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15418  if test "x$test_shortpath" = x; then
15419    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15420$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15421    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15422  fi
15423
15424  # Call helper function which possibly converts this using DOS-style short mode.
15425  # If so, the updated path is stored in $new_path.
15426
15427  input_path="$new_path"
15428  # Check if we need to convert this using DOS-style short mode. If the path
15429  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15430  # take no chances and rewrite it.
15431  # Note: m4 eats our [], so we need to use [ and ] instead.
15432  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15433  if test "x$has_forbidden_chars" != x; then
15434    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15435    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15436    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15437    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15438      # Going to short mode and back again did indeed matter. Since short mode is
15439      # case insensitive, let's make it lowercase to improve readability.
15440      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15441      # Now convert it back to Unix-stile (cygpath)
15442      input_path=`$CYGPATH -u "$shortmode_path"`
15443      new_path="$input_path"
15444    fi
15445  fi
15446
15447  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15448  if test "x$test_cygdrive_prefix" = x; then
15449    # As a simple fix, exclude /usr/bin since it's not a real path.
15450    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15451      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15452      # a path prefixed by /cygdrive for fixpath to work.
15453      new_path="$CYGWIN_ROOT_PATH$input_path"
15454    fi
15455  fi
15456
15457
15458  if test "x$path" != "x$new_path"; then
15459    BOOT_JDK="$new_path"
15460    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15461$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15462  fi
15463
15464  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15465
15466  path="$BOOT_JDK"
15467  has_colon=`$ECHO $path | $GREP ^.:`
15468  new_path="$path"
15469  if test "x$has_colon" = x; then
15470    # Not in mixed or Windows style, start by that.
15471    new_path=`cmd //c echo $path`
15472  fi
15473
15474
15475  input_path="$new_path"
15476  # Check if we need to convert this using DOS-style short mode. If the path
15477  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15478  # take no chances and rewrite it.
15479  # Note: m4 eats our [], so we need to use [ and ] instead.
15480  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15481  if test "x$has_forbidden_chars" != x; then
15482    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15483    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15484  fi
15485
15486
15487  windows_path="$new_path"
15488  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15489    unix_path=`$CYGPATH -u "$windows_path"`
15490    new_path="$unix_path"
15491  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15492    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15493    new_path="$unix_path"
15494  fi
15495
15496  if test "x$path" != "x$new_path"; then
15497    BOOT_JDK="$new_path"
15498    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15499$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15500  fi
15501
15502  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15503  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15504
15505  else
15506    # We're on a posix platform. Hooray! :)
15507    path="$BOOT_JDK"
15508    has_space=`$ECHO "$path" | $GREP " "`
15509    if test "x$has_space" != x; then
15510      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15511$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15512      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15513    fi
15514
15515    # Use eval to expand a potential ~
15516    eval path="$path"
15517    if test ! -f "$path" && test ! -d "$path"; then
15518      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15519    fi
15520
15521    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
15522  fi
15523
15524              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15525$as_echo_n "checking for Boot JDK... " >&6; }
15526              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15527$as_echo "$BOOT_JDK" >&6; }
15528              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15529$as_echo_n "checking Boot JDK version... " >&6; }
15530              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15531              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15532$as_echo "$BOOT_JDK_VERSION" >&6; }
15533            fi # end check jdk version
15534          fi # end check rt.jar
15535        fi # end check javac
15536      fi # end check java
15537    fi # end check boot jdk found
15538  fi
15539
15540  fi
15541
15542
15543    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15544    if test "x$BOOT_JDK_FOUND" = xmaybe; then
15545      # Do we have a bin/java?
15546      if test ! -x "$BOOT_JDK/bin/java"; then
15547        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15548$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15549        BOOT_JDK_FOUND=no
15550      else
15551        # Do we have a bin/javac?
15552        if test ! -x "$BOOT_JDK/bin/javac"; then
15553          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15554$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15555          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15556$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15557          BOOT_JDK_FOUND=no
15558        else
15559          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15560          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15561            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15562$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15563            BOOT_JDK_FOUND=no
15564          else
15565            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15566            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15567
15568            # Extra M4 quote needed to protect [] in grep expression.
15569            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15570            if test "x$FOUND_VERSION_78" = x; then
15571              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15572$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15573              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15574$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15575              BOOT_JDK_FOUND=no
15576            else
15577              # We're done! :-)
15578              BOOT_JDK_FOUND=yes
15579
15580  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15581
15582  # Input might be given as Windows format, start by converting to
15583  # unix format.
15584  path="$BOOT_JDK"
15585  new_path=`$CYGPATH -u "$path"`
15586
15587  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15588  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15589  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15590  # "foo.exe" is OK but "foo" is an error.
15591  #
15592  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15593  # It is also a way to make sure we got the proper file name for the real test later on.
15594  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15595  if test "x$test_shortpath" = x; then
15596    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15597$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15598    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15599  fi
15600
15601  # Call helper function which possibly converts this using DOS-style short mode.
15602  # If so, the updated path is stored in $new_path.
15603
15604  input_path="$new_path"
15605  # Check if we need to convert this using DOS-style short mode. If the path
15606  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15607  # take no chances and rewrite it.
15608  # Note: m4 eats our [], so we need to use [ and ] instead.
15609  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15610  if test "x$has_forbidden_chars" != x; then
15611    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15612    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15613    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15614    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15615      # Going to short mode and back again did indeed matter. Since short mode is
15616      # case insensitive, let's make it lowercase to improve readability.
15617      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15618      # Now convert it back to Unix-stile (cygpath)
15619      input_path=`$CYGPATH -u "$shortmode_path"`
15620      new_path="$input_path"
15621    fi
15622  fi
15623
15624  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15625  if test "x$test_cygdrive_prefix" = x; then
15626    # As a simple fix, exclude /usr/bin since it's not a real path.
15627    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15628      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15629      # a path prefixed by /cygdrive for fixpath to work.
15630      new_path="$CYGWIN_ROOT_PATH$input_path"
15631    fi
15632  fi
15633
15634
15635  if test "x$path" != "x$new_path"; then
15636    BOOT_JDK="$new_path"
15637    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15638$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15639  fi
15640
15641  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15642
15643  path="$BOOT_JDK"
15644  has_colon=`$ECHO $path | $GREP ^.:`
15645  new_path="$path"
15646  if test "x$has_colon" = x; then
15647    # Not in mixed or Windows style, start by that.
15648    new_path=`cmd //c echo $path`
15649  fi
15650
15651
15652  input_path="$new_path"
15653  # Check if we need to convert this using DOS-style short mode. If the path
15654  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15655  # take no chances and rewrite it.
15656  # Note: m4 eats our [], so we need to use [ and ] instead.
15657  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15658  if test "x$has_forbidden_chars" != x; then
15659    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15660    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15661  fi
15662
15663
15664  windows_path="$new_path"
15665  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15666    unix_path=`$CYGPATH -u "$windows_path"`
15667    new_path="$unix_path"
15668  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15669    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15670    new_path="$unix_path"
15671  fi
15672
15673  if test "x$path" != "x$new_path"; then
15674    BOOT_JDK="$new_path"
15675    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15676$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15677  fi
15678
15679  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15680  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15681
15682  else
15683    # We're on a posix platform. Hooray! :)
15684    path="$BOOT_JDK"
15685    has_space=`$ECHO "$path" | $GREP " "`
15686    if test "x$has_space" != x; then
15687      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15688$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15689      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15690    fi
15691
15692    # Use eval to expand a potential ~
15693    eval path="$path"
15694    if test ! -f "$path" && test ! -d "$path"; then
15695      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15696    fi
15697
15698    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
15699  fi
15700
15701              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15702$as_echo_n "checking for Boot JDK... " >&6; }
15703              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15704$as_echo "$BOOT_JDK" >&6; }
15705              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15706$as_echo_n "checking Boot JDK version... " >&6; }
15707              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15708              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15709$as_echo "$BOOT_JDK_VERSION" >&6; }
15710            fi # end check jdk version
15711          fi # end check rt.jar
15712        fi # end check javac
15713      fi # end check java
15714    fi # end check boot jdk found
15715  fi
15716
15717
15718# If we haven't found anything yet, we've truly lost. Give up.
15719if test "x$BOOT_JDK_FOUND" = xno; then
15720
15721    # Print a helpful message on how to acquire the necessary build dependency.
15722    # openjdk is the help tag: freetyp2, cups, pulse, alsa etc
15723    MISSING_DEPENDENCY=openjdk
15724    PKGHANDLER_COMMAND=
15725
15726    case $PKGHANDLER in
15727	apt-get)
15728                apt_help     $MISSING_DEPENDENCY ;;
15729    yum)
15730                yum_help     $MISSING_DEPENDENCY ;;
15731	port)
15732                port_help    $MISSING_DEPENDENCY ;;
15733	pkgutil)
15734                pkgutil_help $MISSING_DEPENDENCY ;;
15735	pkgadd)
15736                pkgadd_help  $MISSING_DEPENDENCY ;;
15737    * )
15738      break ;;
15739    esac
15740
15741    if test "x$PKGHANDLER_COMMAND" != x; then
15742        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
15743    fi
15744
15745  { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
15746$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
15747  { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
15748$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15749  as_fn_error $? "Cannot continue" "$LINENO" 5
15750fi
15751
15752# Setup proper paths for what we found
15753BOOT_RTJAR="$BOOT_JDK/jre/lib/rt.jar"
15754if test ! -f "$BOOT_RTJAR"; then
15755    # On MacOSX it is called classes.jar
15756    BOOT_RTJAR="$BOOT_JDK/../Classes/classes.jar"
15757    if test -f "$BOOT_RTJAR"; then
15758      # Remove the ..
15759      BOOT_RTJAR="`cd ${BOOT_RTJAR%/*} && pwd`/${BOOT_RTJAR##*/}"
15760    fi
15761fi
15762BOOT_TOOLSJAR="$BOOT_JDK/lib/tools.jar"
15763BOOT_JDK="$BOOT_JDK"
15764
15765
15766
15767
15768# Setup tools from the Boot JDK.
15769
15770  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
15771$as_echo_n "checking for java in Boot JDK... " >&6; }
15772  JAVA=$BOOT_JDK/bin/java
15773  if test ! -x $JAVA; then
15774      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15775$as_echo "not found" >&6; }
15776      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15777$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15778      as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
15779  fi
15780  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15781$as_echo "ok" >&6; }
15782
15783
15784  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
15785$as_echo_n "checking for javac in Boot JDK... " >&6; }
15786  JAVAC=$BOOT_JDK/bin/javac
15787  if test ! -x $JAVAC; then
15788      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15789$as_echo "not found" >&6; }
15790      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15791$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15792      as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
15793  fi
15794  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15795$as_echo "ok" >&6; }
15796
15797
15798  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
15799$as_echo_n "checking for javah in Boot JDK... " >&6; }
15800  JAVAH=$BOOT_JDK/bin/javah
15801  if test ! -x $JAVAH; then
15802      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15803$as_echo "not found" >&6; }
15804      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15805$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15806      as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
15807  fi
15808  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15809$as_echo "ok" >&6; }
15810
15811
15812  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javap in Boot JDK" >&5
15813$as_echo_n "checking for javap in Boot JDK... " >&6; }
15814  JAVAP=$BOOT_JDK/bin/javap
15815  if test ! -x $JAVAP; then
15816      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15817$as_echo "not found" >&6; }
15818      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15819$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15820      as_fn_error $? "Could not find javap in the Boot JDK" "$LINENO" 5
15821  fi
15822  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15823$as_echo "ok" >&6; }
15824
15825
15826  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
15827$as_echo_n "checking for jar in Boot JDK... " >&6; }
15828  JAR=$BOOT_JDK/bin/jar
15829  if test ! -x $JAR; then
15830      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15831$as_echo "not found" >&6; }
15832      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15833$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15834      as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
15835  fi
15836  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15837$as_echo "ok" >&6; }
15838
15839
15840  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rmic in Boot JDK" >&5
15841$as_echo_n "checking for rmic in Boot JDK... " >&6; }
15842  RMIC=$BOOT_JDK/bin/rmic
15843  if test ! -x $RMIC; then
15844      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15845$as_echo "not found" >&6; }
15846      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15847$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15848      as_fn_error $? "Could not find rmic in the Boot JDK" "$LINENO" 5
15849  fi
15850  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15851$as_echo "ok" >&6; }
15852
15853
15854  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5
15855$as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
15856  NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
15857  if test ! -x $NATIVE2ASCII; then
15858      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15859$as_echo "not found" >&6; }
15860      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15861$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15862      as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5
15863  fi
15864  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15865$as_echo "ok" >&6; }
15866
15867
15868# Finally, set some other options...
15869
15870# When compiling code to be executed by the Boot JDK, force jdk7 compatibility.
15871BOOT_JDK_SOURCETARGET="-source 7 -target 7"
15872
15873
15874
15875
15876##############################################################################
15877#
15878# Specify options for anything that is run with the Boot JDK.
15879#
15880
15881# Check whether --with-boot-jdk-jvmargs was given.
15882if test "${with_boot_jdk_jvmargs+set}" = set; then :
15883  withval=$with_boot_jdk_jvmargs;
15884fi
15885
15886
15887if test "x$with_boot_jdk_jvmargs" = x; then
15888    # Not all JVM:s accept the same arguments on the command line.
15889    # OpenJDK specific increase in thread stack for JDK build,
15890    # well more specifically, when running javac.
15891    if test "x$BUILD_NUM_BITS" = x32; then
15892       STACK_SIZE=768
15893    else
15894       # Running Javac on a JVM on a 64-bit machine, the stack takes more space
15895       # since 64-bit pointers are pushed on the stach. Apparently, we need
15896       # to increase the stack space when javacing the JDK....
15897       STACK_SIZE=1536
15898    fi
15899
15900    # Minimum amount of heap memory.
15901
15902    $ECHO "Check if jvm arg is ok: -Xms64M" >&5
15903    $ECHO "Command: $JAVA -Xms64M -version" >&5
15904    OUTPUT=`$JAVA -Xms64M -version 2>&1`
15905    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
15906    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
15907    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15908        boot_jdk_jvmargs="$boot_jdk_jvmargs -Xms64M"
15909	JVM_ARG_OK=true
15910    else
15911	$ECHO "Arg failed:" >&5
15912	$ECHO "$OUTPUT" >&5
15913	JVM_ARG_OK=false
15914    fi
15915
15916    if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
15917        # Why does macosx need more heap? Its the huge JDK batch.
15918
15919    $ECHO "Check if jvm arg is ok: -Xmx1600M" >&5
15920    $ECHO "Command: $JAVA -Xmx1600M -version" >&5
15921    OUTPUT=`$JAVA -Xmx1600M -version 2>&1`
15922    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
15923    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
15924    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15925        boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1600M"
15926	JVM_ARG_OK=true
15927    else
15928	$ECHO "Arg failed:" >&5
15929	$ECHO "$OUTPUT" >&5
15930	JVM_ARG_OK=false
15931    fi
15932
15933    else
15934
15935    $ECHO "Check if jvm arg is ok: -Xmx1100M" >&5
15936    $ECHO "Command: $JAVA -Xmx1100M -version" >&5
15937    OUTPUT=`$JAVA -Xmx1100M -version 2>&1`
15938    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
15939    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
15940    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15941        boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1100M"
15942	JVM_ARG_OK=true
15943    else
15944	$ECHO "Arg failed:" >&5
15945	$ECHO "$OUTPUT" >&5
15946	JVM_ARG_OK=false
15947    fi
15948
15949    fi
15950    # When is adding -client something that speeds up the JVM?
15951    # ADD_JVM_ARG_IF_OK([-client],boot_jdk_jvmargs,[$JAVA])
15952
15953    $ECHO "Check if jvm arg is ok: -XX:PermSize=32m" >&5
15954    $ECHO "Command: $JAVA -XX:PermSize=32m -version" >&5
15955    OUTPUT=`$JAVA -XX:PermSize=32m -version 2>&1`
15956    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
15957    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
15958    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15959        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:PermSize=32m"
15960	JVM_ARG_OK=true
15961    else
15962	$ECHO "Arg failed:" >&5
15963	$ECHO "$OUTPUT" >&5
15964	JVM_ARG_OK=false
15965    fi
15966
15967
15968    $ECHO "Check if jvm arg is ok: -XX:MaxPermSize=160m" >&5
15969    $ECHO "Command: $JAVA -XX:MaxPermSize=160m -version" >&5
15970    OUTPUT=`$JAVA -XX:MaxPermSize=160m -version 2>&1`
15971    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
15972    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
15973    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15974        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:MaxPermSize=160m"
15975	JVM_ARG_OK=true
15976    else
15977	$ECHO "Arg failed:" >&5
15978	$ECHO "$OUTPUT" >&5
15979	JVM_ARG_OK=false
15980    fi
15981
15982
15983    $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
15984    $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
15985    OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
15986    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
15987    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
15988    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15989        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:ThreadStackSize=$STACK_SIZE"
15990	JVM_ARG_OK=true
15991    else
15992	$ECHO "Arg failed:" >&5
15993	$ECHO "$OUTPUT" >&5
15994	JVM_ARG_OK=false
15995    fi
15996
15997    # Disable special log output when a debug build is used as Boot JDK...
15998
15999    $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
16000    $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
16001    OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
16002    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
16003    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
16004    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
16005        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
16006	JVM_ARG_OK=true
16007    else
16008	$ECHO "Arg failed:" >&5
16009	$ECHO "$OUTPUT" >&5
16010	JVM_ARG_OK=false
16011    fi
16012
16013fi
16014
16015BOOT_JDK_JVMARGS=$boot_jdk_jvmargs
16016
16017
16018
16019###############################################################################
16020#
16021# Configure the sources to use. We can add or override individual directories.
16022#
16023###############################################################################
16024
16025
16026
16027# Where are the sources. Any of these can be overridden
16028# using --with-override-corba and the likes.
16029LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
16030CORBA_TOPDIR="$SRC_ROOT/corba"
16031JAXP_TOPDIR="$SRC_ROOT/jaxp"
16032JAXWS_TOPDIR="$SRC_ROOT/jaxws"
16033HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
16034NASHORN_TOPDIR="$SRC_ROOT/nashorn"
16035JDK_TOPDIR="$SRC_ROOT/jdk"
16036
16037
16038
16039
16040
16041
16042
16043
16044
16045
16046###############################################################################
16047#
16048# Pickup additional source for a component from outside of the source root
16049# or override source for a component.
16050#
16051
16052# Check whether --with-add-source-root was given.
16053if test "${with_add_source_root+set}" = set; then :
16054  withval=$with_add_source_root;
16055fi
16056
16057
16058
16059# Check whether --with-override-source-root was given.
16060if test "${with_override_source_root+set}" = set; then :
16061  withval=$with_override_source_root;
16062fi
16063
16064
16065
16066# Check whether --with-adds-and-overrides was given.
16067if test "${with_adds_and_overrides+set}" = set; then :
16068  withval=$with_adds_and_overrides;
16069fi
16070
16071
16072if test "x$with_adds_and_overrides" != x; then
16073    with_add_source_root="$with_adds_and_overrides/adds"
16074    with_override_source_root="$with_adds_and_overrides/overrides"
16075fi
16076
16077if test "x$with_add_source_root" != x; then
16078    if ! test -d $with_add_source_root; then
16079       as_fn_error $? "Trying to use a non-existant add-source-root $with_add_source_root" "$LINENO" 5
16080    fi
16081    CURDIR="$PWD"
16082    cd "$with_add_source_root"
16083    ADD_SRC_ROOT="`pwd`"
16084    cd "$CURDIR"
16085    # Verify that the addon source root does not have any root makefiles.
16086    # If it does, then it is usually an error, prevent this.
16087    if test -f $with_add_source_root/langtools/makefiles/Makefile || \
16088       test -f $with_add_source_root/langtools/make/Makefile; then
16089        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
16090    fi
16091    if test -f $with_add_source_root/corba/makefiles/Makefile || \
16092       test -f $with_add_source_root/corba/make/Makefile; then
16093        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
16094    fi
16095    if test -f $with_add_source_root/jaxp/makefiles/Makefile || \
16096       test -f $with_add_source_root/jaxp/make/Makefile; then
16097        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
16098    fi
16099    if test -f $with_add_source_root/jaxws/makefiles/Makefile || \
16100       test -f $with_add_source_root/jaxws/make/Makefile; then
16101        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
16102    fi
16103    if test -f $with_add_source_root/hotspot/makefiles/Makefile || \
16104       test -f $with_add_source_root/hotspot/make/Makefile; then
16105        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
16106    fi
16107    if test -f $with_add_source_root/nashorn/makefiles/Makefile || \
16108       test -f $with_add_source_root/nashorn/make/Makefile; then
16109        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
16110    fi
16111    if test -f $with_add_source_root/jdk/makefiles/Makefile || \
16112       test -f $with_add_source_root/jdk/make/Makefile; then
16113        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
16114    fi
16115fi
16116
16117
16118if test "x$with_override_source_root" != x; then
16119    if ! test -d $with_override_source_root; then
16120       as_fn_error $? "Trying to use a non-existant override-source-root $with_override_source_root" "$LINENO" 5
16121    fi
16122    CURDIR="$PWD"
16123    cd "$with_override_source_root"
16124    OVERRIDE_SRC_ROOT="`pwd`"
16125    cd "$CURDIR"
16126    if test -f $with_override_source_root/langtools/makefiles/Makefile || \
16127       test -f $with_override_source_root/langtools/make/Makefile; then
16128        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
16129    fi
16130    if test -f $with_override_source_root/corba/makefiles/Makefile || \
16131       test -f $with_override_source_root/corba/make/Makefile; then
16132        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
16133    fi
16134    if test -f $with_override_source_root/jaxp/makefiles/Makefile || \
16135       test -f $with_override_source_root/jaxp/make/Makefile; then
16136        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
16137    fi
16138    if test -f $with_override_source_root/jaxws/makefiles/Makefile || \
16139       test -f $with_override_source_root/jaxws/make/Makefile; then
16140        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
16141    fi
16142    if test -f $with_override_source_root/hotspot/makefiles/Makefile || \
16143       test -f $with_override_source_root/hotspot/make/Makefile; then
16144        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
16145    fi
16146    if test -f $with_override_source_root/nashorn/makefiles/Makefile || \
16147       test -f $with_override_source_root/nashorn/make/Makefile; then
16148        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
16149    fi
16150    if test -f $with_override_source_root/jdk/makefiles/Makefile || \
16151       test -f $with_override_source_root/jdk/make/Makefile; then
16152        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
16153    fi
16154fi
16155
16156
16157###############################################################################
16158#
16159# Override a repo completely, this is used for example when you have 3 small
16160# development sandboxes of the langtools sources and want to avoid having 3 full
16161# OpenJDK sources checked out on disk.
16162#
16163# Assuming that the 3 langtools sandboxes are located here:
16164# /home/fredrik/sandbox1/langtools
16165# /home/fredrik/sandbox2/langtools
16166# /home/fredrik/sandbox3/langtools
16167#
16168# From the source root you create build subdirs manually:
16169#     mkdir -p build1 build2 build3
16170# in each build directory run:
16171#     (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make)
16172#     (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make)
16173#     (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make)
16174#
16175
16176
16177# Check whether --with-override-langtools was given.
16178if test "${with_override_langtools+set}" = set; then :
16179  withval=$with_override_langtools;
16180fi
16181
16182
16183
16184# Check whether --with-override-corba was given.
16185if test "${with_override_corba+set}" = set; then :
16186  withval=$with_override_corba;
16187fi
16188
16189
16190
16191# Check whether --with-override-jaxp was given.
16192if test "${with_override_jaxp+set}" = set; then :
16193  withval=$with_override_jaxp;
16194fi
16195
16196
16197
16198# Check whether --with-override-jaxws was given.
16199if test "${with_override_jaxws+set}" = set; then :
16200  withval=$with_override_jaxws;
16201fi
16202
16203
16204
16205# Check whether --with-override-hotspot was given.
16206if test "${with_override_hotspot+set}" = set; then :
16207  withval=$with_override_hotspot;
16208fi
16209
16210
16211
16212# Check whether --with-override-nashorn was given.
16213if test "${with_override_nashorn+set}" = set; then :
16214  withval=$with_override_nashorn;
16215fi
16216
16217
16218
16219# Check whether --with-override-jdk was given.
16220if test "${with_override_jdk+set}" = set; then :
16221  withval=$with_override_jdk;
16222fi
16223
16224
16225if test "x$with_override_langtools" != x; then
16226    CURDIR="$PWD"
16227    cd "$with_override_langtools"
16228    LANGTOOLS_TOPDIR="`pwd`"
16229    cd "$CURDIR"
16230    if ! test -f $LANGTOOLS_TOPDIR/makefiles/Makefile; then
16231        as_fn_error $? "You have to override langtools with a full langtools repo!" "$LINENO" 5
16232    fi
16233    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if langtools should be overridden" >&5
16234$as_echo_n "checking if langtools should be overridden... " >&6; }
16235    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $LANGTOOLS_TOPDIR" >&5
16236$as_echo "yes with $LANGTOOLS_TOPDIR" >&6; }
16237fi
16238if test "x$with_override_corba" != x; then
16239    CURDIR="$PWD"
16240    cd "$with_override_corba"
16241    CORBA_TOPDIR="`pwd`"
16242    cd "$CURDIR"
16243    if ! test -f $CORBA_TOPDIR/makefiles/Makefile; then
16244        as_fn_error $? "You have to override corba with a full corba repo!" "$LINENO" 5
16245    fi
16246    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if corba should be overridden" >&5
16247$as_echo_n "checking if corba should be overridden... " >&6; }
16248    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $CORBA_TOPDIR" >&5
16249$as_echo "yes with $CORBA_TOPDIR" >&6; }
16250fi
16251if test "x$with_override_jaxp" != x; then
16252    CURDIR="$PWD"
16253    cd "$with_override_jaxp"
16254    JAXP_TOPDIR="`pwd`"
16255    cd "$CURDIR"
16256    if ! test -f $JAXP_TOPDIR/makefiles/Makefile; then
16257        as_fn_error $? "You have to override jaxp with a full jaxp repo!" "$LINENO" 5
16258    fi
16259    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxp should be overridden" >&5
16260$as_echo_n "checking if jaxp should be overridden... " >&6; }
16261    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXP_TOPDIR" >&5
16262$as_echo "yes with $JAXP_TOPDIR" >&6; }
16263fi
16264if test "x$with_override_jaxws" != x; then
16265    CURDIR="$PWD"
16266    cd "$with_override_jaxws"
16267    JAXWS_TOPDIR="`pwd`"
16268    cd "$CURDIR"
16269    if ! test -f $JAXWS_TOPDIR/makefiles/Makefile; then
16270        as_fn_error $? "You have to override jaxws with a full jaxws repo!" "$LINENO" 5
16271    fi
16272    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxws should be overridden" >&5
16273$as_echo_n "checking if jaxws should be overridden... " >&6; }
16274    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXWS_TOPDIR" >&5
16275$as_echo "yes with $JAXWS_TOPDIR" >&6; }
16276fi
16277if test "x$with_override_hotspot" != x; then
16278    CURDIR="$PWD"
16279    cd "$with_override_hotspot"
16280    HOTSPOT_TOPDIR="`pwd`"
16281    cd "$CURDIR"
16282    if ! test -f $HOTSPOT_TOPDIR/make/Makefile && \
16283       ! test -f $HOTSPOT_TOPDIR/makefiles/Makefile; then
16284        as_fn_error $? "You have to override hotspot with a full hotspot repo!" "$LINENO" 5
16285    fi
16286    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be overridden" >&5
16287$as_echo_n "checking if hotspot should be overridden... " >&6; }
16288    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $HOTSPOT_TOPDIR" >&5
16289$as_echo "yes with $HOTSPOT_TOPDIR" >&6; }
16290fi
16291if test "x$with_override_nashorn" != x; then
16292    CURDIR="$PWD"
16293    cd "$with_override_nashorn"
16294    NASHORN_TOPDIR="`pwd`"
16295    cd "$CURDIR"
16296    if ! test -f $NASHORN_TOPDIR/makefiles/Makefile; then
16297        as_fn_error $? "You have to override nashorn with a full nashorn repo!" "$LINENO" 5
16298    fi
16299    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if nashorn should be overridden" >&5
16300$as_echo_n "checking if nashorn should be overridden... " >&6; }
16301    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $NASHORN_TOPDIR" >&5
16302$as_echo "yes with $NASHORN_TOPDIR" >&6; }
16303fi
16304if test "x$with_override_jdk" != x; then
16305    CURDIR="$PWD"
16306    cd "$with_override_jdk"
16307    JDK_TOPDIR="`pwd`"
16308    cd "$CURDIR"
16309    if ! test -f $JDK_TOPDIR/makefiles/Makefile; then
16310        as_fn_error $? "You have to override JDK with a full JDK repo!" "$LINENO" 5
16311    fi
16312    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if JDK should be overridden" >&5
16313$as_echo_n "checking if JDK should be overridden... " >&6; }
16314    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JDK_TOPDIR" >&5
16315$as_echo "yes with $JDK_TOPDIR" >&6; }
16316fi
16317
16318
16319
16320BUILD_OUTPUT="$OUTPUT_ROOT"
16321
16322
16323HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
16324BUILD_HOTSPOT=true
16325
16326
16327
16328# Check whether --with-import-hotspot was given.
16329if test "${with_import_hotspot+set}" = set; then :
16330  withval=$with_import_hotspot;
16331fi
16332
16333if test "x$with_import_hotspot" != x; then
16334    CURDIR="$PWD"
16335    cd "$with_import_hotspot"
16336    HOTSPOT_DIST="`pwd`"
16337    cd "$CURDIR"
16338    if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
16339        as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
16340    fi
16341    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
16342$as_echo_n "checking if hotspot should be imported... " >&6; }
16343    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
16344$as_echo "yes from $HOTSPOT_DIST" >&6; }
16345    BUILD_HOTSPOT=false
16346fi
16347
16348JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
16349
16350
16351###############################################################################
16352#
16353# Setup the toolchain (compilers etc), i.e. the tools that need to be
16354# cross-compilation aware.
16355#
16356###############################################################################
16357
16358
16359###############################################################################
16360#
16361# Configure the development tool paths and potential sysroot.
16362#
16363ac_ext=cpp
16364ac_cpp='$CXXCPP $CPPFLAGS'
16365ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16366ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16367ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16368
16369
16370# The option used to specify the target .o,.a or .so file.
16371# When compiling, how to specify the to be created object file.
16372CC_OUT_OPTION='-o$(SPACE)'
16373# When linking, how to specify the to be created executable.
16374EXE_OUT_OPTION='-o$(SPACE)'
16375# When linking, how to specify the to be created dynamically linkable library.
16376LD_OUT_OPTION='-o$(SPACE)'
16377# When archiving, how to specify the to be create static archive for object files.
16378AR_OUT_OPTION='rcs$(SPACE)'
16379
16380
16381
16382
16383
16384# Locate the actual tools
16385
16386
16387# Check whether --with-jtreg was given.
16388if test "${with_jtreg+set}" = set; then :
16389  withval=$with_jtreg;
16390else
16391  with_jtreg=no
16392fi
16393
16394
16395  if test "x$with_jtreg" = xno; then
16396    # jtreg disabled
16397    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
16398$as_echo_n "checking for jtreg... " >&6; }
16399    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16400$as_echo "no" >&6; }
16401  else
16402    if test "x$with_jtreg" != xyes; then
16403      # with path specified.
16404      JT_HOME="$with_jtreg"
16405    fi
16406
16407    if test "x$JT_HOME" != x; then
16408      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
16409$as_echo_n "checking for jtreg... " >&6; }
16410
16411      # use JT_HOME enviroment var.
16412
16413  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16414
16415  # Input might be given as Windows format, start by converting to
16416  # unix format.
16417  path="$JT_HOME"
16418  new_path=`$CYGPATH -u "$path"`
16419
16420  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16421  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16422  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16423  # "foo.exe" is OK but "foo" is an error.
16424  #
16425  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16426  # It is also a way to make sure we got the proper file name for the real test later on.
16427  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16428  if test "x$test_shortpath" = x; then
16429    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
16430$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
16431    as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
16432  fi
16433
16434  # Call helper function which possibly converts this using DOS-style short mode.
16435  # If so, the updated path is stored in $new_path.
16436
16437  input_path="$new_path"
16438  # Check if we need to convert this using DOS-style short mode. If the path
16439  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16440  # take no chances and rewrite it.
16441  # Note: m4 eats our [], so we need to use [ and ] instead.
16442  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16443  if test "x$has_forbidden_chars" != x; then
16444    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16445    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16446    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16447    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16448      # Going to short mode and back again did indeed matter. Since short mode is
16449      # case insensitive, let's make it lowercase to improve readability.
16450      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16451      # Now convert it back to Unix-stile (cygpath)
16452      input_path=`$CYGPATH -u "$shortmode_path"`
16453      new_path="$input_path"
16454    fi
16455  fi
16456
16457  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16458  if test "x$test_cygdrive_prefix" = x; then
16459    # As a simple fix, exclude /usr/bin since it's not a real path.
16460    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16461      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16462      # a path prefixed by /cygdrive for fixpath to work.
16463      new_path="$CYGWIN_ROOT_PATH$input_path"
16464    fi
16465  fi
16466
16467
16468  if test "x$path" != "x$new_path"; then
16469    JT_HOME="$new_path"
16470    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
16471$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
16472  fi
16473
16474  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16475
16476  path="$JT_HOME"
16477  has_colon=`$ECHO $path | $GREP ^.:`
16478  new_path="$path"
16479  if test "x$has_colon" = x; then
16480    # Not in mixed or Windows style, start by that.
16481    new_path=`cmd //c echo $path`
16482  fi
16483
16484
16485  input_path="$new_path"
16486  # Check if we need to convert this using DOS-style short mode. If the path
16487  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16488  # take no chances and rewrite it.
16489  # Note: m4 eats our [], so we need to use [ and ] instead.
16490  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16491  if test "x$has_forbidden_chars" != x; then
16492    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16493    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16494  fi
16495
16496
16497  windows_path="$new_path"
16498  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16499    unix_path=`$CYGPATH -u "$windows_path"`
16500    new_path="$unix_path"
16501  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16502    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16503    new_path="$unix_path"
16504  fi
16505
16506  if test "x$path" != "x$new_path"; then
16507    JT_HOME="$new_path"
16508    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
16509$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
16510  fi
16511
16512  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16513  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16514
16515  else
16516    # We're on a posix platform. Hooray! :)
16517    path="$JT_HOME"
16518    has_space=`$ECHO "$path" | $GREP " "`
16519    if test "x$has_space" != x; then
16520      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
16521$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
16522      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16523    fi
16524
16525    # Use eval to expand a potential ~
16526    eval path="$path"
16527    if test ! -f "$path" && test ! -d "$path"; then
16528      as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
16529    fi
16530
16531    JT_HOME="`cd "$path"; $THEPWDCMD -L`"
16532  fi
16533
16534
16535      # jtreg win32 script works for everybody
16536      JTREGEXE="$JT_HOME/win32/bin/jtreg"
16537
16538      if test ! -f "$JTREGEXE"; then
16539        as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
16540      fi
16541
16542      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
16543$as_echo "$JTREGEXE" >&6; }
16544    else
16545      # try to find jtreg on path
16546
16547    for ac_prog in jtreg
16548do
16549  # Extract the first word of "$ac_prog", so it can be a program name with args.
16550set dummy $ac_prog; ac_word=$2
16551{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16552$as_echo_n "checking for $ac_word... " >&6; }
16553if ${ac_cv_path_JTREGEXE+:} false; then :
16554  $as_echo_n "(cached) " >&6
16555else
16556  case $JTREGEXE in
16557  [\\/]* | ?:[\\/]*)
16558  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
16559  ;;
16560  *)
16561  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16562for as_dir in $PATH
16563do
16564  IFS=$as_save_IFS
16565  test -z "$as_dir" && as_dir=.
16566    for ac_exec_ext in '' $ac_executable_extensions; do
16567  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16568    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
16569    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16570    break 2
16571  fi
16572done
16573  done
16574IFS=$as_save_IFS
16575
16576  ;;
16577esac
16578fi
16579JTREGEXE=$ac_cv_path_JTREGEXE
16580if test -n "$JTREGEXE"; then
16581  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
16582$as_echo "$JTREGEXE" >&6; }
16583else
16584  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16585$as_echo "no" >&6; }
16586fi
16587
16588
16589  test -n "$JTREGEXE" && break
16590done
16591
16592
16593    if test "x$JTREGEXE" = x; then
16594        if test "xjtreg" = x; then
16595          PROG_NAME=jtregexe
16596        else
16597          PROG_NAME=jtreg
16598        fi
16599        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
16600$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
16601        as_fn_error $? "Cannot continue" "$LINENO" 5
16602    fi
16603
16604
16605      JT_HOME="`$DIRNAME $JTREGEXE`"
16606    fi
16607  fi
16608
16609
16610
16611
16612
16613if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
16614
16615  # Store path to cygwin link.exe to help excluding it when searching for
16616  # VS linker. This must be done before changing the PATH when looking for VS.
16617  # Extract the first word of "link", so it can be a program name with args.
16618set dummy link; ac_word=$2
16619{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16620$as_echo_n "checking for $ac_word... " >&6; }
16621if ${ac_cv_path_CYGWIN_LINK+:} false; then :
16622  $as_echo_n "(cached) " >&6
16623else
16624  case $CYGWIN_LINK in
16625  [\\/]* | ?:[\\/]*)
16626  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
16627  ;;
16628  *)
16629  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16630for as_dir in $PATH
16631do
16632  IFS=$as_save_IFS
16633  test -z "$as_dir" && as_dir=.
16634    for ac_exec_ext in '' $ac_executable_extensions; do
16635  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16636    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
16637    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16638    break 2
16639  fi
16640done
16641  done
16642IFS=$as_save_IFS
16643
16644  ;;
16645esac
16646fi
16647CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
16648if test -n "$CYGWIN_LINK"; then
16649  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
16650$as_echo "$CYGWIN_LINK" >&6; }
16651else
16652  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16653$as_echo "no" >&6; }
16654fi
16655
16656
16657  if test "x$CYGWIN_LINK" != x; then
16658    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
16659$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
16660    "$CYGWIN_LINK" --version > /dev/null
16661    if test $? -eq 0 ; then
16662      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16663$as_echo "yes" >&6; }
16664    else
16665      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16666$as_echo "no" >&6; }
16667      # This might be the VS linker. Don't exclude it later on.
16668      CYGWIN_LINK=""
16669    fi
16670  fi
16671
16672  # First-hand choice is to locate and run the vsvars bat file.
16673
16674  if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16675    VCVARSFILE="vc/bin/vcvars32.bat"
16676  else
16677    VCVARSFILE="vc/bin/amd64/vcvars64.bat"
16678  fi
16679
16680  VS_ENV_CMD=""
16681  VS_ENV_ARGS=""
16682  if test "x$with_toolsdir" != x; then
16683
16684  if test "x$VS_ENV_CMD" = x; then
16685    VS100BASE="$with_toolsdir/../.."
16686    METHOD="--with-tools-dir"
16687
16688  windows_path="$VS100BASE"
16689  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16690    unix_path=`$CYGPATH -u "$windows_path"`
16691    VS100BASE="$unix_path"
16692  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16693    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16694    VS100BASE="$unix_path"
16695  fi
16696
16697    if test -d "$VS100BASE"; then
16698      if test -f "$VS100BASE/$VCVARSFILE"; then
16699        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16700$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16701        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16702      else
16703        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16704$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16705        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16706$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16707      fi
16708    fi
16709  fi
16710
16711  fi
16712
16713  if test "x$with_toolsdir" != x && test "x$VS_ENV_CMD" = x; then
16714    # Having specified an argument which is incorrect will produce an instant failure;
16715    # we should not go on looking
16716    { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&5
16717$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&6;}
16718    { $as_echo "$as_me:${as_lineno-$LINENO}: Please point to the VC/bin directory within the Visual Studio installation" >&5
16719$as_echo "$as_me: Please point to the VC/bin directory within the Visual Studio installation" >&6;}
16720    as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
16721  fi
16722
16723  if test "x$VS100COMNTOOLS" != x; then
16724
16725  if test "x$VS_ENV_CMD" = x; then
16726    VS100BASE="$VS100COMNTOOLS/../.."
16727    METHOD="VS100COMNTOOLS variable"
16728
16729  windows_path="$VS100BASE"
16730  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16731    unix_path=`$CYGPATH -u "$windows_path"`
16732    VS100BASE="$unix_path"
16733  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16734    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16735    VS100BASE="$unix_path"
16736  fi
16737
16738    if test -d "$VS100BASE"; then
16739      if test -f "$VS100BASE/$VCVARSFILE"; then
16740        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16741$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16742        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16743      else
16744        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16745$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16746        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16747$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16748      fi
16749    fi
16750  fi
16751
16752  fi
16753  if test "x$PROGRAMFILES" != x; then
16754
16755  if test "x$VS_ENV_CMD" = x; then
16756    VS100BASE="$PROGRAMFILES/Microsoft Visual Studio 10.0"
16757    METHOD="well-known name"
16758
16759  windows_path="$VS100BASE"
16760  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16761    unix_path=`$CYGPATH -u "$windows_path"`
16762    VS100BASE="$unix_path"
16763  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16764    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16765    VS100BASE="$unix_path"
16766  fi
16767
16768    if test -d "$VS100BASE"; then
16769      if test -f "$VS100BASE/$VCVARSFILE"; then
16770        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16771$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16772        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16773      else
16774        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16775$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16776        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16777$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16778      fi
16779    fi
16780  fi
16781
16782  fi
16783
16784  if test "x$VS_ENV_CMD" = x; then
16785    VS100BASE="C:/Program Files/Microsoft Visual Studio 10.0"
16786    METHOD="well-known name"
16787
16788  windows_path="$VS100BASE"
16789  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16790    unix_path=`$CYGPATH -u "$windows_path"`
16791    VS100BASE="$unix_path"
16792  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16793    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16794    VS100BASE="$unix_path"
16795  fi
16796
16797    if test -d "$VS100BASE"; then
16798      if test -f "$VS100BASE/$VCVARSFILE"; then
16799        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16800$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16801        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16802      else
16803        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16804$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16805        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16806$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16807      fi
16808    fi
16809  fi
16810
16811
16812  if test "x$VS_ENV_CMD" = x; then
16813    VS100BASE="C:/Program Files (x86)/Microsoft Visual Studio 10.0"
16814    METHOD="well-known name"
16815
16816  windows_path="$VS100BASE"
16817  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16818    unix_path=`$CYGPATH -u "$windows_path"`
16819    VS100BASE="$unix_path"
16820  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16821    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16822    VS100BASE="$unix_path"
16823  fi
16824
16825    if test -d "$VS100BASE"; then
16826      if test -f "$VS100BASE/$VCVARSFILE"; then
16827        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16828$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16829        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16830      else
16831        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16832$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16833        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16834$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16835      fi
16836    fi
16837  fi
16838
16839
16840  if test "x$ProgramW6432" != x; then
16841
16842  if test "x$VS_ENV_CMD" = x; then
16843    WIN_SDK_BASE="$ProgramW6432/Microsoft SDKs/Windows/v7.1/Bin"
16844    METHOD="well-known name"
16845
16846  windows_path="$WIN_SDK_BASE"
16847  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16848    unix_path=`$CYGPATH -u "$windows_path"`
16849    WIN_SDK_BASE="$unix_path"
16850  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16851    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16852    WIN_SDK_BASE="$unix_path"
16853  fi
16854
16855    if test -d "$WIN_SDK_BASE"; then
16856      # There have been cases of partial or broken SDK installations. A missing
16857      # lib dir is not going to work.
16858      if test ! -d "$WIN_SDK_BASE/../lib"; then
16859        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16860$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16861        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16862$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16863      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16864        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16865$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16866        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16867        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16868          VS_ENV_ARGS="/x86"
16869        else
16870          VS_ENV_ARGS="/x64"
16871        fi
16872      else
16873        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16874$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16875        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16876$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16877      fi
16878    fi
16879  fi
16880
16881  fi
16882  if test "x$PROGRAMW6432" != x; then
16883
16884  if test "x$VS_ENV_CMD" = x; then
16885    WIN_SDK_BASE="$PROGRAMW6432/Microsoft SDKs/Windows/v7.1/Bin"
16886    METHOD="well-known name"
16887
16888  windows_path="$WIN_SDK_BASE"
16889  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16890    unix_path=`$CYGPATH -u "$windows_path"`
16891    WIN_SDK_BASE="$unix_path"
16892  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16893    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16894    WIN_SDK_BASE="$unix_path"
16895  fi
16896
16897    if test -d "$WIN_SDK_BASE"; then
16898      # There have been cases of partial or broken SDK installations. A missing
16899      # lib dir is not going to work.
16900      if test ! -d "$WIN_SDK_BASE/../lib"; then
16901        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16902$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16903        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16904$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16905      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16906        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16907$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16908        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16909        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16910          VS_ENV_ARGS="/x86"
16911        else
16912          VS_ENV_ARGS="/x64"
16913        fi
16914      else
16915        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16916$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16917        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16918$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16919      fi
16920    fi
16921  fi
16922
16923  fi
16924  if test "x$PROGRAMFILES" != x; then
16925
16926  if test "x$VS_ENV_CMD" = x; then
16927    WIN_SDK_BASE="$PROGRAMFILES/Microsoft SDKs/Windows/v7.1/Bin"
16928    METHOD="well-known name"
16929
16930  windows_path="$WIN_SDK_BASE"
16931  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16932    unix_path=`$CYGPATH -u "$windows_path"`
16933    WIN_SDK_BASE="$unix_path"
16934  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16935    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16936    WIN_SDK_BASE="$unix_path"
16937  fi
16938
16939    if test -d "$WIN_SDK_BASE"; then
16940      # There have been cases of partial or broken SDK installations. A missing
16941      # lib dir is not going to work.
16942      if test ! -d "$WIN_SDK_BASE/../lib"; then
16943        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16944$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16945        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16946$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16947      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16948        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16949$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16950        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16951        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16952          VS_ENV_ARGS="/x86"
16953        else
16954          VS_ENV_ARGS="/x64"
16955        fi
16956      else
16957        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16958$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16959        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16960$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16961      fi
16962    fi
16963  fi
16964
16965  fi
16966
16967  if test "x$VS_ENV_CMD" = x; then
16968    WIN_SDK_BASE="C:/Program Files/Microsoft SDKs/Windows/v7.1/Bin"
16969    METHOD="well-known name"
16970
16971  windows_path="$WIN_SDK_BASE"
16972  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16973    unix_path=`$CYGPATH -u "$windows_path"`
16974    WIN_SDK_BASE="$unix_path"
16975  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16976    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16977    WIN_SDK_BASE="$unix_path"
16978  fi
16979
16980    if test -d "$WIN_SDK_BASE"; then
16981      # There have been cases of partial or broken SDK installations. A missing
16982      # lib dir is not going to work.
16983      if test ! -d "$WIN_SDK_BASE/../lib"; then
16984        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16985$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16986        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16987$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16988      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16989        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16990$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16991        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16992        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16993          VS_ENV_ARGS="/x86"
16994        else
16995          VS_ENV_ARGS="/x64"
16996        fi
16997      else
16998        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16999$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17000        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
17001$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
17002      fi
17003    fi
17004  fi
17005
17006
17007  if test "x$VS_ENV_CMD" = x; then
17008    WIN_SDK_BASE="C:/Program Files (x86)/Microsoft SDKs/Windows/v7.1/Bin"
17009    METHOD="well-known name"
17010
17011  windows_path="$WIN_SDK_BASE"
17012  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17013    unix_path=`$CYGPATH -u "$windows_path"`
17014    WIN_SDK_BASE="$unix_path"
17015  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17016    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17017    WIN_SDK_BASE="$unix_path"
17018  fi
17019
17020    if test -d "$WIN_SDK_BASE"; then
17021      # There have been cases of partial or broken SDK installations. A missing
17022      # lib dir is not going to work.
17023      if test ! -d "$WIN_SDK_BASE/../lib"; then
17024        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17025$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17026        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
17027$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
17028      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
17029        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17030$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17031        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
17032        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17033          VS_ENV_ARGS="/x86"
17034        else
17035          VS_ENV_ARGS="/x64"
17036        fi
17037      else
17038        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17039$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17040        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
17041$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
17042      fi
17043    fi
17044  fi
17045
17046
17047  if test "x$VS_ENV_CMD" != x; then
17048    # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
17049
17050  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17051
17052  # First separate the path from the arguments. This will split at the first
17053  # space.
17054  complete="$VS_ENV_CMD"
17055  path="${complete%% *}"
17056  tmp="$complete EOL"
17057  arguments="${tmp#* }"
17058
17059  # Input might be given as Windows format, start by converting to
17060  # unix format.
17061  new_path=`$CYGPATH -u "$path"`
17062
17063  # Now try to locate executable using which
17064  new_path=`$WHICH "$new_path" 2> /dev/null`
17065  # bat and cmd files are not always considered executable in cygwin causing which
17066  # to not find them
17067  if test "x$new_path" = x \
17068           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17069           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17070    new_path=`$CYGPATH -u "$path"`
17071  fi
17072  if test "x$new_path" = x; then
17073    # Oops. Which didn't find the executable.
17074    # The splitting of arguments from the executable at a space might have been incorrect,
17075    # since paths with space are more likely in Windows. Give it another try with the whole
17076    # argument.
17077    path="$complete"
17078    arguments="EOL"
17079    new_path=`$CYGPATH -u "$path"`
17080    new_path=`$WHICH "$new_path" 2> /dev/null`
17081    # bat and cmd files are not always considered executable in cygwin causing which
17082    # to not find them
17083    if test "x$new_path" = x \
17084             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17085             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17086      new_path=`$CYGPATH -u "$path"`
17087    fi
17088    if test "x$new_path" = x; then
17089      # It's still not found. Now this is an unrecoverable error.
17090      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
17091$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
17092      has_space=`$ECHO "$complete" | $GREP " "`
17093      if test "x$has_space" != x; then
17094        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17095$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17096      fi
17097      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
17098    fi
17099  fi
17100
17101  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17102  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17103  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17104  # "foo.exe" is OK but "foo" is an error.
17105  #
17106  # This test is therefore slightly more accurate than "test -f" to check for file presence.
17107  # It is also a way to make sure we got the proper file name for the real test later on.
17108  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17109  if test "x$test_shortpath" = x; then
17110    # Short path failed, file does not exist as specified.
17111    # Try adding .exe or .cmd
17112    if test -f "${new_path}.exe"; then
17113       input_to_shortpath="${new_path}.exe"
17114    elif test -f "${new_path}.cmd"; then
17115       input_to_shortpath="${new_path}.cmd"
17116    else
17117      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
17118$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
17119      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17120$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17121      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
17122    fi
17123  else
17124    input_to_shortpath="$new_path"
17125  fi
17126
17127  # Call helper function which possibly converts this using DOS-style short mode.
17128  # If so, the updated path is stored in $new_path.
17129  new_path="$input_to_shortpath"
17130
17131  input_path="$input_to_shortpath"
17132  # Check if we need to convert this using DOS-style short mode. If the path
17133  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17134  # take no chances and rewrite it.
17135  # Note: m4 eats our [], so we need to use [ and ] instead.
17136  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17137  if test "x$has_forbidden_chars" != x; then
17138    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17139    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17140    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17141    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17142      # Going to short mode and back again did indeed matter. Since short mode is
17143      # case insensitive, let's make it lowercase to improve readability.
17144      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17145      # Now convert it back to Unix-stile (cygpath)
17146      input_path=`$CYGPATH -u "$shortmode_path"`
17147      new_path="$input_path"
17148    fi
17149  fi
17150
17151  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17152  if test "x$test_cygdrive_prefix" = x; then
17153    # As a simple fix, exclude /usr/bin since it's not a real path.
17154    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17155      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17156      # a path prefixed by /cygdrive for fixpath to work.
17157      new_path="$CYGWIN_ROOT_PATH$input_path"
17158    fi
17159  fi
17160
17161  # remove trailing .exe if any
17162  new_path="${new_path/%.exe/}"
17163
17164  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17165
17166  # First separate the path from the arguments. This will split at the first
17167  # space.
17168  complete="$VS_ENV_CMD"
17169  path="${complete%% *}"
17170  tmp="$complete EOL"
17171  arguments="${tmp#* }"
17172
17173  # Input might be given as Windows format, start by converting to
17174  # unix format.
17175  new_path="$path"
17176
17177  windows_path="$new_path"
17178  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17179    unix_path=`$CYGPATH -u "$windows_path"`
17180    new_path="$unix_path"
17181  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17182    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17183    new_path="$unix_path"
17184  fi
17185
17186
17187  # Now try to locate executable using which
17188  new_path=`$WHICH "$new_path" 2> /dev/null`
17189
17190  if test "x$new_path" = x; then
17191    # Oops. Which didn't find the executable.
17192    # The splitting of arguments from the executable at a space might have been incorrect,
17193    # since paths with space are more likely in Windows. Give it another try with the whole
17194    # argument.
17195    path="$complete"
17196    arguments="EOL"
17197    new_path="$path"
17198
17199  windows_path="$new_path"
17200  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17201    unix_path=`$CYGPATH -u "$windows_path"`
17202    new_path="$unix_path"
17203  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17204    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17205    new_path="$unix_path"
17206  fi
17207
17208
17209    new_path=`$WHICH "$new_path" 2> /dev/null`
17210
17211    if test "x$new_path" = x; then
17212      # It's still not found. Now this is an unrecoverable error.
17213      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
17214$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
17215      has_space=`$ECHO "$complete" | $GREP " "`
17216      if test "x$has_space" != x; then
17217        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17218$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17219      fi
17220      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
17221    fi
17222  fi
17223
17224  # Now new_path has a complete unix path to the binary
17225  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17226    # Keep paths in /bin as-is, but remove trailing .exe if any
17227    new_path="${new_path/%.exe/}"
17228    # Do not save /bin paths to all_fixpath_prefixes!
17229  else
17230    # Not in mixed or Windows style, start by that.
17231    new_path=`cmd //c echo $new_path`
17232
17233  input_path="$new_path"
17234  # Check if we need to convert this using DOS-style short mode. If the path
17235  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17236  # take no chances and rewrite it.
17237  # Note: m4 eats our [], so we need to use [ and ] instead.
17238  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17239  if test "x$has_forbidden_chars" != x; then
17240    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17241    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17242  fi
17243
17244    # Output is in $new_path
17245
17246  windows_path="$new_path"
17247  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17248    unix_path=`$CYGPATH -u "$windows_path"`
17249    new_path="$unix_path"
17250  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17251    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17252    new_path="$unix_path"
17253  fi
17254
17255    # remove trailing .exe if any
17256    new_path="${new_path/%.exe/}"
17257
17258    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17259    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17260  fi
17261
17262  else
17263    # We're on a posix platform. Hooray! :)
17264    # First separate the path from the arguments. This will split at the first
17265    # space.
17266    complete="$VS_ENV_CMD"
17267    path="${complete%% *}"
17268    tmp="$complete EOL"
17269    arguments="${tmp#* }"
17270
17271    # Cannot rely on the command "which" here since it doesn't always work.
17272    is_absolute_path=`$ECHO "$path" | $GREP ^/`
17273    if test -z "$is_absolute_path"; then
17274      # Path to executable is not absolute. Find it.
17275      IFS_save="$IFS"
17276      IFS=:
17277      for p in $PATH; do
17278        if test -f "$p/$path" && test -x "$p/$path"; then
17279          new_path="$p/$path"
17280          break
17281        fi
17282      done
17283      IFS="$IFS_save"
17284    else
17285      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&5
17286$as_echo "$as_me: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&6;}
17287      new_path="$path"
17288    fi
17289
17290    if test "x$new_path" = x; then
17291        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
17292$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
17293        has_space=`$ECHO "$complete" | $GREP " "`
17294        if test "x$has_space" != x; then
17295          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17296$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17297        fi
17298        as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
17299      fi
17300  fi
17301
17302      # Now join together the path and the arguments once again
17303      if test "x$arguments" != xEOL; then
17304        new_complete="$new_path ${arguments% *}"
17305      else
17306        new_complete="$new_path"
17307      fi
17308
17309  if test "x$complete" != "x$new_complete"; then
17310      VS_ENV_CMD="$new_complete"
17311      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
17312$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
17313    fi
17314
17315
17316    # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
17317    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
17318$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
17319    cd $OUTPUT_ROOT
17320    # FIXME: The code betweeen ---- was inlined from a separate script and is not properly adapted
17321    # to autoconf standards.
17322
17323    #----
17324
17325    # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment)
17326    # but calculate the difference in Cygwin environment before/after running it and then
17327    # apply the diff.
17328
17329    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
17330      _vs10varsall=`cygpath -a -m -s "$VS_ENV_CMD"`
17331      _dosvs10varsall=`cygpath -a -w -s $_vs10varsall`
17332      _dosbash=`cygpath -a -w -s \`which bash\`.*`
17333    else
17334      _dosvs10varsall=`cmd //c echo $VS_ENV_CMD`
17335      _dosbash=`cmd //c echo \`which bash\``
17336    fi
17337
17338    # generate the set of exported vars before/after the vs10 setup
17339    $ECHO "@echo off"                                           >  localdevenvtmp.bat
17340    $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export0" >> localdevenvtmp.bat
17341    $ECHO "call $_dosvs10varsall $VS_ENV_ARGS"                  >> localdevenvtmp.bat
17342    $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export1" >> localdevenvtmp.bat
17343
17344    # Now execute the newly created bat file.
17345    # The | cat is to stop SetEnv.Cmd to mess with system colors on msys
17346    cmd /c localdevenvtmp.bat | cat
17347
17348    # apply the diff (less some non-vs10 vars named by "!")
17349    $SORT localdevenvtmp.export0 | $GREP -v "!" > localdevenvtmp.export0.sort
17350    $SORT localdevenvtmp.export1 | $GREP -v "!" > localdevenvtmp.export1.sort
17351    $COMM -1 -3 localdevenvtmp.export0.sort localdevenvtmp.export1.sort > localdevenv.sh
17352
17353    # cleanup
17354    $RM localdevenvtmp*
17355    #----
17356    cd $CURDIR
17357    if test ! -s $OUTPUT_ROOT/localdevenv.sh; then
17358      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17359$as_echo "no" >&6; }
17360      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
17361$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
17362      { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
17363$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
17364      { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
17365$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
17366      as_fn_error $? "Cannot continue" "$LINENO" 5
17367    fi
17368
17369    # Now set all paths and other env variables. This will allow the rest of
17370    # the configure script to find and run the compiler in the proper way.
17371    { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
17372$as_echo "$as_me: Setting extracted environment variables" >&6;}
17373    . $OUTPUT_ROOT/localdevenv.sh
17374  else
17375    # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
17376    { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
17377$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
17378  fi
17379
17380  # At this point, we should have corrent variables in the environment, or we can't continue.
17381  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
17382$as_echo_n "checking for Visual Studio variables... " >&6; }
17383
17384  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x || test "x$WINDOWSSDKDIR" != x; then
17385    if test "x$INCLUDE" = x || test "x$LIB" = x; then
17386      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
17387$as_echo "present but broken" >&6; }
17388      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
17389    else
17390      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
17391$as_echo "ok" >&6; }
17392      # Remove any trailing \ from INCLUDE and LIB to avoid trouble in spec.gmk.
17393      VS_INCLUDE=`$ECHO "$INCLUDE" | $SED 's/\\\\$//'`
17394      VS_LIB=`$ECHO "$LIB" | $SED 's/\\\\$//'`
17395      # Remove any paths containing # (typically F#) as that messes up make
17396      PATH=`$ECHO "$PATH" | $SED 's/[^:#]*#[^:]*://g'`
17397      VS_PATH="$PATH"
17398
17399
17400
17401    fi
17402  else
17403    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17404$as_echo "not found" >&6; }
17405
17406    if test "x$VS_ENV_CMD" = x; then
17407      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
17408$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
17409      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
17410$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
17411    else
17412      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
17413$as_echo "$as_me: Running the extraction script failed." >&6;}
17414    fi
17415    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
17416$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
17417    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
17418$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
17419    as_fn_error $? "Cannot continue" "$LINENO" 5
17420  fi
17421
17422  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
17423$as_echo_n "checking for msvcr100.dll... " >&6; }
17424
17425# Check whether --with-msvcr-dll was given.
17426if test "${with_msvcr_dll+set}" = set; then :
17427  withval=$with_msvcr_dll;
17428fi
17429
17430  if test "x$with_msvcr_dll" != x; then
17431    MSVCR_DLL="$with_msvcr_dll"
17432  else
17433    if test "x$VCINSTALLDIR" != x; then
17434      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
17435        MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | grep x64 | head --lines 1`
17436      else
17437        MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | grep x86 | grep -v ia64 | grep -v x64 | head --lines 1`
17438        if test "x$MSVCR_DLL" = x; then
17439          MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | head --lines 1`
17440        fi
17441      fi
17442      if test "x$MSVCR_DLL" != x; then
17443        { $as_echo "$as_me:${as_lineno-$LINENO}: msvcr100.dll found in VCINSTALLDIR: $VCINSTALLDIR" >&5
17444$as_echo "$as_me: msvcr100.dll found in VCINSTALLDIR: $VCINSTALLDIR" >&6;}
17445      else
17446        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: msvcr100.dll not found in VCINSTALLDIR: $VCINSTALLDIR" >&5
17447$as_echo "$as_me: Warning: msvcr100.dll not found in VCINSTALLDIR: $VCINSTALLDIR" >&6;}
17448      fi
17449    fi
17450    # Try some fallback alternatives
17451    if test "x$MSVCR_DLL" = x; then
17452      # If visual studio express is installed, there is usually one with the debugger
17453      if test "x$VS100COMNTOOLS" != x; then
17454        if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
17455          MSVCR_DLL=`find "$VS100COMNTOOLS/.." -name msvcr100.dll | grep -i x64 | head --lines 1`
17456          { $as_echo "$as_me:${as_lineno-$LINENO}: msvcr100.dll found in $VS100COMNTOOLS..: $VS100COMNTOOLS.." >&5
17457$as_echo "$as_me: msvcr100.dll found in $VS100COMNTOOLS..: $VS100COMNTOOLS.." >&6;}
17458        fi
17459      fi
17460    fi
17461    if test "x$MSVCR_DLL" = x; then
17462      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17463        # Fallback for 32bit builds, look in the windows directory.
17464        if test -f "$SYSTEMROOT/system32/msvcr100.dll"; then
17465          { $as_echo "$as_me:${as_lineno-$LINENO}: msvcr100.dll found in $SYSTEMROOT/system32" >&5
17466$as_echo "$as_me: msvcr100.dll found in $SYSTEMROOT/system32" >&6;}
17467          MSVCR_DLL="$SYSTEMROOT/system32/msvcr100.dll"
17468        fi
17469      fi
17470    fi
17471  fi
17472  if test "x$MSVCR_DLL" = x; then
17473    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17474$as_echo "no" >&6; }
17475    as_fn_error $? "Could not find msvcr100.dll !" "$LINENO" 5
17476  fi
17477  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
17478$as_echo "$MSVCR_DLL" >&6; }
17479
17480  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17481
17482  # Input might be given as Windows format, start by converting to
17483  # unix format.
17484  path="$MSVCR_DLL"
17485  new_path=`$CYGPATH -u "$path"`
17486
17487  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17488  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17489  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17490  # "foo.exe" is OK but "foo" is an error.
17491  #
17492  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17493  # It is also a way to make sure we got the proper file name for the real test later on.
17494  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17495  if test "x$test_shortpath" = x; then
17496    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
17497$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
17498    as_fn_error $? "Cannot locate the the path of MSVCR_DLL" "$LINENO" 5
17499  fi
17500
17501  # Call helper function which possibly converts this using DOS-style short mode.
17502  # If so, the updated path is stored in $new_path.
17503
17504  input_path="$new_path"
17505  # Check if we need to convert this using DOS-style short mode. If the path
17506  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17507  # take no chances and rewrite it.
17508  # Note: m4 eats our [], so we need to use [ and ] instead.
17509  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17510  if test "x$has_forbidden_chars" != x; then
17511    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17512    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17513    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17514    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17515      # Going to short mode and back again did indeed matter. Since short mode is
17516      # case insensitive, let's make it lowercase to improve readability.
17517      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17518      # Now convert it back to Unix-stile (cygpath)
17519      input_path=`$CYGPATH -u "$shortmode_path"`
17520      new_path="$input_path"
17521    fi
17522  fi
17523
17524  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17525  if test "x$test_cygdrive_prefix" = x; then
17526    # As a simple fix, exclude /usr/bin since it's not a real path.
17527    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17528      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17529      # a path prefixed by /cygdrive for fixpath to work.
17530      new_path="$CYGWIN_ROOT_PATH$input_path"
17531    fi
17532  fi
17533
17534
17535  if test "x$path" != "x$new_path"; then
17536    MSVCR_DLL="$new_path"
17537    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
17538$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
17539  fi
17540
17541  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17542
17543  path="$MSVCR_DLL"
17544  has_colon=`$ECHO $path | $GREP ^.:`
17545  new_path="$path"
17546  if test "x$has_colon" = x; then
17547    # Not in mixed or Windows style, start by that.
17548    new_path=`cmd //c echo $path`
17549  fi
17550
17551
17552  input_path="$new_path"
17553  # Check if we need to convert this using DOS-style short mode. If the path
17554  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17555  # take no chances and rewrite it.
17556  # Note: m4 eats our [], so we need to use [ and ] instead.
17557  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17558  if test "x$has_forbidden_chars" != x; then
17559    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17560    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17561  fi
17562
17563
17564  windows_path="$new_path"
17565  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17566    unix_path=`$CYGPATH -u "$windows_path"`
17567    new_path="$unix_path"
17568  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17569    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17570    new_path="$unix_path"
17571  fi
17572
17573  if test "x$path" != "x$new_path"; then
17574    MSVCR_DLL="$new_path"
17575    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
17576$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
17577  fi
17578
17579  # Save the first 10 bytes of this path to the storage, so fixpath can work.
17580  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17581
17582  else
17583    # We're on a posix platform. Hooray! :)
17584    path="$MSVCR_DLL"
17585    has_space=`$ECHO "$path" | $GREP " "`
17586    if test "x$has_space" != x; then
17587      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
17588$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
17589      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17590    fi
17591
17592    # Use eval to expand a potential ~
17593    eval path="$path"
17594    if test ! -f "$path" && test ! -d "$path"; then
17595      as_fn_error $? "The path of MSVCR_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
17596    fi
17597
17598    MSVCR_DLL="`cd "$path"; $THEPWDCMD -L`"
17599  fi
17600
17601
17602
17603
17604# Check whether --with-dxsdk was given.
17605if test "${with_dxsdk+set}" = set; then :
17606  withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
17607$as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
17608fi
17609
17610
17611
17612
17613# Check whether --with-dxsdk-lib was given.
17614if test "${with_dxsdk_lib+set}" = set; then :
17615  withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
17616$as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
17617fi
17618
17619
17620
17621
17622# Check whether --with-dxsdk-include was given.
17623if test "${with_dxsdk_include+set}" = set; then :
17624  withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
17625$as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
17626fi
17627
17628
17629fi
17630
17631
17632
17633# If --build AND --host is set, then the configure script will find any
17634# cross compilation tools in the PATH. Cross compilation tools
17635# follows the cross compilation standard where they are prefixed with ${host}.
17636# For example the binary i686-sun-solaris2.10-gcc
17637# will cross compile for i686-sun-solaris2.10
17638# If neither of build and host is not set, then build=host and the
17639# default compiler found in the path will be used.
17640# Setting only --host, does not seem to be really supported.
17641# Please set both --build and --host if you want to cross compile.
17642
17643if test "x$COMPILE_TYPE" = "xcross"; then
17644    # Now we to find a C/C++ compiler that can build executables for the build
17645    # platform. We can't use the AC_PROG_CC macro, since it can only be used
17646    # once. Also, we need to do this before adding a tools dir to the path,
17647    # otherwise we might pick up cross-compilers which don't use standard naming.
17648    # Otherwise, we'll set the BUILD_tools to the native tools, but that'll have
17649    # to wait until they are properly discovered.
17650    for ac_prog in cl cc gcc
17651do
17652  # Extract the first word of "$ac_prog", so it can be a program name with args.
17653set dummy $ac_prog; ac_word=$2
17654{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17655$as_echo_n "checking for $ac_word... " >&6; }
17656if ${ac_cv_path_BUILD_CC+:} false; then :
17657  $as_echo_n "(cached) " >&6
17658else
17659  case $BUILD_CC in
17660  [\\/]* | ?:[\\/]*)
17661  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
17662  ;;
17663  *)
17664  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17665for as_dir in $PATH
17666do
17667  IFS=$as_save_IFS
17668  test -z "$as_dir" && as_dir=.
17669    for ac_exec_ext in '' $ac_executable_extensions; do
17670  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17671    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
17672    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17673    break 2
17674  fi
17675done
17676  done
17677IFS=$as_save_IFS
17678
17679  ;;
17680esac
17681fi
17682BUILD_CC=$ac_cv_path_BUILD_CC
17683if test -n "$BUILD_CC"; then
17684  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
17685$as_echo "$BUILD_CC" >&6; }
17686else
17687  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17688$as_echo "no" >&6; }
17689fi
17690
17691
17692  test -n "$BUILD_CC" && break
17693done
17694
17695
17696  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17697
17698  # First separate the path from the arguments. This will split at the first
17699  # space.
17700  complete="$BUILD_CC"
17701  path="${complete%% *}"
17702  tmp="$complete EOL"
17703  arguments="${tmp#* }"
17704
17705  # Input might be given as Windows format, start by converting to
17706  # unix format.
17707  new_path=`$CYGPATH -u "$path"`
17708
17709  # Now try to locate executable using which
17710  new_path=`$WHICH "$new_path" 2> /dev/null`
17711  # bat and cmd files are not always considered executable in cygwin causing which
17712  # to not find them
17713  if test "x$new_path" = x \
17714           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17715           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17716    new_path=`$CYGPATH -u "$path"`
17717  fi
17718  if test "x$new_path" = x; then
17719    # Oops. Which didn't find the executable.
17720    # The splitting of arguments from the executable at a space might have been incorrect,
17721    # since paths with space are more likely in Windows. Give it another try with the whole
17722    # argument.
17723    path="$complete"
17724    arguments="EOL"
17725    new_path=`$CYGPATH -u "$path"`
17726    new_path=`$WHICH "$new_path" 2> /dev/null`
17727    # bat and cmd files are not always considered executable in cygwin causing which
17728    # to not find them
17729    if test "x$new_path" = x \
17730             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17731             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17732      new_path=`$CYGPATH -u "$path"`
17733    fi
17734    if test "x$new_path" = x; then
17735      # It's still not found. Now this is an unrecoverable error.
17736      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
17737$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
17738      has_space=`$ECHO "$complete" | $GREP " "`
17739      if test "x$has_space" != x; then
17740        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17741$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17742      fi
17743      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
17744    fi
17745  fi
17746
17747  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17748  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17749  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17750  # "foo.exe" is OK but "foo" is an error.
17751  #
17752  # This test is therefore slightly more accurate than "test -f" to check for file presence.
17753  # It is also a way to make sure we got the proper file name for the real test later on.
17754  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17755  if test "x$test_shortpath" = x; then
17756    # Short path failed, file does not exist as specified.
17757    # Try adding .exe or .cmd
17758    if test -f "${new_path}.exe"; then
17759       input_to_shortpath="${new_path}.exe"
17760    elif test -f "${new_path}.cmd"; then
17761       input_to_shortpath="${new_path}.cmd"
17762    else
17763      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
17764$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
17765      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17766$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17767      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
17768    fi
17769  else
17770    input_to_shortpath="$new_path"
17771  fi
17772
17773  # Call helper function which possibly converts this using DOS-style short mode.
17774  # If so, the updated path is stored in $new_path.
17775  new_path="$input_to_shortpath"
17776
17777  input_path="$input_to_shortpath"
17778  # Check if we need to convert this using DOS-style short mode. If the path
17779  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17780  # take no chances and rewrite it.
17781  # Note: m4 eats our [], so we need to use [ and ] instead.
17782  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17783  if test "x$has_forbidden_chars" != x; then
17784    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17785    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17786    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17787    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17788      # Going to short mode and back again did indeed matter. Since short mode is
17789      # case insensitive, let's make it lowercase to improve readability.
17790      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17791      # Now convert it back to Unix-stile (cygpath)
17792      input_path=`$CYGPATH -u "$shortmode_path"`
17793      new_path="$input_path"
17794    fi
17795  fi
17796
17797  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17798  if test "x$test_cygdrive_prefix" = x; then
17799    # As a simple fix, exclude /usr/bin since it's not a real path.
17800    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17801      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17802      # a path prefixed by /cygdrive for fixpath to work.
17803      new_path="$CYGWIN_ROOT_PATH$input_path"
17804    fi
17805  fi
17806
17807  # remove trailing .exe if any
17808  new_path="${new_path/%.exe/}"
17809
17810  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17811
17812  # First separate the path from the arguments. This will split at the first
17813  # space.
17814  complete="$BUILD_CC"
17815  path="${complete%% *}"
17816  tmp="$complete EOL"
17817  arguments="${tmp#* }"
17818
17819  # Input might be given as Windows format, start by converting to
17820  # unix format.
17821  new_path="$path"
17822
17823  windows_path="$new_path"
17824  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17825    unix_path=`$CYGPATH -u "$windows_path"`
17826    new_path="$unix_path"
17827  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17828    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17829    new_path="$unix_path"
17830  fi
17831
17832
17833  # Now try to locate executable using which
17834  new_path=`$WHICH "$new_path" 2> /dev/null`
17835
17836  if test "x$new_path" = x; then
17837    # Oops. Which didn't find the executable.
17838    # The splitting of arguments from the executable at a space might have been incorrect,
17839    # since paths with space are more likely in Windows. Give it another try with the whole
17840    # argument.
17841    path="$complete"
17842    arguments="EOL"
17843    new_path="$path"
17844
17845  windows_path="$new_path"
17846  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17847    unix_path=`$CYGPATH -u "$windows_path"`
17848    new_path="$unix_path"
17849  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17850    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17851    new_path="$unix_path"
17852  fi
17853
17854
17855    new_path=`$WHICH "$new_path" 2> /dev/null`
17856
17857    if test "x$new_path" = x; then
17858      # It's still not found. Now this is an unrecoverable error.
17859      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
17860$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
17861      has_space=`$ECHO "$complete" | $GREP " "`
17862      if test "x$has_space" != x; then
17863        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17864$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17865      fi
17866      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
17867    fi
17868  fi
17869
17870  # Now new_path has a complete unix path to the binary
17871  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17872    # Keep paths in /bin as-is, but remove trailing .exe if any
17873    new_path="${new_path/%.exe/}"
17874    # Do not save /bin paths to all_fixpath_prefixes!
17875  else
17876    # Not in mixed or Windows style, start by that.
17877    new_path=`cmd //c echo $new_path`
17878
17879  input_path="$new_path"
17880  # Check if we need to convert this using DOS-style short mode. If the path
17881  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17882  # take no chances and rewrite it.
17883  # Note: m4 eats our [], so we need to use [ and ] instead.
17884  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17885  if test "x$has_forbidden_chars" != x; then
17886    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17887    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17888  fi
17889
17890    # Output is in $new_path
17891
17892  windows_path="$new_path"
17893  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17894    unix_path=`$CYGPATH -u "$windows_path"`
17895    new_path="$unix_path"
17896  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17897    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17898    new_path="$unix_path"
17899  fi
17900
17901    # remove trailing .exe if any
17902    new_path="${new_path/%.exe/}"
17903
17904    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17905    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17906  fi
17907
17908  else
17909    # We're on a posix platform. Hooray! :)
17910    # First separate the path from the arguments. This will split at the first
17911    # space.
17912    complete="$BUILD_CC"
17913    path="${complete%% *}"
17914    tmp="$complete EOL"
17915    arguments="${tmp#* }"
17916
17917    # Cannot rely on the command "which" here since it doesn't always work.
17918    is_absolute_path=`$ECHO "$path" | $GREP ^/`
17919    if test -z "$is_absolute_path"; then
17920      # Path to executable is not absolute. Find it.
17921      IFS_save="$IFS"
17922      IFS=:
17923      for p in $PATH; do
17924        if test -f "$p/$path" && test -x "$p/$path"; then
17925          new_path="$p/$path"
17926          break
17927        fi
17928      done
17929      IFS="$IFS_save"
17930    else
17931      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CC (as $path) failed, using $path directly." >&5
17932$as_echo "$as_me: Resolving BUILD_CC (as $path) failed, using $path directly." >&6;}
17933      new_path="$path"
17934    fi
17935
17936    if test "x$new_path" = x; then
17937        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
17938$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
17939        has_space=`$ECHO "$complete" | $GREP " "`
17940        if test "x$has_space" != x; then
17941          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17942$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17943        fi
17944        as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
17945      fi
17946  fi
17947
17948      # Now join together the path and the arguments once again
17949      if test "x$arguments" != xEOL; then
17950        new_complete="$new_path ${arguments% *}"
17951      else
17952        new_complete="$new_path"
17953      fi
17954
17955  if test "x$complete" != "x$new_complete"; then
17956      BUILD_CC="$new_complete"
17957      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
17958$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
17959    fi
17960
17961    for ac_prog in cl CC g++
17962do
17963  # Extract the first word of "$ac_prog", so it can be a program name with args.
17964set dummy $ac_prog; ac_word=$2
17965{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17966$as_echo_n "checking for $ac_word... " >&6; }
17967if ${ac_cv_path_BUILD_CXX+:} false; then :
17968  $as_echo_n "(cached) " >&6
17969else
17970  case $BUILD_CXX in
17971  [\\/]* | ?:[\\/]*)
17972  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
17973  ;;
17974  *)
17975  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17976for as_dir in $PATH
17977do
17978  IFS=$as_save_IFS
17979  test -z "$as_dir" && as_dir=.
17980    for ac_exec_ext in '' $ac_executable_extensions; do
17981  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17982    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
17983    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17984    break 2
17985  fi
17986done
17987  done
17988IFS=$as_save_IFS
17989
17990  ;;
17991esac
17992fi
17993BUILD_CXX=$ac_cv_path_BUILD_CXX
17994if test -n "$BUILD_CXX"; then
17995  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
17996$as_echo "$BUILD_CXX" >&6; }
17997else
17998  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17999$as_echo "no" >&6; }
18000fi
18001
18002
18003  test -n "$BUILD_CXX" && break
18004done
18005
18006
18007  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18008
18009  # First separate the path from the arguments. This will split at the first
18010  # space.
18011  complete="$BUILD_CXX"
18012  path="${complete%% *}"
18013  tmp="$complete EOL"
18014  arguments="${tmp#* }"
18015
18016  # Input might be given as Windows format, start by converting to
18017  # unix format.
18018  new_path=`$CYGPATH -u "$path"`
18019
18020  # Now try to locate executable using which
18021  new_path=`$WHICH "$new_path" 2> /dev/null`
18022  # bat and cmd files are not always considered executable in cygwin causing which
18023  # to not find them
18024  if test "x$new_path" = x \
18025           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18026           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18027    new_path=`$CYGPATH -u "$path"`
18028  fi
18029  if test "x$new_path" = x; then
18030    # Oops. Which didn't find the executable.
18031    # The splitting of arguments from the executable at a space might have been incorrect,
18032    # since paths with space are more likely in Windows. Give it another try with the whole
18033    # argument.
18034    path="$complete"
18035    arguments="EOL"
18036    new_path=`$CYGPATH -u "$path"`
18037    new_path=`$WHICH "$new_path" 2> /dev/null`
18038    # bat and cmd files are not always considered executable in cygwin causing which
18039    # to not find them
18040    if test "x$new_path" = x \
18041             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18042             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18043      new_path=`$CYGPATH -u "$path"`
18044    fi
18045    if test "x$new_path" = x; then
18046      # It's still not found. Now this is an unrecoverable error.
18047      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
18048$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
18049      has_space=`$ECHO "$complete" | $GREP " "`
18050      if test "x$has_space" != x; then
18051        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18052$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18053      fi
18054      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18055    fi
18056  fi
18057
18058  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18059  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18060  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18061  # "foo.exe" is OK but "foo" is an error.
18062  #
18063  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18064  # It is also a way to make sure we got the proper file name for the real test later on.
18065  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18066  if test "x$test_shortpath" = x; then
18067    # Short path failed, file does not exist as specified.
18068    # Try adding .exe or .cmd
18069    if test -f "${new_path}.exe"; then
18070       input_to_shortpath="${new_path}.exe"
18071    elif test -f "${new_path}.cmd"; then
18072       input_to_shortpath="${new_path}.cmd"
18073    else
18074      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
18075$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
18076      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18077$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18078      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18079    fi
18080  else
18081    input_to_shortpath="$new_path"
18082  fi
18083
18084  # Call helper function which possibly converts this using DOS-style short mode.
18085  # If so, the updated path is stored in $new_path.
18086  new_path="$input_to_shortpath"
18087
18088  input_path="$input_to_shortpath"
18089  # Check if we need to convert this using DOS-style short mode. If the path
18090  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18091  # take no chances and rewrite it.
18092  # Note: m4 eats our [], so we need to use [ and ] instead.
18093  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18094  if test "x$has_forbidden_chars" != x; then
18095    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18096    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18097    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18098    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18099      # Going to short mode and back again did indeed matter. Since short mode is
18100      # case insensitive, let's make it lowercase to improve readability.
18101      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18102      # Now convert it back to Unix-stile (cygpath)
18103      input_path=`$CYGPATH -u "$shortmode_path"`
18104      new_path="$input_path"
18105    fi
18106  fi
18107
18108  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18109  if test "x$test_cygdrive_prefix" = x; then
18110    # As a simple fix, exclude /usr/bin since it's not a real path.
18111    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18112      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18113      # a path prefixed by /cygdrive for fixpath to work.
18114      new_path="$CYGWIN_ROOT_PATH$input_path"
18115    fi
18116  fi
18117
18118  # remove trailing .exe if any
18119  new_path="${new_path/%.exe/}"
18120
18121  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18122
18123  # First separate the path from the arguments. This will split at the first
18124  # space.
18125  complete="$BUILD_CXX"
18126  path="${complete%% *}"
18127  tmp="$complete EOL"
18128  arguments="${tmp#* }"
18129
18130  # Input might be given as Windows format, start by converting to
18131  # unix format.
18132  new_path="$path"
18133
18134  windows_path="$new_path"
18135  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18136    unix_path=`$CYGPATH -u "$windows_path"`
18137    new_path="$unix_path"
18138  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18139    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18140    new_path="$unix_path"
18141  fi
18142
18143
18144  # Now try to locate executable using which
18145  new_path=`$WHICH "$new_path" 2> /dev/null`
18146
18147  if test "x$new_path" = x; then
18148    # Oops. Which didn't find the executable.
18149    # The splitting of arguments from the executable at a space might have been incorrect,
18150    # since paths with space are more likely in Windows. Give it another try with the whole
18151    # argument.
18152    path="$complete"
18153    arguments="EOL"
18154    new_path="$path"
18155
18156  windows_path="$new_path"
18157  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18158    unix_path=`$CYGPATH -u "$windows_path"`
18159    new_path="$unix_path"
18160  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18161    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18162    new_path="$unix_path"
18163  fi
18164
18165
18166    new_path=`$WHICH "$new_path" 2> /dev/null`
18167
18168    if test "x$new_path" = x; then
18169      # It's still not found. Now this is an unrecoverable error.
18170      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
18171$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
18172      has_space=`$ECHO "$complete" | $GREP " "`
18173      if test "x$has_space" != x; then
18174        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18175$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18176      fi
18177      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18178    fi
18179  fi
18180
18181  # Now new_path has a complete unix path to the binary
18182  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18183    # Keep paths in /bin as-is, but remove trailing .exe if any
18184    new_path="${new_path/%.exe/}"
18185    # Do not save /bin paths to all_fixpath_prefixes!
18186  else
18187    # Not in mixed or Windows style, start by that.
18188    new_path=`cmd //c echo $new_path`
18189
18190  input_path="$new_path"
18191  # Check if we need to convert this using DOS-style short mode. If the path
18192  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18193  # take no chances and rewrite it.
18194  # Note: m4 eats our [], so we need to use [ and ] instead.
18195  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18196  if test "x$has_forbidden_chars" != x; then
18197    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18198    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18199  fi
18200
18201    # Output is in $new_path
18202
18203  windows_path="$new_path"
18204  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18205    unix_path=`$CYGPATH -u "$windows_path"`
18206    new_path="$unix_path"
18207  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18208    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18209    new_path="$unix_path"
18210  fi
18211
18212    # remove trailing .exe if any
18213    new_path="${new_path/%.exe/}"
18214
18215    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18216    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18217  fi
18218
18219  else
18220    # We're on a posix platform. Hooray! :)
18221    # First separate the path from the arguments. This will split at the first
18222    # space.
18223    complete="$BUILD_CXX"
18224    path="${complete%% *}"
18225    tmp="$complete EOL"
18226    arguments="${tmp#* }"
18227
18228    # Cannot rely on the command "which" here since it doesn't always work.
18229    is_absolute_path=`$ECHO "$path" | $GREP ^/`
18230    if test -z "$is_absolute_path"; then
18231      # Path to executable is not absolute. Find it.
18232      IFS_save="$IFS"
18233      IFS=:
18234      for p in $PATH; do
18235        if test -f "$p/$path" && test -x "$p/$path"; then
18236          new_path="$p/$path"
18237          break
18238        fi
18239      done
18240      IFS="$IFS_save"
18241    else
18242      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CXX (as $path) failed, using $path directly." >&5
18243$as_echo "$as_me: Resolving BUILD_CXX (as $path) failed, using $path directly." >&6;}
18244      new_path="$path"
18245    fi
18246
18247    if test "x$new_path" = x; then
18248        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
18249$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
18250        has_space=`$ECHO "$complete" | $GREP " "`
18251        if test "x$has_space" != x; then
18252          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18253$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18254        fi
18255        as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18256      fi
18257  fi
18258
18259      # Now join together the path and the arguments once again
18260      if test "x$arguments" != xEOL; then
18261        new_complete="$new_path ${arguments% *}"
18262      else
18263        new_complete="$new_path"
18264      fi
18265
18266  if test "x$complete" != "x$new_complete"; then
18267      BUILD_CXX="$new_complete"
18268      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
18269$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
18270    fi
18271
18272    # Extract the first word of "ld", so it can be a program name with args.
18273set dummy ld; ac_word=$2
18274{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18275$as_echo_n "checking for $ac_word... " >&6; }
18276if ${ac_cv_path_BUILD_LD+:} false; then :
18277  $as_echo_n "(cached) " >&6
18278else
18279  case $BUILD_LD in
18280  [\\/]* | ?:[\\/]*)
18281  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
18282  ;;
18283  *)
18284  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18285for as_dir in $PATH
18286do
18287  IFS=$as_save_IFS
18288  test -z "$as_dir" && as_dir=.
18289    for ac_exec_ext in '' $ac_executable_extensions; do
18290  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18291    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
18292    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18293    break 2
18294  fi
18295done
18296  done
18297IFS=$as_save_IFS
18298
18299  ;;
18300esac
18301fi
18302BUILD_LD=$ac_cv_path_BUILD_LD
18303if test -n "$BUILD_LD"; then
18304  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
18305$as_echo "$BUILD_LD" >&6; }
18306else
18307  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18308$as_echo "no" >&6; }
18309fi
18310
18311
18312
18313  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18314
18315  # First separate the path from the arguments. This will split at the first
18316  # space.
18317  complete="$BUILD_LD"
18318  path="${complete%% *}"
18319  tmp="$complete EOL"
18320  arguments="${tmp#* }"
18321
18322  # Input might be given as Windows format, start by converting to
18323  # unix format.
18324  new_path=`$CYGPATH -u "$path"`
18325
18326  # Now try to locate executable using which
18327  new_path=`$WHICH "$new_path" 2> /dev/null`
18328  # bat and cmd files are not always considered executable in cygwin causing which
18329  # to not find them
18330  if test "x$new_path" = x \
18331           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18332           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18333    new_path=`$CYGPATH -u "$path"`
18334  fi
18335  if test "x$new_path" = x; then
18336    # Oops. Which didn't find the executable.
18337    # The splitting of arguments from the executable at a space might have been incorrect,
18338    # since paths with space are more likely in Windows. Give it another try with the whole
18339    # argument.
18340    path="$complete"
18341    arguments="EOL"
18342    new_path=`$CYGPATH -u "$path"`
18343    new_path=`$WHICH "$new_path" 2> /dev/null`
18344    # bat and cmd files are not always considered executable in cygwin causing which
18345    # to not find them
18346    if test "x$new_path" = x \
18347             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18348             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18349      new_path=`$CYGPATH -u "$path"`
18350    fi
18351    if test "x$new_path" = x; then
18352      # It's still not found. Now this is an unrecoverable error.
18353      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
18354$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
18355      has_space=`$ECHO "$complete" | $GREP " "`
18356      if test "x$has_space" != x; then
18357        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18358$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18359      fi
18360      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18361    fi
18362  fi
18363
18364  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18365  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18366  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18367  # "foo.exe" is OK but "foo" is an error.
18368  #
18369  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18370  # It is also a way to make sure we got the proper file name for the real test later on.
18371  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18372  if test "x$test_shortpath" = x; then
18373    # Short path failed, file does not exist as specified.
18374    # Try adding .exe or .cmd
18375    if test -f "${new_path}.exe"; then
18376       input_to_shortpath="${new_path}.exe"
18377    elif test -f "${new_path}.cmd"; then
18378       input_to_shortpath="${new_path}.cmd"
18379    else
18380      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&5
18381$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&6;}
18382      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18383$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18384      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18385    fi
18386  else
18387    input_to_shortpath="$new_path"
18388  fi
18389
18390  # Call helper function which possibly converts this using DOS-style short mode.
18391  # If so, the updated path is stored in $new_path.
18392  new_path="$input_to_shortpath"
18393
18394  input_path="$input_to_shortpath"
18395  # Check if we need to convert this using DOS-style short mode. If the path
18396  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18397  # take no chances and rewrite it.
18398  # Note: m4 eats our [], so we need to use [ and ] instead.
18399  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18400  if test "x$has_forbidden_chars" != x; then
18401    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18402    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18403    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18404    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18405      # Going to short mode and back again did indeed matter. Since short mode is
18406      # case insensitive, let's make it lowercase to improve readability.
18407      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18408      # Now convert it back to Unix-stile (cygpath)
18409      input_path=`$CYGPATH -u "$shortmode_path"`
18410      new_path="$input_path"
18411    fi
18412  fi
18413
18414  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18415  if test "x$test_cygdrive_prefix" = x; then
18416    # As a simple fix, exclude /usr/bin since it's not a real path.
18417    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18418      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18419      # a path prefixed by /cygdrive for fixpath to work.
18420      new_path="$CYGWIN_ROOT_PATH$input_path"
18421    fi
18422  fi
18423
18424  # remove trailing .exe if any
18425  new_path="${new_path/%.exe/}"
18426
18427  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18428
18429  # First separate the path from the arguments. This will split at the first
18430  # space.
18431  complete="$BUILD_LD"
18432  path="${complete%% *}"
18433  tmp="$complete EOL"
18434  arguments="${tmp#* }"
18435
18436  # Input might be given as Windows format, start by converting to
18437  # unix format.
18438  new_path="$path"
18439
18440  windows_path="$new_path"
18441  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18442    unix_path=`$CYGPATH -u "$windows_path"`
18443    new_path="$unix_path"
18444  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18445    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18446    new_path="$unix_path"
18447  fi
18448
18449
18450  # Now try to locate executable using which
18451  new_path=`$WHICH "$new_path" 2> /dev/null`
18452
18453  if test "x$new_path" = x; then
18454    # Oops. Which didn't find the executable.
18455    # The splitting of arguments from the executable at a space might have been incorrect,
18456    # since paths with space are more likely in Windows. Give it another try with the whole
18457    # argument.
18458    path="$complete"
18459    arguments="EOL"
18460    new_path="$path"
18461
18462  windows_path="$new_path"
18463  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18464    unix_path=`$CYGPATH -u "$windows_path"`
18465    new_path="$unix_path"
18466  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18467    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18468    new_path="$unix_path"
18469  fi
18470
18471
18472    new_path=`$WHICH "$new_path" 2> /dev/null`
18473
18474    if test "x$new_path" = x; then
18475      # It's still not found. Now this is an unrecoverable error.
18476      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
18477$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
18478      has_space=`$ECHO "$complete" | $GREP " "`
18479      if test "x$has_space" != x; then
18480        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18481$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18482      fi
18483      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18484    fi
18485  fi
18486
18487  # Now new_path has a complete unix path to the binary
18488  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18489    # Keep paths in /bin as-is, but remove trailing .exe if any
18490    new_path="${new_path/%.exe/}"
18491    # Do not save /bin paths to all_fixpath_prefixes!
18492  else
18493    # Not in mixed or Windows style, start by that.
18494    new_path=`cmd //c echo $new_path`
18495
18496  input_path="$new_path"
18497  # Check if we need to convert this using DOS-style short mode. If the path
18498  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18499  # take no chances and rewrite it.
18500  # Note: m4 eats our [], so we need to use [ and ] instead.
18501  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18502  if test "x$has_forbidden_chars" != x; then
18503    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18504    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18505  fi
18506
18507    # Output is in $new_path
18508
18509  windows_path="$new_path"
18510  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18511    unix_path=`$CYGPATH -u "$windows_path"`
18512    new_path="$unix_path"
18513  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18514    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18515    new_path="$unix_path"
18516  fi
18517
18518    # remove trailing .exe if any
18519    new_path="${new_path/%.exe/}"
18520
18521    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18522    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18523  fi
18524
18525  else
18526    # We're on a posix platform. Hooray! :)
18527    # First separate the path from the arguments. This will split at the first
18528    # space.
18529    complete="$BUILD_LD"
18530    path="${complete%% *}"
18531    tmp="$complete EOL"
18532    arguments="${tmp#* }"
18533
18534    # Cannot rely on the command "which" here since it doesn't always work.
18535    is_absolute_path=`$ECHO "$path" | $GREP ^/`
18536    if test -z "$is_absolute_path"; then
18537      # Path to executable is not absolute. Find it.
18538      IFS_save="$IFS"
18539      IFS=:
18540      for p in $PATH; do
18541        if test -f "$p/$path" && test -x "$p/$path"; then
18542          new_path="$p/$path"
18543          break
18544        fi
18545      done
18546      IFS="$IFS_save"
18547    else
18548      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_LD (as $path) failed, using $path directly." >&5
18549$as_echo "$as_me: Resolving BUILD_LD (as $path) failed, using $path directly." >&6;}
18550      new_path="$path"
18551    fi
18552
18553    if test "x$new_path" = x; then
18554        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
18555$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
18556        has_space=`$ECHO "$complete" | $GREP " "`
18557        if test "x$has_space" != x; then
18558          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18559$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18560        fi
18561        as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18562      fi
18563  fi
18564
18565      # Now join together the path and the arguments once again
18566      if test "x$arguments" != xEOL; then
18567        new_complete="$new_path ${arguments% *}"
18568      else
18569        new_complete="$new_path"
18570      fi
18571
18572  if test "x$complete" != "x$new_complete"; then
18573      BUILD_LD="$new_complete"
18574      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_LD to \"$new_complete\"" >&5
18575$as_echo "$as_me: Rewriting BUILD_LD to \"$new_complete\"" >&6;}
18576    fi
18577
18578fi
18579
18580
18581
18582
18583# If a devkit is found on the builddeps server, then prepend its path to the
18584# PATH variable. If there are cross compilers available in the devkit, these
18585# will be found by AC_PROG_CC et al.
18586DEVKIT=
18587
18588
18589    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
18590        # Source the builddeps file again, to make sure it uses the latest variables!
18591        . $builddepsfile
18592        # Look for a target and build machine specific resource!
18593        eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
18594        if test "x$resource" = x; then
18595            # Ok, lets instead look for a target specific resource
18596            eval resource=\${builddep_devkit_TARGET_${rewritten_target_var}}
18597        fi
18598        if test "x$resource" = x; then
18599            # Ok, lets instead look for a build specific resource
18600            eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}}
18601        fi
18602        if test "x$resource" = x; then
18603            # Ok, lets instead look for a generic resource
18604            # (The devkit comes from M4 and not the shell, thus no need for eval here.)
18605            resource=${builddep_devkit}
18606        fi
18607        if test "x$resource" != x; then
18608            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for devkit" >&5
18609$as_echo "$as_me: Using builddeps $resource for devkit" >&6;}
18610	    # If the resource in the builddeps.conf file is an existing directory,
18611	    # for example /java/linux/cups
18612	    if test -d ${resource}; then
18613	       depdir=${resource}
18614	    else
18615
18616# devkit is for example mymodule
18617# $resource is for example libs/general/libmymod_1_2_3.zip
18618# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
18619# $with_builddeps_dir is for example /localhome/builddeps
18620# depdir is the name of the variable into which we store the depdir, eg MYMOD
18621# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
18622# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
18623    filename=`basename $resource`
18624    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
18625    filebase=${filename%%.*}
18626    extension=${filename#*.}
18627    installdir=$with_builddeps_dir/$filebase
18628    if test ! -f $installdir/$filename.unpacked; then
18629        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&5
18630$as_echo "$as_me: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&6;}
18631        if test ! -d $installdir; then
18632            mkdir -p $installdir
18633        fi
18634        if test ! -d $installdir; then
18635            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
18636        fi
18637        tmpfile=`mktemp $installdir/devkit.XXXXXXXXX`
18638        touch $tmpfile
18639        if test ! -f $tmpfile; then
18640            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
18641        fi
18642
18643    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
18644    # $tmpfile is the local file name for the downloaded file.
18645    VALID_TOOL=no
18646    if test "x$BDEPS_FTP" = xwget; then
18647       VALID_TOOL=yes
18648       wget -O $tmpfile $with_builddeps_server/$resource
18649    fi
18650    if test "x$BDEPS_FTP" = xlftp; then
18651       VALID_TOOL=yes
18652       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
18653    fi
18654    if test "x$BDEPS_FTP" = xftp; then
18655        VALID_TOOL=yes
18656        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
18657        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
18658        FTPUSERPWD=${FTPSERVER%%@*}
18659        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
18660            FTPUSER=${userpwd%%:*}
18661            FTPPWD=${userpwd#*@}
18662            FTPSERVER=${FTPSERVER#*@}
18663        else
18664            FTPUSER=ftp
18665            FTPPWD=ftp
18666        fi
18667        # the "pass" command does not work on some
18668        # ftp clients (read ftp.exe) but if it works,
18669        # passive mode is better!
18670        (\
18671            echo "user $FTPUSER $FTPPWD"        ;\
18672            echo "pass"                         ;\
18673            echo "bin"                          ;\
18674            echo "get $FTPPATH $tmpfile"              ;\
18675        ) | ftp -in $FTPSERVER
18676    fi
18677    if test "x$VALID_TOOL" != xyes; then
18678       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
18679    fi
18680
18681        mv $tmpfile $installdir/$filename
18682        if test ! -s $installdir/$filename; then
18683            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
18684        fi
18685        case "$extension" in
18686            zip)  echo "Unzipping $installdir/$filename..."
18687               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
18688            ;;
18689            tar.gz) echo "Untaring $installdir/$filename..."
18690               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
18691            ;;
18692            tgz) echo "Untaring $installdir/$filename..."
18693               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
18694            ;;
18695            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
18696            ;;
18697        esac
18698    fi
18699    if test -f $installdir/$filename.unpacked; then
18700        depdir=$installdir
18701    fi
18702
18703	    fi
18704            # Source the builddeps file again, because in the previous command, the depdir
18705            # was updated to point at the current build dependency install directory.
18706            . $builddepsfile
18707            # Now extract variables from the builddeps.conf files.
18708            theroot=${builddep_devkit_ROOT}
18709            thecflags=${builddep_devkit_CFLAGS}
18710            thelibs=${builddep_devkit_LIBS}
18711            if test "x$depdir" = x; then
18712                as_fn_error $? "Could not download build dependency devkit" "$LINENO" 5
18713            fi
18714            DEVKIT=$depdir
18715            if test "x$theroot" != x; then
18716               DEVKIT="$theroot"
18717            fi
18718            if test "x$thecflags" != x; then
18719               DEVKIT_CFLAGS="$thecflags"
18720            fi
18721            if test "x$thelibs" != x; then
18722               DEVKIT_LIBS="$thelibs"
18723            fi
18724            # Found devkit
18725                     PATH="$DEVKIT/bin:$PATH"
18726                     SYS_ROOT="$DEVKIT/${rewritten_target}/sys-root"
18727                     if test "x$x_includes" = "xNONE"; then
18728                         x_includes="$SYS_ROOT/usr/include/X11"
18729                     fi
18730                     if test "x$x_libraries" = "xNONE"; then
18731                         x_libraries="$SYS_ROOT/usr/lib"
18732                     fi
18733
18734
18735        fi
18736
18737    fi
18738
18739
18740# Store the CFLAGS etal passed to the configure script.
18741ORG_CFLAGS="$CFLAGS"
18742ORG_CXXFLAGS="$CXXFLAGS"
18743ORG_OBJCFLAGS="$OBJCFLAGS"
18744
18745# autoconf magic only relies on PATH, so update it if tools dir is specified
18746OLD_PATH="$PATH"
18747if test "x$TOOLS_DIR" != x; then
18748  PATH=$TOOLS_DIR:$PATH
18749fi
18750
18751
18752### Locate C compiler (CC)
18753
18754# On windows, only cl.exe is supported.
18755# On Solaris, cc is preferred to gcc.
18756# Elsewhere, gcc is preferred to cc.
18757
18758if test "x$CC" != x; then
18759  COMPILER_CHECK_LIST="$CC"
18760elif test "x$OPENJDK_TARGET_OS" = "xwindows"; then
18761  COMPILER_CHECK_LIST="cl"
18762elif test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
18763  COMPILER_CHECK_LIST="cc gcc"
18764else
18765  COMPILER_CHECK_LIST="gcc cc"
18766fi
18767
18768
18769  COMPILER_NAME=C
18770
18771  CC=
18772  # If TOOLS_DIR is set, check for all compiler names in there first
18773  # before checking the rest of the PATH.
18774  if test -n "$TOOLS_DIR"; then
18775    PATH_save="$PATH"
18776    PATH="$TOOLS_DIR"
18777    for ac_prog in $COMPILER_CHECK_LIST
18778do
18779  # Extract the first word of "$ac_prog", so it can be a program name with args.
18780set dummy $ac_prog; ac_word=$2
18781{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18782$as_echo_n "checking for $ac_word... " >&6; }
18783if ${ac_cv_path_TOOLS_DIR_CC+:} false; then :
18784  $as_echo_n "(cached) " >&6
18785else
18786  case $TOOLS_DIR_CC in
18787  [\\/]* | ?:[\\/]*)
18788  ac_cv_path_TOOLS_DIR_CC="$TOOLS_DIR_CC" # Let the user override the test with a path.
18789  ;;
18790  *)
18791  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18792for as_dir in $PATH
18793do
18794  IFS=$as_save_IFS
18795  test -z "$as_dir" && as_dir=.
18796    for ac_exec_ext in '' $ac_executable_extensions; do
18797  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18798    ac_cv_path_TOOLS_DIR_CC="$as_dir/$ac_word$ac_exec_ext"
18799    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18800    break 2
18801  fi
18802done
18803  done
18804IFS=$as_save_IFS
18805
18806  ;;
18807esac
18808fi
18809TOOLS_DIR_CC=$ac_cv_path_TOOLS_DIR_CC
18810if test -n "$TOOLS_DIR_CC"; then
18811  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CC" >&5
18812$as_echo "$TOOLS_DIR_CC" >&6; }
18813else
18814  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18815$as_echo "no" >&6; }
18816fi
18817
18818
18819  test -n "$TOOLS_DIR_CC" && break
18820done
18821
18822    CC=$TOOLS_DIR_CC
18823    PATH="$PATH_save"
18824  fi
18825
18826  # AC_PATH_PROGS can't be run multiple times with the same variable,
18827  # so create a new name for this run.
18828  if test "x$CC" = x; then
18829    for ac_prog in $COMPILER_CHECK_LIST
18830do
18831  # Extract the first word of "$ac_prog", so it can be a program name with args.
18832set dummy $ac_prog; ac_word=$2
18833{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18834$as_echo_n "checking for $ac_word... " >&6; }
18835if ${ac_cv_path_POTENTIAL_CC+:} false; then :
18836  $as_echo_n "(cached) " >&6
18837else
18838  case $POTENTIAL_CC in
18839  [\\/]* | ?:[\\/]*)
18840  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
18841  ;;
18842  *)
18843  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18844for as_dir in $PATH
18845do
18846  IFS=$as_save_IFS
18847  test -z "$as_dir" && as_dir=.
18848    for ac_exec_ext in '' $ac_executable_extensions; do
18849  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18850    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
18851    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18852    break 2
18853  fi
18854done
18855  done
18856IFS=$as_save_IFS
18857
18858  ;;
18859esac
18860fi
18861POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
18862if test -n "$POTENTIAL_CC"; then
18863  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
18864$as_echo "$POTENTIAL_CC" >&6; }
18865else
18866  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18867$as_echo "no" >&6; }
18868fi
18869
18870
18871  test -n "$POTENTIAL_CC" && break
18872done
18873
18874    CC=$POTENTIAL_CC
18875  fi
18876
18877  if test "x$CC" = x; then
18878
18879    # Print a helpful message on how to acquire the necessary build dependency.
18880    # devkit is the help tag: freetyp2, cups, pulse, alsa etc
18881    MISSING_DEPENDENCY=devkit
18882    PKGHANDLER_COMMAND=
18883
18884    case $PKGHANDLER in
18885	apt-get)
18886                apt_help     $MISSING_DEPENDENCY ;;
18887    yum)
18888                yum_help     $MISSING_DEPENDENCY ;;
18889	port)
18890                port_help    $MISSING_DEPENDENCY ;;
18891	pkgutil)
18892                pkgutil_help $MISSING_DEPENDENCY ;;
18893	pkgadd)
18894                pkgadd_help  $MISSING_DEPENDENCY ;;
18895    * )
18896      break ;;
18897    esac
18898
18899    if test "x$PKGHANDLER_COMMAND" != x; then
18900        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
18901    fi
18902
18903      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
18904  fi
18905
18906  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18907
18908  # First separate the path from the arguments. This will split at the first
18909  # space.
18910  complete="$CC"
18911  path="${complete%% *}"
18912  tmp="$complete EOL"
18913  arguments="${tmp#* }"
18914
18915  # Input might be given as Windows format, start by converting to
18916  # unix format.
18917  new_path=`$CYGPATH -u "$path"`
18918
18919  # Now try to locate executable using which
18920  new_path=`$WHICH "$new_path" 2> /dev/null`
18921  # bat and cmd files are not always considered executable in cygwin causing which
18922  # to not find them
18923  if test "x$new_path" = x \
18924           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18925           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18926    new_path=`$CYGPATH -u "$path"`
18927  fi
18928  if test "x$new_path" = x; then
18929    # Oops. Which didn't find the executable.
18930    # The splitting of arguments from the executable at a space might have been incorrect,
18931    # since paths with space are more likely in Windows. Give it another try with the whole
18932    # argument.
18933    path="$complete"
18934    arguments="EOL"
18935    new_path=`$CYGPATH -u "$path"`
18936    new_path=`$WHICH "$new_path" 2> /dev/null`
18937    # bat and cmd files are not always considered executable in cygwin causing which
18938    # to not find them
18939    if test "x$new_path" = x \
18940             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18941             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18942      new_path=`$CYGPATH -u "$path"`
18943    fi
18944    if test "x$new_path" = x; then
18945      # It's still not found. Now this is an unrecoverable error.
18946      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
18947$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
18948      has_space=`$ECHO "$complete" | $GREP " "`
18949      if test "x$has_space" != x; then
18950        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18951$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18952      fi
18953      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
18954    fi
18955  fi
18956
18957  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18958  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18959  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18960  # "foo.exe" is OK but "foo" is an error.
18961  #
18962  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18963  # It is also a way to make sure we got the proper file name for the real test later on.
18964  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18965  if test "x$test_shortpath" = x; then
18966    # Short path failed, file does not exist as specified.
18967    # Try adding .exe or .cmd
18968    if test -f "${new_path}.exe"; then
18969       input_to_shortpath="${new_path}.exe"
18970    elif test -f "${new_path}.cmd"; then
18971       input_to_shortpath="${new_path}.cmd"
18972    else
18973      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
18974$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
18975      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18976$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18977      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
18978    fi
18979  else
18980    input_to_shortpath="$new_path"
18981  fi
18982
18983  # Call helper function which possibly converts this using DOS-style short mode.
18984  # If so, the updated path is stored in $new_path.
18985  new_path="$input_to_shortpath"
18986
18987  input_path="$input_to_shortpath"
18988  # Check if we need to convert this using DOS-style short mode. If the path
18989  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18990  # take no chances and rewrite it.
18991  # Note: m4 eats our [], so we need to use [ and ] instead.
18992  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18993  if test "x$has_forbidden_chars" != x; then
18994    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18995    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18996    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18997    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18998      # Going to short mode and back again did indeed matter. Since short mode is
18999      # case insensitive, let's make it lowercase to improve readability.
19000      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19001      # Now convert it back to Unix-stile (cygpath)
19002      input_path=`$CYGPATH -u "$shortmode_path"`
19003      new_path="$input_path"
19004    fi
19005  fi
19006
19007  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19008  if test "x$test_cygdrive_prefix" = x; then
19009    # As a simple fix, exclude /usr/bin since it's not a real path.
19010    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19011      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19012      # a path prefixed by /cygdrive for fixpath to work.
19013      new_path="$CYGWIN_ROOT_PATH$input_path"
19014    fi
19015  fi
19016
19017  # remove trailing .exe if any
19018  new_path="${new_path/%.exe/}"
19019
19020  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19021
19022  # First separate the path from the arguments. This will split at the first
19023  # space.
19024  complete="$CC"
19025  path="${complete%% *}"
19026  tmp="$complete EOL"
19027  arguments="${tmp#* }"
19028
19029  # Input might be given as Windows format, start by converting to
19030  # unix format.
19031  new_path="$path"
19032
19033  windows_path="$new_path"
19034  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19035    unix_path=`$CYGPATH -u "$windows_path"`
19036    new_path="$unix_path"
19037  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19038    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19039    new_path="$unix_path"
19040  fi
19041
19042
19043  # Now try to locate executable using which
19044  new_path=`$WHICH "$new_path" 2> /dev/null`
19045
19046  if test "x$new_path" = x; then
19047    # Oops. Which didn't find the executable.
19048    # The splitting of arguments from the executable at a space might have been incorrect,
19049    # since paths with space are more likely in Windows. Give it another try with the whole
19050    # argument.
19051    path="$complete"
19052    arguments="EOL"
19053    new_path="$path"
19054
19055  windows_path="$new_path"
19056  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19057    unix_path=`$CYGPATH -u "$windows_path"`
19058    new_path="$unix_path"
19059  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19060    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19061    new_path="$unix_path"
19062  fi
19063
19064
19065    new_path=`$WHICH "$new_path" 2> /dev/null`
19066
19067    if test "x$new_path" = x; then
19068      # It's still not found. Now this is an unrecoverable error.
19069      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
19070$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
19071      has_space=`$ECHO "$complete" | $GREP " "`
19072      if test "x$has_space" != x; then
19073        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19074$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19075      fi
19076      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
19077    fi
19078  fi
19079
19080  # Now new_path has a complete unix path to the binary
19081  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19082    # Keep paths in /bin as-is, but remove trailing .exe if any
19083    new_path="${new_path/%.exe/}"
19084    # Do not save /bin paths to all_fixpath_prefixes!
19085  else
19086    # Not in mixed or Windows style, start by that.
19087    new_path=`cmd //c echo $new_path`
19088
19089  input_path="$new_path"
19090  # Check if we need to convert this using DOS-style short mode. If the path
19091  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19092  # take no chances and rewrite it.
19093  # Note: m4 eats our [], so we need to use [ and ] instead.
19094  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19095  if test "x$has_forbidden_chars" != x; then
19096    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19097    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19098  fi
19099
19100    # Output is in $new_path
19101
19102  windows_path="$new_path"
19103  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19104    unix_path=`$CYGPATH -u "$windows_path"`
19105    new_path="$unix_path"
19106  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19107    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19108    new_path="$unix_path"
19109  fi
19110
19111    # remove trailing .exe if any
19112    new_path="${new_path/%.exe/}"
19113
19114    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19115    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19116  fi
19117
19118  else
19119    # We're on a posix platform. Hooray! :)
19120    # First separate the path from the arguments. This will split at the first
19121    # space.
19122    complete="$CC"
19123    path="${complete%% *}"
19124    tmp="$complete EOL"
19125    arguments="${tmp#* }"
19126
19127    # Cannot rely on the command "which" here since it doesn't always work.
19128    is_absolute_path=`$ECHO "$path" | $GREP ^/`
19129    if test -z "$is_absolute_path"; then
19130      # Path to executable is not absolute. Find it.
19131      IFS_save="$IFS"
19132      IFS=:
19133      for p in $PATH; do
19134        if test -f "$p/$path" && test -x "$p/$path"; then
19135          new_path="$p/$path"
19136          break
19137        fi
19138      done
19139      IFS="$IFS_save"
19140    else
19141      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CC (as $path) failed, using $path directly." >&5
19142$as_echo "$as_me: Resolving CC (as $path) failed, using $path directly." >&6;}
19143      new_path="$path"
19144    fi
19145
19146    if test "x$new_path" = x; then
19147        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
19148$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
19149        has_space=`$ECHO "$complete" | $GREP " "`
19150        if test "x$has_space" != x; then
19151          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19152$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19153        fi
19154        as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
19155      fi
19156  fi
19157
19158      # Now join together the path and the arguments once again
19159      if test "x$arguments" != xEOL; then
19160        new_complete="$new_path ${arguments% *}"
19161      else
19162        new_complete="$new_path"
19163      fi
19164
19165  if test "x$complete" != "x$new_complete"; then
19166      CC="$new_complete"
19167      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
19168$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
19169    fi
19170
19171  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
19172$as_echo_n "checking resolved symbolic links for CC... " >&6; }
19173  TEST_COMPILER="$CC"
19174
19175    if test "x$OPENJDK_BUILD_OS" != xwindows; then
19176        # Follow a chain of symbolic links. Use readlink
19177        # where it exists, else fall back to horribly
19178        # complicated shell code.
19179        if test "x$READLINK_TESTED" != yes; then
19180            # On MacOSX there is a readlink tool with a different
19181            # purpose than the GNU readlink tool. Check the found readlink.
19182            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
19183            if test "x$ISGNU" = x; then
19184                 # A readlink that we do not know how to use.
19185                 # Are there other non-GNU readlinks out there?
19186                 READLINK_TESTED=yes
19187                 READLINK=
19188            fi
19189        fi
19190
19191        if test "x$READLINK" != x; then
19192            TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
19193        else
19194            # Save the current directory for restoring afterwards
19195            STARTDIR=$PWD
19196            COUNTER=0
19197            sym_link_dir=`$DIRNAME $TEST_COMPILER`
19198            sym_link_file=`$BASENAME $TEST_COMPILER`
19199            cd $sym_link_dir
19200            # Use -P flag to resolve symlinks in directories.
19201            cd `$THEPWDCMD -P`
19202            sym_link_dir=`$THEPWDCMD -P`
19203            # Resolve file symlinks
19204            while test $COUNTER -lt 20; do
19205                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
19206                if test "x$ISLINK" == x; then
19207                    # This is not a symbolic link! We are done!
19208                    break
19209                fi
19210                # Again resolve directory symlinks since the target of the just found
19211                # link could be in a different directory
19212                cd `$DIRNAME $ISLINK`
19213                sym_link_dir=`$THEPWDCMD -P`
19214                sym_link_file=`$BASENAME $ISLINK`
19215                let COUNTER=COUNTER+1
19216            done
19217            cd $STARTDIR
19218            TEST_COMPILER=$sym_link_dir/$sym_link_file
19219        fi
19220    fi
19221
19222  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
19223$as_echo "$TEST_COMPILER" >&6; }
19224  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
19225$as_echo_n "checking if CC is disguised ccache... " >&6; }
19226
19227  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
19228  if test "x$COMPILER_BASENAME" = "xccache"; then
19229    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
19230$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
19231    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
19232    # We want to control ccache invocation ourselves, so ignore this cc and try
19233    # searching again.
19234
19235    # Remove the path to the fake ccache cc from the PATH
19236    RETRY_COMPILER_SAVED_PATH="$PATH"
19237    COMPILER_DIRNAME=`$DIRNAME $CC`
19238    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
19239
19240    # Try again looking for our compiler
19241    if test -n "$ac_tool_prefix"; then
19242  for ac_prog in $COMPILER_CHECK_LIST
19243  do
19244    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
19245set dummy $ac_tool_prefix$ac_prog; ac_word=$2
19246{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19247$as_echo_n "checking for $ac_word... " >&6; }
19248if ${ac_cv_prog_PROPER_COMPILER_CC+:} false; then :
19249  $as_echo_n "(cached) " >&6
19250else
19251  if test -n "$PROPER_COMPILER_CC"; then
19252  ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
19253else
19254as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19255for as_dir in $PATH
19256do
19257  IFS=$as_save_IFS
19258  test -z "$as_dir" && as_dir=.
19259    for ac_exec_ext in '' $ac_executable_extensions; do
19260  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19261    ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
19262    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19263    break 2
19264  fi
19265done
19266  done
19267IFS=$as_save_IFS
19268
19269fi
19270fi
19271PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
19272if test -n "$PROPER_COMPILER_CC"; then
19273  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
19274$as_echo "$PROPER_COMPILER_CC" >&6; }
19275else
19276  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19277$as_echo "no" >&6; }
19278fi
19279
19280
19281    test -n "$PROPER_COMPILER_CC" && break
19282  done
19283fi
19284if test -z "$PROPER_COMPILER_CC"; then
19285  ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
19286  for ac_prog in $COMPILER_CHECK_LIST
19287do
19288  # Extract the first word of "$ac_prog", so it can be a program name with args.
19289set dummy $ac_prog; ac_word=$2
19290{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19291$as_echo_n "checking for $ac_word... " >&6; }
19292if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+:} false; then :
19293  $as_echo_n "(cached) " >&6
19294else
19295  if test -n "$ac_ct_PROPER_COMPILER_CC"; then
19296  ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
19297else
19298as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19299for as_dir in $PATH
19300do
19301  IFS=$as_save_IFS
19302  test -z "$as_dir" && as_dir=.
19303    for ac_exec_ext in '' $ac_executable_extensions; do
19304  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19305    ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
19306    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19307    break 2
19308  fi
19309done
19310  done
19311IFS=$as_save_IFS
19312
19313fi
19314fi
19315ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
19316if test -n "$ac_ct_PROPER_COMPILER_CC"; then
19317  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
19318$as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
19319else
19320  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19321$as_echo "no" >&6; }
19322fi
19323
19324
19325  test -n "$ac_ct_PROPER_COMPILER_CC" && break
19326done
19327
19328  if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
19329    PROPER_COMPILER_CC=""
19330  else
19331    case $cross_compiling:$ac_tool_warned in
19332yes:)
19333{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19334$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19335ac_tool_warned=yes ;;
19336esac
19337    PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
19338  fi
19339fi
19340
19341
19342  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19343
19344  # First separate the path from the arguments. This will split at the first
19345  # space.
19346  complete="$PROPER_COMPILER_CC"
19347  path="${complete%% *}"
19348  tmp="$complete EOL"
19349  arguments="${tmp#* }"
19350
19351  # Input might be given as Windows format, start by converting to
19352  # unix format.
19353  new_path=`$CYGPATH -u "$path"`
19354
19355  # Now try to locate executable using which
19356  new_path=`$WHICH "$new_path" 2> /dev/null`
19357  # bat and cmd files are not always considered executable in cygwin causing which
19358  # to not find them
19359  if test "x$new_path" = x \
19360           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19361           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19362    new_path=`$CYGPATH -u "$path"`
19363  fi
19364  if test "x$new_path" = x; then
19365    # Oops. Which didn't find the executable.
19366    # The splitting of arguments from the executable at a space might have been incorrect,
19367    # since paths with space are more likely in Windows. Give it another try with the whole
19368    # argument.
19369    path="$complete"
19370    arguments="EOL"
19371    new_path=`$CYGPATH -u "$path"`
19372    new_path=`$WHICH "$new_path" 2> /dev/null`
19373    # bat and cmd files are not always considered executable in cygwin causing which
19374    # to not find them
19375    if test "x$new_path" = x \
19376             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19377             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19378      new_path=`$CYGPATH -u "$path"`
19379    fi
19380    if test "x$new_path" = x; then
19381      # It's still not found. Now this is an unrecoverable error.
19382      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
19383$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
19384      has_space=`$ECHO "$complete" | $GREP " "`
19385      if test "x$has_space" != x; then
19386        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19387$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19388      fi
19389      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19390    fi
19391  fi
19392
19393  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19394  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19395  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19396  # "foo.exe" is OK but "foo" is an error.
19397  #
19398  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19399  # It is also a way to make sure we got the proper file name for the real test later on.
19400  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19401  if test "x$test_shortpath" = x; then
19402    # Short path failed, file does not exist as specified.
19403    # Try adding .exe or .cmd
19404    if test -f "${new_path}.exe"; then
19405       input_to_shortpath="${new_path}.exe"
19406    elif test -f "${new_path}.cmd"; then
19407       input_to_shortpath="${new_path}.cmd"
19408    else
19409      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
19410$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
19411      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19412$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19413      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19414    fi
19415  else
19416    input_to_shortpath="$new_path"
19417  fi
19418
19419  # Call helper function which possibly converts this using DOS-style short mode.
19420  # If so, the updated path is stored in $new_path.
19421  new_path="$input_to_shortpath"
19422
19423  input_path="$input_to_shortpath"
19424  # Check if we need to convert this using DOS-style short mode. If the path
19425  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19426  # take no chances and rewrite it.
19427  # Note: m4 eats our [], so we need to use [ and ] instead.
19428  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19429  if test "x$has_forbidden_chars" != x; then
19430    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19431    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19432    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19433    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19434      # Going to short mode and back again did indeed matter. Since short mode is
19435      # case insensitive, let's make it lowercase to improve readability.
19436      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19437      # Now convert it back to Unix-stile (cygpath)
19438      input_path=`$CYGPATH -u "$shortmode_path"`
19439      new_path="$input_path"
19440    fi
19441  fi
19442
19443  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19444  if test "x$test_cygdrive_prefix" = x; then
19445    # As a simple fix, exclude /usr/bin since it's not a real path.
19446    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19447      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19448      # a path prefixed by /cygdrive for fixpath to work.
19449      new_path="$CYGWIN_ROOT_PATH$input_path"
19450    fi
19451  fi
19452
19453  # remove trailing .exe if any
19454  new_path="${new_path/%.exe/}"
19455
19456  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19457
19458  # First separate the path from the arguments. This will split at the first
19459  # space.
19460  complete="$PROPER_COMPILER_CC"
19461  path="${complete%% *}"
19462  tmp="$complete EOL"
19463  arguments="${tmp#* }"
19464
19465  # Input might be given as Windows format, start by converting to
19466  # unix format.
19467  new_path="$path"
19468
19469  windows_path="$new_path"
19470  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19471    unix_path=`$CYGPATH -u "$windows_path"`
19472    new_path="$unix_path"
19473  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19474    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19475    new_path="$unix_path"
19476  fi
19477
19478
19479  # Now try to locate executable using which
19480  new_path=`$WHICH "$new_path" 2> /dev/null`
19481
19482  if test "x$new_path" = x; then
19483    # Oops. Which didn't find the executable.
19484    # The splitting of arguments from the executable at a space might have been incorrect,
19485    # since paths with space are more likely in Windows. Give it another try with the whole
19486    # argument.
19487    path="$complete"
19488    arguments="EOL"
19489    new_path="$path"
19490
19491  windows_path="$new_path"
19492  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19493    unix_path=`$CYGPATH -u "$windows_path"`
19494    new_path="$unix_path"
19495  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19496    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19497    new_path="$unix_path"
19498  fi
19499
19500
19501    new_path=`$WHICH "$new_path" 2> /dev/null`
19502
19503    if test "x$new_path" = x; then
19504      # It's still not found. Now this is an unrecoverable error.
19505      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
19506$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
19507      has_space=`$ECHO "$complete" | $GREP " "`
19508      if test "x$has_space" != x; then
19509        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19510$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19511      fi
19512      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19513    fi
19514  fi
19515
19516  # Now new_path has a complete unix path to the binary
19517  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19518    # Keep paths in /bin as-is, but remove trailing .exe if any
19519    new_path="${new_path/%.exe/}"
19520    # Do not save /bin paths to all_fixpath_prefixes!
19521  else
19522    # Not in mixed or Windows style, start by that.
19523    new_path=`cmd //c echo $new_path`
19524
19525  input_path="$new_path"
19526  # Check if we need to convert this using DOS-style short mode. If the path
19527  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19528  # take no chances and rewrite it.
19529  # Note: m4 eats our [], so we need to use [ and ] instead.
19530  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19531  if test "x$has_forbidden_chars" != x; then
19532    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19533    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19534  fi
19535
19536    # Output is in $new_path
19537
19538  windows_path="$new_path"
19539  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19540    unix_path=`$CYGPATH -u "$windows_path"`
19541    new_path="$unix_path"
19542  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19543    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19544    new_path="$unix_path"
19545  fi
19546
19547    # remove trailing .exe if any
19548    new_path="${new_path/%.exe/}"
19549
19550    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19551    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19552  fi
19553
19554  else
19555    # We're on a posix platform. Hooray! :)
19556    # First separate the path from the arguments. This will split at the first
19557    # space.
19558    complete="$PROPER_COMPILER_CC"
19559    path="${complete%% *}"
19560    tmp="$complete EOL"
19561    arguments="${tmp#* }"
19562
19563    # Cannot rely on the command "which" here since it doesn't always work.
19564    is_absolute_path=`$ECHO "$path" | $GREP ^/`
19565    if test -z "$is_absolute_path"; then
19566      # Path to executable is not absolute. Find it.
19567      IFS_save="$IFS"
19568      IFS=:
19569      for p in $PATH; do
19570        if test -f "$p/$path" && test -x "$p/$path"; then
19571          new_path="$p/$path"
19572          break
19573        fi
19574      done
19575      IFS="$IFS_save"
19576    else
19577      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&5
19578$as_echo "$as_me: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&6;}
19579      new_path="$path"
19580    fi
19581
19582    if test "x$new_path" = x; then
19583        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
19584$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
19585        has_space=`$ECHO "$complete" | $GREP " "`
19586        if test "x$has_space" != x; then
19587          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19588$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19589        fi
19590        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19591      fi
19592  fi
19593
19594      # Now join together the path and the arguments once again
19595      if test "x$arguments" != xEOL; then
19596        new_complete="$new_path ${arguments% *}"
19597      else
19598        new_complete="$new_path"
19599      fi
19600
19601  if test "x$complete" != "x$new_complete"; then
19602      PROPER_COMPILER_CC="$new_complete"
19603      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
19604$as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
19605    fi
19606
19607    PATH="$RETRY_COMPILER_SAVED_PATH"
19608
19609    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
19610$as_echo_n "checking for resolved symbolic links for CC... " >&6; }
19611
19612    if test "x$OPENJDK_BUILD_OS" != xwindows; then
19613        # Follow a chain of symbolic links. Use readlink
19614        # where it exists, else fall back to horribly
19615        # complicated shell code.
19616        if test "x$READLINK_TESTED" != yes; then
19617            # On MacOSX there is a readlink tool with a different
19618            # purpose than the GNU readlink tool. Check the found readlink.
19619            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
19620            if test "x$ISGNU" = x; then
19621                 # A readlink that we do not know how to use.
19622                 # Are there other non-GNU readlinks out there?
19623                 READLINK_TESTED=yes
19624                 READLINK=
19625            fi
19626        fi
19627
19628        if test "x$READLINK" != x; then
19629            PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
19630        else
19631            # Save the current directory for restoring afterwards
19632            STARTDIR=$PWD
19633            COUNTER=0
19634            sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
19635            sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
19636            cd $sym_link_dir
19637            # Use -P flag to resolve symlinks in directories.
19638            cd `$THEPWDCMD -P`
19639            sym_link_dir=`$THEPWDCMD -P`
19640            # Resolve file symlinks
19641            while test $COUNTER -lt 20; do
19642                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
19643                if test "x$ISLINK" == x; then
19644                    # This is not a symbolic link! We are done!
19645                    break
19646                fi
19647                # Again resolve directory symlinks since the target of the just found
19648                # link could be in a different directory
19649                cd `$DIRNAME $ISLINK`
19650                sym_link_dir=`$THEPWDCMD -P`
19651                sym_link_file=`$BASENAME $ISLINK`
19652                let COUNTER=COUNTER+1
19653            done
19654            cd $STARTDIR
19655            PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
19656        fi
19657    fi
19658
19659    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
19660$as_echo "$PROPER_COMPILER_CC" >&6; }
19661    CC="$PROPER_COMPILER_CC"
19662  else
19663    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
19664$as_echo "no, keeping CC" >&6; }
19665    CC="$TEST_COMPILER"
19666  fi
19667
19668  COMPILER=$CC
19669  COMPILER_NAME=$COMPILER_NAME
19670
19671  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
19672    # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
19673    COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
19674    $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
19675    if test $? -ne 0; then
19676      GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
19677
19678      { $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
19679$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
19680      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
19681$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
19682      as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
19683    else
19684      COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
19685      COMPILER_VENDOR="Sun Studio"
19686    fi
19687  elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
19688    # First line typically looks something like:
19689    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
19690    COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
19691    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
19692    COMPILER_VENDOR="Microsoft CL.EXE"
19693    COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
19694    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
19695      if test "x$COMPILER_CPU_TEST" != "x80x86"; then
19696        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
19697      fi
19698    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
19699      if test "x$COMPILER_CPU_TEST" != "xx64"; then
19700        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
19701      fi
19702    fi
19703  else
19704    COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
19705    # Check that this is likely to be GCC.
19706    $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
19707    if test $? -ne 0; then
19708      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
19709$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
19710      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
19711$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
19712      as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
19713    fi
19714
19715    # First line typically looks something like:
19716    # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
19717    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
19718    COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
19719  fi
19720  # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
19721  CC_VERSION="$COMPILER_VERSION"
19722  # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
19723  CC_VENDOR="$COMPILER_VENDOR"
19724
19725  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
19726$as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
19727
19728
19729# Now that we have resolved CC ourself, let autoconf have its go at it
19730ac_ext=c
19731ac_cpp='$CPP $CPPFLAGS'
19732ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19733ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19734ac_compiler_gnu=$ac_cv_c_compiler_gnu
19735if test -n "$ac_tool_prefix"; then
19736  for ac_prog in $CC
19737  do
19738    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
19739set dummy $ac_tool_prefix$ac_prog; ac_word=$2
19740{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19741$as_echo_n "checking for $ac_word... " >&6; }
19742if ${ac_cv_prog_CC+:} false; then :
19743  $as_echo_n "(cached) " >&6
19744else
19745  if test -n "$CC"; then
19746  ac_cv_prog_CC="$CC" # Let the user override the test.
19747else
19748as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19749for as_dir in $PATH
19750do
19751  IFS=$as_save_IFS
19752  test -z "$as_dir" && as_dir=.
19753    for ac_exec_ext in '' $ac_executable_extensions; do
19754  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19755    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
19756    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19757    break 2
19758  fi
19759done
19760  done
19761IFS=$as_save_IFS
19762
19763fi
19764fi
19765CC=$ac_cv_prog_CC
19766if test -n "$CC"; then
19767  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
19768$as_echo "$CC" >&6; }
19769else
19770  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19771$as_echo "no" >&6; }
19772fi
19773
19774
19775    test -n "$CC" && break
19776  done
19777fi
19778if test -z "$CC"; then
19779  ac_ct_CC=$CC
19780  for ac_prog in $CC
19781do
19782  # Extract the first word of "$ac_prog", so it can be a program name with args.
19783set dummy $ac_prog; ac_word=$2
19784{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19785$as_echo_n "checking for $ac_word... " >&6; }
19786if ${ac_cv_prog_ac_ct_CC+:} false; then :
19787  $as_echo_n "(cached) " >&6
19788else
19789  if test -n "$ac_ct_CC"; then
19790  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
19791else
19792as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19793for as_dir in $PATH
19794do
19795  IFS=$as_save_IFS
19796  test -z "$as_dir" && as_dir=.
19797    for ac_exec_ext in '' $ac_executable_extensions; do
19798  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19799    ac_cv_prog_ac_ct_CC="$ac_prog"
19800    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19801    break 2
19802  fi
19803done
19804  done
19805IFS=$as_save_IFS
19806
19807fi
19808fi
19809ac_ct_CC=$ac_cv_prog_ac_ct_CC
19810if test -n "$ac_ct_CC"; then
19811  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
19812$as_echo "$ac_ct_CC" >&6; }
19813else
19814  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19815$as_echo "no" >&6; }
19816fi
19817
19818
19819  test -n "$ac_ct_CC" && break
19820done
19821
19822  if test "x$ac_ct_CC" = x; then
19823    CC=""
19824  else
19825    case $cross_compiling:$ac_tool_warned in
19826yes:)
19827{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19828$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19829ac_tool_warned=yes ;;
19830esac
19831    CC=$ac_ct_CC
19832  fi
19833fi
19834
19835
19836test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19837$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19838as_fn_error $? "no acceptable C compiler found in \$PATH
19839See \`config.log' for more details" "$LINENO" 5; }
19840
19841# Provide some information about the compiler.
19842$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
19843set X $ac_compile
19844ac_compiler=$2
19845for ac_option in --version -v -V -qversion; do
19846  { { ac_try="$ac_compiler $ac_option >&5"
19847case "(($ac_try" in
19848  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19849  *) ac_try_echo=$ac_try;;
19850esac
19851eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19852$as_echo "$ac_try_echo"; } >&5
19853  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
19854  ac_status=$?
19855  if test -s conftest.err; then
19856    sed '10a\
19857... rest of stderr output deleted ...
19858         10q' conftest.err >conftest.er1
19859    cat conftest.er1 >&5
19860  fi
19861  rm -f conftest.er1 conftest.err
19862  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19863  test $ac_status = 0; }
19864done
19865
19866cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19867/* end confdefs.h.  */
19868
19869int
19870main ()
19871{
19872
19873  ;
19874  return 0;
19875}
19876_ACEOF
19877ac_clean_files_save=$ac_clean_files
19878ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
19879# Try to create an executable without -o first, disregard a.out.
19880# It will help us diagnose broken compilers, and finding out an intuition
19881# of exeext.
19882{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
19883$as_echo_n "checking whether the C compiler works... " >&6; }
19884ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
19885
19886# The possible output files:
19887ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
19888
19889ac_rmfiles=
19890for ac_file in $ac_files
19891do
19892  case $ac_file in
19893    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
19894    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
19895  esac
19896done
19897rm -f $ac_rmfiles
19898
19899if { { ac_try="$ac_link_default"
19900case "(($ac_try" in
19901  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19902  *) ac_try_echo=$ac_try;;
19903esac
19904eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19905$as_echo "$ac_try_echo"; } >&5
19906  (eval "$ac_link_default") 2>&5
19907  ac_status=$?
19908  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19909  test $ac_status = 0; }; then :
19910  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
19911# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
19912# in a Makefile.  We should not override ac_cv_exeext if it was cached,
19913# so that the user can short-circuit this test for compilers unknown to
19914# Autoconf.
19915for ac_file in $ac_files ''
19916do
19917  test -f "$ac_file" || continue
19918  case $ac_file in
19919    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
19920	;;
19921    [ab].out )
19922	# We found the default executable, but exeext='' is most
19923	# certainly right.
19924	break;;
19925    *.* )
19926	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
19927	then :; else
19928	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
19929	fi
19930	# We set ac_cv_exeext here because the later test for it is not
19931	# safe: cross compilers may not add the suffix if given an `-o'
19932	# argument, so we may need to know it at that point already.
19933	# Even if this section looks crufty: it has the advantage of
19934	# actually working.
19935	break;;
19936    * )
19937	break;;
19938  esac
19939done
19940test "$ac_cv_exeext" = no && ac_cv_exeext=
19941
19942else
19943  ac_file=''
19944fi
19945if test -z "$ac_file"; then :
19946  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19947$as_echo "no" >&6; }
19948$as_echo "$as_me: failed program was:" >&5
19949sed 's/^/| /' conftest.$ac_ext >&5
19950
19951{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19952$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19953as_fn_error 77 "C compiler cannot create executables
19954See \`config.log' for more details" "$LINENO" 5; }
19955else
19956  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19957$as_echo "yes" >&6; }
19958fi
19959{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
19960$as_echo_n "checking for C compiler default output file name... " >&6; }
19961{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
19962$as_echo "$ac_file" >&6; }
19963ac_exeext=$ac_cv_exeext
19964
19965rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
19966ac_clean_files=$ac_clean_files_save
19967{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
19968$as_echo_n "checking for suffix of executables... " >&6; }
19969if { { ac_try="$ac_link"
19970case "(($ac_try" in
19971  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19972  *) ac_try_echo=$ac_try;;
19973esac
19974eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19975$as_echo "$ac_try_echo"; } >&5
19976  (eval "$ac_link") 2>&5
19977  ac_status=$?
19978  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19979  test $ac_status = 0; }; then :
19980  # If both `conftest.exe' and `conftest' are `present' (well, observable)
19981# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
19982# work properly (i.e., refer to `conftest.exe'), while it won't with
19983# `rm'.
19984for ac_file in conftest.exe conftest conftest.*; do
19985  test -f "$ac_file" || continue
19986  case $ac_file in
19987    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
19988    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
19989	  break;;
19990    * ) break;;
19991  esac
19992done
19993else
19994  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19995$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19996as_fn_error $? "cannot compute suffix of executables: cannot compile and link
19997See \`config.log' for more details" "$LINENO" 5; }
19998fi
19999rm -f conftest conftest$ac_cv_exeext
20000{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
20001$as_echo "$ac_cv_exeext" >&6; }
20002
20003rm -f conftest.$ac_ext
20004EXEEXT=$ac_cv_exeext
20005ac_exeext=$EXEEXT
20006cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20007/* end confdefs.h.  */
20008#include <stdio.h>
20009int
20010main ()
20011{
20012FILE *f = fopen ("conftest.out", "w");
20013 return ferror (f) || fclose (f) != 0;
20014
20015  ;
20016  return 0;
20017}
20018_ACEOF
20019ac_clean_files="$ac_clean_files conftest.out"
20020# Check that the compiler produces executables we can run.  If not, either
20021# the compiler is broken, or we cross compile.
20022{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
20023$as_echo_n "checking whether we are cross compiling... " >&6; }
20024if test "$cross_compiling" != yes; then
20025  { { 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; }
20036  if { ac_try='./conftest$ac_cv_exeext'
20037  { { case "(($ac_try" in
20038  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20039  *) ac_try_echo=$ac_try;;
20040esac
20041eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20042$as_echo "$ac_try_echo"; } >&5
20043  (eval "$ac_try") 2>&5
20044  ac_status=$?
20045  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20046  test $ac_status = 0; }; }; then
20047    cross_compiling=no
20048  else
20049    if test "$cross_compiling" = maybe; then
20050	cross_compiling=yes
20051    else
20052	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20053$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20054as_fn_error $? "cannot run C compiled programs.
20055If you meant to cross compile, use \`--host'.
20056See \`config.log' for more details" "$LINENO" 5; }
20057    fi
20058  fi
20059fi
20060{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
20061$as_echo "$cross_compiling" >&6; }
20062
20063rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
20064ac_clean_files=$ac_clean_files_save
20065{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
20066$as_echo_n "checking for suffix of object files... " >&6; }
20067if ${ac_cv_objext+:} false; then :
20068  $as_echo_n "(cached) " >&6
20069else
20070  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20071/* end confdefs.h.  */
20072
20073int
20074main ()
20075{
20076
20077  ;
20078  return 0;
20079}
20080_ACEOF
20081rm -f conftest.o conftest.obj
20082if { { ac_try="$ac_compile"
20083case "(($ac_try" in
20084  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20085  *) ac_try_echo=$ac_try;;
20086esac
20087eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20088$as_echo "$ac_try_echo"; } >&5
20089  (eval "$ac_compile") 2>&5
20090  ac_status=$?
20091  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20092  test $ac_status = 0; }; then :
20093  for ac_file in conftest.o conftest.obj conftest.*; do
20094  test -f "$ac_file" || continue;
20095  case $ac_file in
20096    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
20097    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
20098       break;;
20099  esac
20100done
20101else
20102  $as_echo "$as_me: failed program was:" >&5
20103sed 's/^/| /' conftest.$ac_ext >&5
20104
20105{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20106$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20107as_fn_error $? "cannot compute suffix of object files: cannot compile
20108See \`config.log' for more details" "$LINENO" 5; }
20109fi
20110rm -f conftest.$ac_cv_objext conftest.$ac_ext
20111fi
20112{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
20113$as_echo "$ac_cv_objext" >&6; }
20114OBJEXT=$ac_cv_objext
20115ac_objext=$OBJEXT
20116{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
20117$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
20118if ${ac_cv_c_compiler_gnu+:} false; then :
20119  $as_echo_n "(cached) " >&6
20120else
20121  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20122/* end confdefs.h.  */
20123
20124int
20125main ()
20126{
20127#ifndef __GNUC__
20128       choke me
20129#endif
20130
20131  ;
20132  return 0;
20133}
20134_ACEOF
20135if ac_fn_c_try_compile "$LINENO"; then :
20136  ac_compiler_gnu=yes
20137else
20138  ac_compiler_gnu=no
20139fi
20140rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20141ac_cv_c_compiler_gnu=$ac_compiler_gnu
20142
20143fi
20144{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
20145$as_echo "$ac_cv_c_compiler_gnu" >&6; }
20146if test $ac_compiler_gnu = yes; then
20147  GCC=yes
20148else
20149  GCC=
20150fi
20151ac_test_CFLAGS=${CFLAGS+set}
20152ac_save_CFLAGS=$CFLAGS
20153{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
20154$as_echo_n "checking whether $CC accepts -g... " >&6; }
20155if ${ac_cv_prog_cc_g+:} false; then :
20156  $as_echo_n "(cached) " >&6
20157else
20158  ac_save_c_werror_flag=$ac_c_werror_flag
20159   ac_c_werror_flag=yes
20160   ac_cv_prog_cc_g=no
20161   CFLAGS="-g"
20162   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20163/* end confdefs.h.  */
20164
20165int
20166main ()
20167{
20168
20169  ;
20170  return 0;
20171}
20172_ACEOF
20173if ac_fn_c_try_compile "$LINENO"; then :
20174  ac_cv_prog_cc_g=yes
20175else
20176  CFLAGS=""
20177      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20178/* end confdefs.h.  */
20179
20180int
20181main ()
20182{
20183
20184  ;
20185  return 0;
20186}
20187_ACEOF
20188if ac_fn_c_try_compile "$LINENO"; then :
20189
20190else
20191  ac_c_werror_flag=$ac_save_c_werror_flag
20192	 CFLAGS="-g"
20193	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20194/* end confdefs.h.  */
20195
20196int
20197main ()
20198{
20199
20200  ;
20201  return 0;
20202}
20203_ACEOF
20204if ac_fn_c_try_compile "$LINENO"; then :
20205  ac_cv_prog_cc_g=yes
20206fi
20207rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20208fi
20209rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20210fi
20211rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20212   ac_c_werror_flag=$ac_save_c_werror_flag
20213fi
20214{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
20215$as_echo "$ac_cv_prog_cc_g" >&6; }
20216if test "$ac_test_CFLAGS" = set; then
20217  CFLAGS=$ac_save_CFLAGS
20218elif test $ac_cv_prog_cc_g = yes; then
20219  if test "$GCC" = yes; then
20220    CFLAGS="-g -O2"
20221  else
20222    CFLAGS="-g"
20223  fi
20224else
20225  if test "$GCC" = yes; then
20226    CFLAGS="-O2"
20227  else
20228    CFLAGS=
20229  fi
20230fi
20231{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
20232$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
20233if ${ac_cv_prog_cc_c89+:} false; then :
20234  $as_echo_n "(cached) " >&6
20235else
20236  ac_cv_prog_cc_c89=no
20237ac_save_CC=$CC
20238cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20239/* end confdefs.h.  */
20240#include <stdarg.h>
20241#include <stdio.h>
20242struct stat;
20243/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
20244struct buf { int x; };
20245FILE * (*rcsopen) (struct buf *, struct stat *, int);
20246static char *e (p, i)
20247     char **p;
20248     int i;
20249{
20250  return p[i];
20251}
20252static char *f (char * (*g) (char **, int), char **p, ...)
20253{
20254  char *s;
20255  va_list v;
20256  va_start (v,p);
20257  s = g (p, va_arg (v,int));
20258  va_end (v);
20259  return s;
20260}
20261
20262/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
20263   function prototypes and stuff, but not '\xHH' hex character constants.
20264   These don't provoke an error unfortunately, instead are silently treated
20265   as 'x'.  The following induces an error, until -std is added to get
20266   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
20267   array size at least.  It's necessary to write '\x00'==0 to get something
20268   that's true only with -std.  */
20269int osf4_cc_array ['\x00' == 0 ? 1 : -1];
20270
20271/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
20272   inside strings and character constants.  */
20273#define FOO(x) 'x'
20274int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
20275
20276int test (int i, double x);
20277struct s1 {int (*f) (int a);};
20278struct s2 {int (*f) (double a);};
20279int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
20280int argc;
20281char **argv;
20282int
20283main ()
20284{
20285return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
20286  ;
20287  return 0;
20288}
20289_ACEOF
20290for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
20291	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
20292do
20293  CC="$ac_save_CC $ac_arg"
20294  if ac_fn_c_try_compile "$LINENO"; then :
20295  ac_cv_prog_cc_c89=$ac_arg
20296fi
20297rm -f core conftest.err conftest.$ac_objext
20298  test "x$ac_cv_prog_cc_c89" != "xno" && break
20299done
20300rm -f conftest.$ac_ext
20301CC=$ac_save_CC
20302
20303fi
20304# AC_CACHE_VAL
20305case "x$ac_cv_prog_cc_c89" in
20306  x)
20307    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
20308$as_echo "none needed" >&6; } ;;
20309  xno)
20310    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
20311$as_echo "unsupported" >&6; } ;;
20312  *)
20313    CC="$CC $ac_cv_prog_cc_c89"
20314    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
20315$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
20316esac
20317if test "x$ac_cv_prog_cc_c89" != xno; then :
20318
20319fi
20320
20321ac_ext=cpp
20322ac_cpp='$CXXCPP $CPPFLAGS'
20323ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20324ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20325ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20326
20327
20328### Locate C++ compiler (CXX)
20329
20330if test "x$CXX" != x; then
20331  COMPILER_CHECK_LIST="$CXX"
20332elif test "x$OPENJDK_TARGET_OS" = "xwindows"; then
20333  COMPILER_CHECK_LIST="cl"
20334elif test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
20335  COMPILER_CHECK_LIST="CC g++"
20336else
20337  COMPILER_CHECK_LIST="g++ CC"
20338fi
20339
20340
20341  COMPILER_NAME=C++
20342
20343  CXX=
20344  # If TOOLS_DIR is set, check for all compiler names in there first
20345  # before checking the rest of the PATH.
20346  if test -n "$TOOLS_DIR"; then
20347    PATH_save="$PATH"
20348    PATH="$TOOLS_DIR"
20349    for ac_prog in $COMPILER_CHECK_LIST
20350do
20351  # Extract the first word of "$ac_prog", so it can be a program name with args.
20352set dummy $ac_prog; ac_word=$2
20353{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20354$as_echo_n "checking for $ac_word... " >&6; }
20355if ${ac_cv_path_TOOLS_DIR_CXX+:} false; then :
20356  $as_echo_n "(cached) " >&6
20357else
20358  case $TOOLS_DIR_CXX in
20359  [\\/]* | ?:[\\/]*)
20360  ac_cv_path_TOOLS_DIR_CXX="$TOOLS_DIR_CXX" # Let the user override the test with a path.
20361  ;;
20362  *)
20363  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20364for as_dir in $PATH
20365do
20366  IFS=$as_save_IFS
20367  test -z "$as_dir" && as_dir=.
20368    for ac_exec_ext in '' $ac_executable_extensions; do
20369  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20370    ac_cv_path_TOOLS_DIR_CXX="$as_dir/$ac_word$ac_exec_ext"
20371    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20372    break 2
20373  fi
20374done
20375  done
20376IFS=$as_save_IFS
20377
20378  ;;
20379esac
20380fi
20381TOOLS_DIR_CXX=$ac_cv_path_TOOLS_DIR_CXX
20382if test -n "$TOOLS_DIR_CXX"; then
20383  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CXX" >&5
20384$as_echo "$TOOLS_DIR_CXX" >&6; }
20385else
20386  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20387$as_echo "no" >&6; }
20388fi
20389
20390
20391  test -n "$TOOLS_DIR_CXX" && break
20392done
20393
20394    CXX=$TOOLS_DIR_CXX
20395    PATH="$PATH_save"
20396  fi
20397
20398  # AC_PATH_PROGS can't be run multiple times with the same variable,
20399  # so create a new name for this run.
20400  if test "x$CXX" = x; then
20401    for ac_prog in $COMPILER_CHECK_LIST
20402do
20403  # Extract the first word of "$ac_prog", so it can be a program name with args.
20404set dummy $ac_prog; ac_word=$2
20405{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20406$as_echo_n "checking for $ac_word... " >&6; }
20407if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
20408  $as_echo_n "(cached) " >&6
20409else
20410  case $POTENTIAL_CXX in
20411  [\\/]* | ?:[\\/]*)
20412  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
20413  ;;
20414  *)
20415  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20416for as_dir in $PATH
20417do
20418  IFS=$as_save_IFS
20419  test -z "$as_dir" && as_dir=.
20420    for ac_exec_ext in '' $ac_executable_extensions; do
20421  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20422    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
20423    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20424    break 2
20425  fi
20426done
20427  done
20428IFS=$as_save_IFS
20429
20430  ;;
20431esac
20432fi
20433POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
20434if test -n "$POTENTIAL_CXX"; then
20435  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
20436$as_echo "$POTENTIAL_CXX" >&6; }
20437else
20438  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20439$as_echo "no" >&6; }
20440fi
20441
20442
20443  test -n "$POTENTIAL_CXX" && break
20444done
20445
20446    CXX=$POTENTIAL_CXX
20447  fi
20448
20449  if test "x$CXX" = x; then
20450
20451    # Print a helpful message on how to acquire the necessary build dependency.
20452    # devkit is the help tag: freetyp2, cups, pulse, alsa etc
20453    MISSING_DEPENDENCY=devkit
20454    PKGHANDLER_COMMAND=
20455
20456    case $PKGHANDLER in
20457	apt-get)
20458                apt_help     $MISSING_DEPENDENCY ;;
20459    yum)
20460                yum_help     $MISSING_DEPENDENCY ;;
20461	port)
20462                port_help    $MISSING_DEPENDENCY ;;
20463	pkgutil)
20464                pkgutil_help $MISSING_DEPENDENCY ;;
20465	pkgadd)
20466                pkgadd_help  $MISSING_DEPENDENCY ;;
20467    * )
20468      break ;;
20469    esac
20470
20471    if test "x$PKGHANDLER_COMMAND" != x; then
20472        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
20473    fi
20474
20475      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
20476  fi
20477
20478  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20479
20480  # First separate the path from the arguments. This will split at the first
20481  # space.
20482  complete="$CXX"
20483  path="${complete%% *}"
20484  tmp="$complete EOL"
20485  arguments="${tmp#* }"
20486
20487  # Input might be given as Windows format, start by converting to
20488  # unix format.
20489  new_path=`$CYGPATH -u "$path"`
20490
20491  # Now try to locate executable using which
20492  new_path=`$WHICH "$new_path" 2> /dev/null`
20493  # bat and cmd files are not always considered executable in cygwin causing which
20494  # to not find them
20495  if test "x$new_path" = x \
20496           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20497           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20498    new_path=`$CYGPATH -u "$path"`
20499  fi
20500  if test "x$new_path" = x; then
20501    # Oops. Which didn't find the executable.
20502    # The splitting of arguments from the executable at a space might have been incorrect,
20503    # since paths with space are more likely in Windows. Give it another try with the whole
20504    # argument.
20505    path="$complete"
20506    arguments="EOL"
20507    new_path=`$CYGPATH -u "$path"`
20508    new_path=`$WHICH "$new_path" 2> /dev/null`
20509    # bat and cmd files are not always considered executable in cygwin causing which
20510    # to not find them
20511    if test "x$new_path" = x \
20512             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20513             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20514      new_path=`$CYGPATH -u "$path"`
20515    fi
20516    if test "x$new_path" = x; then
20517      # It's still not found. Now this is an unrecoverable error.
20518      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
20519$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
20520      has_space=`$ECHO "$complete" | $GREP " "`
20521      if test "x$has_space" != x; then
20522        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20523$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20524      fi
20525      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20526    fi
20527  fi
20528
20529  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20530  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20531  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20532  # "foo.exe" is OK but "foo" is an error.
20533  #
20534  # This test is therefore slightly more accurate than "test -f" to check for file presence.
20535  # It is also a way to make sure we got the proper file name for the real test later on.
20536  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20537  if test "x$test_shortpath" = x; then
20538    # Short path failed, file does not exist as specified.
20539    # Try adding .exe or .cmd
20540    if test -f "${new_path}.exe"; then
20541       input_to_shortpath="${new_path}.exe"
20542    elif test -f "${new_path}.cmd"; then
20543       input_to_shortpath="${new_path}.cmd"
20544    else
20545      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
20546$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
20547      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20548$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20549      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20550    fi
20551  else
20552    input_to_shortpath="$new_path"
20553  fi
20554
20555  # Call helper function which possibly converts this using DOS-style short mode.
20556  # If so, the updated path is stored in $new_path.
20557  new_path="$input_to_shortpath"
20558
20559  input_path="$input_to_shortpath"
20560  # Check if we need to convert this using DOS-style short mode. If the path
20561  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20562  # take no chances and rewrite it.
20563  # Note: m4 eats our [], so we need to use [ and ] instead.
20564  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20565  if test "x$has_forbidden_chars" != x; then
20566    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20567    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20568    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20569    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20570      # Going to short mode and back again did indeed matter. Since short mode is
20571      # case insensitive, let's make it lowercase to improve readability.
20572      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20573      # Now convert it back to Unix-stile (cygpath)
20574      input_path=`$CYGPATH -u "$shortmode_path"`
20575      new_path="$input_path"
20576    fi
20577  fi
20578
20579  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20580  if test "x$test_cygdrive_prefix" = x; then
20581    # As a simple fix, exclude /usr/bin since it's not a real path.
20582    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20583      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20584      # a path prefixed by /cygdrive for fixpath to work.
20585      new_path="$CYGWIN_ROOT_PATH$input_path"
20586    fi
20587  fi
20588
20589  # remove trailing .exe if any
20590  new_path="${new_path/%.exe/}"
20591
20592  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20593
20594  # First separate the path from the arguments. This will split at the first
20595  # space.
20596  complete="$CXX"
20597  path="${complete%% *}"
20598  tmp="$complete EOL"
20599  arguments="${tmp#* }"
20600
20601  # Input might be given as Windows format, start by converting to
20602  # unix format.
20603  new_path="$path"
20604
20605  windows_path="$new_path"
20606  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20607    unix_path=`$CYGPATH -u "$windows_path"`
20608    new_path="$unix_path"
20609  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20610    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20611    new_path="$unix_path"
20612  fi
20613
20614
20615  # Now try to locate executable using which
20616  new_path=`$WHICH "$new_path" 2> /dev/null`
20617
20618  if test "x$new_path" = x; then
20619    # Oops. Which didn't find the executable.
20620    # The splitting of arguments from the executable at a space might have been incorrect,
20621    # since paths with space are more likely in Windows. Give it another try with the whole
20622    # argument.
20623    path="$complete"
20624    arguments="EOL"
20625    new_path="$path"
20626
20627  windows_path="$new_path"
20628  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20629    unix_path=`$CYGPATH -u "$windows_path"`
20630    new_path="$unix_path"
20631  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20632    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20633    new_path="$unix_path"
20634  fi
20635
20636
20637    new_path=`$WHICH "$new_path" 2> /dev/null`
20638
20639    if test "x$new_path" = x; then
20640      # It's still not found. Now this is an unrecoverable error.
20641      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
20642$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
20643      has_space=`$ECHO "$complete" | $GREP " "`
20644      if test "x$has_space" != x; then
20645        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20646$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20647      fi
20648      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20649    fi
20650  fi
20651
20652  # Now new_path has a complete unix path to the binary
20653  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20654    # Keep paths in /bin as-is, but remove trailing .exe if any
20655    new_path="${new_path/%.exe/}"
20656    # Do not save /bin paths to all_fixpath_prefixes!
20657  else
20658    # Not in mixed or Windows style, start by that.
20659    new_path=`cmd //c echo $new_path`
20660
20661  input_path="$new_path"
20662  # Check if we need to convert this using DOS-style short mode. If the path
20663  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20664  # take no chances and rewrite it.
20665  # Note: m4 eats our [], so we need to use [ and ] instead.
20666  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20667  if test "x$has_forbidden_chars" != x; then
20668    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20669    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20670  fi
20671
20672    # Output is in $new_path
20673
20674  windows_path="$new_path"
20675  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20676    unix_path=`$CYGPATH -u "$windows_path"`
20677    new_path="$unix_path"
20678  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20679    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20680    new_path="$unix_path"
20681  fi
20682
20683    # remove trailing .exe if any
20684    new_path="${new_path/%.exe/}"
20685
20686    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20687    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20688  fi
20689
20690  else
20691    # We're on a posix platform. Hooray! :)
20692    # First separate the path from the arguments. This will split at the first
20693    # space.
20694    complete="$CXX"
20695    path="${complete%% *}"
20696    tmp="$complete EOL"
20697    arguments="${tmp#* }"
20698
20699    # Cannot rely on the command "which" here since it doesn't always work.
20700    is_absolute_path=`$ECHO "$path" | $GREP ^/`
20701    if test -z "$is_absolute_path"; then
20702      # Path to executable is not absolute. Find it.
20703      IFS_save="$IFS"
20704      IFS=:
20705      for p in $PATH; do
20706        if test -f "$p/$path" && test -x "$p/$path"; then
20707          new_path="$p/$path"
20708          break
20709        fi
20710      done
20711      IFS="$IFS_save"
20712    else
20713      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXX (as $path) failed, using $path directly." >&5
20714$as_echo "$as_me: Resolving CXX (as $path) failed, using $path directly." >&6;}
20715      new_path="$path"
20716    fi
20717
20718    if test "x$new_path" = x; then
20719        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
20720$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
20721        has_space=`$ECHO "$complete" | $GREP " "`
20722        if test "x$has_space" != x; then
20723          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20724$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20725        fi
20726        as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20727      fi
20728  fi
20729
20730      # Now join together the path and the arguments once again
20731      if test "x$arguments" != xEOL; then
20732        new_complete="$new_path ${arguments% *}"
20733      else
20734        new_complete="$new_path"
20735      fi
20736
20737  if test "x$complete" != "x$new_complete"; then
20738      CXX="$new_complete"
20739      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
20740$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
20741    fi
20742
20743  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
20744$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
20745  TEST_COMPILER="$CXX"
20746
20747    if test "x$OPENJDK_BUILD_OS" != xwindows; then
20748        # Follow a chain of symbolic links. Use readlink
20749        # where it exists, else fall back to horribly
20750        # complicated shell code.
20751        if test "x$READLINK_TESTED" != yes; then
20752            # On MacOSX there is a readlink tool with a different
20753            # purpose than the GNU readlink tool. Check the found readlink.
20754            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
20755            if test "x$ISGNU" = x; then
20756                 # A readlink that we do not know how to use.
20757                 # Are there other non-GNU readlinks out there?
20758                 READLINK_TESTED=yes
20759                 READLINK=
20760            fi
20761        fi
20762
20763        if test "x$READLINK" != x; then
20764            TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
20765        else
20766            # Save the current directory for restoring afterwards
20767            STARTDIR=$PWD
20768            COUNTER=0
20769            sym_link_dir=`$DIRNAME $TEST_COMPILER`
20770            sym_link_file=`$BASENAME $TEST_COMPILER`
20771            cd $sym_link_dir
20772            # Use -P flag to resolve symlinks in directories.
20773            cd `$THEPWDCMD -P`
20774            sym_link_dir=`$THEPWDCMD -P`
20775            # Resolve file symlinks
20776            while test $COUNTER -lt 20; do
20777                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
20778                if test "x$ISLINK" == x; then
20779                    # This is not a symbolic link! We are done!
20780                    break
20781                fi
20782                # Again resolve directory symlinks since the target of the just found
20783                # link could be in a different directory
20784                cd `$DIRNAME $ISLINK`
20785                sym_link_dir=`$THEPWDCMD -P`
20786                sym_link_file=`$BASENAME $ISLINK`
20787                let COUNTER=COUNTER+1
20788            done
20789            cd $STARTDIR
20790            TEST_COMPILER=$sym_link_dir/$sym_link_file
20791        fi
20792    fi
20793
20794  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
20795$as_echo "$TEST_COMPILER" >&6; }
20796  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
20797$as_echo_n "checking if CXX is disguised ccache... " >&6; }
20798
20799  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
20800  if test "x$COMPILER_BASENAME" = "xccache"; then
20801    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
20802$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
20803    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
20804    # We want to control ccache invocation ourselves, so ignore this cc and try
20805    # searching again.
20806
20807    # Remove the path to the fake ccache cc from the PATH
20808    RETRY_COMPILER_SAVED_PATH="$PATH"
20809    COMPILER_DIRNAME=`$DIRNAME $CXX`
20810    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
20811
20812    # Try again looking for our compiler
20813    if test -n "$ac_tool_prefix"; then
20814  for ac_prog in $COMPILER_CHECK_LIST
20815  do
20816    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
20817set dummy $ac_tool_prefix$ac_prog; ac_word=$2
20818{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20819$as_echo_n "checking for $ac_word... " >&6; }
20820if ${ac_cv_prog_PROPER_COMPILER_CXX+:} false; then :
20821  $as_echo_n "(cached) " >&6
20822else
20823  if test -n "$PROPER_COMPILER_CXX"; then
20824  ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
20825else
20826as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20827for as_dir in $PATH
20828do
20829  IFS=$as_save_IFS
20830  test -z "$as_dir" && as_dir=.
20831    for ac_exec_ext in '' $ac_executable_extensions; do
20832  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20833    ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
20834    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20835    break 2
20836  fi
20837done
20838  done
20839IFS=$as_save_IFS
20840
20841fi
20842fi
20843PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
20844if test -n "$PROPER_COMPILER_CXX"; then
20845  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
20846$as_echo "$PROPER_COMPILER_CXX" >&6; }
20847else
20848  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20849$as_echo "no" >&6; }
20850fi
20851
20852
20853    test -n "$PROPER_COMPILER_CXX" && break
20854  done
20855fi
20856if test -z "$PROPER_COMPILER_CXX"; then
20857  ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
20858  for ac_prog in $COMPILER_CHECK_LIST
20859do
20860  # Extract the first word of "$ac_prog", so it can be a program name with args.
20861set dummy $ac_prog; ac_word=$2
20862{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20863$as_echo_n "checking for $ac_word... " >&6; }
20864if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+:} false; then :
20865  $as_echo_n "(cached) " >&6
20866else
20867  if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
20868  ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
20869else
20870as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20871for as_dir in $PATH
20872do
20873  IFS=$as_save_IFS
20874  test -z "$as_dir" && as_dir=.
20875    for ac_exec_ext in '' $ac_executable_extensions; do
20876  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20877    ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
20878    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20879    break 2
20880  fi
20881done
20882  done
20883IFS=$as_save_IFS
20884
20885fi
20886fi
20887ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
20888if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
20889  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
20890$as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
20891else
20892  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20893$as_echo "no" >&6; }
20894fi
20895
20896
20897  test -n "$ac_ct_PROPER_COMPILER_CXX" && break
20898done
20899
20900  if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
20901    PROPER_COMPILER_CXX=""
20902  else
20903    case $cross_compiling:$ac_tool_warned in
20904yes:)
20905{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
20906$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
20907ac_tool_warned=yes ;;
20908esac
20909    PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
20910  fi
20911fi
20912
20913
20914  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20915
20916  # First separate the path from the arguments. This will split at the first
20917  # space.
20918  complete="$PROPER_COMPILER_CXX"
20919  path="${complete%% *}"
20920  tmp="$complete EOL"
20921  arguments="${tmp#* }"
20922
20923  # Input might be given as Windows format, start by converting to
20924  # unix format.
20925  new_path=`$CYGPATH -u "$path"`
20926
20927  # Now try to locate executable using which
20928  new_path=`$WHICH "$new_path" 2> /dev/null`
20929  # bat and cmd files are not always considered executable in cygwin causing which
20930  # to not find them
20931  if test "x$new_path" = x \
20932           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20933           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20934    new_path=`$CYGPATH -u "$path"`
20935  fi
20936  if test "x$new_path" = x; then
20937    # Oops. Which didn't find the executable.
20938    # The splitting of arguments from the executable at a space might have been incorrect,
20939    # since paths with space are more likely in Windows. Give it another try with the whole
20940    # argument.
20941    path="$complete"
20942    arguments="EOL"
20943    new_path=`$CYGPATH -u "$path"`
20944    new_path=`$WHICH "$new_path" 2> /dev/null`
20945    # bat and cmd files are not always considered executable in cygwin causing which
20946    # to not find them
20947    if test "x$new_path" = x \
20948             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20949             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20950      new_path=`$CYGPATH -u "$path"`
20951    fi
20952    if test "x$new_path" = x; then
20953      # It's still not found. Now this is an unrecoverable error.
20954      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
20955$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
20956      has_space=`$ECHO "$complete" | $GREP " "`
20957      if test "x$has_space" != x; then
20958        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20959$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20960      fi
20961      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
20962    fi
20963  fi
20964
20965  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20966  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20967  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20968  # "foo.exe" is OK but "foo" is an error.
20969  #
20970  # This test is therefore slightly more accurate than "test -f" to check for file presence.
20971  # It is also a way to make sure we got the proper file name for the real test later on.
20972  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20973  if test "x$test_shortpath" = x; then
20974    # Short path failed, file does not exist as specified.
20975    # Try adding .exe or .cmd
20976    if test -f "${new_path}.exe"; then
20977       input_to_shortpath="${new_path}.exe"
20978    elif test -f "${new_path}.cmd"; then
20979       input_to_shortpath="${new_path}.cmd"
20980    else
20981      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
20982$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
20983      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20984$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20985      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
20986    fi
20987  else
20988    input_to_shortpath="$new_path"
20989  fi
20990
20991  # Call helper function which possibly converts this using DOS-style short mode.
20992  # If so, the updated path is stored in $new_path.
20993  new_path="$input_to_shortpath"
20994
20995  input_path="$input_to_shortpath"
20996  # Check if we need to convert this using DOS-style short mode. If the path
20997  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20998  # take no chances and rewrite it.
20999  # Note: m4 eats our [], so we need to use [ and ] instead.
21000  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21001  if test "x$has_forbidden_chars" != x; then
21002    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21003    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21004    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21005    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21006      # Going to short mode and back again did indeed matter. Since short mode is
21007      # case insensitive, let's make it lowercase to improve readability.
21008      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21009      # Now convert it back to Unix-stile (cygpath)
21010      input_path=`$CYGPATH -u "$shortmode_path"`
21011      new_path="$input_path"
21012    fi
21013  fi
21014
21015  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21016  if test "x$test_cygdrive_prefix" = x; then
21017    # As a simple fix, exclude /usr/bin since it's not a real path.
21018    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21019      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21020      # a path prefixed by /cygdrive for fixpath to work.
21021      new_path="$CYGWIN_ROOT_PATH$input_path"
21022    fi
21023  fi
21024
21025  # remove trailing .exe if any
21026  new_path="${new_path/%.exe/}"
21027
21028  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21029
21030  # First separate the path from the arguments. This will split at the first
21031  # space.
21032  complete="$PROPER_COMPILER_CXX"
21033  path="${complete%% *}"
21034  tmp="$complete EOL"
21035  arguments="${tmp#* }"
21036
21037  # Input might be given as Windows format, start by converting to
21038  # unix format.
21039  new_path="$path"
21040
21041  windows_path="$new_path"
21042  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21043    unix_path=`$CYGPATH -u "$windows_path"`
21044    new_path="$unix_path"
21045  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21046    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21047    new_path="$unix_path"
21048  fi
21049
21050
21051  # Now try to locate executable using which
21052  new_path=`$WHICH "$new_path" 2> /dev/null`
21053
21054  if test "x$new_path" = x; then
21055    # Oops. Which didn't find the executable.
21056    # The splitting of arguments from the executable at a space might have been incorrect,
21057    # since paths with space are more likely in Windows. Give it another try with the whole
21058    # argument.
21059    path="$complete"
21060    arguments="EOL"
21061    new_path="$path"
21062
21063  windows_path="$new_path"
21064  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21065    unix_path=`$CYGPATH -u "$windows_path"`
21066    new_path="$unix_path"
21067  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21068    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21069    new_path="$unix_path"
21070  fi
21071
21072
21073    new_path=`$WHICH "$new_path" 2> /dev/null`
21074
21075    if test "x$new_path" = x; then
21076      # It's still not found. Now this is an unrecoverable error.
21077      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
21078$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
21079      has_space=`$ECHO "$complete" | $GREP " "`
21080      if test "x$has_space" != x; then
21081        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21082$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21083      fi
21084      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21085    fi
21086  fi
21087
21088  # Now new_path has a complete unix path to the binary
21089  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21090    # Keep paths in /bin as-is, but remove trailing .exe if any
21091    new_path="${new_path/%.exe/}"
21092    # Do not save /bin paths to all_fixpath_prefixes!
21093  else
21094    # Not in mixed or Windows style, start by that.
21095    new_path=`cmd //c echo $new_path`
21096
21097  input_path="$new_path"
21098  # Check if we need to convert this using DOS-style short mode. If the path
21099  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21100  # take no chances and rewrite it.
21101  # Note: m4 eats our [], so we need to use [ and ] instead.
21102  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21103  if test "x$has_forbidden_chars" != x; then
21104    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21105    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21106  fi
21107
21108    # Output is in $new_path
21109
21110  windows_path="$new_path"
21111  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21112    unix_path=`$CYGPATH -u "$windows_path"`
21113    new_path="$unix_path"
21114  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21115    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21116    new_path="$unix_path"
21117  fi
21118
21119    # remove trailing .exe if any
21120    new_path="${new_path/%.exe/}"
21121
21122    # Save the first 10 bytes of this path to the storage, so fixpath can work.
21123    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21124  fi
21125
21126  else
21127    # We're on a posix platform. Hooray! :)
21128    # First separate the path from the arguments. This will split at the first
21129    # space.
21130    complete="$PROPER_COMPILER_CXX"
21131    path="${complete%% *}"
21132    tmp="$complete EOL"
21133    arguments="${tmp#* }"
21134
21135    # Cannot rely on the command "which" here since it doesn't always work.
21136    is_absolute_path=`$ECHO "$path" | $GREP ^/`
21137    if test -z "$is_absolute_path"; then
21138      # Path to executable is not absolute. Find it.
21139      IFS_save="$IFS"
21140      IFS=:
21141      for p in $PATH; do
21142        if test -f "$p/$path" && test -x "$p/$path"; then
21143          new_path="$p/$path"
21144          break
21145        fi
21146      done
21147      IFS="$IFS_save"
21148    else
21149      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&5
21150$as_echo "$as_me: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&6;}
21151      new_path="$path"
21152    fi
21153
21154    if test "x$new_path" = x; then
21155        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
21156$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
21157        has_space=`$ECHO "$complete" | $GREP " "`
21158        if test "x$has_space" != x; then
21159          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21160$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21161        fi
21162        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21163      fi
21164  fi
21165
21166      # Now join together the path and the arguments once again
21167      if test "x$arguments" != xEOL; then
21168        new_complete="$new_path ${arguments% *}"
21169      else
21170        new_complete="$new_path"
21171      fi
21172
21173  if test "x$complete" != "x$new_complete"; then
21174      PROPER_COMPILER_CXX="$new_complete"
21175      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
21176$as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
21177    fi
21178
21179    PATH="$RETRY_COMPILER_SAVED_PATH"
21180
21181    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
21182$as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
21183
21184    if test "x$OPENJDK_BUILD_OS" != xwindows; then
21185        # Follow a chain of symbolic links. Use readlink
21186        # where it exists, else fall back to horribly
21187        # complicated shell code.
21188        if test "x$READLINK_TESTED" != yes; then
21189            # On MacOSX there is a readlink tool with a different
21190            # purpose than the GNU readlink tool. Check the found readlink.
21191            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
21192            if test "x$ISGNU" = x; then
21193                 # A readlink that we do not know how to use.
21194                 # Are there other non-GNU readlinks out there?
21195                 READLINK_TESTED=yes
21196                 READLINK=
21197            fi
21198        fi
21199
21200        if test "x$READLINK" != x; then
21201            PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
21202        else
21203            # Save the current directory for restoring afterwards
21204            STARTDIR=$PWD
21205            COUNTER=0
21206            sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
21207            sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
21208            cd $sym_link_dir
21209            # Use -P flag to resolve symlinks in directories.
21210            cd `$THEPWDCMD -P`
21211            sym_link_dir=`$THEPWDCMD -P`
21212            # Resolve file symlinks
21213            while test $COUNTER -lt 20; do
21214                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
21215                if test "x$ISLINK" == x; then
21216                    # This is not a symbolic link! We are done!
21217                    break
21218                fi
21219                # Again resolve directory symlinks since the target of the just found
21220                # link could be in a different directory
21221                cd `$DIRNAME $ISLINK`
21222                sym_link_dir=`$THEPWDCMD -P`
21223                sym_link_file=`$BASENAME $ISLINK`
21224                let COUNTER=COUNTER+1
21225            done
21226            cd $STARTDIR
21227            PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
21228        fi
21229    fi
21230
21231    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
21232$as_echo "$PROPER_COMPILER_CXX" >&6; }
21233    CXX="$PROPER_COMPILER_CXX"
21234  else
21235    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
21236$as_echo "no, keeping CXX" >&6; }
21237    CXX="$TEST_COMPILER"
21238  fi
21239
21240  COMPILER=$CXX
21241  COMPILER_NAME=$COMPILER_NAME
21242
21243  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
21244    # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
21245    COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
21246    $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
21247    if test $? -ne 0; then
21248      GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
21249
21250      { $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
21251$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
21252      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
21253$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
21254      as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
21255    else
21256      COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
21257      COMPILER_VENDOR="Sun Studio"
21258    fi
21259  elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
21260    # First line typically looks something like:
21261    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
21262    COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
21263    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
21264    COMPILER_VENDOR="Microsoft CL.EXE"
21265    COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
21266    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
21267      if test "x$COMPILER_CPU_TEST" != "x80x86"; then
21268        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
21269      fi
21270    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
21271      if test "x$COMPILER_CPU_TEST" != "xx64"; then
21272        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
21273      fi
21274    fi
21275  else
21276    COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
21277    # Check that this is likely to be GCC.
21278    $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
21279    if test $? -ne 0; then
21280      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
21281$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
21282      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
21283$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
21284      as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
21285    fi
21286
21287    # First line typically looks something like:
21288    # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
21289    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
21290    COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
21291  fi
21292  # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
21293  CXX_VERSION="$COMPILER_VERSION"
21294  # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
21295  CXX_VENDOR="$COMPILER_VENDOR"
21296
21297  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
21298$as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
21299
21300
21301# Now that we have resolved CXX ourself, let autoconf have its go at it
21302ac_ext=cpp
21303ac_cpp='$CXXCPP $CPPFLAGS'
21304ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21305ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21306ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21307if test -z "$CXX"; then
21308  if test -n "$CCC"; then
21309    CXX=$CCC
21310  else
21311    if test -n "$ac_tool_prefix"; then
21312  for ac_prog in $CXX
21313  do
21314    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
21315set dummy $ac_tool_prefix$ac_prog; ac_word=$2
21316{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21317$as_echo_n "checking for $ac_word... " >&6; }
21318if ${ac_cv_prog_CXX+:} false; then :
21319  $as_echo_n "(cached) " >&6
21320else
21321  if test -n "$CXX"; then
21322  ac_cv_prog_CXX="$CXX" # Let the user override the test.
21323else
21324as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21325for as_dir in $PATH
21326do
21327  IFS=$as_save_IFS
21328  test -z "$as_dir" && as_dir=.
21329    for ac_exec_ext in '' $ac_executable_extensions; do
21330  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21331    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
21332    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21333    break 2
21334  fi
21335done
21336  done
21337IFS=$as_save_IFS
21338
21339fi
21340fi
21341CXX=$ac_cv_prog_CXX
21342if test -n "$CXX"; then
21343  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
21344$as_echo "$CXX" >&6; }
21345else
21346  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21347$as_echo "no" >&6; }
21348fi
21349
21350
21351    test -n "$CXX" && break
21352  done
21353fi
21354if test -z "$CXX"; then
21355  ac_ct_CXX=$CXX
21356  for ac_prog in $CXX
21357do
21358  # Extract the first word of "$ac_prog", so it can be a program name with args.
21359set dummy $ac_prog; ac_word=$2
21360{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21361$as_echo_n "checking for $ac_word... " >&6; }
21362if ${ac_cv_prog_ac_ct_CXX+:} false; then :
21363  $as_echo_n "(cached) " >&6
21364else
21365  if test -n "$ac_ct_CXX"; then
21366  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
21367else
21368as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21369for as_dir in $PATH
21370do
21371  IFS=$as_save_IFS
21372  test -z "$as_dir" && as_dir=.
21373    for ac_exec_ext in '' $ac_executable_extensions; do
21374  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21375    ac_cv_prog_ac_ct_CXX="$ac_prog"
21376    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21377    break 2
21378  fi
21379done
21380  done
21381IFS=$as_save_IFS
21382
21383fi
21384fi
21385ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
21386if test -n "$ac_ct_CXX"; then
21387  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
21388$as_echo "$ac_ct_CXX" >&6; }
21389else
21390  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21391$as_echo "no" >&6; }
21392fi
21393
21394
21395  test -n "$ac_ct_CXX" && break
21396done
21397
21398  if test "x$ac_ct_CXX" = x; then
21399    CXX="g++"
21400  else
21401    case $cross_compiling:$ac_tool_warned in
21402yes:)
21403{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
21404$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
21405ac_tool_warned=yes ;;
21406esac
21407    CXX=$ac_ct_CXX
21408  fi
21409fi
21410
21411  fi
21412fi
21413# Provide some information about the compiler.
21414$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
21415set X $ac_compile
21416ac_compiler=$2
21417for ac_option in --version -v -V -qversion; do
21418  { { ac_try="$ac_compiler $ac_option >&5"
21419case "(($ac_try" in
21420  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21421  *) ac_try_echo=$ac_try;;
21422esac
21423eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
21424$as_echo "$ac_try_echo"; } >&5
21425  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
21426  ac_status=$?
21427  if test -s conftest.err; then
21428    sed '10a\
21429... rest of stderr output deleted ...
21430         10q' conftest.err >conftest.er1
21431    cat conftest.er1 >&5
21432  fi
21433  rm -f conftest.er1 conftest.err
21434  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21435  test $ac_status = 0; }
21436done
21437
21438{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
21439$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
21440if ${ac_cv_cxx_compiler_gnu+:} false; then :
21441  $as_echo_n "(cached) " >&6
21442else
21443  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21444/* end confdefs.h.  */
21445
21446int
21447main ()
21448{
21449#ifndef __GNUC__
21450       choke me
21451#endif
21452
21453  ;
21454  return 0;
21455}
21456_ACEOF
21457if ac_fn_cxx_try_compile "$LINENO"; then :
21458  ac_compiler_gnu=yes
21459else
21460  ac_compiler_gnu=no
21461fi
21462rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21463ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
21464
21465fi
21466{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
21467$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
21468if test $ac_compiler_gnu = yes; then
21469  GXX=yes
21470else
21471  GXX=
21472fi
21473ac_test_CXXFLAGS=${CXXFLAGS+set}
21474ac_save_CXXFLAGS=$CXXFLAGS
21475{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
21476$as_echo_n "checking whether $CXX accepts -g... " >&6; }
21477if ${ac_cv_prog_cxx_g+:} false; then :
21478  $as_echo_n "(cached) " >&6
21479else
21480  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
21481   ac_cxx_werror_flag=yes
21482   ac_cv_prog_cxx_g=no
21483   CXXFLAGS="-g"
21484   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21485/* end confdefs.h.  */
21486
21487int
21488main ()
21489{
21490
21491  ;
21492  return 0;
21493}
21494_ACEOF
21495if ac_fn_cxx_try_compile "$LINENO"; then :
21496  ac_cv_prog_cxx_g=yes
21497else
21498  CXXFLAGS=""
21499      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21500/* end confdefs.h.  */
21501
21502int
21503main ()
21504{
21505
21506  ;
21507  return 0;
21508}
21509_ACEOF
21510if ac_fn_cxx_try_compile "$LINENO"; then :
21511
21512else
21513  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
21514	 CXXFLAGS="-g"
21515	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21516/* end confdefs.h.  */
21517
21518int
21519main ()
21520{
21521
21522  ;
21523  return 0;
21524}
21525_ACEOF
21526if ac_fn_cxx_try_compile "$LINENO"; then :
21527  ac_cv_prog_cxx_g=yes
21528fi
21529rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21530fi
21531rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21532fi
21533rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21534   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
21535fi
21536{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
21537$as_echo "$ac_cv_prog_cxx_g" >&6; }
21538if test "$ac_test_CXXFLAGS" = set; then
21539  CXXFLAGS=$ac_save_CXXFLAGS
21540elif test $ac_cv_prog_cxx_g = yes; then
21541  if test "$GXX" = yes; then
21542    CXXFLAGS="-g -O2"
21543  else
21544    CXXFLAGS="-g"
21545  fi
21546else
21547  if test "$GXX" = yes; then
21548    CXXFLAGS="-O2"
21549  else
21550    CXXFLAGS=
21551  fi
21552fi
21553ac_ext=cpp
21554ac_cpp='$CXXCPP $CPPFLAGS'
21555ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21556ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21557ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21558
21559
21560### Locate other tools
21561
21562if test "x$OPENJDK_TARGET_OS" = xmacosx; then
21563    ac_ext=m
21564ac_cpp='$OBJCPP $CPPFLAGS'
21565ac_compile='$OBJC -c $OBJCFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21566ac_link='$OBJC -o conftest$ac_exeext $OBJCFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21567ac_compiler_gnu=$ac_cv_objc_compiler_gnu
21568if test -n "$ac_tool_prefix"; then
21569  for ac_prog in gcc objcc objc cc CC
21570  do
21571    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
21572set dummy $ac_tool_prefix$ac_prog; ac_word=$2
21573{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21574$as_echo_n "checking for $ac_word... " >&6; }
21575if ${ac_cv_prog_OBJC+:} false; then :
21576  $as_echo_n "(cached) " >&6
21577else
21578  if test -n "$OBJC"; then
21579  ac_cv_prog_OBJC="$OBJC" # Let the user override the test.
21580else
21581as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21582for as_dir in $PATH
21583do
21584  IFS=$as_save_IFS
21585  test -z "$as_dir" && as_dir=.
21586    for ac_exec_ext in '' $ac_executable_extensions; do
21587  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21588    ac_cv_prog_OBJC="$ac_tool_prefix$ac_prog"
21589    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21590    break 2
21591  fi
21592done
21593  done
21594IFS=$as_save_IFS
21595
21596fi
21597fi
21598OBJC=$ac_cv_prog_OBJC
21599if test -n "$OBJC"; then
21600  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJC" >&5
21601$as_echo "$OBJC" >&6; }
21602else
21603  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21604$as_echo "no" >&6; }
21605fi
21606
21607
21608    test -n "$OBJC" && break
21609  done
21610fi
21611if test -z "$OBJC"; then
21612  ac_ct_OBJC=$OBJC
21613  for ac_prog in gcc objcc objc cc CC
21614do
21615  # Extract the first word of "$ac_prog", so it can be a program name with args.
21616set dummy $ac_prog; ac_word=$2
21617{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21618$as_echo_n "checking for $ac_word... " >&6; }
21619if ${ac_cv_prog_ac_ct_OBJC+:} false; then :
21620  $as_echo_n "(cached) " >&6
21621else
21622  if test -n "$ac_ct_OBJC"; then
21623  ac_cv_prog_ac_ct_OBJC="$ac_ct_OBJC" # Let the user override the test.
21624else
21625as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21626for as_dir in $PATH
21627do
21628  IFS=$as_save_IFS
21629  test -z "$as_dir" && as_dir=.
21630    for ac_exec_ext in '' $ac_executable_extensions; do
21631  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21632    ac_cv_prog_ac_ct_OBJC="$ac_prog"
21633    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21634    break 2
21635  fi
21636done
21637  done
21638IFS=$as_save_IFS
21639
21640fi
21641fi
21642ac_ct_OBJC=$ac_cv_prog_ac_ct_OBJC
21643if test -n "$ac_ct_OBJC"; then
21644  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJC" >&5
21645$as_echo "$ac_ct_OBJC" >&6; }
21646else
21647  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21648$as_echo "no" >&6; }
21649fi
21650
21651
21652  test -n "$ac_ct_OBJC" && break
21653done
21654
21655  if test "x$ac_ct_OBJC" = x; then
21656    OBJC="gcc"
21657  else
21658    case $cross_compiling:$ac_tool_warned in
21659yes:)
21660{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
21661$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
21662ac_tool_warned=yes ;;
21663esac
21664    OBJC=$ac_ct_OBJC
21665  fi
21666fi
21667
21668# Provide some information about the compiler.
21669$as_echo "$as_me:${as_lineno-$LINENO}: checking for Objective C compiler version" >&5
21670set X $ac_compile
21671ac_compiler=$2
21672for ac_option in --version -v -V -qversion; do
21673  { { ac_try="$ac_compiler $ac_option >&5"
21674case "(($ac_try" in
21675  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21676  *) ac_try_echo=$ac_try;;
21677esac
21678eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
21679$as_echo "$ac_try_echo"; } >&5
21680  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
21681  ac_status=$?
21682  if test -s conftest.err; then
21683    sed '10a\
21684... rest of stderr output deleted ...
21685         10q' conftest.err >conftest.er1
21686    cat conftest.er1 >&5
21687  fi
21688  rm -f conftest.er1 conftest.err
21689  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21690  test $ac_status = 0; }
21691done
21692
21693{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Objective C compiler" >&5
21694$as_echo_n "checking whether we are using the GNU Objective C compiler... " >&6; }
21695if ${ac_cv_objc_compiler_gnu+:} false; then :
21696  $as_echo_n "(cached) " >&6
21697else
21698  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21699/* end confdefs.h.  */
21700
21701int
21702main ()
21703{
21704#ifndef __GNUC__
21705       choke me
21706#endif
21707
21708  ;
21709  return 0;
21710}
21711_ACEOF
21712if ac_fn_objc_try_compile "$LINENO"; then :
21713  ac_compiler_gnu=yes
21714else
21715  ac_compiler_gnu=no
21716fi
21717rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21718ac_cv_objc_compiler_gnu=$ac_compiler_gnu
21719
21720fi
21721{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objc_compiler_gnu" >&5
21722$as_echo "$ac_cv_objc_compiler_gnu" >&6; }
21723if test $ac_compiler_gnu = yes; then
21724  GOBJC=yes
21725else
21726  GOBJC=
21727fi
21728ac_test_OBJCFLAGS=${OBJCFLAGS+set}
21729ac_save_OBJCFLAGS=$OBJCFLAGS
21730{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $OBJC accepts -g" >&5
21731$as_echo_n "checking whether $OBJC accepts -g... " >&6; }
21732if ${ac_cv_prog_objc_g+:} false; then :
21733  $as_echo_n "(cached) " >&6
21734else
21735  ac_save_objc_werror_flag=$ac_objc_werror_flag
21736   ac_objc_werror_flag=yes
21737   ac_cv_prog_objc_g=no
21738   OBJCFLAGS="-g"
21739   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21740/* end confdefs.h.  */
21741
21742int
21743main ()
21744{
21745
21746  ;
21747  return 0;
21748}
21749_ACEOF
21750if ac_fn_objc_try_compile "$LINENO"; then :
21751  ac_cv_prog_objc_g=yes
21752else
21753  OBJCFLAGS=""
21754      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21755/* end confdefs.h.  */
21756
21757int
21758main ()
21759{
21760
21761  ;
21762  return 0;
21763}
21764_ACEOF
21765if ac_fn_objc_try_compile "$LINENO"; then :
21766
21767else
21768  ac_objc_werror_flag=$ac_save_objc_werror_flag
21769	 OBJCFLAGS="-g"
21770	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21771/* end confdefs.h.  */
21772
21773int
21774main ()
21775{
21776
21777  ;
21778  return 0;
21779}
21780_ACEOF
21781if ac_fn_objc_try_compile "$LINENO"; then :
21782  ac_cv_prog_objc_g=yes
21783fi
21784rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21785fi
21786rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21787fi
21788rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21789   ac_objc_werror_flag=$ac_save_objc_werror_flag
21790fi
21791{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_objc_g" >&5
21792$as_echo "$ac_cv_prog_objc_g" >&6; }
21793if test "$ac_test_OBJCFLAGS" = set; then
21794  OBJCFLAGS=$ac_save_OBJCFLAGS
21795elif test $ac_cv_prog_objc_g = yes; then
21796  if test "$GOBJC" = yes; then
21797    OBJCFLAGS="-g -O2"
21798  else
21799    OBJCFLAGS="-g"
21800  fi
21801else
21802  if test "$GOBJC" = yes; then
21803    OBJCFLAGS="-O2"
21804  else
21805    OBJCFLAGS=
21806  fi
21807fi
21808ac_ext=cpp
21809ac_cpp='$CXXCPP $CPPFLAGS'
21810ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21811ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21812ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21813
21814
21815  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21816
21817  # First separate the path from the arguments. This will split at the first
21818  # space.
21819  complete="$OBJC"
21820  path="${complete%% *}"
21821  tmp="$complete EOL"
21822  arguments="${tmp#* }"
21823
21824  # Input might be given as Windows format, start by converting to
21825  # unix format.
21826  new_path=`$CYGPATH -u "$path"`
21827
21828  # Now try to locate executable using which
21829  new_path=`$WHICH "$new_path" 2> /dev/null`
21830  # bat and cmd files are not always considered executable in cygwin causing which
21831  # to not find them
21832  if test "x$new_path" = x \
21833           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21834           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21835    new_path=`$CYGPATH -u "$path"`
21836  fi
21837  if test "x$new_path" = x; then
21838    # Oops. Which didn't find the executable.
21839    # The splitting of arguments from the executable at a space might have been incorrect,
21840    # since paths with space are more likely in Windows. Give it another try with the whole
21841    # argument.
21842    path="$complete"
21843    arguments="EOL"
21844    new_path=`$CYGPATH -u "$path"`
21845    new_path=`$WHICH "$new_path" 2> /dev/null`
21846    # bat and cmd files are not always considered executable in cygwin causing which
21847    # to not find them
21848    if test "x$new_path" = x \
21849             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21850             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21851      new_path=`$CYGPATH -u "$path"`
21852    fi
21853    if test "x$new_path" = x; then
21854      # It's still not found. Now this is an unrecoverable error.
21855      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
21856$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
21857      has_space=`$ECHO "$complete" | $GREP " "`
21858      if test "x$has_space" != x; then
21859        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21860$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21861      fi
21862      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
21863    fi
21864  fi
21865
21866  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21867  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21868  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21869  # "foo.exe" is OK but "foo" is an error.
21870  #
21871  # This test is therefore slightly more accurate than "test -f" to check for file presence.
21872  # It is also a way to make sure we got the proper file name for the real test later on.
21873  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21874  if test "x$test_shortpath" = x; then
21875    # Short path failed, file does not exist as specified.
21876    # Try adding .exe or .cmd
21877    if test -f "${new_path}.exe"; then
21878       input_to_shortpath="${new_path}.exe"
21879    elif test -f "${new_path}.cmd"; then
21880       input_to_shortpath="${new_path}.cmd"
21881    else
21882      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$new_path\", is invalid." >&5
21883$as_echo "$as_me: The path of OBJC, which resolves as \"$new_path\", is invalid." >&6;}
21884      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21885$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21886      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
21887    fi
21888  else
21889    input_to_shortpath="$new_path"
21890  fi
21891
21892  # Call helper function which possibly converts this using DOS-style short mode.
21893  # If so, the updated path is stored in $new_path.
21894  new_path="$input_to_shortpath"
21895
21896  input_path="$input_to_shortpath"
21897  # Check if we need to convert this using DOS-style short mode. If the path
21898  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21899  # take no chances and rewrite it.
21900  # Note: m4 eats our [], so we need to use [ and ] instead.
21901  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21902  if test "x$has_forbidden_chars" != x; then
21903    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21904    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21905    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21906    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21907      # Going to short mode and back again did indeed matter. Since short mode is
21908      # case insensitive, let's make it lowercase to improve readability.
21909      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21910      # Now convert it back to Unix-stile (cygpath)
21911      input_path=`$CYGPATH -u "$shortmode_path"`
21912      new_path="$input_path"
21913    fi
21914  fi
21915
21916  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21917  if test "x$test_cygdrive_prefix" = x; then
21918    # As a simple fix, exclude /usr/bin since it's not a real path.
21919    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21920      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21921      # a path prefixed by /cygdrive for fixpath to work.
21922      new_path="$CYGWIN_ROOT_PATH$input_path"
21923    fi
21924  fi
21925
21926  # remove trailing .exe if any
21927  new_path="${new_path/%.exe/}"
21928
21929  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21930
21931  # First separate the path from the arguments. This will split at the first
21932  # space.
21933  complete="$OBJC"
21934  path="${complete%% *}"
21935  tmp="$complete EOL"
21936  arguments="${tmp#* }"
21937
21938  # Input might be given as Windows format, start by converting to
21939  # unix format.
21940  new_path="$path"
21941
21942  windows_path="$new_path"
21943  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21944    unix_path=`$CYGPATH -u "$windows_path"`
21945    new_path="$unix_path"
21946  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21947    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21948    new_path="$unix_path"
21949  fi
21950
21951
21952  # Now try to locate executable using which
21953  new_path=`$WHICH "$new_path" 2> /dev/null`
21954
21955  if test "x$new_path" = x; then
21956    # Oops. Which didn't find the executable.
21957    # The splitting of arguments from the executable at a space might have been incorrect,
21958    # since paths with space are more likely in Windows. Give it another try with the whole
21959    # argument.
21960    path="$complete"
21961    arguments="EOL"
21962    new_path="$path"
21963
21964  windows_path="$new_path"
21965  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21966    unix_path=`$CYGPATH -u "$windows_path"`
21967    new_path="$unix_path"
21968  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21969    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21970    new_path="$unix_path"
21971  fi
21972
21973
21974    new_path=`$WHICH "$new_path" 2> /dev/null`
21975
21976    if test "x$new_path" = x; then
21977      # It's still not found. Now this is an unrecoverable error.
21978      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
21979$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
21980      has_space=`$ECHO "$complete" | $GREP " "`
21981      if test "x$has_space" != x; then
21982        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21983$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21984      fi
21985      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
21986    fi
21987  fi
21988
21989  # Now new_path has a complete unix path to the binary
21990  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21991    # Keep paths in /bin as-is, but remove trailing .exe if any
21992    new_path="${new_path/%.exe/}"
21993    # Do not save /bin paths to all_fixpath_prefixes!
21994  else
21995    # Not in mixed or Windows style, start by that.
21996    new_path=`cmd //c echo $new_path`
21997
21998  input_path="$new_path"
21999  # Check if we need to convert this using DOS-style short mode. If the path
22000  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22001  # take no chances and rewrite it.
22002  # Note: m4 eats our [], so we need to use [ and ] instead.
22003  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22004  if test "x$has_forbidden_chars" != x; then
22005    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22006    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22007  fi
22008
22009    # Output is in $new_path
22010
22011  windows_path="$new_path"
22012  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22013    unix_path=`$CYGPATH -u "$windows_path"`
22014    new_path="$unix_path"
22015  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22016    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22017    new_path="$unix_path"
22018  fi
22019
22020    # remove trailing .exe if any
22021    new_path="${new_path/%.exe/}"
22022
22023    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22024    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22025  fi
22026
22027  else
22028    # We're on a posix platform. Hooray! :)
22029    # First separate the path from the arguments. This will split at the first
22030    # space.
22031    complete="$OBJC"
22032    path="${complete%% *}"
22033    tmp="$complete EOL"
22034    arguments="${tmp#* }"
22035
22036    # Cannot rely on the command "which" here since it doesn't always work.
22037    is_absolute_path=`$ECHO "$path" | $GREP ^/`
22038    if test -z "$is_absolute_path"; then
22039      # Path to executable is not absolute. Find it.
22040      IFS_save="$IFS"
22041      IFS=:
22042      for p in $PATH; do
22043        if test -f "$p/$path" && test -x "$p/$path"; then
22044          new_path="$p/$path"
22045          break
22046        fi
22047      done
22048      IFS="$IFS_save"
22049    else
22050      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJC (as $path) failed, using $path directly." >&5
22051$as_echo "$as_me: Resolving OBJC (as $path) failed, using $path directly." >&6;}
22052      new_path="$path"
22053    fi
22054
22055    if test "x$new_path" = x; then
22056        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
22057$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
22058        has_space=`$ECHO "$complete" | $GREP " "`
22059        if test "x$has_space" != x; then
22060          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22061$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22062        fi
22063        as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
22064      fi
22065  fi
22066
22067      # Now join together the path and the arguments once again
22068      if test "x$arguments" != xEOL; then
22069        new_complete="$new_path ${arguments% *}"
22070      else
22071        new_complete="$new_path"
22072      fi
22073
22074  if test "x$complete" != "x$new_complete"; then
22075      OBJC="$new_complete"
22076      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJC to \"$new_complete\"" >&5
22077$as_echo "$as_me: Rewriting OBJC to \"$new_complete\"" >&6;}
22078    fi
22079
22080else
22081    OBJC=
22082fi
22083
22084# Restore the flags to the user specified values.
22085# This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
22086CFLAGS="$ORG_CFLAGS"
22087CXXFLAGS="$ORG_CXXFLAGS"
22088OBJCFLAGS="$ORG_OBJCFLAGS"
22089
22090LD="$CC"
22091LDEXE="$CC"
22092LDCXX="$CXX"
22093LDEXECXX="$CXX"
22094
22095# LDEXE is the linker to use, when creating executables.
22096
22097# Linking C++ libraries.
22098
22099# Linking C++ executables.
22100
22101
22102if test "x$OPENJDK_TARGET_OS" != xwindows; then
22103    if test -n "$ac_tool_prefix"; then
22104  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
22105set dummy ${ac_tool_prefix}ar; ac_word=$2
22106{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22107$as_echo_n "checking for $ac_word... " >&6; }
22108if ${ac_cv_prog_AR+:} false; then :
22109  $as_echo_n "(cached) " >&6
22110else
22111  if test -n "$AR"; then
22112  ac_cv_prog_AR="$AR" # Let the user override the test.
22113else
22114as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22115for as_dir in $PATH
22116do
22117  IFS=$as_save_IFS
22118  test -z "$as_dir" && as_dir=.
22119    for ac_exec_ext in '' $ac_executable_extensions; do
22120  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22121    ac_cv_prog_AR="${ac_tool_prefix}ar"
22122    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22123    break 2
22124  fi
22125done
22126  done
22127IFS=$as_save_IFS
22128
22129fi
22130fi
22131AR=$ac_cv_prog_AR
22132if test -n "$AR"; then
22133  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
22134$as_echo "$AR" >&6; }
22135else
22136  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22137$as_echo "no" >&6; }
22138fi
22139
22140
22141fi
22142if test -z "$ac_cv_prog_AR"; then
22143  ac_ct_AR=$AR
22144  # Extract the first word of "ar", so it can be a program name with args.
22145set dummy ar; ac_word=$2
22146{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22147$as_echo_n "checking for $ac_word... " >&6; }
22148if ${ac_cv_prog_ac_ct_AR+:} false; then :
22149  $as_echo_n "(cached) " >&6
22150else
22151  if test -n "$ac_ct_AR"; then
22152  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
22153else
22154as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22155for as_dir in $PATH
22156do
22157  IFS=$as_save_IFS
22158  test -z "$as_dir" && as_dir=.
22159    for ac_exec_ext in '' $ac_executable_extensions; do
22160  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22161    ac_cv_prog_ac_ct_AR="ar"
22162    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22163    break 2
22164  fi
22165done
22166  done
22167IFS=$as_save_IFS
22168
22169fi
22170fi
22171ac_ct_AR=$ac_cv_prog_ac_ct_AR
22172if test -n "$ac_ct_AR"; then
22173  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
22174$as_echo "$ac_ct_AR" >&6; }
22175else
22176  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22177$as_echo "no" >&6; }
22178fi
22179
22180  if test "x$ac_ct_AR" = x; then
22181    AR=""
22182  else
22183    case $cross_compiling:$ac_tool_warned in
22184yes:)
22185{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
22186$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
22187ac_tool_warned=yes ;;
22188esac
22189    AR=$ac_ct_AR
22190  fi
22191else
22192  AR="$ac_cv_prog_AR"
22193fi
22194
22195
22196  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22197
22198  # First separate the path from the arguments. This will split at the first
22199  # space.
22200  complete="$AR"
22201  path="${complete%% *}"
22202  tmp="$complete EOL"
22203  arguments="${tmp#* }"
22204
22205  # Input might be given as Windows format, start by converting to
22206  # unix format.
22207  new_path=`$CYGPATH -u "$path"`
22208
22209  # Now try to locate executable using which
22210  new_path=`$WHICH "$new_path" 2> /dev/null`
22211  # bat and cmd files are not always considered executable in cygwin causing which
22212  # to not find them
22213  if test "x$new_path" = x \
22214           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22215           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22216    new_path=`$CYGPATH -u "$path"`
22217  fi
22218  if test "x$new_path" = x; then
22219    # Oops. Which didn't find the executable.
22220    # The splitting of arguments from the executable at a space might have been incorrect,
22221    # since paths with space are more likely in Windows. Give it another try with the whole
22222    # argument.
22223    path="$complete"
22224    arguments="EOL"
22225    new_path=`$CYGPATH -u "$path"`
22226    new_path=`$WHICH "$new_path" 2> /dev/null`
22227    # bat and cmd files are not always considered executable in cygwin causing which
22228    # to not find them
22229    if test "x$new_path" = x \
22230             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22231             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22232      new_path=`$CYGPATH -u "$path"`
22233    fi
22234    if test "x$new_path" = x; then
22235      # It's still not found. Now this is an unrecoverable error.
22236      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
22237$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
22238      has_space=`$ECHO "$complete" | $GREP " "`
22239      if test "x$has_space" != x; then
22240        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22241$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22242      fi
22243      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22244    fi
22245  fi
22246
22247  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22248  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22249  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22250  # "foo.exe" is OK but "foo" is an error.
22251  #
22252  # This test is therefore slightly more accurate than "test -f" to check for file presence.
22253  # It is also a way to make sure we got the proper file name for the real test later on.
22254  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22255  if test "x$test_shortpath" = x; then
22256    # Short path failed, file does not exist as specified.
22257    # Try adding .exe or .cmd
22258    if test -f "${new_path}.exe"; then
22259       input_to_shortpath="${new_path}.exe"
22260    elif test -f "${new_path}.cmd"; then
22261       input_to_shortpath="${new_path}.cmd"
22262    else
22263      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
22264$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
22265      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22266$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22267      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22268    fi
22269  else
22270    input_to_shortpath="$new_path"
22271  fi
22272
22273  # Call helper function which possibly converts this using DOS-style short mode.
22274  # If so, the updated path is stored in $new_path.
22275  new_path="$input_to_shortpath"
22276
22277  input_path="$input_to_shortpath"
22278  # Check if we need to convert this using DOS-style short mode. If the path
22279  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22280  # take no chances and rewrite it.
22281  # Note: m4 eats our [], so we need to use [ and ] instead.
22282  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22283  if test "x$has_forbidden_chars" != x; then
22284    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22285    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22286    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22287    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22288      # Going to short mode and back again did indeed matter. Since short mode is
22289      # case insensitive, let's make it lowercase to improve readability.
22290      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22291      # Now convert it back to Unix-stile (cygpath)
22292      input_path=`$CYGPATH -u "$shortmode_path"`
22293      new_path="$input_path"
22294    fi
22295  fi
22296
22297  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22298  if test "x$test_cygdrive_prefix" = x; then
22299    # As a simple fix, exclude /usr/bin since it's not a real path.
22300    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22301      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22302      # a path prefixed by /cygdrive for fixpath to work.
22303      new_path="$CYGWIN_ROOT_PATH$input_path"
22304    fi
22305  fi
22306
22307  # remove trailing .exe if any
22308  new_path="${new_path/%.exe/}"
22309
22310  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22311
22312  # First separate the path from the arguments. This will split at the first
22313  # space.
22314  complete="$AR"
22315  path="${complete%% *}"
22316  tmp="$complete EOL"
22317  arguments="${tmp#* }"
22318
22319  # Input might be given as Windows format, start by converting to
22320  # unix format.
22321  new_path="$path"
22322
22323  windows_path="$new_path"
22324  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22325    unix_path=`$CYGPATH -u "$windows_path"`
22326    new_path="$unix_path"
22327  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22328    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22329    new_path="$unix_path"
22330  fi
22331
22332
22333  # Now try to locate executable using which
22334  new_path=`$WHICH "$new_path" 2> /dev/null`
22335
22336  if test "x$new_path" = x; then
22337    # Oops. Which didn't find the executable.
22338    # The splitting of arguments from the executable at a space might have been incorrect,
22339    # since paths with space are more likely in Windows. Give it another try with the whole
22340    # argument.
22341    path="$complete"
22342    arguments="EOL"
22343    new_path="$path"
22344
22345  windows_path="$new_path"
22346  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22347    unix_path=`$CYGPATH -u "$windows_path"`
22348    new_path="$unix_path"
22349  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22350    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22351    new_path="$unix_path"
22352  fi
22353
22354
22355    new_path=`$WHICH "$new_path" 2> /dev/null`
22356
22357    if test "x$new_path" = x; then
22358      # It's still not found. Now this is an unrecoverable error.
22359      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
22360$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
22361      has_space=`$ECHO "$complete" | $GREP " "`
22362      if test "x$has_space" != x; then
22363        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22364$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22365      fi
22366      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22367    fi
22368  fi
22369
22370  # Now new_path has a complete unix path to the binary
22371  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22372    # Keep paths in /bin as-is, but remove trailing .exe if any
22373    new_path="${new_path/%.exe/}"
22374    # Do not save /bin paths to all_fixpath_prefixes!
22375  else
22376    # Not in mixed or Windows style, start by that.
22377    new_path=`cmd //c echo $new_path`
22378
22379  input_path="$new_path"
22380  # Check if we need to convert this using DOS-style short mode. If the path
22381  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22382  # take no chances and rewrite it.
22383  # Note: m4 eats our [], so we need to use [ and ] instead.
22384  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22385  if test "x$has_forbidden_chars" != x; then
22386    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22387    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22388  fi
22389
22390    # Output is in $new_path
22391
22392  windows_path="$new_path"
22393  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22394    unix_path=`$CYGPATH -u "$windows_path"`
22395    new_path="$unix_path"
22396  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22397    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22398    new_path="$unix_path"
22399  fi
22400
22401    # remove trailing .exe if any
22402    new_path="${new_path/%.exe/}"
22403
22404    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22405    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22406  fi
22407
22408  else
22409    # We're on a posix platform. Hooray! :)
22410    # First separate the path from the arguments. This will split at the first
22411    # space.
22412    complete="$AR"
22413    path="${complete%% *}"
22414    tmp="$complete EOL"
22415    arguments="${tmp#* }"
22416
22417    # Cannot rely on the command "which" here since it doesn't always work.
22418    is_absolute_path=`$ECHO "$path" | $GREP ^/`
22419    if test -z "$is_absolute_path"; then
22420      # Path to executable is not absolute. Find it.
22421      IFS_save="$IFS"
22422      IFS=:
22423      for p in $PATH; do
22424        if test -f "$p/$path" && test -x "$p/$path"; then
22425          new_path="$p/$path"
22426          break
22427        fi
22428      done
22429      IFS="$IFS_save"
22430    else
22431      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AR (as $path) failed, using $path directly." >&5
22432$as_echo "$as_me: Resolving AR (as $path) failed, using $path directly." >&6;}
22433      new_path="$path"
22434    fi
22435
22436    if test "x$new_path" = x; then
22437        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
22438$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
22439        has_space=`$ECHO "$complete" | $GREP " "`
22440        if test "x$has_space" != x; then
22441          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22442$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22443        fi
22444        as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22445      fi
22446  fi
22447
22448      # Now join together the path and the arguments once again
22449      if test "x$arguments" != xEOL; then
22450        new_complete="$new_path ${arguments% *}"
22451      else
22452        new_complete="$new_path"
22453      fi
22454
22455  if test "x$complete" != "x$new_complete"; then
22456      AR="$new_complete"
22457      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
22458$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
22459    fi
22460
22461fi
22462if test "x$OPENJDK_TARGET_OS" = xmacosx; then
22463    ARFLAGS="-r"
22464else
22465    ARFLAGS=""
22466fi
22467
22468
22469# For hotspot, we need these in Windows mixed path; other platforms keep them the same
22470HOTSPOT_CXX="$CXX"
22471HOTSPOT_LD="$LD"
22472
22473
22474
22475COMPILER_NAME=gcc
22476COMPILER_TYPE=CC
22477if test "x$OPENJDK_TARGET_OS" = xwindows; then :
22478
22479    # For now, assume that we are always compiling using cl.exe.
22480    CC_OUT_OPTION=-Fo
22481    EXE_OUT_OPTION=-out:
22482    LD_OUT_OPTION=-out:
22483    AR_OUT_OPTION=-out:
22484    # On Windows, reject /usr/bin/link (as determined in CYGWIN_LINK), which is a cygwin
22485    # program for something completely different.
22486    # Extract the first word of "link", so it can be a program name with args.
22487set dummy link; ac_word=$2
22488{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22489$as_echo_n "checking for $ac_word... " >&6; }
22490if ${ac_cv_prog_WINLD+:} false; then :
22491  $as_echo_n "(cached) " >&6
22492else
22493  if test -n "$WINLD"; then
22494  ac_cv_prog_WINLD="$WINLD" # Let the user override the test.
22495else
22496  ac_prog_rejected=no
22497as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22498for as_dir in $PATH
22499do
22500  IFS=$as_save_IFS
22501  test -z "$as_dir" && as_dir=.
22502    for ac_exec_ext in '' $ac_executable_extensions; do
22503  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22504    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
22505       ac_prog_rejected=yes
22506       continue
22507     fi
22508    ac_cv_prog_WINLD="link"
22509    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22510    break 2
22511  fi
22512done
22513  done
22514IFS=$as_save_IFS
22515
22516if test $ac_prog_rejected = yes; then
22517  # We found a bogon in the path, so make sure we never use it.
22518  set dummy $ac_cv_prog_WINLD
22519  shift
22520  if test $# != 0; then
22521    # We chose a different compiler from the bogus one.
22522    # However, it has the same basename, so the bogon will be chosen
22523    # first if we set WINLD to just the basename; use the full file name.
22524    shift
22525    ac_cv_prog_WINLD="$as_dir/$ac_word${1+' '}$@"
22526  fi
22527fi
22528fi
22529fi
22530WINLD=$ac_cv_prog_WINLD
22531if test -n "$WINLD"; then
22532  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINLD" >&5
22533$as_echo "$WINLD" >&6; }
22534else
22535  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22536$as_echo "no" >&6; }
22537fi
22538
22539
22540    # Since we must ignore the first found link, WINLD will contain
22541    # the full path to the link.exe program.
22542
22543  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22544
22545  # First separate the path from the arguments. This will split at the first
22546  # space.
22547  complete="$WINLD"
22548  path="${complete%% *}"
22549  tmp="$complete EOL"
22550  arguments="${tmp#* }"
22551
22552  # Input might be given as Windows format, start by converting to
22553  # unix format.
22554  new_path=`$CYGPATH -u "$path"`
22555
22556  # Now try to locate executable using which
22557  new_path=`$WHICH "$new_path" 2> /dev/null`
22558  # bat and cmd files are not always considered executable in cygwin causing which
22559  # to not find them
22560  if test "x$new_path" = x \
22561           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22562           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22563    new_path=`$CYGPATH -u "$path"`
22564  fi
22565  if test "x$new_path" = x; then
22566    # Oops. Which didn't find the executable.
22567    # The splitting of arguments from the executable at a space might have been incorrect,
22568    # since paths with space are more likely in Windows. Give it another try with the whole
22569    # argument.
22570    path="$complete"
22571    arguments="EOL"
22572    new_path=`$CYGPATH -u "$path"`
22573    new_path=`$WHICH "$new_path" 2> /dev/null`
22574    # bat and cmd files are not always considered executable in cygwin causing which
22575    # to not find them
22576    if test "x$new_path" = x \
22577             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22578             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22579      new_path=`$CYGPATH -u "$path"`
22580    fi
22581    if test "x$new_path" = x; then
22582      # It's still not found. Now this is an unrecoverable error.
22583      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
22584$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
22585      has_space=`$ECHO "$complete" | $GREP " "`
22586      if test "x$has_space" != x; then
22587        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22588$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22589      fi
22590      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22591    fi
22592  fi
22593
22594  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22595  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22596  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22597  # "foo.exe" is OK but "foo" is an error.
22598  #
22599  # This test is therefore slightly more accurate than "test -f" to check for file presence.
22600  # It is also a way to make sure we got the proper file name for the real test later on.
22601  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22602  if test "x$test_shortpath" = x; then
22603    # Short path failed, file does not exist as specified.
22604    # Try adding .exe or .cmd
22605    if test -f "${new_path}.exe"; then
22606       input_to_shortpath="${new_path}.exe"
22607    elif test -f "${new_path}.cmd"; then
22608       input_to_shortpath="${new_path}.cmd"
22609    else
22610      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$new_path\", is invalid." >&5
22611$as_echo "$as_me: The path of WINLD, which resolves as \"$new_path\", is invalid." >&6;}
22612      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22613$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22614      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22615    fi
22616  else
22617    input_to_shortpath="$new_path"
22618  fi
22619
22620  # Call helper function which possibly converts this using DOS-style short mode.
22621  # If so, the updated path is stored in $new_path.
22622  new_path="$input_to_shortpath"
22623
22624  input_path="$input_to_shortpath"
22625  # Check if we need to convert this using DOS-style short mode. If the path
22626  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22627  # take no chances and rewrite it.
22628  # Note: m4 eats our [], so we need to use [ and ] instead.
22629  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22630  if test "x$has_forbidden_chars" != x; then
22631    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22632    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22633    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22634    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22635      # Going to short mode and back again did indeed matter. Since short mode is
22636      # case insensitive, let's make it lowercase to improve readability.
22637      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22638      # Now convert it back to Unix-stile (cygpath)
22639      input_path=`$CYGPATH -u "$shortmode_path"`
22640      new_path="$input_path"
22641    fi
22642  fi
22643
22644  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22645  if test "x$test_cygdrive_prefix" = x; then
22646    # As a simple fix, exclude /usr/bin since it's not a real path.
22647    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22648      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22649      # a path prefixed by /cygdrive for fixpath to work.
22650      new_path="$CYGWIN_ROOT_PATH$input_path"
22651    fi
22652  fi
22653
22654  # remove trailing .exe if any
22655  new_path="${new_path/%.exe/}"
22656
22657  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22658
22659  # First separate the path from the arguments. This will split at the first
22660  # space.
22661  complete="$WINLD"
22662  path="${complete%% *}"
22663  tmp="$complete EOL"
22664  arguments="${tmp#* }"
22665
22666  # Input might be given as Windows format, start by converting to
22667  # unix format.
22668  new_path="$path"
22669
22670  windows_path="$new_path"
22671  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22672    unix_path=`$CYGPATH -u "$windows_path"`
22673    new_path="$unix_path"
22674  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22675    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22676    new_path="$unix_path"
22677  fi
22678
22679
22680  # Now try to locate executable using which
22681  new_path=`$WHICH "$new_path" 2> /dev/null`
22682
22683  if test "x$new_path" = x; then
22684    # Oops. Which didn't find the executable.
22685    # The splitting of arguments from the executable at a space might have been incorrect,
22686    # since paths with space are more likely in Windows. Give it another try with the whole
22687    # argument.
22688    path="$complete"
22689    arguments="EOL"
22690    new_path="$path"
22691
22692  windows_path="$new_path"
22693  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22694    unix_path=`$CYGPATH -u "$windows_path"`
22695    new_path="$unix_path"
22696  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22697    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22698    new_path="$unix_path"
22699  fi
22700
22701
22702    new_path=`$WHICH "$new_path" 2> /dev/null`
22703
22704    if test "x$new_path" = x; then
22705      # It's still not found. Now this is an unrecoverable error.
22706      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
22707$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
22708      has_space=`$ECHO "$complete" | $GREP " "`
22709      if test "x$has_space" != x; then
22710        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22711$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22712      fi
22713      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22714    fi
22715  fi
22716
22717  # Now new_path has a complete unix path to the binary
22718  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22719    # Keep paths in /bin as-is, but remove trailing .exe if any
22720    new_path="${new_path/%.exe/}"
22721    # Do not save /bin paths to all_fixpath_prefixes!
22722  else
22723    # Not in mixed or Windows style, start by that.
22724    new_path=`cmd //c echo $new_path`
22725
22726  input_path="$new_path"
22727  # Check if we need to convert this using DOS-style short mode. If the path
22728  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22729  # take no chances and rewrite it.
22730  # Note: m4 eats our [], so we need to use [ and ] instead.
22731  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22732  if test "x$has_forbidden_chars" != x; then
22733    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22734    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22735  fi
22736
22737    # Output is in $new_path
22738
22739  windows_path="$new_path"
22740  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22741    unix_path=`$CYGPATH -u "$windows_path"`
22742    new_path="$unix_path"
22743  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22744    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22745    new_path="$unix_path"
22746  fi
22747
22748    # remove trailing .exe if any
22749    new_path="${new_path/%.exe/}"
22750
22751    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22752    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22753  fi
22754
22755  else
22756    # We're on a posix platform. Hooray! :)
22757    # First separate the path from the arguments. This will split at the first
22758    # space.
22759    complete="$WINLD"
22760    path="${complete%% *}"
22761    tmp="$complete EOL"
22762    arguments="${tmp#* }"
22763
22764    # Cannot rely on the command "which" here since it doesn't always work.
22765    is_absolute_path=`$ECHO "$path" | $GREP ^/`
22766    if test -z "$is_absolute_path"; then
22767      # Path to executable is not absolute. Find it.
22768      IFS_save="$IFS"
22769      IFS=:
22770      for p in $PATH; do
22771        if test -f "$p/$path" && test -x "$p/$path"; then
22772          new_path="$p/$path"
22773          break
22774        fi
22775      done
22776      IFS="$IFS_save"
22777    else
22778      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINLD (as $path) failed, using $path directly." >&5
22779$as_echo "$as_me: Resolving WINLD (as $path) failed, using $path directly." >&6;}
22780      new_path="$path"
22781    fi
22782
22783    if test "x$new_path" = x; then
22784        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
22785$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
22786        has_space=`$ECHO "$complete" | $GREP " "`
22787        if test "x$has_space" != x; then
22788          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22789$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22790        fi
22791        as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22792      fi
22793  fi
22794
22795      # Now join together the path and the arguments once again
22796      if test "x$arguments" != xEOL; then
22797        new_complete="$new_path ${arguments% *}"
22798      else
22799        new_complete="$new_path"
22800      fi
22801
22802  if test "x$complete" != "x$new_complete"; then
22803      WINLD="$new_complete"
22804      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINLD to \"$new_complete\"" >&5
22805$as_echo "$as_me: Rewriting WINLD to \"$new_complete\"" >&6;}
22806    fi
22807
22808    printf "Windows linker was found at $WINLD\n"
22809    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
22810$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
22811    "$WINLD" --version > /dev/null
22812    if test $? -eq 0 ; then
22813      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22814$as_echo "no" >&6; }
22815      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
22816    else
22817      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
22818$as_echo "yes" >&6; }
22819    fi
22820    LD="$WINLD"
22821    LDEXE="$WINLD"
22822    LDCXX="$WINLD"
22823    LDEXECXX="$WINLD"
22824
22825    # Extract the first word of "mt", so it can be a program name with args.
22826set dummy mt; ac_word=$2
22827{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22828$as_echo_n "checking for $ac_word... " >&6; }
22829if ${ac_cv_prog_MT+:} false; then :
22830  $as_echo_n "(cached) " >&6
22831else
22832  if test -n "$MT"; then
22833  ac_cv_prog_MT="$MT" # Let the user override the test.
22834else
22835  ac_prog_rejected=no
22836as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22837for as_dir in $PATH
22838do
22839  IFS=$as_save_IFS
22840  test -z "$as_dir" && as_dir=.
22841    for ac_exec_ext in '' $ac_executable_extensions; do
22842  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22843    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
22844       ac_prog_rejected=yes
22845       continue
22846     fi
22847    ac_cv_prog_MT="mt"
22848    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22849    break 2
22850  fi
22851done
22852  done
22853IFS=$as_save_IFS
22854
22855if test $ac_prog_rejected = yes; then
22856  # We found a bogon in the path, so make sure we never use it.
22857  set dummy $ac_cv_prog_MT
22858  shift
22859  if test $# != 0; then
22860    # We chose a different compiler from the bogus one.
22861    # However, it has the same basename, so the bogon will be chosen
22862    # first if we set MT to just the basename; use the full file name.
22863    shift
22864    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
22865  fi
22866fi
22867fi
22868fi
22869MT=$ac_cv_prog_MT
22870if test -n "$MT"; then
22871  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
22872$as_echo "$MT" >&6; }
22873else
22874  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22875$as_echo "no" >&6; }
22876fi
22877
22878
22879
22880  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22881
22882  # First separate the path from the arguments. This will split at the first
22883  # space.
22884  complete="$MT"
22885  path="${complete%% *}"
22886  tmp="$complete EOL"
22887  arguments="${tmp#* }"
22888
22889  # Input might be given as Windows format, start by converting to
22890  # unix format.
22891  new_path=`$CYGPATH -u "$path"`
22892
22893  # Now try to locate executable using which
22894  new_path=`$WHICH "$new_path" 2> /dev/null`
22895  # bat and cmd files are not always considered executable in cygwin causing which
22896  # to not find them
22897  if test "x$new_path" = x \
22898           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22899           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22900    new_path=`$CYGPATH -u "$path"`
22901  fi
22902  if test "x$new_path" = x; then
22903    # Oops. Which didn't find the executable.
22904    # The splitting of arguments from the executable at a space might have been incorrect,
22905    # since paths with space are more likely in Windows. Give it another try with the whole
22906    # argument.
22907    path="$complete"
22908    arguments="EOL"
22909    new_path=`$CYGPATH -u "$path"`
22910    new_path=`$WHICH "$new_path" 2> /dev/null`
22911    # bat and cmd files are not always considered executable in cygwin causing which
22912    # to not find them
22913    if test "x$new_path" = x \
22914             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22915             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22916      new_path=`$CYGPATH -u "$path"`
22917    fi
22918    if test "x$new_path" = x; then
22919      # It's still not found. Now this is an unrecoverable error.
22920      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
22921$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
22922      has_space=`$ECHO "$complete" | $GREP " "`
22923      if test "x$has_space" != x; then
22924        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22925$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22926      fi
22927      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
22928    fi
22929  fi
22930
22931  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22932  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22933  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22934  # "foo.exe" is OK but "foo" is an error.
22935  #
22936  # This test is therefore slightly more accurate than "test -f" to check for file presence.
22937  # It is also a way to make sure we got the proper file name for the real test later on.
22938  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22939  if test "x$test_shortpath" = x; then
22940    # Short path failed, file does not exist as specified.
22941    # Try adding .exe or .cmd
22942    if test -f "${new_path}.exe"; then
22943       input_to_shortpath="${new_path}.exe"
22944    elif test -f "${new_path}.cmd"; then
22945       input_to_shortpath="${new_path}.cmd"
22946    else
22947      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
22948$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
22949      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22950$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22951      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
22952    fi
22953  else
22954    input_to_shortpath="$new_path"
22955  fi
22956
22957  # Call helper function which possibly converts this using DOS-style short mode.
22958  # If so, the updated path is stored in $new_path.
22959  new_path="$input_to_shortpath"
22960
22961  input_path="$input_to_shortpath"
22962  # Check if we need to convert this using DOS-style short mode. If the path
22963  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22964  # take no chances and rewrite it.
22965  # Note: m4 eats our [], so we need to use [ and ] instead.
22966  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22967  if test "x$has_forbidden_chars" != x; then
22968    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22969    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22970    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22971    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22972      # Going to short mode and back again did indeed matter. Since short mode is
22973      # case insensitive, let's make it lowercase to improve readability.
22974      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22975      # Now convert it back to Unix-stile (cygpath)
22976      input_path=`$CYGPATH -u "$shortmode_path"`
22977      new_path="$input_path"
22978    fi
22979  fi
22980
22981  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22982  if test "x$test_cygdrive_prefix" = x; then
22983    # As a simple fix, exclude /usr/bin since it's not a real path.
22984    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22985      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22986      # a path prefixed by /cygdrive for fixpath to work.
22987      new_path="$CYGWIN_ROOT_PATH$input_path"
22988    fi
22989  fi
22990
22991  # remove trailing .exe if any
22992  new_path="${new_path/%.exe/}"
22993
22994  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22995
22996  # First separate the path from the arguments. This will split at the first
22997  # space.
22998  complete="$MT"
22999  path="${complete%% *}"
23000  tmp="$complete EOL"
23001  arguments="${tmp#* }"
23002
23003  # Input might be given as Windows format, start by converting to
23004  # unix format.
23005  new_path="$path"
23006
23007  windows_path="$new_path"
23008  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23009    unix_path=`$CYGPATH -u "$windows_path"`
23010    new_path="$unix_path"
23011  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23012    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23013    new_path="$unix_path"
23014  fi
23015
23016
23017  # Now try to locate executable using which
23018  new_path=`$WHICH "$new_path" 2> /dev/null`
23019
23020  if test "x$new_path" = x; then
23021    # Oops. Which didn't find the executable.
23022    # The splitting of arguments from the executable at a space might have been incorrect,
23023    # since paths with space are more likely in Windows. Give it another try with the whole
23024    # argument.
23025    path="$complete"
23026    arguments="EOL"
23027    new_path="$path"
23028
23029  windows_path="$new_path"
23030  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23031    unix_path=`$CYGPATH -u "$windows_path"`
23032    new_path="$unix_path"
23033  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23034    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23035    new_path="$unix_path"
23036  fi
23037
23038
23039    new_path=`$WHICH "$new_path" 2> /dev/null`
23040
23041    if test "x$new_path" = x; then
23042      # It's still not found. Now this is an unrecoverable error.
23043      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
23044$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
23045      has_space=`$ECHO "$complete" | $GREP " "`
23046      if test "x$has_space" != x; then
23047        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23048$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23049      fi
23050      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
23051    fi
23052  fi
23053
23054  # Now new_path has a complete unix path to the binary
23055  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23056    # Keep paths in /bin as-is, but remove trailing .exe if any
23057    new_path="${new_path/%.exe/}"
23058    # Do not save /bin paths to all_fixpath_prefixes!
23059  else
23060    # Not in mixed or Windows style, start by that.
23061    new_path=`cmd //c echo $new_path`
23062
23063  input_path="$new_path"
23064  # Check if we need to convert this using DOS-style short mode. If the path
23065  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23066  # take no chances and rewrite it.
23067  # Note: m4 eats our [], so we need to use [ and ] instead.
23068  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23069  if test "x$has_forbidden_chars" != x; then
23070    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23071    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23072  fi
23073
23074    # Output is in $new_path
23075
23076  windows_path="$new_path"
23077  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23078    unix_path=`$CYGPATH -u "$windows_path"`
23079    new_path="$unix_path"
23080  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23081    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23082    new_path="$unix_path"
23083  fi
23084
23085    # remove trailing .exe if any
23086    new_path="${new_path/%.exe/}"
23087
23088    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23089    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23090  fi
23091
23092  else
23093    # We're on a posix platform. Hooray! :)
23094    # First separate the path from the arguments. This will split at the first
23095    # space.
23096    complete="$MT"
23097    path="${complete%% *}"
23098    tmp="$complete EOL"
23099    arguments="${tmp#* }"
23100
23101    # Cannot rely on the command "which" here since it doesn't always work.
23102    is_absolute_path=`$ECHO "$path" | $GREP ^/`
23103    if test -z "$is_absolute_path"; then
23104      # Path to executable is not absolute. Find it.
23105      IFS_save="$IFS"
23106      IFS=:
23107      for p in $PATH; do
23108        if test -f "$p/$path" && test -x "$p/$path"; then
23109          new_path="$p/$path"
23110          break
23111        fi
23112      done
23113      IFS="$IFS_save"
23114    else
23115      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MT (as $path) failed, using $path directly." >&5
23116$as_echo "$as_me: Resolving MT (as $path) failed, using $path directly." >&6;}
23117      new_path="$path"
23118    fi
23119
23120    if test "x$new_path" = x; then
23121        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
23122$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
23123        has_space=`$ECHO "$complete" | $GREP " "`
23124        if test "x$has_space" != x; then
23125          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23126$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23127        fi
23128        as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
23129      fi
23130  fi
23131
23132      # Now join together the path and the arguments once again
23133      if test "x$arguments" != xEOL; then
23134        new_complete="$new_path ${arguments% *}"
23135      else
23136        new_complete="$new_path"
23137      fi
23138
23139  if test "x$complete" != "x$new_complete"; then
23140      MT="$new_complete"
23141      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
23142$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
23143    fi
23144
23145    # The resource compiler
23146    # Extract the first word of "rc", so it can be a program name with args.
23147set dummy rc; ac_word=$2
23148{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23149$as_echo_n "checking for $ac_word... " >&6; }
23150if ${ac_cv_prog_RC+:} false; then :
23151  $as_echo_n "(cached) " >&6
23152else
23153  if test -n "$RC"; then
23154  ac_cv_prog_RC="$RC" # Let the user override the test.
23155else
23156  ac_prog_rejected=no
23157as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23158for as_dir in $PATH
23159do
23160  IFS=$as_save_IFS
23161  test -z "$as_dir" && as_dir=.
23162    for ac_exec_ext in '' $ac_executable_extensions; do
23163  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23164    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
23165       ac_prog_rejected=yes
23166       continue
23167     fi
23168    ac_cv_prog_RC="rc"
23169    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23170    break 2
23171  fi
23172done
23173  done
23174IFS=$as_save_IFS
23175
23176if test $ac_prog_rejected = yes; then
23177  # We found a bogon in the path, so make sure we never use it.
23178  set dummy $ac_cv_prog_RC
23179  shift
23180  if test $# != 0; then
23181    # We chose a different compiler from the bogus one.
23182    # However, it has the same basename, so the bogon will be chosen
23183    # first if we set RC to just the basename; use the full file name.
23184    shift
23185    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
23186  fi
23187fi
23188fi
23189fi
23190RC=$ac_cv_prog_RC
23191if test -n "$RC"; then
23192  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
23193$as_echo "$RC" >&6; }
23194else
23195  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23196$as_echo "no" >&6; }
23197fi
23198
23199
23200
23201  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23202
23203  # First separate the path from the arguments. This will split at the first
23204  # space.
23205  complete="$RC"
23206  path="${complete%% *}"
23207  tmp="$complete EOL"
23208  arguments="${tmp#* }"
23209
23210  # Input might be given as Windows format, start by converting to
23211  # unix format.
23212  new_path=`$CYGPATH -u "$path"`
23213
23214  # Now try to locate executable using which
23215  new_path=`$WHICH "$new_path" 2> /dev/null`
23216  # bat and cmd files are not always considered executable in cygwin causing which
23217  # to not find them
23218  if test "x$new_path" = x \
23219           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23220           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23221    new_path=`$CYGPATH -u "$path"`
23222  fi
23223  if test "x$new_path" = x; then
23224    # Oops. Which didn't find the executable.
23225    # The splitting of arguments from the executable at a space might have been incorrect,
23226    # since paths with space are more likely in Windows. Give it another try with the whole
23227    # argument.
23228    path="$complete"
23229    arguments="EOL"
23230    new_path=`$CYGPATH -u "$path"`
23231    new_path=`$WHICH "$new_path" 2> /dev/null`
23232    # bat and cmd files are not always considered executable in cygwin causing which
23233    # to not find them
23234    if test "x$new_path" = x \
23235             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23236             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23237      new_path=`$CYGPATH -u "$path"`
23238    fi
23239    if test "x$new_path" = x; then
23240      # It's still not found. Now this is an unrecoverable error.
23241      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
23242$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
23243      has_space=`$ECHO "$complete" | $GREP " "`
23244      if test "x$has_space" != x; then
23245        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23246$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23247      fi
23248      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23249    fi
23250  fi
23251
23252  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23253  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23254  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23255  # "foo.exe" is OK but "foo" is an error.
23256  #
23257  # This test is therefore slightly more accurate than "test -f" to check for file presence.
23258  # It is also a way to make sure we got the proper file name for the real test later on.
23259  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23260  if test "x$test_shortpath" = x; then
23261    # Short path failed, file does not exist as specified.
23262    # Try adding .exe or .cmd
23263    if test -f "${new_path}.exe"; then
23264       input_to_shortpath="${new_path}.exe"
23265    elif test -f "${new_path}.cmd"; then
23266       input_to_shortpath="${new_path}.cmd"
23267    else
23268      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
23269$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
23270      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23271$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23272      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23273    fi
23274  else
23275    input_to_shortpath="$new_path"
23276  fi
23277
23278  # Call helper function which possibly converts this using DOS-style short mode.
23279  # If so, the updated path is stored in $new_path.
23280  new_path="$input_to_shortpath"
23281
23282  input_path="$input_to_shortpath"
23283  # Check if we need to convert this using DOS-style short mode. If the path
23284  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23285  # take no chances and rewrite it.
23286  # Note: m4 eats our [], so we need to use [ and ] instead.
23287  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23288  if test "x$has_forbidden_chars" != x; then
23289    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23290    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23291    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23292    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23293      # Going to short mode and back again did indeed matter. Since short mode is
23294      # case insensitive, let's make it lowercase to improve readability.
23295      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23296      # Now convert it back to Unix-stile (cygpath)
23297      input_path=`$CYGPATH -u "$shortmode_path"`
23298      new_path="$input_path"
23299    fi
23300  fi
23301
23302  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23303  if test "x$test_cygdrive_prefix" = x; then
23304    # As a simple fix, exclude /usr/bin since it's not a real path.
23305    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23306      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23307      # a path prefixed by /cygdrive for fixpath to work.
23308      new_path="$CYGWIN_ROOT_PATH$input_path"
23309    fi
23310  fi
23311
23312  # remove trailing .exe if any
23313  new_path="${new_path/%.exe/}"
23314
23315  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23316
23317  # First separate the path from the arguments. This will split at the first
23318  # space.
23319  complete="$RC"
23320  path="${complete%% *}"
23321  tmp="$complete EOL"
23322  arguments="${tmp#* }"
23323
23324  # Input might be given as Windows format, start by converting to
23325  # unix format.
23326  new_path="$path"
23327
23328  windows_path="$new_path"
23329  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23330    unix_path=`$CYGPATH -u "$windows_path"`
23331    new_path="$unix_path"
23332  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23333    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23334    new_path="$unix_path"
23335  fi
23336
23337
23338  # Now try to locate executable using which
23339  new_path=`$WHICH "$new_path" 2> /dev/null`
23340
23341  if test "x$new_path" = x; then
23342    # Oops. Which didn't find the executable.
23343    # The splitting of arguments from the executable at a space might have been incorrect,
23344    # since paths with space are more likely in Windows. Give it another try with the whole
23345    # argument.
23346    path="$complete"
23347    arguments="EOL"
23348    new_path="$path"
23349
23350  windows_path="$new_path"
23351  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23352    unix_path=`$CYGPATH -u "$windows_path"`
23353    new_path="$unix_path"
23354  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23355    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23356    new_path="$unix_path"
23357  fi
23358
23359
23360    new_path=`$WHICH "$new_path" 2> /dev/null`
23361
23362    if test "x$new_path" = x; then
23363      # It's still not found. Now this is an unrecoverable error.
23364      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
23365$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
23366      has_space=`$ECHO "$complete" | $GREP " "`
23367      if test "x$has_space" != x; then
23368        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23369$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23370      fi
23371      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23372    fi
23373  fi
23374
23375  # Now new_path has a complete unix path to the binary
23376  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23377    # Keep paths in /bin as-is, but remove trailing .exe if any
23378    new_path="${new_path/%.exe/}"
23379    # Do not save /bin paths to all_fixpath_prefixes!
23380  else
23381    # Not in mixed or Windows style, start by that.
23382    new_path=`cmd //c echo $new_path`
23383
23384  input_path="$new_path"
23385  # Check if we need to convert this using DOS-style short mode. If the path
23386  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23387  # take no chances and rewrite it.
23388  # Note: m4 eats our [], so we need to use [ and ] instead.
23389  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23390  if test "x$has_forbidden_chars" != x; then
23391    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23392    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23393  fi
23394
23395    # Output is in $new_path
23396
23397  windows_path="$new_path"
23398  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23399    unix_path=`$CYGPATH -u "$windows_path"`
23400    new_path="$unix_path"
23401  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23402    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23403    new_path="$unix_path"
23404  fi
23405
23406    # remove trailing .exe if any
23407    new_path="${new_path/%.exe/}"
23408
23409    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23410    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23411  fi
23412
23413  else
23414    # We're on a posix platform. Hooray! :)
23415    # First separate the path from the arguments. This will split at the first
23416    # space.
23417    complete="$RC"
23418    path="${complete%% *}"
23419    tmp="$complete EOL"
23420    arguments="${tmp#* }"
23421
23422    # Cannot rely on the command "which" here since it doesn't always work.
23423    is_absolute_path=`$ECHO "$path" | $GREP ^/`
23424    if test -z "$is_absolute_path"; then
23425      # Path to executable is not absolute. Find it.
23426      IFS_save="$IFS"
23427      IFS=:
23428      for p in $PATH; do
23429        if test -f "$p/$path" && test -x "$p/$path"; then
23430          new_path="$p/$path"
23431          break
23432        fi
23433      done
23434      IFS="$IFS_save"
23435    else
23436      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving RC (as $path) failed, using $path directly." >&5
23437$as_echo "$as_me: Resolving RC (as $path) failed, using $path directly." >&6;}
23438      new_path="$path"
23439    fi
23440
23441    if test "x$new_path" = x; then
23442        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
23443$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
23444        has_space=`$ECHO "$complete" | $GREP " "`
23445        if test "x$has_space" != x; then
23446          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23447$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23448        fi
23449        as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23450      fi
23451  fi
23452
23453      # Now join together the path and the arguments once again
23454      if test "x$arguments" != xEOL; then
23455        new_complete="$new_path ${arguments% *}"
23456      else
23457        new_complete="$new_path"
23458      fi
23459
23460  if test "x$complete" != "x$new_complete"; then
23461      RC="$new_complete"
23462      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
23463$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
23464    fi
23465
23466
23467    # For hotspot, we need these in Windows mixed path,
23468    # so rewrite them all. Need added .exe suffix.
23469    HOTSPOT_CXX="$CXX.exe"
23470    HOTSPOT_LD="$LD.exe"
23471    HOTSPOT_MT="$MT.exe"
23472    HOTSPOT_RC="$RC.exe"
23473
23474  unix_path="$HOTSPOT_CXX"
23475  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23476    windows_path=`$CYGPATH -m "$unix_path"`
23477    HOTSPOT_CXX="$windows_path"
23478  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23479    windows_path=`cmd //c echo $unix_path`
23480    HOTSPOT_CXX="$windows_path"
23481  fi
23482
23483
23484  unix_path="$HOTSPOT_LD"
23485  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23486    windows_path=`$CYGPATH -m "$unix_path"`
23487    HOTSPOT_LD="$windows_path"
23488  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23489    windows_path=`cmd //c echo $unix_path`
23490    HOTSPOT_LD="$windows_path"
23491  fi
23492
23493
23494  unix_path="$HOTSPOT_MT"
23495  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23496    windows_path=`$CYGPATH -m "$unix_path"`
23497    HOTSPOT_MT="$windows_path"
23498  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23499    windows_path=`cmd //c echo $unix_path`
23500    HOTSPOT_MT="$windows_path"
23501  fi
23502
23503
23504  unix_path="$HOTSPOT_RC"
23505  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23506    windows_path=`$CYGPATH -m "$unix_path"`
23507    HOTSPOT_RC="$windows_path"
23508  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23509    windows_path=`cmd //c echo $unix_path`
23510    HOTSPOT_RC="$windows_path"
23511  fi
23512
23513
23514
23515
23516    RC_FLAGS="-nologo -l 0x409 -r"
23517    if test "x$VARIANT" = xOPT; then :
23518
23519        RC_FLAGS="$RC_FLAGS -d NDEBUG"
23520
23521fi
23522
23523    # The version variables used to create RC_FLAGS may be overridden
23524    # in a custom configure script, or possibly the command line.
23525    # Let those variables be expanded at make time in spec.gmk.
23526    # The \$ are escaped to the shell, and the $(...) variables
23527    # are evaluated by make.
23528    RC_FLAGS="$RC_FLAGS \
23529        -d \"JDK_BUILD_ID=\$(FULL_VERSION)\" \
23530        -d \"JDK_COMPANY=\$(COMPANY_NAME)\" \
23531        -d \"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
23532        -d \"JDK_VER=\$(JDK_MINOR_VERSION).\$(JDK_MICRO_VERSION).\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0).\$(COOKED_BUILD_NUMBER)\" \
23533        -d \"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
23534        -d \"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(JDK_MINOR_VERSION) \$(JDK_UPDATE_META_TAG)\" \
23535        -d \"JDK_FVER=\$(JDK_MINOR_VERSION),\$(JDK_MICRO_VERSION),\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0),\$(COOKED_BUILD_NUMBER)\""
23536
23537    # lib.exe is used to create static libraries.
23538    # Extract the first word of "lib", so it can be a program name with args.
23539set dummy lib; ac_word=$2
23540{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23541$as_echo_n "checking for $ac_word... " >&6; }
23542if ${ac_cv_prog_WINAR+:} false; then :
23543  $as_echo_n "(cached) " >&6
23544else
23545  if test -n "$WINAR"; then
23546  ac_cv_prog_WINAR="$WINAR" # Let the user override the test.
23547else
23548as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23549for as_dir in $PATH
23550do
23551  IFS=$as_save_IFS
23552  test -z "$as_dir" && as_dir=.
23553    for ac_exec_ext in '' $ac_executable_extensions; do
23554  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23555    ac_cv_prog_WINAR="lib"
23556    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23557    break 2
23558  fi
23559done
23560  done
23561IFS=$as_save_IFS
23562
23563fi
23564fi
23565WINAR=$ac_cv_prog_WINAR
23566if test -n "$WINAR"; then
23567  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINAR" >&5
23568$as_echo "$WINAR" >&6; }
23569else
23570  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23571$as_echo "no" >&6; }
23572fi
23573
23574
23575
23576  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23577
23578  # First separate the path from the arguments. This will split at the first
23579  # space.
23580  complete="$WINAR"
23581  path="${complete%% *}"
23582  tmp="$complete EOL"
23583  arguments="${tmp#* }"
23584
23585  # Input might be given as Windows format, start by converting to
23586  # unix format.
23587  new_path=`$CYGPATH -u "$path"`
23588
23589  # Now try to locate executable using which
23590  new_path=`$WHICH "$new_path" 2> /dev/null`
23591  # bat and cmd files are not always considered executable in cygwin causing which
23592  # to not find them
23593  if test "x$new_path" = x \
23594           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23595           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23596    new_path=`$CYGPATH -u "$path"`
23597  fi
23598  if test "x$new_path" = x; then
23599    # Oops. Which didn't find the executable.
23600    # The splitting of arguments from the executable at a space might have been incorrect,
23601    # since paths with space are more likely in Windows. Give it another try with the whole
23602    # argument.
23603    path="$complete"
23604    arguments="EOL"
23605    new_path=`$CYGPATH -u "$path"`
23606    new_path=`$WHICH "$new_path" 2> /dev/null`
23607    # bat and cmd files are not always considered executable in cygwin causing which
23608    # to not find them
23609    if test "x$new_path" = x \
23610             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23611             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23612      new_path=`$CYGPATH -u "$path"`
23613    fi
23614    if test "x$new_path" = x; then
23615      # It's still not found. Now this is an unrecoverable error.
23616      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
23617$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
23618      has_space=`$ECHO "$complete" | $GREP " "`
23619      if test "x$has_space" != x; then
23620        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23621$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23622      fi
23623      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
23624    fi
23625  fi
23626
23627  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23628  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23629  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23630  # "foo.exe" is OK but "foo" is an error.
23631  #
23632  # This test is therefore slightly more accurate than "test -f" to check for file presence.
23633  # It is also a way to make sure we got the proper file name for the real test later on.
23634  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23635  if test "x$test_shortpath" = x; then
23636    # Short path failed, file does not exist as specified.
23637    # Try adding .exe or .cmd
23638    if test -f "${new_path}.exe"; then
23639       input_to_shortpath="${new_path}.exe"
23640    elif test -f "${new_path}.cmd"; then
23641       input_to_shortpath="${new_path}.cmd"
23642    else
23643      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$new_path\", is invalid." >&5
23644$as_echo "$as_me: The path of WINAR, which resolves as \"$new_path\", is invalid." >&6;}
23645      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23646$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23647      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
23648    fi
23649  else
23650    input_to_shortpath="$new_path"
23651  fi
23652
23653  # Call helper function which possibly converts this using DOS-style short mode.
23654  # If so, the updated path is stored in $new_path.
23655  new_path="$input_to_shortpath"
23656
23657  input_path="$input_to_shortpath"
23658  # Check if we need to convert this using DOS-style short mode. If the path
23659  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23660  # take no chances and rewrite it.
23661  # Note: m4 eats our [], so we need to use [ and ] instead.
23662  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23663  if test "x$has_forbidden_chars" != x; then
23664    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23665    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23666    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23667    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23668      # Going to short mode and back again did indeed matter. Since short mode is
23669      # case insensitive, let's make it lowercase to improve readability.
23670      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23671      # Now convert it back to Unix-stile (cygpath)
23672      input_path=`$CYGPATH -u "$shortmode_path"`
23673      new_path="$input_path"
23674    fi
23675  fi
23676
23677  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23678  if test "x$test_cygdrive_prefix" = x; then
23679    # As a simple fix, exclude /usr/bin since it's not a real path.
23680    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23681      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23682      # a path prefixed by /cygdrive for fixpath to work.
23683      new_path="$CYGWIN_ROOT_PATH$input_path"
23684    fi
23685  fi
23686
23687  # remove trailing .exe if any
23688  new_path="${new_path/%.exe/}"
23689
23690  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23691
23692  # First separate the path from the arguments. This will split at the first
23693  # space.
23694  complete="$WINAR"
23695  path="${complete%% *}"
23696  tmp="$complete EOL"
23697  arguments="${tmp#* }"
23698
23699  # Input might be given as Windows format, start by converting to
23700  # unix format.
23701  new_path="$path"
23702
23703  windows_path="$new_path"
23704  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23705    unix_path=`$CYGPATH -u "$windows_path"`
23706    new_path="$unix_path"
23707  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23708    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23709    new_path="$unix_path"
23710  fi
23711
23712
23713  # Now try to locate executable using which
23714  new_path=`$WHICH "$new_path" 2> /dev/null`
23715
23716  if test "x$new_path" = x; then
23717    # Oops. Which didn't find the executable.
23718    # The splitting of arguments from the executable at a space might have been incorrect,
23719    # since paths with space are more likely in Windows. Give it another try with the whole
23720    # argument.
23721    path="$complete"
23722    arguments="EOL"
23723    new_path="$path"
23724
23725  windows_path="$new_path"
23726  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23727    unix_path=`$CYGPATH -u "$windows_path"`
23728    new_path="$unix_path"
23729  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23730    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23731    new_path="$unix_path"
23732  fi
23733
23734
23735    new_path=`$WHICH "$new_path" 2> /dev/null`
23736
23737    if test "x$new_path" = x; then
23738      # It's still not found. Now this is an unrecoverable error.
23739      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
23740$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
23741      has_space=`$ECHO "$complete" | $GREP " "`
23742      if test "x$has_space" != x; then
23743        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23744$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23745      fi
23746      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
23747    fi
23748  fi
23749
23750  # Now new_path has a complete unix path to the binary
23751  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23752    # Keep paths in /bin as-is, but remove trailing .exe if any
23753    new_path="${new_path/%.exe/}"
23754    # Do not save /bin paths to all_fixpath_prefixes!
23755  else
23756    # Not in mixed or Windows style, start by that.
23757    new_path=`cmd //c echo $new_path`
23758
23759  input_path="$new_path"
23760  # Check if we need to convert this using DOS-style short mode. If the path
23761  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23762  # take no chances and rewrite it.
23763  # Note: m4 eats our [], so we need to use [ and ] instead.
23764  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23765  if test "x$has_forbidden_chars" != x; then
23766    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23767    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23768  fi
23769
23770    # Output is in $new_path
23771
23772  windows_path="$new_path"
23773  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23774    unix_path=`$CYGPATH -u "$windows_path"`
23775    new_path="$unix_path"
23776  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23777    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23778    new_path="$unix_path"
23779  fi
23780
23781    # remove trailing .exe if any
23782    new_path="${new_path/%.exe/}"
23783
23784    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23785    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23786  fi
23787
23788  else
23789    # We're on a posix platform. Hooray! :)
23790    # First separate the path from the arguments. This will split at the first
23791    # space.
23792    complete="$WINAR"
23793    path="${complete%% *}"
23794    tmp="$complete EOL"
23795    arguments="${tmp#* }"
23796
23797    # Cannot rely on the command "which" here since it doesn't always work.
23798    is_absolute_path=`$ECHO "$path" | $GREP ^/`
23799    if test -z "$is_absolute_path"; then
23800      # Path to executable is not absolute. Find it.
23801      IFS_save="$IFS"
23802      IFS=:
23803      for p in $PATH; do
23804        if test -f "$p/$path" && test -x "$p/$path"; then
23805          new_path="$p/$path"
23806          break
23807        fi
23808      done
23809      IFS="$IFS_save"
23810    else
23811      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINAR (as $path) failed, using $path directly." >&5
23812$as_echo "$as_me: Resolving WINAR (as $path) failed, using $path directly." >&6;}
23813      new_path="$path"
23814    fi
23815
23816    if test "x$new_path" = x; then
23817        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
23818$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
23819        has_space=`$ECHO "$complete" | $GREP " "`
23820        if test "x$has_space" != x; then
23821          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23822$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23823        fi
23824        as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
23825      fi
23826  fi
23827
23828      # Now join together the path and the arguments once again
23829      if test "x$arguments" != xEOL; then
23830        new_complete="$new_path ${arguments% *}"
23831      else
23832        new_complete="$new_path"
23833      fi
23834
23835  if test "x$complete" != "x$new_complete"; then
23836      WINAR="$new_complete"
23837      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINAR to \"$new_complete\"" >&5
23838$as_echo "$as_me: Rewriting WINAR to \"$new_complete\"" >&6;}
23839    fi
23840
23841    AR="$WINAR"
23842    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
23843
23844    # Extract the first word of "dumpbin", so it can be a program name with args.
23845set dummy dumpbin; ac_word=$2
23846{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23847$as_echo_n "checking for $ac_word... " >&6; }
23848if ${ac_cv_prog_DUMPBIN+:} false; then :
23849  $as_echo_n "(cached) " >&6
23850else
23851  if test -n "$DUMPBIN"; then
23852  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
23853else
23854as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23855for as_dir in $PATH
23856do
23857  IFS=$as_save_IFS
23858  test -z "$as_dir" && as_dir=.
23859    for ac_exec_ext in '' $ac_executable_extensions; do
23860  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23861    ac_cv_prog_DUMPBIN="dumpbin"
23862    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23863    break 2
23864  fi
23865done
23866  done
23867IFS=$as_save_IFS
23868
23869fi
23870fi
23871DUMPBIN=$ac_cv_prog_DUMPBIN
23872if test -n "$DUMPBIN"; then
23873  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
23874$as_echo "$DUMPBIN" >&6; }
23875else
23876  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23877$as_echo "no" >&6; }
23878fi
23879
23880
23881
23882  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23883
23884  # First separate the path from the arguments. This will split at the first
23885  # space.
23886  complete="$DUMPBIN"
23887  path="${complete%% *}"
23888  tmp="$complete EOL"
23889  arguments="${tmp#* }"
23890
23891  # Input might be given as Windows format, start by converting to
23892  # unix format.
23893  new_path=`$CYGPATH -u "$path"`
23894
23895  # Now try to locate executable using which
23896  new_path=`$WHICH "$new_path" 2> /dev/null`
23897  # bat and cmd files are not always considered executable in cygwin causing which
23898  # to not find them
23899  if test "x$new_path" = x \
23900           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23901           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23902    new_path=`$CYGPATH -u "$path"`
23903  fi
23904  if test "x$new_path" = x; then
23905    # Oops. Which didn't find the executable.
23906    # The splitting of arguments from the executable at a space might have been incorrect,
23907    # since paths with space are more likely in Windows. Give it another try with the whole
23908    # argument.
23909    path="$complete"
23910    arguments="EOL"
23911    new_path=`$CYGPATH -u "$path"`
23912    new_path=`$WHICH "$new_path" 2> /dev/null`
23913    # bat and cmd files are not always considered executable in cygwin causing which
23914    # to not find them
23915    if test "x$new_path" = x \
23916             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23917             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23918      new_path=`$CYGPATH -u "$path"`
23919    fi
23920    if test "x$new_path" = x; then
23921      # It's still not found. Now this is an unrecoverable error.
23922      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
23923$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
23924      has_space=`$ECHO "$complete" | $GREP " "`
23925      if test "x$has_space" != x; then
23926        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23927$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23928      fi
23929      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
23930    fi
23931  fi
23932
23933  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23934  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23935  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23936  # "foo.exe" is OK but "foo" is an error.
23937  #
23938  # This test is therefore slightly more accurate than "test -f" to check for file presence.
23939  # It is also a way to make sure we got the proper file name for the real test later on.
23940  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23941  if test "x$test_shortpath" = x; then
23942    # Short path failed, file does not exist as specified.
23943    # Try adding .exe or .cmd
23944    if test -f "${new_path}.exe"; then
23945       input_to_shortpath="${new_path}.exe"
23946    elif test -f "${new_path}.cmd"; then
23947       input_to_shortpath="${new_path}.cmd"
23948    else
23949      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
23950$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
23951      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23952$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23953      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
23954    fi
23955  else
23956    input_to_shortpath="$new_path"
23957  fi
23958
23959  # Call helper function which possibly converts this using DOS-style short mode.
23960  # If so, the updated path is stored in $new_path.
23961  new_path="$input_to_shortpath"
23962
23963  input_path="$input_to_shortpath"
23964  # Check if we need to convert this using DOS-style short mode. If the path
23965  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23966  # take no chances and rewrite it.
23967  # Note: m4 eats our [], so we need to use [ and ] instead.
23968  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23969  if test "x$has_forbidden_chars" != x; then
23970    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23971    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23972    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23973    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23974      # Going to short mode and back again did indeed matter. Since short mode is
23975      # case insensitive, let's make it lowercase to improve readability.
23976      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23977      # Now convert it back to Unix-stile (cygpath)
23978      input_path=`$CYGPATH -u "$shortmode_path"`
23979      new_path="$input_path"
23980    fi
23981  fi
23982
23983  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23984  if test "x$test_cygdrive_prefix" = x; then
23985    # As a simple fix, exclude /usr/bin since it's not a real path.
23986    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23987      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23988      # a path prefixed by /cygdrive for fixpath to work.
23989      new_path="$CYGWIN_ROOT_PATH$input_path"
23990    fi
23991  fi
23992
23993  # remove trailing .exe if any
23994  new_path="${new_path/%.exe/}"
23995
23996  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23997
23998  # First separate the path from the arguments. This will split at the first
23999  # space.
24000  complete="$DUMPBIN"
24001  path="${complete%% *}"
24002  tmp="$complete EOL"
24003  arguments="${tmp#* }"
24004
24005  # Input might be given as Windows format, start by converting to
24006  # unix format.
24007  new_path="$path"
24008
24009  windows_path="$new_path"
24010  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24011    unix_path=`$CYGPATH -u "$windows_path"`
24012    new_path="$unix_path"
24013  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24014    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24015    new_path="$unix_path"
24016  fi
24017
24018
24019  # Now try to locate executable using which
24020  new_path=`$WHICH "$new_path" 2> /dev/null`
24021
24022  if test "x$new_path" = x; then
24023    # Oops. Which didn't find the executable.
24024    # The splitting of arguments from the executable at a space might have been incorrect,
24025    # since paths with space are more likely in Windows. Give it another try with the whole
24026    # argument.
24027    path="$complete"
24028    arguments="EOL"
24029    new_path="$path"
24030
24031  windows_path="$new_path"
24032  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24033    unix_path=`$CYGPATH -u "$windows_path"`
24034    new_path="$unix_path"
24035  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24036    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24037    new_path="$unix_path"
24038  fi
24039
24040
24041    new_path=`$WHICH "$new_path" 2> /dev/null`
24042
24043    if test "x$new_path" = x; then
24044      # It's still not found. Now this is an unrecoverable error.
24045      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
24046$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
24047      has_space=`$ECHO "$complete" | $GREP " "`
24048      if test "x$has_space" != x; then
24049        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24050$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24051      fi
24052      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
24053    fi
24054  fi
24055
24056  # Now new_path has a complete unix path to the binary
24057  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24058    # Keep paths in /bin as-is, but remove trailing .exe if any
24059    new_path="${new_path/%.exe/}"
24060    # Do not save /bin paths to all_fixpath_prefixes!
24061  else
24062    # Not in mixed or Windows style, start by that.
24063    new_path=`cmd //c echo $new_path`
24064
24065  input_path="$new_path"
24066  # Check if we need to convert this using DOS-style short mode. If the path
24067  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24068  # take no chances and rewrite it.
24069  # Note: m4 eats our [], so we need to use [ and ] instead.
24070  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24071  if test "x$has_forbidden_chars" != x; then
24072    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24073    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24074  fi
24075
24076    # Output is in $new_path
24077
24078  windows_path="$new_path"
24079  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24080    unix_path=`$CYGPATH -u "$windows_path"`
24081    new_path="$unix_path"
24082  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24083    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24084    new_path="$unix_path"
24085  fi
24086
24087    # remove trailing .exe if any
24088    new_path="${new_path/%.exe/}"
24089
24090    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24091    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24092  fi
24093
24094  else
24095    # We're on a posix platform. Hooray! :)
24096    # First separate the path from the arguments. This will split at the first
24097    # space.
24098    complete="$DUMPBIN"
24099    path="${complete%% *}"
24100    tmp="$complete EOL"
24101    arguments="${tmp#* }"
24102
24103    # Cannot rely on the command "which" here since it doesn't always work.
24104    is_absolute_path=`$ECHO "$path" | $GREP ^/`
24105    if test -z "$is_absolute_path"; then
24106      # Path to executable is not absolute. Find it.
24107      IFS_save="$IFS"
24108      IFS=:
24109      for p in $PATH; do
24110        if test -f "$p/$path" && test -x "$p/$path"; then
24111          new_path="$p/$path"
24112          break
24113        fi
24114      done
24115      IFS="$IFS_save"
24116    else
24117      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving DUMPBIN (as $path) failed, using $path directly." >&5
24118$as_echo "$as_me: Resolving DUMPBIN (as $path) failed, using $path directly." >&6;}
24119      new_path="$path"
24120    fi
24121
24122    if test "x$new_path" = x; then
24123        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
24124$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
24125        has_space=`$ECHO "$complete" | $GREP " "`
24126        if test "x$has_space" != x; then
24127          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24128$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24129        fi
24130        as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
24131      fi
24132  fi
24133
24134      # Now join together the path and the arguments once again
24135      if test "x$arguments" != xEOL; then
24136        new_complete="$new_path ${arguments% *}"
24137      else
24138        new_complete="$new_path"
24139      fi
24140
24141  if test "x$complete" != "x$new_complete"; then
24142      DUMPBIN="$new_complete"
24143      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
24144$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
24145    fi
24146
24147
24148    COMPILER_TYPE=CL
24149    CCXXFLAGS="$CCXXFLAGS -nologo"
24150
24151fi
24152
24153
24154
24155ac_ext=c
24156ac_cpp='$CPP $CPPFLAGS'
24157ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24158ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24159ac_compiler_gnu=$ac_cv_c_compiler_gnu
24160{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
24161$as_echo_n "checking how to run the C preprocessor... " >&6; }
24162# On Suns, sometimes $CPP names a directory.
24163if test -n "$CPP" && test -d "$CPP"; then
24164  CPP=
24165fi
24166if test -z "$CPP"; then
24167  if ${ac_cv_prog_CPP+:} false; then :
24168  $as_echo_n "(cached) " >&6
24169else
24170      # Double quotes because CPP needs to be expanded
24171    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
24172    do
24173      ac_preproc_ok=false
24174for ac_c_preproc_warn_flag in '' yes
24175do
24176  # Use a header file that comes with gcc, so configuring glibc
24177  # with a fresh cross-compiler works.
24178  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24179  # <limits.h> exists even on freestanding compilers.
24180  # On the NeXT, cc -E runs the code through the compiler's parser,
24181  # not just through cpp. "Syntax error" is here to catch this case.
24182  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24183/* end confdefs.h.  */
24184#ifdef __STDC__
24185# include <limits.h>
24186#else
24187# include <assert.h>
24188#endif
24189		     Syntax error
24190_ACEOF
24191if ac_fn_c_try_cpp "$LINENO"; then :
24192
24193else
24194  # Broken: fails on valid input.
24195continue
24196fi
24197rm -f conftest.err conftest.i conftest.$ac_ext
24198
24199  # OK, works on sane cases.  Now check whether nonexistent headers
24200  # can be detected and how.
24201  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24202/* end confdefs.h.  */
24203#include <ac_nonexistent.h>
24204_ACEOF
24205if ac_fn_c_try_cpp "$LINENO"; then :
24206  # Broken: success on invalid input.
24207continue
24208else
24209  # Passes both tests.
24210ac_preproc_ok=:
24211break
24212fi
24213rm -f conftest.err conftest.i conftest.$ac_ext
24214
24215done
24216# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24217rm -f conftest.i conftest.err conftest.$ac_ext
24218if $ac_preproc_ok; then :
24219  break
24220fi
24221
24222    done
24223    ac_cv_prog_CPP=$CPP
24224
24225fi
24226  CPP=$ac_cv_prog_CPP
24227else
24228  ac_cv_prog_CPP=$CPP
24229fi
24230{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
24231$as_echo "$CPP" >&6; }
24232ac_preproc_ok=false
24233for ac_c_preproc_warn_flag in '' yes
24234do
24235  # Use a header file that comes with gcc, so configuring glibc
24236  # with a fresh cross-compiler works.
24237  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24238  # <limits.h> exists even on freestanding compilers.
24239  # On the NeXT, cc -E runs the code through the compiler's parser,
24240  # not just through cpp. "Syntax error" is here to catch this case.
24241  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24242/* end confdefs.h.  */
24243#ifdef __STDC__
24244# include <limits.h>
24245#else
24246# include <assert.h>
24247#endif
24248		     Syntax error
24249_ACEOF
24250if ac_fn_c_try_cpp "$LINENO"; then :
24251
24252else
24253  # Broken: fails on valid input.
24254continue
24255fi
24256rm -f conftest.err conftest.i conftest.$ac_ext
24257
24258  # OK, works on sane cases.  Now check whether nonexistent headers
24259  # can be detected and how.
24260  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24261/* end confdefs.h.  */
24262#include <ac_nonexistent.h>
24263_ACEOF
24264if ac_fn_c_try_cpp "$LINENO"; then :
24265  # Broken: success on invalid input.
24266continue
24267else
24268  # Passes both tests.
24269ac_preproc_ok=:
24270break
24271fi
24272rm -f conftest.err conftest.i conftest.$ac_ext
24273
24274done
24275# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24276rm -f conftest.i conftest.err conftest.$ac_ext
24277if $ac_preproc_ok; then :
24278
24279else
24280  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
24281$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
24282as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
24283See \`config.log' for more details" "$LINENO" 5; }
24284fi
24285
24286ac_ext=cpp
24287ac_cpp='$CXXCPP $CPPFLAGS'
24288ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24289ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24290ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24291
24292
24293  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24294
24295  # First separate the path from the arguments. This will split at the first
24296  # space.
24297  complete="$CPP"
24298  path="${complete%% *}"
24299  tmp="$complete EOL"
24300  arguments="${tmp#* }"
24301
24302  # Input might be given as Windows format, start by converting to
24303  # unix format.
24304  new_path=`$CYGPATH -u "$path"`
24305
24306  # Now try to locate executable using which
24307  new_path=`$WHICH "$new_path" 2> /dev/null`
24308  # bat and cmd files are not always considered executable in cygwin causing which
24309  # to not find them
24310  if test "x$new_path" = x \
24311           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24312           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24313    new_path=`$CYGPATH -u "$path"`
24314  fi
24315  if test "x$new_path" = x; then
24316    # Oops. Which didn't find the executable.
24317    # The splitting of arguments from the executable at a space might have been incorrect,
24318    # since paths with space are more likely in Windows. Give it another try with the whole
24319    # argument.
24320    path="$complete"
24321    arguments="EOL"
24322    new_path=`$CYGPATH -u "$path"`
24323    new_path=`$WHICH "$new_path" 2> /dev/null`
24324    # bat and cmd files are not always considered executable in cygwin causing which
24325    # to not find them
24326    if test "x$new_path" = x \
24327             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24328             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24329      new_path=`$CYGPATH -u "$path"`
24330    fi
24331    if test "x$new_path" = x; then
24332      # It's still not found. Now this is an unrecoverable error.
24333      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
24334$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
24335      has_space=`$ECHO "$complete" | $GREP " "`
24336      if test "x$has_space" != x; then
24337        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24338$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24339      fi
24340      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24341    fi
24342  fi
24343
24344  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24345  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24346  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24347  # "foo.exe" is OK but "foo" is an error.
24348  #
24349  # This test is therefore slightly more accurate than "test -f" to check for file presence.
24350  # It is also a way to make sure we got the proper file name for the real test later on.
24351  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24352  if test "x$test_shortpath" = x; then
24353    # Short path failed, file does not exist as specified.
24354    # Try adding .exe or .cmd
24355    if test -f "${new_path}.exe"; then
24356       input_to_shortpath="${new_path}.exe"
24357    elif test -f "${new_path}.cmd"; then
24358       input_to_shortpath="${new_path}.cmd"
24359    else
24360      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
24361$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
24362      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24363$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24364      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24365    fi
24366  else
24367    input_to_shortpath="$new_path"
24368  fi
24369
24370  # Call helper function which possibly converts this using DOS-style short mode.
24371  # If so, the updated path is stored in $new_path.
24372  new_path="$input_to_shortpath"
24373
24374  input_path="$input_to_shortpath"
24375  # Check if we need to convert this using DOS-style short mode. If the path
24376  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24377  # take no chances and rewrite it.
24378  # Note: m4 eats our [], so we need to use [ and ] instead.
24379  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24380  if test "x$has_forbidden_chars" != x; then
24381    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24382    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24383    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24384    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24385      # Going to short mode and back again did indeed matter. Since short mode is
24386      # case insensitive, let's make it lowercase to improve readability.
24387      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24388      # Now convert it back to Unix-stile (cygpath)
24389      input_path=`$CYGPATH -u "$shortmode_path"`
24390      new_path="$input_path"
24391    fi
24392  fi
24393
24394  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24395  if test "x$test_cygdrive_prefix" = x; then
24396    # As a simple fix, exclude /usr/bin since it's not a real path.
24397    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24398      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24399      # a path prefixed by /cygdrive for fixpath to work.
24400      new_path="$CYGWIN_ROOT_PATH$input_path"
24401    fi
24402  fi
24403
24404  # remove trailing .exe if any
24405  new_path="${new_path/%.exe/}"
24406
24407  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24408
24409  # First separate the path from the arguments. This will split at the first
24410  # space.
24411  complete="$CPP"
24412  path="${complete%% *}"
24413  tmp="$complete EOL"
24414  arguments="${tmp#* }"
24415
24416  # Input might be given as Windows format, start by converting to
24417  # unix format.
24418  new_path="$path"
24419
24420  windows_path="$new_path"
24421  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24422    unix_path=`$CYGPATH -u "$windows_path"`
24423    new_path="$unix_path"
24424  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24425    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24426    new_path="$unix_path"
24427  fi
24428
24429
24430  # Now try to locate executable using which
24431  new_path=`$WHICH "$new_path" 2> /dev/null`
24432
24433  if test "x$new_path" = x; then
24434    # Oops. Which didn't find the executable.
24435    # The splitting of arguments from the executable at a space might have been incorrect,
24436    # since paths with space are more likely in Windows. Give it another try with the whole
24437    # argument.
24438    path="$complete"
24439    arguments="EOL"
24440    new_path="$path"
24441
24442  windows_path="$new_path"
24443  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24444    unix_path=`$CYGPATH -u "$windows_path"`
24445    new_path="$unix_path"
24446  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24447    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24448    new_path="$unix_path"
24449  fi
24450
24451
24452    new_path=`$WHICH "$new_path" 2> /dev/null`
24453
24454    if test "x$new_path" = x; then
24455      # It's still not found. Now this is an unrecoverable error.
24456      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
24457$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
24458      has_space=`$ECHO "$complete" | $GREP " "`
24459      if test "x$has_space" != x; then
24460        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24461$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24462      fi
24463      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24464    fi
24465  fi
24466
24467  # Now new_path has a complete unix path to the binary
24468  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24469    # Keep paths in /bin as-is, but remove trailing .exe if any
24470    new_path="${new_path/%.exe/}"
24471    # Do not save /bin paths to all_fixpath_prefixes!
24472  else
24473    # Not in mixed or Windows style, start by that.
24474    new_path=`cmd //c echo $new_path`
24475
24476  input_path="$new_path"
24477  # Check if we need to convert this using DOS-style short mode. If the path
24478  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24479  # take no chances and rewrite it.
24480  # Note: m4 eats our [], so we need to use [ and ] instead.
24481  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24482  if test "x$has_forbidden_chars" != x; then
24483    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24484    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24485  fi
24486
24487    # Output is in $new_path
24488
24489  windows_path="$new_path"
24490  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24491    unix_path=`$CYGPATH -u "$windows_path"`
24492    new_path="$unix_path"
24493  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24494    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24495    new_path="$unix_path"
24496  fi
24497
24498    # remove trailing .exe if any
24499    new_path="${new_path/%.exe/}"
24500
24501    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24502    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24503  fi
24504
24505  else
24506    # We're on a posix platform. Hooray! :)
24507    # First separate the path from the arguments. This will split at the first
24508    # space.
24509    complete="$CPP"
24510    path="${complete%% *}"
24511    tmp="$complete EOL"
24512    arguments="${tmp#* }"
24513
24514    # Cannot rely on the command "which" here since it doesn't always work.
24515    is_absolute_path=`$ECHO "$path" | $GREP ^/`
24516    if test -z "$is_absolute_path"; then
24517      # Path to executable is not absolute. Find it.
24518      IFS_save="$IFS"
24519      IFS=:
24520      for p in $PATH; do
24521        if test -f "$p/$path" && test -x "$p/$path"; then
24522          new_path="$p/$path"
24523          break
24524        fi
24525      done
24526      IFS="$IFS_save"
24527    else
24528      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CPP (as $path) failed, using $path directly." >&5
24529$as_echo "$as_me: Resolving CPP (as $path) failed, using $path directly." >&6;}
24530      new_path="$path"
24531    fi
24532
24533    if test "x$new_path" = x; then
24534        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
24535$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
24536        has_space=`$ECHO "$complete" | $GREP " "`
24537        if test "x$has_space" != x; then
24538          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24539$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24540        fi
24541        as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24542      fi
24543  fi
24544
24545      # Now join together the path and the arguments once again
24546      if test "x$arguments" != xEOL; then
24547        new_complete="$new_path ${arguments% *}"
24548      else
24549        new_complete="$new_path"
24550      fi
24551
24552  if test "x$complete" != "x$new_complete"; then
24553      CPP="$new_complete"
24554      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
24555$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
24556    fi
24557
24558
24559ac_ext=cpp
24560ac_cpp='$CXXCPP $CPPFLAGS'
24561ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24562ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24563ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24564{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
24565$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
24566if test -z "$CXXCPP"; then
24567  if ${ac_cv_prog_CXXCPP+:} false; then :
24568  $as_echo_n "(cached) " >&6
24569else
24570      # Double quotes because CXXCPP needs to be expanded
24571    for CXXCPP in "$CXX -E" "/lib/cpp"
24572    do
24573      ac_preproc_ok=false
24574for ac_cxx_preproc_warn_flag in '' yes
24575do
24576  # Use a header file that comes with gcc, so configuring glibc
24577  # with a fresh cross-compiler works.
24578  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24579  # <limits.h> exists even on freestanding compilers.
24580  # On the NeXT, cc -E runs the code through the compiler's parser,
24581  # not just through cpp. "Syntax error" is here to catch this case.
24582  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24583/* end confdefs.h.  */
24584#ifdef __STDC__
24585# include <limits.h>
24586#else
24587# include <assert.h>
24588#endif
24589		     Syntax error
24590_ACEOF
24591if ac_fn_cxx_try_cpp "$LINENO"; then :
24592
24593else
24594  # Broken: fails on valid input.
24595continue
24596fi
24597rm -f conftest.err conftest.i conftest.$ac_ext
24598
24599  # OK, works on sane cases.  Now check whether nonexistent headers
24600  # can be detected and how.
24601  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24602/* end confdefs.h.  */
24603#include <ac_nonexistent.h>
24604_ACEOF
24605if ac_fn_cxx_try_cpp "$LINENO"; then :
24606  # Broken: success on invalid input.
24607continue
24608else
24609  # Passes both tests.
24610ac_preproc_ok=:
24611break
24612fi
24613rm -f conftest.err conftest.i conftest.$ac_ext
24614
24615done
24616# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24617rm -f conftest.i conftest.err conftest.$ac_ext
24618if $ac_preproc_ok; then :
24619  break
24620fi
24621
24622    done
24623    ac_cv_prog_CXXCPP=$CXXCPP
24624
24625fi
24626  CXXCPP=$ac_cv_prog_CXXCPP
24627else
24628  ac_cv_prog_CXXCPP=$CXXCPP
24629fi
24630{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
24631$as_echo "$CXXCPP" >&6; }
24632ac_preproc_ok=false
24633for ac_cxx_preproc_warn_flag in '' yes
24634do
24635  # Use a header file that comes with gcc, so configuring glibc
24636  # with a fresh cross-compiler works.
24637  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24638  # <limits.h> exists even on freestanding compilers.
24639  # On the NeXT, cc -E runs the code through the compiler's parser,
24640  # not just through cpp. "Syntax error" is here to catch this case.
24641  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24642/* end confdefs.h.  */
24643#ifdef __STDC__
24644# include <limits.h>
24645#else
24646# include <assert.h>
24647#endif
24648		     Syntax error
24649_ACEOF
24650if ac_fn_cxx_try_cpp "$LINENO"; then :
24651
24652else
24653  # Broken: fails on valid input.
24654continue
24655fi
24656rm -f conftest.err conftest.i conftest.$ac_ext
24657
24658  # OK, works on sane cases.  Now check whether nonexistent headers
24659  # can be detected and how.
24660  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24661/* end confdefs.h.  */
24662#include <ac_nonexistent.h>
24663_ACEOF
24664if ac_fn_cxx_try_cpp "$LINENO"; then :
24665  # Broken: success on invalid input.
24666continue
24667else
24668  # Passes both tests.
24669ac_preproc_ok=:
24670break
24671fi
24672rm -f conftest.err conftest.i conftest.$ac_ext
24673
24674done
24675# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24676rm -f conftest.i conftest.err conftest.$ac_ext
24677if $ac_preproc_ok; then :
24678
24679else
24680  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
24681$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
24682as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
24683See \`config.log' for more details" "$LINENO" 5; }
24684fi
24685
24686ac_ext=cpp
24687ac_cpp='$CXXCPP $CPPFLAGS'
24688ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24689ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24690ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24691
24692
24693  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24694
24695  # First separate the path from the arguments. This will split at the first
24696  # space.
24697  complete="$CXXCPP"
24698  path="${complete%% *}"
24699  tmp="$complete EOL"
24700  arguments="${tmp#* }"
24701
24702  # Input might be given as Windows format, start by converting to
24703  # unix format.
24704  new_path=`$CYGPATH -u "$path"`
24705
24706  # Now try to locate executable using which
24707  new_path=`$WHICH "$new_path" 2> /dev/null`
24708  # bat and cmd files are not always considered executable in cygwin causing which
24709  # to not find them
24710  if test "x$new_path" = x \
24711           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24712           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24713    new_path=`$CYGPATH -u "$path"`
24714  fi
24715  if test "x$new_path" = x; then
24716    # Oops. Which didn't find the executable.
24717    # The splitting of arguments from the executable at a space might have been incorrect,
24718    # since paths with space are more likely in Windows. Give it another try with the whole
24719    # argument.
24720    path="$complete"
24721    arguments="EOL"
24722    new_path=`$CYGPATH -u "$path"`
24723    new_path=`$WHICH "$new_path" 2> /dev/null`
24724    # bat and cmd files are not always considered executable in cygwin causing which
24725    # to not find them
24726    if test "x$new_path" = x \
24727             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24728             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24729      new_path=`$CYGPATH -u "$path"`
24730    fi
24731    if test "x$new_path" = x; then
24732      # It's still not found. Now this is an unrecoverable error.
24733      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
24734$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
24735      has_space=`$ECHO "$complete" | $GREP " "`
24736      if test "x$has_space" != x; then
24737        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24738$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24739      fi
24740      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
24741    fi
24742  fi
24743
24744  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24745  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24746  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24747  # "foo.exe" is OK but "foo" is an error.
24748  #
24749  # This test is therefore slightly more accurate than "test -f" to check for file presence.
24750  # It is also a way to make sure we got the proper file name for the real test later on.
24751  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24752  if test "x$test_shortpath" = x; then
24753    # Short path failed, file does not exist as specified.
24754    # Try adding .exe or .cmd
24755    if test -f "${new_path}.exe"; then
24756       input_to_shortpath="${new_path}.exe"
24757    elif test -f "${new_path}.cmd"; then
24758       input_to_shortpath="${new_path}.cmd"
24759    else
24760      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
24761$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
24762      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24763$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24764      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
24765    fi
24766  else
24767    input_to_shortpath="$new_path"
24768  fi
24769
24770  # Call helper function which possibly converts this using DOS-style short mode.
24771  # If so, the updated path is stored in $new_path.
24772  new_path="$input_to_shortpath"
24773
24774  input_path="$input_to_shortpath"
24775  # Check if we need to convert this using DOS-style short mode. If the path
24776  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24777  # take no chances and rewrite it.
24778  # Note: m4 eats our [], so we need to use [ and ] instead.
24779  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24780  if test "x$has_forbidden_chars" != x; then
24781    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24782    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24783    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24784    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24785      # Going to short mode and back again did indeed matter. Since short mode is
24786      # case insensitive, let's make it lowercase to improve readability.
24787      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24788      # Now convert it back to Unix-stile (cygpath)
24789      input_path=`$CYGPATH -u "$shortmode_path"`
24790      new_path="$input_path"
24791    fi
24792  fi
24793
24794  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24795  if test "x$test_cygdrive_prefix" = x; then
24796    # As a simple fix, exclude /usr/bin since it's not a real path.
24797    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24798      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24799      # a path prefixed by /cygdrive for fixpath to work.
24800      new_path="$CYGWIN_ROOT_PATH$input_path"
24801    fi
24802  fi
24803
24804  # remove trailing .exe if any
24805  new_path="${new_path/%.exe/}"
24806
24807  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24808
24809  # First separate the path from the arguments. This will split at the first
24810  # space.
24811  complete="$CXXCPP"
24812  path="${complete%% *}"
24813  tmp="$complete EOL"
24814  arguments="${tmp#* }"
24815
24816  # Input might be given as Windows format, start by converting to
24817  # unix format.
24818  new_path="$path"
24819
24820  windows_path="$new_path"
24821  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24822    unix_path=`$CYGPATH -u "$windows_path"`
24823    new_path="$unix_path"
24824  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24825    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24826    new_path="$unix_path"
24827  fi
24828
24829
24830  # Now try to locate executable using which
24831  new_path=`$WHICH "$new_path" 2> /dev/null`
24832
24833  if test "x$new_path" = x; then
24834    # Oops. Which didn't find the executable.
24835    # The splitting of arguments from the executable at a space might have been incorrect,
24836    # since paths with space are more likely in Windows. Give it another try with the whole
24837    # argument.
24838    path="$complete"
24839    arguments="EOL"
24840    new_path="$path"
24841
24842  windows_path="$new_path"
24843  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24844    unix_path=`$CYGPATH -u "$windows_path"`
24845    new_path="$unix_path"
24846  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24847    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24848    new_path="$unix_path"
24849  fi
24850
24851
24852    new_path=`$WHICH "$new_path" 2> /dev/null`
24853
24854    if test "x$new_path" = x; then
24855      # It's still not found. Now this is an unrecoverable error.
24856      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
24857$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
24858      has_space=`$ECHO "$complete" | $GREP " "`
24859      if test "x$has_space" != x; then
24860        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24861$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24862      fi
24863      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
24864    fi
24865  fi
24866
24867  # Now new_path has a complete unix path to the binary
24868  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24869    # Keep paths in /bin as-is, but remove trailing .exe if any
24870    new_path="${new_path/%.exe/}"
24871    # Do not save /bin paths to all_fixpath_prefixes!
24872  else
24873    # Not in mixed or Windows style, start by that.
24874    new_path=`cmd //c echo $new_path`
24875
24876  input_path="$new_path"
24877  # Check if we need to convert this using DOS-style short mode. If the path
24878  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24879  # take no chances and rewrite it.
24880  # Note: m4 eats our [], so we need to use [ and ] instead.
24881  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24882  if test "x$has_forbidden_chars" != x; then
24883    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24884    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24885  fi
24886
24887    # Output is in $new_path
24888
24889  windows_path="$new_path"
24890  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24891    unix_path=`$CYGPATH -u "$windows_path"`
24892    new_path="$unix_path"
24893  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24894    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24895    new_path="$unix_path"
24896  fi
24897
24898    # remove trailing .exe if any
24899    new_path="${new_path/%.exe/}"
24900
24901    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24902    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24903  fi
24904
24905  else
24906    # We're on a posix platform. Hooray! :)
24907    # First separate the path from the arguments. This will split at the first
24908    # space.
24909    complete="$CXXCPP"
24910    path="${complete%% *}"
24911    tmp="$complete EOL"
24912    arguments="${tmp#* }"
24913
24914    # Cannot rely on the command "which" here since it doesn't always work.
24915    is_absolute_path=`$ECHO "$path" | $GREP ^/`
24916    if test -z "$is_absolute_path"; then
24917      # Path to executable is not absolute. Find it.
24918      IFS_save="$IFS"
24919      IFS=:
24920      for p in $PATH; do
24921        if test -f "$p/$path" && test -x "$p/$path"; then
24922          new_path="$p/$path"
24923          break
24924        fi
24925      done
24926      IFS="$IFS_save"
24927    else
24928      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXXCPP (as $path) failed, using $path directly." >&5
24929$as_echo "$as_me: Resolving CXXCPP (as $path) failed, using $path directly." >&6;}
24930      new_path="$path"
24931    fi
24932
24933    if test "x$new_path" = x; then
24934        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
24935$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
24936        has_space=`$ECHO "$complete" | $GREP " "`
24937        if test "x$has_space" != x; then
24938          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24939$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24940        fi
24941        as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
24942      fi
24943  fi
24944
24945      # Now join together the path and the arguments once again
24946      if test "x$arguments" != xEOL; then
24947        new_complete="$new_path ${arguments% *}"
24948      else
24949        new_complete="$new_path"
24950      fi
24951
24952  if test "x$complete" != "x$new_complete"; then
24953      CXXCPP="$new_complete"
24954      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
24955$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
24956    fi
24957
24958
24959if test "x$COMPILE_TYPE" != "xcross"; then
24960    # If we are not cross compiling, use the same compilers for
24961    # building the build platform executables. The cross-compilation
24962    # case needed to be done earlier, but this can only be done after
24963    # the native tools have been localized.
24964    BUILD_CC="$CC"
24965    BUILD_CXX="$CXX"
24966    BUILD_LD="$LD"
24967fi
24968
24969# for solaris we really need solaris tools, and not gnu equivalent
24970#   these seems to normally reside in /usr/ccs/bin so add that to path before
24971#   starting to probe
24972#
24973#   NOTE: I add this /usr/ccs/bin after TOOLS but before OLD_PATH
24974#         so that it can be overriden --with-tools-dir
24975if test "x$OPENJDK_BUILD_OS" = xsolaris; then
24976    PATH="${TOOLS_DIR}:/usr/ccs/bin:${OLD_PATH}"
24977fi
24978
24979# Find the right assembler.
24980if test "x$OPENJDK_TARGET_OS" = xsolaris; then
24981    # Extract the first word of "as", so it can be a program name with args.
24982set dummy as; ac_word=$2
24983{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24984$as_echo_n "checking for $ac_word... " >&6; }
24985if ${ac_cv_path_AS+:} false; then :
24986  $as_echo_n "(cached) " >&6
24987else
24988  case $AS in
24989  [\\/]* | ?:[\\/]*)
24990  ac_cv_path_AS="$AS" # Let the user override the test with a path.
24991  ;;
24992  *)
24993  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24994for as_dir in $PATH
24995do
24996  IFS=$as_save_IFS
24997  test -z "$as_dir" && as_dir=.
24998    for ac_exec_ext in '' $ac_executable_extensions; do
24999  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25000    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
25001    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25002    break 2
25003  fi
25004done
25005  done
25006IFS=$as_save_IFS
25007
25008  ;;
25009esac
25010fi
25011AS=$ac_cv_path_AS
25012if test -n "$AS"; then
25013  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
25014$as_echo "$AS" >&6; }
25015else
25016  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25017$as_echo "no" >&6; }
25018fi
25019
25020
25021
25022  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25023
25024  # First separate the path from the arguments. This will split at the first
25025  # space.
25026  complete="$AS"
25027  path="${complete%% *}"
25028  tmp="$complete EOL"
25029  arguments="${tmp#* }"
25030
25031  # Input might be given as Windows format, start by converting to
25032  # unix format.
25033  new_path=`$CYGPATH -u "$path"`
25034
25035  # Now try to locate executable using which
25036  new_path=`$WHICH "$new_path" 2> /dev/null`
25037  # bat and cmd files are not always considered executable in cygwin causing which
25038  # to not find them
25039  if test "x$new_path" = x \
25040           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25041           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25042    new_path=`$CYGPATH -u "$path"`
25043  fi
25044  if test "x$new_path" = x; then
25045    # Oops. Which didn't find the executable.
25046    # The splitting of arguments from the executable at a space might have been incorrect,
25047    # since paths with space are more likely in Windows. Give it another try with the whole
25048    # argument.
25049    path="$complete"
25050    arguments="EOL"
25051    new_path=`$CYGPATH -u "$path"`
25052    new_path=`$WHICH "$new_path" 2> /dev/null`
25053    # bat and cmd files are not always considered executable in cygwin causing which
25054    # to not find them
25055    if test "x$new_path" = x \
25056             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25057             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25058      new_path=`$CYGPATH -u "$path"`
25059    fi
25060    if test "x$new_path" = x; then
25061      # It's still not found. Now this is an unrecoverable error.
25062      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
25063$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
25064      has_space=`$ECHO "$complete" | $GREP " "`
25065      if test "x$has_space" != x; then
25066        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25067$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25068      fi
25069      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25070    fi
25071  fi
25072
25073  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25074  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25075  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25076  # "foo.exe" is OK but "foo" is an error.
25077  #
25078  # This test is therefore slightly more accurate than "test -f" to check for file presence.
25079  # It is also a way to make sure we got the proper file name for the real test later on.
25080  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25081  if test "x$test_shortpath" = x; then
25082    # Short path failed, file does not exist as specified.
25083    # Try adding .exe or .cmd
25084    if test -f "${new_path}.exe"; then
25085       input_to_shortpath="${new_path}.exe"
25086    elif test -f "${new_path}.cmd"; then
25087       input_to_shortpath="${new_path}.cmd"
25088    else
25089      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
25090$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
25091      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25092$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25093      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25094    fi
25095  else
25096    input_to_shortpath="$new_path"
25097  fi
25098
25099  # Call helper function which possibly converts this using DOS-style short mode.
25100  # If so, the updated path is stored in $new_path.
25101  new_path="$input_to_shortpath"
25102
25103  input_path="$input_to_shortpath"
25104  # Check if we need to convert this using DOS-style short mode. If the path
25105  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25106  # take no chances and rewrite it.
25107  # Note: m4 eats our [], so we need to use [ and ] instead.
25108  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25109  if test "x$has_forbidden_chars" != x; then
25110    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25111    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25112    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25113    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25114      # Going to short mode and back again did indeed matter. Since short mode is
25115      # case insensitive, let's make it lowercase to improve readability.
25116      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25117      # Now convert it back to Unix-stile (cygpath)
25118      input_path=`$CYGPATH -u "$shortmode_path"`
25119      new_path="$input_path"
25120    fi
25121  fi
25122
25123  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25124  if test "x$test_cygdrive_prefix" = x; then
25125    # As a simple fix, exclude /usr/bin since it's not a real path.
25126    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25127      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25128      # a path prefixed by /cygdrive for fixpath to work.
25129      new_path="$CYGWIN_ROOT_PATH$input_path"
25130    fi
25131  fi
25132
25133  # remove trailing .exe if any
25134  new_path="${new_path/%.exe/}"
25135
25136  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25137
25138  # First separate the path from the arguments. This will split at the first
25139  # space.
25140  complete="$AS"
25141  path="${complete%% *}"
25142  tmp="$complete EOL"
25143  arguments="${tmp#* }"
25144
25145  # Input might be given as Windows format, start by converting to
25146  # unix format.
25147  new_path="$path"
25148
25149  windows_path="$new_path"
25150  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25151    unix_path=`$CYGPATH -u "$windows_path"`
25152    new_path="$unix_path"
25153  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25154    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25155    new_path="$unix_path"
25156  fi
25157
25158
25159  # Now try to locate executable using which
25160  new_path=`$WHICH "$new_path" 2> /dev/null`
25161
25162  if test "x$new_path" = x; then
25163    # Oops. Which didn't find the executable.
25164    # The splitting of arguments from the executable at a space might have been incorrect,
25165    # since paths with space are more likely in Windows. Give it another try with the whole
25166    # argument.
25167    path="$complete"
25168    arguments="EOL"
25169    new_path="$path"
25170
25171  windows_path="$new_path"
25172  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25173    unix_path=`$CYGPATH -u "$windows_path"`
25174    new_path="$unix_path"
25175  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25176    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25177    new_path="$unix_path"
25178  fi
25179
25180
25181    new_path=`$WHICH "$new_path" 2> /dev/null`
25182
25183    if test "x$new_path" = x; then
25184      # It's still not found. Now this is an unrecoverable error.
25185      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
25186$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
25187      has_space=`$ECHO "$complete" | $GREP " "`
25188      if test "x$has_space" != x; then
25189        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25190$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25191      fi
25192      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25193    fi
25194  fi
25195
25196  # Now new_path has a complete unix path to the binary
25197  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25198    # Keep paths in /bin as-is, but remove trailing .exe if any
25199    new_path="${new_path/%.exe/}"
25200    # Do not save /bin paths to all_fixpath_prefixes!
25201  else
25202    # Not in mixed or Windows style, start by that.
25203    new_path=`cmd //c echo $new_path`
25204
25205  input_path="$new_path"
25206  # Check if we need to convert this using DOS-style short mode. If the path
25207  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25208  # take no chances and rewrite it.
25209  # Note: m4 eats our [], so we need to use [ and ] instead.
25210  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25211  if test "x$has_forbidden_chars" != x; then
25212    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25213    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25214  fi
25215
25216    # Output is in $new_path
25217
25218  windows_path="$new_path"
25219  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25220    unix_path=`$CYGPATH -u "$windows_path"`
25221    new_path="$unix_path"
25222  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25223    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25224    new_path="$unix_path"
25225  fi
25226
25227    # remove trailing .exe if any
25228    new_path="${new_path/%.exe/}"
25229
25230    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25231    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25232  fi
25233
25234  else
25235    # We're on a posix platform. Hooray! :)
25236    # First separate the path from the arguments. This will split at the first
25237    # space.
25238    complete="$AS"
25239    path="${complete%% *}"
25240    tmp="$complete EOL"
25241    arguments="${tmp#* }"
25242
25243    # Cannot rely on the command "which" here since it doesn't always work.
25244    is_absolute_path=`$ECHO "$path" | $GREP ^/`
25245    if test -z "$is_absolute_path"; then
25246      # Path to executable is not absolute. Find it.
25247      IFS_save="$IFS"
25248      IFS=:
25249      for p in $PATH; do
25250        if test -f "$p/$path" && test -x "$p/$path"; then
25251          new_path="$p/$path"
25252          break
25253        fi
25254      done
25255      IFS="$IFS_save"
25256    else
25257      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AS (as $path) failed, using $path directly." >&5
25258$as_echo "$as_me: Resolving AS (as $path) failed, using $path directly." >&6;}
25259      new_path="$path"
25260    fi
25261
25262    if test "x$new_path" = x; then
25263        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
25264$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
25265        has_space=`$ECHO "$complete" | $GREP " "`
25266        if test "x$has_space" != x; then
25267          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25268$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25269        fi
25270        as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25271      fi
25272  fi
25273
25274      # Now join together the path and the arguments once again
25275      if test "x$arguments" != xEOL; then
25276        new_complete="$new_path ${arguments% *}"
25277      else
25278        new_complete="$new_path"
25279      fi
25280
25281  if test "x$complete" != "x$new_complete"; then
25282      AS="$new_complete"
25283      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
25284$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
25285    fi
25286
25287else
25288    AS="$CC -c"
25289fi
25290
25291
25292if test "x$OPENJDK_TARGET_OS" = xsolaris; then
25293    # Extract the first word of "nm", so it can be a program name with args.
25294set dummy nm; ac_word=$2
25295{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25296$as_echo_n "checking for $ac_word... " >&6; }
25297if ${ac_cv_path_NM+:} false; then :
25298  $as_echo_n "(cached) " >&6
25299else
25300  case $NM in
25301  [\\/]* | ?:[\\/]*)
25302  ac_cv_path_NM="$NM" # Let the user override the test with a path.
25303  ;;
25304  *)
25305  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25306for as_dir in $PATH
25307do
25308  IFS=$as_save_IFS
25309  test -z "$as_dir" && as_dir=.
25310    for ac_exec_ext in '' $ac_executable_extensions; do
25311  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25312    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
25313    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25314    break 2
25315  fi
25316done
25317  done
25318IFS=$as_save_IFS
25319
25320  ;;
25321esac
25322fi
25323NM=$ac_cv_path_NM
25324if test -n "$NM"; then
25325  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
25326$as_echo "$NM" >&6; }
25327else
25328  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25329$as_echo "no" >&6; }
25330fi
25331
25332
25333
25334  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25335
25336  # First separate the path from the arguments. This will split at the first
25337  # space.
25338  complete="$NM"
25339  path="${complete%% *}"
25340  tmp="$complete EOL"
25341  arguments="${tmp#* }"
25342
25343  # Input might be given as Windows format, start by converting to
25344  # unix format.
25345  new_path=`$CYGPATH -u "$path"`
25346
25347  # Now try to locate executable using which
25348  new_path=`$WHICH "$new_path" 2> /dev/null`
25349  # bat and cmd files are not always considered executable in cygwin causing which
25350  # to not find them
25351  if test "x$new_path" = x \
25352           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25353           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25354    new_path=`$CYGPATH -u "$path"`
25355  fi
25356  if test "x$new_path" = x; then
25357    # Oops. Which didn't find the executable.
25358    # The splitting of arguments from the executable at a space might have been incorrect,
25359    # since paths with space are more likely in Windows. Give it another try with the whole
25360    # argument.
25361    path="$complete"
25362    arguments="EOL"
25363    new_path=`$CYGPATH -u "$path"`
25364    new_path=`$WHICH "$new_path" 2> /dev/null`
25365    # bat and cmd files are not always considered executable in cygwin causing which
25366    # to not find them
25367    if test "x$new_path" = x \
25368             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25369             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25370      new_path=`$CYGPATH -u "$path"`
25371    fi
25372    if test "x$new_path" = x; then
25373      # It's still not found. Now this is an unrecoverable error.
25374      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25375$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25376      has_space=`$ECHO "$complete" | $GREP " "`
25377      if test "x$has_space" != x; then
25378        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25379$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25380      fi
25381      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25382    fi
25383  fi
25384
25385  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25386  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25387  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25388  # "foo.exe" is OK but "foo" is an error.
25389  #
25390  # This test is therefore slightly more accurate than "test -f" to check for file presence.
25391  # It is also a way to make sure we got the proper file name for the real test later on.
25392  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25393  if test "x$test_shortpath" = x; then
25394    # Short path failed, file does not exist as specified.
25395    # Try adding .exe or .cmd
25396    if test -f "${new_path}.exe"; then
25397       input_to_shortpath="${new_path}.exe"
25398    elif test -f "${new_path}.cmd"; then
25399       input_to_shortpath="${new_path}.cmd"
25400    else
25401      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
25402$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
25403      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25404$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25405      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25406    fi
25407  else
25408    input_to_shortpath="$new_path"
25409  fi
25410
25411  # Call helper function which possibly converts this using DOS-style short mode.
25412  # If so, the updated path is stored in $new_path.
25413  new_path="$input_to_shortpath"
25414
25415  input_path="$input_to_shortpath"
25416  # Check if we need to convert this using DOS-style short mode. If the path
25417  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25418  # take no chances and rewrite it.
25419  # Note: m4 eats our [], so we need to use [ and ] instead.
25420  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25421  if test "x$has_forbidden_chars" != x; then
25422    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25423    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25424    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25425    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25426      # Going to short mode and back again did indeed matter. Since short mode is
25427      # case insensitive, let's make it lowercase to improve readability.
25428      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25429      # Now convert it back to Unix-stile (cygpath)
25430      input_path=`$CYGPATH -u "$shortmode_path"`
25431      new_path="$input_path"
25432    fi
25433  fi
25434
25435  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25436  if test "x$test_cygdrive_prefix" = x; then
25437    # As a simple fix, exclude /usr/bin since it's not a real path.
25438    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25439      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25440      # a path prefixed by /cygdrive for fixpath to work.
25441      new_path="$CYGWIN_ROOT_PATH$input_path"
25442    fi
25443  fi
25444
25445  # remove trailing .exe if any
25446  new_path="${new_path/%.exe/}"
25447
25448  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25449
25450  # First separate the path from the arguments. This will split at the first
25451  # space.
25452  complete="$NM"
25453  path="${complete%% *}"
25454  tmp="$complete EOL"
25455  arguments="${tmp#* }"
25456
25457  # Input might be given as Windows format, start by converting to
25458  # unix format.
25459  new_path="$path"
25460
25461  windows_path="$new_path"
25462  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25463    unix_path=`$CYGPATH -u "$windows_path"`
25464    new_path="$unix_path"
25465  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25466    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25467    new_path="$unix_path"
25468  fi
25469
25470
25471  # Now try to locate executable using which
25472  new_path=`$WHICH "$new_path" 2> /dev/null`
25473
25474  if test "x$new_path" = x; then
25475    # Oops. Which didn't find the executable.
25476    # The splitting of arguments from the executable at a space might have been incorrect,
25477    # since paths with space are more likely in Windows. Give it another try with the whole
25478    # argument.
25479    path="$complete"
25480    arguments="EOL"
25481    new_path="$path"
25482
25483  windows_path="$new_path"
25484  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25485    unix_path=`$CYGPATH -u "$windows_path"`
25486    new_path="$unix_path"
25487  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25488    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25489    new_path="$unix_path"
25490  fi
25491
25492
25493    new_path=`$WHICH "$new_path" 2> /dev/null`
25494
25495    if test "x$new_path" = x; then
25496      # It's still not found. Now this is an unrecoverable error.
25497      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25498$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25499      has_space=`$ECHO "$complete" | $GREP " "`
25500      if test "x$has_space" != x; then
25501        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25502$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25503      fi
25504      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25505    fi
25506  fi
25507
25508  # Now new_path has a complete unix path to the binary
25509  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25510    # Keep paths in /bin as-is, but remove trailing .exe if any
25511    new_path="${new_path/%.exe/}"
25512    # Do not save /bin paths to all_fixpath_prefixes!
25513  else
25514    # Not in mixed or Windows style, start by that.
25515    new_path=`cmd //c echo $new_path`
25516
25517  input_path="$new_path"
25518  # Check if we need to convert this using DOS-style short mode. If the path
25519  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25520  # take no chances and rewrite it.
25521  # Note: m4 eats our [], so we need to use [ and ] instead.
25522  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25523  if test "x$has_forbidden_chars" != x; then
25524    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25525    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25526  fi
25527
25528    # Output is in $new_path
25529
25530  windows_path="$new_path"
25531  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25532    unix_path=`$CYGPATH -u "$windows_path"`
25533    new_path="$unix_path"
25534  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25535    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25536    new_path="$unix_path"
25537  fi
25538
25539    # remove trailing .exe if any
25540    new_path="${new_path/%.exe/}"
25541
25542    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25543    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25544  fi
25545
25546  else
25547    # We're on a posix platform. Hooray! :)
25548    # First separate the path from the arguments. This will split at the first
25549    # space.
25550    complete="$NM"
25551    path="${complete%% *}"
25552    tmp="$complete EOL"
25553    arguments="${tmp#* }"
25554
25555    # Cannot rely on the command "which" here since it doesn't always work.
25556    is_absolute_path=`$ECHO "$path" | $GREP ^/`
25557    if test -z "$is_absolute_path"; then
25558      # Path to executable is not absolute. Find it.
25559      IFS_save="$IFS"
25560      IFS=:
25561      for p in $PATH; do
25562        if test -f "$p/$path" && test -x "$p/$path"; then
25563          new_path="$p/$path"
25564          break
25565        fi
25566      done
25567      IFS="$IFS_save"
25568    else
25569      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) failed, using $path directly." >&5
25570$as_echo "$as_me: Resolving NM (as $path) failed, using $path directly." >&6;}
25571      new_path="$path"
25572    fi
25573
25574    if test "x$new_path" = x; then
25575        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25576$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25577        has_space=`$ECHO "$complete" | $GREP " "`
25578        if test "x$has_space" != x; then
25579          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25580$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25581        fi
25582        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25583      fi
25584  fi
25585
25586      # Now join together the path and the arguments once again
25587      if test "x$arguments" != xEOL; then
25588        new_complete="$new_path ${arguments% *}"
25589      else
25590        new_complete="$new_path"
25591      fi
25592
25593  if test "x$complete" != "x$new_complete"; then
25594      NM="$new_complete"
25595      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
25596$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
25597    fi
25598
25599    # Extract the first word of "gnm", so it can be a program name with args.
25600set dummy gnm; ac_word=$2
25601{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25602$as_echo_n "checking for $ac_word... " >&6; }
25603if ${ac_cv_path_GNM+:} false; then :
25604  $as_echo_n "(cached) " >&6
25605else
25606  case $GNM in
25607  [\\/]* | ?:[\\/]*)
25608  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
25609  ;;
25610  *)
25611  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25612for as_dir in $PATH
25613do
25614  IFS=$as_save_IFS
25615  test -z "$as_dir" && as_dir=.
25616    for ac_exec_ext in '' $ac_executable_extensions; do
25617  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25618    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
25619    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25620    break 2
25621  fi
25622done
25623  done
25624IFS=$as_save_IFS
25625
25626  ;;
25627esac
25628fi
25629GNM=$ac_cv_path_GNM
25630if test -n "$GNM"; then
25631  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
25632$as_echo "$GNM" >&6; }
25633else
25634  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25635$as_echo "no" >&6; }
25636fi
25637
25638
25639
25640  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25641
25642  # First separate the path from the arguments. This will split at the first
25643  # space.
25644  complete="$GNM"
25645  path="${complete%% *}"
25646  tmp="$complete EOL"
25647  arguments="${tmp#* }"
25648
25649  # Input might be given as Windows format, start by converting to
25650  # unix format.
25651  new_path=`$CYGPATH -u "$path"`
25652
25653  # Now try to locate executable using which
25654  new_path=`$WHICH "$new_path" 2> /dev/null`
25655  # bat and cmd files are not always considered executable in cygwin causing which
25656  # to not find them
25657  if test "x$new_path" = x \
25658           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25659           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25660    new_path=`$CYGPATH -u "$path"`
25661  fi
25662  if test "x$new_path" = x; then
25663    # Oops. Which didn't find the executable.
25664    # The splitting of arguments from the executable at a space might have been incorrect,
25665    # since paths with space are more likely in Windows. Give it another try with the whole
25666    # argument.
25667    path="$complete"
25668    arguments="EOL"
25669    new_path=`$CYGPATH -u "$path"`
25670    new_path=`$WHICH "$new_path" 2> /dev/null`
25671    # bat and cmd files are not always considered executable in cygwin causing which
25672    # to not find them
25673    if test "x$new_path" = x \
25674             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25675             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25676      new_path=`$CYGPATH -u "$path"`
25677    fi
25678    if test "x$new_path" = x; then
25679      # It's still not found. Now this is an unrecoverable error.
25680      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
25681$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
25682      has_space=`$ECHO "$complete" | $GREP " "`
25683      if test "x$has_space" != x; then
25684        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25685$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25686      fi
25687      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
25688    fi
25689  fi
25690
25691  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25692  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25693  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25694  # "foo.exe" is OK but "foo" is an error.
25695  #
25696  # This test is therefore slightly more accurate than "test -f" to check for file presence.
25697  # It is also a way to make sure we got the proper file name for the real test later on.
25698  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25699  if test "x$test_shortpath" = x; then
25700    # Short path failed, file does not exist as specified.
25701    # Try adding .exe or .cmd
25702    if test -f "${new_path}.exe"; then
25703       input_to_shortpath="${new_path}.exe"
25704    elif test -f "${new_path}.cmd"; then
25705       input_to_shortpath="${new_path}.cmd"
25706    else
25707      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
25708$as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
25709      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25710$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25711      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
25712    fi
25713  else
25714    input_to_shortpath="$new_path"
25715  fi
25716
25717  # Call helper function which possibly converts this using DOS-style short mode.
25718  # If so, the updated path is stored in $new_path.
25719  new_path="$input_to_shortpath"
25720
25721  input_path="$input_to_shortpath"
25722  # Check if we need to convert this using DOS-style short mode. If the path
25723  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25724  # take no chances and rewrite it.
25725  # Note: m4 eats our [], so we need to use [ and ] instead.
25726  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25727  if test "x$has_forbidden_chars" != x; then
25728    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25729    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25730    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25731    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25732      # Going to short mode and back again did indeed matter. Since short mode is
25733      # case insensitive, let's make it lowercase to improve readability.
25734      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25735      # Now convert it back to Unix-stile (cygpath)
25736      input_path=`$CYGPATH -u "$shortmode_path"`
25737      new_path="$input_path"
25738    fi
25739  fi
25740
25741  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25742  if test "x$test_cygdrive_prefix" = x; then
25743    # As a simple fix, exclude /usr/bin since it's not a real path.
25744    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25745      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25746      # a path prefixed by /cygdrive for fixpath to work.
25747      new_path="$CYGWIN_ROOT_PATH$input_path"
25748    fi
25749  fi
25750
25751  # remove trailing .exe if any
25752  new_path="${new_path/%.exe/}"
25753
25754  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25755
25756  # First separate the path from the arguments. This will split at the first
25757  # space.
25758  complete="$GNM"
25759  path="${complete%% *}"
25760  tmp="$complete EOL"
25761  arguments="${tmp#* }"
25762
25763  # Input might be given as Windows format, start by converting to
25764  # unix format.
25765  new_path="$path"
25766
25767  windows_path="$new_path"
25768  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25769    unix_path=`$CYGPATH -u "$windows_path"`
25770    new_path="$unix_path"
25771  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25772    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25773    new_path="$unix_path"
25774  fi
25775
25776
25777  # Now try to locate executable using which
25778  new_path=`$WHICH "$new_path" 2> /dev/null`
25779
25780  if test "x$new_path" = x; then
25781    # Oops. Which didn't find the executable.
25782    # The splitting of arguments from the executable at a space might have been incorrect,
25783    # since paths with space are more likely in Windows. Give it another try with the whole
25784    # argument.
25785    path="$complete"
25786    arguments="EOL"
25787    new_path="$path"
25788
25789  windows_path="$new_path"
25790  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25791    unix_path=`$CYGPATH -u "$windows_path"`
25792    new_path="$unix_path"
25793  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25794    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25795    new_path="$unix_path"
25796  fi
25797
25798
25799    new_path=`$WHICH "$new_path" 2> /dev/null`
25800
25801    if test "x$new_path" = x; then
25802      # It's still not found. Now this is an unrecoverable error.
25803      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
25804$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
25805      has_space=`$ECHO "$complete" | $GREP " "`
25806      if test "x$has_space" != x; then
25807        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25808$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25809      fi
25810      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
25811    fi
25812  fi
25813
25814  # Now new_path has a complete unix path to the binary
25815  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25816    # Keep paths in /bin as-is, but remove trailing .exe if any
25817    new_path="${new_path/%.exe/}"
25818    # Do not save /bin paths to all_fixpath_prefixes!
25819  else
25820    # Not in mixed or Windows style, start by that.
25821    new_path=`cmd //c echo $new_path`
25822
25823  input_path="$new_path"
25824  # Check if we need to convert this using DOS-style short mode. If the path
25825  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25826  # take no chances and rewrite it.
25827  # Note: m4 eats our [], so we need to use [ and ] instead.
25828  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25829  if test "x$has_forbidden_chars" != x; then
25830    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25831    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25832  fi
25833
25834    # Output is in $new_path
25835
25836  windows_path="$new_path"
25837  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25838    unix_path=`$CYGPATH -u "$windows_path"`
25839    new_path="$unix_path"
25840  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25841    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25842    new_path="$unix_path"
25843  fi
25844
25845    # remove trailing .exe if any
25846    new_path="${new_path/%.exe/}"
25847
25848    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25849    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25850  fi
25851
25852  else
25853    # We're on a posix platform. Hooray! :)
25854    # First separate the path from the arguments. This will split at the first
25855    # space.
25856    complete="$GNM"
25857    path="${complete%% *}"
25858    tmp="$complete EOL"
25859    arguments="${tmp#* }"
25860
25861    # Cannot rely on the command "which" here since it doesn't always work.
25862    is_absolute_path=`$ECHO "$path" | $GREP ^/`
25863    if test -z "$is_absolute_path"; then
25864      # Path to executable is not absolute. Find it.
25865      IFS_save="$IFS"
25866      IFS=:
25867      for p in $PATH; do
25868        if test -f "$p/$path" && test -x "$p/$path"; then
25869          new_path="$p/$path"
25870          break
25871        fi
25872      done
25873      IFS="$IFS_save"
25874    else
25875      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving GNM (as $path) failed, using $path directly." >&5
25876$as_echo "$as_me: Resolving GNM (as $path) failed, using $path directly." >&6;}
25877      new_path="$path"
25878    fi
25879
25880    if test "x$new_path" = x; then
25881        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
25882$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
25883        has_space=`$ECHO "$complete" | $GREP " "`
25884        if test "x$has_space" != x; then
25885          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25886$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25887        fi
25888        as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
25889      fi
25890  fi
25891
25892      # Now join together the path and the arguments once again
25893      if test "x$arguments" != xEOL; then
25894        new_complete="$new_path ${arguments% *}"
25895      else
25896        new_complete="$new_path"
25897      fi
25898
25899  if test "x$complete" != "x$new_complete"; then
25900      GNM="$new_complete"
25901      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
25902$as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
25903    fi
25904
25905    # Extract the first word of "strip", so it can be a program name with args.
25906set dummy strip; ac_word=$2
25907{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25908$as_echo_n "checking for $ac_word... " >&6; }
25909if ${ac_cv_path_STRIP+:} false; then :
25910  $as_echo_n "(cached) " >&6
25911else
25912  case $STRIP in
25913  [\\/]* | ?:[\\/]*)
25914  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
25915  ;;
25916  *)
25917  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25918for as_dir in $PATH
25919do
25920  IFS=$as_save_IFS
25921  test -z "$as_dir" && as_dir=.
25922    for ac_exec_ext in '' $ac_executable_extensions; do
25923  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25924    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
25925    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25926    break 2
25927  fi
25928done
25929  done
25930IFS=$as_save_IFS
25931
25932  ;;
25933esac
25934fi
25935STRIP=$ac_cv_path_STRIP
25936if test -n "$STRIP"; then
25937  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
25938$as_echo "$STRIP" >&6; }
25939else
25940  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25941$as_echo "no" >&6; }
25942fi
25943
25944
25945
25946  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25947
25948  # First separate the path from the arguments. This will split at the first
25949  # space.
25950  complete="$STRIP"
25951  path="${complete%% *}"
25952  tmp="$complete EOL"
25953  arguments="${tmp#* }"
25954
25955  # Input might be given as Windows format, start by converting to
25956  # unix format.
25957  new_path=`$CYGPATH -u "$path"`
25958
25959  # Now try to locate executable using which
25960  new_path=`$WHICH "$new_path" 2> /dev/null`
25961  # bat and cmd files are not always considered executable in cygwin causing which
25962  # to not find them
25963  if test "x$new_path" = x \
25964           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25965           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25966    new_path=`$CYGPATH -u "$path"`
25967  fi
25968  if test "x$new_path" = x; then
25969    # Oops. Which didn't find the executable.
25970    # The splitting of arguments from the executable at a space might have been incorrect,
25971    # since paths with space are more likely in Windows. Give it another try with the whole
25972    # argument.
25973    path="$complete"
25974    arguments="EOL"
25975    new_path=`$CYGPATH -u "$path"`
25976    new_path=`$WHICH "$new_path" 2> /dev/null`
25977    # bat and cmd files are not always considered executable in cygwin causing which
25978    # to not find them
25979    if test "x$new_path" = x \
25980             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25981             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25982      new_path=`$CYGPATH -u "$path"`
25983    fi
25984    if test "x$new_path" = x; then
25985      # It's still not found. Now this is an unrecoverable error.
25986      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
25987$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
25988      has_space=`$ECHO "$complete" | $GREP " "`
25989      if test "x$has_space" != x; then
25990        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25991$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25992      fi
25993      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
25994    fi
25995  fi
25996
25997  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25998  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25999  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26000  # "foo.exe" is OK but "foo" is an error.
26001  #
26002  # This test is therefore slightly more accurate than "test -f" to check for file presence.
26003  # It is also a way to make sure we got the proper file name for the real test later on.
26004  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26005  if test "x$test_shortpath" = x; then
26006    # Short path failed, file does not exist as specified.
26007    # Try adding .exe or .cmd
26008    if test -f "${new_path}.exe"; then
26009       input_to_shortpath="${new_path}.exe"
26010    elif test -f "${new_path}.cmd"; then
26011       input_to_shortpath="${new_path}.cmd"
26012    else
26013      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
26014$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
26015      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26016$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26017      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26018    fi
26019  else
26020    input_to_shortpath="$new_path"
26021  fi
26022
26023  # Call helper function which possibly converts this using DOS-style short mode.
26024  # If so, the updated path is stored in $new_path.
26025  new_path="$input_to_shortpath"
26026
26027  input_path="$input_to_shortpath"
26028  # Check if we need to convert this using DOS-style short mode. If the path
26029  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26030  # take no chances and rewrite it.
26031  # Note: m4 eats our [], so we need to use [ and ] instead.
26032  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26033  if test "x$has_forbidden_chars" != x; then
26034    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26035    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26036    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26037    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26038      # Going to short mode and back again did indeed matter. Since short mode is
26039      # case insensitive, let's make it lowercase to improve readability.
26040      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26041      # Now convert it back to Unix-stile (cygpath)
26042      input_path=`$CYGPATH -u "$shortmode_path"`
26043      new_path="$input_path"
26044    fi
26045  fi
26046
26047  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26048  if test "x$test_cygdrive_prefix" = x; then
26049    # As a simple fix, exclude /usr/bin since it's not a real path.
26050    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26051      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26052      # a path prefixed by /cygdrive for fixpath to work.
26053      new_path="$CYGWIN_ROOT_PATH$input_path"
26054    fi
26055  fi
26056
26057  # remove trailing .exe if any
26058  new_path="${new_path/%.exe/}"
26059
26060  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26061
26062  # First separate the path from the arguments. This will split at the first
26063  # space.
26064  complete="$STRIP"
26065  path="${complete%% *}"
26066  tmp="$complete EOL"
26067  arguments="${tmp#* }"
26068
26069  # Input might be given as Windows format, start by converting to
26070  # unix format.
26071  new_path="$path"
26072
26073  windows_path="$new_path"
26074  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26075    unix_path=`$CYGPATH -u "$windows_path"`
26076    new_path="$unix_path"
26077  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26078    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26079    new_path="$unix_path"
26080  fi
26081
26082
26083  # Now try to locate executable using which
26084  new_path=`$WHICH "$new_path" 2> /dev/null`
26085
26086  if test "x$new_path" = x; then
26087    # Oops. Which didn't find the executable.
26088    # The splitting of arguments from the executable at a space might have been incorrect,
26089    # since paths with space are more likely in Windows. Give it another try with the whole
26090    # argument.
26091    path="$complete"
26092    arguments="EOL"
26093    new_path="$path"
26094
26095  windows_path="$new_path"
26096  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26097    unix_path=`$CYGPATH -u "$windows_path"`
26098    new_path="$unix_path"
26099  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26100    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26101    new_path="$unix_path"
26102  fi
26103
26104
26105    new_path=`$WHICH "$new_path" 2> /dev/null`
26106
26107    if test "x$new_path" = x; then
26108      # It's still not found. Now this is an unrecoverable error.
26109      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26110$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26111      has_space=`$ECHO "$complete" | $GREP " "`
26112      if test "x$has_space" != x; then
26113        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26114$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26115      fi
26116      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26117    fi
26118  fi
26119
26120  # Now new_path has a complete unix path to the binary
26121  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26122    # Keep paths in /bin as-is, but remove trailing .exe if any
26123    new_path="${new_path/%.exe/}"
26124    # Do not save /bin paths to all_fixpath_prefixes!
26125  else
26126    # Not in mixed or Windows style, start by that.
26127    new_path=`cmd //c echo $new_path`
26128
26129  input_path="$new_path"
26130  # Check if we need to convert this using DOS-style short mode. If the path
26131  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26132  # take no chances and rewrite it.
26133  # Note: m4 eats our [], so we need to use [ and ] instead.
26134  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26135  if test "x$has_forbidden_chars" != x; then
26136    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26137    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26138  fi
26139
26140    # Output is in $new_path
26141
26142  windows_path="$new_path"
26143  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26144    unix_path=`$CYGPATH -u "$windows_path"`
26145    new_path="$unix_path"
26146  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26147    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26148    new_path="$unix_path"
26149  fi
26150
26151    # remove trailing .exe if any
26152    new_path="${new_path/%.exe/}"
26153
26154    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26155    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26156  fi
26157
26158  else
26159    # We're on a posix platform. Hooray! :)
26160    # First separate the path from the arguments. This will split at the first
26161    # space.
26162    complete="$STRIP"
26163    path="${complete%% *}"
26164    tmp="$complete EOL"
26165    arguments="${tmp#* }"
26166
26167    # Cannot rely on the command "which" here since it doesn't always work.
26168    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26169    if test -z "$is_absolute_path"; then
26170      # Path to executable is not absolute. Find it.
26171      IFS_save="$IFS"
26172      IFS=:
26173      for p in $PATH; do
26174        if test -f "$p/$path" && test -x "$p/$path"; then
26175          new_path="$p/$path"
26176          break
26177        fi
26178      done
26179      IFS="$IFS_save"
26180    else
26181      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) failed, using $path directly." >&5
26182$as_echo "$as_me: Resolving STRIP (as $path) failed, using $path directly." >&6;}
26183      new_path="$path"
26184    fi
26185
26186    if test "x$new_path" = x; then
26187        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26188$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26189        has_space=`$ECHO "$complete" | $GREP " "`
26190        if test "x$has_space" != x; then
26191          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26192$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26193        fi
26194        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26195      fi
26196  fi
26197
26198      # Now join together the path and the arguments once again
26199      if test "x$arguments" != xEOL; then
26200        new_complete="$new_path ${arguments% *}"
26201      else
26202        new_complete="$new_path"
26203      fi
26204
26205  if test "x$complete" != "x$new_complete"; then
26206      STRIP="$new_complete"
26207      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
26208$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
26209    fi
26210
26211    # Extract the first word of "mcs", so it can be a program name with args.
26212set dummy mcs; ac_word=$2
26213{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26214$as_echo_n "checking for $ac_word... " >&6; }
26215if ${ac_cv_path_MCS+:} false; then :
26216  $as_echo_n "(cached) " >&6
26217else
26218  case $MCS in
26219  [\\/]* | ?:[\\/]*)
26220  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
26221  ;;
26222  *)
26223  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26224for as_dir in $PATH
26225do
26226  IFS=$as_save_IFS
26227  test -z "$as_dir" && as_dir=.
26228    for ac_exec_ext in '' $ac_executable_extensions; do
26229  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26230    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
26231    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26232    break 2
26233  fi
26234done
26235  done
26236IFS=$as_save_IFS
26237
26238  ;;
26239esac
26240fi
26241MCS=$ac_cv_path_MCS
26242if test -n "$MCS"; then
26243  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
26244$as_echo "$MCS" >&6; }
26245else
26246  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26247$as_echo "no" >&6; }
26248fi
26249
26250
26251
26252  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26253
26254  # First separate the path from the arguments. This will split at the first
26255  # space.
26256  complete="$MCS"
26257  path="${complete%% *}"
26258  tmp="$complete EOL"
26259  arguments="${tmp#* }"
26260
26261  # Input might be given as Windows format, start by converting to
26262  # unix format.
26263  new_path=`$CYGPATH -u "$path"`
26264
26265  # Now try to locate executable using which
26266  new_path=`$WHICH "$new_path" 2> /dev/null`
26267  # bat and cmd files are not always considered executable in cygwin causing which
26268  # to not find them
26269  if test "x$new_path" = x \
26270           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26271           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26272    new_path=`$CYGPATH -u "$path"`
26273  fi
26274  if test "x$new_path" = x; then
26275    # Oops. Which didn't find the executable.
26276    # The splitting of arguments from the executable at a space might have been incorrect,
26277    # since paths with space are more likely in Windows. Give it another try with the whole
26278    # argument.
26279    path="$complete"
26280    arguments="EOL"
26281    new_path=`$CYGPATH -u "$path"`
26282    new_path=`$WHICH "$new_path" 2> /dev/null`
26283    # bat and cmd files are not always considered executable in cygwin causing which
26284    # to not find them
26285    if test "x$new_path" = x \
26286             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26287             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26288      new_path=`$CYGPATH -u "$path"`
26289    fi
26290    if test "x$new_path" = x; then
26291      # It's still not found. Now this is an unrecoverable error.
26292      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
26293$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
26294      has_space=`$ECHO "$complete" | $GREP " "`
26295      if test "x$has_space" != x; then
26296        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26297$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26298      fi
26299      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
26300    fi
26301  fi
26302
26303  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26304  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26305  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26306  # "foo.exe" is OK but "foo" is an error.
26307  #
26308  # This test is therefore slightly more accurate than "test -f" to check for file presence.
26309  # It is also a way to make sure we got the proper file name for the real test later on.
26310  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26311  if test "x$test_shortpath" = x; then
26312    # Short path failed, file does not exist as specified.
26313    # Try adding .exe or .cmd
26314    if test -f "${new_path}.exe"; then
26315       input_to_shortpath="${new_path}.exe"
26316    elif test -f "${new_path}.cmd"; then
26317       input_to_shortpath="${new_path}.cmd"
26318    else
26319      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$new_path\", is invalid." >&5
26320$as_echo "$as_me: The path of MCS, which resolves as \"$new_path\", is invalid." >&6;}
26321      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26322$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26323      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
26324    fi
26325  else
26326    input_to_shortpath="$new_path"
26327  fi
26328
26329  # Call helper function which possibly converts this using DOS-style short mode.
26330  # If so, the updated path is stored in $new_path.
26331  new_path="$input_to_shortpath"
26332
26333  input_path="$input_to_shortpath"
26334  # Check if we need to convert this using DOS-style short mode. If the path
26335  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26336  # take no chances and rewrite it.
26337  # Note: m4 eats our [], so we need to use [ and ] instead.
26338  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26339  if test "x$has_forbidden_chars" != x; then
26340    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26341    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26342    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26343    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26344      # Going to short mode and back again did indeed matter. Since short mode is
26345      # case insensitive, let's make it lowercase to improve readability.
26346      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26347      # Now convert it back to Unix-stile (cygpath)
26348      input_path=`$CYGPATH -u "$shortmode_path"`
26349      new_path="$input_path"
26350    fi
26351  fi
26352
26353  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26354  if test "x$test_cygdrive_prefix" = x; then
26355    # As a simple fix, exclude /usr/bin since it's not a real path.
26356    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26357      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26358      # a path prefixed by /cygdrive for fixpath to work.
26359      new_path="$CYGWIN_ROOT_PATH$input_path"
26360    fi
26361  fi
26362
26363  # remove trailing .exe if any
26364  new_path="${new_path/%.exe/}"
26365
26366  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26367
26368  # First separate the path from the arguments. This will split at the first
26369  # space.
26370  complete="$MCS"
26371  path="${complete%% *}"
26372  tmp="$complete EOL"
26373  arguments="${tmp#* }"
26374
26375  # Input might be given as Windows format, start by converting to
26376  # unix format.
26377  new_path="$path"
26378
26379  windows_path="$new_path"
26380  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26381    unix_path=`$CYGPATH -u "$windows_path"`
26382    new_path="$unix_path"
26383  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26384    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26385    new_path="$unix_path"
26386  fi
26387
26388
26389  # Now try to locate executable using which
26390  new_path=`$WHICH "$new_path" 2> /dev/null`
26391
26392  if test "x$new_path" = x; then
26393    # Oops. Which didn't find the executable.
26394    # The splitting of arguments from the executable at a space might have been incorrect,
26395    # since paths with space are more likely in Windows. Give it another try with the whole
26396    # argument.
26397    path="$complete"
26398    arguments="EOL"
26399    new_path="$path"
26400
26401  windows_path="$new_path"
26402  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26403    unix_path=`$CYGPATH -u "$windows_path"`
26404    new_path="$unix_path"
26405  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26406    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26407    new_path="$unix_path"
26408  fi
26409
26410
26411    new_path=`$WHICH "$new_path" 2> /dev/null`
26412
26413    if test "x$new_path" = x; then
26414      # It's still not found. Now this is an unrecoverable error.
26415      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
26416$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
26417      has_space=`$ECHO "$complete" | $GREP " "`
26418      if test "x$has_space" != x; then
26419        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26420$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26421      fi
26422      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
26423    fi
26424  fi
26425
26426  # Now new_path has a complete unix path to the binary
26427  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26428    # Keep paths in /bin as-is, but remove trailing .exe if any
26429    new_path="${new_path/%.exe/}"
26430    # Do not save /bin paths to all_fixpath_prefixes!
26431  else
26432    # Not in mixed or Windows style, start by that.
26433    new_path=`cmd //c echo $new_path`
26434
26435  input_path="$new_path"
26436  # Check if we need to convert this using DOS-style short mode. If the path
26437  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26438  # take no chances and rewrite it.
26439  # Note: m4 eats our [], so we need to use [ and ] instead.
26440  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26441  if test "x$has_forbidden_chars" != x; then
26442    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26443    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26444  fi
26445
26446    # Output is in $new_path
26447
26448  windows_path="$new_path"
26449  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26450    unix_path=`$CYGPATH -u "$windows_path"`
26451    new_path="$unix_path"
26452  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26453    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26454    new_path="$unix_path"
26455  fi
26456
26457    # remove trailing .exe if any
26458    new_path="${new_path/%.exe/}"
26459
26460    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26461    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26462  fi
26463
26464  else
26465    # We're on a posix platform. Hooray! :)
26466    # First separate the path from the arguments. This will split at the first
26467    # space.
26468    complete="$MCS"
26469    path="${complete%% *}"
26470    tmp="$complete EOL"
26471    arguments="${tmp#* }"
26472
26473    # Cannot rely on the command "which" here since it doesn't always work.
26474    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26475    if test -z "$is_absolute_path"; then
26476      # Path to executable is not absolute. Find it.
26477      IFS_save="$IFS"
26478      IFS=:
26479      for p in $PATH; do
26480        if test -f "$p/$path" && test -x "$p/$path"; then
26481          new_path="$p/$path"
26482          break
26483        fi
26484      done
26485      IFS="$IFS_save"
26486    else
26487      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MCS (as $path) failed, using $path directly." >&5
26488$as_echo "$as_me: Resolving MCS (as $path) failed, using $path directly." >&6;}
26489      new_path="$path"
26490    fi
26491
26492    if test "x$new_path" = x; then
26493        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
26494$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
26495        has_space=`$ECHO "$complete" | $GREP " "`
26496        if test "x$has_space" != x; then
26497          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26498$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26499        fi
26500        as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
26501      fi
26502  fi
26503
26504      # Now join together the path and the arguments once again
26505      if test "x$arguments" != xEOL; then
26506        new_complete="$new_path ${arguments% *}"
26507      else
26508        new_complete="$new_path"
26509      fi
26510
26511  if test "x$complete" != "x$new_complete"; then
26512      MCS="$new_complete"
26513      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MCS to \"$new_complete\"" >&5
26514$as_echo "$as_me: Rewriting MCS to \"$new_complete\"" >&6;}
26515    fi
26516
26517elif test "x$OPENJDK_TARGET_OS" != xwindows; then
26518    if test -n "$ac_tool_prefix"; then
26519  # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
26520set dummy ${ac_tool_prefix}nm; ac_word=$2
26521{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26522$as_echo_n "checking for $ac_word... " >&6; }
26523if ${ac_cv_prog_NM+:} false; then :
26524  $as_echo_n "(cached) " >&6
26525else
26526  if test -n "$NM"; then
26527  ac_cv_prog_NM="$NM" # Let the user override the test.
26528else
26529as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26530for as_dir in $PATH
26531do
26532  IFS=$as_save_IFS
26533  test -z "$as_dir" && as_dir=.
26534    for ac_exec_ext in '' $ac_executable_extensions; do
26535  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26536    ac_cv_prog_NM="${ac_tool_prefix}nm"
26537    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26538    break 2
26539  fi
26540done
26541  done
26542IFS=$as_save_IFS
26543
26544fi
26545fi
26546NM=$ac_cv_prog_NM
26547if test -n "$NM"; then
26548  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
26549$as_echo "$NM" >&6; }
26550else
26551  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26552$as_echo "no" >&6; }
26553fi
26554
26555
26556fi
26557if test -z "$ac_cv_prog_NM"; then
26558  ac_ct_NM=$NM
26559  # Extract the first word of "nm", so it can be a program name with args.
26560set dummy nm; ac_word=$2
26561{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26562$as_echo_n "checking for $ac_word... " >&6; }
26563if ${ac_cv_prog_ac_ct_NM+:} false; then :
26564  $as_echo_n "(cached) " >&6
26565else
26566  if test -n "$ac_ct_NM"; then
26567  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
26568else
26569as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26570for as_dir in $PATH
26571do
26572  IFS=$as_save_IFS
26573  test -z "$as_dir" && as_dir=.
26574    for ac_exec_ext in '' $ac_executable_extensions; do
26575  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26576    ac_cv_prog_ac_ct_NM="nm"
26577    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26578    break 2
26579  fi
26580done
26581  done
26582IFS=$as_save_IFS
26583
26584fi
26585fi
26586ac_ct_NM=$ac_cv_prog_ac_ct_NM
26587if test -n "$ac_ct_NM"; then
26588  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
26589$as_echo "$ac_ct_NM" >&6; }
26590else
26591  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26592$as_echo "no" >&6; }
26593fi
26594
26595  if test "x$ac_ct_NM" = x; then
26596    NM=""
26597  else
26598    case $cross_compiling:$ac_tool_warned in
26599yes:)
26600{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
26601$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
26602ac_tool_warned=yes ;;
26603esac
26604    NM=$ac_ct_NM
26605  fi
26606else
26607  NM="$ac_cv_prog_NM"
26608fi
26609
26610
26611  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26612
26613  # First separate the path from the arguments. This will split at the first
26614  # space.
26615  complete="$NM"
26616  path="${complete%% *}"
26617  tmp="$complete EOL"
26618  arguments="${tmp#* }"
26619
26620  # Input might be given as Windows format, start by converting to
26621  # unix format.
26622  new_path=`$CYGPATH -u "$path"`
26623
26624  # Now try to locate executable using which
26625  new_path=`$WHICH "$new_path" 2> /dev/null`
26626  # bat and cmd files are not always considered executable in cygwin causing which
26627  # to not find them
26628  if test "x$new_path" = x \
26629           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26630           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26631    new_path=`$CYGPATH -u "$path"`
26632  fi
26633  if test "x$new_path" = x; then
26634    # Oops. Which didn't find the executable.
26635    # The splitting of arguments from the executable at a space might have been incorrect,
26636    # since paths with space are more likely in Windows. Give it another try with the whole
26637    # argument.
26638    path="$complete"
26639    arguments="EOL"
26640    new_path=`$CYGPATH -u "$path"`
26641    new_path=`$WHICH "$new_path" 2> /dev/null`
26642    # bat and cmd files are not always considered executable in cygwin causing which
26643    # to not find them
26644    if test "x$new_path" = x \
26645             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26646             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26647      new_path=`$CYGPATH -u "$path"`
26648    fi
26649    if test "x$new_path" = x; then
26650      # It's still not found. Now this is an unrecoverable error.
26651      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
26652$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
26653      has_space=`$ECHO "$complete" | $GREP " "`
26654      if test "x$has_space" != x; then
26655        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26656$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26657      fi
26658      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
26659    fi
26660  fi
26661
26662  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26663  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26664  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26665  # "foo.exe" is OK but "foo" is an error.
26666  #
26667  # This test is therefore slightly more accurate than "test -f" to check for file presence.
26668  # It is also a way to make sure we got the proper file name for the real test later on.
26669  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26670  if test "x$test_shortpath" = x; then
26671    # Short path failed, file does not exist as specified.
26672    # Try adding .exe or .cmd
26673    if test -f "${new_path}.exe"; then
26674       input_to_shortpath="${new_path}.exe"
26675    elif test -f "${new_path}.cmd"; then
26676       input_to_shortpath="${new_path}.cmd"
26677    else
26678      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
26679$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
26680      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26681$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26682      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
26683    fi
26684  else
26685    input_to_shortpath="$new_path"
26686  fi
26687
26688  # Call helper function which possibly converts this using DOS-style short mode.
26689  # If so, the updated path is stored in $new_path.
26690  new_path="$input_to_shortpath"
26691
26692  input_path="$input_to_shortpath"
26693  # Check if we need to convert this using DOS-style short mode. If the path
26694  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26695  # take no chances and rewrite it.
26696  # Note: m4 eats our [], so we need to use [ and ] instead.
26697  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26698  if test "x$has_forbidden_chars" != x; then
26699    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26700    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26701    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26702    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26703      # Going to short mode and back again did indeed matter. Since short mode is
26704      # case insensitive, let's make it lowercase to improve readability.
26705      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26706      # Now convert it back to Unix-stile (cygpath)
26707      input_path=`$CYGPATH -u "$shortmode_path"`
26708      new_path="$input_path"
26709    fi
26710  fi
26711
26712  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26713  if test "x$test_cygdrive_prefix" = x; then
26714    # As a simple fix, exclude /usr/bin since it's not a real path.
26715    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26716      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26717      # a path prefixed by /cygdrive for fixpath to work.
26718      new_path="$CYGWIN_ROOT_PATH$input_path"
26719    fi
26720  fi
26721
26722  # remove trailing .exe if any
26723  new_path="${new_path/%.exe/}"
26724
26725  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26726
26727  # First separate the path from the arguments. This will split at the first
26728  # space.
26729  complete="$NM"
26730  path="${complete%% *}"
26731  tmp="$complete EOL"
26732  arguments="${tmp#* }"
26733
26734  # Input might be given as Windows format, start by converting to
26735  # unix format.
26736  new_path="$path"
26737
26738  windows_path="$new_path"
26739  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26740    unix_path=`$CYGPATH -u "$windows_path"`
26741    new_path="$unix_path"
26742  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26743    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26744    new_path="$unix_path"
26745  fi
26746
26747
26748  # Now try to locate executable using which
26749  new_path=`$WHICH "$new_path" 2> /dev/null`
26750
26751  if test "x$new_path" = x; then
26752    # Oops. Which didn't find the executable.
26753    # The splitting of arguments from the executable at a space might have been incorrect,
26754    # since paths with space are more likely in Windows. Give it another try with the whole
26755    # argument.
26756    path="$complete"
26757    arguments="EOL"
26758    new_path="$path"
26759
26760  windows_path="$new_path"
26761  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26762    unix_path=`$CYGPATH -u "$windows_path"`
26763    new_path="$unix_path"
26764  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26765    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26766    new_path="$unix_path"
26767  fi
26768
26769
26770    new_path=`$WHICH "$new_path" 2> /dev/null`
26771
26772    if test "x$new_path" = x; then
26773      # It's still not found. Now this is an unrecoverable error.
26774      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
26775$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
26776      has_space=`$ECHO "$complete" | $GREP " "`
26777      if test "x$has_space" != x; then
26778        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26779$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26780      fi
26781      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
26782    fi
26783  fi
26784
26785  # Now new_path has a complete unix path to the binary
26786  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26787    # Keep paths in /bin as-is, but remove trailing .exe if any
26788    new_path="${new_path/%.exe/}"
26789    # Do not save /bin paths to all_fixpath_prefixes!
26790  else
26791    # Not in mixed or Windows style, start by that.
26792    new_path=`cmd //c echo $new_path`
26793
26794  input_path="$new_path"
26795  # Check if we need to convert this using DOS-style short mode. If the path
26796  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26797  # take no chances and rewrite it.
26798  # Note: m4 eats our [], so we need to use [ and ] instead.
26799  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26800  if test "x$has_forbidden_chars" != x; then
26801    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26802    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26803  fi
26804
26805    # Output is in $new_path
26806
26807  windows_path="$new_path"
26808  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26809    unix_path=`$CYGPATH -u "$windows_path"`
26810    new_path="$unix_path"
26811  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26812    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26813    new_path="$unix_path"
26814  fi
26815
26816    # remove trailing .exe if any
26817    new_path="${new_path/%.exe/}"
26818
26819    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26820    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26821  fi
26822
26823  else
26824    # We're on a posix platform. Hooray! :)
26825    # First separate the path from the arguments. This will split at the first
26826    # space.
26827    complete="$NM"
26828    path="${complete%% *}"
26829    tmp="$complete EOL"
26830    arguments="${tmp#* }"
26831
26832    # Cannot rely on the command "which" here since it doesn't always work.
26833    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26834    if test -z "$is_absolute_path"; then
26835      # Path to executable is not absolute. Find it.
26836      IFS_save="$IFS"
26837      IFS=:
26838      for p in $PATH; do
26839        if test -f "$p/$path" && test -x "$p/$path"; then
26840          new_path="$p/$path"
26841          break
26842        fi
26843      done
26844      IFS="$IFS_save"
26845    else
26846      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) failed, using $path directly." >&5
26847$as_echo "$as_me: Resolving NM (as $path) failed, using $path directly." >&6;}
26848      new_path="$path"
26849    fi
26850
26851    if test "x$new_path" = x; then
26852        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
26853$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
26854        has_space=`$ECHO "$complete" | $GREP " "`
26855        if test "x$has_space" != x; then
26856          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26857$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26858        fi
26859        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
26860      fi
26861  fi
26862
26863      # Now join together the path and the arguments once again
26864      if test "x$arguments" != xEOL; then
26865        new_complete="$new_path ${arguments% *}"
26866      else
26867        new_complete="$new_path"
26868      fi
26869
26870  if test "x$complete" != "x$new_complete"; then
26871      NM="$new_complete"
26872      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
26873$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
26874    fi
26875
26876    GNM="$NM"
26877
26878    if test -n "$ac_tool_prefix"; then
26879  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
26880set dummy ${ac_tool_prefix}strip; ac_word=$2
26881{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26882$as_echo_n "checking for $ac_word... " >&6; }
26883if ${ac_cv_prog_STRIP+:} false; then :
26884  $as_echo_n "(cached) " >&6
26885else
26886  if test -n "$STRIP"; then
26887  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
26888else
26889as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26890for as_dir in $PATH
26891do
26892  IFS=$as_save_IFS
26893  test -z "$as_dir" && as_dir=.
26894    for ac_exec_ext in '' $ac_executable_extensions; do
26895  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26896    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
26897    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26898    break 2
26899  fi
26900done
26901  done
26902IFS=$as_save_IFS
26903
26904fi
26905fi
26906STRIP=$ac_cv_prog_STRIP
26907if test -n "$STRIP"; then
26908  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
26909$as_echo "$STRIP" >&6; }
26910else
26911  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26912$as_echo "no" >&6; }
26913fi
26914
26915
26916fi
26917if test -z "$ac_cv_prog_STRIP"; then
26918  ac_ct_STRIP=$STRIP
26919  # Extract the first word of "strip", so it can be a program name with args.
26920set dummy strip; ac_word=$2
26921{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26922$as_echo_n "checking for $ac_word... " >&6; }
26923if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
26924  $as_echo_n "(cached) " >&6
26925else
26926  if test -n "$ac_ct_STRIP"; then
26927  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
26928else
26929as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26930for as_dir in $PATH
26931do
26932  IFS=$as_save_IFS
26933  test -z "$as_dir" && as_dir=.
26934    for ac_exec_ext in '' $ac_executable_extensions; do
26935  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26936    ac_cv_prog_ac_ct_STRIP="strip"
26937    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26938    break 2
26939  fi
26940done
26941  done
26942IFS=$as_save_IFS
26943
26944fi
26945fi
26946ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
26947if test -n "$ac_ct_STRIP"; then
26948  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
26949$as_echo "$ac_ct_STRIP" >&6; }
26950else
26951  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26952$as_echo "no" >&6; }
26953fi
26954
26955  if test "x$ac_ct_STRIP" = x; then
26956    STRIP=""
26957  else
26958    case $cross_compiling:$ac_tool_warned in
26959yes:)
26960{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
26961$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
26962ac_tool_warned=yes ;;
26963esac
26964    STRIP=$ac_ct_STRIP
26965  fi
26966else
26967  STRIP="$ac_cv_prog_STRIP"
26968fi
26969
26970
26971  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26972
26973  # First separate the path from the arguments. This will split at the first
26974  # space.
26975  complete="$STRIP"
26976  path="${complete%% *}"
26977  tmp="$complete EOL"
26978  arguments="${tmp#* }"
26979
26980  # Input might be given as Windows format, start by converting to
26981  # unix format.
26982  new_path=`$CYGPATH -u "$path"`
26983
26984  # Now try to locate executable using which
26985  new_path=`$WHICH "$new_path" 2> /dev/null`
26986  # bat and cmd files are not always considered executable in cygwin causing which
26987  # to not find them
26988  if test "x$new_path" = x \
26989           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26990           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26991    new_path=`$CYGPATH -u "$path"`
26992  fi
26993  if test "x$new_path" = x; then
26994    # Oops. Which didn't find the executable.
26995    # The splitting of arguments from the executable at a space might have been incorrect,
26996    # since paths with space are more likely in Windows. Give it another try with the whole
26997    # argument.
26998    path="$complete"
26999    arguments="EOL"
27000    new_path=`$CYGPATH -u "$path"`
27001    new_path=`$WHICH "$new_path" 2> /dev/null`
27002    # bat and cmd files are not always considered executable in cygwin causing which
27003    # to not find them
27004    if test "x$new_path" = x \
27005             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27006             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27007      new_path=`$CYGPATH -u "$path"`
27008    fi
27009    if test "x$new_path" = x; then
27010      # It's still not found. Now this is an unrecoverable error.
27011      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
27012$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
27013      has_space=`$ECHO "$complete" | $GREP " "`
27014      if test "x$has_space" != x; then
27015        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27016$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27017      fi
27018      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
27019    fi
27020  fi
27021
27022  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27023  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27024  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27025  # "foo.exe" is OK but "foo" is an error.
27026  #
27027  # This test is therefore slightly more accurate than "test -f" to check for file presence.
27028  # It is also a way to make sure we got the proper file name for the real test later on.
27029  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27030  if test "x$test_shortpath" = x; then
27031    # Short path failed, file does not exist as specified.
27032    # Try adding .exe or .cmd
27033    if test -f "${new_path}.exe"; then
27034       input_to_shortpath="${new_path}.exe"
27035    elif test -f "${new_path}.cmd"; then
27036       input_to_shortpath="${new_path}.cmd"
27037    else
27038      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
27039$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
27040      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27041$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27042      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
27043    fi
27044  else
27045    input_to_shortpath="$new_path"
27046  fi
27047
27048  # Call helper function which possibly converts this using DOS-style short mode.
27049  # If so, the updated path is stored in $new_path.
27050  new_path="$input_to_shortpath"
27051
27052  input_path="$input_to_shortpath"
27053  # Check if we need to convert this using DOS-style short mode. If the path
27054  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27055  # take no chances and rewrite it.
27056  # Note: m4 eats our [], so we need to use [ and ] instead.
27057  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27058  if test "x$has_forbidden_chars" != x; then
27059    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27060    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27061    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27062    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27063      # Going to short mode and back again did indeed matter. Since short mode is
27064      # case insensitive, let's make it lowercase to improve readability.
27065      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27066      # Now convert it back to Unix-stile (cygpath)
27067      input_path=`$CYGPATH -u "$shortmode_path"`
27068      new_path="$input_path"
27069    fi
27070  fi
27071
27072  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27073  if test "x$test_cygdrive_prefix" = x; then
27074    # As a simple fix, exclude /usr/bin since it's not a real path.
27075    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27076      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27077      # a path prefixed by /cygdrive for fixpath to work.
27078      new_path="$CYGWIN_ROOT_PATH$input_path"
27079    fi
27080  fi
27081
27082  # remove trailing .exe if any
27083  new_path="${new_path/%.exe/}"
27084
27085  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27086
27087  # First separate the path from the arguments. This will split at the first
27088  # space.
27089  complete="$STRIP"
27090  path="${complete%% *}"
27091  tmp="$complete EOL"
27092  arguments="${tmp#* }"
27093
27094  # Input might be given as Windows format, start by converting to
27095  # unix format.
27096  new_path="$path"
27097
27098  windows_path="$new_path"
27099  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27100    unix_path=`$CYGPATH -u "$windows_path"`
27101    new_path="$unix_path"
27102  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27103    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27104    new_path="$unix_path"
27105  fi
27106
27107
27108  # Now try to locate executable using which
27109  new_path=`$WHICH "$new_path" 2> /dev/null`
27110
27111  if test "x$new_path" = x; then
27112    # Oops. Which didn't find the executable.
27113    # The splitting of arguments from the executable at a space might have been incorrect,
27114    # since paths with space are more likely in Windows. Give it another try with the whole
27115    # argument.
27116    path="$complete"
27117    arguments="EOL"
27118    new_path="$path"
27119
27120  windows_path="$new_path"
27121  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27122    unix_path=`$CYGPATH -u "$windows_path"`
27123    new_path="$unix_path"
27124  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27125    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27126    new_path="$unix_path"
27127  fi
27128
27129
27130    new_path=`$WHICH "$new_path" 2> /dev/null`
27131
27132    if test "x$new_path" = x; then
27133      # It's still not found. Now this is an unrecoverable error.
27134      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
27135$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
27136      has_space=`$ECHO "$complete" | $GREP " "`
27137      if test "x$has_space" != x; then
27138        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27139$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27140      fi
27141      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
27142    fi
27143  fi
27144
27145  # Now new_path has a complete unix path to the binary
27146  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27147    # Keep paths in /bin as-is, but remove trailing .exe if any
27148    new_path="${new_path/%.exe/}"
27149    # Do not save /bin paths to all_fixpath_prefixes!
27150  else
27151    # Not in mixed or Windows style, start by that.
27152    new_path=`cmd //c echo $new_path`
27153
27154  input_path="$new_path"
27155  # Check if we need to convert this using DOS-style short mode. If the path
27156  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27157  # take no chances and rewrite it.
27158  # Note: m4 eats our [], so we need to use [ and ] instead.
27159  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27160  if test "x$has_forbidden_chars" != x; then
27161    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27162    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27163  fi
27164
27165    # Output is in $new_path
27166
27167  windows_path="$new_path"
27168  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27169    unix_path=`$CYGPATH -u "$windows_path"`
27170    new_path="$unix_path"
27171  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27172    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27173    new_path="$unix_path"
27174  fi
27175
27176    # remove trailing .exe if any
27177    new_path="${new_path/%.exe/}"
27178
27179    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27180    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27181  fi
27182
27183  else
27184    # We're on a posix platform. Hooray! :)
27185    # First separate the path from the arguments. This will split at the first
27186    # space.
27187    complete="$STRIP"
27188    path="${complete%% *}"
27189    tmp="$complete EOL"
27190    arguments="${tmp#* }"
27191
27192    # Cannot rely on the command "which" here since it doesn't always work.
27193    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27194    if test -z "$is_absolute_path"; then
27195      # Path to executable is not absolute. Find it.
27196      IFS_save="$IFS"
27197      IFS=:
27198      for p in $PATH; do
27199        if test -f "$p/$path" && test -x "$p/$path"; then
27200          new_path="$p/$path"
27201          break
27202        fi
27203      done
27204      IFS="$IFS_save"
27205    else
27206      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) failed, using $path directly." >&5
27207$as_echo "$as_me: Resolving STRIP (as $path) failed, using $path directly." >&6;}
27208      new_path="$path"
27209    fi
27210
27211    if test "x$new_path" = x; then
27212        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
27213$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
27214        has_space=`$ECHO "$complete" | $GREP " "`
27215        if test "x$has_space" != x; then
27216          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27217$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27218        fi
27219        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
27220      fi
27221  fi
27222
27223      # Now join together the path and the arguments once again
27224      if test "x$arguments" != xEOL; then
27225        new_complete="$new_path ${arguments% *}"
27226      else
27227        new_complete="$new_path"
27228      fi
27229
27230  if test "x$complete" != "x$new_complete"; then
27231      STRIP="$new_complete"
27232      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
27233$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
27234    fi
27235
27236fi
27237
27238# objcopy is used for moving debug symbols to separate files when
27239# full debug symbols are enabled.
27240if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
27241    if test -n "$ac_tool_prefix"; then
27242  for ac_prog in gobjcopy objcopy
27243  do
27244    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
27245set dummy $ac_tool_prefix$ac_prog; ac_word=$2
27246{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27247$as_echo_n "checking for $ac_word... " >&6; }
27248if ${ac_cv_prog_OBJCOPY+:} false; then :
27249  $as_echo_n "(cached) " >&6
27250else
27251  if test -n "$OBJCOPY"; then
27252  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
27253else
27254as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27255for as_dir in $PATH
27256do
27257  IFS=$as_save_IFS
27258  test -z "$as_dir" && as_dir=.
27259    for ac_exec_ext in '' $ac_executable_extensions; do
27260  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27261    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
27262    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27263    break 2
27264  fi
27265done
27266  done
27267IFS=$as_save_IFS
27268
27269fi
27270fi
27271OBJCOPY=$ac_cv_prog_OBJCOPY
27272if test -n "$OBJCOPY"; then
27273  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
27274$as_echo "$OBJCOPY" >&6; }
27275else
27276  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27277$as_echo "no" >&6; }
27278fi
27279
27280
27281    test -n "$OBJCOPY" && break
27282  done
27283fi
27284if test -z "$OBJCOPY"; then
27285  ac_ct_OBJCOPY=$OBJCOPY
27286  for ac_prog in gobjcopy objcopy
27287do
27288  # Extract the first word of "$ac_prog", so it can be a program name with args.
27289set dummy $ac_prog; ac_word=$2
27290{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27291$as_echo_n "checking for $ac_word... " >&6; }
27292if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
27293  $as_echo_n "(cached) " >&6
27294else
27295  if test -n "$ac_ct_OBJCOPY"; then
27296  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
27297else
27298as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27299for as_dir in $PATH
27300do
27301  IFS=$as_save_IFS
27302  test -z "$as_dir" && as_dir=.
27303    for ac_exec_ext in '' $ac_executable_extensions; do
27304  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27305    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
27306    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27307    break 2
27308  fi
27309done
27310  done
27311IFS=$as_save_IFS
27312
27313fi
27314fi
27315ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
27316if test -n "$ac_ct_OBJCOPY"; then
27317  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
27318$as_echo "$ac_ct_OBJCOPY" >&6; }
27319else
27320  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27321$as_echo "no" >&6; }
27322fi
27323
27324
27325  test -n "$ac_ct_OBJCOPY" && break
27326done
27327
27328  if test "x$ac_ct_OBJCOPY" = x; then
27329    OBJCOPY=""
27330  else
27331    case $cross_compiling:$ac_tool_warned in
27332yes:)
27333{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
27334$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
27335ac_tool_warned=yes ;;
27336esac
27337    OBJCOPY=$ac_ct_OBJCOPY
27338  fi
27339fi
27340
27341    # Only call fixup if objcopy was found.
27342    if test -n "$OBJCOPY"; then
27343
27344  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27345
27346  # First separate the path from the arguments. This will split at the first
27347  # space.
27348  complete="$OBJCOPY"
27349  path="${complete%% *}"
27350  tmp="$complete EOL"
27351  arguments="${tmp#* }"
27352
27353  # Input might be given as Windows format, start by converting to
27354  # unix format.
27355  new_path=`$CYGPATH -u "$path"`
27356
27357  # Now try to locate executable using which
27358  new_path=`$WHICH "$new_path" 2> /dev/null`
27359  # bat and cmd files are not always considered executable in cygwin causing which
27360  # to not find them
27361  if test "x$new_path" = x \
27362           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27363           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27364    new_path=`$CYGPATH -u "$path"`
27365  fi
27366  if test "x$new_path" = x; then
27367    # Oops. Which didn't find the executable.
27368    # The splitting of arguments from the executable at a space might have been incorrect,
27369    # since paths with space are more likely in Windows. Give it another try with the whole
27370    # argument.
27371    path="$complete"
27372    arguments="EOL"
27373    new_path=`$CYGPATH -u "$path"`
27374    new_path=`$WHICH "$new_path" 2> /dev/null`
27375    # bat and cmd files are not always considered executable in cygwin causing which
27376    # to not find them
27377    if test "x$new_path" = x \
27378             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27379             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27380      new_path=`$CYGPATH -u "$path"`
27381    fi
27382    if test "x$new_path" = x; then
27383      # It's still not found. Now this is an unrecoverable error.
27384      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
27385$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
27386      has_space=`$ECHO "$complete" | $GREP " "`
27387      if test "x$has_space" != x; then
27388        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27389$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27390      fi
27391      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
27392    fi
27393  fi
27394
27395  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27396  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27397  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27398  # "foo.exe" is OK but "foo" is an error.
27399  #
27400  # This test is therefore slightly more accurate than "test -f" to check for file presence.
27401  # It is also a way to make sure we got the proper file name for the real test later on.
27402  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27403  if test "x$test_shortpath" = x; then
27404    # Short path failed, file does not exist as specified.
27405    # Try adding .exe or .cmd
27406    if test -f "${new_path}.exe"; then
27407       input_to_shortpath="${new_path}.exe"
27408    elif test -f "${new_path}.cmd"; then
27409       input_to_shortpath="${new_path}.cmd"
27410    else
27411      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
27412$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
27413      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27414$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27415      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
27416    fi
27417  else
27418    input_to_shortpath="$new_path"
27419  fi
27420
27421  # Call helper function which possibly converts this using DOS-style short mode.
27422  # If so, the updated path is stored in $new_path.
27423  new_path="$input_to_shortpath"
27424
27425  input_path="$input_to_shortpath"
27426  # Check if we need to convert this using DOS-style short mode. If the path
27427  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27428  # take no chances and rewrite it.
27429  # Note: m4 eats our [], so we need to use [ and ] instead.
27430  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27431  if test "x$has_forbidden_chars" != x; then
27432    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27433    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27434    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27435    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27436      # Going to short mode and back again did indeed matter. Since short mode is
27437      # case insensitive, let's make it lowercase to improve readability.
27438      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27439      # Now convert it back to Unix-stile (cygpath)
27440      input_path=`$CYGPATH -u "$shortmode_path"`
27441      new_path="$input_path"
27442    fi
27443  fi
27444
27445  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27446  if test "x$test_cygdrive_prefix" = x; then
27447    # As a simple fix, exclude /usr/bin since it's not a real path.
27448    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27449      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27450      # a path prefixed by /cygdrive for fixpath to work.
27451      new_path="$CYGWIN_ROOT_PATH$input_path"
27452    fi
27453  fi
27454
27455  # remove trailing .exe if any
27456  new_path="${new_path/%.exe/}"
27457
27458  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27459
27460  # First separate the path from the arguments. This will split at the first
27461  # space.
27462  complete="$OBJCOPY"
27463  path="${complete%% *}"
27464  tmp="$complete EOL"
27465  arguments="${tmp#* }"
27466
27467  # Input might be given as Windows format, start by converting to
27468  # unix format.
27469  new_path="$path"
27470
27471  windows_path="$new_path"
27472  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27473    unix_path=`$CYGPATH -u "$windows_path"`
27474    new_path="$unix_path"
27475  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27476    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27477    new_path="$unix_path"
27478  fi
27479
27480
27481  # Now try to locate executable using which
27482  new_path=`$WHICH "$new_path" 2> /dev/null`
27483
27484  if test "x$new_path" = x; then
27485    # Oops. Which didn't find the executable.
27486    # The splitting of arguments from the executable at a space might have been incorrect,
27487    # since paths with space are more likely in Windows. Give it another try with the whole
27488    # argument.
27489    path="$complete"
27490    arguments="EOL"
27491    new_path="$path"
27492
27493  windows_path="$new_path"
27494  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27495    unix_path=`$CYGPATH -u "$windows_path"`
27496    new_path="$unix_path"
27497  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27498    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27499    new_path="$unix_path"
27500  fi
27501
27502
27503    new_path=`$WHICH "$new_path" 2> /dev/null`
27504
27505    if test "x$new_path" = x; then
27506      # It's still not found. Now this is an unrecoverable error.
27507      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
27508$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
27509      has_space=`$ECHO "$complete" | $GREP " "`
27510      if test "x$has_space" != x; then
27511        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27512$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27513      fi
27514      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
27515    fi
27516  fi
27517
27518  # Now new_path has a complete unix path to the binary
27519  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27520    # Keep paths in /bin as-is, but remove trailing .exe if any
27521    new_path="${new_path/%.exe/}"
27522    # Do not save /bin paths to all_fixpath_prefixes!
27523  else
27524    # Not in mixed or Windows style, start by that.
27525    new_path=`cmd //c echo $new_path`
27526
27527  input_path="$new_path"
27528  # Check if we need to convert this using DOS-style short mode. If the path
27529  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27530  # take no chances and rewrite it.
27531  # Note: m4 eats our [], so we need to use [ and ] instead.
27532  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27533  if test "x$has_forbidden_chars" != x; then
27534    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27535    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27536  fi
27537
27538    # Output is in $new_path
27539
27540  windows_path="$new_path"
27541  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27542    unix_path=`$CYGPATH -u "$windows_path"`
27543    new_path="$unix_path"
27544  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27545    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27546    new_path="$unix_path"
27547  fi
27548
27549    # remove trailing .exe if any
27550    new_path="${new_path/%.exe/}"
27551
27552    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27553    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27554  fi
27555
27556  else
27557    # We're on a posix platform. Hooray! :)
27558    # First separate the path from the arguments. This will split at the first
27559    # space.
27560    complete="$OBJCOPY"
27561    path="${complete%% *}"
27562    tmp="$complete EOL"
27563    arguments="${tmp#* }"
27564
27565    # Cannot rely on the command "which" here since it doesn't always work.
27566    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27567    if test -z "$is_absolute_path"; then
27568      # Path to executable is not absolute. Find it.
27569      IFS_save="$IFS"
27570      IFS=:
27571      for p in $PATH; do
27572        if test -f "$p/$path" && test -x "$p/$path"; then
27573          new_path="$p/$path"
27574          break
27575        fi
27576      done
27577      IFS="$IFS_save"
27578    else
27579      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJCOPY (as $path) failed, using $path directly." >&5
27580$as_echo "$as_me: Resolving OBJCOPY (as $path) failed, using $path directly." >&6;}
27581      new_path="$path"
27582    fi
27583
27584    if test "x$new_path" = x; then
27585        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
27586$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
27587        has_space=`$ECHO "$complete" | $GREP " "`
27588        if test "x$has_space" != x; then
27589          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27590$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27591        fi
27592        as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
27593      fi
27594  fi
27595
27596      # Now join together the path and the arguments once again
27597      if test "x$arguments" != xEOL; then
27598        new_complete="$new_path ${arguments% *}"
27599      else
27600        new_complete="$new_path"
27601      fi
27602
27603  if test "x$complete" != "x$new_complete"; then
27604      OBJCOPY="$new_complete"
27605      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
27606$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
27607    fi
27608
27609    fi
27610fi
27611
27612if test -n "$ac_tool_prefix"; then
27613  for ac_prog in gobjdump objdump
27614  do
27615    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
27616set dummy $ac_tool_prefix$ac_prog; ac_word=$2
27617{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27618$as_echo_n "checking for $ac_word... " >&6; }
27619if ${ac_cv_prog_OBJDUMP+:} false; then :
27620  $as_echo_n "(cached) " >&6
27621else
27622  if test -n "$OBJDUMP"; then
27623  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
27624else
27625as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27626for as_dir in $PATH
27627do
27628  IFS=$as_save_IFS
27629  test -z "$as_dir" && as_dir=.
27630    for ac_exec_ext in '' $ac_executable_extensions; do
27631  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27632    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
27633    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27634    break 2
27635  fi
27636done
27637  done
27638IFS=$as_save_IFS
27639
27640fi
27641fi
27642OBJDUMP=$ac_cv_prog_OBJDUMP
27643if test -n "$OBJDUMP"; then
27644  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
27645$as_echo "$OBJDUMP" >&6; }
27646else
27647  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27648$as_echo "no" >&6; }
27649fi
27650
27651
27652    test -n "$OBJDUMP" && break
27653  done
27654fi
27655if test -z "$OBJDUMP"; then
27656  ac_ct_OBJDUMP=$OBJDUMP
27657  for ac_prog in gobjdump objdump
27658do
27659  # Extract the first word of "$ac_prog", so it can be a program name with args.
27660set dummy $ac_prog; ac_word=$2
27661{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27662$as_echo_n "checking for $ac_word... " >&6; }
27663if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
27664  $as_echo_n "(cached) " >&6
27665else
27666  if test -n "$ac_ct_OBJDUMP"; then
27667  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
27668else
27669as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27670for as_dir in $PATH
27671do
27672  IFS=$as_save_IFS
27673  test -z "$as_dir" && as_dir=.
27674    for ac_exec_ext in '' $ac_executable_extensions; do
27675  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27676    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
27677    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27678    break 2
27679  fi
27680done
27681  done
27682IFS=$as_save_IFS
27683
27684fi
27685fi
27686ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
27687if test -n "$ac_ct_OBJDUMP"; then
27688  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
27689$as_echo "$ac_ct_OBJDUMP" >&6; }
27690else
27691  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27692$as_echo "no" >&6; }
27693fi
27694
27695
27696  test -n "$ac_ct_OBJDUMP" && break
27697done
27698
27699  if test "x$ac_ct_OBJDUMP" = x; then
27700    OBJDUMP=""
27701  else
27702    case $cross_compiling:$ac_tool_warned in
27703yes:)
27704{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
27705$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
27706ac_tool_warned=yes ;;
27707esac
27708    OBJDUMP=$ac_ct_OBJDUMP
27709  fi
27710fi
27711
27712if test "x$OBJDUMP" != x; then
27713  # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE bails if argument is missing.
27714
27715  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27716
27717  # First separate the path from the arguments. This will split at the first
27718  # space.
27719  complete="$OBJDUMP"
27720  path="${complete%% *}"
27721  tmp="$complete EOL"
27722  arguments="${tmp#* }"
27723
27724  # Input might be given as Windows format, start by converting to
27725  # unix format.
27726  new_path=`$CYGPATH -u "$path"`
27727
27728  # Now try to locate executable using which
27729  new_path=`$WHICH "$new_path" 2> /dev/null`
27730  # bat and cmd files are not always considered executable in cygwin causing which
27731  # to not find them
27732  if test "x$new_path" = x \
27733           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27734           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27735    new_path=`$CYGPATH -u "$path"`
27736  fi
27737  if test "x$new_path" = x; then
27738    # Oops. Which didn't find the executable.
27739    # The splitting of arguments from the executable at a space might have been incorrect,
27740    # since paths with space are more likely in Windows. Give it another try with the whole
27741    # argument.
27742    path="$complete"
27743    arguments="EOL"
27744    new_path=`$CYGPATH -u "$path"`
27745    new_path=`$WHICH "$new_path" 2> /dev/null`
27746    # bat and cmd files are not always considered executable in cygwin causing which
27747    # to not find them
27748    if test "x$new_path" = x \
27749             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27750             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27751      new_path=`$CYGPATH -u "$path"`
27752    fi
27753    if test "x$new_path" = x; then
27754      # It's still not found. Now this is an unrecoverable error.
27755      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
27756$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
27757      has_space=`$ECHO "$complete" | $GREP " "`
27758      if test "x$has_space" != x; then
27759        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27760$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27761      fi
27762      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
27763    fi
27764  fi
27765
27766  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27767  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27768  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27769  # "foo.exe" is OK but "foo" is an error.
27770  #
27771  # This test is therefore slightly more accurate than "test -f" to check for file presence.
27772  # It is also a way to make sure we got the proper file name for the real test later on.
27773  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27774  if test "x$test_shortpath" = x; then
27775    # Short path failed, file does not exist as specified.
27776    # Try adding .exe or .cmd
27777    if test -f "${new_path}.exe"; then
27778       input_to_shortpath="${new_path}.exe"
27779    elif test -f "${new_path}.cmd"; then
27780       input_to_shortpath="${new_path}.cmd"
27781    else
27782      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
27783$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
27784      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27785$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27786      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
27787    fi
27788  else
27789    input_to_shortpath="$new_path"
27790  fi
27791
27792  # Call helper function which possibly converts this using DOS-style short mode.
27793  # If so, the updated path is stored in $new_path.
27794  new_path="$input_to_shortpath"
27795
27796  input_path="$input_to_shortpath"
27797  # Check if we need to convert this using DOS-style short mode. If the path
27798  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27799  # take no chances and rewrite it.
27800  # Note: m4 eats our [], so we need to use [ and ] instead.
27801  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27802  if test "x$has_forbidden_chars" != x; then
27803    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27804    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27805    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27806    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27807      # Going to short mode and back again did indeed matter. Since short mode is
27808      # case insensitive, let's make it lowercase to improve readability.
27809      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27810      # Now convert it back to Unix-stile (cygpath)
27811      input_path=`$CYGPATH -u "$shortmode_path"`
27812      new_path="$input_path"
27813    fi
27814  fi
27815
27816  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27817  if test "x$test_cygdrive_prefix" = x; then
27818    # As a simple fix, exclude /usr/bin since it's not a real path.
27819    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27820      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27821      # a path prefixed by /cygdrive for fixpath to work.
27822      new_path="$CYGWIN_ROOT_PATH$input_path"
27823    fi
27824  fi
27825
27826  # remove trailing .exe if any
27827  new_path="${new_path/%.exe/}"
27828
27829  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27830
27831  # First separate the path from the arguments. This will split at the first
27832  # space.
27833  complete="$OBJDUMP"
27834  path="${complete%% *}"
27835  tmp="$complete EOL"
27836  arguments="${tmp#* }"
27837
27838  # Input might be given as Windows format, start by converting to
27839  # unix format.
27840  new_path="$path"
27841
27842  windows_path="$new_path"
27843  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27844    unix_path=`$CYGPATH -u "$windows_path"`
27845    new_path="$unix_path"
27846  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27847    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27848    new_path="$unix_path"
27849  fi
27850
27851
27852  # Now try to locate executable using which
27853  new_path=`$WHICH "$new_path" 2> /dev/null`
27854
27855  if test "x$new_path" = x; then
27856    # Oops. Which didn't find the executable.
27857    # The splitting of arguments from the executable at a space might have been incorrect,
27858    # since paths with space are more likely in Windows. Give it another try with the whole
27859    # argument.
27860    path="$complete"
27861    arguments="EOL"
27862    new_path="$path"
27863
27864  windows_path="$new_path"
27865  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27866    unix_path=`$CYGPATH -u "$windows_path"`
27867    new_path="$unix_path"
27868  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27869    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27870    new_path="$unix_path"
27871  fi
27872
27873
27874    new_path=`$WHICH "$new_path" 2> /dev/null`
27875
27876    if test "x$new_path" = x; then
27877      # It's still not found. Now this is an unrecoverable error.
27878      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
27879$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
27880      has_space=`$ECHO "$complete" | $GREP " "`
27881      if test "x$has_space" != x; then
27882        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27883$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27884      fi
27885      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
27886    fi
27887  fi
27888
27889  # Now new_path has a complete unix path to the binary
27890  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27891    # Keep paths in /bin as-is, but remove trailing .exe if any
27892    new_path="${new_path/%.exe/}"
27893    # Do not save /bin paths to all_fixpath_prefixes!
27894  else
27895    # Not in mixed or Windows style, start by that.
27896    new_path=`cmd //c echo $new_path`
27897
27898  input_path="$new_path"
27899  # Check if we need to convert this using DOS-style short mode. If the path
27900  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27901  # take no chances and rewrite it.
27902  # Note: m4 eats our [], so we need to use [ and ] instead.
27903  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27904  if test "x$has_forbidden_chars" != x; then
27905    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27906    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27907  fi
27908
27909    # Output is in $new_path
27910
27911  windows_path="$new_path"
27912  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27913    unix_path=`$CYGPATH -u "$windows_path"`
27914    new_path="$unix_path"
27915  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27916    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27917    new_path="$unix_path"
27918  fi
27919
27920    # remove trailing .exe if any
27921    new_path="${new_path/%.exe/}"
27922
27923    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27924    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27925  fi
27926
27927  else
27928    # We're on a posix platform. Hooray! :)
27929    # First separate the path from the arguments. This will split at the first
27930    # space.
27931    complete="$OBJDUMP"
27932    path="${complete%% *}"
27933    tmp="$complete EOL"
27934    arguments="${tmp#* }"
27935
27936    # Cannot rely on the command "which" here since it doesn't always work.
27937    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27938    if test -z "$is_absolute_path"; then
27939      # Path to executable is not absolute. Find it.
27940      IFS_save="$IFS"
27941      IFS=:
27942      for p in $PATH; do
27943        if test -f "$p/$path" && test -x "$p/$path"; then
27944          new_path="$p/$path"
27945          break
27946        fi
27947      done
27948      IFS="$IFS_save"
27949    else
27950      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJDUMP (as $path) failed, using $path directly." >&5
27951$as_echo "$as_me: Resolving OBJDUMP (as $path) failed, using $path directly." >&6;}
27952      new_path="$path"
27953    fi
27954
27955    if test "x$new_path" = x; then
27956        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
27957$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
27958        has_space=`$ECHO "$complete" | $GREP " "`
27959        if test "x$has_space" != x; then
27960          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27961$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27962        fi
27963        as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
27964      fi
27965  fi
27966
27967      # Now join together the path and the arguments once again
27968      if test "x$arguments" != xEOL; then
27969        new_complete="$new_path ${arguments% *}"
27970      else
27971        new_complete="$new_path"
27972      fi
27973
27974  if test "x$complete" != "x$new_complete"; then
27975      OBJDUMP="$new_complete"
27976      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
27977$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
27978    fi
27979
27980fi
27981
27982if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
27983   # Extract the first word of "lipo", so it can be a program name with args.
27984set dummy lipo; ac_word=$2
27985{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27986$as_echo_n "checking for $ac_word... " >&6; }
27987if ${ac_cv_path_LIPO+:} false; then :
27988  $as_echo_n "(cached) " >&6
27989else
27990  case $LIPO in
27991  [\\/]* | ?:[\\/]*)
27992  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
27993  ;;
27994  *)
27995  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27996for as_dir in $PATH
27997do
27998  IFS=$as_save_IFS
27999  test -z "$as_dir" && as_dir=.
28000    for ac_exec_ext in '' $ac_executable_extensions; do
28001  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28002    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
28003    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28004    break 2
28005  fi
28006done
28007  done
28008IFS=$as_save_IFS
28009
28010  ;;
28011esac
28012fi
28013LIPO=$ac_cv_path_LIPO
28014if test -n "$LIPO"; then
28015  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
28016$as_echo "$LIPO" >&6; }
28017else
28018  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28019$as_echo "no" >&6; }
28020fi
28021
28022
28023
28024  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28025
28026  # First separate the path from the arguments. This will split at the first
28027  # space.
28028  complete="$LIPO"
28029  path="${complete%% *}"
28030  tmp="$complete EOL"
28031  arguments="${tmp#* }"
28032
28033  # Input might be given as Windows format, start by converting to
28034  # unix format.
28035  new_path=`$CYGPATH -u "$path"`
28036
28037  # Now try to locate executable using which
28038  new_path=`$WHICH "$new_path" 2> /dev/null`
28039  # bat and cmd files are not always considered executable in cygwin causing which
28040  # to not find them
28041  if test "x$new_path" = x \
28042           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28043           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28044    new_path=`$CYGPATH -u "$path"`
28045  fi
28046  if test "x$new_path" = x; then
28047    # Oops. Which didn't find the executable.
28048    # The splitting of arguments from the executable at a space might have been incorrect,
28049    # since paths with space are more likely in Windows. Give it another try with the whole
28050    # argument.
28051    path="$complete"
28052    arguments="EOL"
28053    new_path=`$CYGPATH -u "$path"`
28054    new_path=`$WHICH "$new_path" 2> /dev/null`
28055    # bat and cmd files are not always considered executable in cygwin causing which
28056    # to not find them
28057    if test "x$new_path" = x \
28058             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28059             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28060      new_path=`$CYGPATH -u "$path"`
28061    fi
28062    if test "x$new_path" = x; then
28063      # It's still not found. Now this is an unrecoverable error.
28064      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
28065$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
28066      has_space=`$ECHO "$complete" | $GREP " "`
28067      if test "x$has_space" != x; then
28068        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28069$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28070      fi
28071      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
28072    fi
28073  fi
28074
28075  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28076  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28077  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28078  # "foo.exe" is OK but "foo" is an error.
28079  #
28080  # This test is therefore slightly more accurate than "test -f" to check for file presence.
28081  # It is also a way to make sure we got the proper file name for the real test later on.
28082  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28083  if test "x$test_shortpath" = x; then
28084    # Short path failed, file does not exist as specified.
28085    # Try adding .exe or .cmd
28086    if test -f "${new_path}.exe"; then
28087       input_to_shortpath="${new_path}.exe"
28088    elif test -f "${new_path}.cmd"; then
28089       input_to_shortpath="${new_path}.cmd"
28090    else
28091      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
28092$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
28093      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
28094$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
28095      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
28096    fi
28097  else
28098    input_to_shortpath="$new_path"
28099  fi
28100
28101  # Call helper function which possibly converts this using DOS-style short mode.
28102  # If so, the updated path is stored in $new_path.
28103  new_path="$input_to_shortpath"
28104
28105  input_path="$input_to_shortpath"
28106  # Check if we need to convert this using DOS-style short mode. If the path
28107  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28108  # take no chances and rewrite it.
28109  # Note: m4 eats our [], so we need to use [ and ] instead.
28110  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28111  if test "x$has_forbidden_chars" != x; then
28112    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28113    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28114    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28115    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28116      # Going to short mode and back again did indeed matter. Since short mode is
28117      # case insensitive, let's make it lowercase to improve readability.
28118      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28119      # Now convert it back to Unix-stile (cygpath)
28120      input_path=`$CYGPATH -u "$shortmode_path"`
28121      new_path="$input_path"
28122    fi
28123  fi
28124
28125  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28126  if test "x$test_cygdrive_prefix" = x; then
28127    # As a simple fix, exclude /usr/bin since it's not a real path.
28128    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28129      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28130      # a path prefixed by /cygdrive for fixpath to work.
28131      new_path="$CYGWIN_ROOT_PATH$input_path"
28132    fi
28133  fi
28134
28135  # remove trailing .exe if any
28136  new_path="${new_path/%.exe/}"
28137
28138  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28139
28140  # First separate the path from the arguments. This will split at the first
28141  # space.
28142  complete="$LIPO"
28143  path="${complete%% *}"
28144  tmp="$complete EOL"
28145  arguments="${tmp#* }"
28146
28147  # Input might be given as Windows format, start by converting to
28148  # unix format.
28149  new_path="$path"
28150
28151  windows_path="$new_path"
28152  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28153    unix_path=`$CYGPATH -u "$windows_path"`
28154    new_path="$unix_path"
28155  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28156    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28157    new_path="$unix_path"
28158  fi
28159
28160
28161  # Now try to locate executable using which
28162  new_path=`$WHICH "$new_path" 2> /dev/null`
28163
28164  if test "x$new_path" = x; then
28165    # Oops. Which didn't find the executable.
28166    # The splitting of arguments from the executable at a space might have been incorrect,
28167    # since paths with space are more likely in Windows. Give it another try with the whole
28168    # argument.
28169    path="$complete"
28170    arguments="EOL"
28171    new_path="$path"
28172
28173  windows_path="$new_path"
28174  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28175    unix_path=`$CYGPATH -u "$windows_path"`
28176    new_path="$unix_path"
28177  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28178    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28179    new_path="$unix_path"
28180  fi
28181
28182
28183    new_path=`$WHICH "$new_path" 2> /dev/null`
28184
28185    if test "x$new_path" = x; then
28186      # It's still not found. Now this is an unrecoverable error.
28187      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
28188$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
28189      has_space=`$ECHO "$complete" | $GREP " "`
28190      if test "x$has_space" != x; then
28191        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28192$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28193      fi
28194      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
28195    fi
28196  fi
28197
28198  # Now new_path has a complete unix path to the binary
28199  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28200    # Keep paths in /bin as-is, but remove trailing .exe if any
28201    new_path="${new_path/%.exe/}"
28202    # Do not save /bin paths to all_fixpath_prefixes!
28203  else
28204    # Not in mixed or Windows style, start by that.
28205    new_path=`cmd //c echo $new_path`
28206
28207  input_path="$new_path"
28208  # Check if we need to convert this using DOS-style short mode. If the path
28209  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28210  # take no chances and rewrite it.
28211  # Note: m4 eats our [], so we need to use [ and ] instead.
28212  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28213  if test "x$has_forbidden_chars" != x; then
28214    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28215    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28216  fi
28217
28218    # Output is in $new_path
28219
28220  windows_path="$new_path"
28221  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28222    unix_path=`$CYGPATH -u "$windows_path"`
28223    new_path="$unix_path"
28224  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28225    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28226    new_path="$unix_path"
28227  fi
28228
28229    # remove trailing .exe if any
28230    new_path="${new_path/%.exe/}"
28231
28232    # Save the first 10 bytes of this path to the storage, so fixpath can work.
28233    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28234  fi
28235
28236  else
28237    # We're on a posix platform. Hooray! :)
28238    # First separate the path from the arguments. This will split at the first
28239    # space.
28240    complete="$LIPO"
28241    path="${complete%% *}"
28242    tmp="$complete EOL"
28243    arguments="${tmp#* }"
28244
28245    # Cannot rely on the command "which" here since it doesn't always work.
28246    is_absolute_path=`$ECHO "$path" | $GREP ^/`
28247    if test -z "$is_absolute_path"; then
28248      # Path to executable is not absolute. Find it.
28249      IFS_save="$IFS"
28250      IFS=:
28251      for p in $PATH; do
28252        if test -f "$p/$path" && test -x "$p/$path"; then
28253          new_path="$p/$path"
28254          break
28255        fi
28256      done
28257      IFS="$IFS_save"
28258    else
28259      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving LIPO (as $path) failed, using $path directly." >&5
28260$as_echo "$as_me: Resolving LIPO (as $path) failed, using $path directly." >&6;}
28261      new_path="$path"
28262    fi
28263
28264    if test "x$new_path" = x; then
28265        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
28266$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
28267        has_space=`$ECHO "$complete" | $GREP " "`
28268        if test "x$has_space" != x; then
28269          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28270$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28271        fi
28272        as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
28273      fi
28274  fi
28275
28276      # Now join together the path and the arguments once again
28277      if test "x$arguments" != xEOL; then
28278        new_complete="$new_path ${arguments% *}"
28279      else
28280        new_complete="$new_path"
28281      fi
28282
28283  if test "x$complete" != "x$new_complete"; then
28284      LIPO="$new_complete"
28285      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
28286$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
28287    fi
28288
28289fi
28290
28291
28292
28293# Restore old path without tools dir
28294PATH="$OLD_PATH"
28295
28296
28297# FIXME: Currently we must test this after paths but before flags. Fix!
28298
28299# And we can test some aspects on the target using configure macros.
28300
28301
28302{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
28303$as_echo_n "checking for ANSI C header files... " >&6; }
28304if ${ac_cv_header_stdc+:} false; then :
28305  $as_echo_n "(cached) " >&6
28306else
28307  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28308/* end confdefs.h.  */
28309#include <stdlib.h>
28310#include <stdarg.h>
28311#include <string.h>
28312#include <float.h>
28313
28314int
28315main ()
28316{
28317
28318  ;
28319  return 0;
28320}
28321_ACEOF
28322if ac_fn_cxx_try_compile "$LINENO"; then :
28323  ac_cv_header_stdc=yes
28324else
28325  ac_cv_header_stdc=no
28326fi
28327rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28328
28329if test $ac_cv_header_stdc = yes; then
28330  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
28331  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28332/* end confdefs.h.  */
28333#include <string.h>
28334
28335_ACEOF
28336if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28337  $EGREP "memchr" >/dev/null 2>&1; then :
28338
28339else
28340  ac_cv_header_stdc=no
28341fi
28342rm -f conftest*
28343
28344fi
28345
28346if test $ac_cv_header_stdc = yes; then
28347  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
28348  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28349/* end confdefs.h.  */
28350#include <stdlib.h>
28351
28352_ACEOF
28353if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28354  $EGREP "free" >/dev/null 2>&1; then :
28355
28356else
28357  ac_cv_header_stdc=no
28358fi
28359rm -f conftest*
28360
28361fi
28362
28363if test $ac_cv_header_stdc = yes; then
28364  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
28365  if test "$cross_compiling" = yes; then :
28366  :
28367else
28368  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28369/* end confdefs.h.  */
28370#include <ctype.h>
28371#include <stdlib.h>
28372#if ((' ' & 0x0FF) == 0x020)
28373# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
28374# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
28375#else
28376# define ISLOWER(c) \
28377		   (('a' <= (c) && (c) <= 'i') \
28378		     || ('j' <= (c) && (c) <= 'r') \
28379		     || ('s' <= (c) && (c) <= 'z'))
28380# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
28381#endif
28382
28383#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
28384int
28385main ()
28386{
28387  int i;
28388  for (i = 0; i < 256; i++)
28389    if (XOR (islower (i), ISLOWER (i))
28390	|| toupper (i) != TOUPPER (i))
28391      return 2;
28392  return 0;
28393}
28394_ACEOF
28395if ac_fn_cxx_try_run "$LINENO"; then :
28396
28397else
28398  ac_cv_header_stdc=no
28399fi
28400rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28401  conftest.$ac_objext conftest.beam conftest.$ac_ext
28402fi
28403
28404fi
28405fi
28406{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
28407$as_echo "$ac_cv_header_stdc" >&6; }
28408if test $ac_cv_header_stdc = yes; then
28409
28410$as_echo "#define STDC_HEADERS 1" >>confdefs.h
28411
28412fi
28413
28414# On IRIX 5.3, sys/types and inttypes.h are conflicting.
28415for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
28416		  inttypes.h stdint.h unistd.h
28417do :
28418  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
28419ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
28420"
28421if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
28422  cat >>confdefs.h <<_ACEOF
28423#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
28424_ACEOF
28425
28426fi
28427
28428done
28429
28430
28431
28432###############################################################################
28433#
28434# Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
28435# (The JVM can use 32 or 64 bit Java pointers but that decision
28436# is made at runtime.)
28437#
28438
28439if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28440  # Always specify -m flags on Solaris
28441
28442  # When we add flags to the "official" CFLAGS etc, we need to
28443  # keep track of these additions in ADDED_CFLAGS etc. These
28444  # will later be checked to make sure only controlled additions
28445  # have been made to CFLAGS etc.
28446  ADDED_CFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28447  ADDED_CXXFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28448  ADDED_LDFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28449
28450  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
28451  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
28452  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
28453
28454  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
28455  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
28456  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
28457
28458elif test "x$COMPILE_TYPE" = xreduced; then
28459  if test "x$OPENJDK_TARGET_OS" != xwindows; then
28460    # Specify -m if running reduced on other Posix platforms
28461
28462  # When we add flags to the "official" CFLAGS etc, we need to
28463  # keep track of these additions in ADDED_CFLAGS etc. These
28464  # will later be checked to make sure only controlled additions
28465  # have been made to CFLAGS etc.
28466  ADDED_CFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28467  ADDED_CXXFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28468  ADDED_LDFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28469
28470  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
28471  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
28472  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
28473
28474  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
28475  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
28476  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
28477
28478  fi
28479fi
28480
28481# Make compilation sanity check
28482for ac_header in stdio.h
28483do :
28484  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
28485if test "x$ac_cv_header_stdio_h" = xyes; then :
28486  cat >>confdefs.h <<_ACEOF
28487#define HAVE_STDIO_H 1
28488_ACEOF
28489
28490else
28491
28492  { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
28493$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
28494  if test "x$COMPILE_TYPE" = xreduced; then
28495    { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed." >&5
28496$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed." >&6;}
28497  elif test "x$COMPILE_TYPE" = xcross; then
28498    { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
28499$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
28500  fi
28501  as_fn_error $? "Cannot continue." "$LINENO" 5
28502
28503fi
28504
28505done
28506
28507
28508# The cast to long int works around a bug in the HP C Compiler
28509# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
28510# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
28511# This bug is HP SR number 8606223364.
28512{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
28513$as_echo_n "checking size of int *... " >&6; }
28514if ${ac_cv_sizeof_int_p+:} false; then :
28515  $as_echo_n "(cached) " >&6
28516else
28517  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
28518
28519else
28520  if test "$ac_cv_type_int_p" = yes; then
28521     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
28522$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
28523as_fn_error 77 "cannot compute sizeof (int *)
28524See \`config.log' for more details" "$LINENO" 5; }
28525   else
28526     ac_cv_sizeof_int_p=0
28527   fi
28528fi
28529
28530fi
28531{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
28532$as_echo "$ac_cv_sizeof_int_p" >&6; }
28533
28534
28535
28536cat >>confdefs.h <<_ACEOF
28537#define SIZEOF_INT_P $ac_cv_sizeof_int_p
28538_ACEOF
28539
28540
28541
28542if test "x$SIZEOF_INT_P" != "x$ac_cv_sizeof_int_p"; then
28543  # Workaround autoconf bug, see http://lists.gnu.org/archive/html/autoconf/2010-07/msg00004.html
28544  SIZEOF_INT_P="$ac_cv_sizeof_int_p"
28545fi
28546
28547if test "x$SIZEOF_INT_P" = x; then
28548    # The test failed, lets stick to the assumed value.
28549    { $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
28550$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
28551else
28552    TESTED_TARGET_CPU_BITS=`expr 8 \* $SIZEOF_INT_P`
28553
28554    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
28555        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
28556    fi
28557fi
28558
28559{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
28560$as_echo_n "checking for target address size... " >&6; }
28561{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
28562$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
28563
28564
28565###############################################################################
28566#
28567# Is the target little of big endian?
28568#
28569 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
28570$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
28571if ${ac_cv_c_bigendian+:} false; then :
28572  $as_echo_n "(cached) " >&6
28573else
28574  ac_cv_c_bigendian=unknown
28575    # See if we're dealing with a universal compiler.
28576    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28577/* end confdefs.h.  */
28578#ifndef __APPLE_CC__
28579	       not a universal capable compiler
28580	     #endif
28581	     typedef int dummy;
28582
28583_ACEOF
28584if ac_fn_cxx_try_compile "$LINENO"; then :
28585
28586	# Check for potential -arch flags.  It is not universal unless
28587	# there are at least two -arch flags with different values.
28588	ac_arch=
28589	ac_prev=
28590	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
28591	 if test -n "$ac_prev"; then
28592	   case $ac_word in
28593	     i?86 | x86_64 | ppc | ppc64)
28594	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
28595		 ac_arch=$ac_word
28596	       else
28597		 ac_cv_c_bigendian=universal
28598		 break
28599	       fi
28600	       ;;
28601	   esac
28602	   ac_prev=
28603	 elif test "x$ac_word" = "x-arch"; then
28604	   ac_prev=arch
28605	 fi
28606       done
28607fi
28608rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28609    if test $ac_cv_c_bigendian = unknown; then
28610      # See if sys/param.h defines the BYTE_ORDER macro.
28611      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28612/* end confdefs.h.  */
28613#include <sys/types.h>
28614	     #include <sys/param.h>
28615
28616int
28617main ()
28618{
28619#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
28620		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
28621		     && LITTLE_ENDIAN)
28622	      bogus endian macros
28623	     #endif
28624
28625  ;
28626  return 0;
28627}
28628_ACEOF
28629if ac_fn_cxx_try_compile "$LINENO"; then :
28630  # It does; now see whether it defined to BIG_ENDIAN or not.
28631	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28632/* end confdefs.h.  */
28633#include <sys/types.h>
28634		#include <sys/param.h>
28635
28636int
28637main ()
28638{
28639#if BYTE_ORDER != BIG_ENDIAN
28640		 not big endian
28641		#endif
28642
28643  ;
28644  return 0;
28645}
28646_ACEOF
28647if ac_fn_cxx_try_compile "$LINENO"; then :
28648  ac_cv_c_bigendian=yes
28649else
28650  ac_cv_c_bigendian=no
28651fi
28652rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28653fi
28654rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28655    fi
28656    if test $ac_cv_c_bigendian = unknown; then
28657      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
28658      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28659/* end confdefs.h.  */
28660#include <limits.h>
28661
28662int
28663main ()
28664{
28665#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
28666	      bogus endian macros
28667	     #endif
28668
28669  ;
28670  return 0;
28671}
28672_ACEOF
28673if ac_fn_cxx_try_compile "$LINENO"; then :
28674  # It does; now see whether it defined to _BIG_ENDIAN or not.
28675	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28676/* end confdefs.h.  */
28677#include <limits.h>
28678
28679int
28680main ()
28681{
28682#ifndef _BIG_ENDIAN
28683		 not big endian
28684		#endif
28685
28686  ;
28687  return 0;
28688}
28689_ACEOF
28690if ac_fn_cxx_try_compile "$LINENO"; then :
28691  ac_cv_c_bigendian=yes
28692else
28693  ac_cv_c_bigendian=no
28694fi
28695rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28696fi
28697rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28698    fi
28699    if test $ac_cv_c_bigendian = unknown; then
28700      # Compile a test program.
28701      if test "$cross_compiling" = yes; then :
28702  # Try to guess by grepping values from an object file.
28703	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28704/* end confdefs.h.  */
28705short int ascii_mm[] =
28706		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
28707		short int ascii_ii[] =
28708		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
28709		int use_ascii (int i) {
28710		  return ascii_mm[i] + ascii_ii[i];
28711		}
28712		short int ebcdic_ii[] =
28713		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
28714		short int ebcdic_mm[] =
28715		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
28716		int use_ebcdic (int i) {
28717		  return ebcdic_mm[i] + ebcdic_ii[i];
28718		}
28719		extern int foo;
28720
28721int
28722main ()
28723{
28724return use_ascii (foo) == use_ebcdic (foo);
28725  ;
28726  return 0;
28727}
28728_ACEOF
28729if ac_fn_cxx_try_compile "$LINENO"; then :
28730  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
28731	      ac_cv_c_bigendian=yes
28732	    fi
28733	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
28734	      if test "$ac_cv_c_bigendian" = unknown; then
28735		ac_cv_c_bigendian=no
28736	      else
28737		# finding both strings is unlikely to happen, but who knows?
28738		ac_cv_c_bigendian=unknown
28739	      fi
28740	    fi
28741fi
28742rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28743else
28744  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28745/* end confdefs.h.  */
28746$ac_includes_default
28747int
28748main ()
28749{
28750
28751	     /* Are we little or big endian?  From Harbison&Steele.  */
28752	     union
28753	     {
28754	       long int l;
28755	       char c[sizeof (long int)];
28756	     } u;
28757	     u.l = 1;
28758	     return u.c[sizeof (long int) - 1] == 1;
28759
28760  ;
28761  return 0;
28762}
28763_ACEOF
28764if ac_fn_cxx_try_run "$LINENO"; then :
28765  ac_cv_c_bigendian=no
28766else
28767  ac_cv_c_bigendian=yes
28768fi
28769rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28770  conftest.$ac_objext conftest.beam conftest.$ac_ext
28771fi
28772
28773    fi
28774fi
28775{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
28776$as_echo "$ac_cv_c_bigendian" >&6; }
28777 case $ac_cv_c_bigendian in #(
28778   yes)
28779     ENDIAN="big";; #(
28780   no)
28781     ENDIAN="little" ;; #(
28782   universal)
28783     ENDIAN="universal_endianness"
28784     ;; #(
28785   *)
28786     ENDIAN="unknown" ;;
28787 esac
28788
28789
28790if test "x$ENDIAN" = xuniversal_endianness; then
28791    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
28792fi
28793if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
28794    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
28795fi
28796
28797
28798# Configure flags for the tools
28799
28800
28801###############################################################################
28802#
28803# How to compile shared libraries.
28804#
28805
28806if test "x$GCC" = xyes; then
28807    COMPILER_NAME=gcc
28808    PICFLAG="-fPIC"
28809    LIBRARY_PREFIX=lib
28810    SHARED_LIBRARY='lib$1.so'
28811    STATIC_LIBRARY='lib$1.a'
28812    SHARED_LIBRARY_FLAGS="-shared"
28813    SHARED_LIBRARY_SUFFIX='.so'
28814    STATIC_LIBRARY_SUFFIX='.a'
28815    OBJ_SUFFIX='.o'
28816    EXE_SUFFIX=''
28817    SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
28818    SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
28819    C_FLAG_REORDER=''
28820    CXX_FLAG_REORDER=''
28821    SET_SHARED_LIBRARY_ORIGIN='-Xlinker -z -Xlinker origin -Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
28822    SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
28823    LD="$CC"
28824    LDEXE="$CC"
28825    LDCXX="$CXX"
28826    LDEXECXX="$CXX"
28827    POST_STRIP_CMD="$STRIP -g"
28828
28829    # Linking is different on MacOSX
28830    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
28831        # Might change in the future to clang.
28832        COMPILER_NAME=gcc
28833        SHARED_LIBRARY='lib$1.dylib'
28834        SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
28835        SHARED_LIBRARY_SUFFIX='.dylib'
28836        EXE_SUFFIX=''
28837        SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
28838        SET_SHARED_LIBRARY_MAPFILE=''
28839        SET_SHARED_LIBRARY_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
28840        SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
28841        POST_STRIP_CMD="$STRIP -S"
28842    fi
28843else
28844    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28845        # If it is not gcc, then assume it is the Oracle Solaris Studio Compiler
28846        COMPILER_NAME=ossc
28847        PICFLAG="-KPIC"
28848        LIBRARY_PREFIX=lib
28849        SHARED_LIBRARY='lib$1.so'
28850        STATIC_LIBRARY='lib$1.a'
28851        SHARED_LIBRARY_FLAGS="-G"
28852        SHARED_LIBRARY_SUFFIX='.so'
28853        STATIC_LIBRARY_SUFFIX='.a'
28854        OBJ_SUFFIX='.o'
28855        EXE_SUFFIX=''
28856        SET_SHARED_LIBRARY_NAME=''
28857        SET_SHARED_LIBRARY_MAPFILE='-M$1'
28858	C_FLAG_REORDER='-xF'
28859	CXX_FLAG_REORDER='-xF'
28860        SET_SHARED_LIBRARY_ORIGIN='-R\$$$$ORIGIN$1'
28861        SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
28862        CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
28863        CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
28864        CFLAGS_JDKLIB_EXTRA='-xstrconst'
28865        POST_STRIP_CMD="$STRIP -x"
28866        POST_MCS_CMD="$MCS -d -a \"JDK $FULL_VERSION\""
28867    fi
28868    if test "x$OPENJDK_TARGET_OS" = xwindows; then
28869        # If it is not gcc, then assume it is the MS Visual Studio compiler
28870        COMPILER_NAME=cl
28871        PICFLAG=""
28872        LIBRARY_PREFIX=
28873        SHARED_LIBRARY='$1.dll'
28874        STATIC_LIBRARY='$1.lib'
28875        SHARED_LIBRARY_FLAGS="-LD"
28876        SHARED_LIBRARY_SUFFIX='.dll'
28877        STATIC_LIBRARY_SUFFIX='.lib'
28878        OBJ_SUFFIX='.obj'
28879        EXE_SUFFIX='.exe'
28880        SET_SHARED_LIBRARY_NAME=''
28881        SET_SHARED_LIBRARY_MAPFILE=''
28882        SET_SHARED_LIBRARY_ORIGIN=''
28883        SET_EXECUTABLE_ORIGIN=''
28884    fi
28885fi
28886
28887
28888
28889
28890
28891
28892
28893
28894
28895
28896
28897
28898
28899
28900
28901
28902
28903
28904
28905# The (cross) compiler is now configured, we can now test capabilities
28906# of the target platform.
28907
28908
28909
28910###############################################################################
28911#
28912# Setup the opt flags for different compilers
28913# and different operating systems.
28914#
28915
28916#
28917# NOTE: check for -mstackrealign needs to be below potential addition of -m32
28918#
28919if test "x$OPENJDK_TARGET_CPU_BITS" = x32 && test "x$OPENJDK_TARGET_OS" = xmacosx; then
28920    # On 32-bit MacOSX the OS requires C-entry points to be 16 byte aligned.
28921    # While waiting for a better solution, the current workaround is to use -mstackrealign.
28922    CFLAGS="$CFLAGS -mstackrealign"
28923    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if 32-bit compiler supports -mstackrealign" >&5
28924$as_echo_n "checking if 32-bit compiler supports -mstackrealign... " >&6; }
28925    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28926/* end confdefs.h.  */
28927int main() { return 0; }
28928_ACEOF
28929if ac_fn_cxx_try_link "$LINENO"; then :
28930
28931		        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
28932$as_echo "yes" >&6; }
28933
28934else
28935
28936		        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28937$as_echo "no" >&6; }
28938	                as_fn_error $? "The selected compiler $CXX does not support -mstackrealign! Try to put another compiler in the path." "$LINENO" 5
28939
28940fi
28941rm -f core conftest.err conftest.$ac_objext \
28942    conftest$ac_exeext conftest.$ac_ext
28943fi
28944
28945C_FLAG_DEPS="-MMD -MF"
28946CXX_FLAG_DEPS="-MMD -MF"
28947
28948case $COMPILER_TYPE in
28949  CC )
28950    case $COMPILER_NAME in
28951      gcc )
28952      	case $OPENJDK_TARGET_OS in
28953	  macosx )
28954	    # On MacOSX we optimize for size, something
28955	    # we should do for all platforms?
28956	    C_O_FLAG_HI="-Os"
28957	    C_O_FLAG_NORM="-Os"
28958	    C_O_FLAG_NONE=""
28959	    ;;
28960	  *)
28961	    C_O_FLAG_HI="-O3"
28962	    C_O_FLAG_NORM="-O2"
28963	    C_O_FLAG_NONE="-O0"
28964	    ;;
28965	esac
28966        CXX_O_FLAG_HI="$C_O_FLAG_HI"
28967        CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
28968        CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
28969        CFLAGS_DEBUG_SYMBOLS="-g"
28970        CXXFLAGS_DEBUG_SYMBOLS="-g"
28971        if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
28972            CFLAGS_DEBUG_SYMBOLS="-g1"
28973            CXXFLAGS_DEBUG_SYMBOLS="-g1"
28974        fi
28975        ;;
28976      ossc )
28977        #
28978        # Forte has different names for this with their C++ compiler...
28979        #
28980        C_FLAG_DEPS="-xMMD -xMF"
28981        CXX_FLAG_DEPS="-xMMD -xMF"
28982
28983        # Extra options used with HIGHEST
28984        #
28985        # WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
28986        #          done with care, there are some assumptions below that need to
28987        #          be understood about the use of pointers, and IEEE behavior.
28988        #
28989        # Use non-standard floating point mode (not IEEE 754)
28990        CC_HIGHEST="$CC_HIGHEST -fns"
28991        # Do some simplification of floating point arithmetic (not IEEE 754)
28992        CC_HIGHEST="$CC_HIGHEST -fsimple"
28993        # Use single precision floating point with 'float'
28994        CC_HIGHEST="$CC_HIGHEST -fsingle"
28995        # Assume memory references via basic pointer types do not alias
28996        #   (Source with excessing pointer casting and data access with mixed
28997        #    pointer types are not recommended)
28998        CC_HIGHEST="$CC_HIGHEST -xalias_level=basic"
28999        # Use intrinsic or inline versions for math/std functions
29000        #   (If you expect perfect errno behavior, do not use this)
29001        CC_HIGHEST="$CC_HIGHEST -xbuiltin=%all"
29002        # Loop data dependency optimizations (need -xO3 or higher)
29003        CC_HIGHEST="$CC_HIGHEST -xdepend"
29004        # Pointer parameters to functions do not overlap
29005        #   (Similar to -xalias_level=basic usage, but less obvious sometimes.
29006        #    If you pass in multiple pointers to the same data, do not use this)
29007        CC_HIGHEST="$CC_HIGHEST -xrestrict"
29008        # Inline some library routines
29009        #   (If you expect perfect errno behavior, do not use this)
29010        CC_HIGHEST="$CC_HIGHEST -xlibmil"
29011        # Use optimized math routines
29012        #   (If you expect perfect errno behavior, do not use this)
29013        #  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
29014        #CC_HIGHEST="$CC_HIGHEST -xlibmopt"
29015
29016        if test "x$OPENJDK_TARGET_CPU" = xsparc; then
29017          CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
29018          CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
29019        fi
29020
29021        case $OPENJDK_TARGET_CPU_ARCH in
29022          x86)
29023            C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xregs=no%frameptr"
29024            C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
29025            C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
29026            C_O_FLAG_NONE="-xregs=no%frameptr"
29027            CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
29028            CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
29029            CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
29030            CXX_O_FLAG_NONE="-xregs=no%frameptr"
29031            if test "x$OPENJDK_TARGET_CPU" = xx86; then
29032               C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
29033               CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
29034            fi
29035            ;;
29036          sparc)
29037            CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
29038            CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
29039            C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
29040            C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
29041            C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
29042            C_O_FLAG_NONE=""
29043            CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
29044            CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
29045            CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
29046            CXX_O_FLAG_NONE=""
29047            ;;
29048        esac
29049
29050    CFLAGS_DEBUG_SYMBOLS="-g -xs"
29051    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
29052    esac
29053    ;;
29054  CL )
29055    C_O_FLAG_HIGHEST="-O2"
29056    C_O_FLAG_HI="-O1"
29057    C_O_FLAG_NORM="-O1"
29058    C_O_FLAG_NONE="-Od"
29059    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
29060    CXX_O_FLAG_HI="$C_O_FLAG_HI"
29061    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
29062    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
29063    ;;
29064esac
29065
29066if test -z "$C_O_FLAG_HIGHEST"; then
29067   C_O_FLAG_HIGHEST="$C_O_FLAG_HI"
29068fi
29069
29070if test -z "$CXX_O_FLAG_HIGHEST"; then
29071   CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HI"
29072fi
29073
29074
29075
29076
29077
29078
29079
29080
29081
29082
29083
29084
29085
29086
29087if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
29088   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
29089$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
29090fi
29091
29092if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
29093   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
29094$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
29095fi
29096
29097if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
29098   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
29099$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
29100fi
29101
29102
29103# Check whether --with-extra-cflags was given.
29104if test "${with_extra_cflags+set}" = set; then :
29105  withval=$with_extra_cflags;
29106fi
29107
29108
29109
29110# Check whether --with-extra-cxxflags was given.
29111if test "${with_extra_cxxflags+set}" = set; then :
29112  withval=$with_extra_cxxflags;
29113fi
29114
29115
29116
29117# Check whether --with-extra-ldflags was given.
29118if test "${with_extra_ldflags+set}" = set; then :
29119  withval=$with_extra_ldflags;
29120fi
29121
29122
29123CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags"
29124CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags"
29125LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags"
29126
29127# Hotspot needs these set in their legacy form
29128LEGACY_EXTRA_CFLAGS=$with_extra_cflags
29129LEGACY_EXTRA_CXXFLAGS=$with_extra_cxxflags
29130LEGACY_EXTRA_LDFLAGS=$with_extra_ldflags
29131
29132
29133
29134
29135
29136###############################################################################
29137#
29138# Now setup the CFLAGS and LDFLAGS for the JDK build.
29139# Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
29140#
29141case $COMPILER_NAME in
29142      gcc )
29143      	  CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -W -Wall -Wno-unused -Wno-parentheses \
29144                          -pipe \
29145                          -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
29146	  case $OPENJDK_TARGET_CPU_ARCH in
29147	  arm )
29148            # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
29149	    CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
29150	  ;;
29151	  ppc )
29152            # on ppc we don't prevent gcc to omit frame pointer nor strict-aliasing
29153	  ;;
29154	  * )
29155	    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -fno-omit-frame-pointer"
29156	    CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
29157          ;;
29158	  esac
29159          ;;
29160      ossc )
29161          CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
29162          case $OPENJDK_TARGET_CPU_ARCH in
29163          x86 )
29164            CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
29165       	    CFLAGS_JDK="$CFLAGS_JDK -erroff=E_BAD_PRAGMA_PACK_VALUE"
29166          ;;
29167          esac
29168
29169      	  CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
29170      	  CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
29171
29172          LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
29173          LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
29174          ;;
29175      cl )
29176          CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
29177               -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB -DWIN32_LEAN_AND_MEAN \
29178	       -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
29179	       -DWIN32 -DIAL"
29180          case $OPENJDK_TARGET_CPU in
29181              x86 )
29182                  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_X86_ -Dx86"
29183                  ;;
29184              x86_64 )
29185                  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_AMD64_ -Damd64"
29186                  ;;
29187          esac
29188          ;;
29189esac
29190
29191###############################################################################
29192
29193# Adjust flags according to debug level.
29194case $DEBUG_LEVEL in
29195      fastdebug )
29196              CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS"
29197              CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS"
29198	      C_O_FLAG_HI="$C_O_FLAG_NORM"
29199	      C_O_FLAG_NORM="$C_O_FLAG_NORM"
29200	      CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
29201	      CXX_O_FLAG_NORM="$CXX_O_FLAG_NORM"
29202              JAVAC_FLAGS="$JAVAC_FLAGS -g"
29203              ;;
29204      slowdebug )
29205              CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS"
29206              CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS"
29207	      C_O_FLAG_HI="$C_O_FLAG_NONE"
29208	      C_O_FLAG_NORM="$C_O_FLAG_NONE"
29209	      CXX_O_FLAG_HI="$CXX_O_FLAG_NONE"
29210	      CXX_O_FLAG_NORM="$CXX_O_FLAG_NONE"
29211              JAVAC_FLAGS="$JAVAC_FLAGS -g"
29212              ;;
29213esac
29214
29215CCXXFLAGS_JDK="$CCXXFLAGS_JDK $ADD_LP64"
29216
29217# The package path is used only on macosx?
29218PACKAGE_PATH=/opt/local
29219
29220
29221if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
29222    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
29223    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
29224    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
29225    #   Note: -Dmacro         is the same as    #define macro 1
29226    #         -Dmacro=	    is the same as    #define macro
29227    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29228        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
29229    else
29230        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
29231    fi
29232else
29233    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_BIG_ENDIAN"
29234fi
29235if test "x$OPENJDK_TARGET_OS" = xlinux; then
29236    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DLINUX"
29237fi
29238if test "x$OPENJDK_TARGET_OS" = xwindows; then
29239    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DWINDOWS"
29240fi
29241if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29242    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DSOLARIS"
29243fi
29244if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29245    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMACOSX -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
29246    # Setting these parameters makes it an error to link to macosx APIs that are
29247    # newer than the given OS version and makes the linked binaries compatible even
29248    # if built on a newer version of the OS.
29249    # The expected format is X.Y.Z
29250    MACOSX_VERSION_MIN=10.7.0
29251
29252    # The macro takes the version with no dots, ex: 1070
29253    # Let the flags variables get resolved in make for easier override on make
29254    # command line.
29255    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
29256    LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
29257fi
29258if test "x$OPENJDK_TARGET_OS" = xbsd; then
29259    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DBSD -D_ALLBSD_SOURCE"
29260fi
29261if test "x$DEBUG_LEVEL" = xrelease; then
29262    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DNDEBUG"
29263    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29264        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DTRIMMED"
29265    fi
29266else
29267    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DDEBUG"
29268fi
29269
29270CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
29271CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DRELEASE='\"$RELEASE\"'"
29272
29273CCXXFLAGS_JDK="$CCXXFLAGS_JDK \
29274        -I${JDK_OUTPUTDIR}/include \
29275        -I${JDK_OUTPUTDIR}/include/$OPENJDK_TARGET_OS \
29276        -I${JDK_TOPDIR}/src/share/javavm/export \
29277        -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/javavm/export \
29278        -I${JDK_TOPDIR}/src/share/native/common \
29279        -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/native/common"
29280
29281# The shared libraries are compiled using the picflag.
29282CFLAGS_JDKLIB="$CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
29283CXXFLAGS_JDKLIB="$CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA "
29284
29285# Executable flags
29286CFLAGS_JDKEXE="$CCXXFLAGS_JDK $CFLAGS_JDK"
29287CXXFLAGS_JDKEXE="$CCXXFLAGS_JDK $CXXFLAGS_JDK"
29288
29289# Now this is odd. The JDK native libraries have to link against libjvm.so
29290# On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
29291# Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
29292# is identical for client and server? Yes. Which is picked at runtime (client or server)?
29293# Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
29294# libraries will link to whatever is in memory. Yuck.
29295#
29296# Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
29297if test "x$COMPILER_NAME" = xcl; then
29298    LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
29299    if test "x$OPENJDK_TARGET_CPU" = xx86; then
29300        LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
29301    fi
29302    # TODO: make -debug optional "--disable-full-debug-symbols"
29303    LDFLAGS_JDK="$LDFLAGS_JDK -debug"
29304    LDFLAGS_JDKLIB="${LDFLAGS_JDK} -dll -libpath:${JDK_OUTPUTDIR}/lib"
29305    LDFLAGS_JDKLIB_SUFFIX=""
29306    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
29307        LDFLAGS_STACK_SIZE=1048576
29308    else
29309        LDFLAGS_STACK_SIZE=327680
29310    fi
29311    LDFLAGS_JDKEXE="${LDFLAGS_JDK} /STACK:$LDFLAGS_STACK_SIZE"
29312else
29313    if test "x$COMPILER_NAME" = xgcc; then
29314        # If this is a --hash-style=gnu system, use --hash-style=both, why?
29315        HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
29316        if test -n "$HAS_GNU_HASH"; then
29317            LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both "
29318        fi
29319        if test "x$OPENJDK_TARGET_OS" = xlinux; then
29320          # And since we now know that the linker is gnu, then add -z defs, to forbid
29321          # undefined symbols in object files.
29322          LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs"
29323          if test "x$DEBUG_LEVEL" = "xrelease"; then
29324              # When building release libraries, tell the linker optimize them.
29325              # Should this be supplied to the OSS linker as well?
29326              LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
29327          fi
29328        fi
29329    fi
29330    LDFLAGS_JDKLIB="${LDFLAGS_JDK} $SHARED_LIBRARY_FLAGS \
29331                    -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}"
29332
29333    # On some platforms (mac) the linker warns about non existing -L dirs.
29334    # Add server first if available. Linking aginst client does not always produce the same results.
29335    # Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
29336    # Default to server for other variants.
29337    if test "x$JVM_VARIANT_SERVER" = xtrue; then
29338        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
29339    elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
29340        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/client"
29341    elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
29342        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
29343    else
29344        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
29345    fi
29346
29347    LDFLAGS_JDKLIB_SUFFIX="-ljava -ljvm"
29348    if test "x$COMPILER_NAME" = xossc; then
29349        LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc"
29350    fi
29351
29352    LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
29353    if test "x$OPENJDK_TARGET_OS" = xlinux; then
29354        LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
29355    fi
29356fi
29357
29358
29359
29360
29361
29362
29363
29364
29365
29366
29367
29368
29369
29370
29371
29372  # Some Zero and Shark settings.
29373  # ZERO_ARCHFLAG tells the compiler which mode to build for
29374  case "${OPENJDK_TARGET_CPU}" in
29375    s390)
29376      ZERO_ARCHFLAG="-m31"
29377      ;;
29378    *)
29379      ZERO_ARCHFLAG="-m${OPENJDK_TARGET_CPU_BITS}"
29380  esac
29381
29382  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$ZERO_ARCHFLAG\"" >&5
29383$as_echo_n "checking if compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
29384  supports=yes
29385
29386  saved_cflags="$CFLAGS"
29387  CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
29388  ac_ext=c
29389ac_cpp='$CPP $CPPFLAGS'
29390ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29391ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29392ac_compiler_gnu=$ac_cv_c_compiler_gnu
29393
29394  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29395/* end confdefs.h.  */
29396
29397    int i;
29398
29399_ACEOF
29400if ac_fn_c_try_compile "$LINENO"; then :
29401
29402else
29403  supports=no
29404fi
29405rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29406  ac_ext=cpp
29407ac_cpp='$CXXCPP $CPPFLAGS'
29408ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29409ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29410ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29411
29412  CFLAGS="$saved_cflags"
29413
29414  saved_cxxflags="$CXXFLAGS"
29415  CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
29416  ac_ext=cpp
29417ac_cpp='$CXXCPP $CPPFLAGS'
29418ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29419ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29420ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29421
29422  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29423/* end confdefs.h.  */
29424
29425    int i;
29426
29427_ACEOF
29428if ac_fn_cxx_try_compile "$LINENO"; then :
29429
29430else
29431  supports=no
29432fi
29433rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29434  ac_ext=cpp
29435ac_cpp='$CXXCPP $CPPFLAGS'
29436ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29437ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29438ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29439
29440  CXXFLAGS="$saved_cxxflags"
29441
29442  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
29443$as_echo "$supports" >&6; }
29444  if test "x$supports" = "xyes" ; then
29445    :
29446  else
29447    ZERO_ARCHFLAG=""
29448  fi
29449
29450
29451
29452  # Check that the compiler supports -mX flags
29453  # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
29454
29455  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"-m${OPENJDK_TARGET_CPU_BITS}\"" >&5
29456$as_echo_n "checking if compiler supports \"-m${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
29457  supports=yes
29458
29459  saved_cflags="$CFLAGS"
29460  CFLAGS="$CFLAGS -m${OPENJDK_TARGET_CPU_BITS}"
29461  ac_ext=c
29462ac_cpp='$CPP $CPPFLAGS'
29463ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29464ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29465ac_compiler_gnu=$ac_cv_c_compiler_gnu
29466
29467  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29468/* end confdefs.h.  */
29469
29470    int i;
29471
29472_ACEOF
29473if ac_fn_c_try_compile "$LINENO"; then :
29474
29475else
29476  supports=no
29477fi
29478rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29479  ac_ext=cpp
29480ac_cpp='$CXXCPP $CPPFLAGS'
29481ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29482ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29483ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29484
29485  CFLAGS="$saved_cflags"
29486
29487  saved_cxxflags="$CXXFLAGS"
29488  CXXFLAGS="$CXXFLAG -m${OPENJDK_TARGET_CPU_BITS}"
29489  ac_ext=cpp
29490ac_cpp='$CXXCPP $CPPFLAGS'
29491ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29492ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29493ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29494
29495  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29496/* end confdefs.h.  */
29497
29498    int i;
29499
29500_ACEOF
29501if ac_fn_cxx_try_compile "$LINENO"; then :
29502
29503else
29504  supports=no
29505fi
29506rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29507  ac_ext=cpp
29508ac_cpp='$CXXCPP $CPPFLAGS'
29509ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29510ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29511ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29512
29513  CXXFLAGS="$saved_cxxflags"
29514
29515  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
29516$as_echo "$supports" >&6; }
29517  if test "x$supports" = "xyes" ; then
29518    COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
29519  else
29520    COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
29521  fi
29522
29523
29524
29525
29526# Setup debug symbols (need objcopy from the toolchain for that)
29527
29528#
29529# ENABLE_DEBUG_SYMBOLS
29530# This must be done after the toolchain is setup, since we're looking at objcopy.
29531#
29532# Check whether --enable-debug-symbols was given.
29533if test "${enable_debug_symbols+set}" = set; then :
29534  enableval=$enable_debug_symbols;
29535fi
29536
29537
29538{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should generate debug symbols" >&5
29539$as_echo_n "checking if we should generate debug symbols... " >&6; }
29540
29541if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then
29542   # explicit enabling of enable-debug-symbols and can't find objcopy
29543   #   this is an error
29544   as_fn_error $? "Unable to find objcopy, cannot enable debug-symbols" "$LINENO" 5
29545fi
29546
29547if test "x$enable_debug_symbols" = "xyes"; then
29548  ENABLE_DEBUG_SYMBOLS=true
29549elif test "x$enable_debug_symbols" = "xno"; then
29550  ENABLE_DEBUG_SYMBOLS=false
29551else
29552  # default on macosx is false
29553  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29554    ENABLE_DEBUG_SYMBOLS=false
29555  # Default is on if objcopy is found, otherwise off
29556  elif test "x$OBJCOPY" != x || test "x$OPENJDK_TARGET_OS" = xwindows; then
29557    ENABLE_DEBUG_SYMBOLS=true
29558  else
29559    ENABLE_DEBUG_SYMBOLS=false
29560  fi
29561fi
29562
29563{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_DEBUG_SYMBOLS" >&5
29564$as_echo "$ENABLE_DEBUG_SYMBOLS" >&6; }
29565
29566#
29567# ZIP_DEBUGINFO_FILES
29568#
29569{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should zip debug-info files" >&5
29570$as_echo_n "checking if we should zip debug-info files... " >&6; }
29571# Check whether --enable-zip-debug-info was given.
29572if test "${enable_zip_debug_info+set}" = set; then :
29573  enableval=$enable_zip_debug_info; enable_zip_debug_info="${enableval}"
29574else
29575  enable_zip_debug_info="yes"
29576fi
29577
29578{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_zip_debug_info}" >&5
29579$as_echo "${enable_zip_debug_info}" >&6; }
29580
29581if test "x${enable_zip_debug_info}" = "xno"; then
29582   ZIP_DEBUGINFO_FILES=false
29583else
29584   ZIP_DEBUGINFO_FILES=true
29585fi
29586
29587
29588
29589
29590
29591
29592
29593###############################################################################
29594#
29595# Check dependencies for external and internal libraries.
29596#
29597###############################################################################
29598
29599
29600
29601###############################################################################
29602#
29603# OS specific settings that we never will need to probe.
29604#
29605if test "x$OPENJDK_TARGET_OS" = xlinux; then
29606    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Linux?" >&5
29607$as_echo_n "checking what is not needed on Linux?... " >&6; }
29608    PULSE_NOT_NEEDED=yes
29609    { $as_echo "$as_me:${as_lineno-$LINENO}: result: pulse" >&5
29610$as_echo "pulse" >&6; }
29611fi
29612
29613if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29614    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Solaris?" >&5
29615$as_echo_n "checking what is not needed on Solaris?... " >&6; }
29616    ALSA_NOT_NEEDED=yes
29617    PULSE_NOT_NEEDED=yes
29618    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
29619$as_echo "alsa pulse" >&6; }
29620fi
29621
29622if test "x$OPENJDK_TARGET_OS" = xwindows; then
29623    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Windows?" >&5
29624$as_echo_n "checking what is not needed on Windows?... " >&6; }
29625    CUPS_NOT_NEEDED=yes
29626    ALSA_NOT_NEEDED=yes
29627    PULSE_NOT_NEEDED=yes
29628    X11_NOT_NEEDED=yes
29629    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa cups pulse x11" >&5
29630$as_echo "alsa cups pulse x11" >&6; }
29631fi
29632
29633if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29634    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on MacOSX?" >&5
29635$as_echo_n "checking what is not needed on MacOSX?... " >&6; }
29636    ALSA_NOT_NEEDED=yes
29637    PULSE_NOT_NEEDED=yes
29638    X11_NOT_NEEDED=yes
29639    FREETYPE2_NOT_NEEDED=yes
29640    # If the java runtime framework is disabled, then we need X11.
29641    # This will be adjusted below.
29642    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse x11" >&5
29643$as_echo "alsa pulse x11" >&6; }
29644fi
29645
29646if test "x$OPENJDK_TARGET_OS" = xbsd; then
29647    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on bsd?" >&5
29648$as_echo_n "checking what is not needed on bsd?... " >&6; }
29649    ALSA_NOT_NEEDED=yes
29650    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa" >&5
29651$as_echo "alsa" >&6; }
29652fi
29653
29654if test "x$OPENJDK" = "xfalse"; then
29655    FREETYPE2_NOT_NEEDED=yes
29656fi
29657
29658if test "x$SUPPORT_HEADFUL" = xno; then
29659    X11_NOT_NEEDED=yes
29660fi
29661
29662###############################################################################
29663#
29664# Check for MacOSX support for OpenJDK. If this exists, try to build a JVM
29665# that uses this API.
29666#
29667# Check whether --enable-macosx-runtime-support was given.
29668if test "${enable_macosx_runtime_support+set}" = set; then :
29669  enableval=$enable_macosx_runtime_support; MACOSX_RUNTIME_SUPPORT="${enableval}"
29670else
29671  MACOSX_RUNTIME_SUPPORT="no"
29672fi
29673
29674
29675USE_MACOSX_RUNTIME_SUPPORT=no
29676{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for explicit Java runtime support in the OS" >&5
29677$as_echo_n "checking for explicit Java runtime support in the OS... " >&6; }
29678if test -f /System/Library/Frameworks/JavaVM.framework/Frameworks/JavaRuntimeSupport.framework/Headers/JavaRuntimeSupport.h; then
29679    if test "x$MACOSX_RUNTIME_SUPPORT" != xno; then
29680        MACOSX_RUNTIME_SUPPORT=yes
29681        USE_MACOSX_RUNTIME_SUPPORT=yes
29682        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, does not need alsa freetype2 pulse and X11" >&5
29683$as_echo "yes, does not need alsa freetype2 pulse and X11" >&6; }
29684    else
29685        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, but explicitly disabled." >&5
29686$as_echo "yes, but explicitly disabled." >&6; }
29687    fi
29688else
29689    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29690$as_echo "no" >&6; }
29691fi
29692
29693if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$USE_MACOSX_RUNTIME_SUPPORT" = xno; then
29694    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on an X11 build on MacOSX?" >&5
29695$as_echo_n "checking what is not needed on an X11 build on MacOSX?... " >&6; }
29696    X11_NOT_NEEDED=
29697    FREETYPE2_NOT_NEEDED=
29698    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
29699$as_echo "alsa pulse" >&6; }
29700fi
29701
29702
29703
29704###############################################################################
29705#
29706# Check for X Windows
29707#
29708
29709# Check if the user has specified sysroot, but not --x-includes or --x-libraries.
29710# Make a simple check for the libraries at the sysroot, and setup --x-includes and
29711# --x-libraries for the sysroot, if that seems to be correct.
29712if test "x$SYS_ROOT" != "x/"; then
29713  if test "x$x_includes" = xNONE; then
29714    if test -f "$SYS_ROOT/usr/X11R6/include/X11/Xlib.h"; then
29715      x_includes="$SYS_ROOT/usr/X11R6/include"
29716    elif test -f "$SYS_ROOT/usr/include/X11/Xlib.h"; then
29717      x_includes="$SYS_ROOT/usr/include"
29718    fi
29719  fi
29720  if test "x$x_libraries" = xNONE; then
29721    if test -f "$SYS_ROOT/usr/X11R6/lib/libX11.so"; then
29722      x_libraries="$SYS_ROOT/usr/X11R6/lib"
29723    elif test "$SYS_ROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
29724      x_libraries="$SYS_ROOT/usr/lib64"
29725    elif test -f "$SYS_ROOT/usr/lib/libX11.so"; then
29726      x_libraries="$SYS_ROOT/usr/lib"
29727    fi
29728  fi
29729fi
29730
29731# Now let autoconf do it's magic
29732{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
29733$as_echo_n "checking for X... " >&6; }
29734
29735
29736# Check whether --with-x was given.
29737if test "${with_x+set}" = set; then :
29738  withval=$with_x;
29739fi
29740
29741# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
29742if test "x$with_x" = xno; then
29743  # The user explicitly disabled X.
29744  have_x=disabled
29745else
29746  case $x_includes,$x_libraries in #(
29747    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
29748    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
29749  $as_echo_n "(cached) " >&6
29750else
29751  # One or both of the vars are not set, and there is no cached value.
29752ac_x_includes=no ac_x_libraries=no
29753rm -f -r conftest.dir
29754if mkdir conftest.dir; then
29755  cd conftest.dir
29756  cat >Imakefile <<'_ACEOF'
29757incroot:
29758	@echo incroot='${INCROOT}'
29759usrlibdir:
29760	@echo usrlibdir='${USRLIBDIR}'
29761libdir:
29762	@echo libdir='${LIBDIR}'
29763_ACEOF
29764  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
29765    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
29766    for ac_var in incroot usrlibdir libdir; do
29767      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
29768    done
29769    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
29770    for ac_extension in a so sl dylib la dll; do
29771      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
29772	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
29773	ac_im_usrlibdir=$ac_im_libdir; break
29774      fi
29775    done
29776    # Screen out bogus values from the imake configuration.  They are
29777    # bogus both because they are the default anyway, and because
29778    # using them would break gcc on systems where it needs fixed includes.
29779    case $ac_im_incroot in
29780	/usr/include) ac_x_includes= ;;
29781	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
29782    esac
29783    case $ac_im_usrlibdir in
29784	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
29785	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
29786    esac
29787  fi
29788  cd ..
29789  rm -f -r conftest.dir
29790fi
29791
29792# Standard set of common directories for X headers.
29793# Check X11 before X11Rn because it is often a symlink to the current release.
29794ac_x_header_dirs='
29795/usr/X11/include
29796/usr/X11R7/include
29797/usr/X11R6/include
29798/usr/X11R5/include
29799/usr/X11R4/include
29800
29801/usr/include/X11
29802/usr/include/X11R7
29803/usr/include/X11R6
29804/usr/include/X11R5
29805/usr/include/X11R4
29806
29807/usr/local/X11/include
29808/usr/local/X11R7/include
29809/usr/local/X11R6/include
29810/usr/local/X11R5/include
29811/usr/local/X11R4/include
29812
29813/usr/local/include/X11
29814/usr/local/include/X11R7
29815/usr/local/include/X11R6
29816/usr/local/include/X11R5
29817/usr/local/include/X11R4
29818
29819/usr/X386/include
29820/usr/x386/include
29821/usr/XFree86/include/X11
29822
29823/usr/include
29824/usr/local/include
29825/usr/unsupported/include
29826/usr/athena/include
29827/usr/local/x11r5/include
29828/usr/lpp/Xamples/include
29829
29830/usr/openwin/include
29831/usr/openwin/share/include'
29832
29833if test "$ac_x_includes" = no; then
29834  # Guess where to find include files, by looking for Xlib.h.
29835  # First, try using that file with no special directory specified.
29836  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29837/* end confdefs.h.  */
29838#include <X11/Xlib.h>
29839_ACEOF
29840if ac_fn_cxx_try_cpp "$LINENO"; then :
29841  # We can compile using X headers with no special include directory.
29842ac_x_includes=
29843else
29844  for ac_dir in $ac_x_header_dirs; do
29845  if test -r "$ac_dir/X11/Xlib.h"; then
29846    ac_x_includes=$ac_dir
29847    break
29848  fi
29849done
29850fi
29851rm -f conftest.err conftest.i conftest.$ac_ext
29852fi # $ac_x_includes = no
29853
29854if test "$ac_x_libraries" = no; then
29855  # Check for the libraries.
29856  # See if we find them without any special options.
29857  # Don't add to $LIBS permanently.
29858  ac_save_LIBS=$LIBS
29859  LIBS="-lX11 $LIBS"
29860  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29861/* end confdefs.h.  */
29862#include <X11/Xlib.h>
29863int
29864main ()
29865{
29866XrmInitialize ()
29867  ;
29868  return 0;
29869}
29870_ACEOF
29871if ac_fn_cxx_try_link "$LINENO"; then :
29872  LIBS=$ac_save_LIBS
29873# We can link X programs with no special library path.
29874ac_x_libraries=
29875else
29876  LIBS=$ac_save_LIBS
29877for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
29878do
29879  # Don't even attempt the hair of trying to link an X program!
29880  for ac_extension in a so sl dylib la dll; do
29881    if test -r "$ac_dir/libX11.$ac_extension"; then
29882      ac_x_libraries=$ac_dir
29883      break 2
29884    fi
29885  done
29886done
29887fi
29888rm -f core conftest.err conftest.$ac_objext \
29889    conftest$ac_exeext conftest.$ac_ext
29890fi # $ac_x_libraries = no
29891
29892case $ac_x_includes,$ac_x_libraries in #(
29893  no,* | *,no | *\'*)
29894    # Didn't find X, or a directory has "'" in its name.
29895    ac_cv_have_x="have_x=no";; #(
29896  *)
29897    # Record where we found X for the cache.
29898    ac_cv_have_x="have_x=yes\
29899	ac_x_includes='$ac_x_includes'\
29900	ac_x_libraries='$ac_x_libraries'"
29901esac
29902fi
29903;; #(
29904    *) have_x=yes;;
29905  esac
29906  eval "$ac_cv_have_x"
29907fi # $with_x != no
29908
29909if test "$have_x" != yes; then
29910  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
29911$as_echo "$have_x" >&6; }
29912  no_x=yes
29913else
29914  # If each of the values was on the command line, it overrides each guess.
29915  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
29916  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
29917  # Update the cache value to reflect the command line values.
29918  ac_cv_have_x="have_x=yes\
29919	ac_x_includes='$x_includes'\
29920	ac_x_libraries='$x_libraries'"
29921  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
29922$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
29923fi
29924
29925if test "$no_x" = yes; then
29926  # Not all programs may use this symbol, but it does not hurt to define it.
29927
29928$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
29929
29930  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
29931else
29932  if test -n "$x_includes"; then
29933    X_CFLAGS="$X_CFLAGS -I$x_includes"
29934  fi
29935
29936  # It would also be nice to do this for all -L options, not just this one.
29937  if test -n "$x_libraries"; then
29938    X_LIBS="$X_LIBS -L$x_libraries"
29939    # For Solaris; some versions of Sun CC require a space after -R and
29940    # others require no space.  Words are not sufficient . . . .
29941    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
29942$as_echo_n "checking whether -R must be followed by a space... " >&6; }
29943    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
29944    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
29945    ac_cxx_werror_flag=yes
29946    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29947/* end confdefs.h.  */
29948
29949int
29950main ()
29951{
29952
29953  ;
29954  return 0;
29955}
29956_ACEOF
29957if ac_fn_cxx_try_link "$LINENO"; then :
29958  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29959$as_echo "no" >&6; }
29960       X_LIBS="$X_LIBS -R$x_libraries"
29961else
29962  LIBS="$ac_xsave_LIBS -R $x_libraries"
29963       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29964/* end confdefs.h.  */
29965
29966int
29967main ()
29968{
29969
29970  ;
29971  return 0;
29972}
29973_ACEOF
29974if ac_fn_cxx_try_link "$LINENO"; then :
29975  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
29976$as_echo "yes" >&6; }
29977	  X_LIBS="$X_LIBS -R $x_libraries"
29978else
29979  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
29980$as_echo "neither works" >&6; }
29981fi
29982rm -f core conftest.err conftest.$ac_objext \
29983    conftest$ac_exeext conftest.$ac_ext
29984fi
29985rm -f core conftest.err conftest.$ac_objext \
29986    conftest$ac_exeext conftest.$ac_ext
29987    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
29988    LIBS=$ac_xsave_LIBS
29989  fi
29990
29991  # Check for system-dependent libraries X programs must link with.
29992  # Do this before checking for the system-independent R6 libraries
29993  # (-lICE), since we may need -lsocket or whatever for X linking.
29994
29995  if test "$ISC" = yes; then
29996    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
29997  else
29998    # Martyn Johnson says this is needed for Ultrix, if the X
29999    # libraries were built with DECnet support.  And Karl Berry says
30000    # the Alpha needs dnet_stub (dnet does not exist).
30001    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
30002    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30003/* end confdefs.h.  */
30004
30005/* Override any GCC internal prototype to avoid an error.
30006   Use char because int might match the return type of a GCC
30007   builtin and then its argument prototype would still apply.  */
30008#ifdef __cplusplus
30009extern "C"
30010#endif
30011char XOpenDisplay ();
30012int
30013main ()
30014{
30015return XOpenDisplay ();
30016  ;
30017  return 0;
30018}
30019_ACEOF
30020if ac_fn_cxx_try_link "$LINENO"; then :
30021
30022else
30023  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
30024$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
30025if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
30026  $as_echo_n "(cached) " >&6
30027else
30028  ac_check_lib_save_LIBS=$LIBS
30029LIBS="-ldnet  $LIBS"
30030cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30031/* end confdefs.h.  */
30032
30033/* Override any GCC internal prototype to avoid an error.
30034   Use char because int might match the return type of a GCC
30035   builtin and then its argument prototype would still apply.  */
30036#ifdef __cplusplus
30037extern "C"
30038#endif
30039char dnet_ntoa ();
30040int
30041main ()
30042{
30043return dnet_ntoa ();
30044  ;
30045  return 0;
30046}
30047_ACEOF
30048if ac_fn_cxx_try_link "$LINENO"; then :
30049  ac_cv_lib_dnet_dnet_ntoa=yes
30050else
30051  ac_cv_lib_dnet_dnet_ntoa=no
30052fi
30053rm -f core conftest.err conftest.$ac_objext \
30054    conftest$ac_exeext conftest.$ac_ext
30055LIBS=$ac_check_lib_save_LIBS
30056fi
30057{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
30058$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
30059if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
30060  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
30061fi
30062
30063    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
30064      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
30065$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
30066if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
30067  $as_echo_n "(cached) " >&6
30068else
30069  ac_check_lib_save_LIBS=$LIBS
30070LIBS="-ldnet_stub  $LIBS"
30071cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30072/* end confdefs.h.  */
30073
30074/* Override any GCC internal prototype to avoid an error.
30075   Use char because int might match the return type of a GCC
30076   builtin and then its argument prototype would still apply.  */
30077#ifdef __cplusplus
30078extern "C"
30079#endif
30080char dnet_ntoa ();
30081int
30082main ()
30083{
30084return dnet_ntoa ();
30085  ;
30086  return 0;
30087}
30088_ACEOF
30089if ac_fn_cxx_try_link "$LINENO"; then :
30090  ac_cv_lib_dnet_stub_dnet_ntoa=yes
30091else
30092  ac_cv_lib_dnet_stub_dnet_ntoa=no
30093fi
30094rm -f core conftest.err conftest.$ac_objext \
30095    conftest$ac_exeext conftest.$ac_ext
30096LIBS=$ac_check_lib_save_LIBS
30097fi
30098{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
30099$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
30100if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
30101  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
30102fi
30103
30104    fi
30105fi
30106rm -f core conftest.err conftest.$ac_objext \
30107    conftest$ac_exeext conftest.$ac_ext
30108    LIBS="$ac_xsave_LIBS"
30109
30110    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
30111    # to get the SysV transport functions.
30112    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
30113    # needs -lnsl.
30114    # The nsl library prevents programs from opening the X display
30115    # on Irix 5.2, according to T.E. Dickey.
30116    # The functions gethostbyname, getservbyname, and inet_addr are
30117    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
30118    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
30119if test "x$ac_cv_func_gethostbyname" = xyes; then :
30120
30121fi
30122
30123    if test $ac_cv_func_gethostbyname = no; then
30124      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
30125$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
30126if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
30127  $as_echo_n "(cached) " >&6
30128else
30129  ac_check_lib_save_LIBS=$LIBS
30130LIBS="-lnsl  $LIBS"
30131cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30132/* end confdefs.h.  */
30133
30134/* Override any GCC internal prototype to avoid an error.
30135   Use char because int might match the return type of a GCC
30136   builtin and then its argument prototype would still apply.  */
30137#ifdef __cplusplus
30138extern "C"
30139#endif
30140char gethostbyname ();
30141int
30142main ()
30143{
30144return gethostbyname ();
30145  ;
30146  return 0;
30147}
30148_ACEOF
30149if ac_fn_cxx_try_link "$LINENO"; then :
30150  ac_cv_lib_nsl_gethostbyname=yes
30151else
30152  ac_cv_lib_nsl_gethostbyname=no
30153fi
30154rm -f core conftest.err conftest.$ac_objext \
30155    conftest$ac_exeext conftest.$ac_ext
30156LIBS=$ac_check_lib_save_LIBS
30157fi
30158{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
30159$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
30160if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
30161  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
30162fi
30163
30164      if test $ac_cv_lib_nsl_gethostbyname = no; then
30165	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
30166$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
30167if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
30168  $as_echo_n "(cached) " >&6
30169else
30170  ac_check_lib_save_LIBS=$LIBS
30171LIBS="-lbsd  $LIBS"
30172cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30173/* end confdefs.h.  */
30174
30175/* Override any GCC internal prototype to avoid an error.
30176   Use char because int might match the return type of a GCC
30177   builtin and then its argument prototype would still apply.  */
30178#ifdef __cplusplus
30179extern "C"
30180#endif
30181char gethostbyname ();
30182int
30183main ()
30184{
30185return gethostbyname ();
30186  ;
30187  return 0;
30188}
30189_ACEOF
30190if ac_fn_cxx_try_link "$LINENO"; then :
30191  ac_cv_lib_bsd_gethostbyname=yes
30192else
30193  ac_cv_lib_bsd_gethostbyname=no
30194fi
30195rm -f core conftest.err conftest.$ac_objext \
30196    conftest$ac_exeext conftest.$ac_ext
30197LIBS=$ac_check_lib_save_LIBS
30198fi
30199{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
30200$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
30201if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
30202  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
30203fi
30204
30205      fi
30206    fi
30207
30208    # lieder@skyler.mavd.honeywell.com says without -lsocket,
30209    # socket/setsockopt and other routines are undefined under SCO ODT
30210    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
30211    # on later versions), says Simon Leinen: it contains gethostby*
30212    # variants that don't use the name server (or something).  -lsocket
30213    # must be given before -lnsl if both are needed.  We assume that
30214    # if connect needs -lnsl, so does gethostbyname.
30215    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
30216if test "x$ac_cv_func_connect" = xyes; then :
30217
30218fi
30219
30220    if test $ac_cv_func_connect = no; then
30221      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
30222$as_echo_n "checking for connect in -lsocket... " >&6; }
30223if ${ac_cv_lib_socket_connect+:} false; then :
30224  $as_echo_n "(cached) " >&6
30225else
30226  ac_check_lib_save_LIBS=$LIBS
30227LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
30228cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30229/* end confdefs.h.  */
30230
30231/* Override any GCC internal prototype to avoid an error.
30232   Use char because int might match the return type of a GCC
30233   builtin and then its argument prototype would still apply.  */
30234#ifdef __cplusplus
30235extern "C"
30236#endif
30237char connect ();
30238int
30239main ()
30240{
30241return connect ();
30242  ;
30243  return 0;
30244}
30245_ACEOF
30246if ac_fn_cxx_try_link "$LINENO"; then :
30247  ac_cv_lib_socket_connect=yes
30248else
30249  ac_cv_lib_socket_connect=no
30250fi
30251rm -f core conftest.err conftest.$ac_objext \
30252    conftest$ac_exeext conftest.$ac_ext
30253LIBS=$ac_check_lib_save_LIBS
30254fi
30255{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
30256$as_echo "$ac_cv_lib_socket_connect" >&6; }
30257if test "x$ac_cv_lib_socket_connect" = xyes; then :
30258  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
30259fi
30260
30261    fi
30262
30263    # Guillermo Gomez says -lposix is necessary on A/UX.
30264    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
30265if test "x$ac_cv_func_remove" = xyes; then :
30266
30267fi
30268
30269    if test $ac_cv_func_remove = no; then
30270      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
30271$as_echo_n "checking for remove in -lposix... " >&6; }
30272if ${ac_cv_lib_posix_remove+:} false; then :
30273  $as_echo_n "(cached) " >&6
30274else
30275  ac_check_lib_save_LIBS=$LIBS
30276LIBS="-lposix  $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 remove ();
30287int
30288main ()
30289{
30290return remove ();
30291  ;
30292  return 0;
30293}
30294_ACEOF
30295if ac_fn_cxx_try_link "$LINENO"; then :
30296  ac_cv_lib_posix_remove=yes
30297else
30298  ac_cv_lib_posix_remove=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_posix_remove" >&5
30305$as_echo "$ac_cv_lib_posix_remove" >&6; }
30306if test "x$ac_cv_lib_posix_remove" = xyes; then :
30307  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
30308fi
30309
30310    fi
30311
30312    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
30313    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
30314if test "x$ac_cv_func_shmat" = xyes; then :
30315
30316fi
30317
30318    if test $ac_cv_func_shmat = no; then
30319      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
30320$as_echo_n "checking for shmat in -lipc... " >&6; }
30321if ${ac_cv_lib_ipc_shmat+:} false; then :
30322  $as_echo_n "(cached) " >&6
30323else
30324  ac_check_lib_save_LIBS=$LIBS
30325LIBS="-lipc  $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 shmat ();
30336int
30337main ()
30338{
30339return shmat ();
30340  ;
30341  return 0;
30342}
30343_ACEOF
30344if ac_fn_cxx_try_link "$LINENO"; then :
30345  ac_cv_lib_ipc_shmat=yes
30346else
30347  ac_cv_lib_ipc_shmat=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_ipc_shmat" >&5
30354$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
30355if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
30356  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
30357fi
30358
30359    fi
30360  fi
30361
30362  # Check for libraries that X11R6 Xt/Xaw programs need.
30363  ac_save_LDFLAGS=$LDFLAGS
30364  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
30365  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
30366  # check for ICE first), but we must link in the order -lSM -lICE or
30367  # we get undefined symbols.  So assume we have SM if we have ICE.
30368  # These have to be linked with before -lX11, unlike the other
30369  # libraries we check for below, so use a different variable.
30370  # John Interrante, Karl Berry
30371  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
30372$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
30373if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
30374  $as_echo_n "(cached) " >&6
30375else
30376  ac_check_lib_save_LIBS=$LIBS
30377LIBS="-lICE $X_EXTRA_LIBS $LIBS"
30378cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30379/* end confdefs.h.  */
30380
30381/* Override any GCC internal prototype to avoid an error.
30382   Use char because int might match the return type of a GCC
30383   builtin and then its argument prototype would still apply.  */
30384#ifdef __cplusplus
30385extern "C"
30386#endif
30387char IceConnectionNumber ();
30388int
30389main ()
30390{
30391return IceConnectionNumber ();
30392  ;
30393  return 0;
30394}
30395_ACEOF
30396if ac_fn_cxx_try_link "$LINENO"; then :
30397  ac_cv_lib_ICE_IceConnectionNumber=yes
30398else
30399  ac_cv_lib_ICE_IceConnectionNumber=no
30400fi
30401rm -f core conftest.err conftest.$ac_objext \
30402    conftest$ac_exeext conftest.$ac_ext
30403LIBS=$ac_check_lib_save_LIBS
30404fi
30405{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
30406$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
30407if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
30408  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
30409fi
30410
30411  LDFLAGS=$ac_save_LDFLAGS
30412
30413fi
30414
30415
30416# AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
30417# this doesn't make sense so we remove it.
30418if test "x$COMPILE_TYPE" = xcross; then
30419  X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
30420fi
30421
30422if test "x$no_x" = xyes && test "x$X11_NOT_NEEDED" != xyes; then
30423
30424    # Print a helpful message on how to acquire the necessary build dependency.
30425    # x11 is the help tag: freetyp2, cups, pulse, alsa etc
30426    MISSING_DEPENDENCY=x11
30427    PKGHANDLER_COMMAND=
30428
30429    case $PKGHANDLER in
30430	apt-get)
30431                apt_help     $MISSING_DEPENDENCY ;;
30432    yum)
30433                yum_help     $MISSING_DEPENDENCY ;;
30434	port)
30435                port_help    $MISSING_DEPENDENCY ;;
30436	pkgutil)
30437                pkgutil_help $MISSING_DEPENDENCY ;;
30438	pkgadd)
30439                pkgadd_help  $MISSING_DEPENDENCY ;;
30440    * )
30441      break ;;
30442    esac
30443
30444    if test "x$PKGHANDLER_COMMAND" != x; then
30445        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30446    fi
30447
30448    as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
30449fi
30450
30451# Some of the old makefiles require a setting of OPENWIN_HOME
30452# Since the X11R6 directory has disappeared on later Linuxes,
30453# we need to probe for it.
30454if test "x$OPENJDK_TARGET_OS" = xlinux; then
30455    if test -d "$SYS_ROOT/usr/X11R6"; then
30456        OPENWIN_HOME="$SYS_ROOT/usr/X11R6"
30457    elif test -d "$SYS_ROOT/usr/include/X11"; then
30458        OPENWIN_HOME="$SYS_ROOT/usr"
30459    fi
30460fi
30461if test "x$OPENJDK_TARGET_OS" = xsolaris; then
30462    OPENWIN_HOME="/usr/openwin"
30463fi
30464
30465
30466
30467#
30468# Weird Sol10 something check...TODO change to try compile
30469#
30470if test "x${OPENJDK_TARGET_OS}" = xsolaris; then
30471  if test "`uname -r`" = "5.10"; then
30472     if test "`${EGREP} -c XLinearGradient ${OPENWIN_HOME}/share/include/X11/extensions/Xrender.h`" = "0"; then
30473     	X_CFLAGS="${X_CFLAGS} -DSOLARIS10_NO_XRENDER_STRUCTS"
30474     fi
30475  fi
30476fi
30477
30478ac_ext=c
30479ac_cpp='$CPP $CPPFLAGS'
30480ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30481ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30482ac_compiler_gnu=$ac_cv_c_compiler_gnu
30483
30484OLD_CFLAGS="$CFLAGS"
30485CFLAGS="$CFLAGS $X_CFLAGS"
30486
30487# Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
30488for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
30489do :
30490  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
30491ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" " # include <X11/Xlib.h>
30492                   # include <X11/Xutil.h>
30493
30494"
30495if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
30496  cat >>confdefs.h <<_ACEOF
30497#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
30498_ACEOF
30499 X11_A_OK=yes
30500else
30501  X11_A_OK=no; break
30502fi
30503
30504done
30505
30506
30507CFLAGS="$OLD_CFLAGS"
30508ac_ext=cpp
30509ac_cpp='$CXXCPP $CPPFLAGS'
30510ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30511ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30512ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30513
30514
30515if test "x$X11_A_OK" = xno && test "x$X11_NOT_NEEDED" != xyes; then
30516
30517    # Print a helpful message on how to acquire the necessary build dependency.
30518    # x11 is the help tag: freetyp2, cups, pulse, alsa etc
30519    MISSING_DEPENDENCY=x11
30520    PKGHANDLER_COMMAND=
30521
30522    case $PKGHANDLER in
30523	apt-get)
30524                apt_help     $MISSING_DEPENDENCY ;;
30525    yum)
30526                yum_help     $MISSING_DEPENDENCY ;;
30527	port)
30528                port_help    $MISSING_DEPENDENCY ;;
30529	pkgutil)
30530                pkgutil_help $MISSING_DEPENDENCY ;;
30531	pkgadd)
30532                pkgadd_help  $MISSING_DEPENDENCY ;;
30533    * )
30534      break ;;
30535    esac
30536
30537    if test "x$PKGHANDLER_COMMAND" != x; then
30538        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30539    fi
30540
30541    as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
30542fi
30543
30544
30545
30546
30547
30548
30549###############################################################################
30550#
30551# The common unix printing system cups is used to print from java.
30552#
30553
30554# Check whether --with-cups was given.
30555if test "${with_cups+set}" = set; then :
30556  withval=$with_cups;
30557fi
30558
30559
30560# Check whether --with-cups-include was given.
30561if test "${with_cups_include+set}" = set; then :
30562  withval=$with_cups_include;
30563fi
30564
30565
30566if test "x$CUPS_NOT_NEEDED" = xyes; then
30567	if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then
30568		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups is ignored" >&5
30569$as_echo "$as_me: WARNING: cups not used, so --with-cups is ignored" >&2;}
30570	fi
30571	CUPS_CFLAGS=
30572else
30573	CUPS_FOUND=no
30574
30575	if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
30576	    as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
30577	fi
30578
30579	if test "x${with_cups}" != x; then
30580	    CUPS_CFLAGS="-I${with_cups}/include"
30581	    CUPS_FOUND=yes
30582	fi
30583	if test "x${with_cups_include}" != x; then
30584	    CUPS_CFLAGS="-I${with_cups_include}"
30585	    CUPS_FOUND=yes
30586	fi
30587	if test "x$CUPS_FOUND" = xno; then
30588
30589
30590    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
30591        # Source the builddeps file again, to make sure it uses the latest variables!
30592        . $builddepsfile
30593        # Look for a target and build machine specific resource!
30594        eval resource=\${builddep_cups_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
30595        if test "x$resource" = x; then
30596            # Ok, lets instead look for a target specific resource
30597            eval resource=\${builddep_cups_TARGET_${rewritten_target_var}}
30598        fi
30599        if test "x$resource" = x; then
30600            # Ok, lets instead look for a build specific resource
30601            eval resource=\${builddep_cups_BUILD_${rewritten_build_var}}
30602        fi
30603        if test "x$resource" = x; then
30604            # Ok, lets instead look for a generic resource
30605            # (The cups comes from M4 and not the shell, thus no need for eval here.)
30606            resource=${builddep_cups}
30607        fi
30608        if test "x$resource" != x; then
30609            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for cups" >&5
30610$as_echo "$as_me: Using builddeps $resource for cups" >&6;}
30611	    # If the resource in the builddeps.conf file is an existing directory,
30612	    # for example /java/linux/cups
30613	    if test -d ${resource}; then
30614	       depdir=${resource}
30615	    else
30616
30617# cups is for example mymodule
30618# $resource is for example libs/general/libmymod_1_2_3.zip
30619# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
30620# $with_builddeps_dir is for example /localhome/builddeps
30621# depdir is the name of the variable into which we store the depdir, eg MYMOD
30622# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
30623# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
30624    filename=`basename $resource`
30625    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
30626    filebase=${filename%%.*}
30627    extension=${filename#*.}
30628    installdir=$with_builddeps_dir/$filebase
30629    if test ! -f $installdir/$filename.unpacked; then
30630        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&5
30631$as_echo "$as_me: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&6;}
30632        if test ! -d $installdir; then
30633            mkdir -p $installdir
30634        fi
30635        if test ! -d $installdir; then
30636            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
30637        fi
30638        tmpfile=`mktemp $installdir/cups.XXXXXXXXX`
30639        touch $tmpfile
30640        if test ! -f $tmpfile; then
30641            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
30642        fi
30643
30644    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
30645    # $tmpfile is the local file name for the downloaded file.
30646    VALID_TOOL=no
30647    if test "x$BDEPS_FTP" = xwget; then
30648       VALID_TOOL=yes
30649       wget -O $tmpfile $with_builddeps_server/$resource
30650    fi
30651    if test "x$BDEPS_FTP" = xlftp; then
30652       VALID_TOOL=yes
30653       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
30654    fi
30655    if test "x$BDEPS_FTP" = xftp; then
30656        VALID_TOOL=yes
30657        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
30658        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
30659        FTPUSERPWD=${FTPSERVER%%@*}
30660        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
30661            FTPUSER=${userpwd%%:*}
30662            FTPPWD=${userpwd#*@}
30663            FTPSERVER=${FTPSERVER#*@}
30664        else
30665            FTPUSER=ftp
30666            FTPPWD=ftp
30667        fi
30668        # the "pass" command does not work on some
30669        # ftp clients (read ftp.exe) but if it works,
30670        # passive mode is better!
30671        (\
30672            echo "user $FTPUSER $FTPPWD"        ;\
30673            echo "pass"                         ;\
30674            echo "bin"                          ;\
30675            echo "get $FTPPATH $tmpfile"              ;\
30676        ) | ftp -in $FTPSERVER
30677    fi
30678    if test "x$VALID_TOOL" != xyes; then
30679       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
30680    fi
30681
30682        mv $tmpfile $installdir/$filename
30683        if test ! -s $installdir/$filename; then
30684            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
30685        fi
30686        case "$extension" in
30687            zip)  echo "Unzipping $installdir/$filename..."
30688               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
30689            ;;
30690            tar.gz) echo "Untaring $installdir/$filename..."
30691               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
30692            ;;
30693            tgz) echo "Untaring $installdir/$filename..."
30694               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
30695            ;;
30696            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
30697            ;;
30698        esac
30699    fi
30700    if test -f $installdir/$filename.unpacked; then
30701        depdir=$installdir
30702    fi
30703
30704	    fi
30705            # Source the builddeps file again, because in the previous command, the depdir
30706            # was updated to point at the current build dependency install directory.
30707            . $builddepsfile
30708            # Now extract variables from the builddeps.conf files.
30709            theroot=${builddep_cups_ROOT}
30710            thecflags=${builddep_cups_CFLAGS}
30711            thelibs=${builddep_cups_LIBS}
30712            if test "x$depdir" = x; then
30713                as_fn_error $? "Could not download build dependency cups" "$LINENO" 5
30714            fi
30715            CUPS=$depdir
30716            if test "x$theroot" != x; then
30717               CUPS="$theroot"
30718            fi
30719            if test "x$thecflags" != x; then
30720               CUPS_CFLAGS="$thecflags"
30721            fi
30722            if test "x$thelibs" != x; then
30723               CUPS_LIBS="$thelibs"
30724            fi
30725            CUPS_FOUND=yes
30726
30727        fi
30728
30729    fi
30730
30731	fi
30732	if test "x$CUPS_FOUND" = xno; then
30733	    # Are the cups headers installed in the default /usr/include location?
30734	    for ac_header in cups/cups.h cups/ppd.h
30735do :
30736  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
30737ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
30738if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
30739  cat >>confdefs.h <<_ACEOF
30740#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
30741_ACEOF
30742 CUPS_FOUND=yes
30743	                      CUPS_CFLAGS=
30744	                      DEFAULT_CUPS=yes
30745fi
30746
30747done
30748
30749	fi
30750	if test "x$CUPS_FOUND" = xno; then
30751	    # Getting nervous now? Lets poke around for standard Solaris third-party
30752	    # package installation locations.
30753	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
30754$as_echo_n "checking for cups headers... " >&6; }
30755	    if test -s /opt/sfw/cups/include/cups/cups.h; then
30756	       # An SFW package seems to be installed!
30757	       CUPS_FOUND=yes
30758	       CUPS_CFLAGS="-I/opt/sfw/cups/include"
30759	    elif test -s /opt/csw/include/cups/cups.h; then
30760	       # A CSW package seems to be installed!
30761	       CUPS_FOUND=yes
30762	       CUPS_CFLAGS="-I/opt/csw/include"
30763	    fi
30764	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
30765$as_echo "$CUPS_FOUND" >&6; }
30766	fi
30767	if test "x$CUPS_FOUND" = xno; then
30768
30769    # Print a helpful message on how to acquire the necessary build dependency.
30770    # cups is the help tag: freetyp2, cups, pulse, alsa etc
30771    MISSING_DEPENDENCY=cups
30772    PKGHANDLER_COMMAND=
30773
30774    case $PKGHANDLER in
30775	apt-get)
30776                apt_help     $MISSING_DEPENDENCY ;;
30777    yum)
30778                yum_help     $MISSING_DEPENDENCY ;;
30779	port)
30780                port_help    $MISSING_DEPENDENCY ;;
30781	pkgutil)
30782                pkgutil_help $MISSING_DEPENDENCY ;;
30783	pkgadd)
30784                pkgadd_help  $MISSING_DEPENDENCY ;;
30785    * )
30786      break ;;
30787    esac
30788
30789    if test "x$PKGHANDLER_COMMAND" != x; then
30790        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30791    fi
30792
30793	    as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
30794	fi
30795fi
30796
30797
30798
30799
30800
30801
30802###############################################################################
30803#
30804# The ubiquitous freetype2 library is used to render fonts.
30805#
30806
30807# Check whether --with-freetype was given.
30808if test "${with_freetype+set}" = set; then :
30809  withval=$with_freetype;
30810fi
30811
30812
30813# If we are using the OS installed system lib for freetype, then we do not need to copy it to the build tree
30814USING_SYSTEM_FT_LIB=false
30815
30816if test "x$FREETYPE2_NOT_NEEDED" = xyes; then
30817	if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
30818		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype is ignored" >&5
30819$as_echo "$as_me: WARNING: freetype not used, so --with-freetype is ignored" >&2;}
30820	fi
30821	FREETYPE2_CFLAGS=
30822	FREETYPE2_LIBS=
30823        FREETYPE2_LIB_PATH=
30824else
30825	FREETYPE2_FOUND=no
30826
30827	if test "x$with_freetype" != x; then
30828
30829  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30830
30831  # Input might be given as Windows format, start by converting to
30832  # unix format.
30833  path="$with_freetype"
30834  new_path=`$CYGPATH -u "$path"`
30835
30836  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30837  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30838  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30839  # "foo.exe" is OK but "foo" is an error.
30840  #
30841  # This test is therefore slightly more accurate than "test -f" to check for file precense.
30842  # It is also a way to make sure we got the proper file name for the real test later on.
30843  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30844  if test "x$test_shortpath" = x; then
30845    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_freetype, which resolves as \"$path\", is invalid." >&5
30846$as_echo "$as_me: The path of with_freetype, which resolves as \"$path\", is invalid." >&6;}
30847    as_fn_error $? "Cannot locate the the path of with_freetype" "$LINENO" 5
30848  fi
30849
30850  # Call helper function which possibly converts this using DOS-style short mode.
30851  # If so, the updated path is stored in $new_path.
30852
30853  input_path="$new_path"
30854  # Check if we need to convert this using DOS-style short mode. If the path
30855  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30856  # take no chances and rewrite it.
30857  # Note: m4 eats our [], so we need to use [ and ] instead.
30858  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30859  if test "x$has_forbidden_chars" != x; then
30860    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30861    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30862    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30863    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30864      # Going to short mode and back again did indeed matter. Since short mode is
30865      # case insensitive, let's make it lowercase to improve readability.
30866      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30867      # Now convert it back to Unix-stile (cygpath)
30868      input_path=`$CYGPATH -u "$shortmode_path"`
30869      new_path="$input_path"
30870    fi
30871  fi
30872
30873  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30874  if test "x$test_cygdrive_prefix" = x; then
30875    # As a simple fix, exclude /usr/bin since it's not a real path.
30876    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30877      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30878      # a path prefixed by /cygdrive for fixpath to work.
30879      new_path="$CYGWIN_ROOT_PATH$input_path"
30880    fi
30881  fi
30882
30883
30884  if test "x$path" != "x$new_path"; then
30885    with_freetype="$new_path"
30886    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_freetype to \"$new_path\"" >&5
30887$as_echo "$as_me: Rewriting with_freetype to \"$new_path\"" >&6;}
30888  fi
30889
30890  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30891
30892  path="$with_freetype"
30893  has_colon=`$ECHO $path | $GREP ^.:`
30894  new_path="$path"
30895  if test "x$has_colon" = x; then
30896    # Not in mixed or Windows style, start by that.
30897    new_path=`cmd //c echo $path`
30898  fi
30899
30900
30901  input_path="$new_path"
30902  # Check if we need to convert this using DOS-style short mode. If the path
30903  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30904  # take no chances and rewrite it.
30905  # Note: m4 eats our [], so we need to use [ and ] instead.
30906  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30907  if test "x$has_forbidden_chars" != x; then
30908    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30909    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30910  fi
30911
30912
30913  windows_path="$new_path"
30914  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30915    unix_path=`$CYGPATH -u "$windows_path"`
30916    new_path="$unix_path"
30917  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30918    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30919    new_path="$unix_path"
30920  fi
30921
30922  if test "x$path" != "x$new_path"; then
30923    with_freetype="$new_path"
30924    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_freetype to \"$new_path\"" >&5
30925$as_echo "$as_me: Rewriting with_freetype to \"$new_path\"" >&6;}
30926  fi
30927
30928  # Save the first 10 bytes of this path to the storage, so fixpath can work.
30929  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30930
30931  else
30932    # We're on a posix platform. Hooray! :)
30933    path="$with_freetype"
30934    has_space=`$ECHO "$path" | $GREP " "`
30935    if test "x$has_space" != x; then
30936      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_freetype, which resolves as \"$path\", is invalid." >&5
30937$as_echo "$as_me: The path of with_freetype, which resolves as \"$path\", is invalid." >&6;}
30938      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30939    fi
30940
30941    # Use eval to expand a potential ~
30942    eval path="$path"
30943    if test ! -f "$path" && test ! -d "$path"; then
30944      as_fn_error $? "The path of with_freetype, which resolves as \"$path\", is not found." "$LINENO" 5
30945    fi
30946
30947    with_freetype="`cd "$path"; $THEPWDCMD -L`"
30948  fi
30949
30950	    FREETYPE2_LIBS="-L$with_freetype/lib -lfreetype"
30951            FREETYPE2_LIB_PATH="$with_freetype/lib"
30952            if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -d "$with_freetype/lib/amd64"; then
30953                FREETYPE2_LIBS="-L$with_freetype/lib/amd64 -lfreetype"
30954                FREETYPE2_LIB_PATH="$with_freetype/lib/amd64"
30955            fi
30956            if test "x$OPENJDK_TARGET_OS" = xwindows; then
30957                FREETYPE2_LIBS="$with_freetype/lib/freetype.lib"
30958            fi
30959	    FREETYPE2_CFLAGS="-I$with_freetype/include"
30960            if test -s $with_freetype/include/ft2build.h && test -d $with_freetype/include/freetype2/freetype; then
30961                FREETYPE2_CFLAGS="-I$with_freetype/include/freetype2 -I$with_freetype/include"
30962            fi
30963 	    FREETYPE2_FOUND=yes
30964   	    if test "x$FREETYPE2_FOUND" = xyes; then
30965	        # Verify that the directories exist
30966                if ! test -d "$with_freetype/lib" || ! test -d "$with_freetype/include"; then
30967		   as_fn_error $? "Could not find the expected directories $with_freetype/lib and $with_freetype/include" "$LINENO" 5
30968		fi
30969	        # List the contents of the lib.
30970		FREETYPELIB=`ls $with_freetype/lib/libfreetype.so $with_freetype/lib/freetype.dll 2> /dev/null`
30971                if test "x$FREETYPELIB" = x; then
30972		   as_fn_error $? "Could not find libfreetype.so nor freetype.dll in $with_freetype/lib" "$LINENO" 5
30973		fi
30974	        # Check one h-file
30975                if ! test -s "$with_freetype/include/ft2build.h"; then
30976		   as_fn_error $? "Could not find $with_freetype/include/ft2build.h" "$LINENO" 5
30977		fi
30978            fi
30979        fi
30980	if test "x$FREETYPE2_FOUND" = xno; then
30981
30982
30983    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
30984        # Source the builddeps file again, to make sure it uses the latest variables!
30985        . $builddepsfile
30986        # Look for a target and build machine specific resource!
30987        eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
30988        if test "x$resource" = x; then
30989            # Ok, lets instead look for a target specific resource
30990            eval resource=\${builddep_freetype2_TARGET_${rewritten_target_var}}
30991        fi
30992        if test "x$resource" = x; then
30993            # Ok, lets instead look for a build specific resource
30994            eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}}
30995        fi
30996        if test "x$resource" = x; then
30997            # Ok, lets instead look for a generic resource
30998            # (The freetype2 comes from M4 and not the shell, thus no need for eval here.)
30999            resource=${builddep_freetype2}
31000        fi
31001        if test "x$resource" != x; then
31002            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for freetype2" >&5
31003$as_echo "$as_me: Using builddeps $resource for freetype2" >&6;}
31004	    # If the resource in the builddeps.conf file is an existing directory,
31005	    # for example /java/linux/cups
31006	    if test -d ${resource}; then
31007	       depdir=${resource}
31008	    else
31009
31010# freetype2 is for example mymodule
31011# $resource is for example libs/general/libmymod_1_2_3.zip
31012# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
31013# $with_builddeps_dir is for example /localhome/builddeps
31014# depdir is the name of the variable into which we store the depdir, eg MYMOD
31015# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
31016# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
31017    filename=`basename $resource`
31018    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
31019    filebase=${filename%%.*}
31020    extension=${filename#*.}
31021    installdir=$with_builddeps_dir/$filebase
31022    if test ! -f $installdir/$filename.unpacked; then
31023        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&5
31024$as_echo "$as_me: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&6;}
31025        if test ! -d $installdir; then
31026            mkdir -p $installdir
31027        fi
31028        if test ! -d $installdir; then
31029            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
31030        fi
31031        tmpfile=`mktemp $installdir/freetype2.XXXXXXXXX`
31032        touch $tmpfile
31033        if test ! -f $tmpfile; then
31034            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
31035        fi
31036
31037    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
31038    # $tmpfile is the local file name for the downloaded file.
31039    VALID_TOOL=no
31040    if test "x$BDEPS_FTP" = xwget; then
31041       VALID_TOOL=yes
31042       wget -O $tmpfile $with_builddeps_server/$resource
31043    fi
31044    if test "x$BDEPS_FTP" = xlftp; then
31045       VALID_TOOL=yes
31046       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
31047    fi
31048    if test "x$BDEPS_FTP" = xftp; then
31049        VALID_TOOL=yes
31050        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
31051        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
31052        FTPUSERPWD=${FTPSERVER%%@*}
31053        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
31054            FTPUSER=${userpwd%%:*}
31055            FTPPWD=${userpwd#*@}
31056            FTPSERVER=${FTPSERVER#*@}
31057        else
31058            FTPUSER=ftp
31059            FTPPWD=ftp
31060        fi
31061        # the "pass" command does not work on some
31062        # ftp clients (read ftp.exe) but if it works,
31063        # passive mode is better!
31064        (\
31065            echo "user $FTPUSER $FTPPWD"        ;\
31066            echo "pass"                         ;\
31067            echo "bin"                          ;\
31068            echo "get $FTPPATH $tmpfile"              ;\
31069        ) | ftp -in $FTPSERVER
31070    fi
31071    if test "x$VALID_TOOL" != xyes; then
31072       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
31073    fi
31074
31075        mv $tmpfile $installdir/$filename
31076        if test ! -s $installdir/$filename; then
31077            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
31078        fi
31079        case "$extension" in
31080            zip)  echo "Unzipping $installdir/$filename..."
31081               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
31082            ;;
31083            tar.gz) echo "Untaring $installdir/$filename..."
31084               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31085            ;;
31086            tgz) echo "Untaring $installdir/$filename..."
31087               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31088            ;;
31089            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
31090            ;;
31091        esac
31092    fi
31093    if test -f $installdir/$filename.unpacked; then
31094        depdir=$installdir
31095    fi
31096
31097	    fi
31098            # Source the builddeps file again, because in the previous command, the depdir
31099            # was updated to point at the current build dependency install directory.
31100            . $builddepsfile
31101            # Now extract variables from the builddeps.conf files.
31102            theroot=${builddep_freetype2_ROOT}
31103            thecflags=${builddep_freetype2_CFLAGS}
31104            thelibs=${builddep_freetype2_LIBS}
31105            if test "x$depdir" = x; then
31106                as_fn_error $? "Could not download build dependency freetype2" "$LINENO" 5
31107            fi
31108            FREETYPE2=$depdir
31109            if test "x$theroot" != x; then
31110               FREETYPE2="$theroot"
31111            fi
31112            if test "x$thecflags" != x; then
31113               FREETYPE2_CFLAGS="$thecflags"
31114            fi
31115            if test "x$thelibs" != x; then
31116               FREETYPE2_LIBS="$thelibs"
31117            fi
31118            FREETYPE2_FOUND=yes
31119            else FREETYPE2_FOUND=no
31120
31121        fi
31122        else FREETYPE2_FOUND=no
31123
31124    fi
31125
31126            USING_SYSTEM_FT_LIB=true
31127	fi
31128	if test "x$FREETYPE2_FOUND" = xno && test "x$OPENJDK_TARGET_OS" = xwindows; then
31129            FREETYPELOCATION="$PROGRAMFILES/GnuWin32"
31130
31131  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31132
31133  # Input might be given as Windows format, start by converting to
31134  # unix format.
31135  path="$FREETYPELOCATION"
31136  new_path=`$CYGPATH -u "$path"`
31137
31138  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31139  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31140  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31141  # "foo.exe" is OK but "foo" is an error.
31142  #
31143  # This test is therefore slightly more accurate than "test -f" to check for file precense.
31144  # It is also a way to make sure we got the proper file name for the real test later on.
31145  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31146  if test "x$test_shortpath" = x; then
31147    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&5
31148$as_echo "$as_me: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&6;}
31149    as_fn_error $? "Cannot locate the the path of FREETYPELOCATION" "$LINENO" 5
31150  fi
31151
31152  # Call helper function which possibly converts this using DOS-style short mode.
31153  # If so, the updated path is stored in $new_path.
31154
31155  input_path="$new_path"
31156  # Check if we need to convert this using DOS-style short mode. If the path
31157  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31158  # take no chances and rewrite it.
31159  # Note: m4 eats our [], so we need to use [ and ] instead.
31160  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31161  if test "x$has_forbidden_chars" != x; then
31162    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31163    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31164    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31165    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31166      # Going to short mode and back again did indeed matter. Since short mode is
31167      # case insensitive, let's make it lowercase to improve readability.
31168      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31169      # Now convert it back to Unix-stile (cygpath)
31170      input_path=`$CYGPATH -u "$shortmode_path"`
31171      new_path="$input_path"
31172    fi
31173  fi
31174
31175  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31176  if test "x$test_cygdrive_prefix" = x; then
31177    # As a simple fix, exclude /usr/bin since it's not a real path.
31178    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31179      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31180      # a path prefixed by /cygdrive for fixpath to work.
31181      new_path="$CYGWIN_ROOT_PATH$input_path"
31182    fi
31183  fi
31184
31185
31186  if test "x$path" != "x$new_path"; then
31187    FREETYPELOCATION="$new_path"
31188    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPELOCATION to \"$new_path\"" >&5
31189$as_echo "$as_me: Rewriting FREETYPELOCATION to \"$new_path\"" >&6;}
31190  fi
31191
31192  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31193
31194  path="$FREETYPELOCATION"
31195  has_colon=`$ECHO $path | $GREP ^.:`
31196  new_path="$path"
31197  if test "x$has_colon" = x; then
31198    # Not in mixed or Windows style, start by that.
31199    new_path=`cmd //c echo $path`
31200  fi
31201
31202
31203  input_path="$new_path"
31204  # Check if we need to convert this using DOS-style short mode. If the path
31205  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31206  # take no chances and rewrite it.
31207  # Note: m4 eats our [], so we need to use [ and ] instead.
31208  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31209  if test "x$has_forbidden_chars" != x; then
31210    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31211    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31212  fi
31213
31214
31215  windows_path="$new_path"
31216  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31217    unix_path=`$CYGPATH -u "$windows_path"`
31218    new_path="$unix_path"
31219  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31220    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31221    new_path="$unix_path"
31222  fi
31223
31224  if test "x$path" != "x$new_path"; then
31225    FREETYPELOCATION="$new_path"
31226    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPELOCATION to \"$new_path\"" >&5
31227$as_echo "$as_me: Rewriting FREETYPELOCATION to \"$new_path\"" >&6;}
31228  fi
31229
31230  # Save the first 10 bytes of this path to the storage, so fixpath can work.
31231  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31232
31233  else
31234    # We're on a posix platform. Hooray! :)
31235    path="$FREETYPELOCATION"
31236    has_space=`$ECHO "$path" | $GREP " "`
31237    if test "x$has_space" != x; then
31238      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&5
31239$as_echo "$as_me: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&6;}
31240      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31241    fi
31242
31243    # Use eval to expand a potential ~
31244    eval path="$path"
31245    if test ! -f "$path" && test ! -d "$path"; then
31246      as_fn_error $? "The path of FREETYPELOCATION, which resolves as \"$path\", is not found." "$LINENO" 5
31247    fi
31248
31249    FREETYPELOCATION="`cd "$path"; $THEPWDCMD -L`"
31250  fi
31251
31252	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype in some standard windows locations" >&5
31253$as_echo_n "checking for freetype in some standard windows locations... " >&6; }
31254	    if test -s "$FREETYPELOCATION/include/ft2build.h" && test -d "$FREETYPELOCATION/include/freetype2/freetype"; then
31255	        FREETYPE2_CFLAGS="-I$FREETYPELOCATION/include/freetype2 -I$FREETYPELOCATION/include"
31256	        FREETYPE2_LIBS="$FREETYPELOCATION/lib/freetype.lib"
31257 	        FREETYPE2_LIB_PATH="$FREETYPELOCATION/lib"
31258                if ! test -s "$FREETYPE2_LIBS"; then
31259		   as_fn_error $? "Could not find $FREETYPE2_LIBS" "$LINENO" 5
31260		fi
31261                if ! test -s "$FREETYPE2_LIB_PATH/freetype.dll"; then
31262		   as_fn_error $? "Could not find $FREETYPE2_LIB_PATH/freetype.dll" "$LINENO" 5
31263		fi
31264                USING_SYSTEM_FT_LIB=true
31265                FREETYPE2_FOUND=yes
31266	    fi
31267	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE2_FOUND" >&5
31268$as_echo "$FREETYPE2_FOUND" >&6; }
31269        fi
31270	if test "x$FREETYPE2_FOUND" = xno; then
31271
31272pkg_failed=no
31273{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE2" >&5
31274$as_echo_n "checking for FREETYPE2... " >&6; }
31275
31276if test -n "$FREETYPE2_CFLAGS"; then
31277    pkg_cv_FREETYPE2_CFLAGS="$FREETYPE2_CFLAGS"
31278 elif test -n "$PKG_CONFIG"; then
31279    if test -n "$PKG_CONFIG" && \
31280    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
31281  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
31282  ac_status=$?
31283  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31284  test $ac_status = 0; }; then
31285  pkg_cv_FREETYPE2_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
31286else
31287  pkg_failed=yes
31288fi
31289 else
31290    pkg_failed=untried
31291fi
31292if test -n "$FREETYPE2_LIBS"; then
31293    pkg_cv_FREETYPE2_LIBS="$FREETYPE2_LIBS"
31294 elif test -n "$PKG_CONFIG"; then
31295    if test -n "$PKG_CONFIG" && \
31296    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
31297  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
31298  ac_status=$?
31299  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31300  test $ac_status = 0; }; then
31301  pkg_cv_FREETYPE2_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
31302else
31303  pkg_failed=yes
31304fi
31305 else
31306    pkg_failed=untried
31307fi
31308
31309
31310
31311if test $pkg_failed = yes; then
31312
31313if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
31314        _pkg_short_errors_supported=yes
31315else
31316        _pkg_short_errors_supported=no
31317fi
31318        if test $_pkg_short_errors_supported = yes; then
31319	        FREETYPE2_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
31320        else
31321	        FREETYPE2_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
31322        fi
31323	# Put the nasty error message in config.log where it belongs
31324	echo "$FREETYPE2_PKG_ERRORS" >&5
31325
31326	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31327$as_echo "no" >&6; }
31328                FREETYPE2_FOUND=no
31329elif test $pkg_failed = untried; then
31330	FREETYPE2_FOUND=no
31331else
31332	FREETYPE2_CFLAGS=$pkg_cv_FREETYPE2_CFLAGS
31333	FREETYPE2_LIBS=$pkg_cv_FREETYPE2_LIBS
31334        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31335$as_echo "yes" >&6; }
31336	FREETYPE2_FOUND=yes
31337fi
31338            # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
31339            FREETYPE2_LIBS=`$ECHO $FREETYPE2_LIBS | $SED 's/-lz//g'`
31340            USING_SYSTEM_FT_LIB=true
31341            # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
31342            if test "x$FREETYPE2_FOUND" = xyes && test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
31343              FREETYPE2_LIBS=`$ECHO $FREETYPE2_LIBS | $SED 's?/lib?/lib/amd64?g'`
31344            fi
31345	fi
31346	if test "x$FREETYPE2_FOUND" = xno; then
31347	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype in some standard locations" >&5
31348$as_echo_n "checking for freetype in some standard locations... " >&6; }
31349
31350	    if test -s $SYS_ROOT/usr/X11/include/ft2build.h && test -d $SYS_ROOT/usr/X11/include/freetype2/freetype; then
31351	        DEFAULT_FREETYPE_CFLAGS="-I$SYS_ROOT/usr/X11/include/freetype2 -I$SYS_ROOT/usr/X11/include"
31352	        DEFAULT_FREETYPE_LIBS="-L$SYS_ROOT/usr/X11/lib -lfreetype"
31353	    fi
31354	    if test -s $SYS_ROOT/usr/include/ft2build.h && test -d $SYS_ROOT/usr/include/freetype2/freetype; then
31355	        DEFAULT_FREETYPE_CFLAGS="-I$SYS_ROOT/usr/include/freetype2"
31356	        DEFAULT_FREETYPE_LIBS="-lfreetype"
31357	    fi
31358
31359	    PREV_CXXCFLAGS="$CXXFLAGS"
31360	    PREV_LDFLAGS="$LDFLAGS"
31361	    CXXFLAGS="$CXXFLAGS $DEFAULT_FREETYPE_CFLAGS"
31362	    LDFLAGS="$LDFLAGS $DEFAULT_FREETYPE_LIBS"
31363	    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31364/* end confdefs.h.  */
31365#include<ft2build.h>
31366	                    #include FT_FREETYPE_H
31367	                   int main() { return 0; }
31368
31369_ACEOF
31370if ac_fn_cxx_try_link "$LINENO"; then :
31371
31372	                      # Yes, the default cflags and libs did the trick.
31373	                      FREETYPE2_FOUND=yes
31374	                      FREETYPE2_CFLAGS="$DEFAULT_FREETYPE_CFLAGS"
31375	                      FREETYPE2_LIBS="$DEFAULT_FREETYPE_LIBS"
31376
31377else
31378
31379	                      FREETYPE2_FOUND=no
31380
31381fi
31382rm -f core conftest.err conftest.$ac_objext \
31383    conftest$ac_exeext conftest.$ac_ext
31384            CXXCFLAGS="$PREV_CXXFLAGS"
31385	    LDFLAGS="$PREV_LDFLAGS"
31386	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE2_FOUND" >&5
31387$as_echo "$FREETYPE2_FOUND" >&6; }
31388            USING_SYSTEM_FT_LIB=true
31389	fi
31390	if test "x$FREETYPE2_FOUND" = xno; then
31391
31392    # Print a helpful message on how to acquire the necessary build dependency.
31393    # freetype2 is the help tag: freetyp2, cups, pulse, alsa etc
31394    MISSING_DEPENDENCY=freetype2
31395    PKGHANDLER_COMMAND=
31396
31397    case $PKGHANDLER in
31398	apt-get)
31399                apt_help     $MISSING_DEPENDENCY ;;
31400    yum)
31401                yum_help     $MISSING_DEPENDENCY ;;
31402	port)
31403                port_help    $MISSING_DEPENDENCY ;;
31404	pkgutil)
31405                pkgutil_help $MISSING_DEPENDENCY ;;
31406	pkgadd)
31407                pkgadd_help  $MISSING_DEPENDENCY ;;
31408    * )
31409      break ;;
31410    esac
31411
31412    if test "x$PKGHANDLER_COMMAND" != x; then
31413        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
31414    fi
31415
31416		as_fn_error $? "Could not find freetype2! $HELP_MSG " "$LINENO" 5
31417	fi
31418
31419        if test "x$OPENJDK_TARGET_OS" != xwindows; then
31420            # AC_CHECK_LIB does not support use of cl.exe
31421            PREV_LDFLAGS="$LDFLAGS"
31422            LDFLAGS="$FREETYPE2_LIBS"
31423            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FT_Init_FreeType in -lfreetype" >&5
31424$as_echo_n "checking for FT_Init_FreeType in -lfreetype... " >&6; }
31425if ${ac_cv_lib_freetype_FT_Init_FreeType+:} false; then :
31426  $as_echo_n "(cached) " >&6
31427else
31428  ac_check_lib_save_LIBS=$LIBS
31429LIBS="-lfreetype  $LIBS"
31430cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31431/* end confdefs.h.  */
31432
31433/* Override any GCC internal prototype to avoid an error.
31434   Use char because int might match the return type of a GCC
31435   builtin and then its argument prototype would still apply.  */
31436#ifdef __cplusplus
31437extern "C"
31438#endif
31439char FT_Init_FreeType ();
31440int
31441main ()
31442{
31443return FT_Init_FreeType ();
31444  ;
31445  return 0;
31446}
31447_ACEOF
31448if ac_fn_cxx_try_link "$LINENO"; then :
31449  ac_cv_lib_freetype_FT_Init_FreeType=yes
31450else
31451  ac_cv_lib_freetype_FT_Init_FreeType=no
31452fi
31453rm -f core conftest.err conftest.$ac_objext \
31454    conftest$ac_exeext conftest.$ac_ext
31455LIBS=$ac_check_lib_save_LIBS
31456fi
31457{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_freetype_FT_Init_FreeType" >&5
31458$as_echo "$ac_cv_lib_freetype_FT_Init_FreeType" >&6; }
31459if test "x$ac_cv_lib_freetype_FT_Init_FreeType" = xyes; then :
31460  FREETYPE2_FOUND=true
31461else
31462  as_fn_error $? "Could not find freetype2! $HELP_MSG " "$LINENO" 5
31463fi
31464
31465            LDFLAGS="$PREV_LDFLAGS"
31466        fi
31467fi
31468
31469
31470
31471
31472
31473
31474
31475
31476
31477###############################################################################
31478#
31479# Check for alsa headers and libraries. Used on Linux/GNU systems.
31480#
31481
31482# Check whether --with-alsa was given.
31483if test "${with_alsa+set}" = set; then :
31484  withval=$with_alsa;
31485fi
31486
31487
31488# Check whether --with-alsa-include was given.
31489if test "${with_alsa_include+set}" = set; then :
31490  withval=$with_alsa_include;
31491fi
31492
31493
31494# Check whether --with-alsa-lib was given.
31495if test "${with_alsa_lib+set}" = set; then :
31496  withval=$with_alsa_lib;
31497fi
31498
31499
31500if test "x$ALSA_NOT_NEEDED" = xyes; then
31501	if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then
31502		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa is ignored" >&5
31503$as_echo "$as_me: WARNING: alsa not used, so --with-alsa is ignored" >&2;}
31504	fi
31505	ALSA_CFLAGS=
31506	ALSA_LIBS=
31507else
31508	ALSA_FOUND=no
31509
31510	if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
31511	    as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
31512	fi
31513
31514	if test "x${with_alsa}" != x; then
31515	    ALSA_LIBS="-L${with_alsa}/lib -lalsa"
31516	    ALSA_CFLAGS="-I${with_alsa}/include"
31517	    ALSA_FOUND=yes
31518	fi
31519	if test "x${with_alsa_include}" != x; then
31520	    ALSA_CFLAGS="-I${with_alsa_include}"
31521	    ALSA_FOUND=yes
31522	fi
31523	if test "x${with_alsa_lib}" != x; then
31524	    ALSA_LIBS="-L${with_alsa_lib} -lalsa"
31525	    ALSA_FOUND=yes
31526	fi
31527	if test "x$ALSA_FOUND" = xno; then
31528
31529
31530    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
31531        # Source the builddeps file again, to make sure it uses the latest variables!
31532        . $builddepsfile
31533        # Look for a target and build machine specific resource!
31534        eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
31535        if test "x$resource" = x; then
31536            # Ok, lets instead look for a target specific resource
31537            eval resource=\${builddep_alsa_TARGET_${rewritten_target_var}}
31538        fi
31539        if test "x$resource" = x; then
31540            # Ok, lets instead look for a build specific resource
31541            eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}}
31542        fi
31543        if test "x$resource" = x; then
31544            # Ok, lets instead look for a generic resource
31545            # (The alsa comes from M4 and not the shell, thus no need for eval here.)
31546            resource=${builddep_alsa}
31547        fi
31548        if test "x$resource" != x; then
31549            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for alsa" >&5
31550$as_echo "$as_me: Using builddeps $resource for alsa" >&6;}
31551	    # If the resource in the builddeps.conf file is an existing directory,
31552	    # for example /java/linux/cups
31553	    if test -d ${resource}; then
31554	       depdir=${resource}
31555	    else
31556
31557# alsa is for example mymodule
31558# $resource is for example libs/general/libmymod_1_2_3.zip
31559# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
31560# $with_builddeps_dir is for example /localhome/builddeps
31561# depdir is the name of the variable into which we store the depdir, eg MYMOD
31562# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
31563# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
31564    filename=`basename $resource`
31565    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
31566    filebase=${filename%%.*}
31567    extension=${filename#*.}
31568    installdir=$with_builddeps_dir/$filebase
31569    if test ! -f $installdir/$filename.unpacked; then
31570        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&5
31571$as_echo "$as_me: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&6;}
31572        if test ! -d $installdir; then
31573            mkdir -p $installdir
31574        fi
31575        if test ! -d $installdir; then
31576            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
31577        fi
31578        tmpfile=`mktemp $installdir/alsa.XXXXXXXXX`
31579        touch $tmpfile
31580        if test ! -f $tmpfile; then
31581            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
31582        fi
31583
31584    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
31585    # $tmpfile is the local file name for the downloaded file.
31586    VALID_TOOL=no
31587    if test "x$BDEPS_FTP" = xwget; then
31588       VALID_TOOL=yes
31589       wget -O $tmpfile $with_builddeps_server/$resource
31590    fi
31591    if test "x$BDEPS_FTP" = xlftp; then
31592       VALID_TOOL=yes
31593       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
31594    fi
31595    if test "x$BDEPS_FTP" = xftp; then
31596        VALID_TOOL=yes
31597        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
31598        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
31599        FTPUSERPWD=${FTPSERVER%%@*}
31600        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
31601            FTPUSER=${userpwd%%:*}
31602            FTPPWD=${userpwd#*@}
31603            FTPSERVER=${FTPSERVER#*@}
31604        else
31605            FTPUSER=ftp
31606            FTPPWD=ftp
31607        fi
31608        # the "pass" command does not work on some
31609        # ftp clients (read ftp.exe) but if it works,
31610        # passive mode is better!
31611        (\
31612            echo "user $FTPUSER $FTPPWD"        ;\
31613            echo "pass"                         ;\
31614            echo "bin"                          ;\
31615            echo "get $FTPPATH $tmpfile"              ;\
31616        ) | ftp -in $FTPSERVER
31617    fi
31618    if test "x$VALID_TOOL" != xyes; then
31619       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
31620    fi
31621
31622        mv $tmpfile $installdir/$filename
31623        if test ! -s $installdir/$filename; then
31624            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
31625        fi
31626        case "$extension" in
31627            zip)  echo "Unzipping $installdir/$filename..."
31628               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
31629            ;;
31630            tar.gz) echo "Untaring $installdir/$filename..."
31631               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31632            ;;
31633            tgz) echo "Untaring $installdir/$filename..."
31634               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31635            ;;
31636            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
31637            ;;
31638        esac
31639    fi
31640    if test -f $installdir/$filename.unpacked; then
31641        depdir=$installdir
31642    fi
31643
31644	    fi
31645            # Source the builddeps file again, because in the previous command, the depdir
31646            # was updated to point at the current build dependency install directory.
31647            . $builddepsfile
31648            # Now extract variables from the builddeps.conf files.
31649            theroot=${builddep_alsa_ROOT}
31650            thecflags=${builddep_alsa_CFLAGS}
31651            thelibs=${builddep_alsa_LIBS}
31652            if test "x$depdir" = x; then
31653                as_fn_error $? "Could not download build dependency alsa" "$LINENO" 5
31654            fi
31655            ALSA=$depdir
31656            if test "x$theroot" != x; then
31657               ALSA="$theroot"
31658            fi
31659            if test "x$thecflags" != x; then
31660               ALSA_CFLAGS="$thecflags"
31661            fi
31662            if test "x$thelibs" != x; then
31663               ALSA_LIBS="$thelibs"
31664            fi
31665            ALSA_FOUND=yes
31666            else ALSA_FOUND=no
31667
31668        fi
31669        else ALSA_FOUND=no
31670
31671    fi
31672
31673	fi
31674	if test "x$ALSA_FOUND" = xno; then
31675
31676pkg_failed=no
31677{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
31678$as_echo_n "checking for ALSA... " >&6; }
31679
31680if test -n "$ALSA_CFLAGS"; then
31681    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
31682 elif test -n "$PKG_CONFIG"; then
31683    if test -n "$PKG_CONFIG" && \
31684    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
31685  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
31686  ac_status=$?
31687  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31688  test $ac_status = 0; }; then
31689  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
31690else
31691  pkg_failed=yes
31692fi
31693 else
31694    pkg_failed=untried
31695fi
31696if test -n "$ALSA_LIBS"; then
31697    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
31698 elif test -n "$PKG_CONFIG"; then
31699    if test -n "$PKG_CONFIG" && \
31700    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
31701  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
31702  ac_status=$?
31703  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31704  test $ac_status = 0; }; then
31705  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
31706else
31707  pkg_failed=yes
31708fi
31709 else
31710    pkg_failed=untried
31711fi
31712
31713
31714
31715if test $pkg_failed = yes; then
31716
31717if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
31718        _pkg_short_errors_supported=yes
31719else
31720        _pkg_short_errors_supported=no
31721fi
31722        if test $_pkg_short_errors_supported = yes; then
31723	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
31724        else
31725	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
31726        fi
31727	# Put the nasty error message in config.log where it belongs
31728	echo "$ALSA_PKG_ERRORS" >&5
31729
31730	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31731$as_echo "no" >&6; }
31732                ALSA_FOUND=no
31733elif test $pkg_failed = untried; then
31734	ALSA_FOUND=no
31735else
31736	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
31737	ALSA_LIBS=$pkg_cv_ALSA_LIBS
31738        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31739$as_echo "yes" >&6; }
31740	ALSA_FOUND=yes
31741fi
31742	fi
31743	if test "x$ALSA_FOUND" = xno; then
31744	    for ac_header in alsa/asoundlib.h
31745do :
31746  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
31747if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
31748  cat >>confdefs.h <<_ACEOF
31749#define HAVE_ALSA_ASOUNDLIB_H 1
31750_ACEOF
31751 ALSA_FOUND=yes
31752	                      ALSA_CFLAGS=-Iignoreme
31753	                      ALSA_LIBS=-lasound
31754	                      DEFAULT_ALSA=yes
31755else
31756  ALSA_FOUND=no
31757fi
31758
31759done
31760
31761	fi
31762	if test "x$ALSA_FOUND" = xno; then
31763
31764    # Print a helpful message on how to acquire the necessary build dependency.
31765    # alsa is the help tag: freetyp2, cups, pulse, alsa etc
31766    MISSING_DEPENDENCY=alsa
31767    PKGHANDLER_COMMAND=
31768
31769    case $PKGHANDLER in
31770	apt-get)
31771                apt_help     $MISSING_DEPENDENCY ;;
31772    yum)
31773                yum_help     $MISSING_DEPENDENCY ;;
31774	port)
31775                port_help    $MISSING_DEPENDENCY ;;
31776	pkgutil)
31777                pkgutil_help $MISSING_DEPENDENCY ;;
31778	pkgadd)
31779                pkgadd_help  $MISSING_DEPENDENCY ;;
31780    * )
31781      break ;;
31782    esac
31783
31784    if test "x$PKGHANDLER_COMMAND" != x; then
31785        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
31786    fi
31787
31788	    as_fn_error $? "Could not find alsa! $HELP_MSG " "$LINENO" 5
31789	fi
31790fi
31791
31792
31793
31794
31795
31796
31797
31798###############################################################################
31799#
31800# Check for the jpeg library
31801#
31802
31803USE_EXTERNAL_LIBJPEG=true
31804{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -ljpeg" >&5
31805$as_echo_n "checking for main in -ljpeg... " >&6; }
31806if ${ac_cv_lib_jpeg_main+:} false; then :
31807  $as_echo_n "(cached) " >&6
31808else
31809  ac_check_lib_save_LIBS=$LIBS
31810LIBS="-ljpeg  $LIBS"
31811cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31812/* end confdefs.h.  */
31813
31814
31815int
31816main ()
31817{
31818return main ();
31819  ;
31820  return 0;
31821}
31822_ACEOF
31823if ac_fn_cxx_try_link "$LINENO"; then :
31824  ac_cv_lib_jpeg_main=yes
31825else
31826  ac_cv_lib_jpeg_main=no
31827fi
31828rm -f core conftest.err conftest.$ac_objext \
31829    conftest$ac_exeext conftest.$ac_ext
31830LIBS=$ac_check_lib_save_LIBS
31831fi
31832{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_main" >&5
31833$as_echo "$ac_cv_lib_jpeg_main" >&6; }
31834if test "x$ac_cv_lib_jpeg_main" = xyes; then :
31835  cat >>confdefs.h <<_ACEOF
31836#define HAVE_LIBJPEG 1
31837_ACEOF
31838
31839  LIBS="-ljpeg $LIBS"
31840
31841else
31842   USE_EXTERNAL_LIBJPEG=false
31843               { $as_echo "$as_me:${as_lineno-$LINENO}: Will use jpeg decoder bundled with the OpenJDK source" >&5
31844$as_echo "$as_me: Will use jpeg decoder bundled with the OpenJDK source" >&6;}
31845
31846fi
31847
31848
31849
31850###############################################################################
31851#
31852# Check for the gif library
31853#
31854
31855
31856# Check whether --with-giflib was given.
31857if test "${with_giflib+set}" = set; then :
31858  withval=$with_giflib;
31859fi
31860
31861
31862
31863{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
31864$as_echo_n "checking for which giflib to use... " >&6; }
31865
31866# default is bundled
31867DEFAULT_GIFLIB=bundled
31868
31869#
31870# if user didn't specify, use DEFAULT_GIFLIB
31871#
31872if test "x${with_giflib}" = "x"; then
31873    with_giflib=${DEFAULT_GIFLIB}
31874fi
31875
31876{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
31877$as_echo "${with_giflib}" >&6; }
31878
31879if test "x${with_giflib}" = "xbundled"; then
31880    USE_EXTERNAL_LIBGIF=false
31881elif test "x${with_giflib}" = "xsystem"; then
31882    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
31883if test "x$ac_cv_header_gif_lib_h" = xyes; then :
31884
31885else
31886   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
31887fi
31888
31889
31890    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
31891$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
31892if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
31893  $as_echo_n "(cached) " >&6
31894else
31895  ac_check_lib_save_LIBS=$LIBS
31896LIBS="-lgif  $LIBS"
31897cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31898/* end confdefs.h.  */
31899
31900/* Override any GCC internal prototype to avoid an error.
31901   Use char because int might match the return type of a GCC
31902   builtin and then its argument prototype would still apply.  */
31903#ifdef __cplusplus
31904extern "C"
31905#endif
31906char DGifGetCode ();
31907int
31908main ()
31909{
31910return DGifGetCode ();
31911  ;
31912  return 0;
31913}
31914_ACEOF
31915if ac_fn_cxx_try_link "$LINENO"; then :
31916  ac_cv_lib_gif_DGifGetCode=yes
31917else
31918  ac_cv_lib_gif_DGifGetCode=no
31919fi
31920rm -f core conftest.err conftest.$ac_objext \
31921    conftest$ac_exeext conftest.$ac_ext
31922LIBS=$ac_check_lib_save_LIBS
31923fi
31924{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
31925$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
31926if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
31927  cat >>confdefs.h <<_ACEOF
31928#define HAVE_LIBGIF 1
31929_ACEOF
31930
31931  LIBS="-lgif $LIBS"
31932
31933else
31934   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
31935fi
31936
31937
31938    USE_EXTERNAL_LIBGIF=true
31939else
31940    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
31941fi
31942
31943
31944###############################################################################
31945#
31946# Check for the zlib library
31947#
31948
31949
31950# Check whether --with-zlib was given.
31951if test "${with_zlib+set}" = set; then :
31952  withval=$with_zlib;
31953fi
31954
31955
31956{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
31957$as_echo_n "checking for compress in -lz... " >&6; }
31958if ${ac_cv_lib_z_compress+:} false; then :
31959  $as_echo_n "(cached) " >&6
31960else
31961  ac_check_lib_save_LIBS=$LIBS
31962LIBS="-lz  $LIBS"
31963cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31964/* end confdefs.h.  */
31965
31966/* Override any GCC internal prototype to avoid an error.
31967   Use char because int might match the return type of a GCC
31968   builtin and then its argument prototype would still apply.  */
31969#ifdef __cplusplus
31970extern "C"
31971#endif
31972char compress ();
31973int
31974main ()
31975{
31976return compress ();
31977  ;
31978  return 0;
31979}
31980_ACEOF
31981if ac_fn_cxx_try_link "$LINENO"; then :
31982  ac_cv_lib_z_compress=yes
31983else
31984  ac_cv_lib_z_compress=no
31985fi
31986rm -f core conftest.err conftest.$ac_objext \
31987    conftest$ac_exeext conftest.$ac_ext
31988LIBS=$ac_check_lib_save_LIBS
31989fi
31990{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
31991$as_echo "$ac_cv_lib_z_compress" >&6; }
31992if test "x$ac_cv_lib_z_compress" = xyes; then :
31993   ZLIB_FOUND=yes
31994else
31995   ZLIB_FOUND=no
31996fi
31997
31998
31999{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
32000$as_echo_n "checking for which zlib to use... " >&6; }
32001
32002DEFAULT_ZLIB=bundled
32003if test "x$OPENJDK_TARGET_OS" = xmacosx; then
32004#
32005# On macosx default is system...on others default is
32006#
32007    DEFAULT_ZLIB=system
32008fi
32009
32010if test "x${ZLIB_FOUND}" != "xyes"; then
32011#
32012# If we don't find any system...set default to bundled
32013#
32014    DEFAULT_ZLIB=bundled
32015fi
32016
32017#
32018# If user didn't specify, use DEFAULT_ZLIB
32019#
32020if test "x${with_zlib}" = "x"; then
32021    with_zlib=${DEFAULT_ZLIB}
32022fi
32023
32024if test "x${with_zlib}" = "xbundled"; then
32025    USE_EXTERNAL_LIBZ=false
32026    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
32027$as_echo "bundled" >&6; }
32028elif test "x${with_zlib}" = "xsystem"; then
32029    if test "x${ZLIB_FOUND}" = "xyes"; then
32030        USE_EXTERNAL_LIBZ=true
32031        { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
32032$as_echo "system" >&6; }
32033    else
32034        { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
32035$as_echo "system not found" >&6; }
32036        as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
32037    fi
32038else
32039    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
32040fi
32041
32042
32043
32044###############################################################################
32045LIBZIP_CAN_USE_MMAP=true
32046
32047
32048
32049###############################################################################
32050#
32051# Check if altzone exists in time.h
32052#
32053
32054cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32055/* end confdefs.h.  */
32056#include <time.h>
32057int
32058main ()
32059{
32060return (int)altzone;
32061  ;
32062  return 0;
32063}
32064_ACEOF
32065if ac_fn_cxx_try_link "$LINENO"; then :
32066  has_altzone=yes
32067else
32068  has_altzone=no
32069fi
32070rm -f core conftest.err conftest.$ac_objext \
32071    conftest$ac_exeext conftest.$ac_ext
32072if test "x$has_altzone" = xyes; then
32073
32074$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
32075
32076fi
32077
32078###############################################################################
32079#
32080# Check the maths library
32081#
32082
32083{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
32084$as_echo_n "checking for cos in -lm... " >&6; }
32085if ${ac_cv_lib_m_cos+:} false; then :
32086  $as_echo_n "(cached) " >&6
32087else
32088  ac_check_lib_save_LIBS=$LIBS
32089LIBS="-lm  $LIBS"
32090cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32091/* end confdefs.h.  */
32092
32093/* Override any GCC internal prototype to avoid an error.
32094   Use char because int might match the return type of a GCC
32095   builtin and then its argument prototype would still apply.  */
32096#ifdef __cplusplus
32097extern "C"
32098#endif
32099char cos ();
32100int
32101main ()
32102{
32103return cos ();
32104  ;
32105  return 0;
32106}
32107_ACEOF
32108if ac_fn_cxx_try_link "$LINENO"; then :
32109  ac_cv_lib_m_cos=yes
32110else
32111  ac_cv_lib_m_cos=no
32112fi
32113rm -f core conftest.err conftest.$ac_objext \
32114    conftest$ac_exeext conftest.$ac_ext
32115LIBS=$ac_check_lib_save_LIBS
32116fi
32117{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
32118$as_echo "$ac_cv_lib_m_cos" >&6; }
32119if test "x$ac_cv_lib_m_cos" = xyes; then :
32120  cat >>confdefs.h <<_ACEOF
32121#define HAVE_LIBM 1
32122_ACEOF
32123
32124  LIBS="-lm $LIBS"
32125
32126else
32127
32128                  { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
32129$as_echo "$as_me: Maths library was not found" >&6;}
32130
32131fi
32132
32133
32134
32135###############################################################################
32136#
32137# Check for libdl.so
32138
32139save_LIBS="$LIBS"
32140LIBS=""
32141{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
32142$as_echo_n "checking for dlopen in -ldl... " >&6; }
32143if ${ac_cv_lib_dl_dlopen+:} false; then :
32144  $as_echo_n "(cached) " >&6
32145else
32146  ac_check_lib_save_LIBS=$LIBS
32147LIBS="-ldl  $LIBS"
32148cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32149/* end confdefs.h.  */
32150
32151/* Override any GCC internal prototype to avoid an error.
32152   Use char because int might match the return type of a GCC
32153   builtin and then its argument prototype would still apply.  */
32154#ifdef __cplusplus
32155extern "C"
32156#endif
32157char dlopen ();
32158int
32159main ()
32160{
32161return dlopen ();
32162  ;
32163  return 0;
32164}
32165_ACEOF
32166if ac_fn_cxx_try_link "$LINENO"; then :
32167  ac_cv_lib_dl_dlopen=yes
32168else
32169  ac_cv_lib_dl_dlopen=no
32170fi
32171rm -f core conftest.err conftest.$ac_objext \
32172    conftest$ac_exeext conftest.$ac_ext
32173LIBS=$ac_check_lib_save_LIBS
32174fi
32175{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
32176$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
32177if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
32178  cat >>confdefs.h <<_ACEOF
32179#define HAVE_LIBDL 1
32180_ACEOF
32181
32182  LIBS="-ldl $LIBS"
32183
32184fi
32185
32186LIBDL="$LIBS"
32187
32188LIBS="$save_LIBS"
32189
32190
32191
32192###############################################################################
32193#
32194# statically link libstdc++ before C++ ABI is stablized on Linux unless
32195# dynamic build is configured on command line.
32196#
32197
32198# Check whether --with-stdc++lib was given.
32199if test "${with_stdc__lib+set}" = set; then :
32200  withval=$with_stdc__lib;
32201    if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
32202        && test "x$with_stdc__lib" != xdefault; then
32203      as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
32204    fi
32205
32206else
32207  with_stdc__lib=default
32208
32209fi
32210
32211
32212if test "x$OPENJDK_TARGET_OS" = xlinux; then
32213    # Test if -lstdc++ works.
32214    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
32215$as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
32216    ac_ext=cpp
32217ac_cpp='$CXXCPP $CPPFLAGS'
32218ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32219ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32220ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32221
32222    OLD_CXXFLAGS="$CXXFLAGS"
32223    CXXFLAGS="$CXXFLAGS -lstdc++"
32224    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32225/* end confdefs.h.  */
32226
32227int
32228main ()
32229{
32230return 0;
32231  ;
32232  return 0;
32233}
32234_ACEOF
32235if ac_fn_cxx_try_link "$LINENO"; then :
32236  has_dynamic_libstdcxx=yes
32237else
32238  has_dynamic_libstdcxx=no
32239fi
32240rm -f core conftest.err conftest.$ac_objext \
32241    conftest$ac_exeext conftest.$ac_ext
32242    CXXFLAGS="$OLD_CXXFLAGS"
32243    ac_ext=cpp
32244ac_cpp='$CXXCPP $CPPFLAGS'
32245ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32246ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32247ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32248
32249    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
32250$as_echo "$has_dynamic_libstdcxx" >&6; }
32251
32252    # Test if stdc++ can be linked statically.
32253    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
32254$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
32255    STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
32256    ac_ext=cpp
32257ac_cpp='$CXXCPP $CPPFLAGS'
32258ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32259ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32260ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32261
32262    OLD_LIBS="$LIBS"
32263    OLD_CXX="$CXX"
32264    LIBS="$STATIC_STDCXX_FLAGS"
32265    CXX="$CC"
32266    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32267/* end confdefs.h.  */
32268
32269int
32270main ()
32271{
32272return 0;
32273  ;
32274  return 0;
32275}
32276_ACEOF
32277if ac_fn_cxx_try_link "$LINENO"; then :
32278  has_static_libstdcxx=yes
32279else
32280  has_static_libstdcxx=no
32281fi
32282rm -f core conftest.err conftest.$ac_objext \
32283    conftest$ac_exeext conftest.$ac_ext
32284    LIBS="$OLD_LIBS"
32285    CXX="$OLD_CXX"
32286    ac_ext=cpp
32287ac_cpp='$CXXCPP $CPPFLAGS'
32288ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32289ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32290ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32291
32292    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
32293$as_echo "$has_static_libstdcxx" >&6; }
32294
32295    if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
32296        as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
32297    fi
32298
32299    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
32300        as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
32301    fi
32302
32303    if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
32304        as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
32305    fi
32306
32307    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
32308$as_echo_n "checking how to link with libstdc++... " >&6; }
32309    # If dynamic was requested, it's available since it would fail above otherwise.
32310    # If dynamic wasn't requested, go with static unless it isn't available.
32311    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
32312        LIBCXX="$LIBCXX -lstdc++"
32313        LDCXX="$CXX"
32314        STATIC_CXX_SETTING="STATIC_CXX=false"
32315        { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
32316$as_echo "dynamic" >&6; }
32317    else
32318        LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
32319        LDCXX="$CC"
32320        STATIC_CXX_SETTING="STATIC_CXX=true"
32321        { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
32322$as_echo "static" >&6; }
32323    fi
32324fi
32325
32326
32327if test "x$JVM_VARIANT_ZERO" = xtrue || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
32328    # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
32329
32330pkg_failed=no
32331{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
32332$as_echo_n "checking for LIBFFI... " >&6; }
32333
32334if test -n "$LIBFFI_CFLAGS"; then
32335    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
32336 elif test -n "$PKG_CONFIG"; then
32337    if test -n "$PKG_CONFIG" && \
32338    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
32339  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
32340  ac_status=$?
32341  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32342  test $ac_status = 0; }; then
32343  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
32344else
32345  pkg_failed=yes
32346fi
32347 else
32348    pkg_failed=untried
32349fi
32350if test -n "$LIBFFI_LIBS"; then
32351    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
32352 elif test -n "$PKG_CONFIG"; then
32353    if test -n "$PKG_CONFIG" && \
32354    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
32355  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
32356  ac_status=$?
32357  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32358  test $ac_status = 0; }; then
32359  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
32360else
32361  pkg_failed=yes
32362fi
32363 else
32364    pkg_failed=untried
32365fi
32366
32367
32368
32369if test $pkg_failed = yes; then
32370
32371if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
32372        _pkg_short_errors_supported=yes
32373else
32374        _pkg_short_errors_supported=no
32375fi
32376        if test $_pkg_short_errors_supported = yes; then
32377	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
32378        else
32379	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
32380        fi
32381	# Put the nasty error message in config.log where it belongs
32382	echo "$LIBFFI_PKG_ERRORS" >&5
32383
32384	as_fn_error $? "Package requirements (libffi) were not met:
32385
32386$LIBFFI_PKG_ERRORS
32387
32388Consider adjusting the PKG_CONFIG_PATH environment variable if you
32389installed software in a non-standard prefix.
32390
32391Alternatively, you may set the environment variables LIBFFI_CFLAGS
32392and LIBFFI_LIBS to avoid the need to call pkg-config.
32393See the pkg-config man page for more details.
32394" "$LINENO" 5
32395elif test $pkg_failed = untried; then
32396	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32397$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32398as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
32399is in your PATH or set the PKG_CONFIG environment variable to the full
32400path to pkg-config.
32401
32402Alternatively, you may set the environment variables LIBFFI_CFLAGS
32403and LIBFFI_LIBS to avoid the need to call pkg-config.
32404See the pkg-config man page for more details.
32405
32406To get pkg-config, see <http://pkg-config.freedesktop.org/>.
32407See \`config.log' for more details" "$LINENO" 5; }
32408else
32409	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
32410	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
32411        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32412$as_echo "yes" >&6; }
32413	:
32414fi
32415
32416fi
32417
32418if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
32419    # Extract the first word of "llvm-config", so it can be a program name with args.
32420set dummy llvm-config; ac_word=$2
32421{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32422$as_echo_n "checking for $ac_word... " >&6; }
32423if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
32424  $as_echo_n "(cached) " >&6
32425else
32426  if test -n "$LLVM_CONFIG"; then
32427  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
32428else
32429as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32430for as_dir in $PATH
32431do
32432  IFS=$as_save_IFS
32433  test -z "$as_dir" && as_dir=.
32434    for ac_exec_ext in '' $ac_executable_extensions; do
32435  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32436    ac_cv_prog_LLVM_CONFIG="llvm-config"
32437    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32438    break 2
32439  fi
32440done
32441  done
32442IFS=$as_save_IFS
32443
32444fi
32445fi
32446LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
32447if test -n "$LLVM_CONFIG"; then
32448  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
32449$as_echo "$LLVM_CONFIG" >&6; }
32450else
32451  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32452$as_echo "no" >&6; }
32453fi
32454
32455
32456
32457    if test "x$LLVM_CONFIG" != xllvm-config; then
32458        as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
32459    fi
32460
32461    llvm_components="jit mcjit engine nativecodegen native"
32462    unset LLVM_CFLAGS
32463    for flag in $("$LLVM_CONFIG" --cxxflags); do
32464      if echo "${flag}" | grep -q '^-[ID]'; then
32465        if test "${flag}" != "-D_DEBUG" ; then
32466          if test "${LLVM_CFLAGS}" != "" ; then
32467            LLVM_CFLAGS="${LLVM_CFLAGS} "
32468          fi
32469          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
32470        fi
32471      fi
32472    done
32473    llvm_version=$("${LLVM_CONFIG}" --version | sed 's/\.//; s/svn.*//')
32474    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
32475
32476    unset LLVM_LDFLAGS
32477    for flag in $("${LLVM_CONFIG}" --ldflags); do
32478      if echo "${flag}" | grep -q '^-L'; then
32479        if test "${LLVM_LDFLAGS}" != ""; then
32480          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
32481        fi
32482        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
32483      fi
32484    done
32485
32486    unset LLVM_LIBS
32487    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
32488      if echo "${flag}" | grep -q '^-l'; then
32489        if test "${LLVM_LIBS}" != ""; then
32490          LLVM_LIBS="${LLVM_LIBS} "
32491        fi
32492        LLVM_LIBS="${LLVM_LIBS}${flag}"
32493      fi
32494    done
32495
32496
32497
32498
32499fi
32500
32501# libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
32502if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$LIBCXX" = x; then
32503    LIBCXX="/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
32504fi
32505
32506# TODO better (platform agnostic) test
32507if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$GCC" = xyes; then
32508    LIBCXX="-lstdc++"
32509fi
32510
32511
32512
32513
32514
32515# After we have toolchain and the paths to all libraries (needed by msys), we can compile the fixpath helper
32516
32517# When using cygwin or msys, we need a wrapper binary that renames
32518# /cygdrive/c/ arguments into c:/ arguments and peeks into
32519# @files and rewrites these too! This wrapper binary is
32520# called fixpath.
32521FIXPATH=
32522if test "x$OPENJDK_BUILD_OS" = xwindows; then
32523    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
32524$as_echo_n "checking if fixpath can be created... " >&6; }
32525    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
32526    FIXPATH_BIN="$OUTPUT_ROOT/fixpath.exe"
32527    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
32528      FIXPATH_SRC=`$CYGPATH -m $FIXPATH_SRC`
32529      FIXPATH_BIN=`$CYGPATH -m $FIXPATH_BIN`
32530      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
32531      FIXPATH="$OUTPUT_ROOT/fixpath.exe -c"
32532    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
32533      FIXPATH_SRC=`cmd //c echo $FIXPATH_SRC`
32534      FIXPATH_BIN=`cmd //c echo $FIXPATH_BIN`
32535
32536      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
32537      # @ was chosen as separator to minimize risk of other tools messing around with it
32538      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" | tr ' ' '\n' | grep '^/./' | sort | uniq`
32539      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
32540
32541      FIXPATH="$OUTPUT_ROOT/fixpath -m$fixpath_argument_list"
32542    fi
32543    rm -f $OUTPUT_ROOT/fixpath*
32544    cd $OUTPUT_ROOT
32545    $CC $FIXPATH_SRC -Fe$FIXPATH_BIN > $OUTPUT_ROOT/fixpath1.log 2>&1
32546    cd $CURDIR
32547
32548    if test ! -x $OUTPUT_ROOT/fixpath.exe; then
32549        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32550$as_echo "no" >&6; }
32551        cat $OUTPUT_ROOT/fixpath1.log
32552        as_fn_error $? "Could not create $OUTPUT_ROOT/fixpath.exe" "$LINENO" 5
32553    fi
32554    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32555$as_echo "yes" >&6; }
32556    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
32557$as_echo_n "checking if fixpath.exe works... " >&6; }
32558    cd $OUTPUT_ROOT
32559    $FIXPATH $CC $SRC_ROOT/common/src/fixpath.c -Fe$OUTPUT_ROOT/fixpath2.exe > $OUTPUT_ROOT/fixpath2.log 2>&1
32560    cd $CURDIR
32561    if test ! -x $OUTPUT_ROOT/fixpath2.exe; then
32562        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32563$as_echo "no" >&6; }
32564        cat $OUTPUT_ROOT/fixpath2.log
32565        as_fn_error $? "fixpath did not work!" "$LINENO" 5
32566    fi
32567    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32568$as_echo "yes" >&6; }
32569    rm -f $OUTPUT_ROOT/fixpath?.??? $OUTPUT_ROOT/fixpath.obj
32570fi
32571
32572
32573
32574
32575###############################################################################
32576#
32577# We need to do some final tweaking, when everything else is done.
32578#
32579###############################################################################
32580
32581
32582HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
32583
32584
32585# The name of the Service Agent jar.
32586SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
32587if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
32588  SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
32589fi
32590
32591
32592
32593
32594{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
32595$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
32596
32597if test -d "${SRC_ROOT}/jdk/src/share/native/sun/security/ec/impl"; then
32598    ENABLE_INTREE_EC=yes
32599    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32600$as_echo "yes" >&6; }
32601else
32602    ENABLE_INTREE_EC=no
32603    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32604$as_echo "no" >&6; }
32605fi
32606
32607
32608
32609
32610###############################################################################
32611#
32612# Configure parts of the build that only affect the build performance,
32613# not the result.
32614#
32615###############################################################################
32616
32617
32618  # How many cores do we have on this build system?
32619
32620# Check whether --with-num-cores was given.
32621if test "${with_num_cores+set}" = set; then :
32622  withval=$with_num_cores;
32623fi
32624
32625  if test "x$with_num_cores" = x; then
32626    # The number of cores were not specified, try to probe them.
32627
32628    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
32629$as_echo_n "checking for number of cores... " >&6; }
32630    NUM_CORES=1
32631    FOUND_CORES=no
32632
32633    if test -f /proc/cpuinfo; then
32634        # Looks like a Linux (or cygwin) system
32635        NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
32636        FOUND_CORES=yes
32637    elif test -x /usr/sbin/psrinfo; then
32638        # Looks like a Solaris system
32639        NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
32640        FOUND_CORES=yes
32641    elif test -x /usr/sbin/system_profiler; then
32642        # Looks like a MacOSX system
32643        NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print $5}'`
32644        FOUND_CORES=yes
32645    elif test -n "$NUMBER_OF_PROCESSORS"; then
32646        # On windows, look in the env
32647        NUM_CORES=$NUMBER_OF_PROCESSORS
32648        FOUND_CORES=yes
32649    fi
32650
32651    if test "x$FOUND_CORES" = xyes; then
32652        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
32653$as_echo "$NUM_CORES" >&6; }
32654    else
32655        { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
32656$as_echo "could not detect number of cores, defaulting to 1" >&6; }
32657        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
32658$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
32659    fi
32660
32661
32662  else
32663    NUM_CORES=$with_num_cores
32664  fi
32665
32666
32667
32668  # How much memory do we have on this build system?
32669
32670# Check whether --with-memory-size was given.
32671if test "${with_memory_size+set}" = set; then :
32672  withval=$with_memory_size;
32673fi
32674
32675  if test "x$with_memory_size" = x; then
32676    # The memory size was not specified, try to probe it.
32677
32678    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
32679$as_echo_n "checking for memory size... " >&6; }
32680    # Default to 1024 MB
32681    MEMORY_SIZE=1024
32682    FOUND_MEM=no
32683
32684    if test -f /proc/meminfo; then
32685        # Looks like a Linux (or cygwin) system
32686        MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
32687        MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
32688        FOUND_MEM=yes
32689    elif test -x /usr/sbin/prtconf; then
32690        # Looks like a Solaris system
32691        MEMORY_SIZE=`/usr/sbin/prtconf | grep "Memory size" | awk '{ print $3 }'`
32692        FOUND_MEM=yes
32693    elif test -x /usr/sbin/system_profiler; then
32694        # Looks like a MacOSX system
32695        MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print $2}'`
32696        MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
32697        FOUND_MEM=yes
32698    elif test "x$OPENJDK_BUILD_OS" = xwindows; then
32699        # Windows, but without cygwin
32700        MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
32701        MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
32702        FOUND_MEM=yes
32703    fi
32704
32705    if test "x$FOUND_MEM" = xyes; then
32706        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
32707$as_echo "$MEMORY_SIZE MB" >&6; }
32708    else
32709        { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to 1024 MB" >&5
32710$as_echo "could not detect memory size, defaulting to 1024 MB" >&6; }
32711        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
32712$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
32713    fi
32714
32715  else
32716    MEMORY_SIZE=$with_memory_size
32717  fi
32718
32719
32720
32721  # Provide a decent default number of parallel jobs for make depending on
32722  # number of cores, amount of memory and machine architecture.
32723
32724# Check whether --with-jobs was given.
32725if test "${with_jobs+set}" = set; then :
32726  withval=$with_jobs;
32727fi
32728
32729  if test "x$with_jobs" = x; then
32730    # Number of jobs was not specified, calculate.
32731    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
32732$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
32733    # Approximate memory in GB, rounding up a bit.
32734    memory_gb=`expr $MEMORY_SIZE / 1100`
32735    # Pick the lowest of memory in gb and number of cores.
32736    if test "$memory_gb" -lt "$NUM_CORES"; then
32737      JOBS="$memory_gb"
32738    else
32739      JOBS="$NUM_CORES"
32740      # On bigger machines, leave some room for other processes to run
32741      if test "$JOBS" -gt "4"; then
32742        JOBS=`expr $JOBS '*' 90 / 100`
32743      fi
32744    fi
32745    # Cap number of jobs to 16
32746    if test "$JOBS" -gt "16"; then
32747      JOBS=16
32748    fi
32749    if test "$JOBS" -eq "0"; then
32750      JOBS=1
32751    fi
32752    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
32753$as_echo "$JOBS" >&6; }
32754  else
32755    JOBS=$with_jobs
32756  fi
32757
32758
32759
32760# Setup smart javac (after cores and memory have been setup)
32761
32762
32763# Check whether --with-sjavac-server-java was given.
32764if test "${with_sjavac_server_java+set}" = set; then :
32765  withval=$with_sjavac_server_java;
32766fi
32767
32768
32769if test "x$with_sjavac_server_java" != x; then
32770    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
32771    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
32772    if test "x$FOUND_VERSION" = x; then
32773        as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
32774    fi
32775else
32776    SJAVAC_SERVER_JAVA=""
32777    # Hotspot specific options.
32778
32779    $ECHO "Check if jvm arg is ok: -verbosegc" >&5
32780    $ECHO "Command: $JAVA -verbosegc -version" >&5
32781    OUTPUT=`$JAVA -verbosegc -version 2>&1`
32782    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
32783    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
32784    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32785        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -verbosegc"
32786	JVM_ARG_OK=true
32787    else
32788	$ECHO "Arg failed:" >&5
32789	$ECHO "$OUTPUT" >&5
32790	JVM_ARG_OK=false
32791    fi
32792
32793    # JRockit specific options.
32794
32795    $ECHO "Check if jvm arg is ok: -Xverbose:gc" >&5
32796    $ECHO "Command: $JAVA -Xverbose:gc -version" >&5
32797    OUTPUT=`$JAVA -Xverbose:gc -version 2>&1`
32798    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
32799    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
32800    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32801        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xverbose:gc"
32802	JVM_ARG_OK=true
32803    else
32804	$ECHO "Arg failed:" >&5
32805	$ECHO "$OUTPUT" >&5
32806	JVM_ARG_OK=false
32807    fi
32808
32809    SJAVAC_SERVER_JAVA="$JAVA $SJAVAC_SERVER_JAVA"
32810fi
32811
32812
32813if test "$MEMORY_SIZE" -gt "2500"; then
32814
32815    $ECHO "Check if jvm arg is ok: -d64" >&5
32816    $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
32817    OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
32818    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
32819    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
32820    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32821        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
32822	JVM_ARG_OK=true
32823    else
32824	$ECHO "Arg failed:" >&5
32825	$ECHO "$OUTPUT" >&5
32826	JVM_ARG_OK=false
32827    fi
32828
32829    if test "$JVM_ARG_OK" = true; then
32830        JVM_64BIT=true
32831	JVM_ARG_OK=false
32832    fi
32833    fi
32834
32835if test "$JVM_64BIT" = true; then
32836    if test "$MEMORY_SIZE" -gt "17000"; then
32837
32838    $ECHO "Check if jvm arg is ok: -Xms10G -Xmx10G" >&5
32839    $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version" >&5
32840    OUTPUT=`$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version 2>&1`
32841    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
32842    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
32843    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32844        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G"
32845	JVM_ARG_OK=true
32846    else
32847	$ECHO "Arg failed:" >&5
32848	$ECHO "$OUTPUT" >&5
32849	JVM_ARG_OK=false
32850    fi
32851
32852    fi
32853    if test "$MEMORY_SIZE" -gt "10000" && test "$JVM_ARG_OK" = false; then
32854
32855    $ECHO "Check if jvm arg is ok: -Xms6G -Xmx6G" >&5
32856    $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version" >&5
32857    OUTPUT=`$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version 2>&1`
32858    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
32859    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
32860    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32861        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G"
32862	JVM_ARG_OK=true
32863    else
32864	$ECHO "Arg failed:" >&5
32865	$ECHO "$OUTPUT" >&5
32866	JVM_ARG_OK=false
32867    fi
32868
32869    fi
32870    if test "$MEMORY_SIZE" -gt "5000" && test "$JVM_ARG_OK" = false; then
32871
32872    $ECHO "Check if jvm arg is ok: -Xms1G -Xmx3G" >&5
32873    $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version" >&5
32874    OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version 2>&1`
32875    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
32876    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
32877    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32878        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G"
32879	JVM_ARG_OK=true
32880    else
32881	$ECHO "Arg failed:" >&5
32882	$ECHO "$OUTPUT" >&5
32883	JVM_ARG_OK=false
32884    fi
32885
32886    fi
32887    if test "$MEMORY_SIZE" -gt "3800" && test "$JVM_ARG_OK" = false; then
32888
32889    $ECHO "Check if jvm arg is ok: -Xms1G -Xmx2500M" >&5
32890    $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version" >&5
32891    OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version 2>&1`
32892    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
32893    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
32894    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32895        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M"
32896	JVM_ARG_OK=true
32897    else
32898	$ECHO "Arg failed:" >&5
32899	$ECHO "$OUTPUT" >&5
32900	JVM_ARG_OK=false
32901    fi
32902
32903    fi
32904fi
32905if test "$MEMORY_SIZE" -gt "2500" && test "$JVM_ARG_OK" = false; then
32906
32907    $ECHO "Check if jvm arg is ok: -Xms1000M -Xmx1500M" >&5
32908    $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M -version" >&5
32909    OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M -version 2>&1`
32910    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
32911    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
32912    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32913        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M"
32914	JVM_ARG_OK=true
32915    else
32916	$ECHO "Arg failed:" >&5
32917	$ECHO "$OUTPUT" >&5
32918	JVM_ARG_OK=false
32919    fi
32920
32921fi
32922if test "$MEMORY_SIZE" -gt "1000" && test "$JVM_ARG_OK" = false; then
32923
32924    $ECHO "Check if jvm arg is ok: -Xms400M -Xmx1100M" >&5
32925    $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version" >&5
32926    OUTPUT=`$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version 2>&1`
32927    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
32928    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
32929    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32930        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M"
32931	JVM_ARG_OK=true
32932    else
32933	$ECHO "Arg failed:" >&5
32934	$ECHO "$OUTPUT" >&5
32935	JVM_ARG_OK=false
32936    fi
32937
32938fi
32939if test "$JVM_ARG_OK" = false; then
32940
32941    $ECHO "Check if jvm arg is ok: -Xms256M -Xmx512M" >&5
32942    $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version" >&5
32943    OUTPUT=`$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version 2>&1`
32944    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
32945    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
32946    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32947        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M"
32948	JVM_ARG_OK=true
32949    else
32950	$ECHO "Arg failed:" >&5
32951	$ECHO "$OUTPUT" >&5
32952	JVM_ARG_OK=false
32953    fi
32954
32955fi
32956
32957{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
32958$as_echo_n "checking whether to use sjavac... " >&6; }
32959# Check whether --enable-sjavac was given.
32960if test "${enable_sjavac+set}" = set; then :
32961  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
32962else
32963  ENABLE_SJAVAC='no'
32964fi
32965
32966{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
32967$as_echo "$ENABLE_SJAVAC" >&6; }
32968
32969
32970if test "x$ENABLE_SJAVAC" = xyes; then
32971    SJAVAC_SERVER_DIR="$OUTPUT_ROOT/javacservers"
32972else
32973    SJAVAC_SERVER_DIR=
32974fi
32975
32976
32977
32978
32979# Can the C/C++ compiler use precompiled headers?
32980
32981
32982###############################################################################
32983#
32984# Can the C/C++ compiler use precompiled headers?
32985#
32986# Check whether --enable-precompiled-headers was given.
32987if test "${enable_precompiled_headers+set}" = set; then :
32988  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
32989else
32990  ENABLE_PRECOMPH=yes
32991fi
32992
32993
32994USE_PRECOMPILED_HEADER=1
32995if test "x$ENABLE_PRECOMPH" = xno; then
32996    USE_PRECOMPILED_HEADER=0
32997fi
32998
32999if test "x$ENABLE_PRECOMPH" = xyes; then
33000    # Check that the compiler actually supports precomp headers.
33001    if test "x$GCC" = xyes; then
33002         { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
33003$as_echo_n "checking that precompiled headers work... " >&6; }
33004         echo "int alfa();" > conftest.h
33005         $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
33006         if test ! -f conftest.hpp.gch; then
33007             USE_PRECOMPILED_HEADER=0
33008             { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33009$as_echo "no" >&6; }
33010         else
33011             { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
33012$as_echo "yes" >&6; }
33013         fi
33014         rm -f conftest.h conftest.hpp.gch
33015    fi
33016fi
33017
33018
33019
33020
33021# Setup use of ccache, if available
33022
33023    # Check whether --enable-ccache was given.
33024if test "${enable_ccache+set}" = set; then :
33025  enableval=$enable_ccache; ENABLE_CCACHE=${enable_ccache}
33026else
33027  ENABLE_CCACHE=yes
33028fi
33029
33030    if test "x$ENABLE_CCACHE" = xyes; then
33031        OLD_PATH="$PATH"
33032        if test "x$TOOLS_DIR" != x; then
33033          PATH=$TOOLS_DIR:$PATH
33034        fi
33035        # Extract the first word of "ccache", so it can be a program name with args.
33036set dummy ccache; ac_word=$2
33037{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33038$as_echo_n "checking for $ac_word... " >&6; }
33039if ${ac_cv_path_CCACHE+:} false; then :
33040  $as_echo_n "(cached) " >&6
33041else
33042  case $CCACHE in
33043  [\\/]* | ?:[\\/]*)
33044  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
33045  ;;
33046  *)
33047  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33048for as_dir in $PATH
33049do
33050  IFS=$as_save_IFS
33051  test -z "$as_dir" && as_dir=.
33052    for ac_exec_ext in '' $ac_executable_extensions; do
33053  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33054    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
33055    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33056    break 2
33057  fi
33058done
33059  done
33060IFS=$as_save_IFS
33061
33062  ;;
33063esac
33064fi
33065CCACHE=$ac_cv_path_CCACHE
33066if test -n "$CCACHE"; then
33067  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
33068$as_echo "$CCACHE" >&6; }
33069else
33070  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33071$as_echo "no" >&6; }
33072fi
33073
33074
33075        PATH="$OLD_PATH"
33076    else
33077        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ccache" >&5
33078$as_echo_n "checking for ccache... " >&6; }
33079        { $as_echo "$as_me:${as_lineno-$LINENO}: result: explicitly disabled" >&5
33080$as_echo "explicitly disabled" >&6; }
33081        CCACHE=
33082    fi
33083
33084
33085
33086# Check whether --with-ccache-dir was given.
33087if test "${with_ccache_dir+set}" = set; then :
33088  withval=$with_ccache_dir;
33089fi
33090
33091
33092    if test "x$with_ccache_dir" != x; then
33093        # When using a non home ccache directory, assume the use is to share ccache files
33094        # with other users. Thus change the umask.
33095        SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
33096    fi
33097    CCACHE_FOUND=""
33098    if test "x$CCACHE" != x; then
33099
33100    if test "x$CCACHE" != x; then
33101        CCACHE_FOUND="true"
33102        # Only use ccache if it is 3.1.4 or later, which supports
33103        # precompiled headers.
33104        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ccache supports precompiled headers" >&5
33105$as_echo_n "checking if ccache supports precompiled headers... " >&6; }
33106        HAS_GOOD_CCACHE=`($CCACHE --version | head -n 1 | grep -E 3.1.[456789]) 2> /dev/null`
33107        if test "x$HAS_GOOD_CCACHE" = x; then
33108            { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccache" >&5
33109$as_echo "no, disabling ccache" >&6; }
33110            CCACHE=
33111        else
33112            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
33113$as_echo "yes" >&6; }
33114            { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
33115$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
33116            PUSHED_FLAGS="$CXXFLAGS"
33117            CXXFLAGS="-fpch-preprocess $CXXFLAGS"
33118            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33119/* end confdefs.h.  */
33120
33121int
33122main ()
33123{
33124
33125  ;
33126  return 0;
33127}
33128_ACEOF
33129if ac_fn_cxx_try_compile "$LINENO"; then :
33130  CC_KNOWS_CCACHE_TRICK=yes
33131else
33132  CC_KNOWS_CCACHE_TRICK=no
33133fi
33134rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33135            CXXFLAGS="$PUSHED_FLAGS"
33136            if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
33137                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
33138$as_echo "yes" >&6; }
33139            else
33140                { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccaching of precompiled headers" >&5
33141$as_echo "no, disabling ccaching of precompiled headers" >&6; }
33142                CCACHE=
33143            fi
33144        fi
33145    fi
33146
33147    if test "x$CCACHE" != x; then
33148        CCACHE_SLOPPINESS=time_macros
33149        CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS $CCACHE"
33150        CCACHE_FLAGS=-fpch-preprocess
33151
33152        if test "x$SET_CCACHE_DIR" != x; then
33153            mkdir -p $CCACHE_DIR > /dev/null 2>&1
33154	    chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
33155        fi
33156    fi
33157
33158    fi
33159
33160
33161###############################################################################
33162#
33163# And now the finish...
33164#
33165###############################################################################
33166
33167# Check for some common pitfalls
33168
33169  if test x"$OPENJDK_BUILD_OS" = xwindows; then
33170    file_to_test="$SRC_ROOT/LICENSE"
33171    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
33172      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
33173    fi
33174  fi
33175
33176
33177
33178{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
33179$as_echo_n "checking if build directory is on local disk... " >&6; }
33180
33181	# df -l lists only local disks; if the given directory is not found then
33182	# a non-zero exit code is given
33183  if test "x$DF" = x; then
33184    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33185      # msys does not have df; use Windows "net use" instead.
33186      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
33187      if test "x$IS_NETWORK_DISK" = x; then
33188        OUTPUT_DIR_IS_LOCAL="yes"
33189      else
33190        OUTPUT_DIR_IS_LOCAL="no"
33191      fi
33192    else
33193      # No df here, say it's local
33194      OUTPUT_DIR_IS_LOCAL="yes"
33195    fi
33196  else
33197    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
33198      OUTPUT_DIR_IS_LOCAL="yes"
33199    else
33200      OUTPUT_DIR_IS_LOCAL="no"
33201    fi
33202  fi
33203
33204{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
33205$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
33206
33207
33208
33209# Check if the user has any old-style ALT_ variables set.
33210FOUND_ALT_VARIABLES=`env | grep ^ALT_`
33211
33212# Before generating output files, test if they exist. If they do, this is a reconfigure.
33213# Since we can't properly handle the dependencies for this, warn the user about the situation
33214if test -e $OUTPUT_ROOT/spec.gmk; then
33215  IS_RECONFIGURE=yes
33216else
33217  IS_RECONFIGURE=no
33218fi
33219
33220if test -e $SRC_ROOT/build/.hide-configure-performance-hints; then
33221  HIDE_PERFORMANCE_HINTS=yes
33222else
33223  HIDE_PERFORMANCE_HINTS=no
33224  # Hide it the next time around...
33225  $TOUCH $SRC_ROOT/build/.hide-configure-performance-hints > /dev/null 2>&1
33226fi
33227
33228
33229
33230# At the end, call the custom hook. (Dummy macro if no custom sources available)
33231
33232
33233# We're messing a bit with internal autoconf variables to put the config.status
33234# in the output directory instead of the current directory.
33235CONFIG_STATUS="$OUTPUT_ROOT/config.status"
33236
33237# Create the actual output files. Now the main work of configure is done.
33238cat >confcache <<\_ACEOF
33239# This file is a shell script that caches the results of configure
33240# tests run on this system so they can be shared between configure
33241# scripts and configure runs, see configure's option --config-cache.
33242# It is not useful on other systems.  If it contains results you don't
33243# want to keep, you may remove or edit it.
33244#
33245# config.status only pays attention to the cache file if you give it
33246# the --recheck option to rerun configure.
33247#
33248# `ac_cv_env_foo' variables (set or unset) will be overridden when
33249# loading this file, other *unset* `ac_cv_foo' will be assigned the
33250# following values.
33251
33252_ACEOF
33253
33254# The following way of writing the cache mishandles newlines in values,
33255# but we know of no workaround that is simple, portable, and efficient.
33256# So, we kill variables containing newlines.
33257# Ultrix sh set writes to stderr and can't be redirected directly,
33258# and sets the high bit in the cache file unless we assign to the vars.
33259(
33260  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
33261    eval ac_val=\$$ac_var
33262    case $ac_val in #(
33263    *${as_nl}*)
33264      case $ac_var in #(
33265      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
33266$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
33267      esac
33268      case $ac_var in #(
33269      _ | IFS | as_nl) ;; #(
33270      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
33271      *) { eval $ac_var=; unset $ac_var;} ;;
33272      esac ;;
33273    esac
33274  done
33275
33276  (set) 2>&1 |
33277    case $as_nl`(ac_space=' '; set) 2>&1` in #(
33278    *${as_nl}ac_space=\ *)
33279      # `set' does not quote correctly, so add quotes: double-quote
33280      # substitution turns \\\\ into \\, and sed turns \\ into \.
33281      sed -n \
33282	"s/'/'\\\\''/g;
33283	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
33284      ;; #(
33285    *)
33286      # `set' quotes correctly as required by POSIX, so do not add quotes.
33287      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
33288      ;;
33289    esac |
33290    sort
33291) |
33292  sed '
33293     /^ac_cv_env_/b end
33294     t clear
33295     :clear
33296     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
33297     t end
33298     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
33299     :end' >>confcache
33300if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
33301  if test -w "$cache_file"; then
33302    if test "x$cache_file" != "x/dev/null"; then
33303      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
33304$as_echo "$as_me: updating cache $cache_file" >&6;}
33305      if test ! -f "$cache_file" || test -h "$cache_file"; then
33306	cat confcache >"$cache_file"
33307      else
33308        case $cache_file in #(
33309        */* | ?:*)
33310	  mv -f confcache "$cache_file"$$ &&
33311	  mv -f "$cache_file"$$ "$cache_file" ;; #(
33312        *)
33313	  mv -f confcache "$cache_file" ;;
33314	esac
33315      fi
33316    fi
33317  else
33318    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
33319$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
33320  fi
33321fi
33322rm -f confcache
33323
33324test "x$prefix" = xNONE && prefix=$ac_default_prefix
33325# Let make expand exec_prefix.
33326test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
33327
33328DEFS=-DHAVE_CONFIG_H
33329
33330ac_libobjs=
33331ac_ltlibobjs=
33332U=
33333for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
33334  # 1. Remove the extension, and $U if already installed.
33335  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
33336  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
33337  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
33338  #    will be set to the directory where LIBOBJS objects are built.
33339  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
33340  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
33341done
33342LIBOBJS=$ac_libobjs
33343
33344LTLIBOBJS=$ac_ltlibobjs
33345
33346
33347
33348: "${CONFIG_STATUS=./config.status}"
33349ac_write_fail=0
33350ac_clean_files_save=$ac_clean_files
33351ac_clean_files="$ac_clean_files $CONFIG_STATUS"
33352{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
33353$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
33354as_write_fail=0
33355cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
33356#! $SHELL
33357# Generated by $as_me.
33358# Run this file to recreate the current configuration.
33359# Compiler output produced by configure, useful for debugging
33360# configure, is in config.log if it exists.
33361
33362debug=false
33363ac_cs_recheck=false
33364ac_cs_silent=false
33365
33366SHELL=\${CONFIG_SHELL-$SHELL}
33367export SHELL
33368_ASEOF
33369cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
33370## -------------------- ##
33371## M4sh Initialization. ##
33372## -------------------- ##
33373
33374# Be more Bourne compatible
33375DUALCASE=1; export DUALCASE # for MKS sh
33376if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
33377  emulate sh
33378  NULLCMD=:
33379  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
33380  # is contrary to our usage.  Disable this feature.
33381  alias -g '${1+"$@"}'='"$@"'
33382  setopt NO_GLOB_SUBST
33383else
33384  case `(set -o) 2>/dev/null` in #(
33385  *posix*) :
33386    set -o posix ;; #(
33387  *) :
33388     ;;
33389esac
33390fi
33391
33392
33393as_nl='
33394'
33395export as_nl
33396# Printing a long string crashes Solaris 7 /usr/bin/printf.
33397as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
33398as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
33399as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
33400# Prefer a ksh shell builtin over an external printf program on Solaris,
33401# but without wasting forks for bash or zsh.
33402if test -z "$BASH_VERSION$ZSH_VERSION" \
33403    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
33404  as_echo='print -r --'
33405  as_echo_n='print -rn --'
33406elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
33407  as_echo='printf %s\n'
33408  as_echo_n='printf %s'
33409else
33410  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
33411    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
33412    as_echo_n='/usr/ucb/echo -n'
33413  else
33414    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
33415    as_echo_n_body='eval
33416      arg=$1;
33417      case $arg in #(
33418      *"$as_nl"*)
33419	expr "X$arg" : "X\\(.*\\)$as_nl";
33420	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
33421      esac;
33422      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
33423    '
33424    export as_echo_n_body
33425    as_echo_n='sh -c $as_echo_n_body as_echo'
33426  fi
33427  export as_echo_body
33428  as_echo='sh -c $as_echo_body as_echo'
33429fi
33430
33431# The user is always right.
33432if test "${PATH_SEPARATOR+set}" != set; then
33433  PATH_SEPARATOR=:
33434  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
33435    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
33436      PATH_SEPARATOR=';'
33437  }
33438fi
33439
33440
33441# IFS
33442# We need space, tab and new line, in precisely that order.  Quoting is
33443# there to prevent editors from complaining about space-tab.
33444# (If _AS_PATH_WALK were called with IFS unset, it would disable word
33445# splitting by setting IFS to empty value.)
33446IFS=" ""	$as_nl"
33447
33448# Find who we are.  Look in the path if we contain no directory separator.
33449as_myself=
33450case $0 in #((
33451  *[\\/]* ) as_myself=$0 ;;
33452  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33453for as_dir in $PATH
33454do
33455  IFS=$as_save_IFS
33456  test -z "$as_dir" && as_dir=.
33457    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
33458  done
33459IFS=$as_save_IFS
33460
33461     ;;
33462esac
33463# We did not find ourselves, most probably we were run as `sh COMMAND'
33464# in which case we are not to be found in the path.
33465if test "x$as_myself" = x; then
33466  as_myself=$0
33467fi
33468if test ! -f "$as_myself"; then
33469  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
33470  exit 1
33471fi
33472
33473# Unset variables that we do not need and which cause bugs (e.g. in
33474# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
33475# suppresses any "Segmentation fault" message there.  '((' could
33476# trigger a bug in pdksh 5.2.14.
33477for as_var in BASH_ENV ENV MAIL MAILPATH
33478do eval test x\${$as_var+set} = xset \
33479  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
33480done
33481PS1='$ '
33482PS2='> '
33483PS4='+ '
33484
33485# NLS nuisances.
33486LC_ALL=C
33487export LC_ALL
33488LANGUAGE=C
33489export LANGUAGE
33490
33491# CDPATH.
33492(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
33493
33494
33495# as_fn_error STATUS ERROR [LINENO LOG_FD]
33496# ----------------------------------------
33497# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
33498# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
33499# script with STATUS, using 1 if that was 0.
33500as_fn_error ()
33501{
33502  as_status=$1; test $as_status -eq 0 && as_status=1
33503  if test "$4"; then
33504    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
33505    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
33506  fi
33507  $as_echo "$as_me: error: $2" >&2
33508  as_fn_exit $as_status
33509} # as_fn_error
33510
33511
33512# as_fn_set_status STATUS
33513# -----------------------
33514# Set $? to STATUS, without forking.
33515as_fn_set_status ()
33516{
33517  return $1
33518} # as_fn_set_status
33519
33520# as_fn_exit STATUS
33521# -----------------
33522# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
33523as_fn_exit ()
33524{
33525  set +e
33526  as_fn_set_status $1
33527  exit $1
33528} # as_fn_exit
33529
33530# as_fn_unset VAR
33531# ---------------
33532# Portably unset VAR.
33533as_fn_unset ()
33534{
33535  { eval $1=; unset $1;}
33536}
33537as_unset=as_fn_unset
33538# as_fn_append VAR VALUE
33539# ----------------------
33540# Append the text in VALUE to the end of the definition contained in VAR. Take
33541# advantage of any shell optimizations that allow amortized linear growth over
33542# repeated appends, instead of the typical quadratic growth present in naive
33543# implementations.
33544if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
33545  eval 'as_fn_append ()
33546  {
33547    eval $1+=\$2
33548  }'
33549else
33550  as_fn_append ()
33551  {
33552    eval $1=\$$1\$2
33553  }
33554fi # as_fn_append
33555
33556# as_fn_arith ARG...
33557# ------------------
33558# Perform arithmetic evaluation on the ARGs, and store the result in the
33559# global $as_val. Take advantage of shells that can avoid forks. The arguments
33560# must be portable across $(()) and expr.
33561if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
33562  eval 'as_fn_arith ()
33563  {
33564    as_val=$(( $* ))
33565  }'
33566else
33567  as_fn_arith ()
33568  {
33569    as_val=`expr "$@" || test $? -eq 1`
33570  }
33571fi # as_fn_arith
33572
33573
33574if expr a : '\(a\)' >/dev/null 2>&1 &&
33575   test "X`expr 00001 : '.*\(...\)'`" = X001; then
33576  as_expr=expr
33577else
33578  as_expr=false
33579fi
33580
33581if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
33582  as_basename=basename
33583else
33584  as_basename=false
33585fi
33586
33587if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
33588  as_dirname=dirname
33589else
33590  as_dirname=false
33591fi
33592
33593as_me=`$as_basename -- "$0" ||
33594$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
33595	 X"$0" : 'X\(//\)$' \| \
33596	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
33597$as_echo X/"$0" |
33598    sed '/^.*\/\([^/][^/]*\)\/*$/{
33599	    s//\1/
33600	    q
33601	  }
33602	  /^X\/\(\/\/\)$/{
33603	    s//\1/
33604	    q
33605	  }
33606	  /^X\/\(\/\).*/{
33607	    s//\1/
33608	    q
33609	  }
33610	  s/.*/./; q'`
33611
33612# Avoid depending upon Character Ranges.
33613as_cr_letters='abcdefghijklmnopqrstuvwxyz'
33614as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
33615as_cr_Letters=$as_cr_letters$as_cr_LETTERS
33616as_cr_digits='0123456789'
33617as_cr_alnum=$as_cr_Letters$as_cr_digits
33618
33619ECHO_C= ECHO_N= ECHO_T=
33620case `echo -n x` in #(((((
33621-n*)
33622  case `echo 'xy\c'` in
33623  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
33624  xy)  ECHO_C='\c';;
33625  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
33626       ECHO_T='	';;
33627  esac;;
33628*)
33629  ECHO_N='-n';;
33630esac
33631
33632rm -f conf$$ conf$$.exe conf$$.file
33633if test -d conf$$.dir; then
33634  rm -f conf$$.dir/conf$$.file
33635else
33636  rm -f conf$$.dir
33637  mkdir conf$$.dir 2>/dev/null
33638fi
33639if (echo >conf$$.file) 2>/dev/null; then
33640  if ln -s conf$$.file conf$$ 2>/dev/null; then
33641    as_ln_s='ln -s'
33642    # ... but there are two gotchas:
33643    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
33644    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
33645    # In both cases, we have to default to `cp -pR'.
33646    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
33647      as_ln_s='cp -pR'
33648  elif ln conf$$.file conf$$ 2>/dev/null; then
33649    as_ln_s=ln
33650  else
33651    as_ln_s='cp -pR'
33652  fi
33653else
33654  as_ln_s='cp -pR'
33655fi
33656rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
33657rmdir conf$$.dir 2>/dev/null
33658
33659
33660# as_fn_mkdir_p
33661# -------------
33662# Create "$as_dir" as a directory, including parents if necessary.
33663as_fn_mkdir_p ()
33664{
33665
33666  case $as_dir in #(
33667  -*) as_dir=./$as_dir;;
33668  esac
33669  test -d "$as_dir" || eval $as_mkdir_p || {
33670    as_dirs=
33671    while :; do
33672      case $as_dir in #(
33673      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
33674      *) as_qdir=$as_dir;;
33675      esac
33676      as_dirs="'$as_qdir' $as_dirs"
33677      as_dir=`$as_dirname -- "$as_dir" ||
33678$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
33679	 X"$as_dir" : 'X\(//\)[^/]' \| \
33680	 X"$as_dir" : 'X\(//\)$' \| \
33681	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
33682$as_echo X"$as_dir" |
33683    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
33684	    s//\1/
33685	    q
33686	  }
33687	  /^X\(\/\/\)[^/].*/{
33688	    s//\1/
33689	    q
33690	  }
33691	  /^X\(\/\/\)$/{
33692	    s//\1/
33693	    q
33694	  }
33695	  /^X\(\/\).*/{
33696	    s//\1/
33697	    q
33698	  }
33699	  s/.*/./; q'`
33700      test -d "$as_dir" && break
33701    done
33702    test -z "$as_dirs" || eval "mkdir $as_dirs"
33703  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
33704
33705
33706} # as_fn_mkdir_p
33707if mkdir -p . 2>/dev/null; then
33708  as_mkdir_p='mkdir -p "$as_dir"'
33709else
33710  test -d ./-p && rmdir ./-p
33711  as_mkdir_p=false
33712fi
33713
33714
33715# as_fn_executable_p FILE
33716# -----------------------
33717# Test if FILE is an executable regular file.
33718as_fn_executable_p ()
33719{
33720  test -f "$1" && test -x "$1"
33721} # as_fn_executable_p
33722as_test_x='test -x'
33723as_executable_p=as_fn_executable_p
33724
33725# Sed expression to map a string onto a valid CPP name.
33726as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
33727
33728# Sed expression to map a string onto a valid variable name.
33729as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
33730
33731
33732exec 6>&1
33733## ----------------------------------- ##
33734## Main body of $CONFIG_STATUS script. ##
33735## ----------------------------------- ##
33736_ASEOF
33737test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
33738
33739cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
33740# Save the log message, to keep $0 and so on meaningful, and to
33741# report actual input values of CONFIG_FILES etc. instead of their
33742# values after options handling.
33743ac_log="
33744This file was extended by OpenJDK $as_me jdk8, which was
33745generated by GNU Autoconf 2.69.  Invocation command line was
33746
33747  CONFIG_FILES    = $CONFIG_FILES
33748  CONFIG_HEADERS  = $CONFIG_HEADERS
33749  CONFIG_LINKS    = $CONFIG_LINKS
33750  CONFIG_COMMANDS = $CONFIG_COMMANDS
33751  $ $0 $@
33752
33753on `(hostname || uname -n) 2>/dev/null | sed 1q`
33754"
33755
33756_ACEOF
33757
33758case $ac_config_files in *"
33759"*) set x $ac_config_files; shift; ac_config_files=$*;;
33760esac
33761
33762case $ac_config_headers in *"
33763"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
33764esac
33765
33766
33767cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
33768# Files that config.status was made for.
33769config_files="$ac_config_files"
33770config_headers="$ac_config_headers"
33771
33772_ACEOF
33773
33774cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
33775ac_cs_usage="\
33776\`$as_me' instantiates files and other configuration actions
33777from templates according to the current configuration.  Unless the files
33778and actions are specified as TAGs, all are instantiated by default.
33779
33780Usage: $0 [OPTION]... [TAG]...
33781
33782  -h, --help       print this help, then exit
33783  -V, --version    print version number and configuration settings, then exit
33784      --config     print configuration, then exit
33785  -q, --quiet, --silent
33786                   do not print progress messages
33787  -d, --debug      don't remove temporary files
33788      --recheck    update $as_me by reconfiguring in the same conditions
33789      --file=FILE[:TEMPLATE]
33790                   instantiate the configuration file FILE
33791      --header=FILE[:TEMPLATE]
33792                   instantiate the configuration header FILE
33793
33794Configuration files:
33795$config_files
33796
33797Configuration headers:
33798$config_headers
33799
33800Report bugs to <build-dev@openjdk.java.net>.
33801OpenJDK home page: <http://openjdk.java.net>."
33802
33803_ACEOF
33804cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
33805ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
33806ac_cs_version="\\
33807OpenJDK config.status jdk8
33808configured by $0, generated by GNU Autoconf 2.69,
33809  with options \\"\$ac_cs_config\\"
33810
33811Copyright (C) 2012 Free Software Foundation, Inc.
33812This config.status script is free software; the Free Software Foundation
33813gives unlimited permission to copy, distribute and modify it."
33814
33815ac_pwd='$ac_pwd'
33816srcdir='$srcdir'
33817AWK='$AWK'
33818test -n "\$AWK" || AWK=awk
33819_ACEOF
33820
33821cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
33822# The default lists apply if the user does not specify any file.
33823ac_need_defaults=:
33824while test $# != 0
33825do
33826  case $1 in
33827  --*=?*)
33828    ac_option=`expr "X$1" : 'X\([^=]*\)='`
33829    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
33830    ac_shift=:
33831    ;;
33832  --*=)
33833    ac_option=`expr "X$1" : 'X\([^=]*\)='`
33834    ac_optarg=
33835    ac_shift=:
33836    ;;
33837  *)
33838    ac_option=$1
33839    ac_optarg=$2
33840    ac_shift=shift
33841    ;;
33842  esac
33843
33844  case $ac_option in
33845  # Handling of the options.
33846  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
33847    ac_cs_recheck=: ;;
33848  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
33849    $as_echo "$ac_cs_version"; exit ;;
33850  --config | --confi | --conf | --con | --co | --c )
33851    $as_echo "$ac_cs_config"; exit ;;
33852  --debug | --debu | --deb | --de | --d | -d )
33853    debug=: ;;
33854  --file | --fil | --fi | --f )
33855    $ac_shift
33856    case $ac_optarg in
33857    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
33858    '') as_fn_error $? "missing file argument" ;;
33859    esac
33860    as_fn_append CONFIG_FILES " '$ac_optarg'"
33861    ac_need_defaults=false;;
33862  --header | --heade | --head | --hea )
33863    $ac_shift
33864    case $ac_optarg in
33865    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
33866    esac
33867    as_fn_append CONFIG_HEADERS " '$ac_optarg'"
33868    ac_need_defaults=false;;
33869  --he | --h)
33870    # Conflict between --help and --header
33871    as_fn_error $? "ambiguous option: \`$1'
33872Try \`$0 --help' for more information.";;
33873  --help | --hel | -h )
33874    $as_echo "$ac_cs_usage"; exit ;;
33875  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
33876  | -silent | --silent | --silen | --sile | --sil | --si | --s)
33877    ac_cs_silent=: ;;
33878
33879  # This is an error.
33880  -*) as_fn_error $? "unrecognized option: \`$1'
33881Try \`$0 --help' for more information." ;;
33882
33883  *) as_fn_append ac_config_targets " $1"
33884     ac_need_defaults=false ;;
33885
33886  esac
33887  shift
33888done
33889
33890ac_configure_extra_args=
33891
33892if $ac_cs_silent; then
33893  exec 6>/dev/null
33894  ac_configure_extra_args="$ac_configure_extra_args --silent"
33895fi
33896
33897_ACEOF
33898cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
33899if \$ac_cs_recheck; then
33900  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
33901  shift
33902  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
33903  CONFIG_SHELL='$SHELL'
33904  export CONFIG_SHELL
33905  exec "\$@"
33906fi
33907
33908_ACEOF
33909cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
33910exec 5>>config.log
33911{
33912  echo
33913  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
33914## Running $as_me. ##
33915_ASBOX
33916  $as_echo "$ac_log"
33917} >&5
33918
33919_ACEOF
33920cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
33921_ACEOF
33922
33923cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
33924
33925# Handling of arguments.
33926for ac_config_target in $ac_config_targets
33927do
33928  case $ac_config_target in
33929    "$OUTPUT_ROOT/config.h") CONFIG_HEADERS="$CONFIG_HEADERS $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in" ;;
33930    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
33931    "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
33932    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
33933    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
33934    "$OUTPUT_ROOT/spec.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in" ;;
33935    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
33936
33937  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
33938  esac
33939done
33940
33941
33942# If the user did not use the arguments to specify the items to instantiate,
33943# then the envvar interface is used.  Set only those that are not.
33944# We use the long form for the default assignment because of an extremely
33945# bizarre bug on SunOS 4.1.3.
33946if $ac_need_defaults; then
33947  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
33948  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
33949fi
33950
33951# Have a temporary directory for convenience.  Make it in the build tree
33952# simply because there is no reason against having it here, and in addition,
33953# creating and moving files from /tmp can sometimes cause problems.
33954# Hook for its removal unless debugging.
33955# Note that there is a small window in which the directory will not be cleaned:
33956# after its creation but before its name has been assigned to `$tmp'.
33957$debug ||
33958{
33959  tmp= ac_tmp=
33960  trap 'exit_status=$?
33961  : "${ac_tmp:=$tmp}"
33962  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
33963' 0
33964  trap 'as_fn_exit 1' 1 2 13 15
33965}
33966# Create a (secure) tmp directory for tmp files.
33967
33968{
33969  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
33970  test -d "$tmp"
33971}  ||
33972{
33973  tmp=./conf$$-$RANDOM
33974  (umask 077 && mkdir "$tmp")
33975} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
33976ac_tmp=$tmp
33977
33978# Set up the scripts for CONFIG_FILES section.
33979# No need to generate them if there are no CONFIG_FILES.
33980# This happens for instance with `./config.status config.h'.
33981if test -n "$CONFIG_FILES"; then
33982
33983
33984ac_cr=`echo X | tr X '\015'`
33985# On cygwin, bash can eat \r inside `` if the user requested igncr.
33986# But we know of no other shell where ac_cr would be empty at this
33987# point, so we can use a bashism as a fallback.
33988if test "x$ac_cr" = x; then
33989  eval ac_cr=\$\'\\r\'
33990fi
33991ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
33992if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
33993  ac_cs_awk_cr='\\r'
33994else
33995  ac_cs_awk_cr=$ac_cr
33996fi
33997
33998echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
33999_ACEOF
34000
34001
34002{
34003  echo "cat >conf$$subs.awk <<_ACEOF" &&
34004  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
34005  echo "_ACEOF"
34006} >conf$$subs.sh ||
34007  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
34008ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
34009ac_delim='%!_!# '
34010for ac_last_try in false false false false false :; do
34011  . ./conf$$subs.sh ||
34012    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
34013
34014  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
34015  if test $ac_delim_n = $ac_delim_num; then
34016    break
34017  elif $ac_last_try; then
34018    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
34019  else
34020    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
34021  fi
34022done
34023rm -f conf$$subs.sh
34024
34025cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34026cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
34027_ACEOF
34028sed -n '
34029h
34030s/^/S["/; s/!.*/"]=/
34031p
34032g
34033s/^[^!]*!//
34034:repl
34035t repl
34036s/'"$ac_delim"'$//
34037t delim
34038:nl
34039h
34040s/\(.\{148\}\)..*/\1/
34041t more1
34042s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
34043p
34044n
34045b repl
34046:more1
34047s/["\\]/\\&/g; s/^/"/; s/$/"\\/
34048p
34049g
34050s/.\{148\}//
34051t nl
34052:delim
34053h
34054s/\(.\{148\}\)..*/\1/
34055t more2
34056s/["\\]/\\&/g; s/^/"/; s/$/"/
34057p
34058b
34059:more2
34060s/["\\]/\\&/g; s/^/"/; s/$/"\\/
34061p
34062g
34063s/.\{148\}//
34064t delim
34065' <conf$$subs.awk | sed '
34066/^[^""]/{
34067  N
34068  s/\n//
34069}
34070' >>$CONFIG_STATUS || ac_write_fail=1
34071rm -f conf$$subs.awk
34072cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34073_ACAWK
34074cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
34075  for (key in S) S_is_set[key] = 1
34076  FS = ""
34077
34078}
34079{
34080  line = $ 0
34081  nfields = split(line, field, "@")
34082  substed = 0
34083  len = length(field[1])
34084  for (i = 2; i < nfields; i++) {
34085    key = field[i]
34086    keylen = length(key)
34087    if (S_is_set[key]) {
34088      value = S[key]
34089      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
34090      len += length(value) + length(field[++i])
34091      substed = 1
34092    } else
34093      len += 1 + keylen
34094  }
34095
34096  print line
34097}
34098
34099_ACAWK
34100_ACEOF
34101cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34102if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
34103  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
34104else
34105  cat
34106fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
34107  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
34108_ACEOF
34109
34110# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
34111# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
34112# trailing colons and then remove the whole line if VPATH becomes empty
34113# (actually we leave an empty line to preserve line numbers).
34114if test "x$srcdir" = x.; then
34115  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
34116h
34117s///
34118s/^/:/
34119s/[	 ]*$/:/
34120s/:\$(srcdir):/:/g
34121s/:\${srcdir}:/:/g
34122s/:@srcdir@:/:/g
34123s/^:*//
34124s/:*$//
34125x
34126s/\(=[	 ]*\).*/\1/
34127G
34128s/\n//
34129s/^[^=]*=[	 ]*$//
34130}'
34131fi
34132
34133cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34134fi # test -n "$CONFIG_FILES"
34135
34136# Set up the scripts for CONFIG_HEADERS section.
34137# No need to generate them if there are no CONFIG_HEADERS.
34138# This happens for instance with `./config.status Makefile'.
34139if test -n "$CONFIG_HEADERS"; then
34140cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
34141BEGIN {
34142_ACEOF
34143
34144# Transform confdefs.h into an awk script `defines.awk', embedded as
34145# here-document in config.status, that substitutes the proper values into
34146# config.h.in to produce config.h.
34147
34148# Create a delimiter string that does not exist in confdefs.h, to ease
34149# handling of long lines.
34150ac_delim='%!_!# '
34151for ac_last_try in false false :; do
34152  ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
34153  if test -z "$ac_tt"; then
34154    break
34155  elif $ac_last_try; then
34156    as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
34157  else
34158    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
34159  fi
34160done
34161
34162# For the awk script, D is an array of macro values keyed by name,
34163# likewise P contains macro parameters if any.  Preserve backslash
34164# newline sequences.
34165
34166ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
34167sed -n '
34168s/.\{148\}/&'"$ac_delim"'/g
34169t rset
34170:rset
34171s/^[	 ]*#[	 ]*define[	 ][	 ]*/ /
34172t def
34173d
34174:def
34175s/\\$//
34176t bsnl
34177s/["\\]/\\&/g
34178s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
34179D["\1"]=" \3"/p
34180s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2"/p
34181d
34182:bsnl
34183s/["\\]/\\&/g
34184s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
34185D["\1"]=" \3\\\\\\n"\\/p
34186t cont
34187s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
34188t cont
34189d
34190:cont
34191n
34192s/.\{148\}/&'"$ac_delim"'/g
34193t clear
34194:clear
34195s/\\$//
34196t bsnlc
34197s/["\\]/\\&/g; s/^/"/; s/$/"/p
34198d
34199:bsnlc
34200s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
34201b cont
34202' <confdefs.h | sed '
34203s/'"$ac_delim"'/"\\\
34204"/g' >>$CONFIG_STATUS || ac_write_fail=1
34205
34206cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34207  for (key in D) D_is_set[key] = 1
34208  FS = ""
34209}
34210/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
34211  line = \$ 0
34212  split(line, arg, " ")
34213  if (arg[1] == "#") {
34214    defundef = arg[2]
34215    mac1 = arg[3]
34216  } else {
34217    defundef = substr(arg[1], 2)
34218    mac1 = arg[2]
34219  }
34220  split(mac1, mac2, "(") #)
34221  macro = mac2[1]
34222  prefix = substr(line, 1, index(line, defundef) - 1)
34223  if (D_is_set[macro]) {
34224    # Preserve the white space surrounding the "#".
34225    print prefix "define", macro P[macro] D[macro]
34226    next
34227  } else {
34228    # Replace #undef with comments.  This is necessary, for example,
34229    # in the case of _POSIX_SOURCE, which is predefined and required
34230    # on some systems where configure will not decide to define it.
34231    if (defundef == "undef") {
34232      print "/*", prefix defundef, macro, "*/"
34233      next
34234    }
34235  }
34236}
34237{ print }
34238_ACAWK
34239_ACEOF
34240cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34241  as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
34242fi # test -n "$CONFIG_HEADERS"
34243
34244
34245eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    "
34246shift
34247for ac_tag
34248do
34249  case $ac_tag in
34250  :[FHLC]) ac_mode=$ac_tag; continue;;
34251  esac
34252  case $ac_mode$ac_tag in
34253  :[FHL]*:*);;
34254  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
34255  :[FH]-) ac_tag=-:-;;
34256  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
34257  esac
34258  ac_save_IFS=$IFS
34259  IFS=:
34260  set x $ac_tag
34261  IFS=$ac_save_IFS
34262  shift
34263  ac_file=$1
34264  shift
34265
34266  case $ac_mode in
34267  :L) ac_source=$1;;
34268  :[FH])
34269    ac_file_inputs=
34270    for ac_f
34271    do
34272      case $ac_f in
34273      -) ac_f="$ac_tmp/stdin";;
34274      *) # Look for the file first in the build tree, then in the source tree
34275	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
34276	 # because $ac_f cannot contain `:'.
34277	 test -f "$ac_f" ||
34278	   case $ac_f in
34279	   [\\/$]*) false;;
34280	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
34281	   esac ||
34282	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
34283      esac
34284      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
34285      as_fn_append ac_file_inputs " '$ac_f'"
34286    done
34287
34288    # Let's still pretend it is `configure' which instantiates (i.e., don't
34289    # use $as_me), people would be surprised to read:
34290    #    /* config.h.  Generated by config.status.  */
34291    configure_input='Generated from '`
34292	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
34293	`' by configure.'
34294    if test x"$ac_file" != x-; then
34295      configure_input="$ac_file.  $configure_input"
34296      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
34297$as_echo "$as_me: creating $ac_file" >&6;}
34298    fi
34299    # Neutralize special characters interpreted by sed in replacement strings.
34300    case $configure_input in #(
34301    *\&* | *\|* | *\\* )
34302       ac_sed_conf_input=`$as_echo "$configure_input" |
34303       sed 's/[\\\\&|]/\\\\&/g'`;; #(
34304    *) ac_sed_conf_input=$configure_input;;
34305    esac
34306
34307    case $ac_tag in
34308    *:-:* | *:-) cat >"$ac_tmp/stdin" \
34309      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
34310    esac
34311    ;;
34312  esac
34313
34314  ac_dir=`$as_dirname -- "$ac_file" ||
34315$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
34316	 X"$ac_file" : 'X\(//\)[^/]' \| \
34317	 X"$ac_file" : 'X\(//\)$' \| \
34318	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
34319$as_echo X"$ac_file" |
34320    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
34321	    s//\1/
34322	    q
34323	  }
34324	  /^X\(\/\/\)[^/].*/{
34325	    s//\1/
34326	    q
34327	  }
34328	  /^X\(\/\/\)$/{
34329	    s//\1/
34330	    q
34331	  }
34332	  /^X\(\/\).*/{
34333	    s//\1/
34334	    q
34335	  }
34336	  s/.*/./; q'`
34337  as_dir="$ac_dir"; as_fn_mkdir_p
34338  ac_builddir=.
34339
34340case "$ac_dir" in
34341.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
34342*)
34343  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
34344  # A ".." for each directory in $ac_dir_suffix.
34345  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
34346  case $ac_top_builddir_sub in
34347  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
34348  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
34349  esac ;;
34350esac
34351ac_abs_top_builddir=$ac_pwd
34352ac_abs_builddir=$ac_pwd$ac_dir_suffix
34353# for backward compatibility:
34354ac_top_builddir=$ac_top_build_prefix
34355
34356case $srcdir in
34357  .)  # We are building in place.
34358    ac_srcdir=.
34359    ac_top_srcdir=$ac_top_builddir_sub
34360    ac_abs_top_srcdir=$ac_pwd ;;
34361  [\\/]* | ?:[\\/]* )  # Absolute name.
34362    ac_srcdir=$srcdir$ac_dir_suffix;
34363    ac_top_srcdir=$srcdir
34364    ac_abs_top_srcdir=$srcdir ;;
34365  *) # Relative name.
34366    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
34367    ac_top_srcdir=$ac_top_build_prefix$srcdir
34368    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
34369esac
34370ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
34371
34372
34373  case $ac_mode in
34374  :F)
34375  #
34376  # CONFIG_FILE
34377  #
34378
34379_ACEOF
34380
34381cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34382# If the template does not know about datarootdir, expand it.
34383# FIXME: This hack should be removed a few years after 2.60.
34384ac_datarootdir_hack=; ac_datarootdir_seen=
34385ac_sed_dataroot='
34386/datarootdir/ {
34387  p
34388  q
34389}
34390/@datadir@/p
34391/@docdir@/p
34392/@infodir@/p
34393/@localedir@/p
34394/@mandir@/p'
34395case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
34396*datarootdir*) ac_datarootdir_seen=yes;;
34397*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
34398  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
34399$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
34400_ACEOF
34401cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34402  ac_datarootdir_hack='
34403  s&@datadir@&$datadir&g
34404  s&@docdir@&$docdir&g
34405  s&@infodir@&$infodir&g
34406  s&@localedir@&$localedir&g
34407  s&@mandir@&$mandir&g
34408  s&\\\${datarootdir}&$datarootdir&g' ;;
34409esac
34410_ACEOF
34411
34412# Neutralize VPATH when `$srcdir' = `.'.
34413# Shell code in configure.ac might set extrasub.
34414# FIXME: do we really want to maintain this feature?
34415cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34416ac_sed_extra="$ac_vpsub
34417$extrasub
34418_ACEOF
34419cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34420:t
34421/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
34422s|@configure_input@|$ac_sed_conf_input|;t t
34423s&@top_builddir@&$ac_top_builddir_sub&;t t
34424s&@top_build_prefix@&$ac_top_build_prefix&;t t
34425s&@srcdir@&$ac_srcdir&;t t
34426s&@abs_srcdir@&$ac_abs_srcdir&;t t
34427s&@top_srcdir@&$ac_top_srcdir&;t t
34428s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
34429s&@builddir@&$ac_builddir&;t t
34430s&@abs_builddir@&$ac_abs_builddir&;t t
34431s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
34432$ac_datarootdir_hack
34433"
34434eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
34435  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
34436
34437test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
34438  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
34439  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
34440      "$ac_tmp/out"`; test -z "$ac_out"; } &&
34441  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
34442which seems to be undefined.  Please make sure it is defined" >&5
34443$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
34444which seems to be undefined.  Please make sure it is defined" >&2;}
34445
34446  rm -f "$ac_tmp/stdin"
34447  case $ac_file in
34448  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
34449  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
34450  esac \
34451  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
34452 ;;
34453  :H)
34454  #
34455  # CONFIG_HEADER
34456  #
34457  if test x"$ac_file" != x-; then
34458    {
34459      $as_echo "/* $configure_input  */" \
34460      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
34461    } >"$ac_tmp/config.h" \
34462      || as_fn_error $? "could not create $ac_file" "$LINENO" 5
34463    if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
34464      { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
34465$as_echo "$as_me: $ac_file is unchanged" >&6;}
34466    else
34467      rm -f "$ac_file"
34468      mv "$ac_tmp/config.h" "$ac_file" \
34469	|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
34470    fi
34471  else
34472    $as_echo "/* $configure_input  */" \
34473      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
34474      || as_fn_error $? "could not create -" "$LINENO" 5
34475  fi
34476 ;;
34477
34478
34479  esac
34480
34481done # for ac_tag
34482
34483
34484as_fn_exit 0
34485_ACEOF
34486ac_clean_files=$ac_clean_files_save
34487
34488test $ac_write_fail = 0 ||
34489  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
34490
34491
34492# configure is writing to config.log, and then calls config.status.
34493# config.status does its own redirection, appending to config.log.
34494# Unfortunately, on DOS this fails, as config.log is still kept open
34495# by configure, so config.status won't be able to write to it; its
34496# output is simply discarded.  So we exec the FD to /dev/null,
34497# effectively closing config.log, so it can be properly (re)opened and
34498# appended to by config.status.  When coming back to configure, we
34499# need to make the FD available again.
34500if test "$no_create" != yes; then
34501  ac_cs_success=:
34502  ac_config_status_args=
34503  test "$silent" = yes &&
34504    ac_config_status_args="$ac_config_status_args --quiet"
34505  exec 5>/dev/null
34506  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
34507  exec 5>>config.log
34508  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
34509  # would make configure fail if this is the last instruction.
34510  $ac_cs_success || as_fn_exit 1
34511fi
34512if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
34513  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
34514$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
34515fi
34516
34517
34518# Try to move the config.log file to the output directory.
34519if test -e ./config.log; then
34520  $MV -f ./config.log "$OUTPUT_ROOT/config.log" 2> /dev/null
34521fi
34522
34523# Make the compare script executable
34524$CHMOD +x $OUTPUT_ROOT/compare.sh
34525
34526# Finally output some useful information to the user
34527
34528# Finally output some useful information to the user
34529
34530if test "x$CCACHE_FOUND" != x; then
34531	if  test "x$HAS_GOOD_CCACHE" = x; then
34532		CCACHE_STATUS="installed, but disabled (version older than 3.1.4)"
34533		CCACHE_HELP_MSG="You have ccache installed, but it is a version prior to 3.1.4. Try upgrading."
34534	else
34535		CCACHE_STATUS="installed and in use"
34536	fi
34537else
34538	if test "x$GCC" = xyes; then
34539		CCACHE_STATUS="not installed (consider installing)"
34540		CCACHE_HELP_MSG="You do not have ccache installed. Try installing it."
34541	else
34542		CCACHE_STATUS="not available for your system"
34543	fi
34544fi
34545
34546printf "\n"
34547printf "====================================================\n"
34548printf "A new configuration has been successfully created in\n"
34549printf "$OUTPUT_ROOT\n"
34550if test "x$CONFIGURE_COMMAND_LINE" != x; then
34551	printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
34552else
34553	printf "using default settings.\n"
34554fi
34555
34556printf "\n"
34557printf "Configuration summary:\n"
34558printf "* Debug level:    $DEBUG_LEVEL\n"
34559printf "* JDK variant:    $JDK_VARIANT\n"
34560printf "* JVM variants:   $with_jvm_variants\n"
34561printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
34562
34563printf "\n"
34564printf "Tools summary:\n"
34565if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
34566  printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
34567fi
34568printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
34569printf "* C Compiler:     $CC_VENDOR version $CC_VERSION (at $CC)\n"
34570printf "* C++ Compiler:   $CXX_VENDOR version $CXX_VERSION (at $CXX)\n"
34571
34572printf "\n"
34573printf "Build performance summary:\n"
34574printf "* Cores to use:   $JOBS\n"
34575printf "* Memory limit:   $MEMORY_SIZE MB\n"
34576printf "* ccache status:  $CCACHE_STATUS\n"
34577printf "\n"
34578
34579if test "x$CCACHE_HELP_MSG" != x && test "x$HIDE_PERFORMANCE_HINTS" = "xno"; then
34580	printf "Build performance tip: ccache gives a tremendous speedup for C++ recompilations.\n"
34581	printf "$CCACHE_HELP_MSG\n"
34582
34583    # Print a helpful message on how to acquire the necessary build dependency.
34584    # ccache is the help tag: freetyp2, cups, pulse, alsa etc
34585    MISSING_DEPENDENCY=ccache
34586    PKGHANDLER_COMMAND=
34587
34588    case $PKGHANDLER in
34589	apt-get)
34590                apt_help     $MISSING_DEPENDENCY ;;
34591    yum)
34592                yum_help     $MISSING_DEPENDENCY ;;
34593	port)
34594                port_help    $MISSING_DEPENDENCY ;;
34595	pkgutil)
34596                pkgutil_help $MISSING_DEPENDENCY ;;
34597	pkgadd)
34598                pkgadd_help  $MISSING_DEPENDENCY ;;
34599    * )
34600      break ;;
34601    esac
34602
34603    if test "x$PKGHANDLER_COMMAND" != x; then
34604        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
34605    fi
34606
34607	printf "$HELP_MSG\n"
34608	printf "\n"
34609fi
34610
34611if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
34612	printf "NOTE: You have requested to build more than one version of the JVM, which\n"
34613	printf "will result in longer build times.\n"
34614	printf "\n"
34615fi
34616
34617if test "x$FOUND_ALT_VARIABLES" != "x"; then
34618	printf "WARNING: You have old-style ALT_ environment variables set.\n"
34619	printf "These are not respected, and will be ignored. It is recommended\n"
34620	printf "that you clean your environment. The following variables are set:\n"
34621	printf "$FOUND_ALT_VARIABLES\n"
34622	printf "\n"
34623fi
34624
34625if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
34626	printf "WARNING: Your build output directory is not on a local disk.\n"
34627	printf "This will severely degrade build performance!\n"
34628	printf "It is recommended that you create an output directory on a local disk,\n"
34629	printf "and run the configure script again from that directory.\n"
34630	printf "\n"
34631fi
34632
34633if test "x$IS_RECONFIGURE" = "xyes"; then
34634	printf "WARNING: The result of this configuration has overridden an older\n"
34635	printf "configuration. You *should* run 'make clean' to make sure you get a\n"
34636	printf "proper build. Failure to do so might result in strange build problems.\n"
34637	printf "\n"
34638fi
34639
34640