generated-configure.sh revision 796:ac3f5137f84d
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_build_number
1020with_user_release_suffix
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_jtreg
1036with_extra_cflags
1037with_extra_cxxflags
1038with_extra_ldflags
1039enable_debug_symbols
1040enable_zip_debug_info
1041enable_macosx_runtime_support
1042with_x
1043with_cups
1044with_cups_include
1045with_freetype
1046with_alsa
1047with_alsa_include
1048with_alsa_lib
1049with_giflib
1050with_zlib
1051with_stdc__lib
1052with_num_cores
1053with_memory_size
1054with_jobs
1055with_sjavac_server_java
1056enable_sjavac
1057enable_precompiled_headers
1058enable_ccache
1059with_ccache_dir
1060'
1061      ac_precious_vars='build_alias
1062host_alias
1063target_alias
1064PKG_CONFIG
1065CC
1066CFLAGS
1067LDFLAGS
1068LIBS
1069CPPFLAGS
1070CXX
1071CXXFLAGS
1072CCC
1073OBJC
1074OBJCFLAGS
1075CPP
1076CXXCPP
1077XMKMF
1078FREETYPE2_CFLAGS
1079FREETYPE2_LIBS
1080ALSA_CFLAGS
1081ALSA_LIBS
1082LIBFFI_CFLAGS
1083LIBFFI_LIBS'
1084
1085
1086# Initialize some variables set by options.
1087ac_init_help=
1088ac_init_version=false
1089ac_unrecognized_opts=
1090ac_unrecognized_sep=
1091# The variables have the same names as the options, with
1092# dashes changed to underlines.
1093cache_file=/dev/null
1094exec_prefix=NONE
1095no_create=
1096no_recursion=
1097prefix=NONE
1098program_prefix=NONE
1099program_suffix=NONE
1100program_transform_name=s,x,x,
1101silent=
1102site=
1103srcdir=
1104verbose=
1105x_includes=NONE
1106x_libraries=NONE
1107
1108# Installation directory options.
1109# These are left unexpanded so users can "make install exec_prefix=/foo"
1110# and all the variables that are supposed to be based on exec_prefix
1111# by default will actually change.
1112# Use braces instead of parens because sh, perl, etc. also accept them.
1113# (The list follows the same order as the GNU Coding Standards.)
1114bindir='${exec_prefix}/bin'
1115sbindir='${exec_prefix}/sbin'
1116libexecdir='${exec_prefix}/libexec'
1117datarootdir='${prefix}/share'
1118datadir='${datarootdir}'
1119sysconfdir='${prefix}/etc'
1120sharedstatedir='${prefix}/com'
1121localstatedir='${prefix}/var'
1122includedir='${prefix}/include'
1123oldincludedir='/usr/include'
1124docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1125infodir='${datarootdir}/info'
1126htmldir='${docdir}'
1127dvidir='${docdir}'
1128pdfdir='${docdir}'
1129psdir='${docdir}'
1130libdir='${exec_prefix}/lib'
1131localedir='${datarootdir}/locale'
1132mandir='${datarootdir}/man'
1133
1134ac_prev=
1135ac_dashdash=
1136for ac_option
1137do
1138  # If the previous option needs an argument, assign it.
1139  if test -n "$ac_prev"; then
1140    eval $ac_prev=\$ac_option
1141    ac_prev=
1142    continue
1143  fi
1144
1145  case $ac_option in
1146  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1147  *=)   ac_optarg= ;;
1148  *)    ac_optarg=yes ;;
1149  esac
1150
1151  # Accept the important Cygnus configure options, so we can diagnose typos.
1152
1153  case $ac_dashdash$ac_option in
1154  --)
1155    ac_dashdash=yes ;;
1156
1157  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1158    ac_prev=bindir ;;
1159  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1160    bindir=$ac_optarg ;;
1161
1162  -build | --build | --buil | --bui | --bu)
1163    ac_prev=build_alias ;;
1164  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1165    build_alias=$ac_optarg ;;
1166
1167  -cache-file | --cache-file | --cache-fil | --cache-fi \
1168  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1169    ac_prev=cache_file ;;
1170  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1171  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1172    cache_file=$ac_optarg ;;
1173
1174  --config-cache | -C)
1175    cache_file=config.cache ;;
1176
1177  -datadir | --datadir | --datadi | --datad)
1178    ac_prev=datadir ;;
1179  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1180    datadir=$ac_optarg ;;
1181
1182  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1183  | --dataroo | --dataro | --datar)
1184    ac_prev=datarootdir ;;
1185  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1186  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1187    datarootdir=$ac_optarg ;;
1188
1189  -disable-* | --disable-*)
1190    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1191    # Reject names that are not valid shell variable names.
1192    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1193      as_fn_error $? "invalid feature name: $ac_useropt"
1194    ac_useropt_orig=$ac_useropt
1195    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1196    case $ac_user_opts in
1197      *"
1198"enable_$ac_useropt"
1199"*) ;;
1200      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1201	 ac_unrecognized_sep=', ';;
1202    esac
1203    eval enable_$ac_useropt=no ;;
1204
1205  -docdir | --docdir | --docdi | --doc | --do)
1206    ac_prev=docdir ;;
1207  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1208    docdir=$ac_optarg ;;
1209
1210  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1211    ac_prev=dvidir ;;
1212  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1213    dvidir=$ac_optarg ;;
1214
1215  -enable-* | --enable-*)
1216    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1217    # Reject names that are not valid shell variable names.
1218    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1219      as_fn_error $? "invalid feature name: $ac_useropt"
1220    ac_useropt_orig=$ac_useropt
1221    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1222    case $ac_user_opts in
1223      *"
1224"enable_$ac_useropt"
1225"*) ;;
1226      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1227	 ac_unrecognized_sep=', ';;
1228    esac
1229    eval enable_$ac_useropt=\$ac_optarg ;;
1230
1231  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1232  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1233  | --exec | --exe | --ex)
1234    ac_prev=exec_prefix ;;
1235  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1236  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1237  | --exec=* | --exe=* | --ex=*)
1238    exec_prefix=$ac_optarg ;;
1239
1240  -gas | --gas | --ga | --g)
1241    # Obsolete; use --with-gas.
1242    with_gas=yes ;;
1243
1244  -help | --help | --hel | --he | -h)
1245    ac_init_help=long ;;
1246  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1247    ac_init_help=recursive ;;
1248  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1249    ac_init_help=short ;;
1250
1251  -host | --host | --hos | --ho)
1252    ac_prev=host_alias ;;
1253  -host=* | --host=* | --hos=* | --ho=*)
1254    host_alias=$ac_optarg ;;
1255
1256  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1257    ac_prev=htmldir ;;
1258  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1259  | --ht=*)
1260    htmldir=$ac_optarg ;;
1261
1262  -includedir | --includedir | --includedi | --included | --include \
1263  | --includ | --inclu | --incl | --inc)
1264    ac_prev=includedir ;;
1265  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1266  | --includ=* | --inclu=* | --incl=* | --inc=*)
1267    includedir=$ac_optarg ;;
1268
1269  -infodir | --infodir | --infodi | --infod | --info | --inf)
1270    ac_prev=infodir ;;
1271  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1272    infodir=$ac_optarg ;;
1273
1274  -libdir | --libdir | --libdi | --libd)
1275    ac_prev=libdir ;;
1276  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1277    libdir=$ac_optarg ;;
1278
1279  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1280  | --libexe | --libex | --libe)
1281    ac_prev=libexecdir ;;
1282  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1283  | --libexe=* | --libex=* | --libe=*)
1284    libexecdir=$ac_optarg ;;
1285
1286  -localedir | --localedir | --localedi | --localed | --locale)
1287    ac_prev=localedir ;;
1288  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1289    localedir=$ac_optarg ;;
1290
1291  -localstatedir | --localstatedir | --localstatedi | --localstated \
1292  | --localstate | --localstat | --localsta | --localst | --locals)
1293    ac_prev=localstatedir ;;
1294  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1295  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1296    localstatedir=$ac_optarg ;;
1297
1298  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1299    ac_prev=mandir ;;
1300  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1301    mandir=$ac_optarg ;;
1302
1303  -nfp | --nfp | --nf)
1304    # Obsolete; use --without-fp.
1305    with_fp=no ;;
1306
1307  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1308  | --no-cr | --no-c | -n)
1309    no_create=yes ;;
1310
1311  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1312  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1313    no_recursion=yes ;;
1314
1315  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1316  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1317  | --oldin | --oldi | --old | --ol | --o)
1318    ac_prev=oldincludedir ;;
1319  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1320  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1321  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1322    oldincludedir=$ac_optarg ;;
1323
1324  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1325    ac_prev=prefix ;;
1326  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1327    prefix=$ac_optarg ;;
1328
1329  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1330  | --program-pre | --program-pr | --program-p)
1331    ac_prev=program_prefix ;;
1332  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1333  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1334    program_prefix=$ac_optarg ;;
1335
1336  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1337  | --program-suf | --program-su | --program-s)
1338    ac_prev=program_suffix ;;
1339  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1340  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1341    program_suffix=$ac_optarg ;;
1342
1343  -program-transform-name | --program-transform-name \
1344  | --program-transform-nam | --program-transform-na \
1345  | --program-transform-n | --program-transform- \
1346  | --program-transform | --program-transfor \
1347  | --program-transfo | --program-transf \
1348  | --program-trans | --program-tran \
1349  | --progr-tra | --program-tr | --program-t)
1350    ac_prev=program_transform_name ;;
1351  -program-transform-name=* | --program-transform-name=* \
1352  | --program-transform-nam=* | --program-transform-na=* \
1353  | --program-transform-n=* | --program-transform-=* \
1354  | --program-transform=* | --program-transfor=* \
1355  | --program-transfo=* | --program-transf=* \
1356  | --program-trans=* | --program-tran=* \
1357  | --progr-tra=* | --program-tr=* | --program-t=*)
1358    program_transform_name=$ac_optarg ;;
1359
1360  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1361    ac_prev=pdfdir ;;
1362  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1363    pdfdir=$ac_optarg ;;
1364
1365  -psdir | --psdir | --psdi | --psd | --ps)
1366    ac_prev=psdir ;;
1367  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1368    psdir=$ac_optarg ;;
1369
1370  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1371  | -silent | --silent | --silen | --sile | --sil)
1372    silent=yes ;;
1373
1374  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1375    ac_prev=sbindir ;;
1376  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1377  | --sbi=* | --sb=*)
1378    sbindir=$ac_optarg ;;
1379
1380  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1381  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1382  | --sharedst | --shareds | --shared | --share | --shar \
1383  | --sha | --sh)
1384    ac_prev=sharedstatedir ;;
1385  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1386  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1387  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1388  | --sha=* | --sh=*)
1389    sharedstatedir=$ac_optarg ;;
1390
1391  -site | --site | --sit)
1392    ac_prev=site ;;
1393  -site=* | --site=* | --sit=*)
1394    site=$ac_optarg ;;
1395
1396  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1397    ac_prev=srcdir ;;
1398  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1399    srcdir=$ac_optarg ;;
1400
1401  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1402  | --syscon | --sysco | --sysc | --sys | --sy)
1403    ac_prev=sysconfdir ;;
1404  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1405  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1406    sysconfdir=$ac_optarg ;;
1407
1408  -target | --target | --targe | --targ | --tar | --ta | --t)
1409    ac_prev=target_alias ;;
1410  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1411    target_alias=$ac_optarg ;;
1412
1413  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1414    verbose=yes ;;
1415
1416  -version | --version | --versio | --versi | --vers | -V)
1417    ac_init_version=: ;;
1418
1419  -with-* | --with-*)
1420    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1421    # Reject names that are not valid shell variable names.
1422    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1423      as_fn_error $? "invalid package name: $ac_useropt"
1424    ac_useropt_orig=$ac_useropt
1425    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1426    case $ac_user_opts in
1427      *"
1428"with_$ac_useropt"
1429"*) ;;
1430      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1431	 ac_unrecognized_sep=', ';;
1432    esac
1433    eval with_$ac_useropt=\$ac_optarg ;;
1434
1435  -without-* | --without-*)
1436    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1437    # Reject names that are not valid shell variable names.
1438    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1439      as_fn_error $? "invalid package name: $ac_useropt"
1440    ac_useropt_orig=$ac_useropt
1441    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1442    case $ac_user_opts in
1443      *"
1444"with_$ac_useropt"
1445"*) ;;
1446      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1447	 ac_unrecognized_sep=', ';;
1448    esac
1449    eval with_$ac_useropt=no ;;
1450
1451  --x)
1452    # Obsolete; use --with-x.
1453    with_x=yes ;;
1454
1455  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1456  | --x-incl | --x-inc | --x-in | --x-i)
1457    ac_prev=x_includes ;;
1458  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1459  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1460    x_includes=$ac_optarg ;;
1461
1462  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1463  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1464    ac_prev=x_libraries ;;
1465  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1466  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1467    x_libraries=$ac_optarg ;;
1468
1469  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1470Try \`$0 --help' for more information"
1471    ;;
1472
1473  *=*)
1474    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1475    # Reject names that are not valid shell variable names.
1476    case $ac_envvar in #(
1477      '' | [0-9]* | *[!_$as_cr_alnum]* )
1478      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1479    esac
1480    eval $ac_envvar=\$ac_optarg
1481    export $ac_envvar ;;
1482
1483  *)
1484    # FIXME: should be removed in autoconf 3.0.
1485    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1486    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1487      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1488    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1489    ;;
1490
1491  esac
1492done
1493
1494if test -n "$ac_prev"; then
1495  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1496  as_fn_error $? "missing argument to $ac_option"
1497fi
1498
1499if test -n "$ac_unrecognized_opts"; then
1500  case $enable_option_checking in
1501    no) ;;
1502    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1503    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1504  esac
1505fi
1506
1507# Check all directory arguments for consistency.
1508for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1509		datadir sysconfdir sharedstatedir localstatedir includedir \
1510		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1511		libdir localedir mandir
1512do
1513  eval ac_val=\$$ac_var
1514  # Remove trailing slashes.
1515  case $ac_val in
1516    */ )
1517      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1518      eval $ac_var=\$ac_val;;
1519  esac
1520  # Be sure to have absolute directory names.
1521  case $ac_val in
1522    [\\/$]* | ?:[\\/]* )  continue;;
1523    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1524  esac
1525  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1526done
1527
1528# There might be people who depend on the old broken behavior: `$host'
1529# used to hold the argument of --host etc.
1530# FIXME: To remove some day.
1531build=$build_alias
1532host=$host_alias
1533target=$target_alias
1534
1535# FIXME: To remove some day.
1536if test "x$host_alias" != x; then
1537  if test "x$build_alias" = x; then
1538    cross_compiling=maybe
1539  elif test "x$build_alias" != "x$host_alias"; then
1540    cross_compiling=yes
1541  fi
1542fi
1543
1544ac_tool_prefix=
1545test -n "$host_alias" && ac_tool_prefix=$host_alias-
1546
1547test "$silent" = yes && exec 6>/dev/null
1548
1549
1550ac_pwd=`pwd` && test -n "$ac_pwd" &&
1551ac_ls_di=`ls -di .` &&
1552ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1553  as_fn_error $? "working directory cannot be determined"
1554test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1555  as_fn_error $? "pwd does not report name of working directory"
1556
1557
1558# Find the source files, if location was not specified.
1559if test -z "$srcdir"; then
1560  ac_srcdir_defaulted=yes
1561  # Try the directory containing this script, then the parent directory.
1562  ac_confdir=`$as_dirname -- "$as_myself" ||
1563$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1564	 X"$as_myself" : 'X\(//\)[^/]' \| \
1565	 X"$as_myself" : 'X\(//\)$' \| \
1566	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1567$as_echo X"$as_myself" |
1568    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1569	    s//\1/
1570	    q
1571	  }
1572	  /^X\(\/\/\)[^/].*/{
1573	    s//\1/
1574	    q
1575	  }
1576	  /^X\(\/\/\)$/{
1577	    s//\1/
1578	    q
1579	  }
1580	  /^X\(\/\).*/{
1581	    s//\1/
1582	    q
1583	  }
1584	  s/.*/./; q'`
1585  srcdir=$ac_confdir
1586  if test ! -r "$srcdir/$ac_unique_file"; then
1587    srcdir=..
1588  fi
1589else
1590  ac_srcdir_defaulted=no
1591fi
1592if test ! -r "$srcdir/$ac_unique_file"; then
1593  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1594  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1595fi
1596ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1597ac_abs_confdir=`(
1598	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1599	pwd)`
1600# When building in place, set srcdir=.
1601if test "$ac_abs_confdir" = "$ac_pwd"; then
1602  srcdir=.
1603fi
1604# Remove unnecessary trailing slashes from srcdir.
1605# Double slashes in file names in object file debugging info
1606# mess up M-x gdb in Emacs.
1607case $srcdir in
1608*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1609esac
1610for ac_var in $ac_precious_vars; do
1611  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1612  eval ac_env_${ac_var}_value=\$${ac_var}
1613  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1614  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1615done
1616
1617#
1618# Report the --help message.
1619#
1620if test "$ac_init_help" = "long"; then
1621  # Omit some internal or obsolete options to make the list less imposing.
1622  # This message is too long to be a string in the A/UX 3.1 sh.
1623  cat <<_ACEOF
1624\`configure' configures OpenJDK jdk8 to adapt to many kinds of systems.
1625
1626Usage: $0 [OPTION]... [VAR=VALUE]...
1627
1628To assign environment variables (e.g., CC, CFLAGS...), specify them as
1629VAR=VALUE.  See below for descriptions of some of the useful variables.
1630
1631Defaults for the options are specified in brackets.
1632
1633Configuration:
1634  -h, --help              display this help and exit
1635      --help=short        display options specific to this package
1636      --help=recursive    display the short help of all the included packages
1637  -V, --version           display version information and exit
1638  -q, --quiet, --silent   do not print \`checking ...' messages
1639      --cache-file=FILE   cache test results in FILE [disabled]
1640  -C, --config-cache      alias for \`--cache-file=config.cache'
1641  -n, --no-create         do not create output files
1642      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1643
1644Installation directories:
1645  --prefix=PREFIX         install architecture-independent files in PREFIX
1646                          [$ac_default_prefix]
1647  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1648                          [PREFIX]
1649
1650By default, \`make install' will install all the files in
1651\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1652an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1653for instance \`--prefix=\$HOME'.
1654
1655For better control, use the options below.
1656
1657Fine tuning of the installation directories:
1658  --bindir=DIR            user executables [EPREFIX/bin]
1659  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1660  --libexecdir=DIR        program executables [EPREFIX/libexec]
1661  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1662  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1663  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1664  --libdir=DIR            object code libraries [EPREFIX/lib]
1665  --includedir=DIR        C header files [PREFIX/include]
1666  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1667  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1668  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1669  --infodir=DIR           info documentation [DATAROOTDIR/info]
1670  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1671  --mandir=DIR            man documentation [DATAROOTDIR/man]
1672  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1673  --htmldir=DIR           html documentation [DOCDIR]
1674  --dvidir=DIR            dvi documentation [DOCDIR]
1675  --pdfdir=DIR            pdf documentation [DOCDIR]
1676  --psdir=DIR             ps documentation [DOCDIR]
1677_ACEOF
1678
1679  cat <<\_ACEOF
1680
1681X features:
1682  --x-includes=DIR    X include files are in DIR
1683  --x-libraries=DIR   X library files are in DIR
1684
1685System types:
1686  --build=BUILD     configure for building on BUILD [guessed]
1687  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1688  --target=TARGET   configure for building compilers for TARGET [HOST]
1689_ACEOF
1690fi
1691
1692if test -n "$ac_init_help"; then
1693  case $ac_init_help in
1694     short | recursive ) echo "Configuration of OpenJDK jdk8:";;
1695   esac
1696  cat <<\_ACEOF
1697
1698Optional Features:
1699  --disable-option-checking  ignore unrecognized --enable/--with options
1700  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1701  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1702  --enable-openjdk-only   suppress building custom source even if present
1703                          [disabled]
1704  --enable-debug          set the debug level to fastdebug (shorthand for
1705                          --with-debug-level=fastdebug) [disabled]
1706  --disable-headful       disable building headful support (graphical UI
1707                          support) [enabled]
1708  --enable-hotspot-test-in-build
1709                          run the Queens test after Hotspot build [disabled]
1710  --enable-unlimited-crypto
1711                          Enable unlimited crypto policy [disabled]
1712  --disable-debug-symbols disable generation of debug symbols [enabled]
1713  --disable-zip-debug-info
1714                          disable zipping of debug-info files [enabled]
1715  --disable-macosx-runtime-support
1716                          disable the use of MacOSX Java runtime support
1717                          framework [enabled]
1718  --enable-sjavac         use sjavac to do fast incremental compiles
1719                          [disabled]
1720  --disable-precompiled-headers
1721                          disable using precompiled headers when compiling C++
1722                          [enabled]
1723  --disable-ccache        disable using ccache to speed up recompilations
1724                          [enabled]
1725
1726Optional Packages:
1727  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1728  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1729  --with-custom-make-dir  use this directory for custom build/make files
1730  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
1731                          support it), e.g. --with-target-bits=32 [guessed]
1732  --with-sys-root         pass this sys-root to the compilers and tools (for
1733                          cross-compiling)
1734  --with-tools-dir        search this directory for compilers and tools (for
1735                          cross-compiling)
1736  --with-devkit           use this directory as base for tools-dir and
1737                          sys-root (for cross-compiling)
1738  --with-jdk-variant      JDK variant to build (normal) [normal]
1739  --with-jvm-variants     JVM variants (separated by commas) to build (server,
1740                          client, minimal1, kernel, zero, zeroshark) [server]
1741  --with-debug-level      set the debug level (release, fastdebug, slowdebug)
1742                          [release]
1743  --with-conf-name        use this as the name of the configuration [generated
1744                          from important configuration options]
1745  --with-builddeps-conf   use this configuration file for the builddeps
1746  --with-builddeps-server download and use build dependencies from this server
1747                          url
1748  --with-builddeps-dir    store downloaded build dependencies here
1749                          [/localhome/builddeps]
1750  --with-builddeps-group  chgrp the downloaded build dependencies to this
1751                          group
1752  --with-cacerts-file     specify alternative cacerts file
1753  --with-milestone        Set milestone value for build [internal]
1754  --with-update-version   Set update version value for build [b00]
1755  --with-build-number     Set build number value for build [b00]
1756  --with-user-release-suffix
1757                          Add a custom string to the version string if build
1758                          number isn't set.[username_builddateb00]
1759  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
1760  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all
1761                          invocations of the Boot JDK, overriding the default
1762                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
1763                          -enableassertions"
1764  --with-add-source-root  for each and every source directory, look in this
1765                          additional source root for the same directory; if it
1766                          exists and have files in it, include it in the build
1767  --with-override-source-root
1768                          for each and every source directory, look in this
1769                          override source root for the same directory; if it
1770                          exists, use that directory instead and ignore the
1771                          directory in the original source root
1772  --with-adds-and-overrides
1773                          use the subdirs 'adds' and 'overrides' in the
1774                          specified directory as add-source-root and
1775                          override-source-root
1776  --with-override-langtools
1777                          use this langtools dir for the build
1778  --with-override-corba   use this corba dir for the build
1779  --with-override-jaxp    use this jaxp dir for the build
1780  --with-override-jaxws   use this jaxws dir for the build
1781  --with-override-hotspot use this hotspot dir for the build
1782  --with-override-nashorn use this nashorn dir for the build
1783  --with-override-jdk     use this jdk dir for the build
1784  --with-import-hotspot   import hotspot binaries from this jdk image or
1785                          hotspot build dist dir instead of building from
1786                          source
1787  --with-msvcr-dll        copy this msvcr100.dll into the built JDK (Windows
1788                          only) [probed]
1789  --with-jtreg            Regression Test Harness [probed]
1790  --with-extra-cflags     extra flags to be used when compiling jdk c-files
1791  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
1792  --with-extra-ldflags    extra flags to be used when linking jdk
1793  --with-x                use the X Window System
1794  --with-cups             specify prefix directory for the cups package
1795                          (expecting the headers under PATH/include)
1796  --with-cups-include     specify directory for the cups include files
1797  --with-freetype         specify prefix directory for the freetype2 package
1798                          (expecting the libraries under PATH/lib and the
1799                          headers under PATH/include)
1800  --with-alsa             specify prefix directory for the alsa package
1801                          (expecting the libraries under PATH/lib and the
1802                          headers under PATH/include)
1803  --with-alsa-include     specify directory for the alsa include files
1804  --with-alsa-lib         specify directory for the alsa library
1805  --with-giflib           use giflib from build system or OpenJDK source
1806                          (system, bundled) [bundled]
1807  --with-zlib             use zlib from build system or OpenJDK source
1808                          (system, bundled) [bundled]
1809  --with-stdc++lib=<static>,<dynamic>,<default>
1810                          force linking of the C++ runtime on Linux to either
1811                          static or dynamic, default is static with dynamic as
1812                          fallback
1813  --with-num-cores        number of cores in the build system, e.g.
1814                          --with-num-cores=8 [probed]
1815  --with-memory-size      memory (in MB) available in the build system, e.g.
1816                          --with-memory-size=1024 [probed]
1817  --with-jobs             number of parallel jobs to let make run [calculated
1818                          based on cores and memory]
1819  --with-sjavac-server-java
1820                          use this java binary for running the sjavac
1821                          background server [Boot JDK java]
1822  --with-ccache-dir       where to store ccache files [~/.ccache]
1823
1824Some influential environment variables:
1825  PKG_CONFIG  path to pkg-config utility
1826  CC          C compiler command
1827  CFLAGS      C compiler flags
1828  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1829              nonstandard directory <lib dir>
1830  LIBS        libraries to pass to the linker, e.g. -l<library>
1831  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1832              you have headers in a nonstandard directory <include dir>
1833  CXX         C++ compiler command
1834  CXXFLAGS    C++ compiler flags
1835  OBJC        Objective C compiler command
1836  OBJCFLAGS   Objective C compiler flags
1837  CPP         C preprocessor
1838  CXXCPP      C++ preprocessor
1839  XMKMF       Path to xmkmf, Makefile generator for X Window System
1840  FREETYPE2_CFLAGS
1841              C compiler flags for FREETYPE2, overriding pkg-config
1842  FREETYPE2_LIBS
1843              linker flags for FREETYPE2, overriding pkg-config
1844  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
1845  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
1846  LIBFFI_CFLAGS
1847              C compiler flags for LIBFFI, overriding pkg-config
1848  LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
1849
1850Use these variables to override the choices made by `configure' or to help
1851it to find libraries and programs with nonstandard names/locations.
1852
1853Report bugs to <build-dev@openjdk.java.net>.
1854OpenJDK home page: <http://openjdk.java.net>.
1855_ACEOF
1856ac_status=$?
1857fi
1858
1859if test "$ac_init_help" = "recursive"; then
1860  # If there are subdirs, report their specific --help.
1861  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1862    test -d "$ac_dir" ||
1863      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1864      continue
1865    ac_builddir=.
1866
1867case "$ac_dir" in
1868.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1869*)
1870  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1871  # A ".." for each directory in $ac_dir_suffix.
1872  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1873  case $ac_top_builddir_sub in
1874  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1875  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1876  esac ;;
1877esac
1878ac_abs_top_builddir=$ac_pwd
1879ac_abs_builddir=$ac_pwd$ac_dir_suffix
1880# for backward compatibility:
1881ac_top_builddir=$ac_top_build_prefix
1882
1883case $srcdir in
1884  .)  # We are building in place.
1885    ac_srcdir=.
1886    ac_top_srcdir=$ac_top_builddir_sub
1887    ac_abs_top_srcdir=$ac_pwd ;;
1888  [\\/]* | ?:[\\/]* )  # Absolute name.
1889    ac_srcdir=$srcdir$ac_dir_suffix;
1890    ac_top_srcdir=$srcdir
1891    ac_abs_top_srcdir=$srcdir ;;
1892  *) # Relative name.
1893    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1894    ac_top_srcdir=$ac_top_build_prefix$srcdir
1895    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1896esac
1897ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1898
1899    cd "$ac_dir" || { ac_status=$?; continue; }
1900    # Check for guested configure.
1901    if test -f "$ac_srcdir/configure.gnu"; then
1902      echo &&
1903      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1904    elif test -f "$ac_srcdir/configure"; then
1905      echo &&
1906      $SHELL "$ac_srcdir/configure" --help=recursive
1907    else
1908      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1909    fi || ac_status=$?
1910    cd "$ac_pwd" || { ac_status=$?; break; }
1911  done
1912fi
1913
1914test -n "$ac_init_help" && exit $ac_status
1915if $ac_init_version; then
1916  cat <<\_ACEOF
1917OpenJDK configure jdk8
1918generated by GNU Autoconf 2.69
1919
1920Copyright (C) 2012 Free Software Foundation, Inc.
1921This configure script is free software; the Free Software Foundation
1922gives unlimited permission to copy, distribute and modify it.
1923_ACEOF
1924  exit
1925fi
1926
1927## ------------------------ ##
1928## Autoconf initialization. ##
1929## ------------------------ ##
1930
1931# ac_fn_c_try_compile LINENO
1932# --------------------------
1933# Try to compile conftest.$ac_ext, and return whether this succeeded.
1934ac_fn_c_try_compile ()
1935{
1936  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1937  rm -f conftest.$ac_objext
1938  if { { ac_try="$ac_compile"
1939case "(($ac_try" in
1940  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1941  *) ac_try_echo=$ac_try;;
1942esac
1943eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1944$as_echo "$ac_try_echo"; } >&5
1945  (eval "$ac_compile") 2>conftest.err
1946  ac_status=$?
1947  if test -s conftest.err; then
1948    grep -v '^ *+' conftest.err >conftest.er1
1949    cat conftest.er1 >&5
1950    mv -f conftest.er1 conftest.err
1951  fi
1952  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1953  test $ac_status = 0; } && {
1954	 test -z "$ac_c_werror_flag" ||
1955	 test ! -s conftest.err
1956       } && test -s conftest.$ac_objext; then :
1957  ac_retval=0
1958else
1959  $as_echo "$as_me: failed program was:" >&5
1960sed 's/^/| /' conftest.$ac_ext >&5
1961
1962	ac_retval=1
1963fi
1964  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1965  as_fn_set_status $ac_retval
1966
1967} # ac_fn_c_try_compile
1968
1969# ac_fn_cxx_try_compile LINENO
1970# ----------------------------
1971# Try to compile conftest.$ac_ext, and return whether this succeeded.
1972ac_fn_cxx_try_compile ()
1973{
1974  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1975  rm -f conftest.$ac_objext
1976  if { { ac_try="$ac_compile"
1977case "(($ac_try" in
1978  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1979  *) ac_try_echo=$ac_try;;
1980esac
1981eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1982$as_echo "$ac_try_echo"; } >&5
1983  (eval "$ac_compile") 2>conftest.err
1984  ac_status=$?
1985  if test -s conftest.err; then
1986    grep -v '^ *+' conftest.err >conftest.er1
1987    cat conftest.er1 >&5
1988    mv -f conftest.er1 conftest.err
1989  fi
1990  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1991  test $ac_status = 0; } && {
1992	 test -z "$ac_cxx_werror_flag" ||
1993	 test ! -s conftest.err
1994       } && test -s conftest.$ac_objext; then :
1995  ac_retval=0
1996else
1997  $as_echo "$as_me: failed program was:" >&5
1998sed 's/^/| /' conftest.$ac_ext >&5
1999
2000	ac_retval=1
2001fi
2002  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2003  as_fn_set_status $ac_retval
2004
2005} # ac_fn_cxx_try_compile
2006
2007# ac_fn_objc_try_compile LINENO
2008# -----------------------------
2009# Try to compile conftest.$ac_ext, and return whether this succeeded.
2010ac_fn_objc_try_compile ()
2011{
2012  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2013  rm -f conftest.$ac_objext
2014  if { { ac_try="$ac_compile"
2015case "(($ac_try" in
2016  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2017  *) ac_try_echo=$ac_try;;
2018esac
2019eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2020$as_echo "$ac_try_echo"; } >&5
2021  (eval "$ac_compile") 2>conftest.err
2022  ac_status=$?
2023  if test -s conftest.err; then
2024    grep -v '^ *+' conftest.err >conftest.er1
2025    cat conftest.er1 >&5
2026    mv -f conftest.er1 conftest.err
2027  fi
2028  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2029  test $ac_status = 0; } && {
2030	 test -z "$ac_objc_werror_flag" ||
2031	 test ! -s conftest.err
2032       } && test -s conftest.$ac_objext; then :
2033  ac_retval=0
2034else
2035  $as_echo "$as_me: failed program was:" >&5
2036sed 's/^/| /' conftest.$ac_ext >&5
2037
2038	ac_retval=1
2039fi
2040  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2041  as_fn_set_status $ac_retval
2042
2043} # ac_fn_objc_try_compile
2044
2045# ac_fn_c_try_cpp LINENO
2046# ----------------------
2047# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2048ac_fn_c_try_cpp ()
2049{
2050  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2051  if { { ac_try="$ac_cpp conftest.$ac_ext"
2052case "(($ac_try" in
2053  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2054  *) ac_try_echo=$ac_try;;
2055esac
2056eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2057$as_echo "$ac_try_echo"; } >&5
2058  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2059  ac_status=$?
2060  if test -s conftest.err; then
2061    grep -v '^ *+' conftest.err >conftest.er1
2062    cat conftest.er1 >&5
2063    mv -f conftest.er1 conftest.err
2064  fi
2065  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2066  test $ac_status = 0; } > conftest.i && {
2067	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2068	 test ! -s conftest.err
2069       }; then :
2070  ac_retval=0
2071else
2072  $as_echo "$as_me: failed program was:" >&5
2073sed 's/^/| /' conftest.$ac_ext >&5
2074
2075    ac_retval=1
2076fi
2077  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2078  as_fn_set_status $ac_retval
2079
2080} # ac_fn_c_try_cpp
2081
2082# ac_fn_cxx_try_cpp LINENO
2083# ------------------------
2084# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2085ac_fn_cxx_try_cpp ()
2086{
2087  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2088  if { { ac_try="$ac_cpp conftest.$ac_ext"
2089case "(($ac_try" in
2090  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2091  *) ac_try_echo=$ac_try;;
2092esac
2093eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2094$as_echo "$ac_try_echo"; } >&5
2095  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2096  ac_status=$?
2097  if test -s conftest.err; then
2098    grep -v '^ *+' conftest.err >conftest.er1
2099    cat conftest.er1 >&5
2100    mv -f conftest.er1 conftest.err
2101  fi
2102  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2103  test $ac_status = 0; } > conftest.i && {
2104	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2105	 test ! -s conftest.err
2106       }; then :
2107  ac_retval=0
2108else
2109  $as_echo "$as_me: failed program was:" >&5
2110sed 's/^/| /' conftest.$ac_ext >&5
2111
2112    ac_retval=1
2113fi
2114  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2115  as_fn_set_status $ac_retval
2116
2117} # ac_fn_cxx_try_cpp
2118
2119# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2120# ---------------------------------------------------------
2121# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2122# the include files in INCLUDES and setting the cache variable VAR
2123# accordingly.
2124ac_fn_cxx_check_header_mongrel ()
2125{
2126  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2127  if eval \${$3+:} false; then :
2128  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2129$as_echo_n "checking for $2... " >&6; }
2130if eval \${$3+:} false; then :
2131  $as_echo_n "(cached) " >&6
2132fi
2133eval ac_res=\$$3
2134	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2135$as_echo "$ac_res" >&6; }
2136else
2137  # Is the header compilable?
2138{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2139$as_echo_n "checking $2 usability... " >&6; }
2140cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2141/* end confdefs.h.  */
2142$4
2143#include <$2>
2144_ACEOF
2145if ac_fn_cxx_try_compile "$LINENO"; then :
2146  ac_header_compiler=yes
2147else
2148  ac_header_compiler=no
2149fi
2150rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2151{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2152$as_echo "$ac_header_compiler" >&6; }
2153
2154# Is the header present?
2155{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2156$as_echo_n "checking $2 presence... " >&6; }
2157cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2158/* end confdefs.h.  */
2159#include <$2>
2160_ACEOF
2161if ac_fn_cxx_try_cpp "$LINENO"; then :
2162  ac_header_preproc=yes
2163else
2164  ac_header_preproc=no
2165fi
2166rm -f conftest.err conftest.i conftest.$ac_ext
2167{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2168$as_echo "$ac_header_preproc" >&6; }
2169
2170# So?  What about this header?
2171case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2172  yes:no: )
2173    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2174$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2175    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2176$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2177    ;;
2178  no:yes:* )
2179    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2180$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2181    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2182$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2183    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2184$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2185    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2186$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2187    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2188$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2189( $as_echo "## ----------------------------------------- ##
2190## Report this to build-dev@openjdk.java.net ##
2191## ----------------------------------------- ##"
2192     ) | sed "s/^/$as_me: WARNING:     /" >&2
2193    ;;
2194esac
2195  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2196$as_echo_n "checking for $2... " >&6; }
2197if eval \${$3+:} false; then :
2198  $as_echo_n "(cached) " >&6
2199else
2200  eval "$3=\$ac_header_compiler"
2201fi
2202eval ac_res=\$$3
2203	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2204$as_echo "$ac_res" >&6; }
2205fi
2206  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2207
2208} # ac_fn_cxx_check_header_mongrel
2209
2210# ac_fn_cxx_try_run LINENO
2211# ------------------------
2212# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2213# that executables *can* be run.
2214ac_fn_cxx_try_run ()
2215{
2216  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2217  if { { ac_try="$ac_link"
2218case "(($ac_try" in
2219  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2220  *) ac_try_echo=$ac_try;;
2221esac
2222eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2223$as_echo "$ac_try_echo"; } >&5
2224  (eval "$ac_link") 2>&5
2225  ac_status=$?
2226  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2227  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2228  { { case "(($ac_try" in
2229  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2230  *) ac_try_echo=$ac_try;;
2231esac
2232eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2233$as_echo "$ac_try_echo"; } >&5
2234  (eval "$ac_try") 2>&5
2235  ac_status=$?
2236  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2237  test $ac_status = 0; }; }; then :
2238  ac_retval=0
2239else
2240  $as_echo "$as_me: program exited with status $ac_status" >&5
2241       $as_echo "$as_me: failed program was:" >&5
2242sed 's/^/| /' conftest.$ac_ext >&5
2243
2244       ac_retval=$ac_status
2245fi
2246  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2247  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2248  as_fn_set_status $ac_retval
2249
2250} # ac_fn_cxx_try_run
2251
2252# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2253# ---------------------------------------------------------
2254# Tests whether HEADER exists and can be compiled using the include files in
2255# INCLUDES, setting the cache variable VAR accordingly.
2256ac_fn_cxx_check_header_compile ()
2257{
2258  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2259  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2260$as_echo_n "checking for $2... " >&6; }
2261if eval \${$3+:} false; then :
2262  $as_echo_n "(cached) " >&6
2263else
2264  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2265/* end confdefs.h.  */
2266$4
2267#include <$2>
2268_ACEOF
2269if ac_fn_cxx_try_compile "$LINENO"; then :
2270  eval "$3=yes"
2271else
2272  eval "$3=no"
2273fi
2274rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2275fi
2276eval ac_res=\$$3
2277	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2278$as_echo "$ac_res" >&6; }
2279  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2280
2281} # ac_fn_cxx_check_header_compile
2282
2283# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2284# ----------------------------------------------
2285# Tries to find the compile-time value of EXPR in a program that includes
2286# INCLUDES, setting VAR accordingly. Returns whether the value could be
2287# computed
2288ac_fn_cxx_compute_int ()
2289{
2290  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2291  if test "$cross_compiling" = yes; then
2292    # Depending upon the size, compute the lo and hi bounds.
2293cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2294/* end confdefs.h.  */
2295$4
2296int
2297main ()
2298{
2299static int test_array [1 - 2 * !(($2) >= 0)];
2300test_array [0] = 0;
2301return test_array [0];
2302
2303  ;
2304  return 0;
2305}
2306_ACEOF
2307if ac_fn_cxx_try_compile "$LINENO"; then :
2308  ac_lo=0 ac_mid=0
2309  while :; do
2310    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2311/* end confdefs.h.  */
2312$4
2313int
2314main ()
2315{
2316static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2317test_array [0] = 0;
2318return test_array [0];
2319
2320  ;
2321  return 0;
2322}
2323_ACEOF
2324if ac_fn_cxx_try_compile "$LINENO"; then :
2325  ac_hi=$ac_mid; break
2326else
2327  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2328			if test $ac_lo -le $ac_mid; then
2329			  ac_lo= ac_hi=
2330			  break
2331			fi
2332			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2333fi
2334rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2335  done
2336else
2337  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2338/* end confdefs.h.  */
2339$4
2340int
2341main ()
2342{
2343static int test_array [1 - 2 * !(($2) < 0)];
2344test_array [0] = 0;
2345return test_array [0];
2346
2347  ;
2348  return 0;
2349}
2350_ACEOF
2351if ac_fn_cxx_try_compile "$LINENO"; then :
2352  ac_hi=-1 ac_mid=-1
2353  while :; do
2354    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2355/* end confdefs.h.  */
2356$4
2357int
2358main ()
2359{
2360static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2361test_array [0] = 0;
2362return test_array [0];
2363
2364  ;
2365  return 0;
2366}
2367_ACEOF
2368if ac_fn_cxx_try_compile "$LINENO"; then :
2369  ac_lo=$ac_mid; break
2370else
2371  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2372			if test $ac_mid -le $ac_hi; then
2373			  ac_lo= ac_hi=
2374			  break
2375			fi
2376			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2377fi
2378rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2379  done
2380else
2381  ac_lo= ac_hi=
2382fi
2383rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2384fi
2385rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2386# Binary search between lo and hi bounds.
2387while test "x$ac_lo" != "x$ac_hi"; do
2388  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2389  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2390/* end confdefs.h.  */
2391$4
2392int
2393main ()
2394{
2395static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2396test_array [0] = 0;
2397return test_array [0];
2398
2399  ;
2400  return 0;
2401}
2402_ACEOF
2403if ac_fn_cxx_try_compile "$LINENO"; then :
2404  ac_hi=$ac_mid
2405else
2406  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2407fi
2408rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2409done
2410case $ac_lo in #((
2411?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2412'') ac_retval=1 ;;
2413esac
2414  else
2415    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2416/* end confdefs.h.  */
2417$4
2418static long int longval () { return $2; }
2419static unsigned long int ulongval () { return $2; }
2420#include <stdio.h>
2421#include <stdlib.h>
2422int
2423main ()
2424{
2425
2426  FILE *f = fopen ("conftest.val", "w");
2427  if (! f)
2428    return 1;
2429  if (($2) < 0)
2430    {
2431      long int i = longval ();
2432      if (i != ($2))
2433	return 1;
2434      fprintf (f, "%ld", i);
2435    }
2436  else
2437    {
2438      unsigned long int i = ulongval ();
2439      if (i != ($2))
2440	return 1;
2441      fprintf (f, "%lu", i);
2442    }
2443  /* Do not output a trailing newline, as this causes \r\n confusion
2444     on some platforms.  */
2445  return ferror (f) || fclose (f) != 0;
2446
2447  ;
2448  return 0;
2449}
2450_ACEOF
2451if ac_fn_cxx_try_run "$LINENO"; then :
2452  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2453else
2454  ac_retval=1
2455fi
2456rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2457  conftest.$ac_objext conftest.beam conftest.$ac_ext
2458rm -f conftest.val
2459
2460  fi
2461  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2462  as_fn_set_status $ac_retval
2463
2464} # ac_fn_cxx_compute_int
2465
2466# ac_fn_cxx_try_link LINENO
2467# -------------------------
2468# Try to link conftest.$ac_ext, and return whether this succeeded.
2469ac_fn_cxx_try_link ()
2470{
2471  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2472  rm -f conftest.$ac_objext conftest$ac_exeext
2473  if { { ac_try="$ac_link"
2474case "(($ac_try" in
2475  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2476  *) ac_try_echo=$ac_try;;
2477esac
2478eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2479$as_echo "$ac_try_echo"; } >&5
2480  (eval "$ac_link") 2>conftest.err
2481  ac_status=$?
2482  if test -s conftest.err; then
2483    grep -v '^ *+' conftest.err >conftest.er1
2484    cat conftest.er1 >&5
2485    mv -f conftest.er1 conftest.err
2486  fi
2487  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2488  test $ac_status = 0; } && {
2489	 test -z "$ac_cxx_werror_flag" ||
2490	 test ! -s conftest.err
2491       } && test -s conftest$ac_exeext && {
2492	 test "$cross_compiling" = yes ||
2493	 test -x conftest$ac_exeext
2494       }; then :
2495  ac_retval=0
2496else
2497  $as_echo "$as_me: failed program was:" >&5
2498sed 's/^/| /' conftest.$ac_ext >&5
2499
2500	ac_retval=1
2501fi
2502  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2503  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2504  # interfere with the next link command; also delete a directory that is
2505  # left behind by Apple's compiler.  We do this before executing the actions.
2506  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2507  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2508  as_fn_set_status $ac_retval
2509
2510} # ac_fn_cxx_try_link
2511
2512# ac_fn_cxx_check_func LINENO FUNC VAR
2513# ------------------------------------
2514# Tests whether FUNC exists, setting the cache variable VAR accordingly
2515ac_fn_cxx_check_func ()
2516{
2517  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2518  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2519$as_echo_n "checking for $2... " >&6; }
2520if eval \${$3+:} false; then :
2521  $as_echo_n "(cached) " >&6
2522else
2523  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2524/* end confdefs.h.  */
2525/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2526   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2527#define $2 innocuous_$2
2528
2529/* System header to define __stub macros and hopefully few prototypes,
2530    which can conflict with char $2 (); below.
2531    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2532    <limits.h> exists even on freestanding compilers.  */
2533
2534#ifdef __STDC__
2535# include <limits.h>
2536#else
2537# include <assert.h>
2538#endif
2539
2540#undef $2
2541
2542/* Override any GCC internal prototype to avoid an error.
2543   Use char because int might match the return type of a GCC
2544   builtin and then its argument prototype would still apply.  */
2545#ifdef __cplusplus
2546extern "C"
2547#endif
2548char $2 ();
2549/* The GNU C library defines this for functions which it implements
2550    to always fail with ENOSYS.  Some functions are actually named
2551    something starting with __ and the normal name is an alias.  */
2552#if defined __stub_$2 || defined __stub___$2
2553choke me
2554#endif
2555
2556int
2557main ()
2558{
2559return $2 ();
2560  ;
2561  return 0;
2562}
2563_ACEOF
2564if ac_fn_cxx_try_link "$LINENO"; then :
2565  eval "$3=yes"
2566else
2567  eval "$3=no"
2568fi
2569rm -f core conftest.err conftest.$ac_objext \
2570    conftest$ac_exeext conftest.$ac_ext
2571fi
2572eval ac_res=\$$3
2573	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2574$as_echo "$ac_res" >&6; }
2575  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2576
2577} # ac_fn_cxx_check_func
2578
2579# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2580# -------------------------------------------------------
2581# Tests whether HEADER exists and can be compiled using the include files in
2582# INCLUDES, setting the cache variable VAR accordingly.
2583ac_fn_c_check_header_compile ()
2584{
2585  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2586  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2587$as_echo_n "checking for $2... " >&6; }
2588if eval \${$3+:} false; then :
2589  $as_echo_n "(cached) " >&6
2590else
2591  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2592/* end confdefs.h.  */
2593$4
2594#include <$2>
2595_ACEOF
2596if ac_fn_c_try_compile "$LINENO"; then :
2597  eval "$3=yes"
2598else
2599  eval "$3=no"
2600fi
2601rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2602fi
2603eval ac_res=\$$3
2604	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2605$as_echo "$ac_res" >&6; }
2606  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2607
2608} # ac_fn_c_check_header_compile
2609cat >config.log <<_ACEOF
2610This file contains any messages produced by compilers while
2611running configure, to aid debugging if configure makes a mistake.
2612
2613It was created by OpenJDK $as_me jdk8, which was
2614generated by GNU Autoconf 2.69.  Invocation command line was
2615
2616  $ $0 $@
2617
2618_ACEOF
2619exec 5>>config.log
2620{
2621cat <<_ASUNAME
2622## --------- ##
2623## Platform. ##
2624## --------- ##
2625
2626hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2627uname -m = `(uname -m) 2>/dev/null || echo unknown`
2628uname -r = `(uname -r) 2>/dev/null || echo unknown`
2629uname -s = `(uname -s) 2>/dev/null || echo unknown`
2630uname -v = `(uname -v) 2>/dev/null || echo unknown`
2631
2632/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2633/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2634
2635/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2636/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2637/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2638/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2639/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2640/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2641/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2642
2643_ASUNAME
2644
2645as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2646for as_dir in $PATH
2647do
2648  IFS=$as_save_IFS
2649  test -z "$as_dir" && as_dir=.
2650    $as_echo "PATH: $as_dir"
2651  done
2652IFS=$as_save_IFS
2653
2654} >&5
2655
2656cat >&5 <<_ACEOF
2657
2658
2659## ----------- ##
2660## Core tests. ##
2661## ----------- ##
2662
2663_ACEOF
2664
2665
2666# Keep a trace of the command line.
2667# Strip out --no-create and --no-recursion so they do not pile up.
2668# Strip out --silent because we don't want to record it for future runs.
2669# Also quote any args containing shell meta-characters.
2670# Make two passes to allow for proper duplicate-argument suppression.
2671ac_configure_args=
2672ac_configure_args0=
2673ac_configure_args1=
2674ac_must_keep_next=false
2675for ac_pass in 1 2
2676do
2677  for ac_arg
2678  do
2679    case $ac_arg in
2680    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2681    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2682    | -silent | --silent | --silen | --sile | --sil)
2683      continue ;;
2684    *\'*)
2685      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2686    esac
2687    case $ac_pass in
2688    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2689    2)
2690      as_fn_append ac_configure_args1 " '$ac_arg'"
2691      if test $ac_must_keep_next = true; then
2692	ac_must_keep_next=false # Got value, back to normal.
2693      else
2694	case $ac_arg in
2695	  *=* | --config-cache | -C | -disable-* | --disable-* \
2696	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2697	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2698	  | -with-* | --with-* | -without-* | --without-* | --x)
2699	    case "$ac_configure_args0 " in
2700	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2701	    esac
2702	    ;;
2703	  -* ) ac_must_keep_next=true ;;
2704	esac
2705      fi
2706      as_fn_append ac_configure_args " '$ac_arg'"
2707      ;;
2708    esac
2709  done
2710done
2711{ ac_configure_args0=; unset ac_configure_args0;}
2712{ ac_configure_args1=; unset ac_configure_args1;}
2713
2714# When interrupted or exit'd, cleanup temporary files, and complete
2715# config.log.  We remove comments because anyway the quotes in there
2716# would cause problems or look ugly.
2717# WARNING: Use '\'' to represent an apostrophe within the trap.
2718# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2719trap 'exit_status=$?
2720  # Save into config.log some information that might help in debugging.
2721  {
2722    echo
2723
2724    $as_echo "## ---------------- ##
2725## Cache variables. ##
2726## ---------------- ##"
2727    echo
2728    # The following way of writing the cache mishandles newlines in values,
2729(
2730  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2731    eval ac_val=\$$ac_var
2732    case $ac_val in #(
2733    *${as_nl}*)
2734      case $ac_var in #(
2735      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2736$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2737      esac
2738      case $ac_var in #(
2739      _ | IFS | as_nl) ;; #(
2740      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2741      *) { eval $ac_var=; unset $ac_var;} ;;
2742      esac ;;
2743    esac
2744  done
2745  (set) 2>&1 |
2746    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2747    *${as_nl}ac_space=\ *)
2748      sed -n \
2749	"s/'\''/'\''\\\\'\'''\''/g;
2750	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2751      ;; #(
2752    *)
2753      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2754      ;;
2755    esac |
2756    sort
2757)
2758    echo
2759
2760    $as_echo "## ----------------- ##
2761## Output variables. ##
2762## ----------------- ##"
2763    echo
2764    for ac_var in $ac_subst_vars
2765    do
2766      eval ac_val=\$$ac_var
2767      case $ac_val in
2768      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2769      esac
2770      $as_echo "$ac_var='\''$ac_val'\''"
2771    done | sort
2772    echo
2773
2774    if test -n "$ac_subst_files"; then
2775      $as_echo "## ------------------- ##
2776## File substitutions. ##
2777## ------------------- ##"
2778      echo
2779      for ac_var in $ac_subst_files
2780      do
2781	eval ac_val=\$$ac_var
2782	case $ac_val in
2783	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2784	esac
2785	$as_echo "$ac_var='\''$ac_val'\''"
2786      done | sort
2787      echo
2788    fi
2789
2790    if test -s confdefs.h; then
2791      $as_echo "## ----------- ##
2792## confdefs.h. ##
2793## ----------- ##"
2794      echo
2795      cat confdefs.h
2796      echo
2797    fi
2798    test "$ac_signal" != 0 &&
2799      $as_echo "$as_me: caught signal $ac_signal"
2800    $as_echo "$as_me: exit $exit_status"
2801  } >&5
2802  rm -f core *.core core.conftest.* &&
2803    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2804    exit $exit_status
2805' 0
2806for ac_signal in 1 2 13 15; do
2807  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2808done
2809ac_signal=0
2810
2811# confdefs.h avoids OS command line length limits that DEFS can exceed.
2812rm -f -r conftest* confdefs.h
2813
2814$as_echo "/* confdefs.h */" > confdefs.h
2815
2816# Predefined preprocessor variables.
2817
2818cat >>confdefs.h <<_ACEOF
2819#define PACKAGE_NAME "$PACKAGE_NAME"
2820_ACEOF
2821
2822cat >>confdefs.h <<_ACEOF
2823#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2824_ACEOF
2825
2826cat >>confdefs.h <<_ACEOF
2827#define PACKAGE_VERSION "$PACKAGE_VERSION"
2828_ACEOF
2829
2830cat >>confdefs.h <<_ACEOF
2831#define PACKAGE_STRING "$PACKAGE_STRING"
2832_ACEOF
2833
2834cat >>confdefs.h <<_ACEOF
2835#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2836_ACEOF
2837
2838cat >>confdefs.h <<_ACEOF
2839#define PACKAGE_URL "$PACKAGE_URL"
2840_ACEOF
2841
2842
2843# Let the site file select an alternate cache file if it wants to.
2844# Prefer an explicitly selected file to automatically selected ones.
2845ac_site_file1=NONE
2846ac_site_file2=NONE
2847if test -n "$CONFIG_SITE"; then
2848  # We do not want a PATH search for config.site.
2849  case $CONFIG_SITE in #((
2850    -*)  ac_site_file1=./$CONFIG_SITE;;
2851    */*) ac_site_file1=$CONFIG_SITE;;
2852    *)   ac_site_file1=./$CONFIG_SITE;;
2853  esac
2854elif test "x$prefix" != xNONE; then
2855  ac_site_file1=$prefix/share/config.site
2856  ac_site_file2=$prefix/etc/config.site
2857else
2858  ac_site_file1=$ac_default_prefix/share/config.site
2859  ac_site_file2=$ac_default_prefix/etc/config.site
2860fi
2861for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2862do
2863  test "x$ac_site_file" = xNONE && continue
2864  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2865    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2866$as_echo "$as_me: loading site script $ac_site_file" >&6;}
2867    sed 's/^/| /' "$ac_site_file" >&5
2868    . "$ac_site_file" \
2869      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2870$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2871as_fn_error $? "failed to load site script $ac_site_file
2872See \`config.log' for more details" "$LINENO" 5; }
2873  fi
2874done
2875
2876if test -r "$cache_file"; then
2877  # Some versions of bash will fail to source /dev/null (special files
2878  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
2879  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2880    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2881$as_echo "$as_me: loading cache $cache_file" >&6;}
2882    case $cache_file in
2883      [\\/]* | ?:[\\/]* ) . "$cache_file";;
2884      *)                      . "./$cache_file";;
2885    esac
2886  fi
2887else
2888  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2889$as_echo "$as_me: creating cache $cache_file" >&6;}
2890  >$cache_file
2891fi
2892
2893# Check that the precious variables saved in the cache have kept the same
2894# value.
2895ac_cache_corrupted=false
2896for ac_var in $ac_precious_vars; do
2897  eval ac_old_set=\$ac_cv_env_${ac_var}_set
2898  eval ac_new_set=\$ac_env_${ac_var}_set
2899  eval ac_old_val=\$ac_cv_env_${ac_var}_value
2900  eval ac_new_val=\$ac_env_${ac_var}_value
2901  case $ac_old_set,$ac_new_set in
2902    set,)
2903      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2904$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2905      ac_cache_corrupted=: ;;
2906    ,set)
2907      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2908$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2909      ac_cache_corrupted=: ;;
2910    ,);;
2911    *)
2912      if test "x$ac_old_val" != "x$ac_new_val"; then
2913	# differences in whitespace do not lead to failure.
2914	ac_old_val_w=`echo x $ac_old_val`
2915	ac_new_val_w=`echo x $ac_new_val`
2916	if test "$ac_old_val_w" != "$ac_new_val_w"; then
2917	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2918$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2919	  ac_cache_corrupted=:
2920	else
2921	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2922$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2923	  eval $ac_var=\$ac_old_val
2924	fi
2925	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
2926$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
2927	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
2928$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
2929      fi;;
2930  esac
2931  # Pass precious variables to config.status.
2932  if test "$ac_new_set" = set; then
2933    case $ac_new_val in
2934    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2935    *) ac_arg=$ac_var=$ac_new_val ;;
2936    esac
2937    case " $ac_configure_args " in
2938      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
2939      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2940    esac
2941  fi
2942done
2943if $ac_cache_corrupted; then
2944  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2945$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2946  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2947$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2948  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2949fi
2950## -------------------- ##
2951## Main body of script. ##
2952## -------------------- ##
2953
2954ac_ext=c
2955ac_cpp='$CPP $CPPFLAGS'
2956ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2957ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2958ac_compiler_gnu=$ac_cv_c_compiler_gnu
2959
2960
2961
2962ac_aux_dir=
2963for ac_dir in build-aux "$srcdir"/build-aux; do
2964  if test -f "$ac_dir/install-sh"; then
2965    ac_aux_dir=$ac_dir
2966    ac_install_sh="$ac_aux_dir/install-sh -c"
2967    break
2968  elif test -f "$ac_dir/install.sh"; then
2969    ac_aux_dir=$ac_dir
2970    ac_install_sh="$ac_aux_dir/install.sh -c"
2971    break
2972  elif test -f "$ac_dir/shtool"; then
2973    ac_aux_dir=$ac_dir
2974    ac_install_sh="$ac_aux_dir/shtool install -c"
2975    break
2976  fi
2977done
2978if test -z "$ac_aux_dir"; then
2979  as_fn_error $? "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5
2980fi
2981
2982# These three variables are undocumented and unsupported,
2983# and are intended to be withdrawn in a future Autoconf release.
2984# They can cause serious problems if a builder's source tree is in a directory
2985# whose full name contains unusual characters.
2986ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
2987ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
2988ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
2989
2990
2991# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
2992
2993#
2994# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
2995# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
2996#
2997# This code is free software; you can redistribute it and/or modify it
2998# under the terms of the GNU General Public License version 2 only, as
2999# published by the Free Software Foundation.  Oracle designates this
3000# particular file as subject to the "Classpath" exception as provided
3001# by Oracle in the LICENSE file that accompanied this code.
3002#
3003# This code is distributed in the hope that it will be useful, but WITHOUT
3004# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3005# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3006# version 2 for more details (a copy is included in the LICENSE file that
3007# accompanied this code).
3008#
3009# You should have received a copy of the GNU General Public License version
3010# 2 along with this work; if not, write to the Free Software Foundation,
3011# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3012#
3013# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3014# or visit www.oracle.com if you need additional information or have any
3015# questions.
3016#
3017
3018#
3019# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
3020#
3021# This program is free software; you can redistribute it and/or modify
3022# it under the terms of the GNU General Public License as published by
3023# the Free Software Foundation; either version 2 of the License, or
3024# (at your option) any later version.
3025#
3026# This program is distributed in the hope that it will be useful, but
3027# WITHOUT ANY WARRANTY; without even the implied warranty of
3028# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3029# General Public License for more details.
3030#
3031# You should have received a copy of the GNU General Public License
3032# along with this program; if not, write to the Free Software
3033# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3034#
3035# As a special exception to the GNU General Public License, if you
3036# distribute this file as part of a program that contains a
3037# configuration script generated by Autoconf, you may include it under
3038# the same distribution terms that you use for the rest of that program.
3039
3040# PKG_PROG_PKG_CONFIG([MIN-VERSION])
3041# ----------------------------------
3042# PKG_PROG_PKG_CONFIG
3043
3044# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3045#
3046# Check to see whether a particular set of modules exists.  Similar
3047# to PKG_CHECK_MODULES(), but does not set variables or print errors.
3048#
3049#
3050# Similar to PKG_CHECK_MODULES, make sure that the first instance of
3051# this or PKG_CHECK_MODULES is called, or make sure to call
3052# PKG_CHECK_EXISTS manually
3053# --------------------------------------------------------------
3054
3055
3056
3057# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3058# ---------------------------------------------
3059# _PKG_CONFIG
3060
3061# _PKG_SHORT_ERRORS_SUPPORTED
3062# -----------------------------
3063# _PKG_SHORT_ERRORS_SUPPORTED
3064
3065
3066# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3067# [ACTION-IF-NOT-FOUND])
3068#
3069#
3070# Note that if there is a possibility the first call to
3071# PKG_CHECK_MODULES might not happen, you should be sure to include an
3072# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3073#
3074#
3075# --------------------------------------------------------------
3076# PKG_CHECK_MODULES
3077
3078
3079# Include these first...
3080#
3081# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
3082# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3083#
3084# This code is free software; you can redistribute it and/or modify it
3085# under the terms of the GNU General Public License version 2 only, as
3086# published by the Free Software Foundation.  Oracle designates this
3087# particular file as subject to the "Classpath" exception as provided
3088# by Oracle in the LICENSE file that accompanied this code.
3089#
3090# This code is distributed in the hope that it will be useful, but WITHOUT
3091# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3092# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3093# version 2 for more details (a copy is included in the LICENSE file that
3094# accompanied this code).
3095#
3096# You should have received a copy of the GNU General Public License version
3097# 2 along with this work; if not, write to the Free Software Foundation,
3098# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3099#
3100# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3101# or visit www.oracle.com if you need additional information or have any
3102# questions.
3103#
3104
3105# Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3106# If so, then append $1 to $2\
3107# Also set JVM_ARG_OK to true/false depending on outcome.
3108
3109
3110# Appends a string to a path variable, only adding the : when needed.
3111
3112
3113# This will make sure the given variable points to a full and proper
3114# path. This means:
3115# 1) There will be no spaces in the path. On posix platforms,
3116#    spaces in the path will result in an error. On Windows,
3117#    the path will be rewritten using short-style to be space-free.
3118# 2) The path will be absolute, and it will be in unix-style (on
3119#     cygwin).
3120# $1: The name of the variable to fix
3121
3122
3123# This will make sure the given variable points to a executable
3124# with a full and proper path. This means:
3125# 1) There will be no spaces in the path. On posix platforms,
3126#    spaces in the path will result in an error. On Windows,
3127#    the path will be rewritten using short-style to be space-free.
3128# 2) The path will be absolute, and it will be in unix-style (on
3129#     cygwin).
3130# Any arguments given to the executable is preserved.
3131# If the input variable does not have a directory specification, then
3132# it need to be in the PATH.
3133# $1: The name of the variable to fix
3134
3135
3136
3137
3138
3139
3140# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3141# $1: variable to check
3142# $2: executable name to print in warning (optional)
3143
3144
3145# Does AC_PATH_PROG followed by BASIC_CHECK_NONEMPTY.
3146# Arguments as AC_PATH_PROG:
3147# $1: variable to set
3148# $2: executable name to look for
3149
3150
3151# Setup the most fundamental tools that relies on not much else to set up,
3152# but is used by much of the early bootstrap code.
3153
3154
3155# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3156
3157
3158
3159
3160
3161
3162
3163#%%% Simple tools %%%
3164
3165# Check if we have found a usable version of make
3166# $1: the path to a potential make binary (or empty)
3167# $2: the description on how we found this
3168
3169
3170# Goes looking for a usable version of GNU make.
3171
3172
3173
3174
3175
3176
3177# Check if build directory is on local disk. If not possible to determine,
3178# we prefer to claim it's local.
3179# Argument 1: directory to test
3180# Argument 2: what to do if it is on local disk
3181# Argument 3: what to do otherwise (remote disk or failure)
3182
3183
3184# Check that source files have basic read permissions set. This might
3185# not be the case in cygwin in certain conditions.
3186
3187
3188
3189
3190#
3191# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3192# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3193#
3194# This code is free software; you can redistribute it and/or modify it
3195# under the terms of the GNU General Public License version 2 only, as
3196# published by the Free Software Foundation.  Oracle designates this
3197# particular file as subject to the "Classpath" exception as provided
3198# by Oracle in the LICENSE file that accompanied this code.
3199#
3200# This code is distributed in the hope that it will be useful, but WITHOUT
3201# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3202# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3203# version 2 for more details (a copy is included in the LICENSE file that
3204# accompanied this code).
3205#
3206# You should have received a copy of the GNU General Public License version
3207# 2 along with this work; if not, write to the Free Software Foundation,
3208# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3209#
3210# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3211# or visit www.oracle.com if you need additional information or have any
3212# questions.
3213#
3214
3215
3216
3217
3218
3219# Helper function which possibly converts a path using DOS-style short mode.
3220# If so, the updated path is stored in $new_path.
3221# $1: The path to check
3222
3223
3224# Helper function which possibly converts a path using DOS-style short mode.
3225# If so, the updated path is stored in $new_path.
3226# $1: The path to check
3227
3228
3229# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3230# and could probably be heavily simplified. However, all changes in this
3231# area tend to need lot of testing in different scenarios, and in lack of
3232# proper unit testing, cleaning this up has not been deemed worth the effort
3233# at the moment.
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3244
3245
3246
3247
3248#
3249# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3250# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3251#
3252# This code is free software; you can redistribute it and/or modify it
3253# under the terms of the GNU General Public License version 2 only, as
3254# published by the Free Software Foundation.  Oracle designates this
3255# particular file as subject to the "Classpath" exception as provided
3256# by Oracle in the LICENSE file that accompanied this code.
3257#
3258# This code is distributed in the hope that it will be useful, but WITHOUT
3259# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3260# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3261# version 2 for more details (a copy is included in the LICENSE file that
3262# accompanied this code).
3263#
3264# You should have received a copy of the GNU General Public License version
3265# 2 along with this work; if not, write to the Free Software Foundation,
3266# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3267#
3268# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3269# or visit www.oracle.com if you need additional information or have any
3270# questions.
3271#
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283# ... then the rest
3284#
3285# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3286# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3287#
3288# This code is free software; you can redistribute it and/or modify it
3289# under the terms of the GNU General Public License version 2 only, as
3290# published by the Free Software Foundation.  Oracle designates this
3291# particular file as subject to the "Classpath" exception as provided
3292# by Oracle in the LICENSE file that accompanied this code.
3293#
3294# This code is distributed in the hope that it will be useful, but WITHOUT
3295# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3296# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3297# version 2 for more details (a copy is included in the LICENSE file that
3298# accompanied this code).
3299#
3300# You should have received a copy of the GNU General Public License version
3301# 2 along with this work; if not, write to the Free Software Foundation,
3302# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3303#
3304# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3305# or visit www.oracle.com if you need additional information or have any
3306# questions.
3307#
3308
3309# Execute the check given as argument, and verify the result
3310# If the Boot JDK was previously found, do nothing
3311# $1 A command line (typically autoconf macro) to execute
3312
3313
3314# Test: Is bootjdk explicitely set by command line arguments?
3315
3316
3317# Test: Is bootjdk available from builddeps?
3318
3319
3320# Test: Is $JAVA_HOME set?
3321
3322
3323# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3324
3325
3326# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3327
3328
3329# Look for a jdk in the given path. If there are multiple, try to select the newest.
3330# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3331# $1 = Path to directory containing jdk installations.
3332# $2 = String to append to the found JDK directory to get the proper JDK home
3333
3334
3335# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3336# environmental variable as base for where to look.
3337# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3338
3339
3340# Test: Is there a JDK installed in default, well-known locations?
3341
3342
3343# Check that a command-line tool in the Boot JDK is correct
3344# $1 = name of variable to assign
3345# $2 = name of binary
3346
3347
3348###############################################################################
3349#
3350# We need a Boot JDK to bootstrap the build.
3351#
3352
3353
3354
3355
3356
3357#
3358# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3359# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3360#
3361# This code is free software; you can redistribute it and/or modify it
3362# under the terms of the GNU General Public License version 2 only, as
3363# published by the Free Software Foundation.  Oracle designates this
3364# particular file as subject to the "Classpath" exception as provided
3365# by Oracle in the LICENSE file that accompanied this code.
3366#
3367# This code is distributed in the hope that it will be useful, but WITHOUT
3368# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3369# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3370# version 2 for more details (a copy is included in the LICENSE file that
3371# accompanied this code).
3372#
3373# You should have received a copy of the GNU General Public License version
3374# 2 along with this work; if not, write to the Free Software Foundation,
3375# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3376#
3377# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3378# or visit www.oracle.com if you need additional information or have any
3379# questions.
3380#
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401#
3402# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3403# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3404#
3405# This code is free software; you can redistribute it and/or modify it
3406# under the terms of the GNU General Public License version 2 only, as
3407# published by the Free Software Foundation.  Oracle designates this
3408# particular file as subject to the "Classpath" exception as provided
3409# by Oracle in the LICENSE file that accompanied this code.
3410#
3411# This code is distributed in the hope that it will be useful, but WITHOUT
3412# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3413# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3414# version 2 for more details (a copy is included in the LICENSE file that
3415# accompanied this code).
3416#
3417# You should have received a copy of the GNU General Public License version
3418# 2 along with this work; if not, write to the Free Software Foundation,
3419# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3420#
3421# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3422# or visit www.oracle.com if you need additional information or have any
3423# questions.
3424#
3425
3426
3427
3428
3429
3430cygwin_help() {
3431    case $1 in
3432    unzip)
3433        PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip" ;;
3434    zip)
3435        PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P zip" ;;
3436    make)
3437        PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P make" ;;
3438    * )
3439       break ;;
3440    esac
3441}
3442
3443apt_help() {
3444    case $1 in
3445    devkit)
3446        PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
3447    openjdk)
3448        PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
3449    alsa)
3450        PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
3451    cups)
3452        PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
3453    freetype2)
3454        PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
3455    pulse)
3456        PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;;
3457    x11)
3458        PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
3459    ccache)
3460        PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
3461    * )
3462       break ;;
3463    esac
3464}
3465
3466yum_help() {
3467    case $1 in
3468    devkit)
3469        PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
3470    openjdk)
3471        PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
3472    alsa)
3473        PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
3474    cups)
3475        PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
3476    freetype2)
3477        PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
3478    pulse)
3479        PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;;
3480    x11)
3481        PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel" ;;
3482    ccache)
3483        PKGHANDLER_COMMAND="sudo yum install ccache" ;;
3484    * )
3485       break ;;
3486    esac
3487}
3488
3489port_help() {
3490    PKGHANDLER_COMMAND=""
3491}
3492
3493pkgutil_help() {
3494    PKGHANDLER_COMMAND=""
3495}
3496
3497pkgadd_help() {
3498    PKGHANDLER_COMMAND=""
3499}
3500
3501
3502
3503#
3504# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
3505# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3506#
3507# This code is free software; you can redistribute it and/or modify it
3508# under the terms of the GNU General Public License version 2 only, as
3509# published by the Free Software Foundation.  Oracle designates this
3510# particular file as subject to the "Classpath" exception as provided
3511# by Oracle in the LICENSE file that accompanied this code.
3512#
3513# This code is distributed in the hope that it will be useful, but WITHOUT
3514# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3515# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3516# version 2 for more details (a copy is included in the LICENSE file that
3517# accompanied this code).
3518#
3519# You should have received a copy of the GNU General Public License version
3520# 2 along with this work; if not, write to the Free Software Foundation,
3521# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3522#
3523# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3524# or visit www.oracle.com if you need additional information or have any
3525# questions.
3526#
3527
3528
3529
3530
3531
3532
3533
3534
3535###############################################################################
3536#
3537# Should we build only OpenJDK even if closed sources are present?
3538#
3539
3540
3541
3542
3543###############################################################################
3544#
3545# Setup version numbers
3546#
3547
3548
3549
3550
3551
3552
3553# Support for customization of the build process. Some build files
3554# will include counterparts from this location, if they exist. This allows
3555# for a degree of customization of the build targets and the rules/recipes
3556# to create them
3557
3558# Check whether --with-custom-make-dir was given.
3559if test "${with_custom_make_dir+set}" = set; then :
3560  withval=$with_custom_make_dir; CUSTOM_MAKE_DIR=$with_custom_make_dir
3561fi
3562
3563
3564
3565#
3566# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3567# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3568#
3569# This code is free software; you can redistribute it and/or modify it
3570# under the terms of the GNU General Public License version 2 only, as
3571# published by the Free Software Foundation.  Oracle designates this
3572# particular file as subject to the "Classpath" exception as provided
3573# by Oracle in the LICENSE file that accompanied this code.
3574#
3575# This code is distributed in the hope that it will be useful, but WITHOUT
3576# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3577# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3578# version 2 for more details (a copy is included in the LICENSE file that
3579# accompanied this code).
3580#
3581# You should have received a copy of the GNU General Public License version
3582# 2 along with this work; if not, write to the Free Software Foundation,
3583# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3584#
3585# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3586# or visit www.oracle.com if you need additional information or have any
3587# questions.
3588#
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604#
3605# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3606# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3607#
3608# This code is free software; you can redistribute it and/or modify it
3609# under the terms of the GNU General Public License version 2 only, as
3610# published by the Free Software Foundation.  Oracle designates this
3611# particular file as subject to the "Classpath" exception as provided
3612# by Oracle in the LICENSE file that accompanied this code.
3613#
3614# This code is distributed in the hope that it will be useful, but WITHOUT
3615# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3616# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3617# version 2 for more details (a copy is included in the LICENSE file that
3618# accompanied this code).
3619#
3620# You should have received a copy of the GNU General Public License version
3621# 2 along with this work; if not, write to the Free Software Foundation,
3622# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3623#
3624# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3625# or visit www.oracle.com if you need additional information or have any
3626# questions.
3627#
3628
3629# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
3630# Converts autoconf style CPU name to OpenJDK style, into
3631# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
3632
3633
3634# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
3635# Converts autoconf style OS name to OpenJDK style, into
3636# VAR_OS and VAR_OS_API.
3637
3638
3639# Expects $host_os $host_cpu $build_os and $build_cpu
3640# and $with_target_bits to have been setup!
3641#
3642# Translate the standard triplet(quadruplet) definition
3643# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
3644# OPENJDK_BUILD_OS, etc.
3645
3646
3647# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
3648# accordingly. Must be done after setting up build and target system, but before
3649# doing anything else with these values.
3650
3651
3652    # Setup the legacy variables, for controlling the old makefiles.
3653    #
3654
3655
3656
3657
3658#%%% Build and target systems %%%
3659
3660
3661
3662
3663# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
3664# Add -mX to various FLAGS variables.
3665
3666
3667
3668
3669
3670
3671#
3672# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3673# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3674#
3675# This code is free software; you can redistribute it and/or modify it
3676# under the terms of the GNU General Public License version 2 only, as
3677# published by the Free Software Foundation.  Oracle designates this
3678# particular file as subject to the "Classpath" exception as provided
3679# by Oracle in the LICENSE file that accompanied this code.
3680#
3681# This code is distributed in the hope that it will be useful, but WITHOUT
3682# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3683# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3684# version 2 for more details (a copy is included in the LICENSE file that
3685# accompanied this code).
3686#
3687# You should have received a copy of the GNU General Public License version
3688# 2 along with this work; if not, write to the Free Software Foundation,
3689# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3690#
3691# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3692# or visit www.oracle.com if you need additional information or have any
3693# questions.
3694#
3695
3696
3697
3698
3699
3700
3701
3702
3703#
3704# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3705# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3706#
3707# This code is free software; you can redistribute it and/or modify it
3708# under the terms of the GNU General Public License version 2 only, as
3709# published by the Free Software Foundation.  Oracle designates this
3710# particular file as subject to the "Classpath" exception as provided
3711# by Oracle in the LICENSE file that accompanied this code.
3712#
3713# This code is distributed in the hope that it will be useful, but WITHOUT
3714# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3715# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3716# version 2 for more details (a copy is included in the LICENSE file that
3717# accompanied this code).
3718#
3719# You should have received a copy of the GNU General Public License version
3720# 2 along with this work; if not, write to the Free Software Foundation,
3721# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3722#
3723# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3724# or visit www.oracle.com if you need additional information or have any
3725# questions.
3726#
3727
3728# $1 = compiler to test (CC or CXX)
3729# $2 = human readable name of compiler (C or C++)
3730
3731
3732
3733
3734
3735# $1 = compiler to test (CC or CXX)
3736# $2 = human readable name of compiler (C or C++)
3737# $3 = list of compiler names to search for
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751# TOOLCHAIN_COMPILER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3752#                                   [RUN-IF-FALSE])
3753# ------------------------------------------------------------
3754# Check that the c and c++ compilers support an argument
3755
3756
3757
3758
3759# Setup the JTREG paths
3760
3761
3762#
3763# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3764# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3765#
3766# This code is free software; you can redistribute it and/or modify it
3767# under the terms of the GNU General Public License version 2 only, as
3768# published by the Free Software Foundation.  Oracle designates this
3769# particular file as subject to the "Classpath" exception as provided
3770# by Oracle in the LICENSE file that accompanied this code.
3771#
3772# This code is distributed in the hope that it will be useful, but WITHOUT
3773# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3774# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3775# version 2 for more details (a copy is included in the LICENSE file that
3776# accompanied this code).
3777#
3778# You should have received a copy of the GNU General Public License version
3779# 2 along with this work; if not, write to the Free Software Foundation,
3780# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3781#
3782# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3783# or visit www.oracle.com if you need additional information or have any
3784# questions.
3785#
3786
3787
3788
3789
3790
3791
3792
3793# Check if the VS env variables were setup prior to running configure.
3794# If not, then find vcvarsall.bat and run it automatically, and integrate
3795# the set env variables into the spec file.
3796
3797
3798
3799
3800
3801
3802# This line needs to be here, verbatim, after all includes and the dummy hook
3803# definitions. It is replaced with custom functionality when building
3804# custom sources.
3805#CUSTOM_AUTOCONF_INCLUDE
3806
3807# Do not change or remove the following line, it is needed for consistency checks:
3808DATE_WHEN_GENERATED=1379077060
3809
3810###############################################################################
3811#
3812# Initialization / Boot-strapping
3813#
3814# The bootstrapping process needs to solve the "chicken or the egg" problem,
3815# thus it jumps back and forth, each time gaining something needed later on.
3816#
3817###############################################################################
3818
3819# Basic initialization that must happen first of all
3820
3821# Save the original command line. This is passed to us by the wrapper configure script.
3822
3823DATE_WHEN_CONFIGURED=`LANG=C date`
3824
3825{ $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
3826$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
3827{ $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
3828$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
3829
3830
3831
3832# Start with tools that do not need have cross compilation support
3833# and can be expected to be found in the default PATH. These tools are
3834# used by configure. Nor are these tools expected to be found in the
3835# devkit from the builddeps server either, since they are
3836# needed to download the devkit.
3837
3838# First are all the simple required tools.
3839
3840    for ac_prog in basename
3841do
3842  # Extract the first word of "$ac_prog", so it can be a program name with args.
3843set dummy $ac_prog; ac_word=$2
3844{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3845$as_echo_n "checking for $ac_word... " >&6; }
3846if ${ac_cv_path_BASENAME+:} false; then :
3847  $as_echo_n "(cached) " >&6
3848else
3849  case $BASENAME in
3850  [\\/]* | ?:[\\/]*)
3851  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
3852  ;;
3853  *)
3854  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3855for as_dir in $PATH
3856do
3857  IFS=$as_save_IFS
3858  test -z "$as_dir" && as_dir=.
3859    for ac_exec_ext in '' $ac_executable_extensions; do
3860  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3861    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
3862    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3863    break 2
3864  fi
3865done
3866  done
3867IFS=$as_save_IFS
3868
3869  ;;
3870esac
3871fi
3872BASENAME=$ac_cv_path_BASENAME
3873if test -n "$BASENAME"; then
3874  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
3875$as_echo "$BASENAME" >&6; }
3876else
3877  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3878$as_echo "no" >&6; }
3879fi
3880
3881
3882  test -n "$BASENAME" && break
3883done
3884
3885
3886    if test "x$BASENAME" = x; then
3887        if test "xbasename" = x; then
3888          PROG_NAME=basename
3889        else
3890          PROG_NAME=basename
3891        fi
3892        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3893$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3894        as_fn_error $? "Cannot continue" "$LINENO" 5
3895    fi
3896
3897
3898
3899    for ac_prog in bash
3900do
3901  # Extract the first word of "$ac_prog", so it can be a program name with args.
3902set dummy $ac_prog; ac_word=$2
3903{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3904$as_echo_n "checking for $ac_word... " >&6; }
3905if ${ac_cv_path_BASH+:} false; then :
3906  $as_echo_n "(cached) " >&6
3907else
3908  case $BASH in
3909  [\\/]* | ?:[\\/]*)
3910  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
3911  ;;
3912  *)
3913  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3914for as_dir in $PATH
3915do
3916  IFS=$as_save_IFS
3917  test -z "$as_dir" && as_dir=.
3918    for ac_exec_ext in '' $ac_executable_extensions; do
3919  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3920    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
3921    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3922    break 2
3923  fi
3924done
3925  done
3926IFS=$as_save_IFS
3927
3928  ;;
3929esac
3930fi
3931BASH=$ac_cv_path_BASH
3932if test -n "$BASH"; then
3933  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
3934$as_echo "$BASH" >&6; }
3935else
3936  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3937$as_echo "no" >&6; }
3938fi
3939
3940
3941  test -n "$BASH" && break
3942done
3943
3944
3945    if test "x$BASH" = x; then
3946        if test "xbash" = x; then
3947          PROG_NAME=bash
3948        else
3949          PROG_NAME=bash
3950        fi
3951        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3952$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3953        as_fn_error $? "Cannot continue" "$LINENO" 5
3954    fi
3955
3956
3957
3958    for ac_prog in cat
3959do
3960  # Extract the first word of "$ac_prog", so it can be a program name with args.
3961set dummy $ac_prog; ac_word=$2
3962{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3963$as_echo_n "checking for $ac_word... " >&6; }
3964if ${ac_cv_path_CAT+:} false; then :
3965  $as_echo_n "(cached) " >&6
3966else
3967  case $CAT in
3968  [\\/]* | ?:[\\/]*)
3969  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
3970  ;;
3971  *)
3972  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3973for as_dir in $PATH
3974do
3975  IFS=$as_save_IFS
3976  test -z "$as_dir" && as_dir=.
3977    for ac_exec_ext in '' $ac_executable_extensions; do
3978  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3979    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
3980    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3981    break 2
3982  fi
3983done
3984  done
3985IFS=$as_save_IFS
3986
3987  ;;
3988esac
3989fi
3990CAT=$ac_cv_path_CAT
3991if test -n "$CAT"; then
3992  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
3993$as_echo "$CAT" >&6; }
3994else
3995  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3996$as_echo "no" >&6; }
3997fi
3998
3999
4000  test -n "$CAT" && break
4001done
4002
4003
4004    if test "x$CAT" = x; then
4005        if test "xcat" = x; then
4006          PROG_NAME=cat
4007        else
4008          PROG_NAME=cat
4009        fi
4010        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4011$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4012        as_fn_error $? "Cannot continue" "$LINENO" 5
4013    fi
4014
4015
4016
4017    for ac_prog in chmod
4018do
4019  # Extract the first word of "$ac_prog", so it can be a program name with args.
4020set dummy $ac_prog; ac_word=$2
4021{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4022$as_echo_n "checking for $ac_word... " >&6; }
4023if ${ac_cv_path_CHMOD+:} false; then :
4024  $as_echo_n "(cached) " >&6
4025else
4026  case $CHMOD in
4027  [\\/]* | ?:[\\/]*)
4028  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
4029  ;;
4030  *)
4031  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4032for as_dir in $PATH
4033do
4034  IFS=$as_save_IFS
4035  test -z "$as_dir" && as_dir=.
4036    for ac_exec_ext in '' $ac_executable_extensions; do
4037  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4038    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
4039    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4040    break 2
4041  fi
4042done
4043  done
4044IFS=$as_save_IFS
4045
4046  ;;
4047esac
4048fi
4049CHMOD=$ac_cv_path_CHMOD
4050if test -n "$CHMOD"; then
4051  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
4052$as_echo "$CHMOD" >&6; }
4053else
4054  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4055$as_echo "no" >&6; }
4056fi
4057
4058
4059  test -n "$CHMOD" && break
4060done
4061
4062
4063    if test "x$CHMOD" = x; then
4064        if test "xchmod" = x; then
4065          PROG_NAME=chmod
4066        else
4067          PROG_NAME=chmod
4068        fi
4069        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4070$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4071        as_fn_error $? "Cannot continue" "$LINENO" 5
4072    fi
4073
4074
4075
4076    for ac_prog in cmp
4077do
4078  # Extract the first word of "$ac_prog", so it can be a program name with args.
4079set dummy $ac_prog; ac_word=$2
4080{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4081$as_echo_n "checking for $ac_word... " >&6; }
4082if ${ac_cv_path_CMP+:} false; then :
4083  $as_echo_n "(cached) " >&6
4084else
4085  case $CMP in
4086  [\\/]* | ?:[\\/]*)
4087  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
4088  ;;
4089  *)
4090  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4091for as_dir in $PATH
4092do
4093  IFS=$as_save_IFS
4094  test -z "$as_dir" && as_dir=.
4095    for ac_exec_ext in '' $ac_executable_extensions; do
4096  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4097    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
4098    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4099    break 2
4100  fi
4101done
4102  done
4103IFS=$as_save_IFS
4104
4105  ;;
4106esac
4107fi
4108CMP=$ac_cv_path_CMP
4109if test -n "$CMP"; then
4110  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
4111$as_echo "$CMP" >&6; }
4112else
4113  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4114$as_echo "no" >&6; }
4115fi
4116
4117
4118  test -n "$CMP" && break
4119done
4120
4121
4122    if test "x$CMP" = x; then
4123        if test "xcmp" = x; then
4124          PROG_NAME=cmp
4125        else
4126          PROG_NAME=cmp
4127        fi
4128        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4129$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4130        as_fn_error $? "Cannot continue" "$LINENO" 5
4131    fi
4132
4133
4134
4135    for ac_prog in comm
4136do
4137  # Extract the first word of "$ac_prog", so it can be a program name with args.
4138set dummy $ac_prog; ac_word=$2
4139{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4140$as_echo_n "checking for $ac_word... " >&6; }
4141if ${ac_cv_path_COMM+:} false; then :
4142  $as_echo_n "(cached) " >&6
4143else
4144  case $COMM in
4145  [\\/]* | ?:[\\/]*)
4146  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
4147  ;;
4148  *)
4149  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4150for as_dir in $PATH
4151do
4152  IFS=$as_save_IFS
4153  test -z "$as_dir" && as_dir=.
4154    for ac_exec_ext in '' $ac_executable_extensions; do
4155  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4156    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
4157    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4158    break 2
4159  fi
4160done
4161  done
4162IFS=$as_save_IFS
4163
4164  ;;
4165esac
4166fi
4167COMM=$ac_cv_path_COMM
4168if test -n "$COMM"; then
4169  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
4170$as_echo "$COMM" >&6; }
4171else
4172  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4173$as_echo "no" >&6; }
4174fi
4175
4176
4177  test -n "$COMM" && break
4178done
4179
4180
4181    if test "x$COMM" = x; then
4182        if test "xcomm" = x; then
4183          PROG_NAME=comm
4184        else
4185          PROG_NAME=comm
4186        fi
4187        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4188$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4189        as_fn_error $? "Cannot continue" "$LINENO" 5
4190    fi
4191
4192
4193
4194    for ac_prog in cp
4195do
4196  # Extract the first word of "$ac_prog", so it can be a program name with args.
4197set dummy $ac_prog; ac_word=$2
4198{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4199$as_echo_n "checking for $ac_word... " >&6; }
4200if ${ac_cv_path_CP+:} false; then :
4201  $as_echo_n "(cached) " >&6
4202else
4203  case $CP in
4204  [\\/]* | ?:[\\/]*)
4205  ac_cv_path_CP="$CP" # Let the user override the test with a path.
4206  ;;
4207  *)
4208  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4209for as_dir in $PATH
4210do
4211  IFS=$as_save_IFS
4212  test -z "$as_dir" && as_dir=.
4213    for ac_exec_ext in '' $ac_executable_extensions; do
4214  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4215    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
4216    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4217    break 2
4218  fi
4219done
4220  done
4221IFS=$as_save_IFS
4222
4223  ;;
4224esac
4225fi
4226CP=$ac_cv_path_CP
4227if test -n "$CP"; then
4228  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
4229$as_echo "$CP" >&6; }
4230else
4231  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4232$as_echo "no" >&6; }
4233fi
4234
4235
4236  test -n "$CP" && break
4237done
4238
4239
4240    if test "x$CP" = x; then
4241        if test "xcp" = x; then
4242          PROG_NAME=cp
4243        else
4244          PROG_NAME=cp
4245        fi
4246        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4247$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4248        as_fn_error $? "Cannot continue" "$LINENO" 5
4249    fi
4250
4251
4252
4253    for ac_prog in cpio
4254do
4255  # Extract the first word of "$ac_prog", so it can be a program name with args.
4256set dummy $ac_prog; ac_word=$2
4257{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4258$as_echo_n "checking for $ac_word... " >&6; }
4259if ${ac_cv_path_CPIO+:} false; then :
4260  $as_echo_n "(cached) " >&6
4261else
4262  case $CPIO in
4263  [\\/]* | ?:[\\/]*)
4264  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
4265  ;;
4266  *)
4267  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4268for as_dir in $PATH
4269do
4270  IFS=$as_save_IFS
4271  test -z "$as_dir" && as_dir=.
4272    for ac_exec_ext in '' $ac_executable_extensions; do
4273  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4274    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
4275    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4276    break 2
4277  fi
4278done
4279  done
4280IFS=$as_save_IFS
4281
4282  ;;
4283esac
4284fi
4285CPIO=$ac_cv_path_CPIO
4286if test -n "$CPIO"; then
4287  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
4288$as_echo "$CPIO" >&6; }
4289else
4290  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4291$as_echo "no" >&6; }
4292fi
4293
4294
4295  test -n "$CPIO" && break
4296done
4297
4298
4299    if test "x$CPIO" = x; then
4300        if test "xcpio" = x; then
4301          PROG_NAME=cpio
4302        else
4303          PROG_NAME=cpio
4304        fi
4305        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4306$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4307        as_fn_error $? "Cannot continue" "$LINENO" 5
4308    fi
4309
4310
4311
4312    for ac_prog in cut
4313do
4314  # Extract the first word of "$ac_prog", so it can be a program name with args.
4315set dummy $ac_prog; ac_word=$2
4316{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4317$as_echo_n "checking for $ac_word... " >&6; }
4318if ${ac_cv_path_CUT+:} false; then :
4319  $as_echo_n "(cached) " >&6
4320else
4321  case $CUT in
4322  [\\/]* | ?:[\\/]*)
4323  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
4324  ;;
4325  *)
4326  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4327for as_dir in $PATH
4328do
4329  IFS=$as_save_IFS
4330  test -z "$as_dir" && as_dir=.
4331    for ac_exec_ext in '' $ac_executable_extensions; do
4332  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4333    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
4334    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4335    break 2
4336  fi
4337done
4338  done
4339IFS=$as_save_IFS
4340
4341  ;;
4342esac
4343fi
4344CUT=$ac_cv_path_CUT
4345if test -n "$CUT"; then
4346  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
4347$as_echo "$CUT" >&6; }
4348else
4349  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4350$as_echo "no" >&6; }
4351fi
4352
4353
4354  test -n "$CUT" && break
4355done
4356
4357
4358    if test "x$CUT" = x; then
4359        if test "xcut" = x; then
4360          PROG_NAME=cut
4361        else
4362          PROG_NAME=cut
4363        fi
4364        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4365$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4366        as_fn_error $? "Cannot continue" "$LINENO" 5
4367    fi
4368
4369
4370
4371    for ac_prog in date
4372do
4373  # Extract the first word of "$ac_prog", so it can be a program name with args.
4374set dummy $ac_prog; ac_word=$2
4375{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4376$as_echo_n "checking for $ac_word... " >&6; }
4377if ${ac_cv_path_DATE+:} false; then :
4378  $as_echo_n "(cached) " >&6
4379else
4380  case $DATE in
4381  [\\/]* | ?:[\\/]*)
4382  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
4383  ;;
4384  *)
4385  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4386for as_dir in $PATH
4387do
4388  IFS=$as_save_IFS
4389  test -z "$as_dir" && as_dir=.
4390    for ac_exec_ext in '' $ac_executable_extensions; do
4391  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4392    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
4393    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4394    break 2
4395  fi
4396done
4397  done
4398IFS=$as_save_IFS
4399
4400  ;;
4401esac
4402fi
4403DATE=$ac_cv_path_DATE
4404if test -n "$DATE"; then
4405  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
4406$as_echo "$DATE" >&6; }
4407else
4408  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4409$as_echo "no" >&6; }
4410fi
4411
4412
4413  test -n "$DATE" && break
4414done
4415
4416
4417    if test "x$DATE" = x; then
4418        if test "xdate" = x; then
4419          PROG_NAME=date
4420        else
4421          PROG_NAME=date
4422        fi
4423        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4424$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4425        as_fn_error $? "Cannot continue" "$LINENO" 5
4426    fi
4427
4428
4429
4430    for ac_prog in gdiff diff
4431do
4432  # Extract the first word of "$ac_prog", so it can be a program name with args.
4433set dummy $ac_prog; ac_word=$2
4434{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4435$as_echo_n "checking for $ac_word... " >&6; }
4436if ${ac_cv_path_DIFF+:} false; then :
4437  $as_echo_n "(cached) " >&6
4438else
4439  case $DIFF in
4440  [\\/]* | ?:[\\/]*)
4441  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
4442  ;;
4443  *)
4444  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4445for as_dir in $PATH
4446do
4447  IFS=$as_save_IFS
4448  test -z "$as_dir" && as_dir=.
4449    for ac_exec_ext in '' $ac_executable_extensions; do
4450  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4451    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
4452    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4453    break 2
4454  fi
4455done
4456  done
4457IFS=$as_save_IFS
4458
4459  ;;
4460esac
4461fi
4462DIFF=$ac_cv_path_DIFF
4463if test -n "$DIFF"; then
4464  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
4465$as_echo "$DIFF" >&6; }
4466else
4467  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4468$as_echo "no" >&6; }
4469fi
4470
4471
4472  test -n "$DIFF" && break
4473done
4474
4475
4476    if test "x$DIFF" = x; then
4477        if test "xgdiff diff" = x; then
4478          PROG_NAME=diff
4479        else
4480          PROG_NAME=gdiff diff
4481        fi
4482        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4483$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4484        as_fn_error $? "Cannot continue" "$LINENO" 5
4485    fi
4486
4487
4488
4489    for ac_prog in dirname
4490do
4491  # Extract the first word of "$ac_prog", so it can be a program name with args.
4492set dummy $ac_prog; ac_word=$2
4493{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4494$as_echo_n "checking for $ac_word... " >&6; }
4495if ${ac_cv_path_DIRNAME+:} false; then :
4496  $as_echo_n "(cached) " >&6
4497else
4498  case $DIRNAME in
4499  [\\/]* | ?:[\\/]*)
4500  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
4501  ;;
4502  *)
4503  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4504for as_dir in $PATH
4505do
4506  IFS=$as_save_IFS
4507  test -z "$as_dir" && as_dir=.
4508    for ac_exec_ext in '' $ac_executable_extensions; do
4509  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4510    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
4511    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4512    break 2
4513  fi
4514done
4515  done
4516IFS=$as_save_IFS
4517
4518  ;;
4519esac
4520fi
4521DIRNAME=$ac_cv_path_DIRNAME
4522if test -n "$DIRNAME"; then
4523  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
4524$as_echo "$DIRNAME" >&6; }
4525else
4526  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4527$as_echo "no" >&6; }
4528fi
4529
4530
4531  test -n "$DIRNAME" && break
4532done
4533
4534
4535    if test "x$DIRNAME" = x; then
4536        if test "xdirname" = x; then
4537          PROG_NAME=dirname
4538        else
4539          PROG_NAME=dirname
4540        fi
4541        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4542$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4543        as_fn_error $? "Cannot continue" "$LINENO" 5
4544    fi
4545
4546
4547
4548    for ac_prog in echo
4549do
4550  # Extract the first word of "$ac_prog", so it can be a program name with args.
4551set dummy $ac_prog; ac_word=$2
4552{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4553$as_echo_n "checking for $ac_word... " >&6; }
4554if ${ac_cv_path_ECHO+:} false; then :
4555  $as_echo_n "(cached) " >&6
4556else
4557  case $ECHO in
4558  [\\/]* | ?:[\\/]*)
4559  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
4560  ;;
4561  *)
4562  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4563for as_dir in $PATH
4564do
4565  IFS=$as_save_IFS
4566  test -z "$as_dir" && as_dir=.
4567    for ac_exec_ext in '' $ac_executable_extensions; do
4568  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4569    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
4570    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4571    break 2
4572  fi
4573done
4574  done
4575IFS=$as_save_IFS
4576
4577  ;;
4578esac
4579fi
4580ECHO=$ac_cv_path_ECHO
4581if test -n "$ECHO"; then
4582  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
4583$as_echo "$ECHO" >&6; }
4584else
4585  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4586$as_echo "no" >&6; }
4587fi
4588
4589
4590  test -n "$ECHO" && break
4591done
4592
4593
4594    if test "x$ECHO" = x; then
4595        if test "xecho" = x; then
4596          PROG_NAME=echo
4597        else
4598          PROG_NAME=echo
4599        fi
4600        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4601$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4602        as_fn_error $? "Cannot continue" "$LINENO" 5
4603    fi
4604
4605
4606
4607    for ac_prog in expr
4608do
4609  # Extract the first word of "$ac_prog", so it can be a program name with args.
4610set dummy $ac_prog; ac_word=$2
4611{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4612$as_echo_n "checking for $ac_word... " >&6; }
4613if ${ac_cv_path_EXPR+:} false; then :
4614  $as_echo_n "(cached) " >&6
4615else
4616  case $EXPR in
4617  [\\/]* | ?:[\\/]*)
4618  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
4619  ;;
4620  *)
4621  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4622for as_dir in $PATH
4623do
4624  IFS=$as_save_IFS
4625  test -z "$as_dir" && as_dir=.
4626    for ac_exec_ext in '' $ac_executable_extensions; do
4627  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4628    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
4629    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4630    break 2
4631  fi
4632done
4633  done
4634IFS=$as_save_IFS
4635
4636  ;;
4637esac
4638fi
4639EXPR=$ac_cv_path_EXPR
4640if test -n "$EXPR"; then
4641  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
4642$as_echo "$EXPR" >&6; }
4643else
4644  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4645$as_echo "no" >&6; }
4646fi
4647
4648
4649  test -n "$EXPR" && break
4650done
4651
4652
4653    if test "x$EXPR" = x; then
4654        if test "xexpr" = x; then
4655          PROG_NAME=expr
4656        else
4657          PROG_NAME=expr
4658        fi
4659        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4660$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4661        as_fn_error $? "Cannot continue" "$LINENO" 5
4662    fi
4663
4664
4665
4666    for ac_prog in file
4667do
4668  # Extract the first word of "$ac_prog", so it can be a program name with args.
4669set dummy $ac_prog; ac_word=$2
4670{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4671$as_echo_n "checking for $ac_word... " >&6; }
4672if ${ac_cv_path_FILE+:} false; then :
4673  $as_echo_n "(cached) " >&6
4674else
4675  case $FILE in
4676  [\\/]* | ?:[\\/]*)
4677  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
4678  ;;
4679  *)
4680  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4681for as_dir in $PATH
4682do
4683  IFS=$as_save_IFS
4684  test -z "$as_dir" && as_dir=.
4685    for ac_exec_ext in '' $ac_executable_extensions; do
4686  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4687    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
4688    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4689    break 2
4690  fi
4691done
4692  done
4693IFS=$as_save_IFS
4694
4695  ;;
4696esac
4697fi
4698FILE=$ac_cv_path_FILE
4699if test -n "$FILE"; then
4700  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
4701$as_echo "$FILE" >&6; }
4702else
4703  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4704$as_echo "no" >&6; }
4705fi
4706
4707
4708  test -n "$FILE" && break
4709done
4710
4711
4712    if test "x$FILE" = x; then
4713        if test "xfile" = x; then
4714          PROG_NAME=file
4715        else
4716          PROG_NAME=file
4717        fi
4718        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4719$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4720        as_fn_error $? "Cannot continue" "$LINENO" 5
4721    fi
4722
4723
4724
4725    for ac_prog in find
4726do
4727  # Extract the first word of "$ac_prog", so it can be a program name with args.
4728set dummy $ac_prog; ac_word=$2
4729{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4730$as_echo_n "checking for $ac_word... " >&6; }
4731if ${ac_cv_path_FIND+:} false; then :
4732  $as_echo_n "(cached) " >&6
4733else
4734  case $FIND in
4735  [\\/]* | ?:[\\/]*)
4736  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
4737  ;;
4738  *)
4739  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4740for as_dir in $PATH
4741do
4742  IFS=$as_save_IFS
4743  test -z "$as_dir" && as_dir=.
4744    for ac_exec_ext in '' $ac_executable_extensions; do
4745  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4746    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
4747    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4748    break 2
4749  fi
4750done
4751  done
4752IFS=$as_save_IFS
4753
4754  ;;
4755esac
4756fi
4757FIND=$ac_cv_path_FIND
4758if test -n "$FIND"; then
4759  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
4760$as_echo "$FIND" >&6; }
4761else
4762  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4763$as_echo "no" >&6; }
4764fi
4765
4766
4767  test -n "$FIND" && break
4768done
4769
4770
4771    if test "x$FIND" = x; then
4772        if test "xfind" = x; then
4773          PROG_NAME=find
4774        else
4775          PROG_NAME=find
4776        fi
4777        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4778$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4779        as_fn_error $? "Cannot continue" "$LINENO" 5
4780    fi
4781
4782
4783
4784    for ac_prog in head
4785do
4786  # Extract the first word of "$ac_prog", so it can be a program name with args.
4787set dummy $ac_prog; ac_word=$2
4788{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4789$as_echo_n "checking for $ac_word... " >&6; }
4790if ${ac_cv_path_HEAD+:} false; then :
4791  $as_echo_n "(cached) " >&6
4792else
4793  case $HEAD in
4794  [\\/]* | ?:[\\/]*)
4795  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
4796  ;;
4797  *)
4798  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4799for as_dir in $PATH
4800do
4801  IFS=$as_save_IFS
4802  test -z "$as_dir" && as_dir=.
4803    for ac_exec_ext in '' $ac_executable_extensions; do
4804  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4805    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
4806    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4807    break 2
4808  fi
4809done
4810  done
4811IFS=$as_save_IFS
4812
4813  ;;
4814esac
4815fi
4816HEAD=$ac_cv_path_HEAD
4817if test -n "$HEAD"; then
4818  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
4819$as_echo "$HEAD" >&6; }
4820else
4821  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4822$as_echo "no" >&6; }
4823fi
4824
4825
4826  test -n "$HEAD" && break
4827done
4828
4829
4830    if test "x$HEAD" = x; then
4831        if test "xhead" = x; then
4832          PROG_NAME=head
4833        else
4834          PROG_NAME=head
4835        fi
4836        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4837$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4838        as_fn_error $? "Cannot continue" "$LINENO" 5
4839    fi
4840
4841
4842
4843    for ac_prog in ln
4844do
4845  # Extract the first word of "$ac_prog", so it can be a program name with args.
4846set dummy $ac_prog; ac_word=$2
4847{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4848$as_echo_n "checking for $ac_word... " >&6; }
4849if ${ac_cv_path_LN+:} false; then :
4850  $as_echo_n "(cached) " >&6
4851else
4852  case $LN in
4853  [\\/]* | ?:[\\/]*)
4854  ac_cv_path_LN="$LN" # Let the user override the test with a path.
4855  ;;
4856  *)
4857  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4858for as_dir in $PATH
4859do
4860  IFS=$as_save_IFS
4861  test -z "$as_dir" && as_dir=.
4862    for ac_exec_ext in '' $ac_executable_extensions; do
4863  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4864    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
4865    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4866    break 2
4867  fi
4868done
4869  done
4870IFS=$as_save_IFS
4871
4872  ;;
4873esac
4874fi
4875LN=$ac_cv_path_LN
4876if test -n "$LN"; then
4877  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
4878$as_echo "$LN" >&6; }
4879else
4880  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4881$as_echo "no" >&6; }
4882fi
4883
4884
4885  test -n "$LN" && break
4886done
4887
4888
4889    if test "x$LN" = x; then
4890        if test "xln" = x; then
4891          PROG_NAME=ln
4892        else
4893          PROG_NAME=ln
4894        fi
4895        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4896$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4897        as_fn_error $? "Cannot continue" "$LINENO" 5
4898    fi
4899
4900
4901
4902    for ac_prog in ls
4903do
4904  # Extract the first word of "$ac_prog", so it can be a program name with args.
4905set dummy $ac_prog; ac_word=$2
4906{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4907$as_echo_n "checking for $ac_word... " >&6; }
4908if ${ac_cv_path_LS+:} false; then :
4909  $as_echo_n "(cached) " >&6
4910else
4911  case $LS in
4912  [\\/]* | ?:[\\/]*)
4913  ac_cv_path_LS="$LS" # Let the user override the test with a path.
4914  ;;
4915  *)
4916  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4917for as_dir in $PATH
4918do
4919  IFS=$as_save_IFS
4920  test -z "$as_dir" && as_dir=.
4921    for ac_exec_ext in '' $ac_executable_extensions; do
4922  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4923    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
4924    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4925    break 2
4926  fi
4927done
4928  done
4929IFS=$as_save_IFS
4930
4931  ;;
4932esac
4933fi
4934LS=$ac_cv_path_LS
4935if test -n "$LS"; then
4936  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
4937$as_echo "$LS" >&6; }
4938else
4939  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4940$as_echo "no" >&6; }
4941fi
4942
4943
4944  test -n "$LS" && break
4945done
4946
4947
4948    if test "x$LS" = x; then
4949        if test "xls" = x; then
4950          PROG_NAME=ls
4951        else
4952          PROG_NAME=ls
4953        fi
4954        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4955$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4956        as_fn_error $? "Cannot continue" "$LINENO" 5
4957    fi
4958
4959
4960
4961    for ac_prog in mkdir
4962do
4963  # Extract the first word of "$ac_prog", so it can be a program name with args.
4964set dummy $ac_prog; ac_word=$2
4965{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4966$as_echo_n "checking for $ac_word... " >&6; }
4967if ${ac_cv_path_MKDIR+:} false; then :
4968  $as_echo_n "(cached) " >&6
4969else
4970  case $MKDIR in
4971  [\\/]* | ?:[\\/]*)
4972  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
4973  ;;
4974  *)
4975  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4976for as_dir in $PATH
4977do
4978  IFS=$as_save_IFS
4979  test -z "$as_dir" && as_dir=.
4980    for ac_exec_ext in '' $ac_executable_extensions; do
4981  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4982    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
4983    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4984    break 2
4985  fi
4986done
4987  done
4988IFS=$as_save_IFS
4989
4990  ;;
4991esac
4992fi
4993MKDIR=$ac_cv_path_MKDIR
4994if test -n "$MKDIR"; then
4995  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
4996$as_echo "$MKDIR" >&6; }
4997else
4998  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4999$as_echo "no" >&6; }
5000fi
5001
5002
5003  test -n "$MKDIR" && break
5004done
5005
5006
5007    if test "x$MKDIR" = x; then
5008        if test "xmkdir" = x; then
5009          PROG_NAME=mkdir
5010        else
5011          PROG_NAME=mkdir
5012        fi
5013        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5014$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5015        as_fn_error $? "Cannot continue" "$LINENO" 5
5016    fi
5017
5018
5019
5020    for ac_prog in mktemp
5021do
5022  # Extract the first word of "$ac_prog", so it can be a program name with args.
5023set dummy $ac_prog; ac_word=$2
5024{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5025$as_echo_n "checking for $ac_word... " >&6; }
5026if ${ac_cv_path_MKTEMP+:} false; then :
5027  $as_echo_n "(cached) " >&6
5028else
5029  case $MKTEMP in
5030  [\\/]* | ?:[\\/]*)
5031  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
5032  ;;
5033  *)
5034  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5035for as_dir in $PATH
5036do
5037  IFS=$as_save_IFS
5038  test -z "$as_dir" && as_dir=.
5039    for ac_exec_ext in '' $ac_executable_extensions; do
5040  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5041    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
5042    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5043    break 2
5044  fi
5045done
5046  done
5047IFS=$as_save_IFS
5048
5049  ;;
5050esac
5051fi
5052MKTEMP=$ac_cv_path_MKTEMP
5053if test -n "$MKTEMP"; then
5054  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
5055$as_echo "$MKTEMP" >&6; }
5056else
5057  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5058$as_echo "no" >&6; }
5059fi
5060
5061
5062  test -n "$MKTEMP" && break
5063done
5064
5065
5066    if test "x$MKTEMP" = x; then
5067        if test "xmktemp" = x; then
5068          PROG_NAME=mktemp
5069        else
5070          PROG_NAME=mktemp
5071        fi
5072        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5073$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5074        as_fn_error $? "Cannot continue" "$LINENO" 5
5075    fi
5076
5077
5078
5079    for ac_prog in mv
5080do
5081  # Extract the first word of "$ac_prog", so it can be a program name with args.
5082set dummy $ac_prog; ac_word=$2
5083{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5084$as_echo_n "checking for $ac_word... " >&6; }
5085if ${ac_cv_path_MV+:} false; then :
5086  $as_echo_n "(cached) " >&6
5087else
5088  case $MV in
5089  [\\/]* | ?:[\\/]*)
5090  ac_cv_path_MV="$MV" # Let the user override the test with a path.
5091  ;;
5092  *)
5093  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5094for as_dir in $PATH
5095do
5096  IFS=$as_save_IFS
5097  test -z "$as_dir" && as_dir=.
5098    for ac_exec_ext in '' $ac_executable_extensions; do
5099  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5100    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
5101    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5102    break 2
5103  fi
5104done
5105  done
5106IFS=$as_save_IFS
5107
5108  ;;
5109esac
5110fi
5111MV=$ac_cv_path_MV
5112if test -n "$MV"; then
5113  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
5114$as_echo "$MV" >&6; }
5115else
5116  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5117$as_echo "no" >&6; }
5118fi
5119
5120
5121  test -n "$MV" && break
5122done
5123
5124
5125    if test "x$MV" = x; then
5126        if test "xmv" = x; then
5127          PROG_NAME=mv
5128        else
5129          PROG_NAME=mv
5130        fi
5131        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5132$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5133        as_fn_error $? "Cannot continue" "$LINENO" 5
5134    fi
5135
5136
5137
5138    for ac_prog in printf
5139do
5140  # Extract the first word of "$ac_prog", so it can be a program name with args.
5141set dummy $ac_prog; ac_word=$2
5142{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5143$as_echo_n "checking for $ac_word... " >&6; }
5144if ${ac_cv_path_PRINTF+:} false; then :
5145  $as_echo_n "(cached) " >&6
5146else
5147  case $PRINTF in
5148  [\\/]* | ?:[\\/]*)
5149  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
5150  ;;
5151  *)
5152  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5153for as_dir in $PATH
5154do
5155  IFS=$as_save_IFS
5156  test -z "$as_dir" && as_dir=.
5157    for ac_exec_ext in '' $ac_executable_extensions; do
5158  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5159    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
5160    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5161    break 2
5162  fi
5163done
5164  done
5165IFS=$as_save_IFS
5166
5167  ;;
5168esac
5169fi
5170PRINTF=$ac_cv_path_PRINTF
5171if test -n "$PRINTF"; then
5172  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
5173$as_echo "$PRINTF" >&6; }
5174else
5175  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5176$as_echo "no" >&6; }
5177fi
5178
5179
5180  test -n "$PRINTF" && break
5181done
5182
5183
5184    if test "x$PRINTF" = x; then
5185        if test "xprintf" = x; then
5186          PROG_NAME=printf
5187        else
5188          PROG_NAME=printf
5189        fi
5190        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5191$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5192        as_fn_error $? "Cannot continue" "$LINENO" 5
5193    fi
5194
5195
5196
5197    for ac_prog in rm
5198do
5199  # Extract the first word of "$ac_prog", so it can be a program name with args.
5200set dummy $ac_prog; ac_word=$2
5201{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5202$as_echo_n "checking for $ac_word... " >&6; }
5203if ${ac_cv_path_RM+:} false; then :
5204  $as_echo_n "(cached) " >&6
5205else
5206  case $RM in
5207  [\\/]* | ?:[\\/]*)
5208  ac_cv_path_RM="$RM" # Let the user override the test with a path.
5209  ;;
5210  *)
5211  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5212for as_dir in $PATH
5213do
5214  IFS=$as_save_IFS
5215  test -z "$as_dir" && as_dir=.
5216    for ac_exec_ext in '' $ac_executable_extensions; do
5217  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5218    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
5219    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5220    break 2
5221  fi
5222done
5223  done
5224IFS=$as_save_IFS
5225
5226  ;;
5227esac
5228fi
5229RM=$ac_cv_path_RM
5230if test -n "$RM"; then
5231  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
5232$as_echo "$RM" >&6; }
5233else
5234  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5235$as_echo "no" >&6; }
5236fi
5237
5238
5239  test -n "$RM" && break
5240done
5241
5242
5243    if test "x$RM" = x; then
5244        if test "xrm" = x; then
5245          PROG_NAME=rm
5246        else
5247          PROG_NAME=rm
5248        fi
5249        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5250$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5251        as_fn_error $? "Cannot continue" "$LINENO" 5
5252    fi
5253
5254
5255
5256    for ac_prog in sh
5257do
5258  # Extract the first word of "$ac_prog", so it can be a program name with args.
5259set dummy $ac_prog; ac_word=$2
5260{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5261$as_echo_n "checking for $ac_word... " >&6; }
5262if ${ac_cv_path_SH+:} false; then :
5263  $as_echo_n "(cached) " >&6
5264else
5265  case $SH in
5266  [\\/]* | ?:[\\/]*)
5267  ac_cv_path_SH="$SH" # Let the user override the test with a path.
5268  ;;
5269  *)
5270  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5271for as_dir in $PATH
5272do
5273  IFS=$as_save_IFS
5274  test -z "$as_dir" && as_dir=.
5275    for ac_exec_ext in '' $ac_executable_extensions; do
5276  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5277    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
5278    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5279    break 2
5280  fi
5281done
5282  done
5283IFS=$as_save_IFS
5284
5285  ;;
5286esac
5287fi
5288SH=$ac_cv_path_SH
5289if test -n "$SH"; then
5290  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
5291$as_echo "$SH" >&6; }
5292else
5293  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5294$as_echo "no" >&6; }
5295fi
5296
5297
5298  test -n "$SH" && break
5299done
5300
5301
5302    if test "x$SH" = x; then
5303        if test "xsh" = x; then
5304          PROG_NAME=sh
5305        else
5306          PROG_NAME=sh
5307        fi
5308        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5309$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5310        as_fn_error $? "Cannot continue" "$LINENO" 5
5311    fi
5312
5313
5314
5315    for ac_prog in sort
5316do
5317  # Extract the first word of "$ac_prog", so it can be a program name with args.
5318set dummy $ac_prog; ac_word=$2
5319{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5320$as_echo_n "checking for $ac_word... " >&6; }
5321if ${ac_cv_path_SORT+:} false; then :
5322  $as_echo_n "(cached) " >&6
5323else
5324  case $SORT in
5325  [\\/]* | ?:[\\/]*)
5326  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
5327  ;;
5328  *)
5329  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5330for as_dir in $PATH
5331do
5332  IFS=$as_save_IFS
5333  test -z "$as_dir" && as_dir=.
5334    for ac_exec_ext in '' $ac_executable_extensions; do
5335  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5336    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
5337    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5338    break 2
5339  fi
5340done
5341  done
5342IFS=$as_save_IFS
5343
5344  ;;
5345esac
5346fi
5347SORT=$ac_cv_path_SORT
5348if test -n "$SORT"; then
5349  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
5350$as_echo "$SORT" >&6; }
5351else
5352  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5353$as_echo "no" >&6; }
5354fi
5355
5356
5357  test -n "$SORT" && break
5358done
5359
5360
5361    if test "x$SORT" = x; then
5362        if test "xsort" = x; then
5363          PROG_NAME=sort
5364        else
5365          PROG_NAME=sort
5366        fi
5367        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5368$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5369        as_fn_error $? "Cannot continue" "$LINENO" 5
5370    fi
5371
5372
5373
5374    for ac_prog in tail
5375do
5376  # Extract the first word of "$ac_prog", so it can be a program name with args.
5377set dummy $ac_prog; ac_word=$2
5378{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5379$as_echo_n "checking for $ac_word... " >&6; }
5380if ${ac_cv_path_TAIL+:} false; then :
5381  $as_echo_n "(cached) " >&6
5382else
5383  case $TAIL in
5384  [\\/]* | ?:[\\/]*)
5385  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
5386  ;;
5387  *)
5388  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5389for as_dir in $PATH
5390do
5391  IFS=$as_save_IFS
5392  test -z "$as_dir" && as_dir=.
5393    for ac_exec_ext in '' $ac_executable_extensions; do
5394  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5395    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
5396    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5397    break 2
5398  fi
5399done
5400  done
5401IFS=$as_save_IFS
5402
5403  ;;
5404esac
5405fi
5406TAIL=$ac_cv_path_TAIL
5407if test -n "$TAIL"; then
5408  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
5409$as_echo "$TAIL" >&6; }
5410else
5411  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5412$as_echo "no" >&6; }
5413fi
5414
5415
5416  test -n "$TAIL" && break
5417done
5418
5419
5420    if test "x$TAIL" = x; then
5421        if test "xtail" = x; then
5422          PROG_NAME=tail
5423        else
5424          PROG_NAME=tail
5425        fi
5426        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5427$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5428        as_fn_error $? "Cannot continue" "$LINENO" 5
5429    fi
5430
5431
5432
5433    for ac_prog in tar
5434do
5435  # Extract the first word of "$ac_prog", so it can be a program name with args.
5436set dummy $ac_prog; ac_word=$2
5437{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5438$as_echo_n "checking for $ac_word... " >&6; }
5439if ${ac_cv_path_TAR+:} false; then :
5440  $as_echo_n "(cached) " >&6
5441else
5442  case $TAR in
5443  [\\/]* | ?:[\\/]*)
5444  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
5445  ;;
5446  *)
5447  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5448for as_dir in $PATH
5449do
5450  IFS=$as_save_IFS
5451  test -z "$as_dir" && as_dir=.
5452    for ac_exec_ext in '' $ac_executable_extensions; do
5453  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5454    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
5455    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5456    break 2
5457  fi
5458done
5459  done
5460IFS=$as_save_IFS
5461
5462  ;;
5463esac
5464fi
5465TAR=$ac_cv_path_TAR
5466if test -n "$TAR"; then
5467  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
5468$as_echo "$TAR" >&6; }
5469else
5470  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5471$as_echo "no" >&6; }
5472fi
5473
5474
5475  test -n "$TAR" && break
5476done
5477
5478
5479    if test "x$TAR" = x; then
5480        if test "xtar" = x; then
5481          PROG_NAME=tar
5482        else
5483          PROG_NAME=tar
5484        fi
5485        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5486$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5487        as_fn_error $? "Cannot continue" "$LINENO" 5
5488    fi
5489
5490
5491
5492    for ac_prog in tee
5493do
5494  # Extract the first word of "$ac_prog", so it can be a program name with args.
5495set dummy $ac_prog; ac_word=$2
5496{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5497$as_echo_n "checking for $ac_word... " >&6; }
5498if ${ac_cv_path_TEE+:} false; then :
5499  $as_echo_n "(cached) " >&6
5500else
5501  case $TEE in
5502  [\\/]* | ?:[\\/]*)
5503  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
5504  ;;
5505  *)
5506  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5507for as_dir in $PATH
5508do
5509  IFS=$as_save_IFS
5510  test -z "$as_dir" && as_dir=.
5511    for ac_exec_ext in '' $ac_executable_extensions; do
5512  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5513    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
5514    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5515    break 2
5516  fi
5517done
5518  done
5519IFS=$as_save_IFS
5520
5521  ;;
5522esac
5523fi
5524TEE=$ac_cv_path_TEE
5525if test -n "$TEE"; then
5526  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
5527$as_echo "$TEE" >&6; }
5528else
5529  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5530$as_echo "no" >&6; }
5531fi
5532
5533
5534  test -n "$TEE" && break
5535done
5536
5537
5538    if test "x$TEE" = x; then
5539        if test "xtee" = x; then
5540          PROG_NAME=tee
5541        else
5542          PROG_NAME=tee
5543        fi
5544        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5545$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5546        as_fn_error $? "Cannot continue" "$LINENO" 5
5547    fi
5548
5549
5550
5551    for ac_prog in touch
5552do
5553  # Extract the first word of "$ac_prog", so it can be a program name with args.
5554set dummy $ac_prog; ac_word=$2
5555{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5556$as_echo_n "checking for $ac_word... " >&6; }
5557if ${ac_cv_path_TOUCH+:} false; then :
5558  $as_echo_n "(cached) " >&6
5559else
5560  case $TOUCH in
5561  [\\/]* | ?:[\\/]*)
5562  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
5563  ;;
5564  *)
5565  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5566for as_dir in $PATH
5567do
5568  IFS=$as_save_IFS
5569  test -z "$as_dir" && as_dir=.
5570    for ac_exec_ext in '' $ac_executable_extensions; do
5571  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5572    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
5573    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5574    break 2
5575  fi
5576done
5577  done
5578IFS=$as_save_IFS
5579
5580  ;;
5581esac
5582fi
5583TOUCH=$ac_cv_path_TOUCH
5584if test -n "$TOUCH"; then
5585  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
5586$as_echo "$TOUCH" >&6; }
5587else
5588  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5589$as_echo "no" >&6; }
5590fi
5591
5592
5593  test -n "$TOUCH" && break
5594done
5595
5596
5597    if test "x$TOUCH" = x; then
5598        if test "xtouch" = x; then
5599          PROG_NAME=touch
5600        else
5601          PROG_NAME=touch
5602        fi
5603        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5604$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5605        as_fn_error $? "Cannot continue" "$LINENO" 5
5606    fi
5607
5608
5609
5610    for ac_prog in tr
5611do
5612  # Extract the first word of "$ac_prog", so it can be a program name with args.
5613set dummy $ac_prog; ac_word=$2
5614{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5615$as_echo_n "checking for $ac_word... " >&6; }
5616if ${ac_cv_path_TR+:} false; then :
5617  $as_echo_n "(cached) " >&6
5618else
5619  case $TR in
5620  [\\/]* | ?:[\\/]*)
5621  ac_cv_path_TR="$TR" # Let the user override the test with a path.
5622  ;;
5623  *)
5624  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5625for as_dir in $PATH
5626do
5627  IFS=$as_save_IFS
5628  test -z "$as_dir" && as_dir=.
5629    for ac_exec_ext in '' $ac_executable_extensions; do
5630  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5631    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
5632    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5633    break 2
5634  fi
5635done
5636  done
5637IFS=$as_save_IFS
5638
5639  ;;
5640esac
5641fi
5642TR=$ac_cv_path_TR
5643if test -n "$TR"; then
5644  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
5645$as_echo "$TR" >&6; }
5646else
5647  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5648$as_echo "no" >&6; }
5649fi
5650
5651
5652  test -n "$TR" && break
5653done
5654
5655
5656    if test "x$TR" = x; then
5657        if test "xtr" = x; then
5658          PROG_NAME=tr
5659        else
5660          PROG_NAME=tr
5661        fi
5662        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5663$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5664        as_fn_error $? "Cannot continue" "$LINENO" 5
5665    fi
5666
5667
5668
5669    for ac_prog in uname
5670do
5671  # Extract the first word of "$ac_prog", so it can be a program name with args.
5672set dummy $ac_prog; ac_word=$2
5673{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5674$as_echo_n "checking for $ac_word... " >&6; }
5675if ${ac_cv_path_UNAME+:} false; then :
5676  $as_echo_n "(cached) " >&6
5677else
5678  case $UNAME in
5679  [\\/]* | ?:[\\/]*)
5680  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
5681  ;;
5682  *)
5683  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5684for as_dir in $PATH
5685do
5686  IFS=$as_save_IFS
5687  test -z "$as_dir" && as_dir=.
5688    for ac_exec_ext in '' $ac_executable_extensions; do
5689  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5690    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
5691    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5692    break 2
5693  fi
5694done
5695  done
5696IFS=$as_save_IFS
5697
5698  ;;
5699esac
5700fi
5701UNAME=$ac_cv_path_UNAME
5702if test -n "$UNAME"; then
5703  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
5704$as_echo "$UNAME" >&6; }
5705else
5706  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5707$as_echo "no" >&6; }
5708fi
5709
5710
5711  test -n "$UNAME" && break
5712done
5713
5714
5715    if test "x$UNAME" = x; then
5716        if test "xuname" = x; then
5717          PROG_NAME=uname
5718        else
5719          PROG_NAME=uname
5720        fi
5721        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5722$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5723        as_fn_error $? "Cannot continue" "$LINENO" 5
5724    fi
5725
5726
5727
5728    for ac_prog in uniq
5729do
5730  # Extract the first word of "$ac_prog", so it can be a program name with args.
5731set dummy $ac_prog; ac_word=$2
5732{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5733$as_echo_n "checking for $ac_word... " >&6; }
5734if ${ac_cv_path_UNIQ+:} false; then :
5735  $as_echo_n "(cached) " >&6
5736else
5737  case $UNIQ in
5738  [\\/]* | ?:[\\/]*)
5739  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
5740  ;;
5741  *)
5742  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5743for as_dir in $PATH
5744do
5745  IFS=$as_save_IFS
5746  test -z "$as_dir" && as_dir=.
5747    for ac_exec_ext in '' $ac_executable_extensions; do
5748  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5749    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
5750    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5751    break 2
5752  fi
5753done
5754  done
5755IFS=$as_save_IFS
5756
5757  ;;
5758esac
5759fi
5760UNIQ=$ac_cv_path_UNIQ
5761if test -n "$UNIQ"; then
5762  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
5763$as_echo "$UNIQ" >&6; }
5764else
5765  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5766$as_echo "no" >&6; }
5767fi
5768
5769
5770  test -n "$UNIQ" && break
5771done
5772
5773
5774    if test "x$UNIQ" = x; then
5775        if test "xuniq" = x; then
5776          PROG_NAME=uniq
5777        else
5778          PROG_NAME=uniq
5779        fi
5780        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5781$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5782        as_fn_error $? "Cannot continue" "$LINENO" 5
5783    fi
5784
5785
5786
5787    for ac_prog in wc
5788do
5789  # Extract the first word of "$ac_prog", so it can be a program name with args.
5790set dummy $ac_prog; ac_word=$2
5791{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5792$as_echo_n "checking for $ac_word... " >&6; }
5793if ${ac_cv_path_WC+:} false; then :
5794  $as_echo_n "(cached) " >&6
5795else
5796  case $WC in
5797  [\\/]* | ?:[\\/]*)
5798  ac_cv_path_WC="$WC" # Let the user override the test with a path.
5799  ;;
5800  *)
5801  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5802for as_dir in $PATH
5803do
5804  IFS=$as_save_IFS
5805  test -z "$as_dir" && as_dir=.
5806    for ac_exec_ext in '' $ac_executable_extensions; do
5807  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5808    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
5809    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5810    break 2
5811  fi
5812done
5813  done
5814IFS=$as_save_IFS
5815
5816  ;;
5817esac
5818fi
5819WC=$ac_cv_path_WC
5820if test -n "$WC"; then
5821  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
5822$as_echo "$WC" >&6; }
5823else
5824  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5825$as_echo "no" >&6; }
5826fi
5827
5828
5829  test -n "$WC" && break
5830done
5831
5832
5833    if test "x$WC" = x; then
5834        if test "xwc" = x; then
5835          PROG_NAME=wc
5836        else
5837          PROG_NAME=wc
5838        fi
5839        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5840$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5841        as_fn_error $? "Cannot continue" "$LINENO" 5
5842    fi
5843
5844
5845
5846    for ac_prog in which
5847do
5848  # Extract the first word of "$ac_prog", so it can be a program name with args.
5849set dummy $ac_prog; ac_word=$2
5850{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5851$as_echo_n "checking for $ac_word... " >&6; }
5852if ${ac_cv_path_WHICH+:} false; then :
5853  $as_echo_n "(cached) " >&6
5854else
5855  case $WHICH in
5856  [\\/]* | ?:[\\/]*)
5857  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
5858  ;;
5859  *)
5860  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5861for as_dir in $PATH
5862do
5863  IFS=$as_save_IFS
5864  test -z "$as_dir" && as_dir=.
5865    for ac_exec_ext in '' $ac_executable_extensions; do
5866  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5867    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
5868    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5869    break 2
5870  fi
5871done
5872  done
5873IFS=$as_save_IFS
5874
5875  ;;
5876esac
5877fi
5878WHICH=$ac_cv_path_WHICH
5879if test -n "$WHICH"; then
5880  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
5881$as_echo "$WHICH" >&6; }
5882else
5883  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5884$as_echo "no" >&6; }
5885fi
5886
5887
5888  test -n "$WHICH" && break
5889done
5890
5891
5892    if test "x$WHICH" = x; then
5893        if test "xwhich" = x; then
5894          PROG_NAME=which
5895        else
5896          PROG_NAME=which
5897        fi
5898        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5899$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5900        as_fn_error $? "Cannot continue" "$LINENO" 5
5901    fi
5902
5903
5904
5905    for ac_prog in xargs
5906do
5907  # Extract the first word of "$ac_prog", so it can be a program name with args.
5908set dummy $ac_prog; ac_word=$2
5909{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5910$as_echo_n "checking for $ac_word... " >&6; }
5911if ${ac_cv_path_XARGS+:} false; then :
5912  $as_echo_n "(cached) " >&6
5913else
5914  case $XARGS in
5915  [\\/]* | ?:[\\/]*)
5916  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
5917  ;;
5918  *)
5919  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5920for as_dir in $PATH
5921do
5922  IFS=$as_save_IFS
5923  test -z "$as_dir" && as_dir=.
5924    for ac_exec_ext in '' $ac_executable_extensions; do
5925  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5926    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
5927    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5928    break 2
5929  fi
5930done
5931  done
5932IFS=$as_save_IFS
5933
5934  ;;
5935esac
5936fi
5937XARGS=$ac_cv_path_XARGS
5938if test -n "$XARGS"; then
5939  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
5940$as_echo "$XARGS" >&6; }
5941else
5942  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5943$as_echo "no" >&6; }
5944fi
5945
5946
5947  test -n "$XARGS" && break
5948done
5949
5950
5951    if test "x$XARGS" = x; then
5952        if test "xxargs" = x; then
5953          PROG_NAME=xargs
5954        else
5955          PROG_NAME=xargs
5956        fi
5957        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5958$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5959        as_fn_error $? "Cannot continue" "$LINENO" 5
5960    fi
5961
5962
5963
5964# Then required tools that require some special treatment.
5965for ac_prog in gawk mawk nawk awk
5966do
5967  # Extract the first word of "$ac_prog", so it can be a program name with args.
5968set dummy $ac_prog; ac_word=$2
5969{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5970$as_echo_n "checking for $ac_word... " >&6; }
5971if ${ac_cv_prog_AWK+:} false; then :
5972  $as_echo_n "(cached) " >&6
5973else
5974  if test -n "$AWK"; then
5975  ac_cv_prog_AWK="$AWK" # Let the user override the test.
5976else
5977as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5978for as_dir in $PATH
5979do
5980  IFS=$as_save_IFS
5981  test -z "$as_dir" && as_dir=.
5982    for ac_exec_ext in '' $ac_executable_extensions; do
5983  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5984    ac_cv_prog_AWK="$ac_prog"
5985    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5986    break 2
5987  fi
5988done
5989  done
5990IFS=$as_save_IFS
5991
5992fi
5993fi
5994AWK=$ac_cv_prog_AWK
5995if test -n "$AWK"; then
5996  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
5997$as_echo "$AWK" >&6; }
5998else
5999  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6000$as_echo "no" >&6; }
6001fi
6002
6003
6004  test -n "$AWK" && break
6005done
6006
6007
6008    if test "x$AWK" = x; then
6009        if test "x" = x; then
6010          PROG_NAME=awk
6011        else
6012          PROG_NAME=
6013        fi
6014        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6015$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6016        as_fn_error $? "Cannot continue" "$LINENO" 5
6017    fi
6018
6019{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
6020$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
6021if ${ac_cv_path_GREP+:} false; then :
6022  $as_echo_n "(cached) " >&6
6023else
6024  if test -z "$GREP"; then
6025  ac_path_GREP_found=false
6026  # Loop through the user's path and test for each of PROGNAME-LIST
6027  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6028for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6029do
6030  IFS=$as_save_IFS
6031  test -z "$as_dir" && as_dir=.
6032    for ac_prog in grep ggrep; do
6033    for ac_exec_ext in '' $ac_executable_extensions; do
6034      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
6035      as_fn_executable_p "$ac_path_GREP" || continue
6036# Check for GNU ac_path_GREP and select it if it is found.
6037  # Check for GNU $ac_path_GREP
6038case `"$ac_path_GREP" --version 2>&1` in
6039*GNU*)
6040  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
6041*)
6042  ac_count=0
6043  $as_echo_n 0123456789 >"conftest.in"
6044  while :
6045  do
6046    cat "conftest.in" "conftest.in" >"conftest.tmp"
6047    mv "conftest.tmp" "conftest.in"
6048    cp "conftest.in" "conftest.nl"
6049    $as_echo 'GREP' >> "conftest.nl"
6050    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6051    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6052    as_fn_arith $ac_count + 1 && ac_count=$as_val
6053    if test $ac_count -gt ${ac_path_GREP_max-0}; then
6054      # Best one so far, save it but keep looking for a better one
6055      ac_cv_path_GREP="$ac_path_GREP"
6056      ac_path_GREP_max=$ac_count
6057    fi
6058    # 10*(2^10) chars as input seems more than enough
6059    test $ac_count -gt 10 && break
6060  done
6061  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6062esac
6063
6064      $ac_path_GREP_found && break 3
6065    done
6066  done
6067  done
6068IFS=$as_save_IFS
6069  if test -z "$ac_cv_path_GREP"; then
6070    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6071  fi
6072else
6073  ac_cv_path_GREP=$GREP
6074fi
6075
6076fi
6077{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
6078$as_echo "$ac_cv_path_GREP" >&6; }
6079 GREP="$ac_cv_path_GREP"
6080
6081
6082
6083    if test "x$GREP" = x; then
6084        if test "x" = x; then
6085          PROG_NAME=grep
6086        else
6087          PROG_NAME=
6088        fi
6089        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6090$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6091        as_fn_error $? "Cannot continue" "$LINENO" 5
6092    fi
6093
6094{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
6095$as_echo_n "checking for egrep... " >&6; }
6096if ${ac_cv_path_EGREP+:} false; then :
6097  $as_echo_n "(cached) " >&6
6098else
6099  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
6100   then ac_cv_path_EGREP="$GREP -E"
6101   else
6102     if test -z "$EGREP"; then
6103  ac_path_EGREP_found=false
6104  # Loop through the user's path and test for each of PROGNAME-LIST
6105  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6106for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6107do
6108  IFS=$as_save_IFS
6109  test -z "$as_dir" && as_dir=.
6110    for ac_prog in egrep; do
6111    for ac_exec_ext in '' $ac_executable_extensions; do
6112      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
6113      as_fn_executable_p "$ac_path_EGREP" || continue
6114# Check for GNU ac_path_EGREP and select it if it is found.
6115  # Check for GNU $ac_path_EGREP
6116case `"$ac_path_EGREP" --version 2>&1` in
6117*GNU*)
6118  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
6119*)
6120  ac_count=0
6121  $as_echo_n 0123456789 >"conftest.in"
6122  while :
6123  do
6124    cat "conftest.in" "conftest.in" >"conftest.tmp"
6125    mv "conftest.tmp" "conftest.in"
6126    cp "conftest.in" "conftest.nl"
6127    $as_echo 'EGREP' >> "conftest.nl"
6128    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6129    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6130    as_fn_arith $ac_count + 1 && ac_count=$as_val
6131    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
6132      # Best one so far, save it but keep looking for a better one
6133      ac_cv_path_EGREP="$ac_path_EGREP"
6134      ac_path_EGREP_max=$ac_count
6135    fi
6136    # 10*(2^10) chars as input seems more than enough
6137    test $ac_count -gt 10 && break
6138  done
6139  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6140esac
6141
6142      $ac_path_EGREP_found && break 3
6143    done
6144  done
6145  done
6146IFS=$as_save_IFS
6147  if test -z "$ac_cv_path_EGREP"; then
6148    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6149  fi
6150else
6151  ac_cv_path_EGREP=$EGREP
6152fi
6153
6154   fi
6155fi
6156{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
6157$as_echo "$ac_cv_path_EGREP" >&6; }
6158 EGREP="$ac_cv_path_EGREP"
6159
6160
6161
6162    if test "x$EGREP" = x; then
6163        if test "x" = x; then
6164          PROG_NAME=egrep
6165        else
6166          PROG_NAME=
6167        fi
6168        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6169$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6170        as_fn_error $? "Cannot continue" "$LINENO" 5
6171    fi
6172
6173{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
6174$as_echo_n "checking for fgrep... " >&6; }
6175if ${ac_cv_path_FGREP+:} false; then :
6176  $as_echo_n "(cached) " >&6
6177else
6178  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
6179   then ac_cv_path_FGREP="$GREP -F"
6180   else
6181     if test -z "$FGREP"; then
6182  ac_path_FGREP_found=false
6183  # Loop through the user's path and test for each of PROGNAME-LIST
6184  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6185for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6186do
6187  IFS=$as_save_IFS
6188  test -z "$as_dir" && as_dir=.
6189    for ac_prog in fgrep; do
6190    for ac_exec_ext in '' $ac_executable_extensions; do
6191      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
6192      as_fn_executable_p "$ac_path_FGREP" || continue
6193# Check for GNU ac_path_FGREP and select it if it is found.
6194  # Check for GNU $ac_path_FGREP
6195case `"$ac_path_FGREP" --version 2>&1` in
6196*GNU*)
6197  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
6198*)
6199  ac_count=0
6200  $as_echo_n 0123456789 >"conftest.in"
6201  while :
6202  do
6203    cat "conftest.in" "conftest.in" >"conftest.tmp"
6204    mv "conftest.tmp" "conftest.in"
6205    cp "conftest.in" "conftest.nl"
6206    $as_echo 'FGREP' >> "conftest.nl"
6207    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
6208    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6209    as_fn_arith $ac_count + 1 && ac_count=$as_val
6210    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
6211      # Best one so far, save it but keep looking for a better one
6212      ac_cv_path_FGREP="$ac_path_FGREP"
6213      ac_path_FGREP_max=$ac_count
6214    fi
6215    # 10*(2^10) chars as input seems more than enough
6216    test $ac_count -gt 10 && break
6217  done
6218  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6219esac
6220
6221      $ac_path_FGREP_found && break 3
6222    done
6223  done
6224  done
6225IFS=$as_save_IFS
6226  if test -z "$ac_cv_path_FGREP"; then
6227    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6228  fi
6229else
6230  ac_cv_path_FGREP=$FGREP
6231fi
6232
6233   fi
6234fi
6235{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
6236$as_echo "$ac_cv_path_FGREP" >&6; }
6237 FGREP="$ac_cv_path_FGREP"
6238
6239
6240
6241    if test "x$FGREP" = x; then
6242        if test "x" = x; then
6243          PROG_NAME=fgrep
6244        else
6245          PROG_NAME=
6246        fi
6247        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6248$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6249        as_fn_error $? "Cannot continue" "$LINENO" 5
6250    fi
6251
6252{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
6253$as_echo_n "checking for a sed that does not truncate output... " >&6; }
6254if ${ac_cv_path_SED+:} false; then :
6255  $as_echo_n "(cached) " >&6
6256else
6257            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
6258     for ac_i in 1 2 3 4 5 6 7; do
6259       ac_script="$ac_script$as_nl$ac_script"
6260     done
6261     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
6262     { ac_script=; unset ac_script;}
6263     if test -z "$SED"; then
6264  ac_path_SED_found=false
6265  # Loop through the user's path and test for each of PROGNAME-LIST
6266  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6267for as_dir in $PATH
6268do
6269  IFS=$as_save_IFS
6270  test -z "$as_dir" && as_dir=.
6271    for ac_prog in sed gsed; do
6272    for ac_exec_ext in '' $ac_executable_extensions; do
6273      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
6274      as_fn_executable_p "$ac_path_SED" || continue
6275# Check for GNU ac_path_SED and select it if it is found.
6276  # Check for GNU $ac_path_SED
6277case `"$ac_path_SED" --version 2>&1` in
6278*GNU*)
6279  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
6280*)
6281  ac_count=0
6282  $as_echo_n 0123456789 >"conftest.in"
6283  while :
6284  do
6285    cat "conftest.in" "conftest.in" >"conftest.tmp"
6286    mv "conftest.tmp" "conftest.in"
6287    cp "conftest.in" "conftest.nl"
6288    $as_echo '' >> "conftest.nl"
6289    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
6290    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6291    as_fn_arith $ac_count + 1 && ac_count=$as_val
6292    if test $ac_count -gt ${ac_path_SED_max-0}; then
6293      # Best one so far, save it but keep looking for a better one
6294      ac_cv_path_SED="$ac_path_SED"
6295      ac_path_SED_max=$ac_count
6296    fi
6297    # 10*(2^10) chars as input seems more than enough
6298    test $ac_count -gt 10 && break
6299  done
6300  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6301esac
6302
6303      $ac_path_SED_found && break 3
6304    done
6305  done
6306  done
6307IFS=$as_save_IFS
6308  if test -z "$ac_cv_path_SED"; then
6309    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
6310  fi
6311else
6312  ac_cv_path_SED=$SED
6313fi
6314
6315fi
6316{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
6317$as_echo "$ac_cv_path_SED" >&6; }
6318 SED="$ac_cv_path_SED"
6319  rm -f conftest.sed
6320
6321
6322    if test "x$SED" = x; then
6323        if test "x" = x; then
6324          PROG_NAME=sed
6325        else
6326          PROG_NAME=
6327        fi
6328        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6329$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6330        as_fn_error $? "Cannot continue" "$LINENO" 5
6331    fi
6332
6333
6334for ac_prog in nawk gawk awk
6335do
6336  # Extract the first word of "$ac_prog", so it can be a program name with args.
6337set dummy $ac_prog; ac_word=$2
6338{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6339$as_echo_n "checking for $ac_word... " >&6; }
6340if ${ac_cv_path_NAWK+:} false; then :
6341  $as_echo_n "(cached) " >&6
6342else
6343  case $NAWK in
6344  [\\/]* | ?:[\\/]*)
6345  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
6346  ;;
6347  *)
6348  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6349for as_dir in $PATH
6350do
6351  IFS=$as_save_IFS
6352  test -z "$as_dir" && as_dir=.
6353    for ac_exec_ext in '' $ac_executable_extensions; do
6354  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6355    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
6356    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6357    break 2
6358  fi
6359done
6360  done
6361IFS=$as_save_IFS
6362
6363  ;;
6364esac
6365fi
6366NAWK=$ac_cv_path_NAWK
6367if test -n "$NAWK"; then
6368  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
6369$as_echo "$NAWK" >&6; }
6370else
6371  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6372$as_echo "no" >&6; }
6373fi
6374
6375
6376  test -n "$NAWK" && break
6377done
6378
6379
6380    if test "x$NAWK" = x; then
6381        if test "x" = x; then
6382          PROG_NAME=nawk
6383        else
6384          PROG_NAME=
6385        fi
6386        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6387$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6388        as_fn_error $? "Cannot continue" "$LINENO" 5
6389    fi
6390
6391
6392# Always force rm.
6393RM="$RM -f"
6394
6395# pwd behaves differently on various platforms and some don't support the -L flag.
6396# Always use the bash builtin pwd to get uniform behavior.
6397THEPWDCMD=pwd
6398
6399# These are not required on all platforms
6400# Extract the first word of "cygpath", so it can be a program name with args.
6401set dummy cygpath; ac_word=$2
6402{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6403$as_echo_n "checking for $ac_word... " >&6; }
6404if ${ac_cv_path_CYGPATH+:} false; then :
6405  $as_echo_n "(cached) " >&6
6406else
6407  case $CYGPATH in
6408  [\\/]* | ?:[\\/]*)
6409  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
6410  ;;
6411  *)
6412  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6413for as_dir in $PATH
6414do
6415  IFS=$as_save_IFS
6416  test -z "$as_dir" && as_dir=.
6417    for ac_exec_ext in '' $ac_executable_extensions; do
6418  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6419    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
6420    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6421    break 2
6422  fi
6423done
6424  done
6425IFS=$as_save_IFS
6426
6427  ;;
6428esac
6429fi
6430CYGPATH=$ac_cv_path_CYGPATH
6431if test -n "$CYGPATH"; then
6432  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
6433$as_echo "$CYGPATH" >&6; }
6434else
6435  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6436$as_echo "no" >&6; }
6437fi
6438
6439
6440# Extract the first word of "readlink", so it can be a program name with args.
6441set dummy readlink; ac_word=$2
6442{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6443$as_echo_n "checking for $ac_word... " >&6; }
6444if ${ac_cv_path_READLINK+:} false; then :
6445  $as_echo_n "(cached) " >&6
6446else
6447  case $READLINK in
6448  [\\/]* | ?:[\\/]*)
6449  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
6450  ;;
6451  *)
6452  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6453for as_dir in $PATH
6454do
6455  IFS=$as_save_IFS
6456  test -z "$as_dir" && as_dir=.
6457    for ac_exec_ext in '' $ac_executable_extensions; do
6458  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6459    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
6460    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6461    break 2
6462  fi
6463done
6464  done
6465IFS=$as_save_IFS
6466
6467  ;;
6468esac
6469fi
6470READLINK=$ac_cv_path_READLINK
6471if test -n "$READLINK"; then
6472  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
6473$as_echo "$READLINK" >&6; }
6474else
6475  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6476$as_echo "no" >&6; }
6477fi
6478
6479
6480# Extract the first word of "df", so it can be a program name with args.
6481set dummy df; ac_word=$2
6482{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6483$as_echo_n "checking for $ac_word... " >&6; }
6484if ${ac_cv_path_DF+:} false; then :
6485  $as_echo_n "(cached) " >&6
6486else
6487  case $DF in
6488  [\\/]* | ?:[\\/]*)
6489  ac_cv_path_DF="$DF" # Let the user override the test with a path.
6490  ;;
6491  *)
6492  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6493for as_dir in $PATH
6494do
6495  IFS=$as_save_IFS
6496  test -z "$as_dir" && as_dir=.
6497    for ac_exec_ext in '' $ac_executable_extensions; do
6498  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6499    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
6500    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6501    break 2
6502  fi
6503done
6504  done
6505IFS=$as_save_IFS
6506
6507  ;;
6508esac
6509fi
6510DF=$ac_cv_path_DF
6511if test -n "$DF"; then
6512  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
6513$as_echo "$DF" >&6; }
6514else
6515  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6516$as_echo "no" >&6; }
6517fi
6518
6519
6520# Extract the first word of "SetFile", so it can be a program name with args.
6521set dummy SetFile; ac_word=$2
6522{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6523$as_echo_n "checking for $ac_word... " >&6; }
6524if ${ac_cv_path_SETFILE+:} false; then :
6525  $as_echo_n "(cached) " >&6
6526else
6527  case $SETFILE in
6528  [\\/]* | ?:[\\/]*)
6529  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
6530  ;;
6531  *)
6532  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6533for as_dir in $PATH
6534do
6535  IFS=$as_save_IFS
6536  test -z "$as_dir" && as_dir=.
6537    for ac_exec_ext in '' $ac_executable_extensions; do
6538  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6539    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
6540    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6541    break 2
6542  fi
6543done
6544  done
6545IFS=$as_save_IFS
6546
6547  ;;
6548esac
6549fi
6550SETFILE=$ac_cv_path_SETFILE
6551if test -n "$SETFILE"; then
6552  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
6553$as_echo "$SETFILE" >&6; }
6554else
6555  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6556$as_echo "no" >&6; }
6557fi
6558
6559
6560
6561
6562# Now we can determine OpenJDK build and target platforms. This is required to
6563# have early on.
6564# Make sure we can run config.sub.
6565$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
6566  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
6567
6568{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
6569$as_echo_n "checking build system type... " >&6; }
6570if ${ac_cv_build+:} false; then :
6571  $as_echo_n "(cached) " >&6
6572else
6573  ac_build_alias=$build_alias
6574test "x$ac_build_alias" = x &&
6575  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
6576test "x$ac_build_alias" = x &&
6577  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
6578ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
6579  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
6580
6581fi
6582{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
6583$as_echo "$ac_cv_build" >&6; }
6584case $ac_cv_build in
6585*-*-*) ;;
6586*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
6587esac
6588build=$ac_cv_build
6589ac_save_IFS=$IFS; IFS='-'
6590set x $ac_cv_build
6591shift
6592build_cpu=$1
6593build_vendor=$2
6594shift; shift
6595# Remember, the first character of IFS is used to create $*,
6596# except with old shells:
6597build_os=$*
6598IFS=$ac_save_IFS
6599case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
6600
6601
6602{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
6603$as_echo_n "checking host system type... " >&6; }
6604if ${ac_cv_host+:} false; then :
6605  $as_echo_n "(cached) " >&6
6606else
6607  if test "x$host_alias" = x; then
6608  ac_cv_host=$ac_cv_build
6609else
6610  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
6611    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
6612fi
6613
6614fi
6615{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
6616$as_echo "$ac_cv_host" >&6; }
6617case $ac_cv_host in
6618*-*-*) ;;
6619*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
6620esac
6621host=$ac_cv_host
6622ac_save_IFS=$IFS; IFS='-'
6623set x $ac_cv_host
6624shift
6625host_cpu=$1
6626host_vendor=$2
6627shift; shift
6628# Remember, the first character of IFS is used to create $*,
6629# except with old shells:
6630host_os=$*
6631IFS=$ac_save_IFS
6632case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
6633
6634
6635{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
6636$as_echo_n "checking target system type... " >&6; }
6637if ${ac_cv_target+:} false; then :
6638  $as_echo_n "(cached) " >&6
6639else
6640  if test "x$target_alias" = x; then
6641  ac_cv_target=$ac_cv_host
6642else
6643  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
6644    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
6645fi
6646
6647fi
6648{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
6649$as_echo "$ac_cv_target" >&6; }
6650case $ac_cv_target in
6651*-*-*) ;;
6652*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
6653esac
6654target=$ac_cv_target
6655ac_save_IFS=$IFS; IFS='-'
6656set x $ac_cv_target
6657shift
6658target_cpu=$1
6659target_vendor=$2
6660shift; shift
6661# Remember, the first character of IFS is used to create $*,
6662# except with old shells:
6663target_os=$*
6664IFS=$ac_save_IFS
6665case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
6666
6667
6668# The aliases save the names the user supplied, while $host etc.
6669# will get canonicalized.
6670test -n "$target_alias" &&
6671  test "$program_prefix$program_suffix$program_transform_name" = \
6672    NONENONEs,x,x, &&
6673  program_prefix=${target_alias}-
6674
6675# Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
6676# is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
6677# product you're building. The target of this build is called "host". Since this is confusing to most people, we
6678# have not adopted that system, but use "target" as the platform we are building for. In some places though we need
6679# to use the configure naming style.
6680
6681
6682
6683
6684
6685    # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
6686    # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
6687    # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
6688    # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
6689    OPENJDK_TARGET_AUTOCONF_NAME="$host"
6690    OPENJDK_BUILD_AUTOCONF_NAME="$build"
6691
6692
6693
6694    # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
6695
6696  case "$build_os" in
6697    *linux*)
6698      VAR_OS=linux
6699      VAR_OS_API=posix
6700      VAR_OS_ENV=linux
6701      ;;
6702    *solaris*)
6703      VAR_OS=solaris
6704      VAR_OS_API=posix
6705      VAR_OS_ENV=solaris
6706      ;;
6707    *darwin*)
6708      VAR_OS=macosx
6709      VAR_OS_API=posix
6710      VAR_OS_ENV=macosx
6711      ;;
6712    *bsd*)
6713      VAR_OS=bsd
6714      VAR_OS_API=posix
6715      VAR_OS_ENV=bsd
6716      ;;
6717    *cygwin*)
6718      VAR_OS=windows
6719      VAR_OS_API=winapi
6720      VAR_OS_ENV=windows.cygwin
6721      ;;
6722    *mingw*)
6723      VAR_OS=windows
6724      VAR_OS_API=winapi
6725      VAR_OS_ENV=windows.msys
6726      ;;
6727    *)
6728      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
6729      ;;
6730  esac
6731
6732
6733  # First argument is the cpu name from the trip/quad
6734  case "$build_cpu" in
6735    x86_64)
6736      VAR_CPU=x86_64
6737      VAR_CPU_ARCH=x86
6738      VAR_CPU_BITS=64
6739      VAR_CPU_ENDIAN=little
6740      ;;
6741    i?86)
6742      VAR_CPU=x86
6743      VAR_CPU_ARCH=x86
6744      VAR_CPU_BITS=32
6745      VAR_CPU_ENDIAN=little
6746      ;;
6747    arm*)
6748      VAR_CPU=arm
6749      VAR_CPU_ARCH=arm
6750      VAR_CPU_BITS=32
6751      VAR_CPU_ENDIAN=little
6752      ;;
6753    powerpc)
6754      VAR_CPU=ppc
6755      VAR_CPU_ARCH=ppc
6756      VAR_CPU_BITS=32
6757      VAR_CPU_ENDIAN=big
6758       ;;
6759    powerpc64)
6760      VAR_CPU=ppc64
6761      VAR_CPU_ARCH=ppc
6762      VAR_CPU_BITS=64
6763      VAR_CPU_ENDIAN=big
6764       ;;
6765    s390)
6766      VAR_CPU=s390
6767      VAR_CPU_ARCH=s390
6768      VAR_CPU_BITS=32
6769      VAR_CPU_ENDIAN=big
6770       ;;
6771    s390x)
6772      VAR_CPU=s390x
6773      VAR_CPU_ARCH=s390
6774      VAR_CPU_BITS=64
6775      VAR_CPU_ENDIAN=big
6776       ;;
6777    sparc)
6778      VAR_CPU=sparc
6779      VAR_CPU_ARCH=sparc
6780      VAR_CPU_BITS=32
6781      VAR_CPU_ENDIAN=big
6782       ;;
6783    sparcv9)
6784      VAR_CPU=sparcv9
6785      VAR_CPU_ARCH=sparc
6786      VAR_CPU_BITS=64
6787      VAR_CPU_ENDIAN=big
6788       ;;
6789    *)
6790      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
6791      ;;
6792  esac
6793
6794    # ..and setup our own variables. (Do this explicitely to facilitate searching)
6795    OPENJDK_BUILD_OS="$VAR_OS"
6796    OPENJDK_BUILD_OS_API="$VAR_OS_API"
6797    OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
6798    OPENJDK_BUILD_CPU="$VAR_CPU"
6799    OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
6800    OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
6801    OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
6802
6803
6804
6805
6806
6807
6808
6809    { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
6810$as_echo_n "checking openjdk-build os-cpu... " >&6; }
6811    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
6812$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
6813
6814    # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
6815
6816  case "$host_os" in
6817    *linux*)
6818      VAR_OS=linux
6819      VAR_OS_API=posix
6820      VAR_OS_ENV=linux
6821      ;;
6822    *solaris*)
6823      VAR_OS=solaris
6824      VAR_OS_API=posix
6825      VAR_OS_ENV=solaris
6826      ;;
6827    *darwin*)
6828      VAR_OS=macosx
6829      VAR_OS_API=posix
6830      VAR_OS_ENV=macosx
6831      ;;
6832    *bsd*)
6833      VAR_OS=bsd
6834      VAR_OS_API=posix
6835      VAR_OS_ENV=bsd
6836      ;;
6837    *cygwin*)
6838      VAR_OS=windows
6839      VAR_OS_API=winapi
6840      VAR_OS_ENV=windows.cygwin
6841      ;;
6842    *mingw*)
6843      VAR_OS=windows
6844      VAR_OS_API=winapi
6845      VAR_OS_ENV=windows.msys
6846      ;;
6847    *)
6848      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
6849      ;;
6850  esac
6851
6852
6853  # First argument is the cpu name from the trip/quad
6854  case "$host_cpu" in
6855    x86_64)
6856      VAR_CPU=x86_64
6857      VAR_CPU_ARCH=x86
6858      VAR_CPU_BITS=64
6859      VAR_CPU_ENDIAN=little
6860      ;;
6861    i?86)
6862      VAR_CPU=x86
6863      VAR_CPU_ARCH=x86
6864      VAR_CPU_BITS=32
6865      VAR_CPU_ENDIAN=little
6866      ;;
6867    arm*)
6868      VAR_CPU=arm
6869      VAR_CPU_ARCH=arm
6870      VAR_CPU_BITS=32
6871      VAR_CPU_ENDIAN=little
6872      ;;
6873    powerpc)
6874      VAR_CPU=ppc
6875      VAR_CPU_ARCH=ppc
6876      VAR_CPU_BITS=32
6877      VAR_CPU_ENDIAN=big
6878       ;;
6879    powerpc64)
6880      VAR_CPU=ppc64
6881      VAR_CPU_ARCH=ppc
6882      VAR_CPU_BITS=64
6883      VAR_CPU_ENDIAN=big
6884       ;;
6885    s390)
6886      VAR_CPU=s390
6887      VAR_CPU_ARCH=s390
6888      VAR_CPU_BITS=32
6889      VAR_CPU_ENDIAN=big
6890       ;;
6891    s390x)
6892      VAR_CPU=s390x
6893      VAR_CPU_ARCH=s390
6894      VAR_CPU_BITS=64
6895      VAR_CPU_ENDIAN=big
6896       ;;
6897    sparc)
6898      VAR_CPU=sparc
6899      VAR_CPU_ARCH=sparc
6900      VAR_CPU_BITS=32
6901      VAR_CPU_ENDIAN=big
6902       ;;
6903    sparcv9)
6904      VAR_CPU=sparcv9
6905      VAR_CPU_ARCH=sparc
6906      VAR_CPU_BITS=64
6907      VAR_CPU_ENDIAN=big
6908       ;;
6909    *)
6910      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
6911      ;;
6912  esac
6913
6914    # ... and setup our own variables. (Do this explicitely to facilitate searching)
6915    OPENJDK_TARGET_OS="$VAR_OS"
6916    OPENJDK_TARGET_OS_API="$VAR_OS_API"
6917    OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
6918    OPENJDK_TARGET_CPU="$VAR_CPU"
6919    OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
6920    OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
6921    OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
6922
6923
6924
6925
6926
6927
6928
6929    { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
6930$as_echo_n "checking openjdk-target os-cpu... " >&6; }
6931    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
6932$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
6933
6934
6935
6936# Check whether --with-target-bits was given.
6937if test "${with_target_bits+set}" = set; then :
6938  withval=$with_target_bits;
6939fi
6940
6941
6942  # We have three types of compiles:
6943  # native  == normal compilation, target system == build system
6944  # cross   == traditional cross compilation, target system != build system; special toolchain needed
6945  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
6946  #
6947  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
6948    # We're doing a proper cross-compilation
6949    COMPILE_TYPE="cross"
6950  else
6951    COMPILE_TYPE="native"
6952  fi
6953
6954  if test "x$with_target_bits" != x; then
6955    if test "x$COMPILE_TYPE" = "xcross"; then
6956      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
6957    fi
6958
6959    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
6960      # A reduced build is requested
6961      COMPILE_TYPE="reduced"
6962      OPENJDK_TARGET_CPU_BITS=32
6963      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
6964        OPENJDK_TARGET_CPU=x86
6965      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
6966        OPENJDK_TARGET_CPU=sparc
6967      else
6968        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
6969      fi
6970    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
6971      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
6972    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
6973      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
6974$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
6975    else
6976      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
6977    fi
6978  fi
6979
6980
6981{ $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
6982$as_echo_n "checking compilation type... " >&6; }
6983{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
6984$as_echo "$COMPILE_TYPE" >&6; }
6985
6986
6987    if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
6988       REQUIRED_OS_NAME=SunOS
6989       REQUIRED_OS_VERSION=5.10
6990    fi
6991    if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
6992       REQUIRED_OS_NAME=Linux
6993       REQUIRED_OS_VERSION=2.6
6994    fi
6995    if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
6996        REQUIRED_OS_NAME=Windows
6997        if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
6998            REQUIRED_OS_VERSION=5.2
6999        else
7000            REQUIRED_OS_VERSION=5.1
7001        fi
7002    fi
7003    if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
7004        REQUIRED_OS_NAME=Darwin
7005        REQUIRED_OS_VERSION=11.2
7006    fi
7007
7008
7009
7010
7011
7012    # Also store the legacy naming of the cpu.
7013    # Ie i586 and amd64 instead of x86 and x86_64
7014    OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
7015    if test "x$OPENJDK_TARGET_CPU" = xx86; then
7016      OPENJDK_TARGET_CPU_LEGACY="i586"
7017    elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7018      # On all platforms except MacOSX replace x86_64 with amd64.
7019      OPENJDK_TARGET_CPU_LEGACY="amd64"
7020    fi
7021
7022
7023    # And the second legacy naming of the cpu.
7024    # Ie i386 and amd64 instead of x86 and x86_64.
7025    OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
7026    if test "x$OPENJDK_TARGET_CPU" = xx86; then
7027      OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
7028    elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7029      OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
7030    fi
7031
7032
7033    # This is the name of the cpu (but using i386 and amd64 instead of
7034    # x86 and x86_64, respectively), preceeded by a /, to be used when
7035    # locating libraries. On macosx, it's empty, though.
7036    OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
7037    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
7038        OPENJDK_TARGET_CPU_LIBDIR=""
7039    fi
7040
7041
7042    # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
7043    # /amd64 or /sparcv9. This string is appended to some library paths, like this:
7044    # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
7045    OPENJDK_TARGET_CPU_ISADIR=""
7046    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
7047      if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7048          OPENJDK_TARGET_CPU_ISADIR="/amd64"
7049      elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
7050          OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
7051      fi
7052    fi
7053
7054
7055    # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
7056    OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
7057    if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
7058      # On linux only, we replace x86 with i386.
7059      OPENJDK_TARGET_CPU_OSARCH="i386"
7060    elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7061      # On all platforms except macosx, we replace x86_64 with amd64.
7062      OPENJDK_TARGET_CPU_OSARCH="amd64"
7063    fi
7064
7065
7066    OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
7067    if test "x$OPENJDK_TARGET_CPU" = xx86; then
7068      OPENJDK_TARGET_CPU_JLI="i386"
7069    elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7070      # On all platforms except macosx, we replace x86_64 with amd64.
7071      OPENJDK_TARGET_CPU_JLI="amd64"
7072    fi
7073    # Now setup the -D flags for building libjli.
7074    OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
7075    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
7076      if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
7077        OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
7078      elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
7079        OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
7080      fi
7081    fi
7082
7083
7084    # Setup OPENJDK_TARGET_OS_API_DIR, used in source paths.
7085    if test "x$OPENJDK_TARGET_OS_API" = xposix; then
7086        OPENJDK_TARGET_OS_API_DIR="solaris"
7087    fi
7088    if test "x$OPENJDK_TARGET_OS_API" = xwinapi; then
7089        OPENJDK_TARGET_OS_API_DIR="windows"
7090    fi
7091
7092
7093    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7094        A_LP64="LP64:="
7095        # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
7096        # unpack200.exe
7097        if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
7098            ADD_LP64="-D_LP64=1"
7099        fi
7100    fi
7101    LP64=$A_LP64
7102
7103
7104    if test "x$COMPILE_TYPE" = "xcross"; then
7105      # FIXME: ... or should this include reduced builds..?
7106      DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
7107    else
7108      DEFINE_CROSS_COMPILE_ARCH=""
7109    fi
7110
7111
7112    # ZERO_ARCHDEF is used to enable architecture-specific code
7113    case "${OPENJDK_TARGET_CPU}" in
7114      ppc*)    ZERO_ARCHDEF=PPC   ;;
7115      s390*)   ZERO_ARCHDEF=S390  ;;
7116      sparc*)  ZERO_ARCHDEF=SPARC ;;
7117      x86_64*) ZERO_ARCHDEF=AMD64 ;;
7118      x86)     ZERO_ARCHDEF=IA32  ;;
7119      *)      ZERO_ARCHDEF=$(echo "${OPENJDK_TARGET_CPU_LEGACY_LIB}" | tr a-z A-Z)
7120    esac
7121
7122
7123
7124
7125
7126# Continue setting up basic stuff. Most remaining code require fundamental tools.
7127
7128# Locate the directory of this script.
7129SCRIPT="$0"
7130AUTOCONF_DIR=`cd \`$DIRNAME $SCRIPT\`; $THEPWDCMD -L`
7131
7132# Where is the source? It is located two levels above the configure script.
7133CURDIR="$PWD"
7134cd "$AUTOCONF_DIR/../.."
7135SRC_ROOT="`$THEPWDCMD -L`"
7136
7137if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
7138  PATH_SEP=";"
7139
7140  SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
7141  if test $SRC_ROOT_LENGTH -gt 100; then
7142      as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
7143  fi
7144
7145  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7146    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
7147$as_echo_n "checking cygwin release... " >&6; }
7148    CYGWIN_VERSION=`$UNAME -r`
7149    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
7150$as_echo "$CYGWIN_VERSION" >&6; }
7151    WINDOWS_ENV_VENDOR='cygwin'
7152    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
7153
7154    CYGWIN_VERSION_OK=`$ECHO $CYGWIN_VERSION | $GREP ^1.7.`
7155    if test "x$CYGWIN_VERSION_OK" = x; then
7156      { $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
7157$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;}
7158      as_fn_error $? "Cannot continue" "$LINENO" 5
7159    fi
7160    if test "x$CYGPATH" = x; then
7161        as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
7162    fi
7163    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
7164$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
7165    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
7166    cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
7167    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
7168    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
7169    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
7170$as_echo "$CYGWIN_ROOT_PATH" >&6; }
7171    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
7172    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
7173    if test "x$test_cygdrive_prefix" = x; then
7174        as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
7175    fi
7176  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7177    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
7178$as_echo_n "checking msys release... " >&6; }
7179    MSYS_VERSION=`$UNAME -r`
7180    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
7181$as_echo "$MSYS_VERSION" >&6; }
7182
7183    WINDOWS_ENV_VENDOR='msys'
7184    WINDOWS_ENV_VERSION="$MSYS_VERSION"
7185
7186    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
7187$as_echo_n "checking msys root directory as unix-style path... " >&6; }
7188    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
7189    MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
7190
7191  windows_path="$MSYS_ROOT_PATH"
7192  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7193    unix_path=`$CYGPATH -u "$windows_path"`
7194    MSYS_ROOT_PATH="$unix_path"
7195  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7196    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7197    MSYS_ROOT_PATH="$unix_path"
7198  fi
7199
7200    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
7201$as_echo "$MSYS_ROOT_PATH" >&6; }
7202    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
7203  else
7204    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
7205  fi
7206
7207  # Test if windows or unix (cygwin/msys) find is first in path.
7208  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
7209$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
7210  FIND_BINARY_OUTPUT=`find --version 2>&1`
7211  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
7212    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
7213$as_echo "unix style" >&6; }
7214  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
7215    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
7216$as_echo "Windows" >&6; }
7217    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
7218$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
7219    { $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
7220$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
7221    as_fn_error $? "Cannot continue" "$LINENO" 5
7222  else
7223    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
7224$as_echo "unknown" >&6; }
7225    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
7226$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
7227  fi
7228
7229else
7230  PATH_SEP=":"
7231fi
7232
7233
7234
7235cd "$CURDIR"
7236
7237
7238  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7239
7240  # Input might be given as Windows format, start by converting to
7241  # unix format.
7242  path="$SRC_ROOT"
7243  new_path=`$CYGPATH -u "$path"`
7244
7245  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7246  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7247  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7248  # "foo.exe" is OK but "foo" is an error.
7249  #
7250  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7251  # It is also a way to make sure we got the proper file name for the real test later on.
7252  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7253  if test "x$test_shortpath" = x; then
7254    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5
7255$as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;}
7256    as_fn_error $? "Cannot locate the the path of SRC_ROOT" "$LINENO" 5
7257  fi
7258
7259  # Call helper function which possibly converts this using DOS-style short mode.
7260  # If so, the updated path is stored in $new_path.
7261
7262  input_path="$new_path"
7263  # Check if we need to convert this using DOS-style short mode. If the path
7264  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7265  # take no chances and rewrite it.
7266  # Note: m4 eats our [], so we need to use [ and ] instead.
7267  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7268  if test "x$has_forbidden_chars" != x; then
7269    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7270    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7271    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7272    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7273      # Going to short mode and back again did indeed matter. Since short mode is
7274      # case insensitive, let's make it lowercase to improve readability.
7275      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7276      # Now convert it back to Unix-stile (cygpath)
7277      input_path=`$CYGPATH -u "$shortmode_path"`
7278      new_path="$input_path"
7279    fi
7280  fi
7281
7282  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7283  if test "x$test_cygdrive_prefix" = x; then
7284    # As a simple fix, exclude /usr/bin since it's not a real path.
7285    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7286      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7287      # a path prefixed by /cygdrive for fixpath to work.
7288      new_path="$CYGWIN_ROOT_PATH$input_path"
7289    fi
7290  fi
7291
7292
7293  if test "x$path" != "x$new_path"; then
7294    SRC_ROOT="$new_path"
7295    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5
7296$as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;}
7297  fi
7298
7299  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7300
7301  path="$SRC_ROOT"
7302  has_colon=`$ECHO $path | $GREP ^.:`
7303  new_path="$path"
7304  if test "x$has_colon" = x; then
7305    # Not in mixed or Windows style, start by that.
7306    new_path=`cmd //c echo $path`
7307  fi
7308
7309
7310  input_path="$new_path"
7311  # Check if we need to convert this using DOS-style short mode. If the path
7312  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7313  # take no chances and rewrite it.
7314  # Note: m4 eats our [], so we need to use [ and ] instead.
7315  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7316  if test "x$has_forbidden_chars" != x; then
7317    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7318    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7319  fi
7320
7321
7322  windows_path="$new_path"
7323  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7324    unix_path=`$CYGPATH -u "$windows_path"`
7325    new_path="$unix_path"
7326  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7327    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7328    new_path="$unix_path"
7329  fi
7330
7331  if test "x$path" != "x$new_path"; then
7332    SRC_ROOT="$new_path"
7333    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5
7334$as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;}
7335  fi
7336
7337  # Save the first 10 bytes of this path to the storage, so fixpath can work.
7338  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7339
7340  else
7341    # We're on a posix platform. Hooray! :)
7342    path="$SRC_ROOT"
7343    has_space=`$ECHO "$path" | $GREP " "`
7344    if test "x$has_space" != x; then
7345      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5
7346$as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;}
7347      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7348    fi
7349
7350    # Use eval to expand a potential ~
7351    eval path="$path"
7352    if test ! -f "$path" && test ! -d "$path"; then
7353      as_fn_error $? "The path of SRC_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
7354    fi
7355
7356    SRC_ROOT="`cd "$path"; $THEPWDCMD -L`"
7357  fi
7358
7359
7360  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7361
7362  # Input might be given as Windows format, start by converting to
7363  # unix format.
7364  path="$CURDIR"
7365  new_path=`$CYGPATH -u "$path"`
7366
7367  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7368  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7369  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7370  # "foo.exe" is OK but "foo" is an error.
7371  #
7372  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7373  # It is also a way to make sure we got the proper file name for the real test later on.
7374  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7375  if test "x$test_shortpath" = x; then
7376    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
7377$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
7378    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
7379  fi
7380
7381  # Call helper function which possibly converts this using DOS-style short mode.
7382  # If so, the updated path is stored in $new_path.
7383
7384  input_path="$new_path"
7385  # Check if we need to convert this using DOS-style short mode. If the path
7386  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7387  # take no chances and rewrite it.
7388  # Note: m4 eats our [], so we need to use [ and ] instead.
7389  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7390  if test "x$has_forbidden_chars" != x; then
7391    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7392    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7393    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7394    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7395      # Going to short mode and back again did indeed matter. Since short mode is
7396      # case insensitive, let's make it lowercase to improve readability.
7397      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7398      # Now convert it back to Unix-stile (cygpath)
7399      input_path=`$CYGPATH -u "$shortmode_path"`
7400      new_path="$input_path"
7401    fi
7402  fi
7403
7404  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7405  if test "x$test_cygdrive_prefix" = x; then
7406    # As a simple fix, exclude /usr/bin since it's not a real path.
7407    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7408      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7409      # a path prefixed by /cygdrive for fixpath to work.
7410      new_path="$CYGWIN_ROOT_PATH$input_path"
7411    fi
7412  fi
7413
7414
7415  if test "x$path" != "x$new_path"; then
7416    CURDIR="$new_path"
7417    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
7418$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
7419  fi
7420
7421  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7422
7423  path="$CURDIR"
7424  has_colon=`$ECHO $path | $GREP ^.:`
7425  new_path="$path"
7426  if test "x$has_colon" = x; then
7427    # Not in mixed or Windows style, start by that.
7428    new_path=`cmd //c echo $path`
7429  fi
7430
7431
7432  input_path="$new_path"
7433  # Check if we need to convert this using DOS-style short mode. If the path
7434  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7435  # take no chances and rewrite it.
7436  # Note: m4 eats our [], so we need to use [ and ] instead.
7437  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7438  if test "x$has_forbidden_chars" != x; then
7439    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7440    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7441  fi
7442
7443
7444  windows_path="$new_path"
7445  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7446    unix_path=`$CYGPATH -u "$windows_path"`
7447    new_path="$unix_path"
7448  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7449    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7450    new_path="$unix_path"
7451  fi
7452
7453  if test "x$path" != "x$new_path"; then
7454    CURDIR="$new_path"
7455    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
7456$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
7457  fi
7458
7459  # Save the first 10 bytes of this path to the storage, so fixpath can work.
7460  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7461
7462  else
7463    # We're on a posix platform. Hooray! :)
7464    path="$CURDIR"
7465    has_space=`$ECHO "$path" | $GREP " "`
7466    if test "x$has_space" != x; then
7467      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
7468$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
7469      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7470    fi
7471
7472    # Use eval to expand a potential ~
7473    eval path="$path"
7474    if test ! -f "$path" && test ! -d "$path"; then
7475      as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
7476    fi
7477
7478    CURDIR="`cd "$path"; $THEPWDCMD -L`"
7479  fi
7480
7481
7482if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
7483    # Add extra search paths on solaris for utilities like ar and as etc...
7484    PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
7485fi
7486
7487# You can force the sys-root if the sys-root encoded into the cross compiler tools
7488# is not correct.
7489
7490# Check whether --with-sys-root was given.
7491if test "${with_sys_root+set}" = set; then :
7492  withval=$with_sys_root;
7493fi
7494
7495
7496if test "x$with_sys_root" != x; then
7497  SYS_ROOT=$with_sys_root
7498else
7499  SYS_ROOT=/
7500fi
7501
7502
7503
7504# Check whether --with-tools-dir was given.
7505if test "${with_tools_dir+set}" = set; then :
7506  withval=$with_tools_dir; TOOLS_DIR=$with_tools_dir
7507
7508fi
7509
7510
7511
7512# Check whether --with-devkit was given.
7513if test "${with_devkit+set}" = set; then :
7514  withval=$with_devkit;
7515    if test "x$with_sys_root" != x; then
7516      as_fn_error $? "Cannot specify both --with-devkit and --with-sys-root at the same time" "$LINENO" 5
7517    fi
7518
7519  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7520
7521  # Input might be given as Windows format, start by converting to
7522  # unix format.
7523  path="$with_devkit"
7524  new_path=`$CYGPATH -u "$path"`
7525
7526  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7527  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7528  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7529  # "foo.exe" is OK but "foo" is an error.
7530  #
7531  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7532  # It is also a way to make sure we got the proper file name for the real test later on.
7533  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7534  if test "x$test_shortpath" = x; then
7535    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
7536$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
7537    as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
7538  fi
7539
7540  # Call helper function which possibly converts this using DOS-style short mode.
7541  # If so, the updated path is stored in $new_path.
7542
7543  input_path="$new_path"
7544  # Check if we need to convert this using DOS-style short mode. If the path
7545  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7546  # take no chances and rewrite it.
7547  # Note: m4 eats our [], so we need to use [ and ] instead.
7548  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7549  if test "x$has_forbidden_chars" != x; then
7550    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7551    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7552    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7553    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7554      # Going to short mode and back again did indeed matter. Since short mode is
7555      # case insensitive, let's make it lowercase to improve readability.
7556      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7557      # Now convert it back to Unix-stile (cygpath)
7558      input_path=`$CYGPATH -u "$shortmode_path"`
7559      new_path="$input_path"
7560    fi
7561  fi
7562
7563  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7564  if test "x$test_cygdrive_prefix" = x; then
7565    # As a simple fix, exclude /usr/bin since it's not a real path.
7566    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7567      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7568      # a path prefixed by /cygdrive for fixpath to work.
7569      new_path="$CYGWIN_ROOT_PATH$input_path"
7570    fi
7571  fi
7572
7573
7574  if test "x$path" != "x$new_path"; then
7575    with_devkit="$new_path"
7576    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
7577$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
7578  fi
7579
7580  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7581
7582  path="$with_devkit"
7583  has_colon=`$ECHO $path | $GREP ^.:`
7584  new_path="$path"
7585  if test "x$has_colon" = x; then
7586    # Not in mixed or Windows style, start by that.
7587    new_path=`cmd //c echo $path`
7588  fi
7589
7590
7591  input_path="$new_path"
7592  # Check if we need to convert this using DOS-style short mode. If the path
7593  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7594  # take no chances and rewrite it.
7595  # Note: m4 eats our [], so we need to use [ and ] instead.
7596  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7597  if test "x$has_forbidden_chars" != x; then
7598    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7599    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7600  fi
7601
7602
7603  windows_path="$new_path"
7604  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7605    unix_path=`$CYGPATH -u "$windows_path"`
7606    new_path="$unix_path"
7607  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7608    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7609    new_path="$unix_path"
7610  fi
7611
7612  if test "x$path" != "x$new_path"; then
7613    with_devkit="$new_path"
7614    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
7615$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
7616  fi
7617
7618  # Save the first 10 bytes of this path to the storage, so fixpath can work.
7619  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7620
7621  else
7622    # We're on a posix platform. Hooray! :)
7623    path="$with_devkit"
7624    has_space=`$ECHO "$path" | $GREP " "`
7625    if test "x$has_space" != x; then
7626      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
7627$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
7628      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7629    fi
7630
7631    # Use eval to expand a potential ~
7632    eval path="$path"
7633    if test ! -f "$path" && test ! -d "$path"; then
7634      as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
7635    fi
7636
7637    with_devkit="`cd "$path"; $THEPWDCMD -L`"
7638  fi
7639
7640
7641  if test "x$TOOLS_DIR" = x; then
7642    TOOLS_DIR="$with_devkit/bin"
7643  else
7644    TOOLS_DIR="$TOOLS_DIR:$with_devkit/bin"
7645  fi
7646
7647    if test -d "$with_devkit/$host_alias/libc"; then
7648      SYS_ROOT=$with_devkit/$host_alias/libc
7649    elif test -d "$with_devkit/$host/sys-root"; then
7650      SYS_ROOT=$with_devkit/$host/sys-root
7651    fi
7652
7653fi
7654
7655
7656
7657# Setup default logging of stdout and stderr to build.log in the output root.
7658BUILD_LOG='$(OUTPUT_ROOT)/build.log'
7659BUILD_LOG_PREVIOUS='$(OUTPUT_ROOT)/build.log.old'
7660BUILD_LOG_WRAPPER='$(BASH) $(SRC_ROOT)/common/bin/logger.sh $(BUILD_LOG)'
7661
7662
7663
7664
7665
7666# Check if it's a pure open build or if custom sources are to be used.
7667
7668  # Check whether --enable-openjdk-only was given.
7669if test "${enable_openjdk_only+set}" = set; then :
7670  enableval=$enable_openjdk_only;
7671else
7672  enable_openjdk_only="no"
7673fi
7674
7675
7676  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
7677$as_echo_n "checking for presence of closed sources... " >&6; }
7678  if test -d "$SRC_ROOT/jdk/src/closed"; then
7679    CLOSED_SOURCE_PRESENT=yes
7680  else
7681    CLOSED_SOURCE_PRESENT=no
7682  fi
7683  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
7684$as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
7685
7686  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
7687$as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
7688  SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
7689  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
7690$as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
7691
7692  if test "x$CLOSED_SOURCE_PRESENT" = xno; then
7693    OPENJDK=true
7694    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
7695      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
7696$as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
7697    fi
7698  else
7699    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
7700      OPENJDK=true
7701    else
7702      OPENJDK=false
7703    fi
7704  fi
7705
7706  if test "x$OPENJDK" = "xtrue"; then
7707    SET_OPENJDK="OPENJDK=true"
7708  fi
7709
7710
7711
7712
7713# These are needed to be able to create a configuration name (and thus the output directory)
7714
7715###############################################################################
7716#
7717# Check which variant of the JDK that we want to build.
7718# Currently we have:
7719#    normal:   standard edition
7720# but the custom make system may add other variants
7721#
7722# Effectively the JDK variant gives a name to a specific set of
7723# modules to compile into the JDK. In the future, these modules
7724# might even be Jigsaw modules.
7725#
7726{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
7727$as_echo_n "checking which variant of the JDK to build... " >&6; }
7728
7729# Check whether --with-jdk-variant was given.
7730if test "${with_jdk_variant+set}" = set; then :
7731  withval=$with_jdk_variant;
7732fi
7733
7734
7735if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
7736    JDK_VARIANT="normal"
7737else
7738    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
7739fi
7740
7741
7742
7743{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
7744$as_echo "$JDK_VARIANT" >&6; }
7745
7746
7747
7748###############################################################################
7749#
7750# Check which variants of the JVM that we want to build.
7751# Currently we have:
7752#    server: normal interpreter and a tiered C1/C2 compiler
7753#    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
7754#    minimal1: reduced form of client with optional VM services and features stripped out
7755#    kernel: kernel footprint JVM that passes the TCK without major performance problems,
7756#             ie normal interpreter and C1, only the serial GC, kernel jvmti etc
7757#    zero: no machine code interpreter, no compiler
7758#    zeroshark: zero interpreter and shark/llvm compiler backend
7759{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
7760$as_echo_n "checking which variants of the JVM to build... " >&6; }
7761
7762# Check whether --with-jvm-variants was given.
7763if test "${with_jvm_variants+set}" = set; then :
7764  withval=$with_jvm_variants;
7765fi
7766
7767
7768if test "x$with_jvm_variants" = x; then
7769     with_jvm_variants="server"
7770fi
7771
7772JVM_VARIANTS=",$with_jvm_variants,"
7773TEST_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,//' -e 's/client,//'  -e 's/minimal1,//' -e 's/kernel,//' -e 's/zero,//' -e 's/zeroshark,//'`
7774
7775if test "x$TEST_VARIANTS" != "x,"; then
7776   as_fn_error $? "The available JVM variants are: server, client, minimal1, kernel, zero, zeroshark" "$LINENO" 5
7777fi
7778{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
7779$as_echo "$with_jvm_variants" >&6; }
7780
7781JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
7782JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
7783JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
7784JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
7785JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
7786JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
7787
7788if test "x$JVM_VARIANT_CLIENT" = xtrue; then
7789    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7790        as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
7791    fi
7792fi
7793if test "x$JVM_VARIANT_KERNEL" = xtrue; then
7794    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7795        as_fn_error $? "You cannot build a kernel JVM for a 64-bit machine." "$LINENO" 5
7796    fi
7797fi
7798if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
7799    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7800        as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
7801    fi
7802fi
7803
7804# Replace the commas with AND for use in the build directory name.
7805ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/'`
7806COUNT_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/'`
7807if test "x$COUNT_VARIANTS" != "x,1"; then
7808    BUILDING_MULTIPLE_JVM_VARIANTS=yes
7809else
7810    BUILDING_MULTIPLE_JVM_VARIANTS=no
7811fi
7812
7813
7814
7815
7816
7817
7818
7819
7820
7821INCLUDE_SA=true
7822if test "x$JVM_VARIANT_ZERO" = xtrue ; then
7823    INCLUDE_SA=false
7824fi
7825if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then
7826    INCLUDE_SA=false
7827fi
7828
7829
7830if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
7831   MACOSX_UNIVERSAL="true"
7832fi
7833
7834
7835
7836
7837
7838###############################################################################
7839#
7840# Set the debug level
7841#    release: no debug information, all optimizations, no asserts.
7842#    fastdebug: debug information (-g), all optimizations, all asserts
7843#    slowdebug: debug information (-g), no optimizations, all asserts
7844#
7845DEBUG_LEVEL="release"
7846{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
7847$as_echo_n "checking which debug level to use... " >&6; }
7848# Check whether --enable-debug was given.
7849if test "${enable_debug+set}" = set; then :
7850  enableval=$enable_debug;
7851        ENABLE_DEBUG="${enableval}"
7852        DEBUG_LEVEL="fastdebug"
7853
7854else
7855  ENABLE_DEBUG="no"
7856fi
7857
7858
7859
7860# Check whether --with-debug-level was given.
7861if test "${with_debug_level+set}" = set; then :
7862  withval=$with_debug_level;
7863        DEBUG_LEVEL="${withval}"
7864        if test "x$ENABLE_DEBUG" = xyes; then
7865			as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
7866        fi
7867
7868fi
7869
7870{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
7871$as_echo "$DEBUG_LEVEL" >&6; }
7872
7873if test "x$DEBUG_LEVEL" != xrelease && \
7874   test "x$DEBUG_LEVEL" != xfastdebug && \
7875   test "x$DEBUG_LEVEL" != xslowdebug; then
7876   as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
7877fi
7878
7879
7880###############################################################################
7881#
7882# Setup legacy vars/targets and new vars to deal with different debug levels.
7883#
7884
7885case $DEBUG_LEVEL in
7886      release )
7887          VARIANT="OPT"
7888          FASTDEBUG="false"
7889          DEBUG_CLASSFILES="false"
7890          BUILD_VARIANT_RELEASE=""
7891          HOTSPOT_DEBUG_LEVEL="product"
7892          HOTSPOT_EXPORT="product"
7893           ;;
7894      fastdebug )
7895          VARIANT="DBG"
7896          FASTDEBUG="true"
7897          DEBUG_CLASSFILES="true"
7898          BUILD_VARIANT_RELEASE="-fastdebug"
7899          HOTSPOT_DEBUG_LEVEL="fastdebug"
7900          HOTSPOT_EXPORT="fastdebug"
7901           ;;
7902      slowdebug )
7903          VARIANT="DBG"
7904          FASTDEBUG="false"
7905          DEBUG_CLASSFILES="true"
7906          BUILD_VARIANT_RELEASE="-debug"
7907          HOTSPOT_DEBUG_LEVEL="jvmg"
7908          HOTSPOT_EXPORT="debug"
7909           ;;
7910esac
7911
7912#####
7913# Generate the legacy makefile targets for hotspot.
7914# The hotspot api for selecting the build artifacts, really, needs to be improved.
7915# JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
7916# determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
7917# But until then ...
7918HOTSPOT_TARGET=""
7919
7920if test "x$JVM_VARIANT_SERVER" = xtrue; then
7921    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
7922fi
7923
7924if test "x$JVM_VARIANT_CLIENT" = xtrue; then
7925    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
7926fi
7927
7928if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
7929    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
7930fi
7931
7932if test "x$JVM_VARIANT_KERNEL" = xtrue; then
7933    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
7934fi
7935
7936if test "x$JVM_VARIANT_ZERO" = xtrue; then
7937    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
7938fi
7939
7940if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
7941    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
7942fi
7943
7944HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
7945
7946# On Macosx universal binaries are produced, but they only contain
7947# 64 bit intel. This invalidates control of which jvms are built
7948# from configure, but only server is valid anyway. Fix this
7949# when hotspot makefiles are rewritten.
7950if test "x$MACOSX_UNIVERSAL" = xtrue; then
7951    HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
7952fi
7953
7954#####
7955
7956
7957
7958
7959
7960
7961
7962
7963# With basic setup done, call the custom early hook.
7964
7965
7966# To properly create a configuration name, we need to have the OpenJDK target
7967# and options (variants and debug level) parsed.
7968
7969
7970
7971# Check whether --with-conf-name was given.
7972if test "${with_conf_name+set}" = set; then :
7973  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
7974fi
7975
7976
7977# Test from where we are running configure, in or outside of src root.
7978if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
7979        || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
7980        || test "x$CURDIR" = "x$SRC_ROOT/common/makefiles" ; then
7981    # We are running configure from the src root.
7982    # Create a default ./build/target-variant-debuglevel output root.
7983    if test "x${CONF_NAME}" = x; then
7984        CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
7985    fi
7986    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
7987    $MKDIR -p "$OUTPUT_ROOT"
7988    if test ! -d "$OUTPUT_ROOT"; then
7989        as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
7990    fi
7991else
7992    # We are running configure from outside of the src dir.
7993    # Then use the current directory as output dir!
7994    # If configuration is situated in normal build directory, just use the build
7995    # directory name as configuration name, otherwise use the complete path.
7996    if test "x${CONF_NAME}" = x; then
7997        CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
7998    fi
7999    OUTPUT_ROOT="$CURDIR"
8000
8001    # WARNING: This might be a bad thing to do. You need to be sure you want to
8002    # have a configuration in this directory. Do some sanity checks!
8003
8004    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
8005      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
8006      # other files
8007      files_present=`$LS $OUTPUT_ROOT`
8008      # Configure has already touched config.log and confdefs.h in the current dir when this check
8009      # is performed.
8010      filtered_files=`$ECHO "$files_present" | $SED -e 's/config.log//g' -e 's/confdefs.h//g' -e 's/ //g' \
8011                                             | $TR -d '\n'`
8012      if test "x$filtered_files" != x; then
8013        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
8014$as_echo "$as_me: Current directory is $CURDIR." >&6;}
8015        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
8016$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
8017        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
8018$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
8019        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
8020$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
8021        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
8022$as_echo "$as_me: seriously mess up just about everything." >&6;}
8023        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
8024$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
8025        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
8026$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
8027        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
8028      fi
8029    fi
8030fi
8031{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
8032$as_echo_n "checking what configuration name to use... " >&6; }
8033{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
8034$as_echo "$CONF_NAME" >&6; }
8035
8036
8037  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8038
8039  # Input might be given as Windows format, start by converting to
8040  # unix format.
8041  path="$OUTPUT_ROOT"
8042  new_path=`$CYGPATH -u "$path"`
8043
8044  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8045  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8046  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8047  # "foo.exe" is OK but "foo" is an error.
8048  #
8049  # This test is therefore slightly more accurate than "test -f" to check for file precense.
8050  # It is also a way to make sure we got the proper file name for the real test later on.
8051  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8052  if test "x$test_shortpath" = x; then
8053    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
8054$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
8055    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
8056  fi
8057
8058  # Call helper function which possibly converts this using DOS-style short mode.
8059  # If so, the updated path is stored in $new_path.
8060
8061  input_path="$new_path"
8062  # Check if we need to convert this using DOS-style short mode. If the path
8063  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8064  # take no chances and rewrite it.
8065  # Note: m4 eats our [], so we need to use [ and ] instead.
8066  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8067  if test "x$has_forbidden_chars" != x; then
8068    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8069    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8070    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8071    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8072      # Going to short mode and back again did indeed matter. Since short mode is
8073      # case insensitive, let's make it lowercase to improve readability.
8074      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8075      # Now convert it back to Unix-stile (cygpath)
8076      input_path=`$CYGPATH -u "$shortmode_path"`
8077      new_path="$input_path"
8078    fi
8079  fi
8080
8081  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8082  if test "x$test_cygdrive_prefix" = x; then
8083    # As a simple fix, exclude /usr/bin since it's not a real path.
8084    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
8085      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8086      # a path prefixed by /cygdrive for fixpath to work.
8087      new_path="$CYGWIN_ROOT_PATH$input_path"
8088    fi
8089  fi
8090
8091
8092  if test "x$path" != "x$new_path"; then
8093    OUTPUT_ROOT="$new_path"
8094    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
8095$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
8096  fi
8097
8098  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8099
8100  path="$OUTPUT_ROOT"
8101  has_colon=`$ECHO $path | $GREP ^.:`
8102  new_path="$path"
8103  if test "x$has_colon" = x; then
8104    # Not in mixed or Windows style, start by that.
8105    new_path=`cmd //c echo $path`
8106  fi
8107
8108
8109  input_path="$new_path"
8110  # Check if we need to convert this using DOS-style short mode. If the path
8111  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8112  # take no chances and rewrite it.
8113  # Note: m4 eats our [], so we need to use [ and ] instead.
8114  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8115  if test "x$has_forbidden_chars" != x; then
8116    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8117    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8118  fi
8119
8120
8121  windows_path="$new_path"
8122  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8123    unix_path=`$CYGPATH -u "$windows_path"`
8124    new_path="$unix_path"
8125  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8126    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8127    new_path="$unix_path"
8128  fi
8129
8130  if test "x$path" != "x$new_path"; then
8131    OUTPUT_ROOT="$new_path"
8132    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
8133$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
8134  fi
8135
8136  # Save the first 10 bytes of this path to the storage, so fixpath can work.
8137  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8138
8139  else
8140    # We're on a posix platform. Hooray! :)
8141    path="$OUTPUT_ROOT"
8142    has_space=`$ECHO "$path" | $GREP " "`
8143    if test "x$has_space" != x; then
8144      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
8145$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
8146      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
8147    fi
8148
8149    # Use eval to expand a potential ~
8150    eval path="$path"
8151    if test ! -f "$path" && test ! -d "$path"; then
8152      as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
8153    fi
8154
8155    OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
8156  fi
8157
8158
8159SPEC=$OUTPUT_ROOT/spec.gmk
8160
8161CONF_NAME=$CONF_NAME
8162
8163OUTPUT_ROOT=$OUTPUT_ROOT
8164
8165
8166# Most of the probed defines are put into config.h
8167ac_config_headers="$ac_config_headers $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in"
8168
8169# The spec.gmk file contains all variables for the make system.
8170ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
8171
8172# The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
8173ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
8174
8175# The bootcycle-spec.gmk file contains support for boot cycle builds.
8176ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
8177
8178# The compare.sh is used to compare the build output to other builds.
8179ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
8180
8181# Spec.sh is currently used by compare-objects.sh
8182ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in"
8183
8184# The generated Makefile knows where the spec.gmk is and where the source is.
8185# You can run make from the OUTPUT_ROOT, or from the top-level Makefile
8186# which will look for generated configurations
8187ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
8188
8189
8190# Save the arguments given to us
8191echo "$CONFIGURE_COMMAND_LINE" > $OUTPUT_ROOT/configure-arguments
8192
8193
8194# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
8195
8196    for ac_prog in apt-get yum port pkgutil pkgadd
8197do
8198  # Extract the first word of "$ac_prog", so it can be a program name with args.
8199set dummy $ac_prog; ac_word=$2
8200{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8201$as_echo_n "checking for $ac_word... " >&6; }
8202if ${ac_cv_prog_PKGHANDLER+:} false; then :
8203  $as_echo_n "(cached) " >&6
8204else
8205  if test -n "$PKGHANDLER"; then
8206  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
8207else
8208as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8209for as_dir in $PATH
8210do
8211  IFS=$as_save_IFS
8212  test -z "$as_dir" && as_dir=.
8213    for ac_exec_ext in '' $ac_executable_extensions; do
8214  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8215    ac_cv_prog_PKGHANDLER="$ac_prog"
8216    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8217    break 2
8218  fi
8219done
8220  done
8221IFS=$as_save_IFS
8222
8223fi
8224fi
8225PKGHANDLER=$ac_cv_prog_PKGHANDLER
8226if test -n "$PKGHANDLER"; then
8227  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
8228$as_echo "$PKGHANDLER" >&6; }
8229else
8230  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8231$as_echo "no" >&6; }
8232fi
8233
8234
8235  test -n "$PKGHANDLER" && break
8236done
8237
8238
8239
8240# Setup tools that requires more complex handling, or that is not needed by the configure script.
8241
8242
8243  # We need to find a recent version of GNU make. Especially on Solaris, this can be tricky.
8244  if test "x$MAKE" != x; then
8245    # User has supplied a make, test it.
8246    if test ! -f "$MAKE"; then
8247      as_fn_error $? "The specified make (by MAKE=$MAKE) is not found." "$LINENO" 5
8248    fi
8249
8250  MAKE_CANDIDATE=""$MAKE""
8251  DESCRIPTION="user supplied MAKE=$MAKE"
8252  if test "x$MAKE_CANDIDATE" != x; then
8253    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8254$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8255    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8256    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8257    if test "x$IS_GNU_MAKE" = x; then
8258      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8259$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8260    else
8261      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8262      if test "x$IS_MODERN_MAKE" = x; then
8263        { $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
8264$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;}
8265      else
8266        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8267          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8268            MAKE_EXPECTED_ENV='cygwin'
8269          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8270            MAKE_EXPECTED_ENV='msys'
8271          else
8272            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8273          fi
8274          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8275          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8276        else
8277          # Not relevant for non-Windows
8278          IS_MAKE_CORRECT_ENV=true
8279        fi
8280        if test "x$IS_MAKE_CORRECT_ENV" = x; then
8281          { $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
8282$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;}
8283        else
8284          FOUND_MAKE=$MAKE_CANDIDATE
8285
8286  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8287
8288  # First separate the path from the arguments. This will split at the first
8289  # space.
8290  complete="$FOUND_MAKE"
8291  path="${complete%% *}"
8292  tmp="$complete EOL"
8293  arguments="${tmp#* }"
8294
8295  # Input might be given as Windows format, start by converting to
8296  # unix format.
8297  new_path=`$CYGPATH -u "$path"`
8298
8299  # Now try to locate executable using which
8300  new_path=`$WHICH "$new_path" 2> /dev/null`
8301  # bat and cmd files are not always considered executable in cygwin causing which
8302  # to not find them
8303  if test "x$new_path" = x \
8304           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8305           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8306    new_path=`$CYGPATH -u "$path"`
8307  fi
8308  if test "x$new_path" = x; then
8309    # Oops. Which didn't find the executable.
8310    # The splitting of arguments from the executable at a space might have been incorrect,
8311    # since paths with space are more likely in Windows. Give it another try with the whole
8312    # argument.
8313    path="$complete"
8314    arguments="EOL"
8315    new_path=`$CYGPATH -u "$path"`
8316    new_path=`$WHICH "$new_path" 2> /dev/null`
8317    # bat and cmd files are not always considered executable in cygwin causing which
8318    # to not find them
8319    if test "x$new_path" = x \
8320             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8321             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8322      new_path=`$CYGPATH -u "$path"`
8323    fi
8324    if test "x$new_path" = x; then
8325      # It's still not found. Now this is an unrecoverable error.
8326      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8327$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8328      has_space=`$ECHO "$complete" | $GREP " "`
8329      if test "x$has_space" != x; then
8330        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8331$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8332      fi
8333      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8334    fi
8335  fi
8336
8337  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8338  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8339  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8340  # "foo.exe" is OK but "foo" is an error.
8341  #
8342  # This test is therefore slightly more accurate than "test -f" to check for file precense.
8343  # It is also a way to make sure we got the proper file name for the real test later on.
8344  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8345  if test "x$test_shortpath" = x; then
8346    # Short path failed, file does not exist as specified.
8347    # Try adding .exe or .cmd
8348    if test -f "${new_path}.exe"; then
8349       input_to_shortpath="${new_path}.exe"
8350    elif test -f "${new_path}.cmd"; then
8351       input_to_shortpath="${new_path}.cmd"
8352    else
8353      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8354$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8355      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8356$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8357      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8358    fi
8359  else
8360    input_to_shortpath="$new_path"
8361  fi
8362
8363  # Call helper function which possibly converts this using DOS-style short mode.
8364  # If so, the updated path is stored in $new_path.
8365  new_path="$input_to_shortpath"
8366
8367  input_path="$input_to_shortpath"
8368  # Check if we need to convert this using DOS-style short mode. If the path
8369  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8370  # take no chances and rewrite it.
8371  # Note: m4 eats our [], so we need to use [ and ] instead.
8372  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8373  if test "x$has_forbidden_chars" != x; then
8374    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8375    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8376    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8377    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8378      # Going to short mode and back again did indeed matter. Since short mode is
8379      # case insensitive, let's make it lowercase to improve readability.
8380      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8381      # Now convert it back to Unix-stile (cygpath)
8382      input_path=`$CYGPATH -u "$shortmode_path"`
8383      new_path="$input_path"
8384    fi
8385  fi
8386
8387  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8388  if test "x$test_cygdrive_prefix" = x; then
8389    # As a simple fix, exclude /usr/bin since it's not a real path.
8390    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8391      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8392      # a path prefixed by /cygdrive for fixpath to work.
8393      new_path="$CYGWIN_ROOT_PATH$input_path"
8394    fi
8395  fi
8396
8397  # remove trailing .exe if any
8398  new_path="${new_path/%.exe/}"
8399
8400  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8401
8402  # First separate the path from the arguments. This will split at the first
8403  # space.
8404  complete="$FOUND_MAKE"
8405  path="${complete%% *}"
8406  tmp="$complete EOL"
8407  arguments="${tmp#* }"
8408
8409  # Input might be given as Windows format, start by converting to
8410  # unix format.
8411  new_path="$path"
8412
8413  windows_path="$new_path"
8414  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8415    unix_path=`$CYGPATH -u "$windows_path"`
8416    new_path="$unix_path"
8417  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8418    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8419    new_path="$unix_path"
8420  fi
8421
8422
8423  # Now try to locate executable using which
8424  new_path=`$WHICH "$new_path" 2> /dev/null`
8425
8426  if test "x$new_path" = x; then
8427    # Oops. Which didn't find the executable.
8428    # The splitting of arguments from the executable at a space might have been incorrect,
8429    # since paths with space are more likely in Windows. Give it another try with the whole
8430    # argument.
8431    path="$complete"
8432    arguments="EOL"
8433    new_path="$path"
8434
8435  windows_path="$new_path"
8436  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8437    unix_path=`$CYGPATH -u "$windows_path"`
8438    new_path="$unix_path"
8439  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8440    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8441    new_path="$unix_path"
8442  fi
8443
8444
8445    new_path=`$WHICH "$new_path" 2> /dev/null`
8446
8447    if test "x$new_path" = x; then
8448      # It's still not found. Now this is an unrecoverable error.
8449      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8450$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8451      has_space=`$ECHO "$complete" | $GREP " "`
8452      if test "x$has_space" != x; then
8453        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8454$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8455      fi
8456      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8457    fi
8458  fi
8459
8460  # Now new_path has a complete unix path to the binary
8461  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8462    # Keep paths in /bin as-is, but remove trailing .exe if any
8463    new_path="${new_path/%.exe/}"
8464    # Do not save /bin paths to all_fixpath_prefixes!
8465  else
8466    # Not in mixed or Windows style, start by that.
8467    new_path=`cmd //c echo $new_path`
8468
8469  input_path="$new_path"
8470  # Check if we need to convert this using DOS-style short mode. If the path
8471  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8472  # take no chances and rewrite it.
8473  # Note: m4 eats our [], so we need to use [ and ] instead.
8474  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8475  if test "x$has_forbidden_chars" != x; then
8476    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8477    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8478  fi
8479
8480    # Output is in $new_path
8481
8482  windows_path="$new_path"
8483  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8484    unix_path=`$CYGPATH -u "$windows_path"`
8485    new_path="$unix_path"
8486  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8487    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8488    new_path="$unix_path"
8489  fi
8490
8491    # remove trailing .exe if any
8492    new_path="${new_path/%.exe/}"
8493
8494    # Save the first 10 bytes of this path to the storage, so fixpath can work.
8495    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8496  fi
8497
8498  else
8499    # We're on a posix platform. Hooray! :)
8500    # First separate the path from the arguments. This will split at the first
8501    # space.
8502    complete="$FOUND_MAKE"
8503    path="${complete%% *}"
8504    tmp="$complete EOL"
8505    arguments="${tmp#* }"
8506
8507    # Cannot rely on the command "which" here since it doesn't always work.
8508    is_absolute_path=`$ECHO "$path" | $GREP ^/`
8509    if test -z "$is_absolute_path"; then
8510      # Path to executable is not absolute. Find it.
8511      IFS_save="$IFS"
8512      IFS=:
8513      for p in $PATH; do
8514        if test -f "$p/$path" && test -x "$p/$path"; then
8515          new_path="$p/$path"
8516          break
8517        fi
8518      done
8519      IFS="$IFS_save"
8520    else
8521      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
8522$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
8523      new_path="$path"
8524    fi
8525
8526    if test "x$new_path" = x; then
8527        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8528$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8529        has_space=`$ECHO "$complete" | $GREP " "`
8530        if test "x$has_space" != x; then
8531          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
8532$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
8533        fi
8534        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8535      fi
8536  fi
8537
8538      # Now join together the path and the arguments once again
8539      if test "x$arguments" != xEOL; then
8540        new_complete="$new_path ${arguments% *}"
8541      else
8542        new_complete="$new_path"
8543      fi
8544
8545  if test "x$complete" != "x$new_complete"; then
8546      FOUND_MAKE="$new_complete"
8547      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
8548$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
8549    fi
8550
8551        fi
8552      fi
8553    fi
8554  fi
8555
8556    if test "x$FOUND_MAKE" = x; then
8557      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make 3.81 or newer." "$LINENO" 5
8558    fi
8559  else
8560    # Try our hardest to locate a correct version of GNU make
8561    for ac_prog in gmake
8562do
8563  # Extract the first word of "$ac_prog", so it can be a program name with args.
8564set dummy $ac_prog; ac_word=$2
8565{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8566$as_echo_n "checking for $ac_word... " >&6; }
8567if ${ac_cv_path_CHECK_GMAKE+:} false; then :
8568  $as_echo_n "(cached) " >&6
8569else
8570  case $CHECK_GMAKE in
8571  [\\/]* | ?:[\\/]*)
8572  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
8573  ;;
8574  *)
8575  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8576for as_dir in $PATH
8577do
8578  IFS=$as_save_IFS
8579  test -z "$as_dir" && as_dir=.
8580    for ac_exec_ext in '' $ac_executable_extensions; do
8581  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8582    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
8583    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8584    break 2
8585  fi
8586done
8587  done
8588IFS=$as_save_IFS
8589
8590  ;;
8591esac
8592fi
8593CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
8594if test -n "$CHECK_GMAKE"; then
8595  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
8596$as_echo "$CHECK_GMAKE" >&6; }
8597else
8598  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8599$as_echo "no" >&6; }
8600fi
8601
8602
8603  test -n "$CHECK_GMAKE" && break
8604done
8605
8606
8607  MAKE_CANDIDATE=""$CHECK_GMAKE""
8608  DESCRIPTION="gmake in PATH"
8609  if test "x$MAKE_CANDIDATE" != x; then
8610    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8611$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8612    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8613    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8614    if test "x$IS_GNU_MAKE" = x; then
8615      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8616$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8617    else
8618      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8619      if test "x$IS_MODERN_MAKE" = x; then
8620        { $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
8621$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;}
8622      else
8623        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8624          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8625            MAKE_EXPECTED_ENV='cygwin'
8626          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8627            MAKE_EXPECTED_ENV='msys'
8628          else
8629            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8630          fi
8631          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8632          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8633        else
8634          # Not relevant for non-Windows
8635          IS_MAKE_CORRECT_ENV=true
8636        fi
8637        if test "x$IS_MAKE_CORRECT_ENV" = x; then
8638          { $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
8639$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;}
8640        else
8641          FOUND_MAKE=$MAKE_CANDIDATE
8642
8643  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8644
8645  # First separate the path from the arguments. This will split at the first
8646  # space.
8647  complete="$FOUND_MAKE"
8648  path="${complete%% *}"
8649  tmp="$complete EOL"
8650  arguments="${tmp#* }"
8651
8652  # Input might be given as Windows format, start by converting to
8653  # unix format.
8654  new_path=`$CYGPATH -u "$path"`
8655
8656  # Now try to locate executable using which
8657  new_path=`$WHICH "$new_path" 2> /dev/null`
8658  # bat and cmd files are not always considered executable in cygwin causing which
8659  # to not find them
8660  if test "x$new_path" = x \
8661           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8662           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8663    new_path=`$CYGPATH -u "$path"`
8664  fi
8665  if test "x$new_path" = x; then
8666    # Oops. Which didn't find the executable.
8667    # The splitting of arguments from the executable at a space might have been incorrect,
8668    # since paths with space are more likely in Windows. Give it another try with the whole
8669    # argument.
8670    path="$complete"
8671    arguments="EOL"
8672    new_path=`$CYGPATH -u "$path"`
8673    new_path=`$WHICH "$new_path" 2> /dev/null`
8674    # bat and cmd files are not always considered executable in cygwin causing which
8675    # to not find them
8676    if test "x$new_path" = x \
8677             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8678             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8679      new_path=`$CYGPATH -u "$path"`
8680    fi
8681    if test "x$new_path" = x; then
8682      # It's still not found. Now this is an unrecoverable error.
8683      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8684$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8685      has_space=`$ECHO "$complete" | $GREP " "`
8686      if test "x$has_space" != x; then
8687        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8688$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8689      fi
8690      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8691    fi
8692  fi
8693
8694  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8695  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8696  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8697  # "foo.exe" is OK but "foo" is an error.
8698  #
8699  # This test is therefore slightly more accurate than "test -f" to check for file precense.
8700  # It is also a way to make sure we got the proper file name for the real test later on.
8701  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8702  if test "x$test_shortpath" = x; then
8703    # Short path failed, file does not exist as specified.
8704    # Try adding .exe or .cmd
8705    if test -f "${new_path}.exe"; then
8706       input_to_shortpath="${new_path}.exe"
8707    elif test -f "${new_path}.cmd"; then
8708       input_to_shortpath="${new_path}.cmd"
8709    else
8710      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8711$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8712      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8713$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8714      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8715    fi
8716  else
8717    input_to_shortpath="$new_path"
8718  fi
8719
8720  # Call helper function which possibly converts this using DOS-style short mode.
8721  # If so, the updated path is stored in $new_path.
8722  new_path="$input_to_shortpath"
8723
8724  input_path="$input_to_shortpath"
8725  # Check if we need to convert this using DOS-style short mode. If the path
8726  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8727  # take no chances and rewrite it.
8728  # Note: m4 eats our [], so we need to use [ and ] instead.
8729  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8730  if test "x$has_forbidden_chars" != x; then
8731    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8732    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8733    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8734    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8735      # Going to short mode and back again did indeed matter. Since short mode is
8736      # case insensitive, let's make it lowercase to improve readability.
8737      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8738      # Now convert it back to Unix-stile (cygpath)
8739      input_path=`$CYGPATH -u "$shortmode_path"`
8740      new_path="$input_path"
8741    fi
8742  fi
8743
8744  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8745  if test "x$test_cygdrive_prefix" = x; then
8746    # As a simple fix, exclude /usr/bin since it's not a real path.
8747    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8748      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8749      # a path prefixed by /cygdrive for fixpath to work.
8750      new_path="$CYGWIN_ROOT_PATH$input_path"
8751    fi
8752  fi
8753
8754  # remove trailing .exe if any
8755  new_path="${new_path/%.exe/}"
8756
8757  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8758
8759  # First separate the path from the arguments. This will split at the first
8760  # space.
8761  complete="$FOUND_MAKE"
8762  path="${complete%% *}"
8763  tmp="$complete EOL"
8764  arguments="${tmp#* }"
8765
8766  # Input might be given as Windows format, start by converting to
8767  # unix format.
8768  new_path="$path"
8769
8770  windows_path="$new_path"
8771  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8772    unix_path=`$CYGPATH -u "$windows_path"`
8773    new_path="$unix_path"
8774  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8775    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8776    new_path="$unix_path"
8777  fi
8778
8779
8780  # Now try to locate executable using which
8781  new_path=`$WHICH "$new_path" 2> /dev/null`
8782
8783  if test "x$new_path" = x; then
8784    # Oops. Which didn't find the executable.
8785    # The splitting of arguments from the executable at a space might have been incorrect,
8786    # since paths with space are more likely in Windows. Give it another try with the whole
8787    # argument.
8788    path="$complete"
8789    arguments="EOL"
8790    new_path="$path"
8791
8792  windows_path="$new_path"
8793  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8794    unix_path=`$CYGPATH -u "$windows_path"`
8795    new_path="$unix_path"
8796  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8797    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8798    new_path="$unix_path"
8799  fi
8800
8801
8802    new_path=`$WHICH "$new_path" 2> /dev/null`
8803
8804    if test "x$new_path" = x; then
8805      # It's still not found. Now this is an unrecoverable error.
8806      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8807$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8808      has_space=`$ECHO "$complete" | $GREP " "`
8809      if test "x$has_space" != x; then
8810        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8811$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8812      fi
8813      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8814    fi
8815  fi
8816
8817  # Now new_path has a complete unix path to the binary
8818  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8819    # Keep paths in /bin as-is, but remove trailing .exe if any
8820    new_path="${new_path/%.exe/}"
8821    # Do not save /bin paths to all_fixpath_prefixes!
8822  else
8823    # Not in mixed or Windows style, start by that.
8824    new_path=`cmd //c echo $new_path`
8825
8826  input_path="$new_path"
8827  # Check if we need to convert this using DOS-style short mode. If the path
8828  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8829  # take no chances and rewrite it.
8830  # Note: m4 eats our [], so we need to use [ and ] instead.
8831  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8832  if test "x$has_forbidden_chars" != x; then
8833    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8834    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8835  fi
8836
8837    # Output is in $new_path
8838
8839  windows_path="$new_path"
8840  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8841    unix_path=`$CYGPATH -u "$windows_path"`
8842    new_path="$unix_path"
8843  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8844    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8845    new_path="$unix_path"
8846  fi
8847
8848    # remove trailing .exe if any
8849    new_path="${new_path/%.exe/}"
8850
8851    # Save the first 10 bytes of this path to the storage, so fixpath can work.
8852    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8853  fi
8854
8855  else
8856    # We're on a posix platform. Hooray! :)
8857    # First separate the path from the arguments. This will split at the first
8858    # space.
8859    complete="$FOUND_MAKE"
8860    path="${complete%% *}"
8861    tmp="$complete EOL"
8862    arguments="${tmp#* }"
8863
8864    # Cannot rely on the command "which" here since it doesn't always work.
8865    is_absolute_path=`$ECHO "$path" | $GREP ^/`
8866    if test -z "$is_absolute_path"; then
8867      # Path to executable is not absolute. Find it.
8868      IFS_save="$IFS"
8869      IFS=:
8870      for p in $PATH; do
8871        if test -f "$p/$path" && test -x "$p/$path"; then
8872          new_path="$p/$path"
8873          break
8874        fi
8875      done
8876      IFS="$IFS_save"
8877    else
8878      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
8879$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
8880      new_path="$path"
8881    fi
8882
8883    if test "x$new_path" = x; then
8884        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8885$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8886        has_space=`$ECHO "$complete" | $GREP " "`
8887        if test "x$has_space" != x; then
8888          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
8889$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
8890        fi
8891        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8892      fi
8893  fi
8894
8895      # Now join together the path and the arguments once again
8896      if test "x$arguments" != xEOL; then
8897        new_complete="$new_path ${arguments% *}"
8898      else
8899        new_complete="$new_path"
8900      fi
8901
8902  if test "x$complete" != "x$new_complete"; then
8903      FOUND_MAKE="$new_complete"
8904      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
8905$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
8906    fi
8907
8908        fi
8909      fi
8910    fi
8911  fi
8912
8913
8914    if test "x$FOUND_MAKE" = x; then
8915      for ac_prog in make
8916do
8917  # Extract the first word of "$ac_prog", so it can be a program name with args.
8918set dummy $ac_prog; ac_word=$2
8919{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8920$as_echo_n "checking for $ac_word... " >&6; }
8921if ${ac_cv_path_CHECK_MAKE+:} false; then :
8922  $as_echo_n "(cached) " >&6
8923else
8924  case $CHECK_MAKE in
8925  [\\/]* | ?:[\\/]*)
8926  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
8927  ;;
8928  *)
8929  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8930for as_dir in $PATH
8931do
8932  IFS=$as_save_IFS
8933  test -z "$as_dir" && as_dir=.
8934    for ac_exec_ext in '' $ac_executable_extensions; do
8935  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8936    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
8937    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8938    break 2
8939  fi
8940done
8941  done
8942IFS=$as_save_IFS
8943
8944  ;;
8945esac
8946fi
8947CHECK_MAKE=$ac_cv_path_CHECK_MAKE
8948if test -n "$CHECK_MAKE"; then
8949  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
8950$as_echo "$CHECK_MAKE" >&6; }
8951else
8952  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8953$as_echo "no" >&6; }
8954fi
8955
8956
8957  test -n "$CHECK_MAKE" && break
8958done
8959
8960
8961  MAKE_CANDIDATE=""$CHECK_MAKE""
8962  DESCRIPTION="make in PATH"
8963  if test "x$MAKE_CANDIDATE" != x; then
8964    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8965$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8966    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8967    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8968    if test "x$IS_GNU_MAKE" = x; then
8969      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8970$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8971    else
8972      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8973      if test "x$IS_MODERN_MAKE" = x; then
8974        { $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
8975$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;}
8976      else
8977        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8978          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8979            MAKE_EXPECTED_ENV='cygwin'
8980          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8981            MAKE_EXPECTED_ENV='msys'
8982          else
8983            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8984          fi
8985          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8986          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8987        else
8988          # Not relevant for non-Windows
8989          IS_MAKE_CORRECT_ENV=true
8990        fi
8991        if test "x$IS_MAKE_CORRECT_ENV" = x; then
8992          { $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
8993$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;}
8994        else
8995          FOUND_MAKE=$MAKE_CANDIDATE
8996
8997  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8998
8999  # First separate the path from the arguments. This will split at the first
9000  # space.
9001  complete="$FOUND_MAKE"
9002  path="${complete%% *}"
9003  tmp="$complete EOL"
9004  arguments="${tmp#* }"
9005
9006  # Input might be given as Windows format, start by converting to
9007  # unix format.
9008  new_path=`$CYGPATH -u "$path"`
9009
9010  # Now try to locate executable using which
9011  new_path=`$WHICH "$new_path" 2> /dev/null`
9012  # bat and cmd files are not always considered executable in cygwin causing which
9013  # to not find them
9014  if test "x$new_path" = x \
9015           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9016           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9017    new_path=`$CYGPATH -u "$path"`
9018  fi
9019  if test "x$new_path" = x; then
9020    # Oops. Which didn't find the executable.
9021    # The splitting of arguments from the executable at a space might have been incorrect,
9022    # since paths with space are more likely in Windows. Give it another try with the whole
9023    # argument.
9024    path="$complete"
9025    arguments="EOL"
9026    new_path=`$CYGPATH -u "$path"`
9027    new_path=`$WHICH "$new_path" 2> /dev/null`
9028    # bat and cmd files are not always considered executable in cygwin causing which
9029    # to not find them
9030    if test "x$new_path" = x \
9031             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9032             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9033      new_path=`$CYGPATH -u "$path"`
9034    fi
9035    if test "x$new_path" = x; then
9036      # It's still not found. Now this is an unrecoverable error.
9037      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9038$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9039      has_space=`$ECHO "$complete" | $GREP " "`
9040      if test "x$has_space" != x; then
9041        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9042$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9043      fi
9044      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9045    fi
9046  fi
9047
9048  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9049  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9050  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9051  # "foo.exe" is OK but "foo" is an error.
9052  #
9053  # This test is therefore slightly more accurate than "test -f" to check for file precense.
9054  # It is also a way to make sure we got the proper file name for the real test later on.
9055  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9056  if test "x$test_shortpath" = x; then
9057    # Short path failed, file does not exist as specified.
9058    # Try adding .exe or .cmd
9059    if test -f "${new_path}.exe"; then
9060       input_to_shortpath="${new_path}.exe"
9061    elif test -f "${new_path}.cmd"; then
9062       input_to_shortpath="${new_path}.cmd"
9063    else
9064      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9065$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9066      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9067$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9068      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9069    fi
9070  else
9071    input_to_shortpath="$new_path"
9072  fi
9073
9074  # Call helper function which possibly converts this using DOS-style short mode.
9075  # If so, the updated path is stored in $new_path.
9076  new_path="$input_to_shortpath"
9077
9078  input_path="$input_to_shortpath"
9079  # Check if we need to convert this using DOS-style short mode. If the path
9080  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9081  # take no chances and rewrite it.
9082  # Note: m4 eats our [], so we need to use [ and ] instead.
9083  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9084  if test "x$has_forbidden_chars" != x; then
9085    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9086    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9087    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9088    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9089      # Going to short mode and back again did indeed matter. Since short mode is
9090      # case insensitive, let's make it lowercase to improve readability.
9091      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9092      # Now convert it back to Unix-stile (cygpath)
9093      input_path=`$CYGPATH -u "$shortmode_path"`
9094      new_path="$input_path"
9095    fi
9096  fi
9097
9098  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9099  if test "x$test_cygdrive_prefix" = x; then
9100    # As a simple fix, exclude /usr/bin since it's not a real path.
9101    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9102      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9103      # a path prefixed by /cygdrive for fixpath to work.
9104      new_path="$CYGWIN_ROOT_PATH$input_path"
9105    fi
9106  fi
9107
9108  # remove trailing .exe if any
9109  new_path="${new_path/%.exe/}"
9110
9111  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9112
9113  # First separate the path from the arguments. This will split at the first
9114  # space.
9115  complete="$FOUND_MAKE"
9116  path="${complete%% *}"
9117  tmp="$complete EOL"
9118  arguments="${tmp#* }"
9119
9120  # Input might be given as Windows format, start by converting to
9121  # unix format.
9122  new_path="$path"
9123
9124  windows_path="$new_path"
9125  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9126    unix_path=`$CYGPATH -u "$windows_path"`
9127    new_path="$unix_path"
9128  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9129    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9130    new_path="$unix_path"
9131  fi
9132
9133
9134  # Now try to locate executable using which
9135  new_path=`$WHICH "$new_path" 2> /dev/null`
9136
9137  if test "x$new_path" = x; then
9138    # Oops. Which didn't find the executable.
9139    # The splitting of arguments from the executable at a space might have been incorrect,
9140    # since paths with space are more likely in Windows. Give it another try with the whole
9141    # argument.
9142    path="$complete"
9143    arguments="EOL"
9144    new_path="$path"
9145
9146  windows_path="$new_path"
9147  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9148    unix_path=`$CYGPATH -u "$windows_path"`
9149    new_path="$unix_path"
9150  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9151    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9152    new_path="$unix_path"
9153  fi
9154
9155
9156    new_path=`$WHICH "$new_path" 2> /dev/null`
9157
9158    if test "x$new_path" = x; then
9159      # It's still not found. Now this is an unrecoverable error.
9160      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9161$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9162      has_space=`$ECHO "$complete" | $GREP " "`
9163      if test "x$has_space" != x; then
9164        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9165$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9166      fi
9167      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9168    fi
9169  fi
9170
9171  # Now new_path has a complete unix path to the binary
9172  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9173    # Keep paths in /bin as-is, but remove trailing .exe if any
9174    new_path="${new_path/%.exe/}"
9175    # Do not save /bin paths to all_fixpath_prefixes!
9176  else
9177    # Not in mixed or Windows style, start by that.
9178    new_path=`cmd //c echo $new_path`
9179
9180  input_path="$new_path"
9181  # Check if we need to convert this using DOS-style short mode. If the path
9182  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9183  # take no chances and rewrite it.
9184  # Note: m4 eats our [], so we need to use [ and ] instead.
9185  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9186  if test "x$has_forbidden_chars" != x; then
9187    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9188    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9189  fi
9190
9191    # Output is in $new_path
9192
9193  windows_path="$new_path"
9194  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9195    unix_path=`$CYGPATH -u "$windows_path"`
9196    new_path="$unix_path"
9197  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9198    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9199    new_path="$unix_path"
9200  fi
9201
9202    # remove trailing .exe if any
9203    new_path="${new_path/%.exe/}"
9204
9205    # Save the first 10 bytes of this path to the storage, so fixpath can work.
9206    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9207  fi
9208
9209  else
9210    # We're on a posix platform. Hooray! :)
9211    # First separate the path from the arguments. This will split at the first
9212    # space.
9213    complete="$FOUND_MAKE"
9214    path="${complete%% *}"
9215    tmp="$complete EOL"
9216    arguments="${tmp#* }"
9217
9218    # Cannot rely on the command "which" here since it doesn't always work.
9219    is_absolute_path=`$ECHO "$path" | $GREP ^/`
9220    if test -z "$is_absolute_path"; then
9221      # Path to executable is not absolute. Find it.
9222      IFS_save="$IFS"
9223      IFS=:
9224      for p in $PATH; do
9225        if test -f "$p/$path" && test -x "$p/$path"; then
9226          new_path="$p/$path"
9227          break
9228        fi
9229      done
9230      IFS="$IFS_save"
9231    else
9232      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9233$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9234      new_path="$path"
9235    fi
9236
9237    if test "x$new_path" = x; then
9238        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9239$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9240        has_space=`$ECHO "$complete" | $GREP " "`
9241        if test "x$has_space" != x; then
9242          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9243$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9244        fi
9245        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9246      fi
9247  fi
9248
9249      # Now join together the path and the arguments once again
9250      if test "x$arguments" != xEOL; then
9251        new_complete="$new_path ${arguments% *}"
9252      else
9253        new_complete="$new_path"
9254      fi
9255
9256  if test "x$complete" != "x$new_complete"; then
9257      FOUND_MAKE="$new_complete"
9258      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9259$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9260    fi
9261
9262        fi
9263      fi
9264    fi
9265  fi
9266
9267    fi
9268
9269    if test "x$FOUND_MAKE" = x; then
9270      if test "x$TOOLS_DIR" != x; then
9271        # We have a tools-dir, check that as well before giving up.
9272        OLD_PATH=$PATH
9273        PATH=$TOOLS_DIR:$PATH
9274        for ac_prog in gmake
9275do
9276  # Extract the first word of "$ac_prog", so it can be a program name with args.
9277set dummy $ac_prog; ac_word=$2
9278{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9279$as_echo_n "checking for $ac_word... " >&6; }
9280if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
9281  $as_echo_n "(cached) " >&6
9282else
9283  case $CHECK_TOOLSDIR_GMAKE in
9284  [\\/]* | ?:[\\/]*)
9285  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
9286  ;;
9287  *)
9288  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9289for as_dir in $PATH
9290do
9291  IFS=$as_save_IFS
9292  test -z "$as_dir" && as_dir=.
9293    for ac_exec_ext in '' $ac_executable_extensions; do
9294  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9295    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
9296    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9297    break 2
9298  fi
9299done
9300  done
9301IFS=$as_save_IFS
9302
9303  ;;
9304esac
9305fi
9306CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
9307if test -n "$CHECK_TOOLSDIR_GMAKE"; then
9308  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
9309$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
9310else
9311  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9312$as_echo "no" >&6; }
9313fi
9314
9315
9316  test -n "$CHECK_TOOLSDIR_GMAKE" && break
9317done
9318
9319
9320  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
9321  DESCRIPTION="gmake in tools-dir"
9322  if test "x$MAKE_CANDIDATE" != x; then
9323    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
9324$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
9325    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
9326    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
9327    if test "x$IS_GNU_MAKE" = x; then
9328      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
9329$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
9330    else
9331      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
9332      if test "x$IS_MODERN_MAKE" = x; then
9333        { $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
9334$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;}
9335      else
9336        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9337          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9338            MAKE_EXPECTED_ENV='cygwin'
9339          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9340            MAKE_EXPECTED_ENV='msys'
9341          else
9342            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
9343          fi
9344          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
9345          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
9346        else
9347          # Not relevant for non-Windows
9348          IS_MAKE_CORRECT_ENV=true
9349        fi
9350        if test "x$IS_MAKE_CORRECT_ENV" = x; then
9351          { $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
9352$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;}
9353        else
9354          FOUND_MAKE=$MAKE_CANDIDATE
9355
9356  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9357
9358  # First separate the path from the arguments. This will split at the first
9359  # space.
9360  complete="$FOUND_MAKE"
9361  path="${complete%% *}"
9362  tmp="$complete EOL"
9363  arguments="${tmp#* }"
9364
9365  # Input might be given as Windows format, start by converting to
9366  # unix format.
9367  new_path=`$CYGPATH -u "$path"`
9368
9369  # Now try to locate executable using which
9370  new_path=`$WHICH "$new_path" 2> /dev/null`
9371  # bat and cmd files are not always considered executable in cygwin causing which
9372  # to not find them
9373  if test "x$new_path" = x \
9374           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9375           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9376    new_path=`$CYGPATH -u "$path"`
9377  fi
9378  if test "x$new_path" = x; then
9379    # Oops. Which didn't find the executable.
9380    # The splitting of arguments from the executable at a space might have been incorrect,
9381    # since paths with space are more likely in Windows. Give it another try with the whole
9382    # argument.
9383    path="$complete"
9384    arguments="EOL"
9385    new_path=`$CYGPATH -u "$path"`
9386    new_path=`$WHICH "$new_path" 2> /dev/null`
9387    # bat and cmd files are not always considered executable in cygwin causing which
9388    # to not find them
9389    if test "x$new_path" = x \
9390             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9391             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9392      new_path=`$CYGPATH -u "$path"`
9393    fi
9394    if test "x$new_path" = x; then
9395      # It's still not found. Now this is an unrecoverable error.
9396      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9397$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9398      has_space=`$ECHO "$complete" | $GREP " "`
9399      if test "x$has_space" != x; then
9400        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9401$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9402      fi
9403      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9404    fi
9405  fi
9406
9407  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9408  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9409  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9410  # "foo.exe" is OK but "foo" is an error.
9411  #
9412  # This test is therefore slightly more accurate than "test -f" to check for file precense.
9413  # It is also a way to make sure we got the proper file name for the real test later on.
9414  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9415  if test "x$test_shortpath" = x; then
9416    # Short path failed, file does not exist as specified.
9417    # Try adding .exe or .cmd
9418    if test -f "${new_path}.exe"; then
9419       input_to_shortpath="${new_path}.exe"
9420    elif test -f "${new_path}.cmd"; then
9421       input_to_shortpath="${new_path}.cmd"
9422    else
9423      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9424$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9425      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9426$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9427      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9428    fi
9429  else
9430    input_to_shortpath="$new_path"
9431  fi
9432
9433  # Call helper function which possibly converts this using DOS-style short mode.
9434  # If so, the updated path is stored in $new_path.
9435  new_path="$input_to_shortpath"
9436
9437  input_path="$input_to_shortpath"
9438  # Check if we need to convert this using DOS-style short mode. If the path
9439  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9440  # take no chances and rewrite it.
9441  # Note: m4 eats our [], so we need to use [ and ] instead.
9442  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9443  if test "x$has_forbidden_chars" != x; then
9444    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9445    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9446    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9447    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9448      # Going to short mode and back again did indeed matter. Since short mode is
9449      # case insensitive, let's make it lowercase to improve readability.
9450      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9451      # Now convert it back to Unix-stile (cygpath)
9452      input_path=`$CYGPATH -u "$shortmode_path"`
9453      new_path="$input_path"
9454    fi
9455  fi
9456
9457  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9458  if test "x$test_cygdrive_prefix" = x; then
9459    # As a simple fix, exclude /usr/bin since it's not a real path.
9460    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9461      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9462      # a path prefixed by /cygdrive for fixpath to work.
9463      new_path="$CYGWIN_ROOT_PATH$input_path"
9464    fi
9465  fi
9466
9467  # remove trailing .exe if any
9468  new_path="${new_path/%.exe/}"
9469
9470  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9471
9472  # First separate the path from the arguments. This will split at the first
9473  # space.
9474  complete="$FOUND_MAKE"
9475  path="${complete%% *}"
9476  tmp="$complete EOL"
9477  arguments="${tmp#* }"
9478
9479  # Input might be given as Windows format, start by converting to
9480  # unix format.
9481  new_path="$path"
9482
9483  windows_path="$new_path"
9484  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9485    unix_path=`$CYGPATH -u "$windows_path"`
9486    new_path="$unix_path"
9487  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9488    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9489    new_path="$unix_path"
9490  fi
9491
9492
9493  # Now try to locate executable using which
9494  new_path=`$WHICH "$new_path" 2> /dev/null`
9495
9496  if test "x$new_path" = x; then
9497    # Oops. Which didn't find the executable.
9498    # The splitting of arguments from the executable at a space might have been incorrect,
9499    # since paths with space are more likely in Windows. Give it another try with the whole
9500    # argument.
9501    path="$complete"
9502    arguments="EOL"
9503    new_path="$path"
9504
9505  windows_path="$new_path"
9506  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9507    unix_path=`$CYGPATH -u "$windows_path"`
9508    new_path="$unix_path"
9509  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9510    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9511    new_path="$unix_path"
9512  fi
9513
9514
9515    new_path=`$WHICH "$new_path" 2> /dev/null`
9516
9517    if test "x$new_path" = x; then
9518      # It's still not found. Now this is an unrecoverable error.
9519      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9520$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9521      has_space=`$ECHO "$complete" | $GREP " "`
9522      if test "x$has_space" != x; then
9523        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9524$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9525      fi
9526      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9527    fi
9528  fi
9529
9530  # Now new_path has a complete unix path to the binary
9531  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9532    # Keep paths in /bin as-is, but remove trailing .exe if any
9533    new_path="${new_path/%.exe/}"
9534    # Do not save /bin paths to all_fixpath_prefixes!
9535  else
9536    # Not in mixed or Windows style, start by that.
9537    new_path=`cmd //c echo $new_path`
9538
9539  input_path="$new_path"
9540  # Check if we need to convert this using DOS-style short mode. If the path
9541  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9542  # take no chances and rewrite it.
9543  # Note: m4 eats our [], so we need to use [ and ] instead.
9544  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9545  if test "x$has_forbidden_chars" != x; then
9546    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9547    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9548  fi
9549
9550    # Output is in $new_path
9551
9552  windows_path="$new_path"
9553  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9554    unix_path=`$CYGPATH -u "$windows_path"`
9555    new_path="$unix_path"
9556  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9557    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9558    new_path="$unix_path"
9559  fi
9560
9561    # remove trailing .exe if any
9562    new_path="${new_path/%.exe/}"
9563
9564    # Save the first 10 bytes of this path to the storage, so fixpath can work.
9565    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9566  fi
9567
9568  else
9569    # We're on a posix platform. Hooray! :)
9570    # First separate the path from the arguments. This will split at the first
9571    # space.
9572    complete="$FOUND_MAKE"
9573    path="${complete%% *}"
9574    tmp="$complete EOL"
9575    arguments="${tmp#* }"
9576
9577    # Cannot rely on the command "which" here since it doesn't always work.
9578    is_absolute_path=`$ECHO "$path" | $GREP ^/`
9579    if test -z "$is_absolute_path"; then
9580      # Path to executable is not absolute. Find it.
9581      IFS_save="$IFS"
9582      IFS=:
9583      for p in $PATH; do
9584        if test -f "$p/$path" && test -x "$p/$path"; then
9585          new_path="$p/$path"
9586          break
9587        fi
9588      done
9589      IFS="$IFS_save"
9590    else
9591      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9592$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9593      new_path="$path"
9594    fi
9595
9596    if test "x$new_path" = x; then
9597        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9598$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9599        has_space=`$ECHO "$complete" | $GREP " "`
9600        if test "x$has_space" != x; then
9601          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9602$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9603        fi
9604        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9605      fi
9606  fi
9607
9608      # Now join together the path and the arguments once again
9609      if test "x$arguments" != xEOL; then
9610        new_complete="$new_path ${arguments% *}"
9611      else
9612        new_complete="$new_path"
9613      fi
9614
9615  if test "x$complete" != "x$new_complete"; then
9616      FOUND_MAKE="$new_complete"
9617      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9618$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9619    fi
9620
9621        fi
9622      fi
9623    fi
9624  fi
9625
9626        if test "x$FOUND_MAKE" = x; then
9627          for ac_prog in make
9628do
9629  # Extract the first word of "$ac_prog", so it can be a program name with args.
9630set dummy $ac_prog; ac_word=$2
9631{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9632$as_echo_n "checking for $ac_word... " >&6; }
9633if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
9634  $as_echo_n "(cached) " >&6
9635else
9636  case $CHECK_TOOLSDIR_MAKE in
9637  [\\/]* | ?:[\\/]*)
9638  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
9639  ;;
9640  *)
9641  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9642for as_dir in $PATH
9643do
9644  IFS=$as_save_IFS
9645  test -z "$as_dir" && as_dir=.
9646    for ac_exec_ext in '' $ac_executable_extensions; do
9647  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9648    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
9649    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9650    break 2
9651  fi
9652done
9653  done
9654IFS=$as_save_IFS
9655
9656  ;;
9657esac
9658fi
9659CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
9660if test -n "$CHECK_TOOLSDIR_MAKE"; then
9661  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
9662$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
9663else
9664  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9665$as_echo "no" >&6; }
9666fi
9667
9668
9669  test -n "$CHECK_TOOLSDIR_MAKE" && break
9670done
9671
9672
9673  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
9674  DESCRIPTION="make in tools-dir"
9675  if test "x$MAKE_CANDIDATE" != x; then
9676    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
9677$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
9678    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
9679    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
9680    if test "x$IS_GNU_MAKE" = x; then
9681      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
9682$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
9683    else
9684      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
9685      if test "x$IS_MODERN_MAKE" = x; then
9686        { $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
9687$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;}
9688      else
9689        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9690          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9691            MAKE_EXPECTED_ENV='cygwin'
9692          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9693            MAKE_EXPECTED_ENV='msys'
9694          else
9695            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
9696          fi
9697          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
9698          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
9699        else
9700          # Not relevant for non-Windows
9701          IS_MAKE_CORRECT_ENV=true
9702        fi
9703        if test "x$IS_MAKE_CORRECT_ENV" = x; then
9704          { $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
9705$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;}
9706        else
9707          FOUND_MAKE=$MAKE_CANDIDATE
9708
9709  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9710
9711  # First separate the path from the arguments. This will split at the first
9712  # space.
9713  complete="$FOUND_MAKE"
9714  path="${complete%% *}"
9715  tmp="$complete EOL"
9716  arguments="${tmp#* }"
9717
9718  # Input might be given as Windows format, start by converting to
9719  # unix format.
9720  new_path=`$CYGPATH -u "$path"`
9721
9722  # Now try to locate executable using which
9723  new_path=`$WHICH "$new_path" 2> /dev/null`
9724  # bat and cmd files are not always considered executable in cygwin causing which
9725  # to not find them
9726  if test "x$new_path" = x \
9727           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9728           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9729    new_path=`$CYGPATH -u "$path"`
9730  fi
9731  if test "x$new_path" = x; then
9732    # Oops. Which didn't find the executable.
9733    # The splitting of arguments from the executable at a space might have been incorrect,
9734    # since paths with space are more likely in Windows. Give it another try with the whole
9735    # argument.
9736    path="$complete"
9737    arguments="EOL"
9738    new_path=`$CYGPATH -u "$path"`
9739    new_path=`$WHICH "$new_path" 2> /dev/null`
9740    # bat and cmd files are not always considered executable in cygwin causing which
9741    # to not find them
9742    if test "x$new_path" = x \
9743             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9744             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9745      new_path=`$CYGPATH -u "$path"`
9746    fi
9747    if test "x$new_path" = x; then
9748      # It's still not found. Now this is an unrecoverable error.
9749      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9750$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9751      has_space=`$ECHO "$complete" | $GREP " "`
9752      if test "x$has_space" != x; then
9753        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9754$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9755      fi
9756      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9757    fi
9758  fi
9759
9760  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9761  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9762  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9763  # "foo.exe" is OK but "foo" is an error.
9764  #
9765  # This test is therefore slightly more accurate than "test -f" to check for file precense.
9766  # It is also a way to make sure we got the proper file name for the real test later on.
9767  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9768  if test "x$test_shortpath" = x; then
9769    # Short path failed, file does not exist as specified.
9770    # Try adding .exe or .cmd
9771    if test -f "${new_path}.exe"; then
9772       input_to_shortpath="${new_path}.exe"
9773    elif test -f "${new_path}.cmd"; then
9774       input_to_shortpath="${new_path}.cmd"
9775    else
9776      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9777$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9778      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9779$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9780      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9781    fi
9782  else
9783    input_to_shortpath="$new_path"
9784  fi
9785
9786  # Call helper function which possibly converts this using DOS-style short mode.
9787  # If so, the updated path is stored in $new_path.
9788  new_path="$input_to_shortpath"
9789
9790  input_path="$input_to_shortpath"
9791  # Check if we need to convert this using DOS-style short mode. If the path
9792  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9793  # take no chances and rewrite it.
9794  # Note: m4 eats our [], so we need to use [ and ] instead.
9795  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9796  if test "x$has_forbidden_chars" != x; then
9797    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9798    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9799    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9800    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9801      # Going to short mode and back again did indeed matter. Since short mode is
9802      # case insensitive, let's make it lowercase to improve readability.
9803      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9804      # Now convert it back to Unix-stile (cygpath)
9805      input_path=`$CYGPATH -u "$shortmode_path"`
9806      new_path="$input_path"
9807    fi
9808  fi
9809
9810  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9811  if test "x$test_cygdrive_prefix" = x; then
9812    # As a simple fix, exclude /usr/bin since it's not a real path.
9813    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9814      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9815      # a path prefixed by /cygdrive for fixpath to work.
9816      new_path="$CYGWIN_ROOT_PATH$input_path"
9817    fi
9818  fi
9819
9820  # remove trailing .exe if any
9821  new_path="${new_path/%.exe/}"
9822
9823  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9824
9825  # First separate the path from the arguments. This will split at the first
9826  # space.
9827  complete="$FOUND_MAKE"
9828  path="${complete%% *}"
9829  tmp="$complete EOL"
9830  arguments="${tmp#* }"
9831
9832  # Input might be given as Windows format, start by converting to
9833  # unix format.
9834  new_path="$path"
9835
9836  windows_path="$new_path"
9837  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9838    unix_path=`$CYGPATH -u "$windows_path"`
9839    new_path="$unix_path"
9840  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9841    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9842    new_path="$unix_path"
9843  fi
9844
9845
9846  # Now try to locate executable using which
9847  new_path=`$WHICH "$new_path" 2> /dev/null`
9848
9849  if test "x$new_path" = x; then
9850    # Oops. Which didn't find the executable.
9851    # The splitting of arguments from the executable at a space might have been incorrect,
9852    # since paths with space are more likely in Windows. Give it another try with the whole
9853    # argument.
9854    path="$complete"
9855    arguments="EOL"
9856    new_path="$path"
9857
9858  windows_path="$new_path"
9859  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9860    unix_path=`$CYGPATH -u "$windows_path"`
9861    new_path="$unix_path"
9862  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9863    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9864    new_path="$unix_path"
9865  fi
9866
9867
9868    new_path=`$WHICH "$new_path" 2> /dev/null`
9869
9870    if test "x$new_path" = x; then
9871      # It's still not found. Now this is an unrecoverable error.
9872      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9873$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9874      has_space=`$ECHO "$complete" | $GREP " "`
9875      if test "x$has_space" != x; then
9876        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9877$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9878      fi
9879      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9880    fi
9881  fi
9882
9883  # Now new_path has a complete unix path to the binary
9884  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9885    # Keep paths in /bin as-is, but remove trailing .exe if any
9886    new_path="${new_path/%.exe/}"
9887    # Do not save /bin paths to all_fixpath_prefixes!
9888  else
9889    # Not in mixed or Windows style, start by that.
9890    new_path=`cmd //c echo $new_path`
9891
9892  input_path="$new_path"
9893  # Check if we need to convert this using DOS-style short mode. If the path
9894  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9895  # take no chances and rewrite it.
9896  # Note: m4 eats our [], so we need to use [ and ] instead.
9897  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9898  if test "x$has_forbidden_chars" != x; then
9899    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9900    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9901  fi
9902
9903    # Output is in $new_path
9904
9905  windows_path="$new_path"
9906  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9907    unix_path=`$CYGPATH -u "$windows_path"`
9908    new_path="$unix_path"
9909  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9910    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9911    new_path="$unix_path"
9912  fi
9913
9914    # remove trailing .exe if any
9915    new_path="${new_path/%.exe/}"
9916
9917    # Save the first 10 bytes of this path to the storage, so fixpath can work.
9918    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9919  fi
9920
9921  else
9922    # We're on a posix platform. Hooray! :)
9923    # First separate the path from the arguments. This will split at the first
9924    # space.
9925    complete="$FOUND_MAKE"
9926    path="${complete%% *}"
9927    tmp="$complete EOL"
9928    arguments="${tmp#* }"
9929
9930    # Cannot rely on the command "which" here since it doesn't always work.
9931    is_absolute_path=`$ECHO "$path" | $GREP ^/`
9932    if test -z "$is_absolute_path"; then
9933      # Path to executable is not absolute. Find it.
9934      IFS_save="$IFS"
9935      IFS=:
9936      for p in $PATH; do
9937        if test -f "$p/$path" && test -x "$p/$path"; then
9938          new_path="$p/$path"
9939          break
9940        fi
9941      done
9942      IFS="$IFS_save"
9943    else
9944      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9945$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9946      new_path="$path"
9947    fi
9948
9949    if test "x$new_path" = x; then
9950        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9951$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9952        has_space=`$ECHO "$complete" | $GREP " "`
9953        if test "x$has_space" != x; then
9954          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9955$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9956        fi
9957        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9958      fi
9959  fi
9960
9961      # Now join together the path and the arguments once again
9962      if test "x$arguments" != xEOL; then
9963        new_complete="$new_path ${arguments% *}"
9964      else
9965        new_complete="$new_path"
9966      fi
9967
9968  if test "x$complete" != "x$new_complete"; then
9969      FOUND_MAKE="$new_complete"
9970      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9971$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9972    fi
9973
9974        fi
9975      fi
9976    fi
9977  fi
9978
9979        fi
9980        PATH=$OLD_PATH
9981      fi
9982    fi
9983
9984    if test "x$FOUND_MAKE" = x; then
9985      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
9986    fi
9987  fi
9988
9989  MAKE=$FOUND_MAKE
9990
9991  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
9992$as_echo "$as_me: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
9993
9994
9995
9996    # Test if find supports -delete
9997    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
9998$as_echo_n "checking if find supports -delete... " >&6; }
9999    FIND_DELETE="-delete"
10000
10001    DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
10002
10003    echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
10004
10005    TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
10006    if test -f $DELETEDIR/TestIfFindSupportsDelete; then
10007        # No, it does not.
10008        rm $DELETEDIR/TestIfFindSupportsDelete
10009        FIND_DELETE="-exec rm \{\} \+"
10010        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10011$as_echo "no" >&6; }
10012    else
10013        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10014$as_echo "yes" >&6; }
10015    fi
10016    rmdir $DELETEDIR
10017
10018
10019
10020# These tools might not be installed by default,
10021# need hint on how to install them.
10022
10023    for ac_prog in unzip
10024do
10025  # Extract the first word of "$ac_prog", so it can be a program name with args.
10026set dummy $ac_prog; ac_word=$2
10027{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10028$as_echo_n "checking for $ac_word... " >&6; }
10029if ${ac_cv_path_UNZIP+:} false; then :
10030  $as_echo_n "(cached) " >&6
10031else
10032  case $UNZIP in
10033  [\\/]* | ?:[\\/]*)
10034  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
10035  ;;
10036  *)
10037  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10038for as_dir in $PATH
10039do
10040  IFS=$as_save_IFS
10041  test -z "$as_dir" && as_dir=.
10042    for ac_exec_ext in '' $ac_executable_extensions; do
10043  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10044    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
10045    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10046    break 2
10047  fi
10048done
10049  done
10050IFS=$as_save_IFS
10051
10052  ;;
10053esac
10054fi
10055UNZIP=$ac_cv_path_UNZIP
10056if test -n "$UNZIP"; then
10057  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
10058$as_echo "$UNZIP" >&6; }
10059else
10060  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10061$as_echo "no" >&6; }
10062fi
10063
10064
10065  test -n "$UNZIP" && break
10066done
10067
10068
10069    if test "x$UNZIP" = x; then
10070        if test "xunzip" = x; then
10071          PROG_NAME=unzip
10072        else
10073          PROG_NAME=unzip
10074        fi
10075        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10076$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10077        as_fn_error $? "Cannot continue" "$LINENO" 5
10078    fi
10079
10080
10081
10082    for ac_prog in zip
10083do
10084  # Extract the first word of "$ac_prog", so it can be a program name with args.
10085set dummy $ac_prog; ac_word=$2
10086{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10087$as_echo_n "checking for $ac_word... " >&6; }
10088if ${ac_cv_path_ZIP+:} false; then :
10089  $as_echo_n "(cached) " >&6
10090else
10091  case $ZIP in
10092  [\\/]* | ?:[\\/]*)
10093  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
10094  ;;
10095  *)
10096  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10097for as_dir in $PATH
10098do
10099  IFS=$as_save_IFS
10100  test -z "$as_dir" && as_dir=.
10101    for ac_exec_ext in '' $ac_executable_extensions; do
10102  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10103    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
10104    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10105    break 2
10106  fi
10107done
10108  done
10109IFS=$as_save_IFS
10110
10111  ;;
10112esac
10113fi
10114ZIP=$ac_cv_path_ZIP
10115if test -n "$ZIP"; then
10116  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
10117$as_echo "$ZIP" >&6; }
10118else
10119  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10120$as_echo "no" >&6; }
10121fi
10122
10123
10124  test -n "$ZIP" && break
10125done
10126
10127
10128    if test "x$ZIP" = x; then
10129        if test "xzip" = x; then
10130          PROG_NAME=zip
10131        else
10132          PROG_NAME=zip
10133        fi
10134        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10135$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10136        as_fn_error $? "Cannot continue" "$LINENO" 5
10137    fi
10138
10139
10140
10141# Non-required basic tools
10142
10143# Extract the first word of "ldd", so it can be a program name with args.
10144set dummy ldd; ac_word=$2
10145{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10146$as_echo_n "checking for $ac_word... " >&6; }
10147if ${ac_cv_path_LDD+:} false; then :
10148  $as_echo_n "(cached) " >&6
10149else
10150  case $LDD in
10151  [\\/]* | ?:[\\/]*)
10152  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
10153  ;;
10154  *)
10155  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10156for as_dir in $PATH
10157do
10158  IFS=$as_save_IFS
10159  test -z "$as_dir" && as_dir=.
10160    for ac_exec_ext in '' $ac_executable_extensions; do
10161  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10162    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
10163    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10164    break 2
10165  fi
10166done
10167  done
10168IFS=$as_save_IFS
10169
10170  ;;
10171esac
10172fi
10173LDD=$ac_cv_path_LDD
10174if test -n "$LDD"; then
10175  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
10176$as_echo "$LDD" >&6; }
10177else
10178  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10179$as_echo "no" >&6; }
10180fi
10181
10182
10183if test "x$LDD" = "x"; then
10184    # List shared lib dependencies is used for
10185    # debug output and checking for forbidden dependencies.
10186    # We can build without it.
10187    LDD="true"
10188fi
10189# Extract the first word of "otool", so it can be a program name with args.
10190set dummy otool; ac_word=$2
10191{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10192$as_echo_n "checking for $ac_word... " >&6; }
10193if ${ac_cv_path_OTOOL+:} false; then :
10194  $as_echo_n "(cached) " >&6
10195else
10196  case $OTOOL in
10197  [\\/]* | ?:[\\/]*)
10198  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
10199  ;;
10200  *)
10201  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10202for as_dir in $PATH
10203do
10204  IFS=$as_save_IFS
10205  test -z "$as_dir" && as_dir=.
10206    for ac_exec_ext in '' $ac_executable_extensions; do
10207  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10208    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
10209    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10210    break 2
10211  fi
10212done
10213  done
10214IFS=$as_save_IFS
10215
10216  ;;
10217esac
10218fi
10219OTOOL=$ac_cv_path_OTOOL
10220if test -n "$OTOOL"; then
10221  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
10222$as_echo "$OTOOL" >&6; }
10223else
10224  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10225$as_echo "no" >&6; }
10226fi
10227
10228
10229if test "x$OTOOL" = "x"; then
10230   OTOOL="true"
10231fi
10232for ac_prog in readelf greadelf
10233do
10234  # Extract the first word of "$ac_prog", so it can be a program name with args.
10235set dummy $ac_prog; ac_word=$2
10236{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10237$as_echo_n "checking for $ac_word... " >&6; }
10238if ${ac_cv_path_READELF+:} false; then :
10239  $as_echo_n "(cached) " >&6
10240else
10241  case $READELF in
10242  [\\/]* | ?:[\\/]*)
10243  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
10244  ;;
10245  *)
10246  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10247for as_dir in $PATH
10248do
10249  IFS=$as_save_IFS
10250  test -z "$as_dir" && as_dir=.
10251    for ac_exec_ext in '' $ac_executable_extensions; do
10252  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10253    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
10254    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10255    break 2
10256  fi
10257done
10258  done
10259IFS=$as_save_IFS
10260
10261  ;;
10262esac
10263fi
10264READELF=$ac_cv_path_READELF
10265if test -n "$READELF"; then
10266  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
10267$as_echo "$READELF" >&6; }
10268else
10269  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10270$as_echo "no" >&6; }
10271fi
10272
10273
10274  test -n "$READELF" && break
10275done
10276
10277# Extract the first word of "hg", so it can be a program name with args.
10278set dummy hg; ac_word=$2
10279{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10280$as_echo_n "checking for $ac_word... " >&6; }
10281if ${ac_cv_path_HG+:} false; then :
10282  $as_echo_n "(cached) " >&6
10283else
10284  case $HG in
10285  [\\/]* | ?:[\\/]*)
10286  ac_cv_path_HG="$HG" # Let the user override the test with a path.
10287  ;;
10288  *)
10289  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10290for as_dir in $PATH
10291do
10292  IFS=$as_save_IFS
10293  test -z "$as_dir" && as_dir=.
10294    for ac_exec_ext in '' $ac_executable_extensions; do
10295  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10296    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
10297    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10298    break 2
10299  fi
10300done
10301  done
10302IFS=$as_save_IFS
10303
10304  ;;
10305esac
10306fi
10307HG=$ac_cv_path_HG
10308if test -n "$HG"; then
10309  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
10310$as_echo "$HG" >&6; }
10311else
10312  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10313$as_echo "no" >&6; }
10314fi
10315
10316
10317# Extract the first word of "stat", so it can be a program name with args.
10318set dummy stat; ac_word=$2
10319{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10320$as_echo_n "checking for $ac_word... " >&6; }
10321if ${ac_cv_path_STAT+:} false; then :
10322  $as_echo_n "(cached) " >&6
10323else
10324  case $STAT in
10325  [\\/]* | ?:[\\/]*)
10326  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
10327  ;;
10328  *)
10329  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10330for as_dir in $PATH
10331do
10332  IFS=$as_save_IFS
10333  test -z "$as_dir" && as_dir=.
10334    for ac_exec_ext in '' $ac_executable_extensions; do
10335  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10336    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
10337    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10338    break 2
10339  fi
10340done
10341  done
10342IFS=$as_save_IFS
10343
10344  ;;
10345esac
10346fi
10347STAT=$ac_cv_path_STAT
10348if test -n "$STAT"; then
10349  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
10350$as_echo "$STAT" >&6; }
10351else
10352  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10353$as_echo "no" >&6; }
10354fi
10355
10356
10357# Extract the first word of "time", so it can be a program name with args.
10358set dummy time; ac_word=$2
10359{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10360$as_echo_n "checking for $ac_word... " >&6; }
10361if ${ac_cv_path_TIME+:} false; then :
10362  $as_echo_n "(cached) " >&6
10363else
10364  case $TIME in
10365  [\\/]* | ?:[\\/]*)
10366  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
10367  ;;
10368  *)
10369  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10370for as_dir in $PATH
10371do
10372  IFS=$as_save_IFS
10373  test -z "$as_dir" && as_dir=.
10374    for ac_exec_ext in '' $ac_executable_extensions; do
10375  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10376    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
10377    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10378    break 2
10379  fi
10380done
10381  done
10382IFS=$as_save_IFS
10383
10384  ;;
10385esac
10386fi
10387TIME=$ac_cv_path_TIME
10388if test -n "$TIME"; then
10389  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
10390$as_echo "$TIME" >&6; }
10391else
10392  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10393$as_echo "no" >&6; }
10394fi
10395
10396
10397# Check if it's GNU time
10398IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
10399if test "x$IS_GNU_TIME" != x; then
10400  IS_GNU_TIME=yes
10401else
10402  IS_GNU_TIME=no
10403fi
10404
10405
10406if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
10407
10408    for ac_prog in comm
10409do
10410  # Extract the first word of "$ac_prog", so it can be a program name with args.
10411set dummy $ac_prog; ac_word=$2
10412{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10413$as_echo_n "checking for $ac_word... " >&6; }
10414if ${ac_cv_path_COMM+:} false; then :
10415  $as_echo_n "(cached) " >&6
10416else
10417  case $COMM in
10418  [\\/]* | ?:[\\/]*)
10419  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
10420  ;;
10421  *)
10422  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10423for as_dir in $PATH
10424do
10425  IFS=$as_save_IFS
10426  test -z "$as_dir" && as_dir=.
10427    for ac_exec_ext in '' $ac_executable_extensions; do
10428  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10429    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
10430    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10431    break 2
10432  fi
10433done
10434  done
10435IFS=$as_save_IFS
10436
10437  ;;
10438esac
10439fi
10440COMM=$ac_cv_path_COMM
10441if test -n "$COMM"; then
10442  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
10443$as_echo "$COMM" >&6; }
10444else
10445  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10446$as_echo "no" >&6; }
10447fi
10448
10449
10450  test -n "$COMM" && break
10451done
10452
10453
10454    if test "x$COMM" = x; then
10455        if test "xcomm" = x; then
10456          PROG_NAME=comm
10457        else
10458          PROG_NAME=comm
10459        fi
10460        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10461$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10462        as_fn_error $? "Cannot continue" "$LINENO" 5
10463    fi
10464
10465
10466fi
10467
10468if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
10469
10470    for ac_prog in xattr
10471do
10472  # Extract the first word of "$ac_prog", so it can be a program name with args.
10473set dummy $ac_prog; ac_word=$2
10474{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10475$as_echo_n "checking for $ac_word... " >&6; }
10476if ${ac_cv_path_XATTR+:} false; then :
10477  $as_echo_n "(cached) " >&6
10478else
10479  case $XATTR in
10480  [\\/]* | ?:[\\/]*)
10481  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
10482  ;;
10483  *)
10484  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10485for as_dir in $PATH
10486do
10487  IFS=$as_save_IFS
10488  test -z "$as_dir" && as_dir=.
10489    for ac_exec_ext in '' $ac_executable_extensions; do
10490  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10491    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
10492    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10493    break 2
10494  fi
10495done
10496  done
10497IFS=$as_save_IFS
10498
10499  ;;
10500esac
10501fi
10502XATTR=$ac_cv_path_XATTR
10503if test -n "$XATTR"; then
10504  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
10505$as_echo "$XATTR" >&6; }
10506else
10507  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10508$as_echo "no" >&6; }
10509fi
10510
10511
10512  test -n "$XATTR" && break
10513done
10514
10515
10516    if test "x$XATTR" = x; then
10517        if test "xxattr" = x; then
10518          PROG_NAME=xattr
10519        else
10520          PROG_NAME=xattr
10521        fi
10522        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10523$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10524        as_fn_error $? "Cannot continue" "$LINENO" 5
10525    fi
10526
10527
10528  # Extract the first word of "codesign", so it can be a program name with args.
10529set dummy codesign; ac_word=$2
10530{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10531$as_echo_n "checking for $ac_word... " >&6; }
10532if ${ac_cv_path_CODESIGN+:} false; then :
10533  $as_echo_n "(cached) " >&6
10534else
10535  case $CODESIGN in
10536  [\\/]* | ?:[\\/]*)
10537  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
10538  ;;
10539  *)
10540  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10541for as_dir in $PATH
10542do
10543  IFS=$as_save_IFS
10544  test -z "$as_dir" && as_dir=.
10545    for ac_exec_ext in '' $ac_executable_extensions; do
10546  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10547    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
10548    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10549    break 2
10550  fi
10551done
10552  done
10553IFS=$as_save_IFS
10554
10555  ;;
10556esac
10557fi
10558CODESIGN=$ac_cv_path_CODESIGN
10559if test -n "$CODESIGN"; then
10560  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
10561$as_echo "$CODESIGN" >&6; }
10562else
10563  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10564$as_echo "no" >&6; }
10565fi
10566
10567
10568  if test "x$CODESIGN" != "x"; then
10569    # Verify that the openjdk_codesign certificate is present
10570    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
10571$as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
10572    rm -f codesign-testfile
10573    touch codesign-testfile
10574    codesign -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
10575    rm -f codesign-testfile
10576    if test "x$CODESIGN" = x; then
10577      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10578$as_echo "no" >&6; }
10579    else
10580      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10581$as_echo "yes" >&6; }
10582    fi
10583  fi
10584fi
10585
10586
10587# Check if pkg-config is available.
10588
10589
10590if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
10591	if test -n "$ac_tool_prefix"; then
10592  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
10593set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
10594{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10595$as_echo_n "checking for $ac_word... " >&6; }
10596if ${ac_cv_path_PKG_CONFIG+:} false; then :
10597  $as_echo_n "(cached) " >&6
10598else
10599  case $PKG_CONFIG in
10600  [\\/]* | ?:[\\/]*)
10601  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10602  ;;
10603  *)
10604  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10605for as_dir in $PATH
10606do
10607  IFS=$as_save_IFS
10608  test -z "$as_dir" && as_dir=.
10609    for ac_exec_ext in '' $ac_executable_extensions; do
10610  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10611    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10612    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10613    break 2
10614  fi
10615done
10616  done
10617IFS=$as_save_IFS
10618
10619  ;;
10620esac
10621fi
10622PKG_CONFIG=$ac_cv_path_PKG_CONFIG
10623if test -n "$PKG_CONFIG"; then
10624  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
10625$as_echo "$PKG_CONFIG" >&6; }
10626else
10627  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10628$as_echo "no" >&6; }
10629fi
10630
10631
10632fi
10633if test -z "$ac_cv_path_PKG_CONFIG"; then
10634  ac_pt_PKG_CONFIG=$PKG_CONFIG
10635  # Extract the first word of "pkg-config", so it can be a program name with args.
10636set dummy pkg-config; ac_word=$2
10637{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10638$as_echo_n "checking for $ac_word... " >&6; }
10639if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
10640  $as_echo_n "(cached) " >&6
10641else
10642  case $ac_pt_PKG_CONFIG in
10643  [\\/]* | ?:[\\/]*)
10644  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
10645  ;;
10646  *)
10647  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10648for as_dir in $PATH
10649do
10650  IFS=$as_save_IFS
10651  test -z "$as_dir" && as_dir=.
10652    for ac_exec_ext in '' $ac_executable_extensions; do
10653  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10654    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10655    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10656    break 2
10657  fi
10658done
10659  done
10660IFS=$as_save_IFS
10661
10662  ;;
10663esac
10664fi
10665ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
10666if test -n "$ac_pt_PKG_CONFIG"; then
10667  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
10668$as_echo "$ac_pt_PKG_CONFIG" >&6; }
10669else
10670  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10671$as_echo "no" >&6; }
10672fi
10673
10674  if test "x$ac_pt_PKG_CONFIG" = x; then
10675    PKG_CONFIG=""
10676  else
10677    case $cross_compiling:$ac_tool_warned in
10678yes:)
10679{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10680$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10681ac_tool_warned=yes ;;
10682esac
10683    PKG_CONFIG=$ac_pt_PKG_CONFIG
10684  fi
10685else
10686  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
10687fi
10688
10689fi
10690if test -n "$PKG_CONFIG"; then
10691	_pkg_min_version=0.9.0
10692	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
10693$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
10694	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
10695		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10696$as_echo "yes" >&6; }
10697	else
10698		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10699$as_echo "no" >&6; }
10700		PKG_CONFIG=""
10701	fi
10702
10703fi
10704
10705# After basic tools have been setup, we can check build os specific details.
10706
10707###############################################################################
10708
10709# Note that this is the build platform OS version!
10710
10711OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
10712OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
10713OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
10714OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
10715
10716
10717
10718
10719
10720# Setup builddeps, for automatic downloading of tools we need.
10721# This is needed before we can call BDEPS_CHECK_MODULE, which is done in
10722# boot-jdk setup, but we need to have basic tools setup first.
10723
10724
10725# Check whether --with-builddeps-conf was given.
10726if test "${with_builddeps_conf+set}" = set; then :
10727  withval=$with_builddeps_conf;
10728fi
10729
10730
10731
10732# Check whether --with-builddeps-server was given.
10733if test "${with_builddeps_server+set}" = set; then :
10734  withval=$with_builddeps_server;
10735fi
10736
10737
10738
10739# Check whether --with-builddeps-dir was given.
10740if test "${with_builddeps_dir+set}" = set; then :
10741  withval=$with_builddeps_dir;
10742else
10743  with_builddeps_dir=/localhome/builddeps
10744fi
10745
10746
10747
10748# Check whether --with-builddeps-group was given.
10749if test "${with_builddeps_group+set}" = set; then :
10750  withval=$with_builddeps_group;
10751fi
10752
10753
10754
10755
10756    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
10757        if test "x$with_builddeps_conf" != x; then
10758            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for supplied builddeps configuration file" >&5
10759$as_echo_n "checking for supplied builddeps configuration file... " >&6; }
10760            builddepsfile=$with_builddeps_conf
10761            if test -s $builddepsfile; then
10762                . $builddepsfile
10763                { $as_echo "$as_me:${as_lineno-$LINENO}: result: loaded!" >&5
10764$as_echo "loaded!" >&6; }
10765            else
10766               as_fn_error $? "The given builddeps conf file $with_builddeps_conf could not be loaded!" "$LINENO" 5
10767           fi
10768        else
10769            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builddeps.conf files in sources..." >&5
10770$as_echo_n "checking for builddeps.conf files in sources...... " >&6; }
10771            builddepsfile=`mktemp`
10772            touch $builddepsfile
10773            # Put all found confs into a single file.
10774            find ${SRC_ROOT} -name builddeps.conf -exec cat \{\} \; >> $builddepsfile
10775            # Source the file to acquire the variables
10776            if test -s $builddepsfile; then
10777                . $builddepsfile
10778                { $as_echo "$as_me:${as_lineno-$LINENO}: result: found at least one!" >&5
10779$as_echo "found at least one!" >&6; }
10780            else
10781               as_fn_error $? "Could not find any builddeps.conf at all!" "$LINENO" 5
10782           fi
10783        fi
10784        # Create build and target names that use _ instead of "-" and ".".
10785        # This is necessary to use them in variable names.
10786        build_var=`echo ${OPENJDK_BUILD_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
10787        target_var=`echo ${OPENJDK_TARGET_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
10788        # Extract rewrite information for build and target
10789        eval rewritten_build=\${REWRITE_${build_var}}
10790        if test "x$rewritten_build" = x; then
10791            rewritten_build=${OPENJDK_BUILD_AUTOCONF_NAME}
10792            echo Build stays the same $rewritten_build
10793        else
10794            echo Rewriting build for builddeps into $rewritten_build
10795        fi
10796        eval rewritten_target=\${REWRITE_${target_var}}
10797        if test "x$rewritten_target" = x; then
10798            rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME}
10799            echo Target stays the same $rewritten_target
10800        else
10801            echo Rewriting target for builddeps into $rewritten_target
10802        fi
10803        rewritten_build_var=`echo ${rewritten_build} | tr '-' '_' | tr '.' '_'`
10804        rewritten_target_var=`echo ${rewritten_target} | tr '-' '_' | tr '.' '_'`
10805    fi
10806    for ac_prog in 7z unzip
10807do
10808  # Extract the first word of "$ac_prog", so it can be a program name with args.
10809set dummy $ac_prog; ac_word=$2
10810{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10811$as_echo_n "checking for $ac_word... " >&6; }
10812if ${ac_cv_prog_BDEPS_UNZIP+:} false; then :
10813  $as_echo_n "(cached) " >&6
10814else
10815  if test -n "$BDEPS_UNZIP"; then
10816  ac_cv_prog_BDEPS_UNZIP="$BDEPS_UNZIP" # Let the user override the test.
10817else
10818as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10819for as_dir in $PATH
10820do
10821  IFS=$as_save_IFS
10822  test -z "$as_dir" && as_dir=.
10823    for ac_exec_ext in '' $ac_executable_extensions; do
10824  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10825    ac_cv_prog_BDEPS_UNZIP="$ac_prog"
10826    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10827    break 2
10828  fi
10829done
10830  done
10831IFS=$as_save_IFS
10832
10833fi
10834fi
10835BDEPS_UNZIP=$ac_cv_prog_BDEPS_UNZIP
10836if test -n "$BDEPS_UNZIP"; then
10837  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_UNZIP" >&5
10838$as_echo "$BDEPS_UNZIP" >&6; }
10839else
10840  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10841$as_echo "no" >&6; }
10842fi
10843
10844
10845  test -n "$BDEPS_UNZIP" && break
10846done
10847
10848    if test "x$BDEPS_UNZIP" = x7z; then
10849        BDEPS_UNZIP="7z x"
10850    fi
10851
10852    for ac_prog in wget lftp ftp
10853do
10854  # Extract the first word of "$ac_prog", so it can be a program name with args.
10855set dummy $ac_prog; ac_word=$2
10856{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10857$as_echo_n "checking for $ac_word... " >&6; }
10858if ${ac_cv_prog_BDEPS_FTP+:} false; then :
10859  $as_echo_n "(cached) " >&6
10860else
10861  if test -n "$BDEPS_FTP"; then
10862  ac_cv_prog_BDEPS_FTP="$BDEPS_FTP" # Let the user override the test.
10863else
10864as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10865for as_dir in $PATH
10866do
10867  IFS=$as_save_IFS
10868  test -z "$as_dir" && as_dir=.
10869    for ac_exec_ext in '' $ac_executable_extensions; do
10870  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10871    ac_cv_prog_BDEPS_FTP="$ac_prog"
10872    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10873    break 2
10874  fi
10875done
10876  done
10877IFS=$as_save_IFS
10878
10879fi
10880fi
10881BDEPS_FTP=$ac_cv_prog_BDEPS_FTP
10882if test -n "$BDEPS_FTP"; then
10883  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_FTP" >&5
10884$as_echo "$BDEPS_FTP" >&6; }
10885else
10886  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10887$as_echo "no" >&6; }
10888fi
10889
10890
10891  test -n "$BDEPS_FTP" && break
10892done
10893
10894
10895
10896###############################################################################
10897#
10898# Determine OpenJDK variants, options and version numbers.
10899#
10900###############################################################################
10901
10902# We need build & target for this.
10903
10904
10905###############################################################################
10906#
10907# Should we build a JDK/JVM with headful support (ie a graphical ui)?
10908# We always build headless support.
10909#
10910{ $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
10911$as_echo_n "checking headful support... " >&6; }
10912# Check whether --enable-headful was given.
10913if test "${enable_headful+set}" = set; then :
10914  enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
10915else
10916  SUPPORT_HEADFUL=yes
10917fi
10918
10919
10920SUPPORT_HEADLESS=yes
10921BUILD_HEADLESS="BUILD_HEADLESS:=true"
10922
10923if test "x$SUPPORT_HEADFUL" = xyes; then
10924    # We are building both headful and headless.
10925    headful_msg="inlude support for both headful and headless"
10926fi
10927
10928if test "x$SUPPORT_HEADFUL" = xno; then
10929    # Thus we are building headless only.
10930    BUILD_HEADLESS="BUILD_HEADLESS:=true"
10931    headful_msg="headless only"
10932fi
10933
10934{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
10935$as_echo "$headful_msg" >&6; }
10936
10937
10938
10939
10940
10941# Control wether Hotspot runs Queens test after build.
10942# Check whether --enable-hotspot-test-in-build was given.
10943if test "${enable_hotspot_test_in_build+set}" = set; then :
10944  enableval=$enable_hotspot_test_in_build;
10945else
10946  enable_hotspot_test_in_build=no
10947fi
10948
10949if test "x$enable_hotspot_test_in_build" = "xyes"; then
10950    TEST_IN_BUILD=true
10951else
10952    TEST_IN_BUILD=false
10953fi
10954
10955
10956###############################################################################
10957#
10958# Choose cacerts source file
10959#
10960
10961# Check whether --with-cacerts-file was given.
10962if test "${with_cacerts_file+set}" = set; then :
10963  withval=$with_cacerts_file;
10964fi
10965
10966if test "x$with_cacerts_file" != x; then
10967    CACERTS_FILE=$with_cacerts_file
10968else
10969    CACERTS_FILE=${SRC_ROOT}/jdk/src/share/lib/security/cacerts
10970fi
10971
10972
10973###############################################################################
10974#
10975# Enable or disable unlimited crypto
10976#
10977# Check whether --enable-unlimited-crypto was given.
10978if test "${enable_unlimited_crypto+set}" = set; then :
10979  enableval=$enable_unlimited_crypto;
10980else
10981  enable_unlimited_crypto=no
10982fi
10983
10984if test "x$enable_unlimited_crypto" = "xyes"; then
10985    UNLIMITED_CRYPTO=true
10986else
10987    UNLIMITED_CRYPTO=false
10988fi
10989
10990
10991###############################################################################
10992#
10993# Enable or disable the elliptic curve crypto implementation
10994#
10995
10996
10997###############################################################################
10998#
10999# Compress jars
11000#
11001COMPRESS_JARS=false
11002
11003
11004
11005
11006# Source the version numbers
11007. $AUTOCONF_DIR/version-numbers
11008
11009# Get the settings from parameters
11010
11011# Check whether --with-milestone was given.
11012if test "${with_milestone+set}" = set; then :
11013  withval=$with_milestone;
11014fi
11015
11016if test "x$with_milestone" = xyes; then
11017  as_fn_error $? "Milestone must have a value" "$LINENO" 5
11018elif test "x$with_milestone" != x; then
11019    MILESTONE="$with_milestone"
11020fi
11021if test "x$MILESTONE" = x; then
11022  MILESTONE=internal
11023fi
11024
11025
11026# Check whether --with-update-version was given.
11027if test "${with_update_version+set}" = set; then :
11028  withval=$with_update_version;
11029fi
11030
11031if test "x$with_update_version" = xyes; then
11032  as_fn_error $? "Update version must have a value" "$LINENO" 5
11033elif test "x$with_update_version" != x; then
11034  JDK_UPDATE_VERSION="$with_update_version"
11035fi
11036
11037
11038# Check whether --with-build-number was given.
11039if test "${with_build_number+set}" = set; then :
11040  withval=$with_build_number;
11041fi
11042
11043if test "x$with_build_number" = xyes; then
11044  as_fn_error $? "Build number must have a value" "$LINENO" 5
11045elif test "x$with_build_number" != x; then
11046  JDK_BUILD_NUMBER="$with_build_number"
11047fi
11048if test "x$JDK_BUILD_NUMBER" = x; then
11049  JDK_BUILD_NUMBER=b00
11050fi
11051
11052
11053# Check whether --with-user-release-suffix was given.
11054if test "${with_user_release_suffix+set}" = set; then :
11055  withval=$with_user_release_suffix;
11056fi
11057
11058if test "x$with_user_release_suffix" = xyes; then
11059  as_fn_error $? "Release suffix must have a value" "$LINENO" 5
11060elif test "x$with_user_release_suffix" != x; then
11061  USER_RELEASE_SUFFIX="$with_user_release_suffix"
11062else
11063  BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
11064  # Avoid [:alnum:] since it depends on the locale.
11065  CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvqxyz0123456789'`
11066  USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11067fi
11068
11069
11070# Now set the JDK version, milestone, build number etc.
11071
11072
11073
11074
11075
11076
11077
11078
11079
11080
11081
11082
11083
11084
11085COPYRIGHT_YEAR=`date +'%Y'`
11086
11087
11088if test "x$JDK_UPDATE_VERSION" != x; then
11089  JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
11090else
11091  JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
11092fi
11093
11094
11095COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
11096
11097
11098
11099###############################################################################
11100#
11101# Setup BootJDK, used to bootstrap the build.
11102#
11103###############################################################################
11104
11105
11106BOOT_JDK_FOUND=no
11107
11108# Check whether --with-boot-jdk was given.
11109if test "${with_boot_jdk+set}" = set; then :
11110  withval=$with_boot_jdk;
11111fi
11112
11113
11114# We look for the Boot JDK through various means, going from more certain to
11115# more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
11116# we detected something (if so, the path to the jdk is in BOOT_JDK). But we
11117# must check if this is indeed valid; otherwise we'll continue looking.
11118
11119# Test: Is bootjdk explicitely set by command line arguments?
11120
11121  if test "x$BOOT_JDK_FOUND" = xno; then
11122    # Now execute the test
11123
11124if test "x$with_boot_jdk" != x; then
11125    BOOT_JDK=$with_boot_jdk
11126    BOOT_JDK_FOUND=maybe
11127    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
11128$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
11129fi
11130
11131
11132    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11133    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11134      # Do we have a bin/java?
11135      if test ! -x "$BOOT_JDK/bin/java"; then
11136        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11137$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11138        BOOT_JDK_FOUND=no
11139      else
11140        # Do we have a bin/javac?
11141        if test ! -x "$BOOT_JDK/bin/javac"; then
11142          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11143$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11144          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11145$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11146          BOOT_JDK_FOUND=no
11147        else
11148          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11149          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11150            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11151$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11152            BOOT_JDK_FOUND=no
11153          else
11154            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11155            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11156
11157            # Extra M4 quote needed to protect [] in grep expression.
11158            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11159            if test "x$FOUND_VERSION_78" = x; then
11160              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11161$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11162              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11163$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11164              BOOT_JDK_FOUND=no
11165            else
11166              # We're done! :-)
11167              BOOT_JDK_FOUND=yes
11168
11169  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11170
11171  # Input might be given as Windows format, start by converting to
11172  # unix format.
11173  path="$BOOT_JDK"
11174  new_path=`$CYGPATH -u "$path"`
11175
11176  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11177  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11178  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11179  # "foo.exe" is OK but "foo" is an error.
11180  #
11181  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11182  # It is also a way to make sure we got the proper file name for the real test later on.
11183  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11184  if test "x$test_shortpath" = x; then
11185    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11186$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11187    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11188  fi
11189
11190  # Call helper function which possibly converts this using DOS-style short mode.
11191  # If so, the updated path is stored in $new_path.
11192
11193  input_path="$new_path"
11194  # Check if we need to convert this using DOS-style short mode. If the path
11195  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11196  # take no chances and rewrite it.
11197  # Note: m4 eats our [], so we need to use [ and ] instead.
11198  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11199  if test "x$has_forbidden_chars" != x; then
11200    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11201    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11202    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11203    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11204      # Going to short mode and back again did indeed matter. Since short mode is
11205      # case insensitive, let's make it lowercase to improve readability.
11206      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11207      # Now convert it back to Unix-stile (cygpath)
11208      input_path=`$CYGPATH -u "$shortmode_path"`
11209      new_path="$input_path"
11210    fi
11211  fi
11212
11213  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11214  if test "x$test_cygdrive_prefix" = x; then
11215    # As a simple fix, exclude /usr/bin since it's not a real path.
11216    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11217      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11218      # a path prefixed by /cygdrive for fixpath to work.
11219      new_path="$CYGWIN_ROOT_PATH$input_path"
11220    fi
11221  fi
11222
11223
11224  if test "x$path" != "x$new_path"; then
11225    BOOT_JDK="$new_path"
11226    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11227$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11228  fi
11229
11230  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11231
11232  path="$BOOT_JDK"
11233  has_colon=`$ECHO $path | $GREP ^.:`
11234  new_path="$path"
11235  if test "x$has_colon" = x; then
11236    # Not in mixed or Windows style, start by that.
11237    new_path=`cmd //c echo $path`
11238  fi
11239
11240
11241  input_path="$new_path"
11242  # Check if we need to convert this using DOS-style short mode. If the path
11243  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11244  # take no chances and rewrite it.
11245  # Note: m4 eats our [], so we need to use [ and ] instead.
11246  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11247  if test "x$has_forbidden_chars" != x; then
11248    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11249    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11250  fi
11251
11252
11253  windows_path="$new_path"
11254  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11255    unix_path=`$CYGPATH -u "$windows_path"`
11256    new_path="$unix_path"
11257  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11258    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11259    new_path="$unix_path"
11260  fi
11261
11262  if test "x$path" != "x$new_path"; then
11263    BOOT_JDK="$new_path"
11264    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11265$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11266  fi
11267
11268  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11269  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11270
11271  else
11272    # We're on a posix platform. Hooray! :)
11273    path="$BOOT_JDK"
11274    has_space=`$ECHO "$path" | $GREP " "`
11275    if test "x$has_space" != x; then
11276      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11277$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11278      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11279    fi
11280
11281    # Use eval to expand a potential ~
11282    eval path="$path"
11283    if test ! -f "$path" && test ! -d "$path"; then
11284      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11285    fi
11286
11287    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
11288  fi
11289
11290              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11291$as_echo_n "checking for Boot JDK... " >&6; }
11292              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11293$as_echo "$BOOT_JDK" >&6; }
11294              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11295$as_echo_n "checking Boot JDK version... " >&6; }
11296              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11297              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11298$as_echo "$BOOT_JDK_VERSION" >&6; }
11299            fi # end check jdk version
11300          fi # end check rt.jar
11301        fi # end check javac
11302      fi # end check java
11303    fi # end check boot jdk found
11304  fi
11305
11306if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
11307  # Having specified an argument which is incorrect will produce an instant failure;
11308  # we should not go on looking
11309  as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
11310fi
11311
11312# Test: Is bootjdk available from builddeps?
11313
11314  if test "x$BOOT_JDK_FOUND" = xno; then
11315    # Now execute the test
11316
11317
11318
11319    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
11320        # Source the builddeps file again, to make sure it uses the latest variables!
11321        . $builddepsfile
11322        # Look for a target and build machine specific resource!
11323        eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
11324        if test "x$resource" = x; then
11325            # Ok, lets instead look for a target specific resource
11326            eval resource=\${builddep_bootjdk_TARGET_${rewritten_target_var}}
11327        fi
11328        if test "x$resource" = x; then
11329            # Ok, lets instead look for a build specific resource
11330            eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}}
11331        fi
11332        if test "x$resource" = x; then
11333            # Ok, lets instead look for a generic resource
11334            # (The bootjdk comes from M4 and not the shell, thus no need for eval here.)
11335            resource=${builddep_bootjdk}
11336        fi
11337        if test "x$resource" != x; then
11338            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for bootjdk" >&5
11339$as_echo "$as_me: Using builddeps $resource for bootjdk" >&6;}
11340	    # If the resource in the builddeps.conf file is an existing directory,
11341	    # for example /java/linux/cups
11342	    if test -d ${resource}; then
11343	       depdir=${resource}
11344	    else
11345
11346# bootjdk is for example mymodule
11347# $resource is for example libs/general/libmymod_1_2_3.zip
11348# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
11349# $with_builddeps_dir is for example /localhome/builddeps
11350# depdir is the name of the variable into which we store the depdir, eg MYMOD
11351# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
11352# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
11353    filename=`basename $resource`
11354    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
11355    filebase=${filename%%.*}
11356    extension=${filename#*.}
11357    installdir=$with_builddeps_dir/$filebase
11358    if test ! -f $installdir/$filename.unpacked; then
11359        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&5
11360$as_echo "$as_me: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&6;}
11361        if test ! -d $installdir; then
11362            mkdir -p $installdir
11363        fi
11364        if test ! -d $installdir; then
11365            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
11366        fi
11367        tmpfile=`mktemp $installdir/bootjdk.XXXXXXXXX`
11368        touch $tmpfile
11369        if test ! -f $tmpfile; then
11370            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
11371        fi
11372
11373    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
11374    # $tmpfile is the local file name for the downloaded file.
11375    VALID_TOOL=no
11376    if test "x$BDEPS_FTP" = xwget; then
11377       VALID_TOOL=yes
11378       wget -O $tmpfile $with_builddeps_server/$resource
11379    fi
11380    if test "x$BDEPS_FTP" = xlftp; then
11381       VALID_TOOL=yes
11382       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
11383    fi
11384    if test "x$BDEPS_FTP" = xftp; then
11385        VALID_TOOL=yes
11386        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
11387        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
11388        FTPUSERPWD=${FTPSERVER%%@*}
11389        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
11390            FTPUSER=${userpwd%%:*}
11391            FTPPWD=${userpwd#*@}
11392            FTPSERVER=${FTPSERVER#*@}
11393        else
11394            FTPUSER=ftp
11395            FTPPWD=ftp
11396        fi
11397        # the "pass" command does not work on some
11398        # ftp clients (read ftp.exe) but if it works,
11399        # passive mode is better!
11400        (\
11401            echo "user $FTPUSER $FTPPWD"        ;\
11402            echo "pass"                         ;\
11403            echo "bin"                          ;\
11404            echo "get $FTPPATH $tmpfile"              ;\
11405        ) | ftp -in $FTPSERVER
11406    fi
11407    if test "x$VALID_TOOL" != xyes; then
11408       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
11409    fi
11410
11411        mv $tmpfile $installdir/$filename
11412        if test ! -s $installdir/$filename; then
11413            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
11414        fi
11415        case "$extension" in
11416            zip)  echo "Unzipping $installdir/$filename..."
11417               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
11418            ;;
11419            tar.gz) echo "Untaring $installdir/$filename..."
11420               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
11421            ;;
11422            tgz) echo "Untaring $installdir/$filename..."
11423               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
11424            ;;
11425            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
11426            ;;
11427        esac
11428    fi
11429    if test -f $installdir/$filename.unpacked; then
11430        depdir=$installdir
11431    fi
11432
11433	    fi
11434            # Source the builddeps file again, because in the previous command, the depdir
11435            # was updated to point at the current build dependency install directory.
11436            . $builddepsfile
11437            # Now extract variables from the builddeps.conf files.
11438            theroot=${builddep_bootjdk_ROOT}
11439            thecflags=${builddep_bootjdk_CFLAGS}
11440            thelibs=${builddep_bootjdk_LIBS}
11441            if test "x$depdir" = x; then
11442                as_fn_error $? "Could not download build dependency bootjdk" "$LINENO" 5
11443            fi
11444            BOOT_JDK=$depdir
11445            if test "x$theroot" != x; then
11446               BOOT_JDK="$theroot"
11447            fi
11448            if test "x$thecflags" != x; then
11449               BOOT_JDK_CFLAGS="$thecflags"
11450            fi
11451            if test "x$thelibs" != x; then
11452               BOOT_JDK_LIBS="$thelibs"
11453            fi
11454            BOOT_JDK_FOUND=maybe
11455            else BOOT_JDK_FOUND=no
11456
11457        fi
11458        else BOOT_JDK_FOUND=no
11459
11460    fi
11461
11462
11463
11464    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11465    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11466      # Do we have a bin/java?
11467      if test ! -x "$BOOT_JDK/bin/java"; then
11468        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11469$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11470        BOOT_JDK_FOUND=no
11471      else
11472        # Do we have a bin/javac?
11473        if test ! -x "$BOOT_JDK/bin/javac"; then
11474          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11475$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11476          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11477$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11478          BOOT_JDK_FOUND=no
11479        else
11480          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11481          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11482            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11483$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11484            BOOT_JDK_FOUND=no
11485          else
11486            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11487            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11488
11489            # Extra M4 quote needed to protect [] in grep expression.
11490            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11491            if test "x$FOUND_VERSION_78" = x; then
11492              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11493$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11494              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11495$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11496              BOOT_JDK_FOUND=no
11497            else
11498              # We're done! :-)
11499              BOOT_JDK_FOUND=yes
11500
11501  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11502
11503  # Input might be given as Windows format, start by converting to
11504  # unix format.
11505  path="$BOOT_JDK"
11506  new_path=`$CYGPATH -u "$path"`
11507
11508  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11509  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11510  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11511  # "foo.exe" is OK but "foo" is an error.
11512  #
11513  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11514  # It is also a way to make sure we got the proper file name for the real test later on.
11515  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11516  if test "x$test_shortpath" = x; then
11517    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11518$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11519    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11520  fi
11521
11522  # Call helper function which possibly converts this using DOS-style short mode.
11523  # If so, the updated path is stored in $new_path.
11524
11525  input_path="$new_path"
11526  # Check if we need to convert this using DOS-style short mode. If the path
11527  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11528  # take no chances and rewrite it.
11529  # Note: m4 eats our [], so we need to use [ and ] instead.
11530  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11531  if test "x$has_forbidden_chars" != x; then
11532    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11533    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11534    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11535    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11536      # Going to short mode and back again did indeed matter. Since short mode is
11537      # case insensitive, let's make it lowercase to improve readability.
11538      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11539      # Now convert it back to Unix-stile (cygpath)
11540      input_path=`$CYGPATH -u "$shortmode_path"`
11541      new_path="$input_path"
11542    fi
11543  fi
11544
11545  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11546  if test "x$test_cygdrive_prefix" = x; then
11547    # As a simple fix, exclude /usr/bin since it's not a real path.
11548    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11549      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11550      # a path prefixed by /cygdrive for fixpath to work.
11551      new_path="$CYGWIN_ROOT_PATH$input_path"
11552    fi
11553  fi
11554
11555
11556  if test "x$path" != "x$new_path"; then
11557    BOOT_JDK="$new_path"
11558    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11559$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11560  fi
11561
11562  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11563
11564  path="$BOOT_JDK"
11565  has_colon=`$ECHO $path | $GREP ^.:`
11566  new_path="$path"
11567  if test "x$has_colon" = x; then
11568    # Not in mixed or Windows style, start by that.
11569    new_path=`cmd //c echo $path`
11570  fi
11571
11572
11573  input_path="$new_path"
11574  # Check if we need to convert this using DOS-style short mode. If the path
11575  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11576  # take no chances and rewrite it.
11577  # Note: m4 eats our [], so we need to use [ and ] instead.
11578  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11579  if test "x$has_forbidden_chars" != x; then
11580    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11581    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11582  fi
11583
11584
11585  windows_path="$new_path"
11586  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11587    unix_path=`$CYGPATH -u "$windows_path"`
11588    new_path="$unix_path"
11589  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11590    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11591    new_path="$unix_path"
11592  fi
11593
11594  if test "x$path" != "x$new_path"; then
11595    BOOT_JDK="$new_path"
11596    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11597$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11598  fi
11599
11600  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11601  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11602
11603  else
11604    # We're on a posix platform. Hooray! :)
11605    path="$BOOT_JDK"
11606    has_space=`$ECHO "$path" | $GREP " "`
11607    if test "x$has_space" != x; then
11608      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11609$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11610      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11611    fi
11612
11613    # Use eval to expand a potential ~
11614    eval path="$path"
11615    if test ! -f "$path" && test ! -d "$path"; then
11616      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11617    fi
11618
11619    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
11620  fi
11621
11622              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11623$as_echo_n "checking for Boot JDK... " >&6; }
11624              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11625$as_echo "$BOOT_JDK" >&6; }
11626              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11627$as_echo_n "checking Boot JDK version... " >&6; }
11628              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11629              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11630$as_echo "$BOOT_JDK_VERSION" >&6; }
11631            fi # end check jdk version
11632          fi # end check rt.jar
11633        fi # end check javac
11634      fi # end check java
11635    fi # end check boot jdk found
11636  fi
11637
11638
11639# Test: Is $JAVA_HOME set?
11640
11641  if test "x$BOOT_JDK_FOUND" = xno; then
11642    # Now execute the test
11643
11644    if test "x$JAVA_HOME" != x; then
11645        JAVA_HOME_PROCESSED="$JAVA_HOME"
11646
11647  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11648
11649  # Input might be given as Windows format, start by converting to
11650  # unix format.
11651  path="$JAVA_HOME_PROCESSED"
11652  new_path=`$CYGPATH -u "$path"`
11653
11654  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11655  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11656  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11657  # "foo.exe" is OK but "foo" is an error.
11658  #
11659  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11660  # It is also a way to make sure we got the proper file name for the real test later on.
11661  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11662  if test "x$test_shortpath" = x; then
11663    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
11664$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
11665    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
11666  fi
11667
11668  # Call helper function which possibly converts this using DOS-style short mode.
11669  # If so, the updated path is stored in $new_path.
11670
11671  input_path="$new_path"
11672  # Check if we need to convert this using DOS-style short mode. If the path
11673  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11674  # take no chances and rewrite it.
11675  # Note: m4 eats our [], so we need to use [ and ] instead.
11676  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11677  if test "x$has_forbidden_chars" != x; then
11678    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11679    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11680    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11681    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11682      # Going to short mode and back again did indeed matter. Since short mode is
11683      # case insensitive, let's make it lowercase to improve readability.
11684      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11685      # Now convert it back to Unix-stile (cygpath)
11686      input_path=`$CYGPATH -u "$shortmode_path"`
11687      new_path="$input_path"
11688    fi
11689  fi
11690
11691  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11692  if test "x$test_cygdrive_prefix" = x; then
11693    # As a simple fix, exclude /usr/bin since it's not a real path.
11694    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11695      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11696      # a path prefixed by /cygdrive for fixpath to work.
11697      new_path="$CYGWIN_ROOT_PATH$input_path"
11698    fi
11699  fi
11700
11701
11702  if test "x$path" != "x$new_path"; then
11703    JAVA_HOME_PROCESSED="$new_path"
11704    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
11705$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
11706  fi
11707
11708  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11709
11710  path="$JAVA_HOME_PROCESSED"
11711  has_colon=`$ECHO $path | $GREP ^.:`
11712  new_path="$path"
11713  if test "x$has_colon" = x; then
11714    # Not in mixed or Windows style, start by that.
11715    new_path=`cmd //c echo $path`
11716  fi
11717
11718
11719  input_path="$new_path"
11720  # Check if we need to convert this using DOS-style short mode. If the path
11721  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11722  # take no chances and rewrite it.
11723  # Note: m4 eats our [], so we need to use [ and ] instead.
11724  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11725  if test "x$has_forbidden_chars" != x; then
11726    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11727    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11728  fi
11729
11730
11731  windows_path="$new_path"
11732  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11733    unix_path=`$CYGPATH -u "$windows_path"`
11734    new_path="$unix_path"
11735  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11736    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11737    new_path="$unix_path"
11738  fi
11739
11740  if test "x$path" != "x$new_path"; then
11741    JAVA_HOME_PROCESSED="$new_path"
11742    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
11743$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
11744  fi
11745
11746  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11747  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11748
11749  else
11750    # We're on a posix platform. Hooray! :)
11751    path="$JAVA_HOME_PROCESSED"
11752    has_space=`$ECHO "$path" | $GREP " "`
11753    if test "x$has_space" != x; then
11754      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
11755$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
11756      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11757    fi
11758
11759    # Use eval to expand a potential ~
11760    eval path="$path"
11761    if test ! -f "$path" && test ! -d "$path"; then
11762      as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
11763    fi
11764
11765    JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
11766  fi
11767
11768        if test ! -d "$JAVA_HOME_PROCESSED"; then
11769            { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
11770$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
11771        else
11772          # Aha, the user has set a JAVA_HOME
11773          # let us use that as the Boot JDK.
11774          BOOT_JDK="$JAVA_HOME_PROCESSED"
11775          BOOT_JDK_FOUND=maybe
11776          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
11777$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
11778        fi
11779    fi
11780
11781
11782    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11783    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11784      # Do we have a bin/java?
11785      if test ! -x "$BOOT_JDK/bin/java"; then
11786        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11787$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11788        BOOT_JDK_FOUND=no
11789      else
11790        # Do we have a bin/javac?
11791        if test ! -x "$BOOT_JDK/bin/javac"; then
11792          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11793$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11794          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11795$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11796          BOOT_JDK_FOUND=no
11797        else
11798          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11799          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11800            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11801$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11802            BOOT_JDK_FOUND=no
11803          else
11804            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11805            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11806
11807            # Extra M4 quote needed to protect [] in grep expression.
11808            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11809            if test "x$FOUND_VERSION_78" = x; then
11810              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11811$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11812              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11813$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11814              BOOT_JDK_FOUND=no
11815            else
11816              # We're done! :-)
11817              BOOT_JDK_FOUND=yes
11818
11819  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11820
11821  # Input might be given as Windows format, start by converting to
11822  # unix format.
11823  path="$BOOT_JDK"
11824  new_path=`$CYGPATH -u "$path"`
11825
11826  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11827  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11828  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11829  # "foo.exe" is OK but "foo" is an error.
11830  #
11831  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11832  # It is also a way to make sure we got the proper file name for the real test later on.
11833  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11834  if test "x$test_shortpath" = x; then
11835    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11836$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11837    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11838  fi
11839
11840  # Call helper function which possibly converts this using DOS-style short mode.
11841  # If so, the updated path is stored in $new_path.
11842
11843  input_path="$new_path"
11844  # Check if we need to convert this using DOS-style short mode. If the path
11845  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11846  # take no chances and rewrite it.
11847  # Note: m4 eats our [], so we need to use [ and ] instead.
11848  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11849  if test "x$has_forbidden_chars" != x; then
11850    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11851    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11852    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11853    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11854      # Going to short mode and back again did indeed matter. Since short mode is
11855      # case insensitive, let's make it lowercase to improve readability.
11856      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11857      # Now convert it back to Unix-stile (cygpath)
11858      input_path=`$CYGPATH -u "$shortmode_path"`
11859      new_path="$input_path"
11860    fi
11861  fi
11862
11863  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11864  if test "x$test_cygdrive_prefix" = x; then
11865    # As a simple fix, exclude /usr/bin since it's not a real path.
11866    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11867      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11868      # a path prefixed by /cygdrive for fixpath to work.
11869      new_path="$CYGWIN_ROOT_PATH$input_path"
11870    fi
11871  fi
11872
11873
11874  if test "x$path" != "x$new_path"; then
11875    BOOT_JDK="$new_path"
11876    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11877$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11878  fi
11879
11880  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11881
11882  path="$BOOT_JDK"
11883  has_colon=`$ECHO $path | $GREP ^.:`
11884  new_path="$path"
11885  if test "x$has_colon" = x; then
11886    # Not in mixed or Windows style, start by that.
11887    new_path=`cmd //c echo $path`
11888  fi
11889
11890
11891  input_path="$new_path"
11892  # Check if we need to convert this using DOS-style short mode. If the path
11893  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11894  # take no chances and rewrite it.
11895  # Note: m4 eats our [], so we need to use [ and ] instead.
11896  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11897  if test "x$has_forbidden_chars" != x; then
11898    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11899    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11900  fi
11901
11902
11903  windows_path="$new_path"
11904  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11905    unix_path=`$CYGPATH -u "$windows_path"`
11906    new_path="$unix_path"
11907  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11908    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11909    new_path="$unix_path"
11910  fi
11911
11912  if test "x$path" != "x$new_path"; then
11913    BOOT_JDK="$new_path"
11914    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11915$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11916  fi
11917
11918  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11919  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11920
11921  else
11922    # We're on a posix platform. Hooray! :)
11923    path="$BOOT_JDK"
11924    has_space=`$ECHO "$path" | $GREP " "`
11925    if test "x$has_space" != x; then
11926      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11927$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11928      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11929    fi
11930
11931    # Use eval to expand a potential ~
11932    eval path="$path"
11933    if test ! -f "$path" && test ! -d "$path"; then
11934      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11935    fi
11936
11937    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
11938  fi
11939
11940              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11941$as_echo_n "checking for Boot JDK... " >&6; }
11942              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11943$as_echo "$BOOT_JDK" >&6; }
11944              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11945$as_echo_n "checking Boot JDK version... " >&6; }
11946              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11947              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11948$as_echo "$BOOT_JDK_VERSION" >&6; }
11949            fi # end check jdk version
11950          fi # end check rt.jar
11951        fi # end check javac
11952      fi # end check java
11953    fi # end check boot jdk found
11954  fi
11955
11956
11957# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
11958
11959  if test "x$BOOT_JDK_FOUND" = xno; then
11960    # Now execute the test
11961
11962    if test -x /usr/libexec/java_home; then
11963        BOOT_JDK=`/usr/libexec/java_home`
11964        BOOT_JDK_FOUND=maybe
11965        { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home" >&5
11966$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home" >&6;}
11967    fi
11968
11969
11970    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11971    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11972      # Do we have a bin/java?
11973      if test ! -x "$BOOT_JDK/bin/java"; then
11974        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11975$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11976        BOOT_JDK_FOUND=no
11977      else
11978        # Do we have a bin/javac?
11979        if test ! -x "$BOOT_JDK/bin/javac"; then
11980          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11981$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11982          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11983$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11984          BOOT_JDK_FOUND=no
11985        else
11986          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11987          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11988            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11989$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11990            BOOT_JDK_FOUND=no
11991          else
11992            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11993            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11994
11995            # Extra M4 quote needed to protect [] in grep expression.
11996            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11997            if test "x$FOUND_VERSION_78" = x; then
11998              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11999$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12000              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12001$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12002              BOOT_JDK_FOUND=no
12003            else
12004              # We're done! :-)
12005              BOOT_JDK_FOUND=yes
12006
12007  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12008
12009  # Input might be given as Windows format, start by converting to
12010  # unix format.
12011  path="$BOOT_JDK"
12012  new_path=`$CYGPATH -u "$path"`
12013
12014  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12015  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12016  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12017  # "foo.exe" is OK but "foo" is an error.
12018  #
12019  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12020  # It is also a way to make sure we got the proper file name for the real test later on.
12021  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12022  if test "x$test_shortpath" = x; then
12023    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12024$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12025    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12026  fi
12027
12028  # Call helper function which possibly converts this using DOS-style short mode.
12029  # If so, the updated path is stored in $new_path.
12030
12031  input_path="$new_path"
12032  # Check if we need to convert this using DOS-style short mode. If the path
12033  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12034  # take no chances and rewrite it.
12035  # Note: m4 eats our [], so we need to use [ and ] instead.
12036  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12037  if test "x$has_forbidden_chars" != x; then
12038    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12039    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12040    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12041    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12042      # Going to short mode and back again did indeed matter. Since short mode is
12043      # case insensitive, let's make it lowercase to improve readability.
12044      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12045      # Now convert it back to Unix-stile (cygpath)
12046      input_path=`$CYGPATH -u "$shortmode_path"`
12047      new_path="$input_path"
12048    fi
12049  fi
12050
12051  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12052  if test "x$test_cygdrive_prefix" = x; then
12053    # As a simple fix, exclude /usr/bin since it's not a real path.
12054    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12055      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12056      # a path prefixed by /cygdrive for fixpath to work.
12057      new_path="$CYGWIN_ROOT_PATH$input_path"
12058    fi
12059  fi
12060
12061
12062  if test "x$path" != "x$new_path"; then
12063    BOOT_JDK="$new_path"
12064    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12065$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12066  fi
12067
12068  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12069
12070  path="$BOOT_JDK"
12071  has_colon=`$ECHO $path | $GREP ^.:`
12072  new_path="$path"
12073  if test "x$has_colon" = x; then
12074    # Not in mixed or Windows style, start by that.
12075    new_path=`cmd //c echo $path`
12076  fi
12077
12078
12079  input_path="$new_path"
12080  # Check if we need to convert this using DOS-style short mode. If the path
12081  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12082  # take no chances and rewrite it.
12083  # Note: m4 eats our [], so we need to use [ and ] instead.
12084  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12085  if test "x$has_forbidden_chars" != x; then
12086    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12087    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12088  fi
12089
12090
12091  windows_path="$new_path"
12092  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12093    unix_path=`$CYGPATH -u "$windows_path"`
12094    new_path="$unix_path"
12095  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12096    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12097    new_path="$unix_path"
12098  fi
12099
12100  if test "x$path" != "x$new_path"; then
12101    BOOT_JDK="$new_path"
12102    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12103$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12104  fi
12105
12106  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12107  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12108
12109  else
12110    # We're on a posix platform. Hooray! :)
12111    path="$BOOT_JDK"
12112    has_space=`$ECHO "$path" | $GREP " "`
12113    if test "x$has_space" != x; then
12114      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12115$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12116      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12117    fi
12118
12119    # Use eval to expand a potential ~
12120    eval path="$path"
12121    if test ! -f "$path" && test ! -d "$path"; then
12122      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12123    fi
12124
12125    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
12126  fi
12127
12128              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12129$as_echo_n "checking for Boot JDK... " >&6; }
12130              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12131$as_echo "$BOOT_JDK" >&6; }
12132              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12133$as_echo_n "checking Boot JDK version... " >&6; }
12134              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12135              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12136$as_echo "$BOOT_JDK_VERSION" >&6; }
12137            fi # end check jdk version
12138          fi # end check rt.jar
12139        fi # end check javac
12140      fi # end check java
12141    fi # end check boot jdk found
12142  fi
12143
12144
12145# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
12146
12147  if test "x$BOOT_JDK_FOUND" = xno; then
12148    # Now execute the test
12149
12150    # Extract the first word of "javac", so it can be a program name with args.
12151set dummy javac; ac_word=$2
12152{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12153$as_echo_n "checking for $ac_word... " >&6; }
12154if ${ac_cv_path_JAVAC_CHECK+:} false; then :
12155  $as_echo_n "(cached) " >&6
12156else
12157  case $JAVAC_CHECK in
12158  [\\/]* | ?:[\\/]*)
12159  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
12160  ;;
12161  *)
12162  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12163for as_dir in $PATH
12164do
12165  IFS=$as_save_IFS
12166  test -z "$as_dir" && as_dir=.
12167    for ac_exec_ext in '' $ac_executable_extensions; do
12168  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12169    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
12170    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12171    break 2
12172  fi
12173done
12174  done
12175IFS=$as_save_IFS
12176
12177  ;;
12178esac
12179fi
12180JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
12181if test -n "$JAVAC_CHECK"; then
12182  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
12183$as_echo "$JAVAC_CHECK" >&6; }
12184else
12185  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12186$as_echo "no" >&6; }
12187fi
12188
12189
12190    # Extract the first word of "java", so it can be a program name with args.
12191set dummy java; ac_word=$2
12192{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12193$as_echo_n "checking for $ac_word... " >&6; }
12194if ${ac_cv_path_JAVA_CHECK+:} false; then :
12195  $as_echo_n "(cached) " >&6
12196else
12197  case $JAVA_CHECK in
12198  [\\/]* | ?:[\\/]*)
12199  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
12200  ;;
12201  *)
12202  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12203for as_dir in $PATH
12204do
12205  IFS=$as_save_IFS
12206  test -z "$as_dir" && as_dir=.
12207    for ac_exec_ext in '' $ac_executable_extensions; do
12208  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12209    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
12210    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12211    break 2
12212  fi
12213done
12214  done
12215IFS=$as_save_IFS
12216
12217  ;;
12218esac
12219fi
12220JAVA_CHECK=$ac_cv_path_JAVA_CHECK
12221if test -n "$JAVA_CHECK"; then
12222  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
12223$as_echo "$JAVA_CHECK" >&6; }
12224else
12225  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12226$as_echo "no" >&6; }
12227fi
12228
12229
12230    BINARY="$JAVAC_CHECK"
12231    if test "x$JAVAC_CHECK" = x; then
12232        BINARY="$JAVA_CHECK"
12233    fi
12234    if test "x$BINARY" != x; then
12235        # So there is a java(c) binary, it might be part of a JDK.
12236        # Lets find the JDK/JRE directory by following symbolic links.
12237        # Linux/GNU systems often have links from /usr/bin/java to
12238        # /etc/alternatives/java to the real JDK binary.
12239
12240    if test "x$OPENJDK_BUILD_OS" != xwindows; then
12241        # Follow a chain of symbolic links. Use readlink
12242        # where it exists, else fall back to horribly
12243        # complicated shell code.
12244        if test "x$READLINK_TESTED" != yes; then
12245            # On MacOSX there is a readlink tool with a different
12246            # purpose than the GNU readlink tool. Check the found readlink.
12247            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
12248            if test "x$ISGNU" = x; then
12249                 # A readlink that we do not know how to use.
12250                 # Are there other non-GNU readlinks out there?
12251                 READLINK_TESTED=yes
12252                 READLINK=
12253            fi
12254        fi
12255
12256        if test "x$READLINK" != x; then
12257            BINARY=`$READLINK -f $BINARY`
12258        else
12259            # Save the current directory for restoring afterwards
12260            STARTDIR=$PWD
12261            COUNTER=0
12262            sym_link_dir=`$DIRNAME $BINARY`
12263            sym_link_file=`$BASENAME $BINARY`
12264            cd $sym_link_dir
12265            # Use -P flag to resolve symlinks in directories.
12266            cd `$THEPWDCMD -P`
12267            sym_link_dir=`$THEPWDCMD -P`
12268            # Resolve file symlinks
12269            while test $COUNTER -lt 20; do
12270                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
12271                if test "x$ISLINK" == x; then
12272                    # This is not a symbolic link! We are done!
12273                    break
12274                fi
12275                # Again resolve directory symlinks since the target of the just found
12276                # link could be in a different directory
12277                cd `$DIRNAME $ISLINK`
12278                sym_link_dir=`$THEPWDCMD -P`
12279                sym_link_file=`$BASENAME $ISLINK`
12280                let COUNTER=COUNTER+1
12281            done
12282            cd $STARTDIR
12283            BINARY=$sym_link_dir/$sym_link_file
12284        fi
12285    fi
12286
12287        BOOT_JDK=`dirname "$BINARY"`
12288        BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
12289        if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
12290            # Looks like we found ourselves an JDK
12291            BOOT_JDK_FOUND=maybe
12292            { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
12293$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
12294        fi
12295    fi
12296
12297
12298    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12299    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12300      # Do we have a bin/java?
12301      if test ! -x "$BOOT_JDK/bin/java"; then
12302        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12303$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12304        BOOT_JDK_FOUND=no
12305      else
12306        # Do we have a bin/javac?
12307        if test ! -x "$BOOT_JDK/bin/javac"; then
12308          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12309$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12310          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12311$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12312          BOOT_JDK_FOUND=no
12313        else
12314          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12315          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12316            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12317$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12318            BOOT_JDK_FOUND=no
12319          else
12320            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12321            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12322
12323            # Extra M4 quote needed to protect [] in grep expression.
12324            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12325            if test "x$FOUND_VERSION_78" = x; then
12326              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12327$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12328              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12329$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12330              BOOT_JDK_FOUND=no
12331            else
12332              # We're done! :-)
12333              BOOT_JDK_FOUND=yes
12334
12335  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12336
12337  # Input might be given as Windows format, start by converting to
12338  # unix format.
12339  path="$BOOT_JDK"
12340  new_path=`$CYGPATH -u "$path"`
12341
12342  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12343  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12344  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12345  # "foo.exe" is OK but "foo" is an error.
12346  #
12347  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12348  # It is also a way to make sure we got the proper file name for the real test later on.
12349  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12350  if test "x$test_shortpath" = x; then
12351    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12352$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12353    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12354  fi
12355
12356  # Call helper function which possibly converts this using DOS-style short mode.
12357  # If so, the updated path is stored in $new_path.
12358
12359  input_path="$new_path"
12360  # Check if we need to convert this using DOS-style short mode. If the path
12361  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12362  # take no chances and rewrite it.
12363  # Note: m4 eats our [], so we need to use [ and ] instead.
12364  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12365  if test "x$has_forbidden_chars" != x; then
12366    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12367    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12368    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12369    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12370      # Going to short mode and back again did indeed matter. Since short mode is
12371      # case insensitive, let's make it lowercase to improve readability.
12372      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12373      # Now convert it back to Unix-stile (cygpath)
12374      input_path=`$CYGPATH -u "$shortmode_path"`
12375      new_path="$input_path"
12376    fi
12377  fi
12378
12379  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12380  if test "x$test_cygdrive_prefix" = x; then
12381    # As a simple fix, exclude /usr/bin since it's not a real path.
12382    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12383      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12384      # a path prefixed by /cygdrive for fixpath to work.
12385      new_path="$CYGWIN_ROOT_PATH$input_path"
12386    fi
12387  fi
12388
12389
12390  if test "x$path" != "x$new_path"; then
12391    BOOT_JDK="$new_path"
12392    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12393$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12394  fi
12395
12396  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12397
12398  path="$BOOT_JDK"
12399  has_colon=`$ECHO $path | $GREP ^.:`
12400  new_path="$path"
12401  if test "x$has_colon" = x; then
12402    # Not in mixed or Windows style, start by that.
12403    new_path=`cmd //c echo $path`
12404  fi
12405
12406
12407  input_path="$new_path"
12408  # Check if we need to convert this using DOS-style short mode. If the path
12409  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12410  # take no chances and rewrite it.
12411  # Note: m4 eats our [], so we need to use [ and ] instead.
12412  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12413  if test "x$has_forbidden_chars" != x; then
12414    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12415    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12416  fi
12417
12418
12419  windows_path="$new_path"
12420  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12421    unix_path=`$CYGPATH -u "$windows_path"`
12422    new_path="$unix_path"
12423  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12424    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12425    new_path="$unix_path"
12426  fi
12427
12428  if test "x$path" != "x$new_path"; then
12429    BOOT_JDK="$new_path"
12430    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12431$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12432  fi
12433
12434  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12435  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12436
12437  else
12438    # We're on a posix platform. Hooray! :)
12439    path="$BOOT_JDK"
12440    has_space=`$ECHO "$path" | $GREP " "`
12441    if test "x$has_space" != x; then
12442      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12443$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12444      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12445    fi
12446
12447    # Use eval to expand a potential ~
12448    eval path="$path"
12449    if test ! -f "$path" && test ! -d "$path"; then
12450      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12451    fi
12452
12453    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
12454  fi
12455
12456              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12457$as_echo_n "checking for Boot JDK... " >&6; }
12458              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12459$as_echo "$BOOT_JDK" >&6; }
12460              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12461$as_echo_n "checking Boot JDK version... " >&6; }
12462              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12463              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12464$as_echo "$BOOT_JDK_VERSION" >&6; }
12465            fi # end check jdk version
12466          fi # end check rt.jar
12467        fi # end check javac
12468      fi # end check java
12469    fi # end check boot jdk found
12470  fi
12471
12472
12473# Test: Is there a JDK installed in default, well-known locations?
12474
12475  if test "x$BOOT_JDK_FOUND" = xno; then
12476    # Now execute the test
12477
12478  if test "x$OPENJDK_TARGET_OS" = xwindows; then
12479
12480  if test "x$BOOT_JDK_FOUND" = xno; then
12481    # Now execute the test
12482
12483  if test "x$ProgramW6432" != x; then
12484    VIRTUAL_DIR="$ProgramW6432/Java"
12485
12486  windows_path="$VIRTUAL_DIR"
12487  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12488    unix_path=`$CYGPATH -u "$windows_path"`
12489    VIRTUAL_DIR="$unix_path"
12490  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12491    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12492    VIRTUAL_DIR="$unix_path"
12493  fi
12494
12495
12496  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
12497  BOOT_JDK_SUFFIX=""
12498  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
12499  if test "x$ALL_JDKS_FOUND" != x; then
12500    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
12501
12502  if test "x$BOOT_JDK_FOUND" = xno; then
12503    # Now execute the test
12504
12505        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
12506        if test -d "$BOOT_JDK"; then
12507          BOOT_JDK_FOUND=maybe
12508          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
12509$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
12510        fi
12511
12512
12513    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12514    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12515      # Do we have a bin/java?
12516      if test ! -x "$BOOT_JDK/bin/java"; then
12517        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12518$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12519        BOOT_JDK_FOUND=no
12520      else
12521        # Do we have a bin/javac?
12522        if test ! -x "$BOOT_JDK/bin/javac"; then
12523          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12524$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12525          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12526$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12527          BOOT_JDK_FOUND=no
12528        else
12529          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12530          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12531            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12532$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12533            BOOT_JDK_FOUND=no
12534          else
12535            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12536            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12537
12538            # Extra M4 quote needed to protect [] in grep expression.
12539            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12540            if test "x$FOUND_VERSION_78" = x; then
12541              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12542$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12543              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12544$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12545              BOOT_JDK_FOUND=no
12546            else
12547              # We're done! :-)
12548              BOOT_JDK_FOUND=yes
12549
12550  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12551
12552  # Input might be given as Windows format, start by converting to
12553  # unix format.
12554  path="$BOOT_JDK"
12555  new_path=`$CYGPATH -u "$path"`
12556
12557  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12558  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12559  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12560  # "foo.exe" is OK but "foo" is an error.
12561  #
12562  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12563  # It is also a way to make sure we got the proper file name for the real test later on.
12564  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12565  if test "x$test_shortpath" = x; then
12566    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12567$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12568    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12569  fi
12570
12571  # Call helper function which possibly converts this using DOS-style short mode.
12572  # If so, the updated path is stored in $new_path.
12573
12574  input_path="$new_path"
12575  # Check if we need to convert this using DOS-style short mode. If the path
12576  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12577  # take no chances and rewrite it.
12578  # Note: m4 eats our [], so we need to use [ and ] instead.
12579  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12580  if test "x$has_forbidden_chars" != x; then
12581    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12582    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12583    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12584    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12585      # Going to short mode and back again did indeed matter. Since short mode is
12586      # case insensitive, let's make it lowercase to improve readability.
12587      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12588      # Now convert it back to Unix-stile (cygpath)
12589      input_path=`$CYGPATH -u "$shortmode_path"`
12590      new_path="$input_path"
12591    fi
12592  fi
12593
12594  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12595  if test "x$test_cygdrive_prefix" = x; then
12596    # As a simple fix, exclude /usr/bin since it's not a real path.
12597    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12598      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12599      # a path prefixed by /cygdrive for fixpath to work.
12600      new_path="$CYGWIN_ROOT_PATH$input_path"
12601    fi
12602  fi
12603
12604
12605  if test "x$path" != "x$new_path"; then
12606    BOOT_JDK="$new_path"
12607    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12608$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12609  fi
12610
12611  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12612
12613  path="$BOOT_JDK"
12614  has_colon=`$ECHO $path | $GREP ^.:`
12615  new_path="$path"
12616  if test "x$has_colon" = x; then
12617    # Not in mixed or Windows style, start by that.
12618    new_path=`cmd //c echo $path`
12619  fi
12620
12621
12622  input_path="$new_path"
12623  # Check if we need to convert this using DOS-style short mode. If the path
12624  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12625  # take no chances and rewrite it.
12626  # Note: m4 eats our [], so we need to use [ and ] instead.
12627  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12628  if test "x$has_forbidden_chars" != x; then
12629    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12630    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12631  fi
12632
12633
12634  windows_path="$new_path"
12635  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12636    unix_path=`$CYGPATH -u "$windows_path"`
12637    new_path="$unix_path"
12638  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12639    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12640    new_path="$unix_path"
12641  fi
12642
12643  if test "x$path" != "x$new_path"; then
12644    BOOT_JDK="$new_path"
12645    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12646$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12647  fi
12648
12649  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12650  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12651
12652  else
12653    # We're on a posix platform. Hooray! :)
12654    path="$BOOT_JDK"
12655    has_space=`$ECHO "$path" | $GREP " "`
12656    if test "x$has_space" != x; then
12657      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12658$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12659      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12660    fi
12661
12662    # Use eval to expand a potential ~
12663    eval path="$path"
12664    if test ! -f "$path" && test ! -d "$path"; then
12665      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12666    fi
12667
12668    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
12669  fi
12670
12671              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12672$as_echo_n "checking for Boot JDK... " >&6; }
12673              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12674$as_echo "$BOOT_JDK" >&6; }
12675              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12676$as_echo_n "checking Boot JDK version... " >&6; }
12677              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12678              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12679$as_echo "$BOOT_JDK_VERSION" >&6; }
12680            fi # end check jdk version
12681          fi # end check rt.jar
12682        fi # end check javac
12683      fi # end check java
12684    fi # end check boot jdk found
12685  fi
12686
12687    done
12688  fi
12689
12690  fi
12691
12692
12693    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12694    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12695      # Do we have a bin/java?
12696      if test ! -x "$BOOT_JDK/bin/java"; then
12697        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12698$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12699        BOOT_JDK_FOUND=no
12700      else
12701        # Do we have a bin/javac?
12702        if test ! -x "$BOOT_JDK/bin/javac"; then
12703          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12704$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12705          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12706$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12707          BOOT_JDK_FOUND=no
12708        else
12709          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12710          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12711            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12712$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12713            BOOT_JDK_FOUND=no
12714          else
12715            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12716            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12717
12718            # Extra M4 quote needed to protect [] in grep expression.
12719            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12720            if test "x$FOUND_VERSION_78" = x; then
12721              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12722$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12723              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12724$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12725              BOOT_JDK_FOUND=no
12726            else
12727              # We're done! :-)
12728              BOOT_JDK_FOUND=yes
12729
12730  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12731
12732  # Input might be given as Windows format, start by converting to
12733  # unix format.
12734  path="$BOOT_JDK"
12735  new_path=`$CYGPATH -u "$path"`
12736
12737  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12738  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12739  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12740  # "foo.exe" is OK but "foo" is an error.
12741  #
12742  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12743  # It is also a way to make sure we got the proper file name for the real test later on.
12744  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12745  if test "x$test_shortpath" = x; then
12746    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12747$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12748    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12749  fi
12750
12751  # Call helper function which possibly converts this using DOS-style short mode.
12752  # If so, the updated path is stored in $new_path.
12753
12754  input_path="$new_path"
12755  # Check if we need to convert this using DOS-style short mode. If the path
12756  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12757  # take no chances and rewrite it.
12758  # Note: m4 eats our [], so we need to use [ and ] instead.
12759  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12760  if test "x$has_forbidden_chars" != x; then
12761    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12762    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12763    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12764    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12765      # Going to short mode and back again did indeed matter. Since short mode is
12766      # case insensitive, let's make it lowercase to improve readability.
12767      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12768      # Now convert it back to Unix-stile (cygpath)
12769      input_path=`$CYGPATH -u "$shortmode_path"`
12770      new_path="$input_path"
12771    fi
12772  fi
12773
12774  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12775  if test "x$test_cygdrive_prefix" = x; then
12776    # As a simple fix, exclude /usr/bin since it's not a real path.
12777    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12778      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12779      # a path prefixed by /cygdrive for fixpath to work.
12780      new_path="$CYGWIN_ROOT_PATH$input_path"
12781    fi
12782  fi
12783
12784
12785  if test "x$path" != "x$new_path"; then
12786    BOOT_JDK="$new_path"
12787    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12788$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12789  fi
12790
12791  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12792
12793  path="$BOOT_JDK"
12794  has_colon=`$ECHO $path | $GREP ^.:`
12795  new_path="$path"
12796  if test "x$has_colon" = x; then
12797    # Not in mixed or Windows style, start by that.
12798    new_path=`cmd //c echo $path`
12799  fi
12800
12801
12802  input_path="$new_path"
12803  # Check if we need to convert this using DOS-style short mode. If the path
12804  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12805  # take no chances and rewrite it.
12806  # Note: m4 eats our [], so we need to use [ and ] instead.
12807  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12808  if test "x$has_forbidden_chars" != x; then
12809    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12810    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12811  fi
12812
12813
12814  windows_path="$new_path"
12815  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12816    unix_path=`$CYGPATH -u "$windows_path"`
12817    new_path="$unix_path"
12818  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12819    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12820    new_path="$unix_path"
12821  fi
12822
12823  if test "x$path" != "x$new_path"; then
12824    BOOT_JDK="$new_path"
12825    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12826$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12827  fi
12828
12829  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12830  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12831
12832  else
12833    # We're on a posix platform. Hooray! :)
12834    path="$BOOT_JDK"
12835    has_space=`$ECHO "$path" | $GREP " "`
12836    if test "x$has_space" != x; then
12837      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12838$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12839      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12840    fi
12841
12842    # Use eval to expand a potential ~
12843    eval path="$path"
12844    if test ! -f "$path" && test ! -d "$path"; then
12845      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12846    fi
12847
12848    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
12849  fi
12850
12851              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12852$as_echo_n "checking for Boot JDK... " >&6; }
12853              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12854$as_echo "$BOOT_JDK" >&6; }
12855              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12856$as_echo_n "checking Boot JDK version... " >&6; }
12857              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12858              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12859$as_echo "$BOOT_JDK_VERSION" >&6; }
12860            fi # end check jdk version
12861          fi # end check rt.jar
12862        fi # end check javac
12863      fi # end check java
12864    fi # end check boot jdk found
12865  fi
12866
12867
12868  if test "x$BOOT_JDK_FOUND" = xno; then
12869    # Now execute the test
12870
12871  if test "x$PROGRAMW6432" != x; then
12872    VIRTUAL_DIR="$PROGRAMW6432/Java"
12873
12874  windows_path="$VIRTUAL_DIR"
12875  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12876    unix_path=`$CYGPATH -u "$windows_path"`
12877    VIRTUAL_DIR="$unix_path"
12878  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12879    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12880    VIRTUAL_DIR="$unix_path"
12881  fi
12882
12883
12884  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
12885  BOOT_JDK_SUFFIX=""
12886  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
12887  if test "x$ALL_JDKS_FOUND" != x; then
12888    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
12889
12890  if test "x$BOOT_JDK_FOUND" = xno; then
12891    # Now execute the test
12892
12893        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
12894        if test -d "$BOOT_JDK"; then
12895          BOOT_JDK_FOUND=maybe
12896          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
12897$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
12898        fi
12899
12900
12901    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12902    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12903      # Do we have a bin/java?
12904      if test ! -x "$BOOT_JDK/bin/java"; then
12905        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12906$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12907        BOOT_JDK_FOUND=no
12908      else
12909        # Do we have a bin/javac?
12910        if test ! -x "$BOOT_JDK/bin/javac"; then
12911          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12912$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12913          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12914$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12915          BOOT_JDK_FOUND=no
12916        else
12917          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12918          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12919            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12920$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12921            BOOT_JDK_FOUND=no
12922          else
12923            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12924            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12925
12926            # Extra M4 quote needed to protect [] in grep expression.
12927            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12928            if test "x$FOUND_VERSION_78" = x; then
12929              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12930$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12931              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12932$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12933              BOOT_JDK_FOUND=no
12934            else
12935              # We're done! :-)
12936              BOOT_JDK_FOUND=yes
12937
12938  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12939
12940  # Input might be given as Windows format, start by converting to
12941  # unix format.
12942  path="$BOOT_JDK"
12943  new_path=`$CYGPATH -u "$path"`
12944
12945  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12946  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12947  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12948  # "foo.exe" is OK but "foo" is an error.
12949  #
12950  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12951  # It is also a way to make sure we got the proper file name for the real test later on.
12952  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12953  if test "x$test_shortpath" = x; then
12954    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12955$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12956    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12957  fi
12958
12959  # Call helper function which possibly converts this using DOS-style short mode.
12960  # If so, the updated path is stored in $new_path.
12961
12962  input_path="$new_path"
12963  # Check if we need to convert this using DOS-style short mode. If the path
12964  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12965  # take no chances and rewrite it.
12966  # Note: m4 eats our [], so we need to use [ and ] instead.
12967  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12968  if test "x$has_forbidden_chars" != x; then
12969    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12970    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12971    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12972    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12973      # Going to short mode and back again did indeed matter. Since short mode is
12974      # case insensitive, let's make it lowercase to improve readability.
12975      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12976      # Now convert it back to Unix-stile (cygpath)
12977      input_path=`$CYGPATH -u "$shortmode_path"`
12978      new_path="$input_path"
12979    fi
12980  fi
12981
12982  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12983  if test "x$test_cygdrive_prefix" = x; then
12984    # As a simple fix, exclude /usr/bin since it's not a real path.
12985    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12986      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12987      # a path prefixed by /cygdrive for fixpath to work.
12988      new_path="$CYGWIN_ROOT_PATH$input_path"
12989    fi
12990  fi
12991
12992
12993  if test "x$path" != "x$new_path"; then
12994    BOOT_JDK="$new_path"
12995    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12996$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12997  fi
12998
12999  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13000
13001  path="$BOOT_JDK"
13002  has_colon=`$ECHO $path | $GREP ^.:`
13003  new_path="$path"
13004  if test "x$has_colon" = x; then
13005    # Not in mixed or Windows style, start by that.
13006    new_path=`cmd //c echo $path`
13007  fi
13008
13009
13010  input_path="$new_path"
13011  # Check if we need to convert this using DOS-style short mode. If the path
13012  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13013  # take no chances and rewrite it.
13014  # Note: m4 eats our [], so we need to use [ and ] instead.
13015  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13016  if test "x$has_forbidden_chars" != x; then
13017    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13018    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13019  fi
13020
13021
13022  windows_path="$new_path"
13023  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13024    unix_path=`$CYGPATH -u "$windows_path"`
13025    new_path="$unix_path"
13026  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13027    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13028    new_path="$unix_path"
13029  fi
13030
13031  if test "x$path" != "x$new_path"; then
13032    BOOT_JDK="$new_path"
13033    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13034$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13035  fi
13036
13037  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13038  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13039
13040  else
13041    # We're on a posix platform. Hooray! :)
13042    path="$BOOT_JDK"
13043    has_space=`$ECHO "$path" | $GREP " "`
13044    if test "x$has_space" != x; then
13045      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13046$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13047      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13048    fi
13049
13050    # Use eval to expand a potential ~
13051    eval path="$path"
13052    if test ! -f "$path" && test ! -d "$path"; then
13053      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13054    fi
13055
13056    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13057  fi
13058
13059              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13060$as_echo_n "checking for Boot JDK... " >&6; }
13061              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13062$as_echo "$BOOT_JDK" >&6; }
13063              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13064$as_echo_n "checking Boot JDK version... " >&6; }
13065              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13066              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13067$as_echo "$BOOT_JDK_VERSION" >&6; }
13068            fi # end check jdk version
13069          fi # end check rt.jar
13070        fi # end check javac
13071      fi # end check java
13072    fi # end check boot jdk found
13073  fi
13074
13075    done
13076  fi
13077
13078  fi
13079
13080
13081    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13082    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13083      # Do we have a bin/java?
13084      if test ! -x "$BOOT_JDK/bin/java"; then
13085        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13086$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13087        BOOT_JDK_FOUND=no
13088      else
13089        # Do we have a bin/javac?
13090        if test ! -x "$BOOT_JDK/bin/javac"; then
13091          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13092$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13093          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13094$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13095          BOOT_JDK_FOUND=no
13096        else
13097          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13098          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13099            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13100$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13101            BOOT_JDK_FOUND=no
13102          else
13103            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13104            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13105
13106            # Extra M4 quote needed to protect [] in grep expression.
13107            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13108            if test "x$FOUND_VERSION_78" = x; then
13109              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13110$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13111              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13112$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13113              BOOT_JDK_FOUND=no
13114            else
13115              # We're done! :-)
13116              BOOT_JDK_FOUND=yes
13117
13118  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13119
13120  # Input might be given as Windows format, start by converting to
13121  # unix format.
13122  path="$BOOT_JDK"
13123  new_path=`$CYGPATH -u "$path"`
13124
13125  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13126  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13127  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13128  # "foo.exe" is OK but "foo" is an error.
13129  #
13130  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13131  # It is also a way to make sure we got the proper file name for the real test later on.
13132  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13133  if test "x$test_shortpath" = x; then
13134    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13135$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13136    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13137  fi
13138
13139  # Call helper function which possibly converts this using DOS-style short mode.
13140  # If so, the updated path is stored in $new_path.
13141
13142  input_path="$new_path"
13143  # Check if we need to convert this using DOS-style short mode. If the path
13144  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13145  # take no chances and rewrite it.
13146  # Note: m4 eats our [], so we need to use [ and ] instead.
13147  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13148  if test "x$has_forbidden_chars" != x; then
13149    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13150    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13151    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13152    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13153      # Going to short mode and back again did indeed matter. Since short mode is
13154      # case insensitive, let's make it lowercase to improve readability.
13155      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13156      # Now convert it back to Unix-stile (cygpath)
13157      input_path=`$CYGPATH -u "$shortmode_path"`
13158      new_path="$input_path"
13159    fi
13160  fi
13161
13162  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13163  if test "x$test_cygdrive_prefix" = x; then
13164    # As a simple fix, exclude /usr/bin since it's not a real path.
13165    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13166      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13167      # a path prefixed by /cygdrive for fixpath to work.
13168      new_path="$CYGWIN_ROOT_PATH$input_path"
13169    fi
13170  fi
13171
13172
13173  if test "x$path" != "x$new_path"; then
13174    BOOT_JDK="$new_path"
13175    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13176$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13177  fi
13178
13179  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13180
13181  path="$BOOT_JDK"
13182  has_colon=`$ECHO $path | $GREP ^.:`
13183  new_path="$path"
13184  if test "x$has_colon" = x; then
13185    # Not in mixed or Windows style, start by that.
13186    new_path=`cmd //c echo $path`
13187  fi
13188
13189
13190  input_path="$new_path"
13191  # Check if we need to convert this using DOS-style short mode. If the path
13192  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13193  # take no chances and rewrite it.
13194  # Note: m4 eats our [], so we need to use [ and ] instead.
13195  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13196  if test "x$has_forbidden_chars" != x; then
13197    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13198    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13199  fi
13200
13201
13202  windows_path="$new_path"
13203  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13204    unix_path=`$CYGPATH -u "$windows_path"`
13205    new_path="$unix_path"
13206  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13207    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13208    new_path="$unix_path"
13209  fi
13210
13211  if test "x$path" != "x$new_path"; then
13212    BOOT_JDK="$new_path"
13213    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13214$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13215  fi
13216
13217  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13218  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13219
13220  else
13221    # We're on a posix platform. Hooray! :)
13222    path="$BOOT_JDK"
13223    has_space=`$ECHO "$path" | $GREP " "`
13224    if test "x$has_space" != x; then
13225      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13226$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13227      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13228    fi
13229
13230    # Use eval to expand a potential ~
13231    eval path="$path"
13232    if test ! -f "$path" && test ! -d "$path"; then
13233      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13234    fi
13235
13236    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13237  fi
13238
13239              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13240$as_echo_n "checking for Boot JDK... " >&6; }
13241              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13242$as_echo "$BOOT_JDK" >&6; }
13243              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13244$as_echo_n "checking Boot JDK version... " >&6; }
13245              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13246              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13247$as_echo "$BOOT_JDK_VERSION" >&6; }
13248            fi # end check jdk version
13249          fi # end check rt.jar
13250        fi # end check javac
13251      fi # end check java
13252    fi # end check boot jdk found
13253  fi
13254
13255
13256  if test "x$BOOT_JDK_FOUND" = xno; then
13257    # Now execute the test
13258
13259  if test "x$PROGRAMFILES" != x; then
13260    VIRTUAL_DIR="$PROGRAMFILES/Java"
13261
13262  windows_path="$VIRTUAL_DIR"
13263  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13264    unix_path=`$CYGPATH -u "$windows_path"`
13265    VIRTUAL_DIR="$unix_path"
13266  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13267    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13268    VIRTUAL_DIR="$unix_path"
13269  fi
13270
13271
13272  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
13273  BOOT_JDK_SUFFIX=""
13274  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13275  if test "x$ALL_JDKS_FOUND" != x; then
13276    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13277
13278  if test "x$BOOT_JDK_FOUND" = xno; then
13279    # Now execute the test
13280
13281        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13282        if test -d "$BOOT_JDK"; then
13283          BOOT_JDK_FOUND=maybe
13284          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13285$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13286        fi
13287
13288
13289    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13290    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13291      # Do we have a bin/java?
13292      if test ! -x "$BOOT_JDK/bin/java"; then
13293        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13294$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13295        BOOT_JDK_FOUND=no
13296      else
13297        # Do we have a bin/javac?
13298        if test ! -x "$BOOT_JDK/bin/javac"; then
13299          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13300$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13301          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13302$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13303          BOOT_JDK_FOUND=no
13304        else
13305          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13306          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13307            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13308$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13309            BOOT_JDK_FOUND=no
13310          else
13311            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13312            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13313
13314            # Extra M4 quote needed to protect [] in grep expression.
13315            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13316            if test "x$FOUND_VERSION_78" = x; then
13317              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13318$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13319              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13320$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13321              BOOT_JDK_FOUND=no
13322            else
13323              # We're done! :-)
13324              BOOT_JDK_FOUND=yes
13325
13326  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13327
13328  # Input might be given as Windows format, start by converting to
13329  # unix format.
13330  path="$BOOT_JDK"
13331  new_path=`$CYGPATH -u "$path"`
13332
13333  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13334  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13335  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13336  # "foo.exe" is OK but "foo" is an error.
13337  #
13338  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13339  # It is also a way to make sure we got the proper file name for the real test later on.
13340  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13341  if test "x$test_shortpath" = x; then
13342    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13343$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13344    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13345  fi
13346
13347  # Call helper function which possibly converts this using DOS-style short mode.
13348  # If so, the updated path is stored in $new_path.
13349
13350  input_path="$new_path"
13351  # Check if we need to convert this using DOS-style short mode. If the path
13352  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13353  # take no chances and rewrite it.
13354  # Note: m4 eats our [], so we need to use [ and ] instead.
13355  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13356  if test "x$has_forbidden_chars" != x; then
13357    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13358    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13359    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13360    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13361      # Going to short mode and back again did indeed matter. Since short mode is
13362      # case insensitive, let's make it lowercase to improve readability.
13363      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13364      # Now convert it back to Unix-stile (cygpath)
13365      input_path=`$CYGPATH -u "$shortmode_path"`
13366      new_path="$input_path"
13367    fi
13368  fi
13369
13370  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13371  if test "x$test_cygdrive_prefix" = x; then
13372    # As a simple fix, exclude /usr/bin since it's not a real path.
13373    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13374      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13375      # a path prefixed by /cygdrive for fixpath to work.
13376      new_path="$CYGWIN_ROOT_PATH$input_path"
13377    fi
13378  fi
13379
13380
13381  if test "x$path" != "x$new_path"; then
13382    BOOT_JDK="$new_path"
13383    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13384$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13385  fi
13386
13387  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13388
13389  path="$BOOT_JDK"
13390  has_colon=`$ECHO $path | $GREP ^.:`
13391  new_path="$path"
13392  if test "x$has_colon" = x; then
13393    # Not in mixed or Windows style, start by that.
13394    new_path=`cmd //c echo $path`
13395  fi
13396
13397
13398  input_path="$new_path"
13399  # Check if we need to convert this using DOS-style short mode. If the path
13400  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13401  # take no chances and rewrite it.
13402  # Note: m4 eats our [], so we need to use [ and ] instead.
13403  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13404  if test "x$has_forbidden_chars" != x; then
13405    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13406    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13407  fi
13408
13409
13410  windows_path="$new_path"
13411  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13412    unix_path=`$CYGPATH -u "$windows_path"`
13413    new_path="$unix_path"
13414  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13415    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13416    new_path="$unix_path"
13417  fi
13418
13419  if test "x$path" != "x$new_path"; then
13420    BOOT_JDK="$new_path"
13421    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13422$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13423  fi
13424
13425  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13426  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13427
13428  else
13429    # We're on a posix platform. Hooray! :)
13430    path="$BOOT_JDK"
13431    has_space=`$ECHO "$path" | $GREP " "`
13432    if test "x$has_space" != x; then
13433      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13434$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13435      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13436    fi
13437
13438    # Use eval to expand a potential ~
13439    eval path="$path"
13440    if test ! -f "$path" && test ! -d "$path"; then
13441      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13442    fi
13443
13444    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13445  fi
13446
13447              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13448$as_echo_n "checking for Boot JDK... " >&6; }
13449              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13450$as_echo "$BOOT_JDK" >&6; }
13451              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13452$as_echo_n "checking Boot JDK version... " >&6; }
13453              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13454              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13455$as_echo "$BOOT_JDK_VERSION" >&6; }
13456            fi # end check jdk version
13457          fi # end check rt.jar
13458        fi # end check javac
13459      fi # end check java
13460    fi # end check boot jdk found
13461  fi
13462
13463    done
13464  fi
13465
13466  fi
13467
13468
13469    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13470    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13471      # Do we have a bin/java?
13472      if test ! -x "$BOOT_JDK/bin/java"; then
13473        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13474$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13475        BOOT_JDK_FOUND=no
13476      else
13477        # Do we have a bin/javac?
13478        if test ! -x "$BOOT_JDK/bin/javac"; then
13479          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13480$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13481          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13482$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13483          BOOT_JDK_FOUND=no
13484        else
13485          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13486          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13487            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13488$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13489            BOOT_JDK_FOUND=no
13490          else
13491            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13492            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13493
13494            # Extra M4 quote needed to protect [] in grep expression.
13495            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13496            if test "x$FOUND_VERSION_78" = x; then
13497              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13498$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13499              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13500$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13501              BOOT_JDK_FOUND=no
13502            else
13503              # We're done! :-)
13504              BOOT_JDK_FOUND=yes
13505
13506  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13507
13508  # Input might be given as Windows format, start by converting to
13509  # unix format.
13510  path="$BOOT_JDK"
13511  new_path=`$CYGPATH -u "$path"`
13512
13513  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13514  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13515  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13516  # "foo.exe" is OK but "foo" is an error.
13517  #
13518  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13519  # It is also a way to make sure we got the proper file name for the real test later on.
13520  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13521  if test "x$test_shortpath" = x; then
13522    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13523$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13524    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13525  fi
13526
13527  # Call helper function which possibly converts this using DOS-style short mode.
13528  # If so, the updated path is stored in $new_path.
13529
13530  input_path="$new_path"
13531  # Check if we need to convert this using DOS-style short mode. If the path
13532  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13533  # take no chances and rewrite it.
13534  # Note: m4 eats our [], so we need to use [ and ] instead.
13535  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13536  if test "x$has_forbidden_chars" != x; then
13537    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13538    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13539    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13540    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13541      # Going to short mode and back again did indeed matter. Since short mode is
13542      # case insensitive, let's make it lowercase to improve readability.
13543      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13544      # Now convert it back to Unix-stile (cygpath)
13545      input_path=`$CYGPATH -u "$shortmode_path"`
13546      new_path="$input_path"
13547    fi
13548  fi
13549
13550  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13551  if test "x$test_cygdrive_prefix" = x; then
13552    # As a simple fix, exclude /usr/bin since it's not a real path.
13553    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13554      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13555      # a path prefixed by /cygdrive for fixpath to work.
13556      new_path="$CYGWIN_ROOT_PATH$input_path"
13557    fi
13558  fi
13559
13560
13561  if test "x$path" != "x$new_path"; then
13562    BOOT_JDK="$new_path"
13563    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13564$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13565  fi
13566
13567  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13568
13569  path="$BOOT_JDK"
13570  has_colon=`$ECHO $path | $GREP ^.:`
13571  new_path="$path"
13572  if test "x$has_colon" = x; then
13573    # Not in mixed or Windows style, start by that.
13574    new_path=`cmd //c echo $path`
13575  fi
13576
13577
13578  input_path="$new_path"
13579  # Check if we need to convert this using DOS-style short mode. If the path
13580  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13581  # take no chances and rewrite it.
13582  # Note: m4 eats our [], so we need to use [ and ] instead.
13583  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13584  if test "x$has_forbidden_chars" != x; then
13585    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13586    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13587  fi
13588
13589
13590  windows_path="$new_path"
13591  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13592    unix_path=`$CYGPATH -u "$windows_path"`
13593    new_path="$unix_path"
13594  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13595    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13596    new_path="$unix_path"
13597  fi
13598
13599  if test "x$path" != "x$new_path"; then
13600    BOOT_JDK="$new_path"
13601    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13602$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13603  fi
13604
13605  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13606  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13607
13608  else
13609    # We're on a posix platform. Hooray! :)
13610    path="$BOOT_JDK"
13611    has_space=`$ECHO "$path" | $GREP " "`
13612    if test "x$has_space" != x; then
13613      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13614$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13615      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13616    fi
13617
13618    # Use eval to expand a potential ~
13619    eval path="$path"
13620    if test ! -f "$path" && test ! -d "$path"; then
13621      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13622    fi
13623
13624    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13625  fi
13626
13627              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13628$as_echo_n "checking for Boot JDK... " >&6; }
13629              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13630$as_echo "$BOOT_JDK" >&6; }
13631              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13632$as_echo_n "checking Boot JDK version... " >&6; }
13633              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13634              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13635$as_echo "$BOOT_JDK_VERSION" >&6; }
13636            fi # end check jdk version
13637          fi # end check rt.jar
13638        fi # end check javac
13639      fi # end check java
13640    fi # end check boot jdk found
13641  fi
13642
13643
13644  if test "x$BOOT_JDK_FOUND" = xno; then
13645    # Now execute the test
13646
13647  if test "x$ProgramFiles" != x; then
13648    VIRTUAL_DIR="$ProgramFiles/Java"
13649
13650  windows_path="$VIRTUAL_DIR"
13651  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13652    unix_path=`$CYGPATH -u "$windows_path"`
13653    VIRTUAL_DIR="$unix_path"
13654  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13655    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13656    VIRTUAL_DIR="$unix_path"
13657  fi
13658
13659
13660  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
13661  BOOT_JDK_SUFFIX=""
13662  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13663  if test "x$ALL_JDKS_FOUND" != x; then
13664    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13665
13666  if test "x$BOOT_JDK_FOUND" = xno; then
13667    # Now execute the test
13668
13669        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13670        if test -d "$BOOT_JDK"; then
13671          BOOT_JDK_FOUND=maybe
13672          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13673$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13674        fi
13675
13676
13677    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13678    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13679      # Do we have a bin/java?
13680      if test ! -x "$BOOT_JDK/bin/java"; then
13681        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13682$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13683        BOOT_JDK_FOUND=no
13684      else
13685        # Do we have a bin/javac?
13686        if test ! -x "$BOOT_JDK/bin/javac"; then
13687          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13688$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13689          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13690$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13691          BOOT_JDK_FOUND=no
13692        else
13693          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13694          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13695            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13696$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13697            BOOT_JDK_FOUND=no
13698          else
13699            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13700            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13701
13702            # Extra M4 quote needed to protect [] in grep expression.
13703            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13704            if test "x$FOUND_VERSION_78" = x; then
13705              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13706$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13707              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13708$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13709              BOOT_JDK_FOUND=no
13710            else
13711              # We're done! :-)
13712              BOOT_JDK_FOUND=yes
13713
13714  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13715
13716  # Input might be given as Windows format, start by converting to
13717  # unix format.
13718  path="$BOOT_JDK"
13719  new_path=`$CYGPATH -u "$path"`
13720
13721  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13722  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13723  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13724  # "foo.exe" is OK but "foo" is an error.
13725  #
13726  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13727  # It is also a way to make sure we got the proper file name for the real test later on.
13728  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13729  if test "x$test_shortpath" = x; then
13730    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13731$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13732    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13733  fi
13734
13735  # Call helper function which possibly converts this using DOS-style short mode.
13736  # If so, the updated path is stored in $new_path.
13737
13738  input_path="$new_path"
13739  # Check if we need to convert this using DOS-style short mode. If the path
13740  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13741  # take no chances and rewrite it.
13742  # Note: m4 eats our [], so we need to use [ and ] instead.
13743  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13744  if test "x$has_forbidden_chars" != x; then
13745    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13746    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13747    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13748    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13749      # Going to short mode and back again did indeed matter. Since short mode is
13750      # case insensitive, let's make it lowercase to improve readability.
13751      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13752      # Now convert it back to Unix-stile (cygpath)
13753      input_path=`$CYGPATH -u "$shortmode_path"`
13754      new_path="$input_path"
13755    fi
13756  fi
13757
13758  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13759  if test "x$test_cygdrive_prefix" = x; then
13760    # As a simple fix, exclude /usr/bin since it's not a real path.
13761    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13762      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13763      # a path prefixed by /cygdrive for fixpath to work.
13764      new_path="$CYGWIN_ROOT_PATH$input_path"
13765    fi
13766  fi
13767
13768
13769  if test "x$path" != "x$new_path"; then
13770    BOOT_JDK="$new_path"
13771    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13772$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13773  fi
13774
13775  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13776
13777  path="$BOOT_JDK"
13778  has_colon=`$ECHO $path | $GREP ^.:`
13779  new_path="$path"
13780  if test "x$has_colon" = x; then
13781    # Not in mixed or Windows style, start by that.
13782    new_path=`cmd //c echo $path`
13783  fi
13784
13785
13786  input_path="$new_path"
13787  # Check if we need to convert this using DOS-style short mode. If the path
13788  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13789  # take no chances and rewrite it.
13790  # Note: m4 eats our [], so we need to use [ and ] instead.
13791  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13792  if test "x$has_forbidden_chars" != x; then
13793    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13794    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13795  fi
13796
13797
13798  windows_path="$new_path"
13799  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13800    unix_path=`$CYGPATH -u "$windows_path"`
13801    new_path="$unix_path"
13802  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13803    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13804    new_path="$unix_path"
13805  fi
13806
13807  if test "x$path" != "x$new_path"; then
13808    BOOT_JDK="$new_path"
13809    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13810$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13811  fi
13812
13813  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13814  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13815
13816  else
13817    # We're on a posix platform. Hooray! :)
13818    path="$BOOT_JDK"
13819    has_space=`$ECHO "$path" | $GREP " "`
13820    if test "x$has_space" != x; then
13821      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13822$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13823      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13824    fi
13825
13826    # Use eval to expand a potential ~
13827    eval path="$path"
13828    if test ! -f "$path" && test ! -d "$path"; then
13829      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13830    fi
13831
13832    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13833  fi
13834
13835              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13836$as_echo_n "checking for Boot JDK... " >&6; }
13837              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13838$as_echo "$BOOT_JDK" >&6; }
13839              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13840$as_echo_n "checking Boot JDK version... " >&6; }
13841              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13842              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13843$as_echo "$BOOT_JDK_VERSION" >&6; }
13844            fi # end check jdk version
13845          fi # end check rt.jar
13846        fi # end check javac
13847      fi # end check java
13848    fi # end check boot jdk found
13849  fi
13850
13851    done
13852  fi
13853
13854  fi
13855
13856
13857    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13858    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13859      # Do we have a bin/java?
13860      if test ! -x "$BOOT_JDK/bin/java"; then
13861        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13862$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13863        BOOT_JDK_FOUND=no
13864      else
13865        # Do we have a bin/javac?
13866        if test ! -x "$BOOT_JDK/bin/javac"; then
13867          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13868$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13869          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13870$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13871          BOOT_JDK_FOUND=no
13872        else
13873          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13874          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13875            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13876$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13877            BOOT_JDK_FOUND=no
13878          else
13879            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13880            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13881
13882            # Extra M4 quote needed to protect [] in grep expression.
13883            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13884            if test "x$FOUND_VERSION_78" = x; then
13885              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13886$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13887              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13888$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13889              BOOT_JDK_FOUND=no
13890            else
13891              # We're done! :-)
13892              BOOT_JDK_FOUND=yes
13893
13894  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13895
13896  # Input might be given as Windows format, start by converting to
13897  # unix format.
13898  path="$BOOT_JDK"
13899  new_path=`$CYGPATH -u "$path"`
13900
13901  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13902  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13903  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13904  # "foo.exe" is OK but "foo" is an error.
13905  #
13906  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13907  # It is also a way to make sure we got the proper file name for the real test later on.
13908  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13909  if test "x$test_shortpath" = x; then
13910    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13911$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13912    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13913  fi
13914
13915  # Call helper function which possibly converts this using DOS-style short mode.
13916  # If so, the updated path is stored in $new_path.
13917
13918  input_path="$new_path"
13919  # Check if we need to convert this using DOS-style short mode. If the path
13920  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13921  # take no chances and rewrite it.
13922  # Note: m4 eats our [], so we need to use [ and ] instead.
13923  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13924  if test "x$has_forbidden_chars" != x; then
13925    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13926    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13927    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13928    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13929      # Going to short mode and back again did indeed matter. Since short mode is
13930      # case insensitive, let's make it lowercase to improve readability.
13931      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13932      # Now convert it back to Unix-stile (cygpath)
13933      input_path=`$CYGPATH -u "$shortmode_path"`
13934      new_path="$input_path"
13935    fi
13936  fi
13937
13938  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13939  if test "x$test_cygdrive_prefix" = x; then
13940    # As a simple fix, exclude /usr/bin since it's not a real path.
13941    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13942      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13943      # a path prefixed by /cygdrive for fixpath to work.
13944      new_path="$CYGWIN_ROOT_PATH$input_path"
13945    fi
13946  fi
13947
13948
13949  if test "x$path" != "x$new_path"; then
13950    BOOT_JDK="$new_path"
13951    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13952$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13953  fi
13954
13955  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13956
13957  path="$BOOT_JDK"
13958  has_colon=`$ECHO $path | $GREP ^.:`
13959  new_path="$path"
13960  if test "x$has_colon" = x; then
13961    # Not in mixed or Windows style, start by that.
13962    new_path=`cmd //c echo $path`
13963  fi
13964
13965
13966  input_path="$new_path"
13967  # Check if we need to convert this using DOS-style short mode. If the path
13968  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13969  # take no chances and rewrite it.
13970  # Note: m4 eats our [], so we need to use [ and ] instead.
13971  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13972  if test "x$has_forbidden_chars" != x; then
13973    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13974    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13975  fi
13976
13977
13978  windows_path="$new_path"
13979  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13980    unix_path=`$CYGPATH -u "$windows_path"`
13981    new_path="$unix_path"
13982  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13983    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13984    new_path="$unix_path"
13985  fi
13986
13987  if test "x$path" != "x$new_path"; then
13988    BOOT_JDK="$new_path"
13989    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13990$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13991  fi
13992
13993  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13994  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13995
13996  else
13997    # We're on a posix platform. Hooray! :)
13998    path="$BOOT_JDK"
13999    has_space=`$ECHO "$path" | $GREP " "`
14000    if test "x$has_space" != x; then
14001      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14002$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14003      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14004    fi
14005
14006    # Use eval to expand a potential ~
14007    eval path="$path"
14008    if test ! -f "$path" && test ! -d "$path"; then
14009      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14010    fi
14011
14012    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14013  fi
14014
14015              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14016$as_echo_n "checking for Boot JDK... " >&6; }
14017              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14018$as_echo "$BOOT_JDK" >&6; }
14019              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14020$as_echo_n "checking Boot JDK version... " >&6; }
14021              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14022              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14023$as_echo "$BOOT_JDK_VERSION" >&6; }
14024            fi # end check jdk version
14025          fi # end check rt.jar
14026        fi # end check javac
14027      fi # end check java
14028    fi # end check boot jdk found
14029  fi
14030
14031
14032  if test "x$BOOT_JDK_FOUND" = xno; then
14033    # Now execute the test
14034
14035  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
14036  BOOT_JDK_SUFFIX=""
14037  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14038  if test "x$ALL_JDKS_FOUND" != x; then
14039    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14040
14041  if test "x$BOOT_JDK_FOUND" = xno; then
14042    # Now execute the test
14043
14044        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14045        if test -d "$BOOT_JDK"; then
14046          BOOT_JDK_FOUND=maybe
14047          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14048$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14049        fi
14050
14051
14052    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14053    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14054      # Do we have a bin/java?
14055      if test ! -x "$BOOT_JDK/bin/java"; then
14056        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14057$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14058        BOOT_JDK_FOUND=no
14059      else
14060        # Do we have a bin/javac?
14061        if test ! -x "$BOOT_JDK/bin/javac"; then
14062          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14063$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14064          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14065$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14066          BOOT_JDK_FOUND=no
14067        else
14068          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14069          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14070            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14071$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14072            BOOT_JDK_FOUND=no
14073          else
14074            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14075            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14076
14077            # Extra M4 quote needed to protect [] in grep expression.
14078            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14079            if test "x$FOUND_VERSION_78" = x; then
14080              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14081$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14082              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14083$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14084              BOOT_JDK_FOUND=no
14085            else
14086              # We're done! :-)
14087              BOOT_JDK_FOUND=yes
14088
14089  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14090
14091  # Input might be given as Windows format, start by converting to
14092  # unix format.
14093  path="$BOOT_JDK"
14094  new_path=`$CYGPATH -u "$path"`
14095
14096  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14097  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14098  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14099  # "foo.exe" is OK but "foo" is an error.
14100  #
14101  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14102  # It is also a way to make sure we got the proper file name for the real test later on.
14103  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14104  if test "x$test_shortpath" = x; then
14105    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14106$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14107    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14108  fi
14109
14110  # Call helper function which possibly converts this using DOS-style short mode.
14111  # If so, the updated path is stored in $new_path.
14112
14113  input_path="$new_path"
14114  # Check if we need to convert this using DOS-style short mode. If the path
14115  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14116  # take no chances and rewrite it.
14117  # Note: m4 eats our [], so we need to use [ and ] instead.
14118  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14119  if test "x$has_forbidden_chars" != x; then
14120    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14121    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14122    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14123    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14124      # Going to short mode and back again did indeed matter. Since short mode is
14125      # case insensitive, let's make it lowercase to improve readability.
14126      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14127      # Now convert it back to Unix-stile (cygpath)
14128      input_path=`$CYGPATH -u "$shortmode_path"`
14129      new_path="$input_path"
14130    fi
14131  fi
14132
14133  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14134  if test "x$test_cygdrive_prefix" = x; then
14135    # As a simple fix, exclude /usr/bin since it's not a real path.
14136    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14137      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14138      # a path prefixed by /cygdrive for fixpath to work.
14139      new_path="$CYGWIN_ROOT_PATH$input_path"
14140    fi
14141  fi
14142
14143
14144  if test "x$path" != "x$new_path"; then
14145    BOOT_JDK="$new_path"
14146    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14147$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14148  fi
14149
14150  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14151
14152  path="$BOOT_JDK"
14153  has_colon=`$ECHO $path | $GREP ^.:`
14154  new_path="$path"
14155  if test "x$has_colon" = x; then
14156    # Not in mixed or Windows style, start by that.
14157    new_path=`cmd //c echo $path`
14158  fi
14159
14160
14161  input_path="$new_path"
14162  # Check if we need to convert this using DOS-style short mode. If the path
14163  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14164  # take no chances and rewrite it.
14165  # Note: m4 eats our [], so we need to use [ and ] instead.
14166  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14167  if test "x$has_forbidden_chars" != x; then
14168    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14169    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14170  fi
14171
14172
14173  windows_path="$new_path"
14174  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14175    unix_path=`$CYGPATH -u "$windows_path"`
14176    new_path="$unix_path"
14177  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14178    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14179    new_path="$unix_path"
14180  fi
14181
14182  if test "x$path" != "x$new_path"; then
14183    BOOT_JDK="$new_path"
14184    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14185$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14186  fi
14187
14188  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14189  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14190
14191  else
14192    # We're on a posix platform. Hooray! :)
14193    path="$BOOT_JDK"
14194    has_space=`$ECHO "$path" | $GREP " "`
14195    if test "x$has_space" != x; then
14196      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14197$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14198      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14199    fi
14200
14201    # Use eval to expand a potential ~
14202    eval path="$path"
14203    if test ! -f "$path" && test ! -d "$path"; then
14204      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14205    fi
14206
14207    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14208  fi
14209
14210              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14211$as_echo_n "checking for Boot JDK... " >&6; }
14212              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14213$as_echo "$BOOT_JDK" >&6; }
14214              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14215$as_echo_n "checking Boot JDK version... " >&6; }
14216              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14217              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14218$as_echo "$BOOT_JDK_VERSION" >&6; }
14219            fi # end check jdk version
14220          fi # end check rt.jar
14221        fi # end check javac
14222      fi # end check java
14223    fi # end check boot jdk found
14224  fi
14225
14226    done
14227  fi
14228
14229
14230    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14231    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14232      # Do we have a bin/java?
14233      if test ! -x "$BOOT_JDK/bin/java"; then
14234        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14235$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14236        BOOT_JDK_FOUND=no
14237      else
14238        # Do we have a bin/javac?
14239        if test ! -x "$BOOT_JDK/bin/javac"; then
14240          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14241$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14242          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14243$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14244          BOOT_JDK_FOUND=no
14245        else
14246          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14247          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14248            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14249$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14250            BOOT_JDK_FOUND=no
14251          else
14252            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14253            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14254
14255            # Extra M4 quote needed to protect [] in grep expression.
14256            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14257            if test "x$FOUND_VERSION_78" = x; then
14258              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14259$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14260              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14261$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14262              BOOT_JDK_FOUND=no
14263            else
14264              # We're done! :-)
14265              BOOT_JDK_FOUND=yes
14266
14267  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14268
14269  # Input might be given as Windows format, start by converting to
14270  # unix format.
14271  path="$BOOT_JDK"
14272  new_path=`$CYGPATH -u "$path"`
14273
14274  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14275  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14276  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14277  # "foo.exe" is OK but "foo" is an error.
14278  #
14279  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14280  # It is also a way to make sure we got the proper file name for the real test later on.
14281  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14282  if test "x$test_shortpath" = x; then
14283    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14284$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14285    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14286  fi
14287
14288  # Call helper function which possibly converts this using DOS-style short mode.
14289  # If so, the updated path is stored in $new_path.
14290
14291  input_path="$new_path"
14292  # Check if we need to convert this using DOS-style short mode. If the path
14293  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14294  # take no chances and rewrite it.
14295  # Note: m4 eats our [], so we need to use [ and ] instead.
14296  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14297  if test "x$has_forbidden_chars" != x; then
14298    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14299    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14300    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14301    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14302      # Going to short mode and back again did indeed matter. Since short mode is
14303      # case insensitive, let's make it lowercase to improve readability.
14304      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14305      # Now convert it back to Unix-stile (cygpath)
14306      input_path=`$CYGPATH -u "$shortmode_path"`
14307      new_path="$input_path"
14308    fi
14309  fi
14310
14311  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14312  if test "x$test_cygdrive_prefix" = x; then
14313    # As a simple fix, exclude /usr/bin since it's not a real path.
14314    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14315      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14316      # a path prefixed by /cygdrive for fixpath to work.
14317      new_path="$CYGWIN_ROOT_PATH$input_path"
14318    fi
14319  fi
14320
14321
14322  if test "x$path" != "x$new_path"; then
14323    BOOT_JDK="$new_path"
14324    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14325$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14326  fi
14327
14328  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14329
14330  path="$BOOT_JDK"
14331  has_colon=`$ECHO $path | $GREP ^.:`
14332  new_path="$path"
14333  if test "x$has_colon" = x; then
14334    # Not in mixed or Windows style, start by that.
14335    new_path=`cmd //c echo $path`
14336  fi
14337
14338
14339  input_path="$new_path"
14340  # Check if we need to convert this using DOS-style short mode. If the path
14341  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14342  # take no chances and rewrite it.
14343  # Note: m4 eats our [], so we need to use [ and ] instead.
14344  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14345  if test "x$has_forbidden_chars" != x; then
14346    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14347    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14348  fi
14349
14350
14351  windows_path="$new_path"
14352  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14353    unix_path=`$CYGPATH -u "$windows_path"`
14354    new_path="$unix_path"
14355  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14356    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14357    new_path="$unix_path"
14358  fi
14359
14360  if test "x$path" != "x$new_path"; then
14361    BOOT_JDK="$new_path"
14362    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14363$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14364  fi
14365
14366  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14367  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14368
14369  else
14370    # We're on a posix platform. Hooray! :)
14371    path="$BOOT_JDK"
14372    has_space=`$ECHO "$path" | $GREP " "`
14373    if test "x$has_space" != x; then
14374      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14375$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14376      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14377    fi
14378
14379    # Use eval to expand a potential ~
14380    eval path="$path"
14381    if test ! -f "$path" && test ! -d "$path"; then
14382      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14383    fi
14384
14385    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14386  fi
14387
14388              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14389$as_echo_n "checking for Boot JDK... " >&6; }
14390              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14391$as_echo "$BOOT_JDK" >&6; }
14392              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14393$as_echo_n "checking Boot JDK version... " >&6; }
14394              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14395              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14396$as_echo "$BOOT_JDK_VERSION" >&6; }
14397            fi # end check jdk version
14398          fi # end check rt.jar
14399        fi # end check javac
14400      fi # end check java
14401    fi # end check boot jdk found
14402  fi
14403
14404  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
14405
14406  if test "x$BOOT_JDK_FOUND" = xno; then
14407    # Now execute the test
14408
14409  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
14410  BOOT_JDK_SUFFIX="/Contents/Home"
14411  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14412  if test "x$ALL_JDKS_FOUND" != x; then
14413    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14414
14415  if test "x$BOOT_JDK_FOUND" = xno; then
14416    # Now execute the test
14417
14418        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14419        if test -d "$BOOT_JDK"; then
14420          BOOT_JDK_FOUND=maybe
14421          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14422$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14423        fi
14424
14425
14426    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14427    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14428      # Do we have a bin/java?
14429      if test ! -x "$BOOT_JDK/bin/java"; then
14430        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14431$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14432        BOOT_JDK_FOUND=no
14433      else
14434        # Do we have a bin/javac?
14435        if test ! -x "$BOOT_JDK/bin/javac"; then
14436          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14437$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14438          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14439$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14440          BOOT_JDK_FOUND=no
14441        else
14442          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14443          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14444            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14445$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14446            BOOT_JDK_FOUND=no
14447          else
14448            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14449            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14450
14451            # Extra M4 quote needed to protect [] in grep expression.
14452            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14453            if test "x$FOUND_VERSION_78" = x; then
14454              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14455$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14456              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14457$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14458              BOOT_JDK_FOUND=no
14459            else
14460              # We're done! :-)
14461              BOOT_JDK_FOUND=yes
14462
14463  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14464
14465  # Input might be given as Windows format, start by converting to
14466  # unix format.
14467  path="$BOOT_JDK"
14468  new_path=`$CYGPATH -u "$path"`
14469
14470  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14471  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14472  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14473  # "foo.exe" is OK but "foo" is an error.
14474  #
14475  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14476  # It is also a way to make sure we got the proper file name for the real test later on.
14477  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14478  if test "x$test_shortpath" = x; then
14479    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14480$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14481    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14482  fi
14483
14484  # Call helper function which possibly converts this using DOS-style short mode.
14485  # If so, the updated path is stored in $new_path.
14486
14487  input_path="$new_path"
14488  # Check if we need to convert this using DOS-style short mode. If the path
14489  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14490  # take no chances and rewrite it.
14491  # Note: m4 eats our [], so we need to use [ and ] instead.
14492  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14493  if test "x$has_forbidden_chars" != x; then
14494    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14495    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14496    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14497    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14498      # Going to short mode and back again did indeed matter. Since short mode is
14499      # case insensitive, let's make it lowercase to improve readability.
14500      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14501      # Now convert it back to Unix-stile (cygpath)
14502      input_path=`$CYGPATH -u "$shortmode_path"`
14503      new_path="$input_path"
14504    fi
14505  fi
14506
14507  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14508  if test "x$test_cygdrive_prefix" = x; then
14509    # As a simple fix, exclude /usr/bin since it's not a real path.
14510    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14511      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14512      # a path prefixed by /cygdrive for fixpath to work.
14513      new_path="$CYGWIN_ROOT_PATH$input_path"
14514    fi
14515  fi
14516
14517
14518  if test "x$path" != "x$new_path"; then
14519    BOOT_JDK="$new_path"
14520    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14521$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14522  fi
14523
14524  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14525
14526  path="$BOOT_JDK"
14527  has_colon=`$ECHO $path | $GREP ^.:`
14528  new_path="$path"
14529  if test "x$has_colon" = x; then
14530    # Not in mixed or Windows style, start by that.
14531    new_path=`cmd //c echo $path`
14532  fi
14533
14534
14535  input_path="$new_path"
14536  # Check if we need to convert this using DOS-style short mode. If the path
14537  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14538  # take no chances and rewrite it.
14539  # Note: m4 eats our [], so we need to use [ and ] instead.
14540  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14541  if test "x$has_forbidden_chars" != x; then
14542    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14543    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14544  fi
14545
14546
14547  windows_path="$new_path"
14548  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14549    unix_path=`$CYGPATH -u "$windows_path"`
14550    new_path="$unix_path"
14551  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14552    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14553    new_path="$unix_path"
14554  fi
14555
14556  if test "x$path" != "x$new_path"; then
14557    BOOT_JDK="$new_path"
14558    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14559$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14560  fi
14561
14562  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14563  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14564
14565  else
14566    # We're on a posix platform. Hooray! :)
14567    path="$BOOT_JDK"
14568    has_space=`$ECHO "$path" | $GREP " "`
14569    if test "x$has_space" != x; then
14570      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14571$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14572      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14573    fi
14574
14575    # Use eval to expand a potential ~
14576    eval path="$path"
14577    if test ! -f "$path" && test ! -d "$path"; then
14578      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14579    fi
14580
14581    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14582  fi
14583
14584              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14585$as_echo_n "checking for Boot JDK... " >&6; }
14586              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14587$as_echo "$BOOT_JDK" >&6; }
14588              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14589$as_echo_n "checking Boot JDK version... " >&6; }
14590              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14591              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14592$as_echo "$BOOT_JDK_VERSION" >&6; }
14593            fi # end check jdk version
14594          fi # end check rt.jar
14595        fi # end check javac
14596      fi # end check java
14597    fi # end check boot jdk found
14598  fi
14599
14600    done
14601  fi
14602
14603
14604    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14605    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14606      # Do we have a bin/java?
14607      if test ! -x "$BOOT_JDK/bin/java"; then
14608        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14609$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14610        BOOT_JDK_FOUND=no
14611      else
14612        # Do we have a bin/javac?
14613        if test ! -x "$BOOT_JDK/bin/javac"; then
14614          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14615$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14616          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14617$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14618          BOOT_JDK_FOUND=no
14619        else
14620          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14621          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14622            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14623$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14624            BOOT_JDK_FOUND=no
14625          else
14626            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14627            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14628
14629            # Extra M4 quote needed to protect [] in grep expression.
14630            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14631            if test "x$FOUND_VERSION_78" = x; then
14632              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14633$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14634              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14635$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14636              BOOT_JDK_FOUND=no
14637            else
14638              # We're done! :-)
14639              BOOT_JDK_FOUND=yes
14640
14641  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14642
14643  # Input might be given as Windows format, start by converting to
14644  # unix format.
14645  path="$BOOT_JDK"
14646  new_path=`$CYGPATH -u "$path"`
14647
14648  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14649  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14650  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14651  # "foo.exe" is OK but "foo" is an error.
14652  #
14653  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14654  # It is also a way to make sure we got the proper file name for the real test later on.
14655  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14656  if test "x$test_shortpath" = x; then
14657    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14658$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14659    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14660  fi
14661
14662  # Call helper function which possibly converts this using DOS-style short mode.
14663  # If so, the updated path is stored in $new_path.
14664
14665  input_path="$new_path"
14666  # Check if we need to convert this using DOS-style short mode. If the path
14667  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14668  # take no chances and rewrite it.
14669  # Note: m4 eats our [], so we need to use [ and ] instead.
14670  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14671  if test "x$has_forbidden_chars" != x; then
14672    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14673    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14674    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14675    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14676      # Going to short mode and back again did indeed matter. Since short mode is
14677      # case insensitive, let's make it lowercase to improve readability.
14678      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14679      # Now convert it back to Unix-stile (cygpath)
14680      input_path=`$CYGPATH -u "$shortmode_path"`
14681      new_path="$input_path"
14682    fi
14683  fi
14684
14685  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14686  if test "x$test_cygdrive_prefix" = x; then
14687    # As a simple fix, exclude /usr/bin since it's not a real path.
14688    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14689      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14690      # a path prefixed by /cygdrive for fixpath to work.
14691      new_path="$CYGWIN_ROOT_PATH$input_path"
14692    fi
14693  fi
14694
14695
14696  if test "x$path" != "x$new_path"; then
14697    BOOT_JDK="$new_path"
14698    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14699$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14700  fi
14701
14702  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14703
14704  path="$BOOT_JDK"
14705  has_colon=`$ECHO $path | $GREP ^.:`
14706  new_path="$path"
14707  if test "x$has_colon" = x; then
14708    # Not in mixed or Windows style, start by that.
14709    new_path=`cmd //c echo $path`
14710  fi
14711
14712
14713  input_path="$new_path"
14714  # Check if we need to convert this using DOS-style short mode. If the path
14715  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14716  # take no chances and rewrite it.
14717  # Note: m4 eats our [], so we need to use [ and ] instead.
14718  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14719  if test "x$has_forbidden_chars" != x; then
14720    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14721    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14722  fi
14723
14724
14725  windows_path="$new_path"
14726  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14727    unix_path=`$CYGPATH -u "$windows_path"`
14728    new_path="$unix_path"
14729  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14730    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14731    new_path="$unix_path"
14732  fi
14733
14734  if test "x$path" != "x$new_path"; then
14735    BOOT_JDK="$new_path"
14736    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14737$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14738  fi
14739
14740  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14741  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14742
14743  else
14744    # We're on a posix platform. Hooray! :)
14745    path="$BOOT_JDK"
14746    has_space=`$ECHO "$path" | $GREP " "`
14747    if test "x$has_space" != x; then
14748      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14749$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14750      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14751    fi
14752
14753    # Use eval to expand a potential ~
14754    eval path="$path"
14755    if test ! -f "$path" && test ! -d "$path"; then
14756      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14757    fi
14758
14759    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14760  fi
14761
14762              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14763$as_echo_n "checking for Boot JDK... " >&6; }
14764              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14765$as_echo "$BOOT_JDK" >&6; }
14766              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14767$as_echo_n "checking Boot JDK version... " >&6; }
14768              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14769              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14770$as_echo "$BOOT_JDK_VERSION" >&6; }
14771            fi # end check jdk version
14772          fi # end check rt.jar
14773        fi # end check javac
14774      fi # end check java
14775    fi # end check boot jdk found
14776  fi
14777
14778
14779  if test "x$BOOT_JDK_FOUND" = xno; then
14780    # Now execute the test
14781
14782  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
14783  BOOT_JDK_SUFFIX="/Contents/Home"
14784  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14785  if test "x$ALL_JDKS_FOUND" != x; then
14786    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14787
14788  if test "x$BOOT_JDK_FOUND" = xno; then
14789    # Now execute the test
14790
14791        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14792        if test -d "$BOOT_JDK"; then
14793          BOOT_JDK_FOUND=maybe
14794          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14795$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14796        fi
14797
14798
14799    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14800    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14801      # Do we have a bin/java?
14802      if test ! -x "$BOOT_JDK/bin/java"; then
14803        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14804$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14805        BOOT_JDK_FOUND=no
14806      else
14807        # Do we have a bin/javac?
14808        if test ! -x "$BOOT_JDK/bin/javac"; then
14809          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14810$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14811          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14812$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14813          BOOT_JDK_FOUND=no
14814        else
14815          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14816          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14817            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14818$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14819            BOOT_JDK_FOUND=no
14820          else
14821            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14822            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14823
14824            # Extra M4 quote needed to protect [] in grep expression.
14825            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14826            if test "x$FOUND_VERSION_78" = x; then
14827              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14828$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14829              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14830$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14831              BOOT_JDK_FOUND=no
14832            else
14833              # We're done! :-)
14834              BOOT_JDK_FOUND=yes
14835
14836  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14837
14838  # Input might be given as Windows format, start by converting to
14839  # unix format.
14840  path="$BOOT_JDK"
14841  new_path=`$CYGPATH -u "$path"`
14842
14843  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14844  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14845  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14846  # "foo.exe" is OK but "foo" is an error.
14847  #
14848  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14849  # It is also a way to make sure we got the proper file name for the real test later on.
14850  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14851  if test "x$test_shortpath" = x; then
14852    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14853$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14854    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14855  fi
14856
14857  # Call helper function which possibly converts this using DOS-style short mode.
14858  # If so, the updated path is stored in $new_path.
14859
14860  input_path="$new_path"
14861  # Check if we need to convert this using DOS-style short mode. If the path
14862  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14863  # take no chances and rewrite it.
14864  # Note: m4 eats our [], so we need to use [ and ] instead.
14865  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14866  if test "x$has_forbidden_chars" != x; then
14867    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14868    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14869    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14870    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14871      # Going to short mode and back again did indeed matter. Since short mode is
14872      # case insensitive, let's make it lowercase to improve readability.
14873      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14874      # Now convert it back to Unix-stile (cygpath)
14875      input_path=`$CYGPATH -u "$shortmode_path"`
14876      new_path="$input_path"
14877    fi
14878  fi
14879
14880  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14881  if test "x$test_cygdrive_prefix" = x; then
14882    # As a simple fix, exclude /usr/bin since it's not a real path.
14883    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14884      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14885      # a path prefixed by /cygdrive for fixpath to work.
14886      new_path="$CYGWIN_ROOT_PATH$input_path"
14887    fi
14888  fi
14889
14890
14891  if test "x$path" != "x$new_path"; then
14892    BOOT_JDK="$new_path"
14893    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14894$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14895  fi
14896
14897  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14898
14899  path="$BOOT_JDK"
14900  has_colon=`$ECHO $path | $GREP ^.:`
14901  new_path="$path"
14902  if test "x$has_colon" = x; then
14903    # Not in mixed or Windows style, start by that.
14904    new_path=`cmd //c echo $path`
14905  fi
14906
14907
14908  input_path="$new_path"
14909  # Check if we need to convert this using DOS-style short mode. If the path
14910  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14911  # take no chances and rewrite it.
14912  # Note: m4 eats our [], so we need to use [ and ] instead.
14913  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14914  if test "x$has_forbidden_chars" != x; then
14915    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14916    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14917  fi
14918
14919
14920  windows_path="$new_path"
14921  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14922    unix_path=`$CYGPATH -u "$windows_path"`
14923    new_path="$unix_path"
14924  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14925    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14926    new_path="$unix_path"
14927  fi
14928
14929  if test "x$path" != "x$new_path"; then
14930    BOOT_JDK="$new_path"
14931    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14932$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14933  fi
14934
14935  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14936  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14937
14938  else
14939    # We're on a posix platform. Hooray! :)
14940    path="$BOOT_JDK"
14941    has_space=`$ECHO "$path" | $GREP " "`
14942    if test "x$has_space" != x; then
14943      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14944$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14945      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14946    fi
14947
14948    # Use eval to expand a potential ~
14949    eval path="$path"
14950    if test ! -f "$path" && test ! -d "$path"; then
14951      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14952    fi
14953
14954    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14955  fi
14956
14957              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14958$as_echo_n "checking for Boot JDK... " >&6; }
14959              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14960$as_echo "$BOOT_JDK" >&6; }
14961              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14962$as_echo_n "checking Boot JDK version... " >&6; }
14963              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14964              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14965$as_echo "$BOOT_JDK_VERSION" >&6; }
14966            fi # end check jdk version
14967          fi # end check rt.jar
14968        fi # end check javac
14969      fi # end check java
14970    fi # end check boot jdk found
14971  fi
14972
14973    done
14974  fi
14975
14976
14977    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14978    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14979      # Do we have a bin/java?
14980      if test ! -x "$BOOT_JDK/bin/java"; then
14981        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14982$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14983        BOOT_JDK_FOUND=no
14984      else
14985        # Do we have a bin/javac?
14986        if test ! -x "$BOOT_JDK/bin/javac"; then
14987          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14988$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14989          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14990$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14991          BOOT_JDK_FOUND=no
14992        else
14993          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14994          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14995            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14996$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14997            BOOT_JDK_FOUND=no
14998          else
14999            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15000            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15001
15002            # Extra M4 quote needed to protect [] in grep expression.
15003            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15004            if test "x$FOUND_VERSION_78" = x; then
15005              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15006$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15007              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15008$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15009              BOOT_JDK_FOUND=no
15010            else
15011              # We're done! :-)
15012              BOOT_JDK_FOUND=yes
15013
15014  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15015
15016  # Input might be given as Windows format, start by converting to
15017  # unix format.
15018  path="$BOOT_JDK"
15019  new_path=`$CYGPATH -u "$path"`
15020
15021  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15022  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15023  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15024  # "foo.exe" is OK but "foo" is an error.
15025  #
15026  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15027  # It is also a way to make sure we got the proper file name for the real test later on.
15028  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15029  if test "x$test_shortpath" = x; then
15030    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15031$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15032    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15033  fi
15034
15035  # Call helper function which possibly converts this using DOS-style short mode.
15036  # If so, the updated path is stored in $new_path.
15037
15038  input_path="$new_path"
15039  # Check if we need to convert this using DOS-style short mode. If the path
15040  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15041  # take no chances and rewrite it.
15042  # Note: m4 eats our [], so we need to use [ and ] instead.
15043  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15044  if test "x$has_forbidden_chars" != x; then
15045    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15046    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15047    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15048    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15049      # Going to short mode and back again did indeed matter. Since short mode is
15050      # case insensitive, let's make it lowercase to improve readability.
15051      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15052      # Now convert it back to Unix-stile (cygpath)
15053      input_path=`$CYGPATH -u "$shortmode_path"`
15054      new_path="$input_path"
15055    fi
15056  fi
15057
15058  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15059  if test "x$test_cygdrive_prefix" = x; then
15060    # As a simple fix, exclude /usr/bin since it's not a real path.
15061    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15062      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15063      # a path prefixed by /cygdrive for fixpath to work.
15064      new_path="$CYGWIN_ROOT_PATH$input_path"
15065    fi
15066  fi
15067
15068
15069  if test "x$path" != "x$new_path"; then
15070    BOOT_JDK="$new_path"
15071    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15072$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15073  fi
15074
15075  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15076
15077  path="$BOOT_JDK"
15078  has_colon=`$ECHO $path | $GREP ^.:`
15079  new_path="$path"
15080  if test "x$has_colon" = x; then
15081    # Not in mixed or Windows style, start by that.
15082    new_path=`cmd //c echo $path`
15083  fi
15084
15085
15086  input_path="$new_path"
15087  # Check if we need to convert this using DOS-style short mode. If the path
15088  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15089  # take no chances and rewrite it.
15090  # Note: m4 eats our [], so we need to use [ and ] instead.
15091  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15092  if test "x$has_forbidden_chars" != x; then
15093    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15094    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15095  fi
15096
15097
15098  windows_path="$new_path"
15099  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15100    unix_path=`$CYGPATH -u "$windows_path"`
15101    new_path="$unix_path"
15102  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15103    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15104    new_path="$unix_path"
15105  fi
15106
15107  if test "x$path" != "x$new_path"; then
15108    BOOT_JDK="$new_path"
15109    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15110$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15111  fi
15112
15113  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15114  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15115
15116  else
15117    # We're on a posix platform. Hooray! :)
15118    path="$BOOT_JDK"
15119    has_space=`$ECHO "$path" | $GREP " "`
15120    if test "x$has_space" != x; then
15121      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15122$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15123      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15124    fi
15125
15126    # Use eval to expand a potential ~
15127    eval path="$path"
15128    if test ! -f "$path" && test ! -d "$path"; then
15129      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15130    fi
15131
15132    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
15133  fi
15134
15135              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15136$as_echo_n "checking for Boot JDK... " >&6; }
15137              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15138$as_echo "$BOOT_JDK" >&6; }
15139              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15140$as_echo_n "checking Boot JDK version... " >&6; }
15141              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15142              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15143$as_echo "$BOOT_JDK_VERSION" >&6; }
15144            fi # end check jdk version
15145          fi # end check rt.jar
15146        fi # end check javac
15147      fi # end check java
15148    fi # end check boot jdk found
15149  fi
15150
15151  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
15152
15153  if test "x$BOOT_JDK_FOUND" = xno; then
15154    # Now execute the test
15155
15156  BOOT_JDK_PREFIX="/usr/lib/jvm"
15157  BOOT_JDK_SUFFIX=""
15158  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
15159  if test "x$ALL_JDKS_FOUND" != x; then
15160    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
15161
15162  if test "x$BOOT_JDK_FOUND" = xno; then
15163    # Now execute the test
15164
15165        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
15166        if test -d "$BOOT_JDK"; then
15167          BOOT_JDK_FOUND=maybe
15168          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
15169$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
15170        fi
15171
15172
15173    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15174    if test "x$BOOT_JDK_FOUND" = xmaybe; then
15175      # Do we have a bin/java?
15176      if test ! -x "$BOOT_JDK/bin/java"; then
15177        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15178$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15179        BOOT_JDK_FOUND=no
15180      else
15181        # Do we have a bin/javac?
15182        if test ! -x "$BOOT_JDK/bin/javac"; then
15183          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15184$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15185          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15186$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15187          BOOT_JDK_FOUND=no
15188        else
15189          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15190          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15191            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15192$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15193            BOOT_JDK_FOUND=no
15194          else
15195            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15196            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15197
15198            # Extra M4 quote needed to protect [] in grep expression.
15199            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15200            if test "x$FOUND_VERSION_78" = x; then
15201              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15202$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15203              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15204$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15205              BOOT_JDK_FOUND=no
15206            else
15207              # We're done! :-)
15208              BOOT_JDK_FOUND=yes
15209
15210  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15211
15212  # Input might be given as Windows format, start by converting to
15213  # unix format.
15214  path="$BOOT_JDK"
15215  new_path=`$CYGPATH -u "$path"`
15216
15217  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15218  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15219  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15220  # "foo.exe" is OK but "foo" is an error.
15221  #
15222  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15223  # It is also a way to make sure we got the proper file name for the real test later on.
15224  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15225  if test "x$test_shortpath" = x; then
15226    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15227$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15228    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15229  fi
15230
15231  # Call helper function which possibly converts this using DOS-style short mode.
15232  # If so, the updated path is stored in $new_path.
15233
15234  input_path="$new_path"
15235  # Check if we need to convert this using DOS-style short mode. If the path
15236  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15237  # take no chances and rewrite it.
15238  # Note: m4 eats our [], so we need to use [ and ] instead.
15239  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15240  if test "x$has_forbidden_chars" != x; then
15241    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15242    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15243    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15244    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15245      # Going to short mode and back again did indeed matter. Since short mode is
15246      # case insensitive, let's make it lowercase to improve readability.
15247      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15248      # Now convert it back to Unix-stile (cygpath)
15249      input_path=`$CYGPATH -u "$shortmode_path"`
15250      new_path="$input_path"
15251    fi
15252  fi
15253
15254  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15255  if test "x$test_cygdrive_prefix" = x; then
15256    # As a simple fix, exclude /usr/bin since it's not a real path.
15257    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15258      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15259      # a path prefixed by /cygdrive for fixpath to work.
15260      new_path="$CYGWIN_ROOT_PATH$input_path"
15261    fi
15262  fi
15263
15264
15265  if test "x$path" != "x$new_path"; then
15266    BOOT_JDK="$new_path"
15267    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15268$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15269  fi
15270
15271  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15272
15273  path="$BOOT_JDK"
15274  has_colon=`$ECHO $path | $GREP ^.:`
15275  new_path="$path"
15276  if test "x$has_colon" = x; then
15277    # Not in mixed or Windows style, start by that.
15278    new_path=`cmd //c echo $path`
15279  fi
15280
15281
15282  input_path="$new_path"
15283  # Check if we need to convert this using DOS-style short mode. If the path
15284  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15285  # take no chances and rewrite it.
15286  # Note: m4 eats our [], so we need to use [ and ] instead.
15287  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15288  if test "x$has_forbidden_chars" != x; then
15289    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15290    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15291  fi
15292
15293
15294  windows_path="$new_path"
15295  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15296    unix_path=`$CYGPATH -u "$windows_path"`
15297    new_path="$unix_path"
15298  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15299    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15300    new_path="$unix_path"
15301  fi
15302
15303  if test "x$path" != "x$new_path"; then
15304    BOOT_JDK="$new_path"
15305    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15306$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15307  fi
15308
15309  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15310  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15311
15312  else
15313    # We're on a posix platform. Hooray! :)
15314    path="$BOOT_JDK"
15315    has_space=`$ECHO "$path" | $GREP " "`
15316    if test "x$has_space" != x; then
15317      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15318$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15319      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15320    fi
15321
15322    # Use eval to expand a potential ~
15323    eval path="$path"
15324    if test ! -f "$path" && test ! -d "$path"; then
15325      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15326    fi
15327
15328    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
15329  fi
15330
15331              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15332$as_echo_n "checking for Boot JDK... " >&6; }
15333              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15334$as_echo "$BOOT_JDK" >&6; }
15335              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15336$as_echo_n "checking Boot JDK version... " >&6; }
15337              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15338              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15339$as_echo "$BOOT_JDK_VERSION" >&6; }
15340            fi # end check jdk version
15341          fi # end check rt.jar
15342        fi # end check javac
15343      fi # end check java
15344    fi # end check boot jdk found
15345  fi
15346
15347    done
15348  fi
15349
15350
15351    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15352    if test "x$BOOT_JDK_FOUND" = xmaybe; then
15353      # Do we have a bin/java?
15354      if test ! -x "$BOOT_JDK/bin/java"; then
15355        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15356$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15357        BOOT_JDK_FOUND=no
15358      else
15359        # Do we have a bin/javac?
15360        if test ! -x "$BOOT_JDK/bin/javac"; then
15361          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15362$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15363          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15364$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15365          BOOT_JDK_FOUND=no
15366        else
15367          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15368          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15369            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15370$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15371            BOOT_JDK_FOUND=no
15372          else
15373            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15374            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15375
15376            # Extra M4 quote needed to protect [] in grep expression.
15377            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15378            if test "x$FOUND_VERSION_78" = x; then
15379              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15380$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15381              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15382$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15383              BOOT_JDK_FOUND=no
15384            else
15385              # We're done! :-)
15386              BOOT_JDK_FOUND=yes
15387
15388  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15389
15390  # Input might be given as Windows format, start by converting to
15391  # unix format.
15392  path="$BOOT_JDK"
15393  new_path=`$CYGPATH -u "$path"`
15394
15395  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15396  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15397  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15398  # "foo.exe" is OK but "foo" is an error.
15399  #
15400  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15401  # It is also a way to make sure we got the proper file name for the real test later on.
15402  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15403  if test "x$test_shortpath" = x; then
15404    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15405$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15406    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15407  fi
15408
15409  # Call helper function which possibly converts this using DOS-style short mode.
15410  # If so, the updated path is stored in $new_path.
15411
15412  input_path="$new_path"
15413  # Check if we need to convert this using DOS-style short mode. If the path
15414  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15415  # take no chances and rewrite it.
15416  # Note: m4 eats our [], so we need to use [ and ] instead.
15417  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15418  if test "x$has_forbidden_chars" != x; then
15419    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15420    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15421    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15422    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15423      # Going to short mode and back again did indeed matter. Since short mode is
15424      # case insensitive, let's make it lowercase to improve readability.
15425      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15426      # Now convert it back to Unix-stile (cygpath)
15427      input_path=`$CYGPATH -u "$shortmode_path"`
15428      new_path="$input_path"
15429    fi
15430  fi
15431
15432  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15433  if test "x$test_cygdrive_prefix" = x; then
15434    # As a simple fix, exclude /usr/bin since it's not a real path.
15435    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15436      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15437      # a path prefixed by /cygdrive for fixpath to work.
15438      new_path="$CYGWIN_ROOT_PATH$input_path"
15439    fi
15440  fi
15441
15442
15443  if test "x$path" != "x$new_path"; then
15444    BOOT_JDK="$new_path"
15445    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15446$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15447  fi
15448
15449  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15450
15451  path="$BOOT_JDK"
15452  has_colon=`$ECHO $path | $GREP ^.:`
15453  new_path="$path"
15454  if test "x$has_colon" = x; then
15455    # Not in mixed or Windows style, start by that.
15456    new_path=`cmd //c echo $path`
15457  fi
15458
15459
15460  input_path="$new_path"
15461  # Check if we need to convert this using DOS-style short mode. If the path
15462  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15463  # take no chances and rewrite it.
15464  # Note: m4 eats our [], so we need to use [ and ] instead.
15465  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15466  if test "x$has_forbidden_chars" != x; then
15467    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15468    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15469  fi
15470
15471
15472  windows_path="$new_path"
15473  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15474    unix_path=`$CYGPATH -u "$windows_path"`
15475    new_path="$unix_path"
15476  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15477    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15478    new_path="$unix_path"
15479  fi
15480
15481  if test "x$path" != "x$new_path"; then
15482    BOOT_JDK="$new_path"
15483    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15484$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15485  fi
15486
15487  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15488  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15489
15490  else
15491    # We're on a posix platform. Hooray! :)
15492    path="$BOOT_JDK"
15493    has_space=`$ECHO "$path" | $GREP " "`
15494    if test "x$has_space" != x; then
15495      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15496$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15497      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15498    fi
15499
15500    # Use eval to expand a potential ~
15501    eval path="$path"
15502    if test ! -f "$path" && test ! -d "$path"; then
15503      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15504    fi
15505
15506    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
15507  fi
15508
15509              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15510$as_echo_n "checking for Boot JDK... " >&6; }
15511              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15512$as_echo "$BOOT_JDK" >&6; }
15513              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15514$as_echo_n "checking Boot JDK version... " >&6; }
15515              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15516              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15517$as_echo "$BOOT_JDK_VERSION" >&6; }
15518            fi # end check jdk version
15519          fi # end check rt.jar
15520        fi # end check javac
15521      fi # end check java
15522    fi # end check boot jdk found
15523  fi
15524
15525  fi
15526
15527
15528    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15529    if test "x$BOOT_JDK_FOUND" = xmaybe; then
15530      # Do we have a bin/java?
15531      if test ! -x "$BOOT_JDK/bin/java"; then
15532        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15533$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15534        BOOT_JDK_FOUND=no
15535      else
15536        # Do we have a bin/javac?
15537        if test ! -x "$BOOT_JDK/bin/javac"; then
15538          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15539$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15540          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15541$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15542          BOOT_JDK_FOUND=no
15543        else
15544          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15545          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15546            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15547$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15548            BOOT_JDK_FOUND=no
15549          else
15550            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15551            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15552
15553            # Extra M4 quote needed to protect [] in grep expression.
15554            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15555            if test "x$FOUND_VERSION_78" = x; then
15556              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15557$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15558              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15559$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15560              BOOT_JDK_FOUND=no
15561            else
15562              # We're done! :-)
15563              BOOT_JDK_FOUND=yes
15564
15565  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15566
15567  # Input might be given as Windows format, start by converting to
15568  # unix format.
15569  path="$BOOT_JDK"
15570  new_path=`$CYGPATH -u "$path"`
15571
15572  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15573  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15574  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15575  # "foo.exe" is OK but "foo" is an error.
15576  #
15577  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15578  # It is also a way to make sure we got the proper file name for the real test later on.
15579  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15580  if test "x$test_shortpath" = x; then
15581    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15582$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15583    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15584  fi
15585
15586  # Call helper function which possibly converts this using DOS-style short mode.
15587  # If so, the updated path is stored in $new_path.
15588
15589  input_path="$new_path"
15590  # Check if we need to convert this using DOS-style short mode. If the path
15591  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15592  # take no chances and rewrite it.
15593  # Note: m4 eats our [], so we need to use [ and ] instead.
15594  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15595  if test "x$has_forbidden_chars" != x; then
15596    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15597    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15598    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15599    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15600      # Going to short mode and back again did indeed matter. Since short mode is
15601      # case insensitive, let's make it lowercase to improve readability.
15602      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15603      # Now convert it back to Unix-stile (cygpath)
15604      input_path=`$CYGPATH -u "$shortmode_path"`
15605      new_path="$input_path"
15606    fi
15607  fi
15608
15609  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15610  if test "x$test_cygdrive_prefix" = x; then
15611    # As a simple fix, exclude /usr/bin since it's not a real path.
15612    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15613      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15614      # a path prefixed by /cygdrive for fixpath to work.
15615      new_path="$CYGWIN_ROOT_PATH$input_path"
15616    fi
15617  fi
15618
15619
15620  if test "x$path" != "x$new_path"; then
15621    BOOT_JDK="$new_path"
15622    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15623$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15624  fi
15625
15626  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15627
15628  path="$BOOT_JDK"
15629  has_colon=`$ECHO $path | $GREP ^.:`
15630  new_path="$path"
15631  if test "x$has_colon" = x; then
15632    # Not in mixed or Windows style, start by that.
15633    new_path=`cmd //c echo $path`
15634  fi
15635
15636
15637  input_path="$new_path"
15638  # Check if we need to convert this using DOS-style short mode. If the path
15639  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15640  # take no chances and rewrite it.
15641  # Note: m4 eats our [], so we need to use [ and ] instead.
15642  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15643  if test "x$has_forbidden_chars" != x; then
15644    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15645    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15646  fi
15647
15648
15649  windows_path="$new_path"
15650  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15651    unix_path=`$CYGPATH -u "$windows_path"`
15652    new_path="$unix_path"
15653  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15654    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15655    new_path="$unix_path"
15656  fi
15657
15658  if test "x$path" != "x$new_path"; then
15659    BOOT_JDK="$new_path"
15660    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15661$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15662  fi
15663
15664  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15665  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15666
15667  else
15668    # We're on a posix platform. Hooray! :)
15669    path="$BOOT_JDK"
15670    has_space=`$ECHO "$path" | $GREP " "`
15671    if test "x$has_space" != x; then
15672      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15673$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15674      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15675    fi
15676
15677    # Use eval to expand a potential ~
15678    eval path="$path"
15679    if test ! -f "$path" && test ! -d "$path"; then
15680      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15681    fi
15682
15683    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
15684  fi
15685
15686              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15687$as_echo_n "checking for Boot JDK... " >&6; }
15688              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15689$as_echo "$BOOT_JDK" >&6; }
15690              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15691$as_echo_n "checking Boot JDK version... " >&6; }
15692              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15693              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15694$as_echo "$BOOT_JDK_VERSION" >&6; }
15695            fi # end check jdk version
15696          fi # end check rt.jar
15697        fi # end check javac
15698      fi # end check java
15699    fi # end check boot jdk found
15700  fi
15701
15702
15703# If we haven't found anything yet, we've truly lost. Give up.
15704if test "x$BOOT_JDK_FOUND" = xno; then
15705
15706    # Print a helpful message on how to acquire the necessary build dependency.
15707    # openjdk is the help tag: freetyp2, cups, pulse, alsa etc
15708    MISSING_DEPENDENCY=openjdk
15709    PKGHANDLER_COMMAND=
15710
15711    case $PKGHANDLER in
15712	apt-get)
15713                apt_help     $MISSING_DEPENDENCY ;;
15714    yum)
15715                yum_help     $MISSING_DEPENDENCY ;;
15716	port)
15717                port_help    $MISSING_DEPENDENCY ;;
15718	pkgutil)
15719                pkgutil_help $MISSING_DEPENDENCY ;;
15720	pkgadd)
15721                pkgadd_help  $MISSING_DEPENDENCY ;;
15722    * )
15723      break ;;
15724    esac
15725
15726    if test "x$PKGHANDLER_COMMAND" != x; then
15727        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
15728    fi
15729
15730  { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
15731$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
15732  { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
15733$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15734  as_fn_error $? "Cannot continue" "$LINENO" 5
15735fi
15736
15737# Setup proper paths for what we found
15738BOOT_RTJAR="$BOOT_JDK/jre/lib/rt.jar"
15739if test ! -f "$BOOT_RTJAR"; then
15740    # On MacOSX it is called classes.jar
15741    BOOT_RTJAR="$BOOT_JDK/../Classes/classes.jar"
15742    if test -f "$BOOT_RTJAR"; then
15743      # Remove the ..
15744      BOOT_RTJAR="`cd ${BOOT_RTJAR%/*} && pwd`/${BOOT_RTJAR##*/}"
15745    fi
15746fi
15747BOOT_TOOLSJAR="$BOOT_JDK/lib/tools.jar"
15748BOOT_JDK="$BOOT_JDK"
15749
15750
15751
15752
15753# Setup tools from the Boot JDK.
15754
15755  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
15756$as_echo_n "checking for java in Boot JDK... " >&6; }
15757  JAVA=$BOOT_JDK/bin/java
15758  if test ! -x $JAVA; then
15759      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15760$as_echo "not found" >&6; }
15761      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15762$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15763      as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
15764  fi
15765  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15766$as_echo "ok" >&6; }
15767
15768
15769  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
15770$as_echo_n "checking for javac in Boot JDK... " >&6; }
15771  JAVAC=$BOOT_JDK/bin/javac
15772  if test ! -x $JAVAC; then
15773      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15774$as_echo "not found" >&6; }
15775      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15776$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15777      as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
15778  fi
15779  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15780$as_echo "ok" >&6; }
15781
15782
15783  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
15784$as_echo_n "checking for javah in Boot JDK... " >&6; }
15785  JAVAH=$BOOT_JDK/bin/javah
15786  if test ! -x $JAVAH; then
15787      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15788$as_echo "not found" >&6; }
15789      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15790$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15791      as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
15792  fi
15793  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15794$as_echo "ok" >&6; }
15795
15796
15797  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javap in Boot JDK" >&5
15798$as_echo_n "checking for javap in Boot JDK... " >&6; }
15799  JAVAP=$BOOT_JDK/bin/javap
15800  if test ! -x $JAVAP; then
15801      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15802$as_echo "not found" >&6; }
15803      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15804$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15805      as_fn_error $? "Could not find javap in the Boot JDK" "$LINENO" 5
15806  fi
15807  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15808$as_echo "ok" >&6; }
15809
15810
15811  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
15812$as_echo_n "checking for jar in Boot JDK... " >&6; }
15813  JAR=$BOOT_JDK/bin/jar
15814  if test ! -x $JAR; then
15815      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15816$as_echo "not found" >&6; }
15817      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15818$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15819      as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
15820  fi
15821  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15822$as_echo "ok" >&6; }
15823
15824
15825  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rmic in Boot JDK" >&5
15826$as_echo_n "checking for rmic in Boot JDK... " >&6; }
15827  RMIC=$BOOT_JDK/bin/rmic
15828  if test ! -x $RMIC; then
15829      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15830$as_echo "not found" >&6; }
15831      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15832$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15833      as_fn_error $? "Could not find rmic in the Boot JDK" "$LINENO" 5
15834  fi
15835  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15836$as_echo "ok" >&6; }
15837
15838
15839  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5
15840$as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
15841  NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
15842  if test ! -x $NATIVE2ASCII; then
15843      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15844$as_echo "not found" >&6; }
15845      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15846$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15847      as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5
15848  fi
15849  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15850$as_echo "ok" >&6; }
15851
15852
15853# Finally, set some other options...
15854
15855# When compiling code to be executed by the Boot JDK, force jdk7 compatibility.
15856BOOT_JDK_SOURCETARGET="-source 7 -target 7"
15857
15858
15859
15860
15861##############################################################################
15862#
15863# Specify options for anything that is run with the Boot JDK.
15864#
15865
15866# Check whether --with-boot-jdk-jvmargs was given.
15867if test "${with_boot_jdk_jvmargs+set}" = set; then :
15868  withval=$with_boot_jdk_jvmargs;
15869fi
15870
15871
15872if test "x$with_boot_jdk_jvmargs" = x; then
15873    # Not all JVM:s accept the same arguments on the command line.
15874    # OpenJDK specific increase in thread stack for JDK build,
15875    # well more specifically, when running javac.
15876    if test "x$BUILD_NUM_BITS" = x32; then
15877       STACK_SIZE=768
15878    else
15879       # Running Javac on a JVM on a 64-bit machine, the stack takes more space
15880       # since 64-bit pointers are pushed on the stach. Apparently, we need
15881       # to increase the stack space when javacing the JDK....
15882       STACK_SIZE=1536
15883    fi
15884
15885    # Minimum amount of heap memory.
15886
15887    $ECHO "Check if jvm arg is ok: -Xms64M" >&5
15888    $ECHO "Command: $JAVA -Xms64M -version" >&5
15889    OUTPUT=`$JAVA -Xms64M -version 2>&1`
15890    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
15891    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
15892    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15893        boot_jdk_jvmargs="$boot_jdk_jvmargs -Xms64M"
15894	JVM_ARG_OK=true
15895    else
15896	$ECHO "Arg failed:" >&5
15897	$ECHO "$OUTPUT" >&5
15898	JVM_ARG_OK=false
15899    fi
15900
15901    if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
15902        # Why does macosx need more heap? Its the huge JDK batch.
15903
15904    $ECHO "Check if jvm arg is ok: -Xmx1600M" >&5
15905    $ECHO "Command: $JAVA -Xmx1600M -version" >&5
15906    OUTPUT=`$JAVA -Xmx1600M -version 2>&1`
15907    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
15908    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
15909    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15910        boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1600M"
15911	JVM_ARG_OK=true
15912    else
15913	$ECHO "Arg failed:" >&5
15914	$ECHO "$OUTPUT" >&5
15915	JVM_ARG_OK=false
15916    fi
15917
15918    else
15919
15920    $ECHO "Check if jvm arg is ok: -Xmx1100M" >&5
15921    $ECHO "Command: $JAVA -Xmx1100M -version" >&5
15922    OUTPUT=`$JAVA -Xmx1100M -version 2>&1`
15923    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
15924    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
15925    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15926        boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1100M"
15927	JVM_ARG_OK=true
15928    else
15929	$ECHO "Arg failed:" >&5
15930	$ECHO "$OUTPUT" >&5
15931	JVM_ARG_OK=false
15932    fi
15933
15934    fi
15935    # When is adding -client something that speeds up the JVM?
15936    # ADD_JVM_ARG_IF_OK([-client],boot_jdk_jvmargs,[$JAVA])
15937
15938    $ECHO "Check if jvm arg is ok: -XX:PermSize=32m" >&5
15939    $ECHO "Command: $JAVA -XX:PermSize=32m -version" >&5
15940    OUTPUT=`$JAVA -XX:PermSize=32m -version 2>&1`
15941    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
15942    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
15943    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15944        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:PermSize=32m"
15945	JVM_ARG_OK=true
15946    else
15947	$ECHO "Arg failed:" >&5
15948	$ECHO "$OUTPUT" >&5
15949	JVM_ARG_OK=false
15950    fi
15951
15952
15953    $ECHO "Check if jvm arg is ok: -XX:MaxPermSize=160m" >&5
15954    $ECHO "Command: $JAVA -XX:MaxPermSize=160m -version" >&5
15955    OUTPUT=`$JAVA -XX:MaxPermSize=160m -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:MaxPermSize=160m"
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:ThreadStackSize=$STACK_SIZE" >&5
15969    $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
15970    OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -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:ThreadStackSize=$STACK_SIZE"
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    # Disable special log output when a debug build is used as Boot JDK...
15983
15984    $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
15985    $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
15986    OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
15987    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
15988    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
15989    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15990        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
15991	JVM_ARG_OK=true
15992    else
15993	$ECHO "Arg failed:" >&5
15994	$ECHO "$OUTPUT" >&5
15995	JVM_ARG_OK=false
15996    fi
15997
15998fi
15999
16000BOOT_JDK_JVMARGS=$boot_jdk_jvmargs
16001
16002
16003
16004###############################################################################
16005#
16006# Configure the sources to use. We can add or override individual directories.
16007#
16008###############################################################################
16009
16010
16011
16012# Where are the sources. Any of these can be overridden
16013# using --with-override-corba and the likes.
16014LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
16015CORBA_TOPDIR="$SRC_ROOT/corba"
16016JAXP_TOPDIR="$SRC_ROOT/jaxp"
16017JAXWS_TOPDIR="$SRC_ROOT/jaxws"
16018HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
16019NASHORN_TOPDIR="$SRC_ROOT/nashorn"
16020JDK_TOPDIR="$SRC_ROOT/jdk"
16021
16022
16023
16024
16025
16026
16027
16028
16029
16030
16031###############################################################################
16032#
16033# Pickup additional source for a component from outside of the source root
16034# or override source for a component.
16035#
16036
16037# Check whether --with-add-source-root was given.
16038if test "${with_add_source_root+set}" = set; then :
16039  withval=$with_add_source_root;
16040fi
16041
16042
16043
16044# Check whether --with-override-source-root was given.
16045if test "${with_override_source_root+set}" = set; then :
16046  withval=$with_override_source_root;
16047fi
16048
16049
16050
16051# Check whether --with-adds-and-overrides was given.
16052if test "${with_adds_and_overrides+set}" = set; then :
16053  withval=$with_adds_and_overrides;
16054fi
16055
16056
16057if test "x$with_adds_and_overrides" != x; then
16058    with_add_source_root="$with_adds_and_overrides/adds"
16059    with_override_source_root="$with_adds_and_overrides/overrides"
16060fi
16061
16062if test "x$with_add_source_root" != x; then
16063    if ! test -d $with_add_source_root; then
16064       as_fn_error $? "Trying to use a non-existant add-source-root $with_add_source_root" "$LINENO" 5
16065    fi
16066    CURDIR="$PWD"
16067    cd "$with_add_source_root"
16068    ADD_SRC_ROOT="`pwd`"
16069    cd "$CURDIR"
16070    # Verify that the addon source root does not have any root makefiles.
16071    # If it does, then it is usually an error, prevent this.
16072    if test -f $with_add_source_root/langtools/makefiles/Makefile || \
16073       test -f $with_add_source_root/langtools/make/Makefile; then
16074        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
16075    fi
16076    if test -f $with_add_source_root/corba/makefiles/Makefile || \
16077       test -f $with_add_source_root/corba/make/Makefile; then
16078        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
16079    fi
16080    if test -f $with_add_source_root/jaxp/makefiles/Makefile || \
16081       test -f $with_add_source_root/jaxp/make/Makefile; then
16082        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
16083    fi
16084    if test -f $with_add_source_root/jaxws/makefiles/Makefile || \
16085       test -f $with_add_source_root/jaxws/make/Makefile; then
16086        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
16087    fi
16088    if test -f $with_add_source_root/hotspot/makefiles/Makefile || \
16089       test -f $with_add_source_root/hotspot/make/Makefile; then
16090        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
16091    fi
16092    if test -f $with_add_source_root/nashorn/makefiles/Makefile || \
16093       test -f $with_add_source_root/nashorn/make/Makefile; then
16094        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
16095    fi
16096    if test -f $with_add_source_root/jdk/makefiles/Makefile || \
16097       test -f $with_add_source_root/jdk/make/Makefile; then
16098        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
16099    fi
16100fi
16101
16102
16103if test "x$with_override_source_root" != x; then
16104    if ! test -d $with_override_source_root; then
16105       as_fn_error $? "Trying to use a non-existant override-source-root $with_override_source_root" "$LINENO" 5
16106    fi
16107    CURDIR="$PWD"
16108    cd "$with_override_source_root"
16109    OVERRIDE_SRC_ROOT="`pwd`"
16110    cd "$CURDIR"
16111    if test -f $with_override_source_root/langtools/makefiles/Makefile || \
16112       test -f $with_override_source_root/langtools/make/Makefile; then
16113        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
16114    fi
16115    if test -f $with_override_source_root/corba/makefiles/Makefile || \
16116       test -f $with_override_source_root/corba/make/Makefile; then
16117        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
16118    fi
16119    if test -f $with_override_source_root/jaxp/makefiles/Makefile || \
16120       test -f $with_override_source_root/jaxp/make/Makefile; then
16121        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
16122    fi
16123    if test -f $with_override_source_root/jaxws/makefiles/Makefile || \
16124       test -f $with_override_source_root/jaxws/make/Makefile; then
16125        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
16126    fi
16127    if test -f $with_override_source_root/hotspot/makefiles/Makefile || \
16128       test -f $with_override_source_root/hotspot/make/Makefile; then
16129        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
16130    fi
16131    if test -f $with_override_source_root/nashorn/makefiles/Makefile || \
16132       test -f $with_override_source_root/nashorn/make/Makefile; then
16133        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
16134    fi
16135    if test -f $with_override_source_root/jdk/makefiles/Makefile || \
16136       test -f $with_override_source_root/jdk/make/Makefile; then
16137        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
16138    fi
16139fi
16140
16141
16142###############################################################################
16143#
16144# Override a repo completely, this is used for example when you have 3 small
16145# development sandboxes of the langtools sources and want to avoid having 3 full
16146# OpenJDK sources checked out on disk.
16147#
16148# Assuming that the 3 langtools sandboxes are located here:
16149# /home/fredrik/sandbox1/langtools
16150# /home/fredrik/sandbox2/langtools
16151# /home/fredrik/sandbox3/langtools
16152#
16153# From the source root you create build subdirs manually:
16154#     mkdir -p build1 build2 build3
16155# in each build directory run:
16156#     (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make)
16157#     (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make)
16158#     (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make)
16159#
16160
16161
16162# Check whether --with-override-langtools was given.
16163if test "${with_override_langtools+set}" = set; then :
16164  withval=$with_override_langtools;
16165fi
16166
16167
16168
16169# Check whether --with-override-corba was given.
16170if test "${with_override_corba+set}" = set; then :
16171  withval=$with_override_corba;
16172fi
16173
16174
16175
16176# Check whether --with-override-jaxp was given.
16177if test "${with_override_jaxp+set}" = set; then :
16178  withval=$with_override_jaxp;
16179fi
16180
16181
16182
16183# Check whether --with-override-jaxws was given.
16184if test "${with_override_jaxws+set}" = set; then :
16185  withval=$with_override_jaxws;
16186fi
16187
16188
16189
16190# Check whether --with-override-hotspot was given.
16191if test "${with_override_hotspot+set}" = set; then :
16192  withval=$with_override_hotspot;
16193fi
16194
16195
16196
16197# Check whether --with-override-nashorn was given.
16198if test "${with_override_nashorn+set}" = set; then :
16199  withval=$with_override_nashorn;
16200fi
16201
16202
16203
16204# Check whether --with-override-jdk was given.
16205if test "${with_override_jdk+set}" = set; then :
16206  withval=$with_override_jdk;
16207fi
16208
16209
16210if test "x$with_override_langtools" != x; then
16211    CURDIR="$PWD"
16212    cd "$with_override_langtools"
16213    LANGTOOLS_TOPDIR="`pwd`"
16214    cd "$CURDIR"
16215    if ! test -f $LANGTOOLS_TOPDIR/makefiles/Makefile; then
16216        as_fn_error $? "You have to override langtools with a full langtools repo!" "$LINENO" 5
16217    fi
16218    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if langtools should be overridden" >&5
16219$as_echo_n "checking if langtools should be overridden... " >&6; }
16220    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $LANGTOOLS_TOPDIR" >&5
16221$as_echo "yes with $LANGTOOLS_TOPDIR" >&6; }
16222fi
16223if test "x$with_override_corba" != x; then
16224    CURDIR="$PWD"
16225    cd "$with_override_corba"
16226    CORBA_TOPDIR="`pwd`"
16227    cd "$CURDIR"
16228    if ! test -f $CORBA_TOPDIR/makefiles/Makefile; then
16229        as_fn_error $? "You have to override corba with a full corba repo!" "$LINENO" 5
16230    fi
16231    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if corba should be overridden" >&5
16232$as_echo_n "checking if corba should be overridden... " >&6; }
16233    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $CORBA_TOPDIR" >&5
16234$as_echo "yes with $CORBA_TOPDIR" >&6; }
16235fi
16236if test "x$with_override_jaxp" != x; then
16237    CURDIR="$PWD"
16238    cd "$with_override_jaxp"
16239    JAXP_TOPDIR="`pwd`"
16240    cd "$CURDIR"
16241    if ! test -f $JAXP_TOPDIR/makefiles/Makefile; then
16242        as_fn_error $? "You have to override jaxp with a full jaxp repo!" "$LINENO" 5
16243    fi
16244    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxp should be overridden" >&5
16245$as_echo_n "checking if jaxp should be overridden... " >&6; }
16246    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXP_TOPDIR" >&5
16247$as_echo "yes with $JAXP_TOPDIR" >&6; }
16248fi
16249if test "x$with_override_jaxws" != x; then
16250    CURDIR="$PWD"
16251    cd "$with_override_jaxws"
16252    JAXWS_TOPDIR="`pwd`"
16253    cd "$CURDIR"
16254    if ! test -f $JAXWS_TOPDIR/makefiles/Makefile; then
16255        as_fn_error $? "You have to override jaxws with a full jaxws repo!" "$LINENO" 5
16256    fi
16257    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxws should be overridden" >&5
16258$as_echo_n "checking if jaxws should be overridden... " >&6; }
16259    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXWS_TOPDIR" >&5
16260$as_echo "yes with $JAXWS_TOPDIR" >&6; }
16261fi
16262if test "x$with_override_hotspot" != x; then
16263    CURDIR="$PWD"
16264    cd "$with_override_hotspot"
16265    HOTSPOT_TOPDIR="`pwd`"
16266    cd "$CURDIR"
16267    if ! test -f $HOTSPOT_TOPDIR/make/Makefile && \
16268       ! test -f $HOTSPOT_TOPDIR/makefiles/Makefile; then
16269        as_fn_error $? "You have to override hotspot with a full hotspot repo!" "$LINENO" 5
16270    fi
16271    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be overridden" >&5
16272$as_echo_n "checking if hotspot should be overridden... " >&6; }
16273    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $HOTSPOT_TOPDIR" >&5
16274$as_echo "yes with $HOTSPOT_TOPDIR" >&6; }
16275fi
16276if test "x$with_override_nashorn" != x; then
16277    CURDIR="$PWD"
16278    cd "$with_override_nashorn"
16279    NASHORN_TOPDIR="`pwd`"
16280    cd "$CURDIR"
16281    if ! test -f $NASHORN_TOPDIR/makefiles/Makefile; then
16282        as_fn_error $? "You have to override nashorn with a full nashorn repo!" "$LINENO" 5
16283    fi
16284    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if nashorn should be overridden" >&5
16285$as_echo_n "checking if nashorn should be overridden... " >&6; }
16286    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $NASHORN_TOPDIR" >&5
16287$as_echo "yes with $NASHORN_TOPDIR" >&6; }
16288fi
16289if test "x$with_override_jdk" != x; then
16290    CURDIR="$PWD"
16291    cd "$with_override_jdk"
16292    JDK_TOPDIR="`pwd`"
16293    cd "$CURDIR"
16294    if ! test -f $JDK_TOPDIR/makefiles/Makefile; then
16295        as_fn_error $? "You have to override JDK with a full JDK repo!" "$LINENO" 5
16296    fi
16297    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if JDK should be overridden" >&5
16298$as_echo_n "checking if JDK should be overridden... " >&6; }
16299    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JDK_TOPDIR" >&5
16300$as_echo "yes with $JDK_TOPDIR" >&6; }
16301fi
16302
16303
16304
16305BUILD_OUTPUT="$OUTPUT_ROOT"
16306
16307
16308HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
16309BUILD_HOTSPOT=true
16310
16311
16312
16313# Check whether --with-import-hotspot was given.
16314if test "${with_import_hotspot+set}" = set; then :
16315  withval=$with_import_hotspot;
16316fi
16317
16318if test "x$with_import_hotspot" != x; then
16319    CURDIR="$PWD"
16320    cd "$with_import_hotspot"
16321    HOTSPOT_DIST="`pwd`"
16322    cd "$CURDIR"
16323    if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
16324        as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
16325    fi
16326    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
16327$as_echo_n "checking if hotspot should be imported... " >&6; }
16328    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
16329$as_echo "yes from $HOTSPOT_DIST" >&6; }
16330    BUILD_HOTSPOT=false
16331fi
16332
16333JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
16334
16335
16336###############################################################################
16337#
16338# Setup the toolchain (compilers etc), i.e. the tools that need to be
16339# cross-compilation aware.
16340#
16341###############################################################################
16342
16343
16344###############################################################################
16345#
16346# Configure the development tool paths and potential sysroot.
16347#
16348ac_ext=cpp
16349ac_cpp='$CXXCPP $CPPFLAGS'
16350ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16351ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16352ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16353
16354
16355# The option used to specify the target .o,.a or .so file.
16356# When compiling, how to specify the to be created object file.
16357CC_OUT_OPTION='-o$(SPACE)'
16358# When linking, how to specify the to be created executable.
16359EXE_OUT_OPTION='-o$(SPACE)'
16360# When linking, how to specify the to be created dynamically linkable library.
16361LD_OUT_OPTION='-o$(SPACE)'
16362# When archiving, how to specify the to be create static archive for object files.
16363AR_OUT_OPTION='rcs$(SPACE)'
16364
16365
16366
16367
16368
16369# Locate the actual tools
16370
16371
16372# Check whether --with-jtreg was given.
16373if test "${with_jtreg+set}" = set; then :
16374  withval=$with_jtreg;
16375else
16376  with_jtreg=no
16377fi
16378
16379
16380  if test "x$with_jtreg" = xno; then
16381    # jtreg disabled
16382    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
16383$as_echo_n "checking for jtreg... " >&6; }
16384    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16385$as_echo "no" >&6; }
16386  else
16387    if test "x$with_jtreg" != xyes; then
16388      # with path specified.
16389      JT_HOME="$with_jtreg"
16390    fi
16391
16392    if test "x$JT_HOME" != x; then
16393      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
16394$as_echo_n "checking for jtreg... " >&6; }
16395
16396      # use JT_HOME enviroment var.
16397
16398  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16399
16400  # Input might be given as Windows format, start by converting to
16401  # unix format.
16402  path="$JT_HOME"
16403  new_path=`$CYGPATH -u "$path"`
16404
16405  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16406  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16407  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16408  # "foo.exe" is OK but "foo" is an error.
16409  #
16410  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16411  # It is also a way to make sure we got the proper file name for the real test later on.
16412  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16413  if test "x$test_shortpath" = x; then
16414    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
16415$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
16416    as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
16417  fi
16418
16419  # Call helper function which possibly converts this using DOS-style short mode.
16420  # If so, the updated path is stored in $new_path.
16421
16422  input_path="$new_path"
16423  # Check if we need to convert this using DOS-style short mode. If the path
16424  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16425  # take no chances and rewrite it.
16426  # Note: m4 eats our [], so we need to use [ and ] instead.
16427  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16428  if test "x$has_forbidden_chars" != x; then
16429    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16430    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16431    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16432    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16433      # Going to short mode and back again did indeed matter. Since short mode is
16434      # case insensitive, let's make it lowercase to improve readability.
16435      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16436      # Now convert it back to Unix-stile (cygpath)
16437      input_path=`$CYGPATH -u "$shortmode_path"`
16438      new_path="$input_path"
16439    fi
16440  fi
16441
16442  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16443  if test "x$test_cygdrive_prefix" = x; then
16444    # As a simple fix, exclude /usr/bin since it's not a real path.
16445    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16446      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16447      # a path prefixed by /cygdrive for fixpath to work.
16448      new_path="$CYGWIN_ROOT_PATH$input_path"
16449    fi
16450  fi
16451
16452
16453  if test "x$path" != "x$new_path"; then
16454    JT_HOME="$new_path"
16455    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
16456$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
16457  fi
16458
16459  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16460
16461  path="$JT_HOME"
16462  has_colon=`$ECHO $path | $GREP ^.:`
16463  new_path="$path"
16464  if test "x$has_colon" = x; then
16465    # Not in mixed or Windows style, start by that.
16466    new_path=`cmd //c echo $path`
16467  fi
16468
16469
16470  input_path="$new_path"
16471  # Check if we need to convert this using DOS-style short mode. If the path
16472  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16473  # take no chances and rewrite it.
16474  # Note: m4 eats our [], so we need to use [ and ] instead.
16475  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16476  if test "x$has_forbidden_chars" != x; then
16477    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16478    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16479  fi
16480
16481
16482  windows_path="$new_path"
16483  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16484    unix_path=`$CYGPATH -u "$windows_path"`
16485    new_path="$unix_path"
16486  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16487    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16488    new_path="$unix_path"
16489  fi
16490
16491  if test "x$path" != "x$new_path"; then
16492    JT_HOME="$new_path"
16493    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
16494$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
16495  fi
16496
16497  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16498  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16499
16500  else
16501    # We're on a posix platform. Hooray! :)
16502    path="$JT_HOME"
16503    has_space=`$ECHO "$path" | $GREP " "`
16504    if test "x$has_space" != x; then
16505      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
16506$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
16507      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16508    fi
16509
16510    # Use eval to expand a potential ~
16511    eval path="$path"
16512    if test ! -f "$path" && test ! -d "$path"; then
16513      as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
16514    fi
16515
16516    JT_HOME="`cd "$path"; $THEPWDCMD -L`"
16517  fi
16518
16519
16520      # jtreg win32 script works for everybody
16521      JTREGEXE="$JT_HOME/win32/bin/jtreg"
16522
16523      if test ! -f "$JTREGEXE"; then
16524        as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
16525      fi
16526
16527      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
16528$as_echo "$JTREGEXE" >&6; }
16529    else
16530      # try to find jtreg on path
16531
16532    for ac_prog in jtreg
16533do
16534  # Extract the first word of "$ac_prog", so it can be a program name with args.
16535set dummy $ac_prog; ac_word=$2
16536{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16537$as_echo_n "checking for $ac_word... " >&6; }
16538if ${ac_cv_path_JTREGEXE+:} false; then :
16539  $as_echo_n "(cached) " >&6
16540else
16541  case $JTREGEXE in
16542  [\\/]* | ?:[\\/]*)
16543  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
16544  ;;
16545  *)
16546  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16547for as_dir in $PATH
16548do
16549  IFS=$as_save_IFS
16550  test -z "$as_dir" && as_dir=.
16551    for ac_exec_ext in '' $ac_executable_extensions; do
16552  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16553    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
16554    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16555    break 2
16556  fi
16557done
16558  done
16559IFS=$as_save_IFS
16560
16561  ;;
16562esac
16563fi
16564JTREGEXE=$ac_cv_path_JTREGEXE
16565if test -n "$JTREGEXE"; then
16566  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
16567$as_echo "$JTREGEXE" >&6; }
16568else
16569  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16570$as_echo "no" >&6; }
16571fi
16572
16573
16574  test -n "$JTREGEXE" && break
16575done
16576
16577
16578    if test "x$JTREGEXE" = x; then
16579        if test "xjtreg" = x; then
16580          PROG_NAME=jtregexe
16581        else
16582          PROG_NAME=jtreg
16583        fi
16584        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
16585$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
16586        as_fn_error $? "Cannot continue" "$LINENO" 5
16587    fi
16588
16589
16590      JT_HOME="`$DIRNAME $JTREGEXE`"
16591    fi
16592  fi
16593
16594
16595
16596
16597
16598if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
16599
16600  # Store path to cygwin link.exe to help excluding it when searching for
16601  # VS linker. This must be done before changing the PATH when looking for VS.
16602  # Extract the first word of "link", so it can be a program name with args.
16603set dummy link; ac_word=$2
16604{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16605$as_echo_n "checking for $ac_word... " >&6; }
16606if ${ac_cv_path_CYGWIN_LINK+:} false; then :
16607  $as_echo_n "(cached) " >&6
16608else
16609  case $CYGWIN_LINK in
16610  [\\/]* | ?:[\\/]*)
16611  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
16612  ;;
16613  *)
16614  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16615for as_dir in $PATH
16616do
16617  IFS=$as_save_IFS
16618  test -z "$as_dir" && as_dir=.
16619    for ac_exec_ext in '' $ac_executable_extensions; do
16620  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16621    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
16622    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16623    break 2
16624  fi
16625done
16626  done
16627IFS=$as_save_IFS
16628
16629  ;;
16630esac
16631fi
16632CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
16633if test -n "$CYGWIN_LINK"; then
16634  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
16635$as_echo "$CYGWIN_LINK" >&6; }
16636else
16637  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16638$as_echo "no" >&6; }
16639fi
16640
16641
16642  if test "x$CYGWIN_LINK" != x; then
16643    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
16644$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
16645    "$CYGWIN_LINK" --version > /dev/null
16646    if test $? -eq 0 ; then
16647      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16648$as_echo "yes" >&6; }
16649    else
16650      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16651$as_echo "no" >&6; }
16652      # This might be the VS linker. Don't exclude it later on.
16653      CYGWIN_LINK=""
16654    fi
16655  fi
16656
16657  # First-hand choice is to locate and run the vsvars bat file.
16658
16659  if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16660    VCVARSFILE="vc/bin/vcvars32.bat"
16661  else
16662    VCVARSFILE="vc/bin/amd64/vcvars64.bat"
16663  fi
16664
16665  VS_ENV_CMD=""
16666  VS_ENV_ARGS=""
16667  if test "x$with_toolsdir" != x; then
16668
16669  if test "x$VS_ENV_CMD" = x; then
16670    VS100BASE="$with_toolsdir/../.."
16671    METHOD="--with-tools-dir"
16672
16673  windows_path="$VS100BASE"
16674  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16675    unix_path=`$CYGPATH -u "$windows_path"`
16676    VS100BASE="$unix_path"
16677  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16678    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16679    VS100BASE="$unix_path"
16680  fi
16681
16682    if test -d "$VS100BASE"; then
16683      if test -f "$VS100BASE/$VCVARSFILE"; then
16684        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16685$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16686        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16687      else
16688        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16689$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16690        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16691$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16692      fi
16693    fi
16694  fi
16695
16696  fi
16697
16698  if test "x$with_toolsdir" != x && test "x$VS_ENV_CMD" = x; then
16699    # Having specified an argument which is incorrect will produce an instant failure;
16700    # we should not go on looking
16701    { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&5
16702$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&6;}
16703    { $as_echo "$as_me:${as_lineno-$LINENO}: Please point to the VC/bin directory within the Visual Studio installation" >&5
16704$as_echo "$as_me: Please point to the VC/bin directory within the Visual Studio installation" >&6;}
16705    as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
16706  fi
16707
16708  if test "x$VS100COMNTOOLS" != x; then
16709
16710  if test "x$VS_ENV_CMD" = x; then
16711    VS100BASE="$VS100COMNTOOLS/../.."
16712    METHOD="VS100COMNTOOLS variable"
16713
16714  windows_path="$VS100BASE"
16715  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16716    unix_path=`$CYGPATH -u "$windows_path"`
16717    VS100BASE="$unix_path"
16718  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16719    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16720    VS100BASE="$unix_path"
16721  fi
16722
16723    if test -d "$VS100BASE"; then
16724      if test -f "$VS100BASE/$VCVARSFILE"; then
16725        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16726$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16727        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16728      else
16729        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16730$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16731        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16732$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16733      fi
16734    fi
16735  fi
16736
16737  fi
16738  if test "x$PROGRAMFILES" != x; then
16739
16740  if test "x$VS_ENV_CMD" = x; then
16741    VS100BASE="$PROGRAMFILES/Microsoft Visual Studio 10.0"
16742    METHOD="well-known name"
16743
16744  windows_path="$VS100BASE"
16745  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16746    unix_path=`$CYGPATH -u "$windows_path"`
16747    VS100BASE="$unix_path"
16748  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16749    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16750    VS100BASE="$unix_path"
16751  fi
16752
16753    if test -d "$VS100BASE"; then
16754      if test -f "$VS100BASE/$VCVARSFILE"; then
16755        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16756$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16757        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16758      else
16759        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16760$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16761        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16762$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16763      fi
16764    fi
16765  fi
16766
16767  fi
16768
16769  if test "x$VS_ENV_CMD" = x; then
16770    VS100BASE="C:/Program Files/Microsoft Visual Studio 10.0"
16771    METHOD="well-known name"
16772
16773  windows_path="$VS100BASE"
16774  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16775    unix_path=`$CYGPATH -u "$windows_path"`
16776    VS100BASE="$unix_path"
16777  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16778    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16779    VS100BASE="$unix_path"
16780  fi
16781
16782    if test -d "$VS100BASE"; then
16783      if test -f "$VS100BASE/$VCVARSFILE"; then
16784        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16785$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16786        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16787      else
16788        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16789$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16790        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16791$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16792      fi
16793    fi
16794  fi
16795
16796
16797  if test "x$VS_ENV_CMD" = x; then
16798    VS100BASE="C:/Program Files (x86)/Microsoft Visual Studio 10.0"
16799    METHOD="well-known name"
16800
16801  windows_path="$VS100BASE"
16802  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16803    unix_path=`$CYGPATH -u "$windows_path"`
16804    VS100BASE="$unix_path"
16805  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16806    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16807    VS100BASE="$unix_path"
16808  fi
16809
16810    if test -d "$VS100BASE"; then
16811      if test -f "$VS100BASE/$VCVARSFILE"; then
16812        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16813$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16814        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16815      else
16816        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16817$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16818        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16819$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16820      fi
16821    fi
16822  fi
16823
16824
16825  if test "x$ProgramW6432" != x; then
16826
16827  if test "x$VS_ENV_CMD" = x; then
16828    WIN_SDK_BASE="$ProgramW6432/Microsoft SDKs/Windows/v7.1/Bin"
16829    METHOD="well-known name"
16830
16831  windows_path="$WIN_SDK_BASE"
16832  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16833    unix_path=`$CYGPATH -u "$windows_path"`
16834    WIN_SDK_BASE="$unix_path"
16835  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16836    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16837    WIN_SDK_BASE="$unix_path"
16838  fi
16839
16840    if test -d "$WIN_SDK_BASE"; then
16841      # There have been cases of partial or broken SDK installations. A missing
16842      # lib dir is not going to work.
16843      if test ! -d "$WIN_SDK_BASE/../lib"; then
16844        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16845$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16846        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16847$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16848      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16849        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16850$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16851        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16852        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16853          VS_ENV_ARGS="/x86"
16854        else
16855          VS_ENV_ARGS="/x64"
16856        fi
16857      else
16858        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16859$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16860        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16861$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16862      fi
16863    fi
16864  fi
16865
16866  fi
16867  if test "x$PROGRAMW6432" != x; then
16868
16869  if test "x$VS_ENV_CMD" = x; then
16870    WIN_SDK_BASE="$PROGRAMW6432/Microsoft SDKs/Windows/v7.1/Bin"
16871    METHOD="well-known name"
16872
16873  windows_path="$WIN_SDK_BASE"
16874  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16875    unix_path=`$CYGPATH -u "$windows_path"`
16876    WIN_SDK_BASE="$unix_path"
16877  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16878    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16879    WIN_SDK_BASE="$unix_path"
16880  fi
16881
16882    if test -d "$WIN_SDK_BASE"; then
16883      # There have been cases of partial or broken SDK installations. A missing
16884      # lib dir is not going to work.
16885      if test ! -d "$WIN_SDK_BASE/../lib"; then
16886        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16887$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16888        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16889$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16890      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16891        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16892$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16893        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16894        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16895          VS_ENV_ARGS="/x86"
16896        else
16897          VS_ENV_ARGS="/x64"
16898        fi
16899      else
16900        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16901$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16902        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16903$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16904      fi
16905    fi
16906  fi
16907
16908  fi
16909  if test "x$PROGRAMFILES" != x; then
16910
16911  if test "x$VS_ENV_CMD" = x; then
16912    WIN_SDK_BASE="$PROGRAMFILES/Microsoft SDKs/Windows/v7.1/Bin"
16913    METHOD="well-known name"
16914
16915  windows_path="$WIN_SDK_BASE"
16916  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16917    unix_path=`$CYGPATH -u "$windows_path"`
16918    WIN_SDK_BASE="$unix_path"
16919  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16920    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16921    WIN_SDK_BASE="$unix_path"
16922  fi
16923
16924    if test -d "$WIN_SDK_BASE"; then
16925      # There have been cases of partial or broken SDK installations. A missing
16926      # lib dir is not going to work.
16927      if test ! -d "$WIN_SDK_BASE/../lib"; then
16928        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16929$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16930        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16931$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16932      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16933        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16934$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16935        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16936        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16937          VS_ENV_ARGS="/x86"
16938        else
16939          VS_ENV_ARGS="/x64"
16940        fi
16941      else
16942        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16943$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16944        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16945$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16946      fi
16947    fi
16948  fi
16949
16950  fi
16951
16952  if test "x$VS_ENV_CMD" = x; then
16953    WIN_SDK_BASE="C:/Program Files/Microsoft SDKs/Windows/v7.1/Bin"
16954    METHOD="well-known name"
16955
16956  windows_path="$WIN_SDK_BASE"
16957  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16958    unix_path=`$CYGPATH -u "$windows_path"`
16959    WIN_SDK_BASE="$unix_path"
16960  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16961    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16962    WIN_SDK_BASE="$unix_path"
16963  fi
16964
16965    if test -d "$WIN_SDK_BASE"; then
16966      # There have been cases of partial or broken SDK installations. A missing
16967      # lib dir is not going to work.
16968      if test ! -d "$WIN_SDK_BASE/../lib"; then
16969        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16970$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16971        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16972$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16973      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16974        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16975$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16976        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16977        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16978          VS_ENV_ARGS="/x86"
16979        else
16980          VS_ENV_ARGS="/x64"
16981        fi
16982      else
16983        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16984$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16985        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16986$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16987      fi
16988    fi
16989  fi
16990
16991
16992  if test "x$VS_ENV_CMD" = x; then
16993    WIN_SDK_BASE="C:/Program Files (x86)/Microsoft SDKs/Windows/v7.1/Bin"
16994    METHOD="well-known name"
16995
16996  windows_path="$WIN_SDK_BASE"
16997  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16998    unix_path=`$CYGPATH -u "$windows_path"`
16999    WIN_SDK_BASE="$unix_path"
17000  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17001    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17002    WIN_SDK_BASE="$unix_path"
17003  fi
17004
17005    if test -d "$WIN_SDK_BASE"; then
17006      # There have been cases of partial or broken SDK installations. A missing
17007      # lib dir is not going to work.
17008      if test ! -d "$WIN_SDK_BASE/../lib"; then
17009        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17010$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17011        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
17012$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
17013      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
17014        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17015$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17016        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
17017        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17018          VS_ENV_ARGS="/x86"
17019        else
17020          VS_ENV_ARGS="/x64"
17021        fi
17022      else
17023        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17024$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17025        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
17026$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
17027      fi
17028    fi
17029  fi
17030
17031
17032  if test "x$VS_ENV_CMD" != x; then
17033    # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
17034
17035  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17036
17037  # First separate the path from the arguments. This will split at the first
17038  # space.
17039  complete="$VS_ENV_CMD"
17040  path="${complete%% *}"
17041  tmp="$complete EOL"
17042  arguments="${tmp#* }"
17043
17044  # Input might be given as Windows format, start by converting to
17045  # unix format.
17046  new_path=`$CYGPATH -u "$path"`
17047
17048  # Now try to locate executable using which
17049  new_path=`$WHICH "$new_path" 2> /dev/null`
17050  # bat and cmd files are not always considered executable in cygwin causing which
17051  # to not find them
17052  if test "x$new_path" = x \
17053           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17054           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17055    new_path=`$CYGPATH -u "$path"`
17056  fi
17057  if test "x$new_path" = x; then
17058    # Oops. Which didn't find the executable.
17059    # The splitting of arguments from the executable at a space might have been incorrect,
17060    # since paths with space are more likely in Windows. Give it another try with the whole
17061    # argument.
17062    path="$complete"
17063    arguments="EOL"
17064    new_path=`$CYGPATH -u "$path"`
17065    new_path=`$WHICH "$new_path" 2> /dev/null`
17066    # bat and cmd files are not always considered executable in cygwin causing which
17067    # to not find them
17068    if test "x$new_path" = x \
17069             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17070             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17071      new_path=`$CYGPATH -u "$path"`
17072    fi
17073    if test "x$new_path" = x; then
17074      # It's still not found. Now this is an unrecoverable error.
17075      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
17076$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
17077      has_space=`$ECHO "$complete" | $GREP " "`
17078      if test "x$has_space" != x; then
17079        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17080$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17081      fi
17082      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
17083    fi
17084  fi
17085
17086  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17087  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17088  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17089  # "foo.exe" is OK but "foo" is an error.
17090  #
17091  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17092  # It is also a way to make sure we got the proper file name for the real test later on.
17093  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17094  if test "x$test_shortpath" = x; then
17095    # Short path failed, file does not exist as specified.
17096    # Try adding .exe or .cmd
17097    if test -f "${new_path}.exe"; then
17098       input_to_shortpath="${new_path}.exe"
17099    elif test -f "${new_path}.cmd"; then
17100       input_to_shortpath="${new_path}.cmd"
17101    else
17102      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
17103$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
17104      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17105$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17106      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
17107    fi
17108  else
17109    input_to_shortpath="$new_path"
17110  fi
17111
17112  # Call helper function which possibly converts this using DOS-style short mode.
17113  # If so, the updated path is stored in $new_path.
17114  new_path="$input_to_shortpath"
17115
17116  input_path="$input_to_shortpath"
17117  # Check if we need to convert this using DOS-style short mode. If the path
17118  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17119  # take no chances and rewrite it.
17120  # Note: m4 eats our [], so we need to use [ and ] instead.
17121  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17122  if test "x$has_forbidden_chars" != x; then
17123    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17124    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17125    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17126    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17127      # Going to short mode and back again did indeed matter. Since short mode is
17128      # case insensitive, let's make it lowercase to improve readability.
17129      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17130      # Now convert it back to Unix-stile (cygpath)
17131      input_path=`$CYGPATH -u "$shortmode_path"`
17132      new_path="$input_path"
17133    fi
17134  fi
17135
17136  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17137  if test "x$test_cygdrive_prefix" = x; then
17138    # As a simple fix, exclude /usr/bin since it's not a real path.
17139    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17140      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17141      # a path prefixed by /cygdrive for fixpath to work.
17142      new_path="$CYGWIN_ROOT_PATH$input_path"
17143    fi
17144  fi
17145
17146  # remove trailing .exe if any
17147  new_path="${new_path/%.exe/}"
17148
17149  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17150
17151  # First separate the path from the arguments. This will split at the first
17152  # space.
17153  complete="$VS_ENV_CMD"
17154  path="${complete%% *}"
17155  tmp="$complete EOL"
17156  arguments="${tmp#* }"
17157
17158  # Input might be given as Windows format, start by converting to
17159  # unix format.
17160  new_path="$path"
17161
17162  windows_path="$new_path"
17163  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17164    unix_path=`$CYGPATH -u "$windows_path"`
17165    new_path="$unix_path"
17166  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17167    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17168    new_path="$unix_path"
17169  fi
17170
17171
17172  # Now try to locate executable using which
17173  new_path=`$WHICH "$new_path" 2> /dev/null`
17174
17175  if test "x$new_path" = x; then
17176    # Oops. Which didn't find the executable.
17177    # The splitting of arguments from the executable at a space might have been incorrect,
17178    # since paths with space are more likely in Windows. Give it another try with the whole
17179    # argument.
17180    path="$complete"
17181    arguments="EOL"
17182    new_path="$path"
17183
17184  windows_path="$new_path"
17185  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17186    unix_path=`$CYGPATH -u "$windows_path"`
17187    new_path="$unix_path"
17188  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17189    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17190    new_path="$unix_path"
17191  fi
17192
17193
17194    new_path=`$WHICH "$new_path" 2> /dev/null`
17195
17196    if test "x$new_path" = x; then
17197      # It's still not found. Now this is an unrecoverable error.
17198      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
17199$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
17200      has_space=`$ECHO "$complete" | $GREP " "`
17201      if test "x$has_space" != x; then
17202        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17203$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17204      fi
17205      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
17206    fi
17207  fi
17208
17209  # Now new_path has a complete unix path to the binary
17210  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17211    # Keep paths in /bin as-is, but remove trailing .exe if any
17212    new_path="${new_path/%.exe/}"
17213    # Do not save /bin paths to all_fixpath_prefixes!
17214  else
17215    # Not in mixed or Windows style, start by that.
17216    new_path=`cmd //c echo $new_path`
17217
17218  input_path="$new_path"
17219  # Check if we need to convert this using DOS-style short mode. If the path
17220  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17221  # take no chances and rewrite it.
17222  # Note: m4 eats our [], so we need to use [ and ] instead.
17223  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17224  if test "x$has_forbidden_chars" != x; then
17225    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17226    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17227  fi
17228
17229    # Output is in $new_path
17230
17231  windows_path="$new_path"
17232  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17233    unix_path=`$CYGPATH -u "$windows_path"`
17234    new_path="$unix_path"
17235  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17236    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17237    new_path="$unix_path"
17238  fi
17239
17240    # remove trailing .exe if any
17241    new_path="${new_path/%.exe/}"
17242
17243    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17244    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17245  fi
17246
17247  else
17248    # We're on a posix platform. Hooray! :)
17249    # First separate the path from the arguments. This will split at the first
17250    # space.
17251    complete="$VS_ENV_CMD"
17252    path="${complete%% *}"
17253    tmp="$complete EOL"
17254    arguments="${tmp#* }"
17255
17256    # Cannot rely on the command "which" here since it doesn't always work.
17257    is_absolute_path=`$ECHO "$path" | $GREP ^/`
17258    if test -z "$is_absolute_path"; then
17259      # Path to executable is not absolute. Find it.
17260      IFS_save="$IFS"
17261      IFS=:
17262      for p in $PATH; do
17263        if test -f "$p/$path" && test -x "$p/$path"; then
17264          new_path="$p/$path"
17265          break
17266        fi
17267      done
17268      IFS="$IFS_save"
17269    else
17270      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&5
17271$as_echo "$as_me: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&6;}
17272      new_path="$path"
17273    fi
17274
17275    if test "x$new_path" = x; then
17276        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
17277$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
17278        has_space=`$ECHO "$complete" | $GREP " "`
17279        if test "x$has_space" != x; then
17280          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17281$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17282        fi
17283        as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
17284      fi
17285  fi
17286
17287      # Now join together the path and the arguments once again
17288      if test "x$arguments" != xEOL; then
17289        new_complete="$new_path ${arguments% *}"
17290      else
17291        new_complete="$new_path"
17292      fi
17293
17294  if test "x$complete" != "x$new_complete"; then
17295      VS_ENV_CMD="$new_complete"
17296      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
17297$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
17298    fi
17299
17300
17301    # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
17302    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
17303$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
17304    cd $OUTPUT_ROOT
17305    # FIXME: The code betweeen ---- was inlined from a separate script and is not properly adapted
17306    # to autoconf standards.
17307
17308    #----
17309
17310    # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment)
17311    # but calculate the difference in Cygwin environment before/after running it and then
17312    # apply the diff.
17313
17314    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
17315      _vs10varsall=`cygpath -a -m -s "$VS_ENV_CMD"`
17316      _dosvs10varsall=`cygpath -a -w -s $_vs10varsall`
17317      _dosbash=`cygpath -a -w -s \`which bash\`.*`
17318    else
17319      _dosvs10varsall=`cmd //c echo $VS_ENV_CMD`
17320      _dosbash=`cmd //c echo \`which bash\``
17321    fi
17322
17323    # generate the set of exported vars before/after the vs10 setup
17324    $ECHO "@echo off"                                           >  localdevenvtmp.bat
17325    $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export0" >> localdevenvtmp.bat
17326    $ECHO "call $_dosvs10varsall $VS_ENV_ARGS"                  >> localdevenvtmp.bat
17327    $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export1" >> localdevenvtmp.bat
17328
17329    # Now execute the newly created bat file.
17330    # The | cat is to stop SetEnv.Cmd to mess with system colors on msys
17331    cmd /c localdevenvtmp.bat | cat
17332
17333    # apply the diff (less some non-vs10 vars named by "!")
17334    $SORT localdevenvtmp.export0 | $GREP -v "!" > localdevenvtmp.export0.sort
17335    $SORT localdevenvtmp.export1 | $GREP -v "!" > localdevenvtmp.export1.sort
17336    $COMM -1 -3 localdevenvtmp.export0.sort localdevenvtmp.export1.sort > localdevenv.sh
17337
17338    # cleanup
17339    $RM localdevenvtmp*
17340    #----
17341    cd $CURDIR
17342    if test ! -s $OUTPUT_ROOT/localdevenv.sh; then
17343      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17344$as_echo "no" >&6; }
17345      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
17346$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
17347      { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
17348$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
17349      { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
17350$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
17351      as_fn_error $? "Cannot continue" "$LINENO" 5
17352    fi
17353
17354    # Now set all paths and other env variables. This will allow the rest of
17355    # the configure script to find and run the compiler in the proper way.
17356    { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
17357$as_echo "$as_me: Setting extracted environment variables" >&6;}
17358    . $OUTPUT_ROOT/localdevenv.sh
17359  else
17360    # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
17361    { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
17362$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
17363  fi
17364
17365  # At this point, we should have corrent variables in the environment, or we can't continue.
17366  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
17367$as_echo_n "checking for Visual Studio variables... " >&6; }
17368
17369  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x || test "x$WINDOWSSDKDIR" != x; then
17370    if test "x$INCLUDE" = x || test "x$LIB" = x; then
17371      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
17372$as_echo "present but broken" >&6; }
17373      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
17374    else
17375      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
17376$as_echo "ok" >&6; }
17377      # Remove any trailing \ from INCLUDE and LIB to avoid trouble in spec.gmk.
17378      VS_INCLUDE=`$ECHO "$INCLUDE" | $SED 's/\\\\$//'`
17379      VS_LIB=`$ECHO "$LIB" | $SED 's/\\\\$//'`
17380      # Remove any paths containing # (typically F#) as that messes up make
17381      PATH=`$ECHO "$PATH" | $SED 's/[^:#]*#[^:]*://g'`
17382      VS_PATH="$PATH"
17383
17384
17385
17386    fi
17387  else
17388    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17389$as_echo "not found" >&6; }
17390
17391    if test "x$VS_ENV_CMD" = x; then
17392      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
17393$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
17394      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
17395$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
17396    else
17397      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
17398$as_echo "$as_me: Running the extraction script failed." >&6;}
17399    fi
17400    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
17401$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
17402    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
17403$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
17404    as_fn_error $? "Cannot continue" "$LINENO" 5
17405  fi
17406
17407  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
17408$as_echo_n "checking for msvcr100.dll... " >&6; }
17409
17410# Check whether --with-msvcr-dll was given.
17411if test "${with_msvcr_dll+set}" = set; then :
17412  withval=$with_msvcr_dll;
17413fi
17414
17415  if test "x$with_msvcr_dll" != x; then
17416    MSVCR_DLL="$with_msvcr_dll"
17417  else
17418    if test "x$VCINSTALLDIR" != x; then
17419      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
17420        MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | grep x64 | head --lines 1`
17421      else
17422        MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | grep x86 | grep -v ia64 | grep -v x64 | head --lines 1`
17423        if test "x$MSVCR_DLL" = x; then
17424          MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | head --lines 1`
17425        fi
17426      fi
17427      if test "x$MSVCR_DLL" != x; then
17428        { $as_echo "$as_me:${as_lineno-$LINENO}: msvcr100.dll found in VCINSTALLDIR: $VCINSTALLDIR" >&5
17429$as_echo "$as_me: msvcr100.dll found in VCINSTALLDIR: $VCINSTALLDIR" >&6;}
17430      else
17431        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: msvcr100.dll not found in VCINSTALLDIR: $VCINSTALLDIR" >&5
17432$as_echo "$as_me: Warning: msvcr100.dll not found in VCINSTALLDIR: $VCINSTALLDIR" >&6;}
17433      fi
17434    fi
17435    # Try some fallback alternatives
17436    if test "x$MSVCR_DLL" = x; then
17437      # If visual studio express is installed, there is usually one with the debugger
17438      if test "x$VS100COMNTOOLS" != x; then
17439        if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
17440          MSVCR_DLL=`find "$VS100COMNTOOLS/.." -name msvcr100.dll | grep -i x64 | head --lines 1`
17441          { $as_echo "$as_me:${as_lineno-$LINENO}: msvcr100.dll found in $VS100COMNTOOLS..: $VS100COMNTOOLS.." >&5
17442$as_echo "$as_me: msvcr100.dll found in $VS100COMNTOOLS..: $VS100COMNTOOLS.." >&6;}
17443        fi
17444      fi
17445    fi
17446    if test "x$MSVCR_DLL" = x; then
17447      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17448        # Fallback for 32bit builds, look in the windows directory.
17449        if test -f "$SYSTEMROOT/system32/msvcr100.dll"; then
17450          { $as_echo "$as_me:${as_lineno-$LINENO}: msvcr100.dll found in $SYSTEMROOT/system32" >&5
17451$as_echo "$as_me: msvcr100.dll found in $SYSTEMROOT/system32" >&6;}
17452          MSVCR_DLL="$SYSTEMROOT/system32/msvcr100.dll"
17453        fi
17454      fi
17455    fi
17456  fi
17457  if test "x$MSVCR_DLL" = x; then
17458    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17459$as_echo "no" >&6; }
17460    as_fn_error $? "Could not find msvcr100.dll !" "$LINENO" 5
17461  fi
17462  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
17463$as_echo "$MSVCR_DLL" >&6; }
17464
17465  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17466
17467  # Input might be given as Windows format, start by converting to
17468  # unix format.
17469  path="$MSVCR_DLL"
17470  new_path=`$CYGPATH -u "$path"`
17471
17472  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17473  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17474  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17475  # "foo.exe" is OK but "foo" is an error.
17476  #
17477  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17478  # It is also a way to make sure we got the proper file name for the real test later on.
17479  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17480  if test "x$test_shortpath" = x; then
17481    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
17482$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
17483    as_fn_error $? "Cannot locate the the path of MSVCR_DLL" "$LINENO" 5
17484  fi
17485
17486  # Call helper function which possibly converts this using DOS-style short mode.
17487  # If so, the updated path is stored in $new_path.
17488
17489  input_path="$new_path"
17490  # Check if we need to convert this using DOS-style short mode. If the path
17491  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17492  # take no chances and rewrite it.
17493  # Note: m4 eats our [], so we need to use [ and ] instead.
17494  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17495  if test "x$has_forbidden_chars" != x; then
17496    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17497    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17498    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17499    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17500      # Going to short mode and back again did indeed matter. Since short mode is
17501      # case insensitive, let's make it lowercase to improve readability.
17502      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17503      # Now convert it back to Unix-stile (cygpath)
17504      input_path=`$CYGPATH -u "$shortmode_path"`
17505      new_path="$input_path"
17506    fi
17507  fi
17508
17509  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17510  if test "x$test_cygdrive_prefix" = x; then
17511    # As a simple fix, exclude /usr/bin since it's not a real path.
17512    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17513      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17514      # a path prefixed by /cygdrive for fixpath to work.
17515      new_path="$CYGWIN_ROOT_PATH$input_path"
17516    fi
17517  fi
17518
17519
17520  if test "x$path" != "x$new_path"; then
17521    MSVCR_DLL="$new_path"
17522    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
17523$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
17524  fi
17525
17526  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17527
17528  path="$MSVCR_DLL"
17529  has_colon=`$ECHO $path | $GREP ^.:`
17530  new_path="$path"
17531  if test "x$has_colon" = x; then
17532    # Not in mixed or Windows style, start by that.
17533    new_path=`cmd //c echo $path`
17534  fi
17535
17536
17537  input_path="$new_path"
17538  # Check if we need to convert this using DOS-style short mode. If the path
17539  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17540  # take no chances and rewrite it.
17541  # Note: m4 eats our [], so we need to use [ and ] instead.
17542  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17543  if test "x$has_forbidden_chars" != x; then
17544    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17545    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17546  fi
17547
17548
17549  windows_path="$new_path"
17550  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17551    unix_path=`$CYGPATH -u "$windows_path"`
17552    new_path="$unix_path"
17553  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17554    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17555    new_path="$unix_path"
17556  fi
17557
17558  if test "x$path" != "x$new_path"; then
17559    MSVCR_DLL="$new_path"
17560    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
17561$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
17562  fi
17563
17564  # Save the first 10 bytes of this path to the storage, so fixpath can work.
17565  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17566
17567  else
17568    # We're on a posix platform. Hooray! :)
17569    path="$MSVCR_DLL"
17570    has_space=`$ECHO "$path" | $GREP " "`
17571    if test "x$has_space" != x; then
17572      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
17573$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
17574      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17575    fi
17576
17577    # Use eval to expand a potential ~
17578    eval path="$path"
17579    if test ! -f "$path" && test ! -d "$path"; then
17580      as_fn_error $? "The path of MSVCR_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
17581    fi
17582
17583    MSVCR_DLL="`cd "$path"; $THEPWDCMD -L`"
17584  fi
17585
17586
17587fi
17588
17589
17590
17591# If --build AND --host is set, then the configure script will find any
17592# cross compilation tools in the PATH. Cross compilation tools
17593# follows the cross compilation standard where they are prefixed with ${host}.
17594# For example the binary i686-sun-solaris2.10-gcc
17595# will cross compile for i686-sun-solaris2.10
17596# If neither of build and host is not set, then build=host and the
17597# default compiler found in the path will be used.
17598# Setting only --host, does not seem to be really supported.
17599# Please set both --build and --host if you want to cross compile.
17600
17601if test "x$COMPILE_TYPE" = "xcross"; then
17602    # Now we to find a C/C++ compiler that can build executables for the build
17603    # platform. We can't use the AC_PROG_CC macro, since it can only be used
17604    # once. Also, we need to do this before adding a tools dir to the path,
17605    # otherwise we might pick up cross-compilers which don't use standard naming.
17606    # Otherwise, we'll set the BUILD_tools to the native tools, but that'll have
17607    # to wait until they are properly discovered.
17608    for ac_prog in cl cc gcc
17609do
17610  # Extract the first word of "$ac_prog", so it can be a program name with args.
17611set dummy $ac_prog; ac_word=$2
17612{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17613$as_echo_n "checking for $ac_word... " >&6; }
17614if ${ac_cv_path_BUILD_CC+:} false; then :
17615  $as_echo_n "(cached) " >&6
17616else
17617  case $BUILD_CC in
17618  [\\/]* | ?:[\\/]*)
17619  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
17620  ;;
17621  *)
17622  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17623for as_dir in $PATH
17624do
17625  IFS=$as_save_IFS
17626  test -z "$as_dir" && as_dir=.
17627    for ac_exec_ext in '' $ac_executable_extensions; do
17628  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17629    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
17630    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17631    break 2
17632  fi
17633done
17634  done
17635IFS=$as_save_IFS
17636
17637  ;;
17638esac
17639fi
17640BUILD_CC=$ac_cv_path_BUILD_CC
17641if test -n "$BUILD_CC"; then
17642  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
17643$as_echo "$BUILD_CC" >&6; }
17644else
17645  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17646$as_echo "no" >&6; }
17647fi
17648
17649
17650  test -n "$BUILD_CC" && break
17651done
17652
17653
17654  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17655
17656  # First separate the path from the arguments. This will split at the first
17657  # space.
17658  complete="$BUILD_CC"
17659  path="${complete%% *}"
17660  tmp="$complete EOL"
17661  arguments="${tmp#* }"
17662
17663  # Input might be given as Windows format, start by converting to
17664  # unix format.
17665  new_path=`$CYGPATH -u "$path"`
17666
17667  # Now try to locate executable using which
17668  new_path=`$WHICH "$new_path" 2> /dev/null`
17669  # bat and cmd files are not always considered executable in cygwin causing which
17670  # to not find them
17671  if test "x$new_path" = x \
17672           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17673           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17674    new_path=`$CYGPATH -u "$path"`
17675  fi
17676  if test "x$new_path" = x; then
17677    # Oops. Which didn't find the executable.
17678    # The splitting of arguments from the executable at a space might have been incorrect,
17679    # since paths with space are more likely in Windows. Give it another try with the whole
17680    # argument.
17681    path="$complete"
17682    arguments="EOL"
17683    new_path=`$CYGPATH -u "$path"`
17684    new_path=`$WHICH "$new_path" 2> /dev/null`
17685    # bat and cmd files are not always considered executable in cygwin causing which
17686    # to not find them
17687    if test "x$new_path" = x \
17688             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17689             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17690      new_path=`$CYGPATH -u "$path"`
17691    fi
17692    if test "x$new_path" = x; then
17693      # It's still not found. Now this is an unrecoverable error.
17694      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
17695$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
17696      has_space=`$ECHO "$complete" | $GREP " "`
17697      if test "x$has_space" != x; then
17698        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17699$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17700      fi
17701      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
17702    fi
17703  fi
17704
17705  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17706  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17707  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17708  # "foo.exe" is OK but "foo" is an error.
17709  #
17710  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17711  # It is also a way to make sure we got the proper file name for the real test later on.
17712  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17713  if test "x$test_shortpath" = x; then
17714    # Short path failed, file does not exist as specified.
17715    # Try adding .exe or .cmd
17716    if test -f "${new_path}.exe"; then
17717       input_to_shortpath="${new_path}.exe"
17718    elif test -f "${new_path}.cmd"; then
17719       input_to_shortpath="${new_path}.cmd"
17720    else
17721      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
17722$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
17723      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17724$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17725      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
17726    fi
17727  else
17728    input_to_shortpath="$new_path"
17729  fi
17730
17731  # Call helper function which possibly converts this using DOS-style short mode.
17732  # If so, the updated path is stored in $new_path.
17733  new_path="$input_to_shortpath"
17734
17735  input_path="$input_to_shortpath"
17736  # Check if we need to convert this using DOS-style short mode. If the path
17737  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17738  # take no chances and rewrite it.
17739  # Note: m4 eats our [], so we need to use [ and ] instead.
17740  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17741  if test "x$has_forbidden_chars" != x; then
17742    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17743    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17744    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17745    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17746      # Going to short mode and back again did indeed matter. Since short mode is
17747      # case insensitive, let's make it lowercase to improve readability.
17748      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17749      # Now convert it back to Unix-stile (cygpath)
17750      input_path=`$CYGPATH -u "$shortmode_path"`
17751      new_path="$input_path"
17752    fi
17753  fi
17754
17755  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17756  if test "x$test_cygdrive_prefix" = x; then
17757    # As a simple fix, exclude /usr/bin since it's not a real path.
17758    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17759      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17760      # a path prefixed by /cygdrive for fixpath to work.
17761      new_path="$CYGWIN_ROOT_PATH$input_path"
17762    fi
17763  fi
17764
17765  # remove trailing .exe if any
17766  new_path="${new_path/%.exe/}"
17767
17768  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17769
17770  # First separate the path from the arguments. This will split at the first
17771  # space.
17772  complete="$BUILD_CC"
17773  path="${complete%% *}"
17774  tmp="$complete EOL"
17775  arguments="${tmp#* }"
17776
17777  # Input might be given as Windows format, start by converting to
17778  # unix format.
17779  new_path="$path"
17780
17781  windows_path="$new_path"
17782  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17783    unix_path=`$CYGPATH -u "$windows_path"`
17784    new_path="$unix_path"
17785  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17786    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17787    new_path="$unix_path"
17788  fi
17789
17790
17791  # Now try to locate executable using which
17792  new_path=`$WHICH "$new_path" 2> /dev/null`
17793
17794  if test "x$new_path" = x; then
17795    # Oops. Which didn't find the executable.
17796    # The splitting of arguments from the executable at a space might have been incorrect,
17797    # since paths with space are more likely in Windows. Give it another try with the whole
17798    # argument.
17799    path="$complete"
17800    arguments="EOL"
17801    new_path="$path"
17802
17803  windows_path="$new_path"
17804  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17805    unix_path=`$CYGPATH -u "$windows_path"`
17806    new_path="$unix_path"
17807  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17808    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17809    new_path="$unix_path"
17810  fi
17811
17812
17813    new_path=`$WHICH "$new_path" 2> /dev/null`
17814
17815    if test "x$new_path" = x; then
17816      # It's still not found. Now this is an unrecoverable error.
17817      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
17818$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
17819      has_space=`$ECHO "$complete" | $GREP " "`
17820      if test "x$has_space" != x; then
17821        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17822$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17823      fi
17824      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
17825    fi
17826  fi
17827
17828  # Now new_path has a complete unix path to the binary
17829  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17830    # Keep paths in /bin as-is, but remove trailing .exe if any
17831    new_path="${new_path/%.exe/}"
17832    # Do not save /bin paths to all_fixpath_prefixes!
17833  else
17834    # Not in mixed or Windows style, start by that.
17835    new_path=`cmd //c echo $new_path`
17836
17837  input_path="$new_path"
17838  # Check if we need to convert this using DOS-style short mode. If the path
17839  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17840  # take no chances and rewrite it.
17841  # Note: m4 eats our [], so we need to use [ and ] instead.
17842  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17843  if test "x$has_forbidden_chars" != x; then
17844    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17845    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17846  fi
17847
17848    # Output is in $new_path
17849
17850  windows_path="$new_path"
17851  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17852    unix_path=`$CYGPATH -u "$windows_path"`
17853    new_path="$unix_path"
17854  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17855    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17856    new_path="$unix_path"
17857  fi
17858
17859    # remove trailing .exe if any
17860    new_path="${new_path/%.exe/}"
17861
17862    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17863    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17864  fi
17865
17866  else
17867    # We're on a posix platform. Hooray! :)
17868    # First separate the path from the arguments. This will split at the first
17869    # space.
17870    complete="$BUILD_CC"
17871    path="${complete%% *}"
17872    tmp="$complete EOL"
17873    arguments="${tmp#* }"
17874
17875    # Cannot rely on the command "which" here since it doesn't always work.
17876    is_absolute_path=`$ECHO "$path" | $GREP ^/`
17877    if test -z "$is_absolute_path"; then
17878      # Path to executable is not absolute. Find it.
17879      IFS_save="$IFS"
17880      IFS=:
17881      for p in $PATH; do
17882        if test -f "$p/$path" && test -x "$p/$path"; then
17883          new_path="$p/$path"
17884          break
17885        fi
17886      done
17887      IFS="$IFS_save"
17888    else
17889      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CC (as $path) failed, using $path directly." >&5
17890$as_echo "$as_me: Resolving BUILD_CC (as $path) failed, using $path directly." >&6;}
17891      new_path="$path"
17892    fi
17893
17894    if test "x$new_path" = x; then
17895        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
17896$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
17897        has_space=`$ECHO "$complete" | $GREP " "`
17898        if test "x$has_space" != x; then
17899          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17900$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17901        fi
17902        as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
17903      fi
17904  fi
17905
17906      # Now join together the path and the arguments once again
17907      if test "x$arguments" != xEOL; then
17908        new_complete="$new_path ${arguments% *}"
17909      else
17910        new_complete="$new_path"
17911      fi
17912
17913  if test "x$complete" != "x$new_complete"; then
17914      BUILD_CC="$new_complete"
17915      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
17916$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
17917    fi
17918
17919    for ac_prog in cl CC g++
17920do
17921  # Extract the first word of "$ac_prog", so it can be a program name with args.
17922set dummy $ac_prog; ac_word=$2
17923{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17924$as_echo_n "checking for $ac_word... " >&6; }
17925if ${ac_cv_path_BUILD_CXX+:} false; then :
17926  $as_echo_n "(cached) " >&6
17927else
17928  case $BUILD_CXX in
17929  [\\/]* | ?:[\\/]*)
17930  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
17931  ;;
17932  *)
17933  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17934for as_dir in $PATH
17935do
17936  IFS=$as_save_IFS
17937  test -z "$as_dir" && as_dir=.
17938    for ac_exec_ext in '' $ac_executable_extensions; do
17939  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17940    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
17941    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17942    break 2
17943  fi
17944done
17945  done
17946IFS=$as_save_IFS
17947
17948  ;;
17949esac
17950fi
17951BUILD_CXX=$ac_cv_path_BUILD_CXX
17952if test -n "$BUILD_CXX"; then
17953  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
17954$as_echo "$BUILD_CXX" >&6; }
17955else
17956  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17957$as_echo "no" >&6; }
17958fi
17959
17960
17961  test -n "$BUILD_CXX" && break
17962done
17963
17964
17965  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17966
17967  # First separate the path from the arguments. This will split at the first
17968  # space.
17969  complete="$BUILD_CXX"
17970  path="${complete%% *}"
17971  tmp="$complete EOL"
17972  arguments="${tmp#* }"
17973
17974  # Input might be given as Windows format, start by converting to
17975  # unix format.
17976  new_path=`$CYGPATH -u "$path"`
17977
17978  # Now try to locate executable using which
17979  new_path=`$WHICH "$new_path" 2> /dev/null`
17980  # bat and cmd files are not always considered executable in cygwin causing which
17981  # to not find them
17982  if test "x$new_path" = x \
17983           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17984           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17985    new_path=`$CYGPATH -u "$path"`
17986  fi
17987  if test "x$new_path" = x; then
17988    # Oops. Which didn't find the executable.
17989    # The splitting of arguments from the executable at a space might have been incorrect,
17990    # since paths with space are more likely in Windows. Give it another try with the whole
17991    # argument.
17992    path="$complete"
17993    arguments="EOL"
17994    new_path=`$CYGPATH -u "$path"`
17995    new_path=`$WHICH "$new_path" 2> /dev/null`
17996    # bat and cmd files are not always considered executable in cygwin causing which
17997    # to not find them
17998    if test "x$new_path" = x \
17999             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18000             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18001      new_path=`$CYGPATH -u "$path"`
18002    fi
18003    if test "x$new_path" = x; then
18004      # It's still not found. Now this is an unrecoverable error.
18005      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
18006$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
18007      has_space=`$ECHO "$complete" | $GREP " "`
18008      if test "x$has_space" != x; then
18009        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18010$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18011      fi
18012      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18013    fi
18014  fi
18015
18016  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18017  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18018  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18019  # "foo.exe" is OK but "foo" is an error.
18020  #
18021  # This test is therefore slightly more accurate than "test -f" to check for file precense.
18022  # It is also a way to make sure we got the proper file name for the real test later on.
18023  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18024  if test "x$test_shortpath" = x; then
18025    # Short path failed, file does not exist as specified.
18026    # Try adding .exe or .cmd
18027    if test -f "${new_path}.exe"; then
18028       input_to_shortpath="${new_path}.exe"
18029    elif test -f "${new_path}.cmd"; then
18030       input_to_shortpath="${new_path}.cmd"
18031    else
18032      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
18033$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
18034      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18035$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18036      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18037    fi
18038  else
18039    input_to_shortpath="$new_path"
18040  fi
18041
18042  # Call helper function which possibly converts this using DOS-style short mode.
18043  # If so, the updated path is stored in $new_path.
18044  new_path="$input_to_shortpath"
18045
18046  input_path="$input_to_shortpath"
18047  # Check if we need to convert this using DOS-style short mode. If the path
18048  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18049  # take no chances and rewrite it.
18050  # Note: m4 eats our [], so we need to use [ and ] instead.
18051  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18052  if test "x$has_forbidden_chars" != x; then
18053    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18054    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18055    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18056    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18057      # Going to short mode and back again did indeed matter. Since short mode is
18058      # case insensitive, let's make it lowercase to improve readability.
18059      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18060      # Now convert it back to Unix-stile (cygpath)
18061      input_path=`$CYGPATH -u "$shortmode_path"`
18062      new_path="$input_path"
18063    fi
18064  fi
18065
18066  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18067  if test "x$test_cygdrive_prefix" = x; then
18068    # As a simple fix, exclude /usr/bin since it's not a real path.
18069    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18070      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18071      # a path prefixed by /cygdrive for fixpath to work.
18072      new_path="$CYGWIN_ROOT_PATH$input_path"
18073    fi
18074  fi
18075
18076  # remove trailing .exe if any
18077  new_path="${new_path/%.exe/}"
18078
18079  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18080
18081  # First separate the path from the arguments. This will split at the first
18082  # space.
18083  complete="$BUILD_CXX"
18084  path="${complete%% *}"
18085  tmp="$complete EOL"
18086  arguments="${tmp#* }"
18087
18088  # Input might be given as Windows format, start by converting to
18089  # unix format.
18090  new_path="$path"
18091
18092  windows_path="$new_path"
18093  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18094    unix_path=`$CYGPATH -u "$windows_path"`
18095    new_path="$unix_path"
18096  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18097    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18098    new_path="$unix_path"
18099  fi
18100
18101
18102  # Now try to locate executable using which
18103  new_path=`$WHICH "$new_path" 2> /dev/null`
18104
18105  if test "x$new_path" = x; then
18106    # Oops. Which didn't find the executable.
18107    # The splitting of arguments from the executable at a space might have been incorrect,
18108    # since paths with space are more likely in Windows. Give it another try with the whole
18109    # argument.
18110    path="$complete"
18111    arguments="EOL"
18112    new_path="$path"
18113
18114  windows_path="$new_path"
18115  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18116    unix_path=`$CYGPATH -u "$windows_path"`
18117    new_path="$unix_path"
18118  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18119    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18120    new_path="$unix_path"
18121  fi
18122
18123
18124    new_path=`$WHICH "$new_path" 2> /dev/null`
18125
18126    if test "x$new_path" = x; then
18127      # It's still not found. Now this is an unrecoverable error.
18128      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
18129$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
18130      has_space=`$ECHO "$complete" | $GREP " "`
18131      if test "x$has_space" != x; then
18132        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18133$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18134      fi
18135      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18136    fi
18137  fi
18138
18139  # Now new_path has a complete unix path to the binary
18140  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18141    # Keep paths in /bin as-is, but remove trailing .exe if any
18142    new_path="${new_path/%.exe/}"
18143    # Do not save /bin paths to all_fixpath_prefixes!
18144  else
18145    # Not in mixed or Windows style, start by that.
18146    new_path=`cmd //c echo $new_path`
18147
18148  input_path="$new_path"
18149  # Check if we need to convert this using DOS-style short mode. If the path
18150  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18151  # take no chances and rewrite it.
18152  # Note: m4 eats our [], so we need to use [ and ] instead.
18153  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18154  if test "x$has_forbidden_chars" != x; then
18155    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18156    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18157  fi
18158
18159    # Output is in $new_path
18160
18161  windows_path="$new_path"
18162  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18163    unix_path=`$CYGPATH -u "$windows_path"`
18164    new_path="$unix_path"
18165  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18166    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18167    new_path="$unix_path"
18168  fi
18169
18170    # remove trailing .exe if any
18171    new_path="${new_path/%.exe/}"
18172
18173    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18174    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18175  fi
18176
18177  else
18178    # We're on a posix platform. Hooray! :)
18179    # First separate the path from the arguments. This will split at the first
18180    # space.
18181    complete="$BUILD_CXX"
18182    path="${complete%% *}"
18183    tmp="$complete EOL"
18184    arguments="${tmp#* }"
18185
18186    # Cannot rely on the command "which" here since it doesn't always work.
18187    is_absolute_path=`$ECHO "$path" | $GREP ^/`
18188    if test -z "$is_absolute_path"; then
18189      # Path to executable is not absolute. Find it.
18190      IFS_save="$IFS"
18191      IFS=:
18192      for p in $PATH; do
18193        if test -f "$p/$path" && test -x "$p/$path"; then
18194          new_path="$p/$path"
18195          break
18196        fi
18197      done
18198      IFS="$IFS_save"
18199    else
18200      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CXX (as $path) failed, using $path directly." >&5
18201$as_echo "$as_me: Resolving BUILD_CXX (as $path) failed, using $path directly." >&6;}
18202      new_path="$path"
18203    fi
18204
18205    if test "x$new_path" = x; then
18206        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
18207$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
18208        has_space=`$ECHO "$complete" | $GREP " "`
18209        if test "x$has_space" != x; then
18210          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18211$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18212        fi
18213        as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18214      fi
18215  fi
18216
18217      # Now join together the path and the arguments once again
18218      if test "x$arguments" != xEOL; then
18219        new_complete="$new_path ${arguments% *}"
18220      else
18221        new_complete="$new_path"
18222      fi
18223
18224  if test "x$complete" != "x$new_complete"; then
18225      BUILD_CXX="$new_complete"
18226      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
18227$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
18228    fi
18229
18230    # Extract the first word of "ld", so it can be a program name with args.
18231set dummy ld; ac_word=$2
18232{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18233$as_echo_n "checking for $ac_word... " >&6; }
18234if ${ac_cv_path_BUILD_LD+:} false; then :
18235  $as_echo_n "(cached) " >&6
18236else
18237  case $BUILD_LD in
18238  [\\/]* | ?:[\\/]*)
18239  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
18240  ;;
18241  *)
18242  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18243for as_dir in $PATH
18244do
18245  IFS=$as_save_IFS
18246  test -z "$as_dir" && as_dir=.
18247    for ac_exec_ext in '' $ac_executable_extensions; do
18248  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18249    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
18250    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18251    break 2
18252  fi
18253done
18254  done
18255IFS=$as_save_IFS
18256
18257  ;;
18258esac
18259fi
18260BUILD_LD=$ac_cv_path_BUILD_LD
18261if test -n "$BUILD_LD"; then
18262  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
18263$as_echo "$BUILD_LD" >&6; }
18264else
18265  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18266$as_echo "no" >&6; }
18267fi
18268
18269
18270
18271  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18272
18273  # First separate the path from the arguments. This will split at the first
18274  # space.
18275  complete="$BUILD_LD"
18276  path="${complete%% *}"
18277  tmp="$complete EOL"
18278  arguments="${tmp#* }"
18279
18280  # Input might be given as Windows format, start by converting to
18281  # unix format.
18282  new_path=`$CYGPATH -u "$path"`
18283
18284  # Now try to locate executable using which
18285  new_path=`$WHICH "$new_path" 2> /dev/null`
18286  # bat and cmd files are not always considered executable in cygwin causing which
18287  # to not find them
18288  if test "x$new_path" = x \
18289           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18290           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18291    new_path=`$CYGPATH -u "$path"`
18292  fi
18293  if test "x$new_path" = x; then
18294    # Oops. Which didn't find the executable.
18295    # The splitting of arguments from the executable at a space might have been incorrect,
18296    # since paths with space are more likely in Windows. Give it another try with the whole
18297    # argument.
18298    path="$complete"
18299    arguments="EOL"
18300    new_path=`$CYGPATH -u "$path"`
18301    new_path=`$WHICH "$new_path" 2> /dev/null`
18302    # bat and cmd files are not always considered executable in cygwin causing which
18303    # to not find them
18304    if test "x$new_path" = x \
18305             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18306             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18307      new_path=`$CYGPATH -u "$path"`
18308    fi
18309    if test "x$new_path" = x; then
18310      # It's still not found. Now this is an unrecoverable error.
18311      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
18312$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
18313      has_space=`$ECHO "$complete" | $GREP " "`
18314      if test "x$has_space" != x; then
18315        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18316$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18317      fi
18318      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18319    fi
18320  fi
18321
18322  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18323  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18324  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18325  # "foo.exe" is OK but "foo" is an error.
18326  #
18327  # This test is therefore slightly more accurate than "test -f" to check for file precense.
18328  # It is also a way to make sure we got the proper file name for the real test later on.
18329  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18330  if test "x$test_shortpath" = x; then
18331    # Short path failed, file does not exist as specified.
18332    # Try adding .exe or .cmd
18333    if test -f "${new_path}.exe"; then
18334       input_to_shortpath="${new_path}.exe"
18335    elif test -f "${new_path}.cmd"; then
18336       input_to_shortpath="${new_path}.cmd"
18337    else
18338      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&5
18339$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&6;}
18340      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18341$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18342      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18343    fi
18344  else
18345    input_to_shortpath="$new_path"
18346  fi
18347
18348  # Call helper function which possibly converts this using DOS-style short mode.
18349  # If so, the updated path is stored in $new_path.
18350  new_path="$input_to_shortpath"
18351
18352  input_path="$input_to_shortpath"
18353  # Check if we need to convert this using DOS-style short mode. If the path
18354  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18355  # take no chances and rewrite it.
18356  # Note: m4 eats our [], so we need to use [ and ] instead.
18357  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18358  if test "x$has_forbidden_chars" != x; then
18359    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18360    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18361    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18362    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18363      # Going to short mode and back again did indeed matter. Since short mode is
18364      # case insensitive, let's make it lowercase to improve readability.
18365      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18366      # Now convert it back to Unix-stile (cygpath)
18367      input_path=`$CYGPATH -u "$shortmode_path"`
18368      new_path="$input_path"
18369    fi
18370  fi
18371
18372  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18373  if test "x$test_cygdrive_prefix" = x; then
18374    # As a simple fix, exclude /usr/bin since it's not a real path.
18375    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18376      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18377      # a path prefixed by /cygdrive for fixpath to work.
18378      new_path="$CYGWIN_ROOT_PATH$input_path"
18379    fi
18380  fi
18381
18382  # remove trailing .exe if any
18383  new_path="${new_path/%.exe/}"
18384
18385  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18386
18387  # First separate the path from the arguments. This will split at the first
18388  # space.
18389  complete="$BUILD_LD"
18390  path="${complete%% *}"
18391  tmp="$complete EOL"
18392  arguments="${tmp#* }"
18393
18394  # Input might be given as Windows format, start by converting to
18395  # unix format.
18396  new_path="$path"
18397
18398  windows_path="$new_path"
18399  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18400    unix_path=`$CYGPATH -u "$windows_path"`
18401    new_path="$unix_path"
18402  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18403    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18404    new_path="$unix_path"
18405  fi
18406
18407
18408  # Now try to locate executable using which
18409  new_path=`$WHICH "$new_path" 2> /dev/null`
18410
18411  if test "x$new_path" = x; then
18412    # Oops. Which didn't find the executable.
18413    # The splitting of arguments from the executable at a space might have been incorrect,
18414    # since paths with space are more likely in Windows. Give it another try with the whole
18415    # argument.
18416    path="$complete"
18417    arguments="EOL"
18418    new_path="$path"
18419
18420  windows_path="$new_path"
18421  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18422    unix_path=`$CYGPATH -u "$windows_path"`
18423    new_path="$unix_path"
18424  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18425    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18426    new_path="$unix_path"
18427  fi
18428
18429
18430    new_path=`$WHICH "$new_path" 2> /dev/null`
18431
18432    if test "x$new_path" = x; then
18433      # It's still not found. Now this is an unrecoverable error.
18434      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
18435$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
18436      has_space=`$ECHO "$complete" | $GREP " "`
18437      if test "x$has_space" != x; then
18438        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18439$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18440      fi
18441      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18442    fi
18443  fi
18444
18445  # Now new_path has a complete unix path to the binary
18446  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18447    # Keep paths in /bin as-is, but remove trailing .exe if any
18448    new_path="${new_path/%.exe/}"
18449    # Do not save /bin paths to all_fixpath_prefixes!
18450  else
18451    # Not in mixed or Windows style, start by that.
18452    new_path=`cmd //c echo $new_path`
18453
18454  input_path="$new_path"
18455  # Check if we need to convert this using DOS-style short mode. If the path
18456  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18457  # take no chances and rewrite it.
18458  # Note: m4 eats our [], so we need to use [ and ] instead.
18459  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18460  if test "x$has_forbidden_chars" != x; then
18461    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18462    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18463  fi
18464
18465    # Output is in $new_path
18466
18467  windows_path="$new_path"
18468  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18469    unix_path=`$CYGPATH -u "$windows_path"`
18470    new_path="$unix_path"
18471  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18472    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18473    new_path="$unix_path"
18474  fi
18475
18476    # remove trailing .exe if any
18477    new_path="${new_path/%.exe/}"
18478
18479    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18480    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18481  fi
18482
18483  else
18484    # We're on a posix platform. Hooray! :)
18485    # First separate the path from the arguments. This will split at the first
18486    # space.
18487    complete="$BUILD_LD"
18488    path="${complete%% *}"
18489    tmp="$complete EOL"
18490    arguments="${tmp#* }"
18491
18492    # Cannot rely on the command "which" here since it doesn't always work.
18493    is_absolute_path=`$ECHO "$path" | $GREP ^/`
18494    if test -z "$is_absolute_path"; then
18495      # Path to executable is not absolute. Find it.
18496      IFS_save="$IFS"
18497      IFS=:
18498      for p in $PATH; do
18499        if test -f "$p/$path" && test -x "$p/$path"; then
18500          new_path="$p/$path"
18501          break
18502        fi
18503      done
18504      IFS="$IFS_save"
18505    else
18506      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_LD (as $path) failed, using $path directly." >&5
18507$as_echo "$as_me: Resolving BUILD_LD (as $path) failed, using $path directly." >&6;}
18508      new_path="$path"
18509    fi
18510
18511    if test "x$new_path" = x; then
18512        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
18513$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
18514        has_space=`$ECHO "$complete" | $GREP " "`
18515        if test "x$has_space" != x; then
18516          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18517$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18518        fi
18519        as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18520      fi
18521  fi
18522
18523      # Now join together the path and the arguments once again
18524      if test "x$arguments" != xEOL; then
18525        new_complete="$new_path ${arguments% *}"
18526      else
18527        new_complete="$new_path"
18528      fi
18529
18530  if test "x$complete" != "x$new_complete"; then
18531      BUILD_LD="$new_complete"
18532      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_LD to \"$new_complete\"" >&5
18533$as_echo "$as_me: Rewriting BUILD_LD to \"$new_complete\"" >&6;}
18534    fi
18535
18536fi
18537
18538
18539
18540
18541# If a devkit is found on the builddeps server, then prepend its path to the
18542# PATH variable. If there are cross compilers available in the devkit, these
18543# will be found by AC_PROG_CC et al.
18544DEVKIT=
18545
18546
18547    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
18548        # Source the builddeps file again, to make sure it uses the latest variables!
18549        . $builddepsfile
18550        # Look for a target and build machine specific resource!
18551        eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
18552        if test "x$resource" = x; then
18553            # Ok, lets instead look for a target specific resource
18554            eval resource=\${builddep_devkit_TARGET_${rewritten_target_var}}
18555        fi
18556        if test "x$resource" = x; then
18557            # Ok, lets instead look for a build specific resource
18558            eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}}
18559        fi
18560        if test "x$resource" = x; then
18561            # Ok, lets instead look for a generic resource
18562            # (The devkit comes from M4 and not the shell, thus no need for eval here.)
18563            resource=${builddep_devkit}
18564        fi
18565        if test "x$resource" != x; then
18566            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for devkit" >&5
18567$as_echo "$as_me: Using builddeps $resource for devkit" >&6;}
18568	    # If the resource in the builddeps.conf file is an existing directory,
18569	    # for example /java/linux/cups
18570	    if test -d ${resource}; then
18571	       depdir=${resource}
18572	    else
18573
18574# devkit is for example mymodule
18575# $resource is for example libs/general/libmymod_1_2_3.zip
18576# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
18577# $with_builddeps_dir is for example /localhome/builddeps
18578# depdir is the name of the variable into which we store the depdir, eg MYMOD
18579# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
18580# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
18581    filename=`basename $resource`
18582    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
18583    filebase=${filename%%.*}
18584    extension=${filename#*.}
18585    installdir=$with_builddeps_dir/$filebase
18586    if test ! -f $installdir/$filename.unpacked; then
18587        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&5
18588$as_echo "$as_me: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&6;}
18589        if test ! -d $installdir; then
18590            mkdir -p $installdir
18591        fi
18592        if test ! -d $installdir; then
18593            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
18594        fi
18595        tmpfile=`mktemp $installdir/devkit.XXXXXXXXX`
18596        touch $tmpfile
18597        if test ! -f $tmpfile; then
18598            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
18599        fi
18600
18601    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
18602    # $tmpfile is the local file name for the downloaded file.
18603    VALID_TOOL=no
18604    if test "x$BDEPS_FTP" = xwget; then
18605       VALID_TOOL=yes
18606       wget -O $tmpfile $with_builddeps_server/$resource
18607    fi
18608    if test "x$BDEPS_FTP" = xlftp; then
18609       VALID_TOOL=yes
18610       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
18611    fi
18612    if test "x$BDEPS_FTP" = xftp; then
18613        VALID_TOOL=yes
18614        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
18615        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
18616        FTPUSERPWD=${FTPSERVER%%@*}
18617        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
18618            FTPUSER=${userpwd%%:*}
18619            FTPPWD=${userpwd#*@}
18620            FTPSERVER=${FTPSERVER#*@}
18621        else
18622            FTPUSER=ftp
18623            FTPPWD=ftp
18624        fi
18625        # the "pass" command does not work on some
18626        # ftp clients (read ftp.exe) but if it works,
18627        # passive mode is better!
18628        (\
18629            echo "user $FTPUSER $FTPPWD"        ;\
18630            echo "pass"                         ;\
18631            echo "bin"                          ;\
18632            echo "get $FTPPATH $tmpfile"              ;\
18633        ) | ftp -in $FTPSERVER
18634    fi
18635    if test "x$VALID_TOOL" != xyes; then
18636       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
18637    fi
18638
18639        mv $tmpfile $installdir/$filename
18640        if test ! -s $installdir/$filename; then
18641            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
18642        fi
18643        case "$extension" in
18644            zip)  echo "Unzipping $installdir/$filename..."
18645               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
18646            ;;
18647            tar.gz) echo "Untaring $installdir/$filename..."
18648               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
18649            ;;
18650            tgz) echo "Untaring $installdir/$filename..."
18651               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
18652            ;;
18653            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
18654            ;;
18655        esac
18656    fi
18657    if test -f $installdir/$filename.unpacked; then
18658        depdir=$installdir
18659    fi
18660
18661	    fi
18662            # Source the builddeps file again, because in the previous command, the depdir
18663            # was updated to point at the current build dependency install directory.
18664            . $builddepsfile
18665            # Now extract variables from the builddeps.conf files.
18666            theroot=${builddep_devkit_ROOT}
18667            thecflags=${builddep_devkit_CFLAGS}
18668            thelibs=${builddep_devkit_LIBS}
18669            if test "x$depdir" = x; then
18670                as_fn_error $? "Could not download build dependency devkit" "$LINENO" 5
18671            fi
18672            DEVKIT=$depdir
18673            if test "x$theroot" != x; then
18674               DEVKIT="$theroot"
18675            fi
18676            if test "x$thecflags" != x; then
18677               DEVKIT_CFLAGS="$thecflags"
18678            fi
18679            if test "x$thelibs" != x; then
18680               DEVKIT_LIBS="$thelibs"
18681            fi
18682            # Found devkit
18683                     PATH="$DEVKIT/bin:$PATH"
18684                     SYS_ROOT="$DEVKIT/${rewritten_target}/sys-root"
18685                     if test "x$x_includes" = "xNONE"; then
18686                         x_includes="$SYS_ROOT/usr/include/X11"
18687                     fi
18688                     if test "x$x_libraries" = "xNONE"; then
18689                         x_libraries="$SYS_ROOT/usr/lib"
18690                     fi
18691
18692
18693        fi
18694
18695    fi
18696
18697
18698# Store the CFLAGS etal passed to the configure script.
18699ORG_CFLAGS="$CFLAGS"
18700ORG_CXXFLAGS="$CXXFLAGS"
18701ORG_OBJCFLAGS="$OBJCFLAGS"
18702
18703# autoconf magic only relies on PATH, so update it if tools dir is specified
18704OLD_PATH="$PATH"
18705if test "x$TOOLS_DIR" != x; then
18706  PATH=$TOOLS_DIR:$PATH
18707fi
18708
18709
18710### Locate C compiler (CC)
18711
18712# On windows, only cl.exe is supported.
18713# On Solaris, cc is preferred to gcc.
18714# Elsewhere, gcc is preferred to cc.
18715
18716if test "x$CC" != x; then
18717  COMPILER_CHECK_LIST="$CC"
18718elif test "x$OPENJDK_TARGET_OS" = "xwindows"; then
18719  COMPILER_CHECK_LIST="cl"
18720elif test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
18721  COMPILER_CHECK_LIST="cc gcc"
18722else
18723  COMPILER_CHECK_LIST="gcc cc"
18724fi
18725
18726
18727  COMPILER_NAME=C
18728
18729  CC=
18730  # If TOOLS_DIR is set, check for all compiler names in there first
18731  # before checking the rest of the PATH.
18732  if test -n "$TOOLS_DIR"; then
18733    PATH_save="$PATH"
18734    PATH="$TOOLS_DIR"
18735    for ac_prog in $COMPILER_CHECK_LIST
18736do
18737  # Extract the first word of "$ac_prog", so it can be a program name with args.
18738set dummy $ac_prog; ac_word=$2
18739{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18740$as_echo_n "checking for $ac_word... " >&6; }
18741if ${ac_cv_path_TOOLS_DIR_CC+:} false; then :
18742  $as_echo_n "(cached) " >&6
18743else
18744  case $TOOLS_DIR_CC in
18745  [\\/]* | ?:[\\/]*)
18746  ac_cv_path_TOOLS_DIR_CC="$TOOLS_DIR_CC" # Let the user override the test with a path.
18747  ;;
18748  *)
18749  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18750for as_dir in $PATH
18751do
18752  IFS=$as_save_IFS
18753  test -z "$as_dir" && as_dir=.
18754    for ac_exec_ext in '' $ac_executable_extensions; do
18755  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18756    ac_cv_path_TOOLS_DIR_CC="$as_dir/$ac_word$ac_exec_ext"
18757    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18758    break 2
18759  fi
18760done
18761  done
18762IFS=$as_save_IFS
18763
18764  ;;
18765esac
18766fi
18767TOOLS_DIR_CC=$ac_cv_path_TOOLS_DIR_CC
18768if test -n "$TOOLS_DIR_CC"; then
18769  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CC" >&5
18770$as_echo "$TOOLS_DIR_CC" >&6; }
18771else
18772  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18773$as_echo "no" >&6; }
18774fi
18775
18776
18777  test -n "$TOOLS_DIR_CC" && break
18778done
18779
18780    CC=$TOOLS_DIR_CC
18781    PATH="$PATH_save"
18782  fi
18783
18784  # AC_PATH_PROGS can't be run multiple times with the same variable,
18785  # so create a new name for this run.
18786  if test "x$CC" = x; then
18787    for ac_prog in $COMPILER_CHECK_LIST
18788do
18789  # Extract the first word of "$ac_prog", so it can be a program name with args.
18790set dummy $ac_prog; ac_word=$2
18791{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18792$as_echo_n "checking for $ac_word... " >&6; }
18793if ${ac_cv_path_POTENTIAL_CC+:} false; then :
18794  $as_echo_n "(cached) " >&6
18795else
18796  case $POTENTIAL_CC in
18797  [\\/]* | ?:[\\/]*)
18798  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
18799  ;;
18800  *)
18801  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18802for as_dir in $PATH
18803do
18804  IFS=$as_save_IFS
18805  test -z "$as_dir" && as_dir=.
18806    for ac_exec_ext in '' $ac_executable_extensions; do
18807  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18808    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
18809    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18810    break 2
18811  fi
18812done
18813  done
18814IFS=$as_save_IFS
18815
18816  ;;
18817esac
18818fi
18819POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
18820if test -n "$POTENTIAL_CC"; then
18821  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
18822$as_echo "$POTENTIAL_CC" >&6; }
18823else
18824  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18825$as_echo "no" >&6; }
18826fi
18827
18828
18829  test -n "$POTENTIAL_CC" && break
18830done
18831
18832    CC=$POTENTIAL_CC
18833  fi
18834
18835  if test "x$CC" = x; then
18836
18837    # Print a helpful message on how to acquire the necessary build dependency.
18838    # devkit is the help tag: freetyp2, cups, pulse, alsa etc
18839    MISSING_DEPENDENCY=devkit
18840    PKGHANDLER_COMMAND=
18841
18842    case $PKGHANDLER in
18843	apt-get)
18844                apt_help     $MISSING_DEPENDENCY ;;
18845    yum)
18846                yum_help     $MISSING_DEPENDENCY ;;
18847	port)
18848                port_help    $MISSING_DEPENDENCY ;;
18849	pkgutil)
18850                pkgutil_help $MISSING_DEPENDENCY ;;
18851	pkgadd)
18852                pkgadd_help  $MISSING_DEPENDENCY ;;
18853    * )
18854      break ;;
18855    esac
18856
18857    if test "x$PKGHANDLER_COMMAND" != x; then
18858        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
18859    fi
18860
18861      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
18862  fi
18863
18864  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18865
18866  # First separate the path from the arguments. This will split at the first
18867  # space.
18868  complete="$CC"
18869  path="${complete%% *}"
18870  tmp="$complete EOL"
18871  arguments="${tmp#* }"
18872
18873  # Input might be given as Windows format, start by converting to
18874  # unix format.
18875  new_path=`$CYGPATH -u "$path"`
18876
18877  # Now try to locate executable using which
18878  new_path=`$WHICH "$new_path" 2> /dev/null`
18879  # bat and cmd files are not always considered executable in cygwin causing which
18880  # to not find them
18881  if test "x$new_path" = x \
18882           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18883           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18884    new_path=`$CYGPATH -u "$path"`
18885  fi
18886  if test "x$new_path" = x; then
18887    # Oops. Which didn't find the executable.
18888    # The splitting of arguments from the executable at a space might have been incorrect,
18889    # since paths with space are more likely in Windows. Give it another try with the whole
18890    # argument.
18891    path="$complete"
18892    arguments="EOL"
18893    new_path=`$CYGPATH -u "$path"`
18894    new_path=`$WHICH "$new_path" 2> /dev/null`
18895    # bat and cmd files are not always considered executable in cygwin causing which
18896    # to not find them
18897    if test "x$new_path" = x \
18898             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18899             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18900      new_path=`$CYGPATH -u "$path"`
18901    fi
18902    if test "x$new_path" = x; then
18903      # It's still not found. Now this is an unrecoverable error.
18904      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
18905$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
18906      has_space=`$ECHO "$complete" | $GREP " "`
18907      if test "x$has_space" != x; then
18908        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18909$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18910      fi
18911      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
18912    fi
18913  fi
18914
18915  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18916  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18917  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18918  # "foo.exe" is OK but "foo" is an error.
18919  #
18920  # This test is therefore slightly more accurate than "test -f" to check for file precense.
18921  # It is also a way to make sure we got the proper file name for the real test later on.
18922  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18923  if test "x$test_shortpath" = x; then
18924    # Short path failed, file does not exist as specified.
18925    # Try adding .exe or .cmd
18926    if test -f "${new_path}.exe"; then
18927       input_to_shortpath="${new_path}.exe"
18928    elif test -f "${new_path}.cmd"; then
18929       input_to_shortpath="${new_path}.cmd"
18930    else
18931      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
18932$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
18933      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18934$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18935      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
18936    fi
18937  else
18938    input_to_shortpath="$new_path"
18939  fi
18940
18941  # Call helper function which possibly converts this using DOS-style short mode.
18942  # If so, the updated path is stored in $new_path.
18943  new_path="$input_to_shortpath"
18944
18945  input_path="$input_to_shortpath"
18946  # Check if we need to convert this using DOS-style short mode. If the path
18947  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18948  # take no chances and rewrite it.
18949  # Note: m4 eats our [], so we need to use [ and ] instead.
18950  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18951  if test "x$has_forbidden_chars" != x; then
18952    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18953    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18954    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18955    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18956      # Going to short mode and back again did indeed matter. Since short mode is
18957      # case insensitive, let's make it lowercase to improve readability.
18958      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18959      # Now convert it back to Unix-stile (cygpath)
18960      input_path=`$CYGPATH -u "$shortmode_path"`
18961      new_path="$input_path"
18962    fi
18963  fi
18964
18965  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18966  if test "x$test_cygdrive_prefix" = x; then
18967    # As a simple fix, exclude /usr/bin since it's not a real path.
18968    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18969      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18970      # a path prefixed by /cygdrive for fixpath to work.
18971      new_path="$CYGWIN_ROOT_PATH$input_path"
18972    fi
18973  fi
18974
18975  # remove trailing .exe if any
18976  new_path="${new_path/%.exe/}"
18977
18978  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18979
18980  # First separate the path from the arguments. This will split at the first
18981  # space.
18982  complete="$CC"
18983  path="${complete%% *}"
18984  tmp="$complete EOL"
18985  arguments="${tmp#* }"
18986
18987  # Input might be given as Windows format, start by converting to
18988  # unix format.
18989  new_path="$path"
18990
18991  windows_path="$new_path"
18992  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18993    unix_path=`$CYGPATH -u "$windows_path"`
18994    new_path="$unix_path"
18995  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18996    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18997    new_path="$unix_path"
18998  fi
18999
19000
19001  # Now try to locate executable using which
19002  new_path=`$WHICH "$new_path" 2> /dev/null`
19003
19004  if test "x$new_path" = x; then
19005    # Oops. Which didn't find the executable.
19006    # The splitting of arguments from the executable at a space might have been incorrect,
19007    # since paths with space are more likely in Windows. Give it another try with the whole
19008    # argument.
19009    path="$complete"
19010    arguments="EOL"
19011    new_path="$path"
19012
19013  windows_path="$new_path"
19014  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19015    unix_path=`$CYGPATH -u "$windows_path"`
19016    new_path="$unix_path"
19017  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19018    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19019    new_path="$unix_path"
19020  fi
19021
19022
19023    new_path=`$WHICH "$new_path" 2> /dev/null`
19024
19025    if test "x$new_path" = x; then
19026      # It's still not found. Now this is an unrecoverable error.
19027      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
19028$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
19029      has_space=`$ECHO "$complete" | $GREP " "`
19030      if test "x$has_space" != x; then
19031        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19032$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19033      fi
19034      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
19035    fi
19036  fi
19037
19038  # Now new_path has a complete unix path to the binary
19039  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19040    # Keep paths in /bin as-is, but remove trailing .exe if any
19041    new_path="${new_path/%.exe/}"
19042    # Do not save /bin paths to all_fixpath_prefixes!
19043  else
19044    # Not in mixed or Windows style, start by that.
19045    new_path=`cmd //c echo $new_path`
19046
19047  input_path="$new_path"
19048  # Check if we need to convert this using DOS-style short mode. If the path
19049  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19050  # take no chances and rewrite it.
19051  # Note: m4 eats our [], so we need to use [ and ] instead.
19052  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19053  if test "x$has_forbidden_chars" != x; then
19054    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19055    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19056  fi
19057
19058    # Output is in $new_path
19059
19060  windows_path="$new_path"
19061  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19062    unix_path=`$CYGPATH -u "$windows_path"`
19063    new_path="$unix_path"
19064  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19065    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19066    new_path="$unix_path"
19067  fi
19068
19069    # remove trailing .exe if any
19070    new_path="${new_path/%.exe/}"
19071
19072    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19073    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19074  fi
19075
19076  else
19077    # We're on a posix platform. Hooray! :)
19078    # First separate the path from the arguments. This will split at the first
19079    # space.
19080    complete="$CC"
19081    path="${complete%% *}"
19082    tmp="$complete EOL"
19083    arguments="${tmp#* }"
19084
19085    # Cannot rely on the command "which" here since it doesn't always work.
19086    is_absolute_path=`$ECHO "$path" | $GREP ^/`
19087    if test -z "$is_absolute_path"; then
19088      # Path to executable is not absolute. Find it.
19089      IFS_save="$IFS"
19090      IFS=:
19091      for p in $PATH; do
19092        if test -f "$p/$path" && test -x "$p/$path"; then
19093          new_path="$p/$path"
19094          break
19095        fi
19096      done
19097      IFS="$IFS_save"
19098    else
19099      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CC (as $path) failed, using $path directly." >&5
19100$as_echo "$as_me: Resolving CC (as $path) failed, using $path directly." >&6;}
19101      new_path="$path"
19102    fi
19103
19104    if test "x$new_path" = x; then
19105        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
19106$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
19107        has_space=`$ECHO "$complete" | $GREP " "`
19108        if test "x$has_space" != x; then
19109          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19110$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19111        fi
19112        as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
19113      fi
19114  fi
19115
19116      # Now join together the path and the arguments once again
19117      if test "x$arguments" != xEOL; then
19118        new_complete="$new_path ${arguments% *}"
19119      else
19120        new_complete="$new_path"
19121      fi
19122
19123  if test "x$complete" != "x$new_complete"; then
19124      CC="$new_complete"
19125      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
19126$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
19127    fi
19128
19129  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
19130$as_echo_n "checking resolved symbolic links for CC... " >&6; }
19131  TEST_COMPILER="$CC"
19132
19133    if test "x$OPENJDK_BUILD_OS" != xwindows; then
19134        # Follow a chain of symbolic links. Use readlink
19135        # where it exists, else fall back to horribly
19136        # complicated shell code.
19137        if test "x$READLINK_TESTED" != yes; then
19138            # On MacOSX there is a readlink tool with a different
19139            # purpose than the GNU readlink tool. Check the found readlink.
19140            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
19141            if test "x$ISGNU" = x; then
19142                 # A readlink that we do not know how to use.
19143                 # Are there other non-GNU readlinks out there?
19144                 READLINK_TESTED=yes
19145                 READLINK=
19146            fi
19147        fi
19148
19149        if test "x$READLINK" != x; then
19150            TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
19151        else
19152            # Save the current directory for restoring afterwards
19153            STARTDIR=$PWD
19154            COUNTER=0
19155            sym_link_dir=`$DIRNAME $TEST_COMPILER`
19156            sym_link_file=`$BASENAME $TEST_COMPILER`
19157            cd $sym_link_dir
19158            # Use -P flag to resolve symlinks in directories.
19159            cd `$THEPWDCMD -P`
19160            sym_link_dir=`$THEPWDCMD -P`
19161            # Resolve file symlinks
19162            while test $COUNTER -lt 20; do
19163                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
19164                if test "x$ISLINK" == x; then
19165                    # This is not a symbolic link! We are done!
19166                    break
19167                fi
19168                # Again resolve directory symlinks since the target of the just found
19169                # link could be in a different directory
19170                cd `$DIRNAME $ISLINK`
19171                sym_link_dir=`$THEPWDCMD -P`
19172                sym_link_file=`$BASENAME $ISLINK`
19173                let COUNTER=COUNTER+1
19174            done
19175            cd $STARTDIR
19176            TEST_COMPILER=$sym_link_dir/$sym_link_file
19177        fi
19178    fi
19179
19180  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
19181$as_echo "$TEST_COMPILER" >&6; }
19182  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
19183$as_echo_n "checking if CC is disguised ccache... " >&6; }
19184
19185  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
19186  if test "x$COMPILER_BASENAME" = "xccache"; then
19187    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
19188$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
19189    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
19190    # We want to control ccache invocation ourselves, so ignore this cc and try
19191    # searching again.
19192
19193    # Remove the path to the fake ccache cc from the PATH
19194    RETRY_COMPILER_SAVED_PATH="$PATH"
19195    COMPILER_DIRNAME=`$DIRNAME $CC`
19196    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
19197
19198    # Try again looking for our compiler
19199    if test -n "$ac_tool_prefix"; then
19200  for ac_prog in $COMPILER_CHECK_LIST
19201  do
19202    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
19203set dummy $ac_tool_prefix$ac_prog; ac_word=$2
19204{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19205$as_echo_n "checking for $ac_word... " >&6; }
19206if ${ac_cv_prog_PROPER_COMPILER_CC+:} false; then :
19207  $as_echo_n "(cached) " >&6
19208else
19209  if test -n "$PROPER_COMPILER_CC"; then
19210  ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
19211else
19212as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19213for as_dir in $PATH
19214do
19215  IFS=$as_save_IFS
19216  test -z "$as_dir" && as_dir=.
19217    for ac_exec_ext in '' $ac_executable_extensions; do
19218  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19219    ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
19220    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19221    break 2
19222  fi
19223done
19224  done
19225IFS=$as_save_IFS
19226
19227fi
19228fi
19229PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
19230if test -n "$PROPER_COMPILER_CC"; then
19231  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
19232$as_echo "$PROPER_COMPILER_CC" >&6; }
19233else
19234  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19235$as_echo "no" >&6; }
19236fi
19237
19238
19239    test -n "$PROPER_COMPILER_CC" && break
19240  done
19241fi
19242if test -z "$PROPER_COMPILER_CC"; then
19243  ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
19244  for ac_prog in $COMPILER_CHECK_LIST
19245do
19246  # Extract the first word of "$ac_prog", so it can be a program name with args.
19247set dummy $ac_prog; ac_word=$2
19248{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19249$as_echo_n "checking for $ac_word... " >&6; }
19250if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+:} false; then :
19251  $as_echo_n "(cached) " >&6
19252else
19253  if test -n "$ac_ct_PROPER_COMPILER_CC"; then
19254  ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
19255else
19256as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19257for as_dir in $PATH
19258do
19259  IFS=$as_save_IFS
19260  test -z "$as_dir" && as_dir=.
19261    for ac_exec_ext in '' $ac_executable_extensions; do
19262  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19263    ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
19264    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19265    break 2
19266  fi
19267done
19268  done
19269IFS=$as_save_IFS
19270
19271fi
19272fi
19273ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
19274if test -n "$ac_ct_PROPER_COMPILER_CC"; then
19275  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
19276$as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
19277else
19278  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19279$as_echo "no" >&6; }
19280fi
19281
19282
19283  test -n "$ac_ct_PROPER_COMPILER_CC" && break
19284done
19285
19286  if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
19287    PROPER_COMPILER_CC=""
19288  else
19289    case $cross_compiling:$ac_tool_warned in
19290yes:)
19291{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19292$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19293ac_tool_warned=yes ;;
19294esac
19295    PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
19296  fi
19297fi
19298
19299
19300  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19301
19302  # First separate the path from the arguments. This will split at the first
19303  # space.
19304  complete="$PROPER_COMPILER_CC"
19305  path="${complete%% *}"
19306  tmp="$complete EOL"
19307  arguments="${tmp#* }"
19308
19309  # Input might be given as Windows format, start by converting to
19310  # unix format.
19311  new_path=`$CYGPATH -u "$path"`
19312
19313  # Now try to locate executable using which
19314  new_path=`$WHICH "$new_path" 2> /dev/null`
19315  # bat and cmd files are not always considered executable in cygwin causing which
19316  # to not find them
19317  if test "x$new_path" = x \
19318           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19319           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19320    new_path=`$CYGPATH -u "$path"`
19321  fi
19322  if test "x$new_path" = x; then
19323    # Oops. Which didn't find the executable.
19324    # The splitting of arguments from the executable at a space might have been incorrect,
19325    # since paths with space are more likely in Windows. Give it another try with the whole
19326    # argument.
19327    path="$complete"
19328    arguments="EOL"
19329    new_path=`$CYGPATH -u "$path"`
19330    new_path=`$WHICH "$new_path" 2> /dev/null`
19331    # bat and cmd files are not always considered executable in cygwin causing which
19332    # to not find them
19333    if test "x$new_path" = x \
19334             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19335             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19336      new_path=`$CYGPATH -u "$path"`
19337    fi
19338    if test "x$new_path" = x; then
19339      # It's still not found. Now this is an unrecoverable error.
19340      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
19341$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
19342      has_space=`$ECHO "$complete" | $GREP " "`
19343      if test "x$has_space" != x; then
19344        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19345$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19346      fi
19347      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19348    fi
19349  fi
19350
19351  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19352  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19353  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19354  # "foo.exe" is OK but "foo" is an error.
19355  #
19356  # This test is therefore slightly more accurate than "test -f" to check for file precense.
19357  # It is also a way to make sure we got the proper file name for the real test later on.
19358  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19359  if test "x$test_shortpath" = x; then
19360    # Short path failed, file does not exist as specified.
19361    # Try adding .exe or .cmd
19362    if test -f "${new_path}.exe"; then
19363       input_to_shortpath="${new_path}.exe"
19364    elif test -f "${new_path}.cmd"; then
19365       input_to_shortpath="${new_path}.cmd"
19366    else
19367      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
19368$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
19369      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19370$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19371      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19372    fi
19373  else
19374    input_to_shortpath="$new_path"
19375  fi
19376
19377  # Call helper function which possibly converts this using DOS-style short mode.
19378  # If so, the updated path is stored in $new_path.
19379  new_path="$input_to_shortpath"
19380
19381  input_path="$input_to_shortpath"
19382  # Check if we need to convert this using DOS-style short mode. If the path
19383  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19384  # take no chances and rewrite it.
19385  # Note: m4 eats our [], so we need to use [ and ] instead.
19386  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19387  if test "x$has_forbidden_chars" != x; then
19388    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19389    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19390    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19391    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19392      # Going to short mode and back again did indeed matter. Since short mode is
19393      # case insensitive, let's make it lowercase to improve readability.
19394      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19395      # Now convert it back to Unix-stile (cygpath)
19396      input_path=`$CYGPATH -u "$shortmode_path"`
19397      new_path="$input_path"
19398    fi
19399  fi
19400
19401  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19402  if test "x$test_cygdrive_prefix" = x; then
19403    # As a simple fix, exclude /usr/bin since it's not a real path.
19404    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19405      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19406      # a path prefixed by /cygdrive for fixpath to work.
19407      new_path="$CYGWIN_ROOT_PATH$input_path"
19408    fi
19409  fi
19410
19411  # remove trailing .exe if any
19412  new_path="${new_path/%.exe/}"
19413
19414  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19415
19416  # First separate the path from the arguments. This will split at the first
19417  # space.
19418  complete="$PROPER_COMPILER_CC"
19419  path="${complete%% *}"
19420  tmp="$complete EOL"
19421  arguments="${tmp#* }"
19422
19423  # Input might be given as Windows format, start by converting to
19424  # unix format.
19425  new_path="$path"
19426
19427  windows_path="$new_path"
19428  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19429    unix_path=`$CYGPATH -u "$windows_path"`
19430    new_path="$unix_path"
19431  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19432    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19433    new_path="$unix_path"
19434  fi
19435
19436
19437  # Now try to locate executable using which
19438  new_path=`$WHICH "$new_path" 2> /dev/null`
19439
19440  if test "x$new_path" = x; then
19441    # Oops. Which didn't find the executable.
19442    # The splitting of arguments from the executable at a space might have been incorrect,
19443    # since paths with space are more likely in Windows. Give it another try with the whole
19444    # argument.
19445    path="$complete"
19446    arguments="EOL"
19447    new_path="$path"
19448
19449  windows_path="$new_path"
19450  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19451    unix_path=`$CYGPATH -u "$windows_path"`
19452    new_path="$unix_path"
19453  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19454    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19455    new_path="$unix_path"
19456  fi
19457
19458
19459    new_path=`$WHICH "$new_path" 2> /dev/null`
19460
19461    if test "x$new_path" = x; then
19462      # It's still not found. Now this is an unrecoverable error.
19463      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
19464$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
19465      has_space=`$ECHO "$complete" | $GREP " "`
19466      if test "x$has_space" != x; then
19467        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19468$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19469      fi
19470      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19471    fi
19472  fi
19473
19474  # Now new_path has a complete unix path to the binary
19475  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19476    # Keep paths in /bin as-is, but remove trailing .exe if any
19477    new_path="${new_path/%.exe/}"
19478    # Do not save /bin paths to all_fixpath_prefixes!
19479  else
19480    # Not in mixed or Windows style, start by that.
19481    new_path=`cmd //c echo $new_path`
19482
19483  input_path="$new_path"
19484  # Check if we need to convert this using DOS-style short mode. If the path
19485  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19486  # take no chances and rewrite it.
19487  # Note: m4 eats our [], so we need to use [ and ] instead.
19488  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19489  if test "x$has_forbidden_chars" != x; then
19490    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19491    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19492  fi
19493
19494    # Output is in $new_path
19495
19496  windows_path="$new_path"
19497  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19498    unix_path=`$CYGPATH -u "$windows_path"`
19499    new_path="$unix_path"
19500  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19501    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19502    new_path="$unix_path"
19503  fi
19504
19505    # remove trailing .exe if any
19506    new_path="${new_path/%.exe/}"
19507
19508    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19509    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19510  fi
19511
19512  else
19513    # We're on a posix platform. Hooray! :)
19514    # First separate the path from the arguments. This will split at the first
19515    # space.
19516    complete="$PROPER_COMPILER_CC"
19517    path="${complete%% *}"
19518    tmp="$complete EOL"
19519    arguments="${tmp#* }"
19520
19521    # Cannot rely on the command "which" here since it doesn't always work.
19522    is_absolute_path=`$ECHO "$path" | $GREP ^/`
19523    if test -z "$is_absolute_path"; then
19524      # Path to executable is not absolute. Find it.
19525      IFS_save="$IFS"
19526      IFS=:
19527      for p in $PATH; do
19528        if test -f "$p/$path" && test -x "$p/$path"; then
19529          new_path="$p/$path"
19530          break
19531        fi
19532      done
19533      IFS="$IFS_save"
19534    else
19535      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&5
19536$as_echo "$as_me: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&6;}
19537      new_path="$path"
19538    fi
19539
19540    if test "x$new_path" = x; then
19541        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
19542$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
19543        has_space=`$ECHO "$complete" | $GREP " "`
19544        if test "x$has_space" != x; then
19545          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19546$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19547        fi
19548        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19549      fi
19550  fi
19551
19552      # Now join together the path and the arguments once again
19553      if test "x$arguments" != xEOL; then
19554        new_complete="$new_path ${arguments% *}"
19555      else
19556        new_complete="$new_path"
19557      fi
19558
19559  if test "x$complete" != "x$new_complete"; then
19560      PROPER_COMPILER_CC="$new_complete"
19561      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
19562$as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
19563    fi
19564
19565    PATH="$RETRY_COMPILER_SAVED_PATH"
19566
19567    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
19568$as_echo_n "checking for resolved symbolic links for CC... " >&6; }
19569
19570    if test "x$OPENJDK_BUILD_OS" != xwindows; then
19571        # Follow a chain of symbolic links. Use readlink
19572        # where it exists, else fall back to horribly
19573        # complicated shell code.
19574        if test "x$READLINK_TESTED" != yes; then
19575            # On MacOSX there is a readlink tool with a different
19576            # purpose than the GNU readlink tool. Check the found readlink.
19577            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
19578            if test "x$ISGNU" = x; then
19579                 # A readlink that we do not know how to use.
19580                 # Are there other non-GNU readlinks out there?
19581                 READLINK_TESTED=yes
19582                 READLINK=
19583            fi
19584        fi
19585
19586        if test "x$READLINK" != x; then
19587            PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
19588        else
19589            # Save the current directory for restoring afterwards
19590            STARTDIR=$PWD
19591            COUNTER=0
19592            sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
19593            sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
19594            cd $sym_link_dir
19595            # Use -P flag to resolve symlinks in directories.
19596            cd `$THEPWDCMD -P`
19597            sym_link_dir=`$THEPWDCMD -P`
19598            # Resolve file symlinks
19599            while test $COUNTER -lt 20; do
19600                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
19601                if test "x$ISLINK" == x; then
19602                    # This is not a symbolic link! We are done!
19603                    break
19604                fi
19605                # Again resolve directory symlinks since the target of the just found
19606                # link could be in a different directory
19607                cd `$DIRNAME $ISLINK`
19608                sym_link_dir=`$THEPWDCMD -P`
19609                sym_link_file=`$BASENAME $ISLINK`
19610                let COUNTER=COUNTER+1
19611            done
19612            cd $STARTDIR
19613            PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
19614        fi
19615    fi
19616
19617    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
19618$as_echo "$PROPER_COMPILER_CC" >&6; }
19619    CC="$PROPER_COMPILER_CC"
19620  else
19621    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
19622$as_echo "no, keeping CC" >&6; }
19623    CC="$TEST_COMPILER"
19624  fi
19625
19626  COMPILER=$CC
19627  COMPILER_NAME=$COMPILER_NAME
19628
19629  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
19630    # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
19631    COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
19632    $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
19633    if test $? -ne 0; then
19634      GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
19635
19636      { $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
19637$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
19638      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
19639$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
19640      as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
19641    else
19642      COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
19643      COMPILER_VENDOR="Sun Studio"
19644    fi
19645  elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
19646    # First line typically looks something like:
19647    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
19648    COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
19649    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
19650    COMPILER_VENDOR="Microsoft CL.EXE"
19651    COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
19652    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
19653      if test "x$COMPILER_CPU_TEST" != "x80x86"; then
19654        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
19655      fi
19656    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
19657      if test "x$COMPILER_CPU_TEST" != "xx64"; then
19658        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
19659      fi
19660    fi
19661  else
19662    COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
19663    # Check that this is likely to be GCC.
19664    $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
19665    if test $? -ne 0; then
19666      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
19667$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
19668      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
19669$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
19670      as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
19671    fi
19672
19673    # First line typically looks something like:
19674    # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
19675    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
19676    COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
19677  fi
19678  # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
19679  CC_VERSION="$COMPILER_VERSION"
19680  # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
19681  CC_VENDOR="$COMPILER_VENDOR"
19682
19683  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
19684$as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
19685
19686
19687# Now that we have resolved CC ourself, let autoconf have its go at it
19688ac_ext=c
19689ac_cpp='$CPP $CPPFLAGS'
19690ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19691ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19692ac_compiler_gnu=$ac_cv_c_compiler_gnu
19693if test -n "$ac_tool_prefix"; then
19694  for ac_prog in $CC
19695  do
19696    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
19697set dummy $ac_tool_prefix$ac_prog; ac_word=$2
19698{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19699$as_echo_n "checking for $ac_word... " >&6; }
19700if ${ac_cv_prog_CC+:} false; then :
19701  $as_echo_n "(cached) " >&6
19702else
19703  if test -n "$CC"; then
19704  ac_cv_prog_CC="$CC" # Let the user override the test.
19705else
19706as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19707for as_dir in $PATH
19708do
19709  IFS=$as_save_IFS
19710  test -z "$as_dir" && as_dir=.
19711    for ac_exec_ext in '' $ac_executable_extensions; do
19712  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19713    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
19714    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19715    break 2
19716  fi
19717done
19718  done
19719IFS=$as_save_IFS
19720
19721fi
19722fi
19723CC=$ac_cv_prog_CC
19724if test -n "$CC"; then
19725  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
19726$as_echo "$CC" >&6; }
19727else
19728  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19729$as_echo "no" >&6; }
19730fi
19731
19732
19733    test -n "$CC" && break
19734  done
19735fi
19736if test -z "$CC"; then
19737  ac_ct_CC=$CC
19738  for ac_prog in $CC
19739do
19740  # Extract the first word of "$ac_prog", so it can be a program name with args.
19741set dummy $ac_prog; ac_word=$2
19742{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19743$as_echo_n "checking for $ac_word... " >&6; }
19744if ${ac_cv_prog_ac_ct_CC+:} false; then :
19745  $as_echo_n "(cached) " >&6
19746else
19747  if test -n "$ac_ct_CC"; then
19748  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
19749else
19750as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19751for as_dir in $PATH
19752do
19753  IFS=$as_save_IFS
19754  test -z "$as_dir" && as_dir=.
19755    for ac_exec_ext in '' $ac_executable_extensions; do
19756  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19757    ac_cv_prog_ac_ct_CC="$ac_prog"
19758    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19759    break 2
19760  fi
19761done
19762  done
19763IFS=$as_save_IFS
19764
19765fi
19766fi
19767ac_ct_CC=$ac_cv_prog_ac_ct_CC
19768if test -n "$ac_ct_CC"; then
19769  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
19770$as_echo "$ac_ct_CC" >&6; }
19771else
19772  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19773$as_echo "no" >&6; }
19774fi
19775
19776
19777  test -n "$ac_ct_CC" && break
19778done
19779
19780  if test "x$ac_ct_CC" = x; then
19781    CC=""
19782  else
19783    case $cross_compiling:$ac_tool_warned in
19784yes:)
19785{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19786$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19787ac_tool_warned=yes ;;
19788esac
19789    CC=$ac_ct_CC
19790  fi
19791fi
19792
19793
19794test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19795$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19796as_fn_error $? "no acceptable C compiler found in \$PATH
19797See \`config.log' for more details" "$LINENO" 5; }
19798
19799# Provide some information about the compiler.
19800$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
19801set X $ac_compile
19802ac_compiler=$2
19803for ac_option in --version -v -V -qversion; do
19804  { { ac_try="$ac_compiler $ac_option >&5"
19805case "(($ac_try" in
19806  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19807  *) ac_try_echo=$ac_try;;
19808esac
19809eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19810$as_echo "$ac_try_echo"; } >&5
19811  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
19812  ac_status=$?
19813  if test -s conftest.err; then
19814    sed '10a\
19815... rest of stderr output deleted ...
19816         10q' conftest.err >conftest.er1
19817    cat conftest.er1 >&5
19818  fi
19819  rm -f conftest.er1 conftest.err
19820  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19821  test $ac_status = 0; }
19822done
19823
19824cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19825/* end confdefs.h.  */
19826
19827int
19828main ()
19829{
19830
19831  ;
19832  return 0;
19833}
19834_ACEOF
19835ac_clean_files_save=$ac_clean_files
19836ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
19837# Try to create an executable without -o first, disregard a.out.
19838# It will help us diagnose broken compilers, and finding out an intuition
19839# of exeext.
19840{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
19841$as_echo_n "checking whether the C compiler works... " >&6; }
19842ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
19843
19844# The possible output files:
19845ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
19846
19847ac_rmfiles=
19848for ac_file in $ac_files
19849do
19850  case $ac_file in
19851    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
19852    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
19853  esac
19854done
19855rm -f $ac_rmfiles
19856
19857if { { ac_try="$ac_link_default"
19858case "(($ac_try" in
19859  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19860  *) ac_try_echo=$ac_try;;
19861esac
19862eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19863$as_echo "$ac_try_echo"; } >&5
19864  (eval "$ac_link_default") 2>&5
19865  ac_status=$?
19866  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19867  test $ac_status = 0; }; then :
19868  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
19869# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
19870# in a Makefile.  We should not override ac_cv_exeext if it was cached,
19871# so that the user can short-circuit this test for compilers unknown to
19872# Autoconf.
19873for ac_file in $ac_files ''
19874do
19875  test -f "$ac_file" || continue
19876  case $ac_file in
19877    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
19878	;;
19879    [ab].out )
19880	# We found the default executable, but exeext='' is most
19881	# certainly right.
19882	break;;
19883    *.* )
19884	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
19885	then :; else
19886	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
19887	fi
19888	# We set ac_cv_exeext here because the later test for it is not
19889	# safe: cross compilers may not add the suffix if given an `-o'
19890	# argument, so we may need to know it at that point already.
19891	# Even if this section looks crufty: it has the advantage of
19892	# actually working.
19893	break;;
19894    * )
19895	break;;
19896  esac
19897done
19898test "$ac_cv_exeext" = no && ac_cv_exeext=
19899
19900else
19901  ac_file=''
19902fi
19903if test -z "$ac_file"; then :
19904  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19905$as_echo "no" >&6; }
19906$as_echo "$as_me: failed program was:" >&5
19907sed 's/^/| /' conftest.$ac_ext >&5
19908
19909{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19910$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19911as_fn_error 77 "C compiler cannot create executables
19912See \`config.log' for more details" "$LINENO" 5; }
19913else
19914  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19915$as_echo "yes" >&6; }
19916fi
19917{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
19918$as_echo_n "checking for C compiler default output file name... " >&6; }
19919{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
19920$as_echo "$ac_file" >&6; }
19921ac_exeext=$ac_cv_exeext
19922
19923rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
19924ac_clean_files=$ac_clean_files_save
19925{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
19926$as_echo_n "checking for suffix of executables... " >&6; }
19927if { { ac_try="$ac_link"
19928case "(($ac_try" in
19929  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19930  *) ac_try_echo=$ac_try;;
19931esac
19932eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19933$as_echo "$ac_try_echo"; } >&5
19934  (eval "$ac_link") 2>&5
19935  ac_status=$?
19936  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19937  test $ac_status = 0; }; then :
19938  # If both `conftest.exe' and `conftest' are `present' (well, observable)
19939# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
19940# work properly (i.e., refer to `conftest.exe'), while it won't with
19941# `rm'.
19942for ac_file in conftest.exe conftest conftest.*; do
19943  test -f "$ac_file" || continue
19944  case $ac_file in
19945    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
19946    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
19947	  break;;
19948    * ) break;;
19949  esac
19950done
19951else
19952  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19953$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19954as_fn_error $? "cannot compute suffix of executables: cannot compile and link
19955See \`config.log' for more details" "$LINENO" 5; }
19956fi
19957rm -f conftest conftest$ac_cv_exeext
19958{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
19959$as_echo "$ac_cv_exeext" >&6; }
19960
19961rm -f conftest.$ac_ext
19962EXEEXT=$ac_cv_exeext
19963ac_exeext=$EXEEXT
19964cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19965/* end confdefs.h.  */
19966#include <stdio.h>
19967int
19968main ()
19969{
19970FILE *f = fopen ("conftest.out", "w");
19971 return ferror (f) || fclose (f) != 0;
19972
19973  ;
19974  return 0;
19975}
19976_ACEOF
19977ac_clean_files="$ac_clean_files conftest.out"
19978# Check that the compiler produces executables we can run.  If not, either
19979# the compiler is broken, or we cross compile.
19980{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
19981$as_echo_n "checking whether we are cross compiling... " >&6; }
19982if test "$cross_compiling" != yes; then
19983  { { ac_try="$ac_link"
19984case "(($ac_try" in
19985  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19986  *) ac_try_echo=$ac_try;;
19987esac
19988eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19989$as_echo "$ac_try_echo"; } >&5
19990  (eval "$ac_link") 2>&5
19991  ac_status=$?
19992  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19993  test $ac_status = 0; }
19994  if { ac_try='./conftest$ac_cv_exeext'
19995  { { case "(($ac_try" in
19996  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19997  *) ac_try_echo=$ac_try;;
19998esac
19999eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20000$as_echo "$ac_try_echo"; } >&5
20001  (eval "$ac_try") 2>&5
20002  ac_status=$?
20003  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20004  test $ac_status = 0; }; }; then
20005    cross_compiling=no
20006  else
20007    if test "$cross_compiling" = maybe; then
20008	cross_compiling=yes
20009    else
20010	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20011$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20012as_fn_error $? "cannot run C compiled programs.
20013If you meant to cross compile, use \`--host'.
20014See \`config.log' for more details" "$LINENO" 5; }
20015    fi
20016  fi
20017fi
20018{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
20019$as_echo "$cross_compiling" >&6; }
20020
20021rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
20022ac_clean_files=$ac_clean_files_save
20023{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
20024$as_echo_n "checking for suffix of object files... " >&6; }
20025if ${ac_cv_objext+:} false; then :
20026  $as_echo_n "(cached) " >&6
20027else
20028  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20029/* end confdefs.h.  */
20030
20031int
20032main ()
20033{
20034
20035  ;
20036  return 0;
20037}
20038_ACEOF
20039rm -f conftest.o conftest.obj
20040if { { ac_try="$ac_compile"
20041case "(($ac_try" in
20042  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20043  *) ac_try_echo=$ac_try;;
20044esac
20045eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20046$as_echo "$ac_try_echo"; } >&5
20047  (eval "$ac_compile") 2>&5
20048  ac_status=$?
20049  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20050  test $ac_status = 0; }; then :
20051  for ac_file in conftest.o conftest.obj conftest.*; do
20052  test -f "$ac_file" || continue;
20053  case $ac_file in
20054    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
20055    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
20056       break;;
20057  esac
20058done
20059else
20060  $as_echo "$as_me: failed program was:" >&5
20061sed 's/^/| /' conftest.$ac_ext >&5
20062
20063{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20064$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20065as_fn_error $? "cannot compute suffix of object files: cannot compile
20066See \`config.log' for more details" "$LINENO" 5; }
20067fi
20068rm -f conftest.$ac_cv_objext conftest.$ac_ext
20069fi
20070{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
20071$as_echo "$ac_cv_objext" >&6; }
20072OBJEXT=$ac_cv_objext
20073ac_objext=$OBJEXT
20074{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
20075$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
20076if ${ac_cv_c_compiler_gnu+:} false; then :
20077  $as_echo_n "(cached) " >&6
20078else
20079  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20080/* end confdefs.h.  */
20081
20082int
20083main ()
20084{
20085#ifndef __GNUC__
20086       choke me
20087#endif
20088
20089  ;
20090  return 0;
20091}
20092_ACEOF
20093if ac_fn_c_try_compile "$LINENO"; then :
20094  ac_compiler_gnu=yes
20095else
20096  ac_compiler_gnu=no
20097fi
20098rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20099ac_cv_c_compiler_gnu=$ac_compiler_gnu
20100
20101fi
20102{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
20103$as_echo "$ac_cv_c_compiler_gnu" >&6; }
20104if test $ac_compiler_gnu = yes; then
20105  GCC=yes
20106else
20107  GCC=
20108fi
20109ac_test_CFLAGS=${CFLAGS+set}
20110ac_save_CFLAGS=$CFLAGS
20111{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
20112$as_echo_n "checking whether $CC accepts -g... " >&6; }
20113if ${ac_cv_prog_cc_g+:} false; then :
20114  $as_echo_n "(cached) " >&6
20115else
20116  ac_save_c_werror_flag=$ac_c_werror_flag
20117   ac_c_werror_flag=yes
20118   ac_cv_prog_cc_g=no
20119   CFLAGS="-g"
20120   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20121/* end confdefs.h.  */
20122
20123int
20124main ()
20125{
20126
20127  ;
20128  return 0;
20129}
20130_ACEOF
20131if ac_fn_c_try_compile "$LINENO"; then :
20132  ac_cv_prog_cc_g=yes
20133else
20134  CFLAGS=""
20135      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20136/* end confdefs.h.  */
20137
20138int
20139main ()
20140{
20141
20142  ;
20143  return 0;
20144}
20145_ACEOF
20146if ac_fn_c_try_compile "$LINENO"; then :
20147
20148else
20149  ac_c_werror_flag=$ac_save_c_werror_flag
20150	 CFLAGS="-g"
20151	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20152/* end confdefs.h.  */
20153
20154int
20155main ()
20156{
20157
20158  ;
20159  return 0;
20160}
20161_ACEOF
20162if ac_fn_c_try_compile "$LINENO"; then :
20163  ac_cv_prog_cc_g=yes
20164fi
20165rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20166fi
20167rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20168fi
20169rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20170   ac_c_werror_flag=$ac_save_c_werror_flag
20171fi
20172{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
20173$as_echo "$ac_cv_prog_cc_g" >&6; }
20174if test "$ac_test_CFLAGS" = set; then
20175  CFLAGS=$ac_save_CFLAGS
20176elif test $ac_cv_prog_cc_g = yes; then
20177  if test "$GCC" = yes; then
20178    CFLAGS="-g -O2"
20179  else
20180    CFLAGS="-g"
20181  fi
20182else
20183  if test "$GCC" = yes; then
20184    CFLAGS="-O2"
20185  else
20186    CFLAGS=
20187  fi
20188fi
20189{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
20190$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
20191if ${ac_cv_prog_cc_c89+:} false; then :
20192  $as_echo_n "(cached) " >&6
20193else
20194  ac_cv_prog_cc_c89=no
20195ac_save_CC=$CC
20196cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20197/* end confdefs.h.  */
20198#include <stdarg.h>
20199#include <stdio.h>
20200struct stat;
20201/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
20202struct buf { int x; };
20203FILE * (*rcsopen) (struct buf *, struct stat *, int);
20204static char *e (p, i)
20205     char **p;
20206     int i;
20207{
20208  return p[i];
20209}
20210static char *f (char * (*g) (char **, int), char **p, ...)
20211{
20212  char *s;
20213  va_list v;
20214  va_start (v,p);
20215  s = g (p, va_arg (v,int));
20216  va_end (v);
20217  return s;
20218}
20219
20220/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
20221   function prototypes and stuff, but not '\xHH' hex character constants.
20222   These don't provoke an error unfortunately, instead are silently treated
20223   as 'x'.  The following induces an error, until -std is added to get
20224   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
20225   array size at least.  It's necessary to write '\x00'==0 to get something
20226   that's true only with -std.  */
20227int osf4_cc_array ['\x00' == 0 ? 1 : -1];
20228
20229/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
20230   inside strings and character constants.  */
20231#define FOO(x) 'x'
20232int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
20233
20234int test (int i, double x);
20235struct s1 {int (*f) (int a);};
20236struct s2 {int (*f) (double a);};
20237int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
20238int argc;
20239char **argv;
20240int
20241main ()
20242{
20243return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
20244  ;
20245  return 0;
20246}
20247_ACEOF
20248for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
20249	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
20250do
20251  CC="$ac_save_CC $ac_arg"
20252  if ac_fn_c_try_compile "$LINENO"; then :
20253  ac_cv_prog_cc_c89=$ac_arg
20254fi
20255rm -f core conftest.err conftest.$ac_objext
20256  test "x$ac_cv_prog_cc_c89" != "xno" && break
20257done
20258rm -f conftest.$ac_ext
20259CC=$ac_save_CC
20260
20261fi
20262# AC_CACHE_VAL
20263case "x$ac_cv_prog_cc_c89" in
20264  x)
20265    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
20266$as_echo "none needed" >&6; } ;;
20267  xno)
20268    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
20269$as_echo "unsupported" >&6; } ;;
20270  *)
20271    CC="$CC $ac_cv_prog_cc_c89"
20272    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
20273$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
20274esac
20275if test "x$ac_cv_prog_cc_c89" != xno; then :
20276
20277fi
20278
20279ac_ext=cpp
20280ac_cpp='$CXXCPP $CPPFLAGS'
20281ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20282ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20283ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20284
20285
20286### Locate C++ compiler (CXX)
20287
20288if test "x$CXX" != x; then
20289  COMPILER_CHECK_LIST="$CXX"
20290elif test "x$OPENJDK_TARGET_OS" = "xwindows"; then
20291  COMPILER_CHECK_LIST="cl"
20292elif test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
20293  COMPILER_CHECK_LIST="CC g++"
20294else
20295  COMPILER_CHECK_LIST="g++ CC"
20296fi
20297
20298
20299  COMPILER_NAME=C++
20300
20301  CXX=
20302  # If TOOLS_DIR is set, check for all compiler names in there first
20303  # before checking the rest of the PATH.
20304  if test -n "$TOOLS_DIR"; then
20305    PATH_save="$PATH"
20306    PATH="$TOOLS_DIR"
20307    for ac_prog in $COMPILER_CHECK_LIST
20308do
20309  # Extract the first word of "$ac_prog", so it can be a program name with args.
20310set dummy $ac_prog; ac_word=$2
20311{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20312$as_echo_n "checking for $ac_word... " >&6; }
20313if ${ac_cv_path_TOOLS_DIR_CXX+:} false; then :
20314  $as_echo_n "(cached) " >&6
20315else
20316  case $TOOLS_DIR_CXX in
20317  [\\/]* | ?:[\\/]*)
20318  ac_cv_path_TOOLS_DIR_CXX="$TOOLS_DIR_CXX" # Let the user override the test with a path.
20319  ;;
20320  *)
20321  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20322for as_dir in $PATH
20323do
20324  IFS=$as_save_IFS
20325  test -z "$as_dir" && as_dir=.
20326    for ac_exec_ext in '' $ac_executable_extensions; do
20327  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20328    ac_cv_path_TOOLS_DIR_CXX="$as_dir/$ac_word$ac_exec_ext"
20329    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20330    break 2
20331  fi
20332done
20333  done
20334IFS=$as_save_IFS
20335
20336  ;;
20337esac
20338fi
20339TOOLS_DIR_CXX=$ac_cv_path_TOOLS_DIR_CXX
20340if test -n "$TOOLS_DIR_CXX"; then
20341  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CXX" >&5
20342$as_echo "$TOOLS_DIR_CXX" >&6; }
20343else
20344  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20345$as_echo "no" >&6; }
20346fi
20347
20348
20349  test -n "$TOOLS_DIR_CXX" && break
20350done
20351
20352    CXX=$TOOLS_DIR_CXX
20353    PATH="$PATH_save"
20354  fi
20355
20356  # AC_PATH_PROGS can't be run multiple times with the same variable,
20357  # so create a new name for this run.
20358  if test "x$CXX" = x; then
20359    for ac_prog in $COMPILER_CHECK_LIST
20360do
20361  # Extract the first word of "$ac_prog", so it can be a program name with args.
20362set dummy $ac_prog; ac_word=$2
20363{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20364$as_echo_n "checking for $ac_word... " >&6; }
20365if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
20366  $as_echo_n "(cached) " >&6
20367else
20368  case $POTENTIAL_CXX in
20369  [\\/]* | ?:[\\/]*)
20370  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
20371  ;;
20372  *)
20373  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20374for as_dir in $PATH
20375do
20376  IFS=$as_save_IFS
20377  test -z "$as_dir" && as_dir=.
20378    for ac_exec_ext in '' $ac_executable_extensions; do
20379  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20380    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
20381    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20382    break 2
20383  fi
20384done
20385  done
20386IFS=$as_save_IFS
20387
20388  ;;
20389esac
20390fi
20391POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
20392if test -n "$POTENTIAL_CXX"; then
20393  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
20394$as_echo "$POTENTIAL_CXX" >&6; }
20395else
20396  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20397$as_echo "no" >&6; }
20398fi
20399
20400
20401  test -n "$POTENTIAL_CXX" && break
20402done
20403
20404    CXX=$POTENTIAL_CXX
20405  fi
20406
20407  if test "x$CXX" = x; then
20408
20409    # Print a helpful message on how to acquire the necessary build dependency.
20410    # devkit is the help tag: freetyp2, cups, pulse, alsa etc
20411    MISSING_DEPENDENCY=devkit
20412    PKGHANDLER_COMMAND=
20413
20414    case $PKGHANDLER in
20415	apt-get)
20416                apt_help     $MISSING_DEPENDENCY ;;
20417    yum)
20418                yum_help     $MISSING_DEPENDENCY ;;
20419	port)
20420                port_help    $MISSING_DEPENDENCY ;;
20421	pkgutil)
20422                pkgutil_help $MISSING_DEPENDENCY ;;
20423	pkgadd)
20424                pkgadd_help  $MISSING_DEPENDENCY ;;
20425    * )
20426      break ;;
20427    esac
20428
20429    if test "x$PKGHANDLER_COMMAND" != x; then
20430        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
20431    fi
20432
20433      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
20434  fi
20435
20436  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20437
20438  # First separate the path from the arguments. This will split at the first
20439  # space.
20440  complete="$CXX"
20441  path="${complete%% *}"
20442  tmp="$complete EOL"
20443  arguments="${tmp#* }"
20444
20445  # Input might be given as Windows format, start by converting to
20446  # unix format.
20447  new_path=`$CYGPATH -u "$path"`
20448
20449  # Now try to locate executable using which
20450  new_path=`$WHICH "$new_path" 2> /dev/null`
20451  # bat and cmd files are not always considered executable in cygwin causing which
20452  # to not find them
20453  if test "x$new_path" = x \
20454           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20455           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20456    new_path=`$CYGPATH -u "$path"`
20457  fi
20458  if test "x$new_path" = x; then
20459    # Oops. Which didn't find the executable.
20460    # The splitting of arguments from the executable at a space might have been incorrect,
20461    # since paths with space are more likely in Windows. Give it another try with the whole
20462    # argument.
20463    path="$complete"
20464    arguments="EOL"
20465    new_path=`$CYGPATH -u "$path"`
20466    new_path=`$WHICH "$new_path" 2> /dev/null`
20467    # bat and cmd files are not always considered executable in cygwin causing which
20468    # to not find them
20469    if test "x$new_path" = x \
20470             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20471             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20472      new_path=`$CYGPATH -u "$path"`
20473    fi
20474    if test "x$new_path" = x; then
20475      # It's still not found. Now this is an unrecoverable error.
20476      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
20477$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
20478      has_space=`$ECHO "$complete" | $GREP " "`
20479      if test "x$has_space" != x; then
20480        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20481$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20482      fi
20483      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20484    fi
20485  fi
20486
20487  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20488  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20489  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20490  # "foo.exe" is OK but "foo" is an error.
20491  #
20492  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20493  # It is also a way to make sure we got the proper file name for the real test later on.
20494  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20495  if test "x$test_shortpath" = x; then
20496    # Short path failed, file does not exist as specified.
20497    # Try adding .exe or .cmd
20498    if test -f "${new_path}.exe"; then
20499       input_to_shortpath="${new_path}.exe"
20500    elif test -f "${new_path}.cmd"; then
20501       input_to_shortpath="${new_path}.cmd"
20502    else
20503      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
20504$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
20505      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20506$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20507      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20508    fi
20509  else
20510    input_to_shortpath="$new_path"
20511  fi
20512
20513  # Call helper function which possibly converts this using DOS-style short mode.
20514  # If so, the updated path is stored in $new_path.
20515  new_path="$input_to_shortpath"
20516
20517  input_path="$input_to_shortpath"
20518  # Check if we need to convert this using DOS-style short mode. If the path
20519  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20520  # take no chances and rewrite it.
20521  # Note: m4 eats our [], so we need to use [ and ] instead.
20522  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20523  if test "x$has_forbidden_chars" != x; then
20524    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20525    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20526    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20527    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20528      # Going to short mode and back again did indeed matter. Since short mode is
20529      # case insensitive, let's make it lowercase to improve readability.
20530      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20531      # Now convert it back to Unix-stile (cygpath)
20532      input_path=`$CYGPATH -u "$shortmode_path"`
20533      new_path="$input_path"
20534    fi
20535  fi
20536
20537  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20538  if test "x$test_cygdrive_prefix" = x; then
20539    # As a simple fix, exclude /usr/bin since it's not a real path.
20540    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20541      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20542      # a path prefixed by /cygdrive for fixpath to work.
20543      new_path="$CYGWIN_ROOT_PATH$input_path"
20544    fi
20545  fi
20546
20547  # remove trailing .exe if any
20548  new_path="${new_path/%.exe/}"
20549
20550  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20551
20552  # First separate the path from the arguments. This will split at the first
20553  # space.
20554  complete="$CXX"
20555  path="${complete%% *}"
20556  tmp="$complete EOL"
20557  arguments="${tmp#* }"
20558
20559  # Input might be given as Windows format, start by converting to
20560  # unix format.
20561  new_path="$path"
20562
20563  windows_path="$new_path"
20564  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20565    unix_path=`$CYGPATH -u "$windows_path"`
20566    new_path="$unix_path"
20567  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20568    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20569    new_path="$unix_path"
20570  fi
20571
20572
20573  # Now try to locate executable using which
20574  new_path=`$WHICH "$new_path" 2> /dev/null`
20575
20576  if test "x$new_path" = x; then
20577    # Oops. Which didn't find the executable.
20578    # The splitting of arguments from the executable at a space might have been incorrect,
20579    # since paths with space are more likely in Windows. Give it another try with the whole
20580    # argument.
20581    path="$complete"
20582    arguments="EOL"
20583    new_path="$path"
20584
20585  windows_path="$new_path"
20586  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20587    unix_path=`$CYGPATH -u "$windows_path"`
20588    new_path="$unix_path"
20589  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20590    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20591    new_path="$unix_path"
20592  fi
20593
20594
20595    new_path=`$WHICH "$new_path" 2> /dev/null`
20596
20597    if test "x$new_path" = x; then
20598      # It's still not found. Now this is an unrecoverable error.
20599      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
20600$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
20601      has_space=`$ECHO "$complete" | $GREP " "`
20602      if test "x$has_space" != x; then
20603        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20604$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20605      fi
20606      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20607    fi
20608  fi
20609
20610  # Now new_path has a complete unix path to the binary
20611  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20612    # Keep paths in /bin as-is, but remove trailing .exe if any
20613    new_path="${new_path/%.exe/}"
20614    # Do not save /bin paths to all_fixpath_prefixes!
20615  else
20616    # Not in mixed or Windows style, start by that.
20617    new_path=`cmd //c echo $new_path`
20618
20619  input_path="$new_path"
20620  # Check if we need to convert this using DOS-style short mode. If the path
20621  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20622  # take no chances and rewrite it.
20623  # Note: m4 eats our [], so we need to use [ and ] instead.
20624  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20625  if test "x$has_forbidden_chars" != x; then
20626    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20627    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20628  fi
20629
20630    # Output is in $new_path
20631
20632  windows_path="$new_path"
20633  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20634    unix_path=`$CYGPATH -u "$windows_path"`
20635    new_path="$unix_path"
20636  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20637    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20638    new_path="$unix_path"
20639  fi
20640
20641    # remove trailing .exe if any
20642    new_path="${new_path/%.exe/}"
20643
20644    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20645    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20646  fi
20647
20648  else
20649    # We're on a posix platform. Hooray! :)
20650    # First separate the path from the arguments. This will split at the first
20651    # space.
20652    complete="$CXX"
20653    path="${complete%% *}"
20654    tmp="$complete EOL"
20655    arguments="${tmp#* }"
20656
20657    # Cannot rely on the command "which" here since it doesn't always work.
20658    is_absolute_path=`$ECHO "$path" | $GREP ^/`
20659    if test -z "$is_absolute_path"; then
20660      # Path to executable is not absolute. Find it.
20661      IFS_save="$IFS"
20662      IFS=:
20663      for p in $PATH; do
20664        if test -f "$p/$path" && test -x "$p/$path"; then
20665          new_path="$p/$path"
20666          break
20667        fi
20668      done
20669      IFS="$IFS_save"
20670    else
20671      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXX (as $path) failed, using $path directly." >&5
20672$as_echo "$as_me: Resolving CXX (as $path) failed, using $path directly." >&6;}
20673      new_path="$path"
20674    fi
20675
20676    if test "x$new_path" = x; then
20677        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
20678$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
20679        has_space=`$ECHO "$complete" | $GREP " "`
20680        if test "x$has_space" != x; then
20681          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20682$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20683        fi
20684        as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20685      fi
20686  fi
20687
20688      # Now join together the path and the arguments once again
20689      if test "x$arguments" != xEOL; then
20690        new_complete="$new_path ${arguments% *}"
20691      else
20692        new_complete="$new_path"
20693      fi
20694
20695  if test "x$complete" != "x$new_complete"; then
20696      CXX="$new_complete"
20697      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
20698$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
20699    fi
20700
20701  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
20702$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
20703  TEST_COMPILER="$CXX"
20704
20705    if test "x$OPENJDK_BUILD_OS" != xwindows; then
20706        # Follow a chain of symbolic links. Use readlink
20707        # where it exists, else fall back to horribly
20708        # complicated shell code.
20709        if test "x$READLINK_TESTED" != yes; then
20710            # On MacOSX there is a readlink tool with a different
20711            # purpose than the GNU readlink tool. Check the found readlink.
20712            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
20713            if test "x$ISGNU" = x; then
20714                 # A readlink that we do not know how to use.
20715                 # Are there other non-GNU readlinks out there?
20716                 READLINK_TESTED=yes
20717                 READLINK=
20718            fi
20719        fi
20720
20721        if test "x$READLINK" != x; then
20722            TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
20723        else
20724            # Save the current directory for restoring afterwards
20725            STARTDIR=$PWD
20726            COUNTER=0
20727            sym_link_dir=`$DIRNAME $TEST_COMPILER`
20728            sym_link_file=`$BASENAME $TEST_COMPILER`
20729            cd $sym_link_dir
20730            # Use -P flag to resolve symlinks in directories.
20731            cd `$THEPWDCMD -P`
20732            sym_link_dir=`$THEPWDCMD -P`
20733            # Resolve file symlinks
20734            while test $COUNTER -lt 20; do
20735                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
20736                if test "x$ISLINK" == x; then
20737                    # This is not a symbolic link! We are done!
20738                    break
20739                fi
20740                # Again resolve directory symlinks since the target of the just found
20741                # link could be in a different directory
20742                cd `$DIRNAME $ISLINK`
20743                sym_link_dir=`$THEPWDCMD -P`
20744                sym_link_file=`$BASENAME $ISLINK`
20745                let COUNTER=COUNTER+1
20746            done
20747            cd $STARTDIR
20748            TEST_COMPILER=$sym_link_dir/$sym_link_file
20749        fi
20750    fi
20751
20752  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
20753$as_echo "$TEST_COMPILER" >&6; }
20754  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
20755$as_echo_n "checking if CXX is disguised ccache... " >&6; }
20756
20757  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
20758  if test "x$COMPILER_BASENAME" = "xccache"; then
20759    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
20760$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
20761    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
20762    # We want to control ccache invocation ourselves, so ignore this cc and try
20763    # searching again.
20764
20765    # Remove the path to the fake ccache cc from the PATH
20766    RETRY_COMPILER_SAVED_PATH="$PATH"
20767    COMPILER_DIRNAME=`$DIRNAME $CXX`
20768    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
20769
20770    # Try again looking for our compiler
20771    if test -n "$ac_tool_prefix"; then
20772  for ac_prog in $COMPILER_CHECK_LIST
20773  do
20774    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
20775set dummy $ac_tool_prefix$ac_prog; ac_word=$2
20776{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20777$as_echo_n "checking for $ac_word... " >&6; }
20778if ${ac_cv_prog_PROPER_COMPILER_CXX+:} false; then :
20779  $as_echo_n "(cached) " >&6
20780else
20781  if test -n "$PROPER_COMPILER_CXX"; then
20782  ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
20783else
20784as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20785for as_dir in $PATH
20786do
20787  IFS=$as_save_IFS
20788  test -z "$as_dir" && as_dir=.
20789    for ac_exec_ext in '' $ac_executable_extensions; do
20790  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20791    ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
20792    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20793    break 2
20794  fi
20795done
20796  done
20797IFS=$as_save_IFS
20798
20799fi
20800fi
20801PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
20802if test -n "$PROPER_COMPILER_CXX"; then
20803  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
20804$as_echo "$PROPER_COMPILER_CXX" >&6; }
20805else
20806  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20807$as_echo "no" >&6; }
20808fi
20809
20810
20811    test -n "$PROPER_COMPILER_CXX" && break
20812  done
20813fi
20814if test -z "$PROPER_COMPILER_CXX"; then
20815  ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
20816  for ac_prog in $COMPILER_CHECK_LIST
20817do
20818  # Extract the first word of "$ac_prog", so it can be a program name with args.
20819set dummy $ac_prog; ac_word=$2
20820{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20821$as_echo_n "checking for $ac_word... " >&6; }
20822if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+:} false; then :
20823  $as_echo_n "(cached) " >&6
20824else
20825  if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
20826  ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
20827else
20828as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20829for as_dir in $PATH
20830do
20831  IFS=$as_save_IFS
20832  test -z "$as_dir" && as_dir=.
20833    for ac_exec_ext in '' $ac_executable_extensions; do
20834  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20835    ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
20836    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20837    break 2
20838  fi
20839done
20840  done
20841IFS=$as_save_IFS
20842
20843fi
20844fi
20845ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
20846if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
20847  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
20848$as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
20849else
20850  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20851$as_echo "no" >&6; }
20852fi
20853
20854
20855  test -n "$ac_ct_PROPER_COMPILER_CXX" && break
20856done
20857
20858  if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
20859    PROPER_COMPILER_CXX=""
20860  else
20861    case $cross_compiling:$ac_tool_warned in
20862yes:)
20863{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
20864$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
20865ac_tool_warned=yes ;;
20866esac
20867    PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
20868  fi
20869fi
20870
20871
20872  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20873
20874  # First separate the path from the arguments. This will split at the first
20875  # space.
20876  complete="$PROPER_COMPILER_CXX"
20877  path="${complete%% *}"
20878  tmp="$complete EOL"
20879  arguments="${tmp#* }"
20880
20881  # Input might be given as Windows format, start by converting to
20882  # unix format.
20883  new_path=`$CYGPATH -u "$path"`
20884
20885  # Now try to locate executable using which
20886  new_path=`$WHICH "$new_path" 2> /dev/null`
20887  # bat and cmd files are not always considered executable in cygwin causing which
20888  # to not find them
20889  if test "x$new_path" = x \
20890           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20891           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20892    new_path=`$CYGPATH -u "$path"`
20893  fi
20894  if test "x$new_path" = x; then
20895    # Oops. Which didn't find the executable.
20896    # The splitting of arguments from the executable at a space might have been incorrect,
20897    # since paths with space are more likely in Windows. Give it another try with the whole
20898    # argument.
20899    path="$complete"
20900    arguments="EOL"
20901    new_path=`$CYGPATH -u "$path"`
20902    new_path=`$WHICH "$new_path" 2> /dev/null`
20903    # bat and cmd files are not always considered executable in cygwin causing which
20904    # to not find them
20905    if test "x$new_path" = x \
20906             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20907             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20908      new_path=`$CYGPATH -u "$path"`
20909    fi
20910    if test "x$new_path" = x; then
20911      # It's still not found. Now this is an unrecoverable error.
20912      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
20913$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
20914      has_space=`$ECHO "$complete" | $GREP " "`
20915      if test "x$has_space" != x; then
20916        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20917$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20918      fi
20919      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
20920    fi
20921  fi
20922
20923  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20924  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20925  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20926  # "foo.exe" is OK but "foo" is an error.
20927  #
20928  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20929  # It is also a way to make sure we got the proper file name for the real test later on.
20930  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20931  if test "x$test_shortpath" = x; then
20932    # Short path failed, file does not exist as specified.
20933    # Try adding .exe or .cmd
20934    if test -f "${new_path}.exe"; then
20935       input_to_shortpath="${new_path}.exe"
20936    elif test -f "${new_path}.cmd"; then
20937       input_to_shortpath="${new_path}.cmd"
20938    else
20939      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
20940$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
20941      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20942$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20943      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
20944    fi
20945  else
20946    input_to_shortpath="$new_path"
20947  fi
20948
20949  # Call helper function which possibly converts this using DOS-style short mode.
20950  # If so, the updated path is stored in $new_path.
20951  new_path="$input_to_shortpath"
20952
20953  input_path="$input_to_shortpath"
20954  # Check if we need to convert this using DOS-style short mode. If the path
20955  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20956  # take no chances and rewrite it.
20957  # Note: m4 eats our [], so we need to use [ and ] instead.
20958  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20959  if test "x$has_forbidden_chars" != x; then
20960    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20961    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20962    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20963    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20964      # Going to short mode and back again did indeed matter. Since short mode is
20965      # case insensitive, let's make it lowercase to improve readability.
20966      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20967      # Now convert it back to Unix-stile (cygpath)
20968      input_path=`$CYGPATH -u "$shortmode_path"`
20969      new_path="$input_path"
20970    fi
20971  fi
20972
20973  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20974  if test "x$test_cygdrive_prefix" = x; then
20975    # As a simple fix, exclude /usr/bin since it's not a real path.
20976    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20977      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20978      # a path prefixed by /cygdrive for fixpath to work.
20979      new_path="$CYGWIN_ROOT_PATH$input_path"
20980    fi
20981  fi
20982
20983  # remove trailing .exe if any
20984  new_path="${new_path/%.exe/}"
20985
20986  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20987
20988  # First separate the path from the arguments. This will split at the first
20989  # space.
20990  complete="$PROPER_COMPILER_CXX"
20991  path="${complete%% *}"
20992  tmp="$complete EOL"
20993  arguments="${tmp#* }"
20994
20995  # Input might be given as Windows format, start by converting to
20996  # unix format.
20997  new_path="$path"
20998
20999  windows_path="$new_path"
21000  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21001    unix_path=`$CYGPATH -u "$windows_path"`
21002    new_path="$unix_path"
21003  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21004    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21005    new_path="$unix_path"
21006  fi
21007
21008
21009  # Now try to locate executable using which
21010  new_path=`$WHICH "$new_path" 2> /dev/null`
21011
21012  if test "x$new_path" = x; then
21013    # Oops. Which didn't find the executable.
21014    # The splitting of arguments from the executable at a space might have been incorrect,
21015    # since paths with space are more likely in Windows. Give it another try with the whole
21016    # argument.
21017    path="$complete"
21018    arguments="EOL"
21019    new_path="$path"
21020
21021  windows_path="$new_path"
21022  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21023    unix_path=`$CYGPATH -u "$windows_path"`
21024    new_path="$unix_path"
21025  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21026    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21027    new_path="$unix_path"
21028  fi
21029
21030
21031    new_path=`$WHICH "$new_path" 2> /dev/null`
21032
21033    if test "x$new_path" = x; then
21034      # It's still not found. Now this is an unrecoverable error.
21035      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
21036$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
21037      has_space=`$ECHO "$complete" | $GREP " "`
21038      if test "x$has_space" != x; then
21039        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21040$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21041      fi
21042      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21043    fi
21044  fi
21045
21046  # Now new_path has a complete unix path to the binary
21047  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21048    # Keep paths in /bin as-is, but remove trailing .exe if any
21049    new_path="${new_path/%.exe/}"
21050    # Do not save /bin paths to all_fixpath_prefixes!
21051  else
21052    # Not in mixed or Windows style, start by that.
21053    new_path=`cmd //c echo $new_path`
21054
21055  input_path="$new_path"
21056  # Check if we need to convert this using DOS-style short mode. If the path
21057  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21058  # take no chances and rewrite it.
21059  # Note: m4 eats our [], so we need to use [ and ] instead.
21060  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21061  if test "x$has_forbidden_chars" != x; then
21062    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21063    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21064  fi
21065
21066    # Output is in $new_path
21067
21068  windows_path="$new_path"
21069  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21070    unix_path=`$CYGPATH -u "$windows_path"`
21071    new_path="$unix_path"
21072  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21073    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21074    new_path="$unix_path"
21075  fi
21076
21077    # remove trailing .exe if any
21078    new_path="${new_path/%.exe/}"
21079
21080    # Save the first 10 bytes of this path to the storage, so fixpath can work.
21081    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21082  fi
21083
21084  else
21085    # We're on a posix platform. Hooray! :)
21086    # First separate the path from the arguments. This will split at the first
21087    # space.
21088    complete="$PROPER_COMPILER_CXX"
21089    path="${complete%% *}"
21090    tmp="$complete EOL"
21091    arguments="${tmp#* }"
21092
21093    # Cannot rely on the command "which" here since it doesn't always work.
21094    is_absolute_path=`$ECHO "$path" | $GREP ^/`
21095    if test -z "$is_absolute_path"; then
21096      # Path to executable is not absolute. Find it.
21097      IFS_save="$IFS"
21098      IFS=:
21099      for p in $PATH; do
21100        if test -f "$p/$path" && test -x "$p/$path"; then
21101          new_path="$p/$path"
21102          break
21103        fi
21104      done
21105      IFS="$IFS_save"
21106    else
21107      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&5
21108$as_echo "$as_me: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&6;}
21109      new_path="$path"
21110    fi
21111
21112    if test "x$new_path" = x; then
21113        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
21114$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
21115        has_space=`$ECHO "$complete" | $GREP " "`
21116        if test "x$has_space" != x; then
21117          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21118$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21119        fi
21120        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21121      fi
21122  fi
21123
21124      # Now join together the path and the arguments once again
21125      if test "x$arguments" != xEOL; then
21126        new_complete="$new_path ${arguments% *}"
21127      else
21128        new_complete="$new_path"
21129      fi
21130
21131  if test "x$complete" != "x$new_complete"; then
21132      PROPER_COMPILER_CXX="$new_complete"
21133      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
21134$as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
21135    fi
21136
21137    PATH="$RETRY_COMPILER_SAVED_PATH"
21138
21139    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
21140$as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
21141
21142    if test "x$OPENJDK_BUILD_OS" != xwindows; then
21143        # Follow a chain of symbolic links. Use readlink
21144        # where it exists, else fall back to horribly
21145        # complicated shell code.
21146        if test "x$READLINK_TESTED" != yes; then
21147            # On MacOSX there is a readlink tool with a different
21148            # purpose than the GNU readlink tool. Check the found readlink.
21149            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
21150            if test "x$ISGNU" = x; then
21151                 # A readlink that we do not know how to use.
21152                 # Are there other non-GNU readlinks out there?
21153                 READLINK_TESTED=yes
21154                 READLINK=
21155            fi
21156        fi
21157
21158        if test "x$READLINK" != x; then
21159            PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
21160        else
21161            # Save the current directory for restoring afterwards
21162            STARTDIR=$PWD
21163            COUNTER=0
21164            sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
21165            sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
21166            cd $sym_link_dir
21167            # Use -P flag to resolve symlinks in directories.
21168            cd `$THEPWDCMD -P`
21169            sym_link_dir=`$THEPWDCMD -P`
21170            # Resolve file symlinks
21171            while test $COUNTER -lt 20; do
21172                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
21173                if test "x$ISLINK" == x; then
21174                    # This is not a symbolic link! We are done!
21175                    break
21176                fi
21177                # Again resolve directory symlinks since the target of the just found
21178                # link could be in a different directory
21179                cd `$DIRNAME $ISLINK`
21180                sym_link_dir=`$THEPWDCMD -P`
21181                sym_link_file=`$BASENAME $ISLINK`
21182                let COUNTER=COUNTER+1
21183            done
21184            cd $STARTDIR
21185            PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
21186        fi
21187    fi
21188
21189    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
21190$as_echo "$PROPER_COMPILER_CXX" >&6; }
21191    CXX="$PROPER_COMPILER_CXX"
21192  else
21193    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
21194$as_echo "no, keeping CXX" >&6; }
21195    CXX="$TEST_COMPILER"
21196  fi
21197
21198  COMPILER=$CXX
21199  COMPILER_NAME=$COMPILER_NAME
21200
21201  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
21202    # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
21203    COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
21204    $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
21205    if test $? -ne 0; then
21206      GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
21207
21208      { $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
21209$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
21210      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
21211$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
21212      as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
21213    else
21214      COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
21215      COMPILER_VENDOR="Sun Studio"
21216    fi
21217  elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
21218    # First line typically looks something like:
21219    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
21220    COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
21221    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
21222    COMPILER_VENDOR="Microsoft CL.EXE"
21223    COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
21224    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
21225      if test "x$COMPILER_CPU_TEST" != "x80x86"; then
21226        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
21227      fi
21228    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
21229      if test "x$COMPILER_CPU_TEST" != "xx64"; then
21230        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
21231      fi
21232    fi
21233  else
21234    COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
21235    # Check that this is likely to be GCC.
21236    $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
21237    if test $? -ne 0; then
21238      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
21239$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
21240      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
21241$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
21242      as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
21243    fi
21244
21245    # First line typically looks something like:
21246    # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
21247    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
21248    COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
21249  fi
21250  # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
21251  CXX_VERSION="$COMPILER_VERSION"
21252  # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
21253  CXX_VENDOR="$COMPILER_VENDOR"
21254
21255  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
21256$as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
21257
21258
21259# Now that we have resolved CXX ourself, let autoconf have its go at it
21260ac_ext=cpp
21261ac_cpp='$CXXCPP $CPPFLAGS'
21262ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21263ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21264ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21265if test -z "$CXX"; then
21266  if test -n "$CCC"; then
21267    CXX=$CCC
21268  else
21269    if test -n "$ac_tool_prefix"; then
21270  for ac_prog in $CXX
21271  do
21272    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
21273set dummy $ac_tool_prefix$ac_prog; ac_word=$2
21274{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21275$as_echo_n "checking for $ac_word... " >&6; }
21276if ${ac_cv_prog_CXX+:} false; then :
21277  $as_echo_n "(cached) " >&6
21278else
21279  if test -n "$CXX"; then
21280  ac_cv_prog_CXX="$CXX" # Let the user override the test.
21281else
21282as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21283for as_dir in $PATH
21284do
21285  IFS=$as_save_IFS
21286  test -z "$as_dir" && as_dir=.
21287    for ac_exec_ext in '' $ac_executable_extensions; do
21288  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21289    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
21290    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21291    break 2
21292  fi
21293done
21294  done
21295IFS=$as_save_IFS
21296
21297fi
21298fi
21299CXX=$ac_cv_prog_CXX
21300if test -n "$CXX"; then
21301  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
21302$as_echo "$CXX" >&6; }
21303else
21304  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21305$as_echo "no" >&6; }
21306fi
21307
21308
21309    test -n "$CXX" && break
21310  done
21311fi
21312if test -z "$CXX"; then
21313  ac_ct_CXX=$CXX
21314  for ac_prog in $CXX
21315do
21316  # Extract the first word of "$ac_prog", so it can be a program name with args.
21317set dummy $ac_prog; ac_word=$2
21318{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21319$as_echo_n "checking for $ac_word... " >&6; }
21320if ${ac_cv_prog_ac_ct_CXX+:} false; then :
21321  $as_echo_n "(cached) " >&6
21322else
21323  if test -n "$ac_ct_CXX"; then
21324  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
21325else
21326as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21327for as_dir in $PATH
21328do
21329  IFS=$as_save_IFS
21330  test -z "$as_dir" && as_dir=.
21331    for ac_exec_ext in '' $ac_executable_extensions; do
21332  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21333    ac_cv_prog_ac_ct_CXX="$ac_prog"
21334    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21335    break 2
21336  fi
21337done
21338  done
21339IFS=$as_save_IFS
21340
21341fi
21342fi
21343ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
21344if test -n "$ac_ct_CXX"; then
21345  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
21346$as_echo "$ac_ct_CXX" >&6; }
21347else
21348  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21349$as_echo "no" >&6; }
21350fi
21351
21352
21353  test -n "$ac_ct_CXX" && break
21354done
21355
21356  if test "x$ac_ct_CXX" = x; then
21357    CXX="g++"
21358  else
21359    case $cross_compiling:$ac_tool_warned in
21360yes:)
21361{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
21362$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
21363ac_tool_warned=yes ;;
21364esac
21365    CXX=$ac_ct_CXX
21366  fi
21367fi
21368
21369  fi
21370fi
21371# Provide some information about the compiler.
21372$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
21373set X $ac_compile
21374ac_compiler=$2
21375for ac_option in --version -v -V -qversion; do
21376  { { ac_try="$ac_compiler $ac_option >&5"
21377case "(($ac_try" in
21378  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21379  *) ac_try_echo=$ac_try;;
21380esac
21381eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
21382$as_echo "$ac_try_echo"; } >&5
21383  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
21384  ac_status=$?
21385  if test -s conftest.err; then
21386    sed '10a\
21387... rest of stderr output deleted ...
21388         10q' conftest.err >conftest.er1
21389    cat conftest.er1 >&5
21390  fi
21391  rm -f conftest.er1 conftest.err
21392  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21393  test $ac_status = 0; }
21394done
21395
21396{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
21397$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
21398if ${ac_cv_cxx_compiler_gnu+:} false; then :
21399  $as_echo_n "(cached) " >&6
21400else
21401  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21402/* end confdefs.h.  */
21403
21404int
21405main ()
21406{
21407#ifndef __GNUC__
21408       choke me
21409#endif
21410
21411  ;
21412  return 0;
21413}
21414_ACEOF
21415if ac_fn_cxx_try_compile "$LINENO"; then :
21416  ac_compiler_gnu=yes
21417else
21418  ac_compiler_gnu=no
21419fi
21420rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21421ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
21422
21423fi
21424{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
21425$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
21426if test $ac_compiler_gnu = yes; then
21427  GXX=yes
21428else
21429  GXX=
21430fi
21431ac_test_CXXFLAGS=${CXXFLAGS+set}
21432ac_save_CXXFLAGS=$CXXFLAGS
21433{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
21434$as_echo_n "checking whether $CXX accepts -g... " >&6; }
21435if ${ac_cv_prog_cxx_g+:} false; then :
21436  $as_echo_n "(cached) " >&6
21437else
21438  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
21439   ac_cxx_werror_flag=yes
21440   ac_cv_prog_cxx_g=no
21441   CXXFLAGS="-g"
21442   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21443/* end confdefs.h.  */
21444
21445int
21446main ()
21447{
21448
21449  ;
21450  return 0;
21451}
21452_ACEOF
21453if ac_fn_cxx_try_compile "$LINENO"; then :
21454  ac_cv_prog_cxx_g=yes
21455else
21456  CXXFLAGS=""
21457      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21458/* end confdefs.h.  */
21459
21460int
21461main ()
21462{
21463
21464  ;
21465  return 0;
21466}
21467_ACEOF
21468if ac_fn_cxx_try_compile "$LINENO"; then :
21469
21470else
21471  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
21472	 CXXFLAGS="-g"
21473	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21474/* end confdefs.h.  */
21475
21476int
21477main ()
21478{
21479
21480  ;
21481  return 0;
21482}
21483_ACEOF
21484if ac_fn_cxx_try_compile "$LINENO"; then :
21485  ac_cv_prog_cxx_g=yes
21486fi
21487rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21488fi
21489rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21490fi
21491rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21492   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
21493fi
21494{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
21495$as_echo "$ac_cv_prog_cxx_g" >&6; }
21496if test "$ac_test_CXXFLAGS" = set; then
21497  CXXFLAGS=$ac_save_CXXFLAGS
21498elif test $ac_cv_prog_cxx_g = yes; then
21499  if test "$GXX" = yes; then
21500    CXXFLAGS="-g -O2"
21501  else
21502    CXXFLAGS="-g"
21503  fi
21504else
21505  if test "$GXX" = yes; then
21506    CXXFLAGS="-O2"
21507  else
21508    CXXFLAGS=
21509  fi
21510fi
21511ac_ext=cpp
21512ac_cpp='$CXXCPP $CPPFLAGS'
21513ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21514ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21515ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21516
21517
21518### Locate other tools
21519
21520if test "x$OPENJDK_TARGET_OS" = xmacosx; then
21521    ac_ext=m
21522ac_cpp='$OBJCPP $CPPFLAGS'
21523ac_compile='$OBJC -c $OBJCFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21524ac_link='$OBJC -o conftest$ac_exeext $OBJCFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21525ac_compiler_gnu=$ac_cv_objc_compiler_gnu
21526if test -n "$ac_tool_prefix"; then
21527  for ac_prog in gcc objcc objc cc CC
21528  do
21529    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
21530set dummy $ac_tool_prefix$ac_prog; ac_word=$2
21531{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21532$as_echo_n "checking for $ac_word... " >&6; }
21533if ${ac_cv_prog_OBJC+:} false; then :
21534  $as_echo_n "(cached) " >&6
21535else
21536  if test -n "$OBJC"; then
21537  ac_cv_prog_OBJC="$OBJC" # Let the user override the test.
21538else
21539as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21540for as_dir in $PATH
21541do
21542  IFS=$as_save_IFS
21543  test -z "$as_dir" && as_dir=.
21544    for ac_exec_ext in '' $ac_executable_extensions; do
21545  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21546    ac_cv_prog_OBJC="$ac_tool_prefix$ac_prog"
21547    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21548    break 2
21549  fi
21550done
21551  done
21552IFS=$as_save_IFS
21553
21554fi
21555fi
21556OBJC=$ac_cv_prog_OBJC
21557if test -n "$OBJC"; then
21558  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJC" >&5
21559$as_echo "$OBJC" >&6; }
21560else
21561  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21562$as_echo "no" >&6; }
21563fi
21564
21565
21566    test -n "$OBJC" && break
21567  done
21568fi
21569if test -z "$OBJC"; then
21570  ac_ct_OBJC=$OBJC
21571  for ac_prog in gcc objcc objc cc CC
21572do
21573  # Extract the first word of "$ac_prog", so it can be a program name with args.
21574set dummy $ac_prog; ac_word=$2
21575{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21576$as_echo_n "checking for $ac_word... " >&6; }
21577if ${ac_cv_prog_ac_ct_OBJC+:} false; then :
21578  $as_echo_n "(cached) " >&6
21579else
21580  if test -n "$ac_ct_OBJC"; then
21581  ac_cv_prog_ac_ct_OBJC="$ac_ct_OBJC" # Let the user override the test.
21582else
21583as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21584for as_dir in $PATH
21585do
21586  IFS=$as_save_IFS
21587  test -z "$as_dir" && as_dir=.
21588    for ac_exec_ext in '' $ac_executable_extensions; do
21589  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21590    ac_cv_prog_ac_ct_OBJC="$ac_prog"
21591    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21592    break 2
21593  fi
21594done
21595  done
21596IFS=$as_save_IFS
21597
21598fi
21599fi
21600ac_ct_OBJC=$ac_cv_prog_ac_ct_OBJC
21601if test -n "$ac_ct_OBJC"; then
21602  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJC" >&5
21603$as_echo "$ac_ct_OBJC" >&6; }
21604else
21605  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21606$as_echo "no" >&6; }
21607fi
21608
21609
21610  test -n "$ac_ct_OBJC" && break
21611done
21612
21613  if test "x$ac_ct_OBJC" = x; then
21614    OBJC="gcc"
21615  else
21616    case $cross_compiling:$ac_tool_warned in
21617yes:)
21618{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
21619$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
21620ac_tool_warned=yes ;;
21621esac
21622    OBJC=$ac_ct_OBJC
21623  fi
21624fi
21625
21626# Provide some information about the compiler.
21627$as_echo "$as_me:${as_lineno-$LINENO}: checking for Objective C compiler version" >&5
21628set X $ac_compile
21629ac_compiler=$2
21630for ac_option in --version -v -V -qversion; do
21631  { { ac_try="$ac_compiler $ac_option >&5"
21632case "(($ac_try" in
21633  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21634  *) ac_try_echo=$ac_try;;
21635esac
21636eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
21637$as_echo "$ac_try_echo"; } >&5
21638  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
21639  ac_status=$?
21640  if test -s conftest.err; then
21641    sed '10a\
21642... rest of stderr output deleted ...
21643         10q' conftest.err >conftest.er1
21644    cat conftest.er1 >&5
21645  fi
21646  rm -f conftest.er1 conftest.err
21647  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21648  test $ac_status = 0; }
21649done
21650
21651{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Objective C compiler" >&5
21652$as_echo_n "checking whether we are using the GNU Objective C compiler... " >&6; }
21653if ${ac_cv_objc_compiler_gnu+:} false; then :
21654  $as_echo_n "(cached) " >&6
21655else
21656  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21657/* end confdefs.h.  */
21658
21659int
21660main ()
21661{
21662#ifndef __GNUC__
21663       choke me
21664#endif
21665
21666  ;
21667  return 0;
21668}
21669_ACEOF
21670if ac_fn_objc_try_compile "$LINENO"; then :
21671  ac_compiler_gnu=yes
21672else
21673  ac_compiler_gnu=no
21674fi
21675rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21676ac_cv_objc_compiler_gnu=$ac_compiler_gnu
21677
21678fi
21679{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objc_compiler_gnu" >&5
21680$as_echo "$ac_cv_objc_compiler_gnu" >&6; }
21681if test $ac_compiler_gnu = yes; then
21682  GOBJC=yes
21683else
21684  GOBJC=
21685fi
21686ac_test_OBJCFLAGS=${OBJCFLAGS+set}
21687ac_save_OBJCFLAGS=$OBJCFLAGS
21688{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $OBJC accepts -g" >&5
21689$as_echo_n "checking whether $OBJC accepts -g... " >&6; }
21690if ${ac_cv_prog_objc_g+:} false; then :
21691  $as_echo_n "(cached) " >&6
21692else
21693  ac_save_objc_werror_flag=$ac_objc_werror_flag
21694   ac_objc_werror_flag=yes
21695   ac_cv_prog_objc_g=no
21696   OBJCFLAGS="-g"
21697   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21698/* end confdefs.h.  */
21699
21700int
21701main ()
21702{
21703
21704  ;
21705  return 0;
21706}
21707_ACEOF
21708if ac_fn_objc_try_compile "$LINENO"; then :
21709  ac_cv_prog_objc_g=yes
21710else
21711  OBJCFLAGS=""
21712      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21713/* end confdefs.h.  */
21714
21715int
21716main ()
21717{
21718
21719  ;
21720  return 0;
21721}
21722_ACEOF
21723if ac_fn_objc_try_compile "$LINENO"; then :
21724
21725else
21726  ac_objc_werror_flag=$ac_save_objc_werror_flag
21727	 OBJCFLAGS="-g"
21728	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21729/* end confdefs.h.  */
21730
21731int
21732main ()
21733{
21734
21735  ;
21736  return 0;
21737}
21738_ACEOF
21739if ac_fn_objc_try_compile "$LINENO"; then :
21740  ac_cv_prog_objc_g=yes
21741fi
21742rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21743fi
21744rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21745fi
21746rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21747   ac_objc_werror_flag=$ac_save_objc_werror_flag
21748fi
21749{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_objc_g" >&5
21750$as_echo "$ac_cv_prog_objc_g" >&6; }
21751if test "$ac_test_OBJCFLAGS" = set; then
21752  OBJCFLAGS=$ac_save_OBJCFLAGS
21753elif test $ac_cv_prog_objc_g = yes; then
21754  if test "$GOBJC" = yes; then
21755    OBJCFLAGS="-g -O2"
21756  else
21757    OBJCFLAGS="-g"
21758  fi
21759else
21760  if test "$GOBJC" = yes; then
21761    OBJCFLAGS="-O2"
21762  else
21763    OBJCFLAGS=
21764  fi
21765fi
21766ac_ext=cpp
21767ac_cpp='$CXXCPP $CPPFLAGS'
21768ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21769ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21770ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21771
21772
21773  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21774
21775  # First separate the path from the arguments. This will split at the first
21776  # space.
21777  complete="$OBJC"
21778  path="${complete%% *}"
21779  tmp="$complete EOL"
21780  arguments="${tmp#* }"
21781
21782  # Input might be given as Windows format, start by converting to
21783  # unix format.
21784  new_path=`$CYGPATH -u "$path"`
21785
21786  # Now try to locate executable using which
21787  new_path=`$WHICH "$new_path" 2> /dev/null`
21788  # bat and cmd files are not always considered executable in cygwin causing which
21789  # to not find them
21790  if test "x$new_path" = x \
21791           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21792           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21793    new_path=`$CYGPATH -u "$path"`
21794  fi
21795  if test "x$new_path" = x; then
21796    # Oops. Which didn't find the executable.
21797    # The splitting of arguments from the executable at a space might have been incorrect,
21798    # since paths with space are more likely in Windows. Give it another try with the whole
21799    # argument.
21800    path="$complete"
21801    arguments="EOL"
21802    new_path=`$CYGPATH -u "$path"`
21803    new_path=`$WHICH "$new_path" 2> /dev/null`
21804    # bat and cmd files are not always considered executable in cygwin causing which
21805    # to not find them
21806    if test "x$new_path" = x \
21807             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21808             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21809      new_path=`$CYGPATH -u "$path"`
21810    fi
21811    if test "x$new_path" = x; then
21812      # It's still not found. Now this is an unrecoverable error.
21813      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
21814$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
21815      has_space=`$ECHO "$complete" | $GREP " "`
21816      if test "x$has_space" != x; then
21817        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21818$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21819      fi
21820      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
21821    fi
21822  fi
21823
21824  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21825  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21826  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21827  # "foo.exe" is OK but "foo" is an error.
21828  #
21829  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21830  # It is also a way to make sure we got the proper file name for the real test later on.
21831  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21832  if test "x$test_shortpath" = x; then
21833    # Short path failed, file does not exist as specified.
21834    # Try adding .exe or .cmd
21835    if test -f "${new_path}.exe"; then
21836       input_to_shortpath="${new_path}.exe"
21837    elif test -f "${new_path}.cmd"; then
21838       input_to_shortpath="${new_path}.cmd"
21839    else
21840      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$new_path\", is invalid." >&5
21841$as_echo "$as_me: The path of OBJC, which resolves as \"$new_path\", is invalid." >&6;}
21842      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21843$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21844      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
21845    fi
21846  else
21847    input_to_shortpath="$new_path"
21848  fi
21849
21850  # Call helper function which possibly converts this using DOS-style short mode.
21851  # If so, the updated path is stored in $new_path.
21852  new_path="$input_to_shortpath"
21853
21854  input_path="$input_to_shortpath"
21855  # Check if we need to convert this using DOS-style short mode. If the path
21856  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21857  # take no chances and rewrite it.
21858  # Note: m4 eats our [], so we need to use [ and ] instead.
21859  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21860  if test "x$has_forbidden_chars" != x; then
21861    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21862    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21863    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21864    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21865      # Going to short mode and back again did indeed matter. Since short mode is
21866      # case insensitive, let's make it lowercase to improve readability.
21867      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21868      # Now convert it back to Unix-stile (cygpath)
21869      input_path=`$CYGPATH -u "$shortmode_path"`
21870      new_path="$input_path"
21871    fi
21872  fi
21873
21874  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21875  if test "x$test_cygdrive_prefix" = x; then
21876    # As a simple fix, exclude /usr/bin since it's not a real path.
21877    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21878      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21879      # a path prefixed by /cygdrive for fixpath to work.
21880      new_path="$CYGWIN_ROOT_PATH$input_path"
21881    fi
21882  fi
21883
21884  # remove trailing .exe if any
21885  new_path="${new_path/%.exe/}"
21886
21887  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21888
21889  # First separate the path from the arguments. This will split at the first
21890  # space.
21891  complete="$OBJC"
21892  path="${complete%% *}"
21893  tmp="$complete EOL"
21894  arguments="${tmp#* }"
21895
21896  # Input might be given as Windows format, start by converting to
21897  # unix format.
21898  new_path="$path"
21899
21900  windows_path="$new_path"
21901  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21902    unix_path=`$CYGPATH -u "$windows_path"`
21903    new_path="$unix_path"
21904  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21905    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21906    new_path="$unix_path"
21907  fi
21908
21909
21910  # Now try to locate executable using which
21911  new_path=`$WHICH "$new_path" 2> /dev/null`
21912
21913  if test "x$new_path" = x; then
21914    # Oops. Which didn't find the executable.
21915    # The splitting of arguments from the executable at a space might have been incorrect,
21916    # since paths with space are more likely in Windows. Give it another try with the whole
21917    # argument.
21918    path="$complete"
21919    arguments="EOL"
21920    new_path="$path"
21921
21922  windows_path="$new_path"
21923  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21924    unix_path=`$CYGPATH -u "$windows_path"`
21925    new_path="$unix_path"
21926  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21927    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21928    new_path="$unix_path"
21929  fi
21930
21931
21932    new_path=`$WHICH "$new_path" 2> /dev/null`
21933
21934    if test "x$new_path" = x; then
21935      # It's still not found. Now this is an unrecoverable error.
21936      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
21937$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
21938      has_space=`$ECHO "$complete" | $GREP " "`
21939      if test "x$has_space" != x; then
21940        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21941$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21942      fi
21943      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
21944    fi
21945  fi
21946
21947  # Now new_path has a complete unix path to the binary
21948  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21949    # Keep paths in /bin as-is, but remove trailing .exe if any
21950    new_path="${new_path/%.exe/}"
21951    # Do not save /bin paths to all_fixpath_prefixes!
21952  else
21953    # Not in mixed or Windows style, start by that.
21954    new_path=`cmd //c echo $new_path`
21955
21956  input_path="$new_path"
21957  # Check if we need to convert this using DOS-style short mode. If the path
21958  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21959  # take no chances and rewrite it.
21960  # Note: m4 eats our [], so we need to use [ and ] instead.
21961  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21962  if test "x$has_forbidden_chars" != x; then
21963    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21964    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21965  fi
21966
21967    # Output is in $new_path
21968
21969  windows_path="$new_path"
21970  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21971    unix_path=`$CYGPATH -u "$windows_path"`
21972    new_path="$unix_path"
21973  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21974    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21975    new_path="$unix_path"
21976  fi
21977
21978    # remove trailing .exe if any
21979    new_path="${new_path/%.exe/}"
21980
21981    # Save the first 10 bytes of this path to the storage, so fixpath can work.
21982    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21983  fi
21984
21985  else
21986    # We're on a posix platform. Hooray! :)
21987    # First separate the path from the arguments. This will split at the first
21988    # space.
21989    complete="$OBJC"
21990    path="${complete%% *}"
21991    tmp="$complete EOL"
21992    arguments="${tmp#* }"
21993
21994    # Cannot rely on the command "which" here since it doesn't always work.
21995    is_absolute_path=`$ECHO "$path" | $GREP ^/`
21996    if test -z "$is_absolute_path"; then
21997      # Path to executable is not absolute. Find it.
21998      IFS_save="$IFS"
21999      IFS=:
22000      for p in $PATH; do
22001        if test -f "$p/$path" && test -x "$p/$path"; then
22002          new_path="$p/$path"
22003          break
22004        fi
22005      done
22006      IFS="$IFS_save"
22007    else
22008      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJC (as $path) failed, using $path directly." >&5
22009$as_echo "$as_me: Resolving OBJC (as $path) failed, using $path directly." >&6;}
22010      new_path="$path"
22011    fi
22012
22013    if test "x$new_path" = x; then
22014        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
22015$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
22016        has_space=`$ECHO "$complete" | $GREP " "`
22017        if test "x$has_space" != x; then
22018          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22019$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22020        fi
22021        as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
22022      fi
22023  fi
22024
22025      # Now join together the path and the arguments once again
22026      if test "x$arguments" != xEOL; then
22027        new_complete="$new_path ${arguments% *}"
22028      else
22029        new_complete="$new_path"
22030      fi
22031
22032  if test "x$complete" != "x$new_complete"; then
22033      OBJC="$new_complete"
22034      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJC to \"$new_complete\"" >&5
22035$as_echo "$as_me: Rewriting OBJC to \"$new_complete\"" >&6;}
22036    fi
22037
22038else
22039    OBJC=
22040fi
22041
22042# Restore the flags to the user specified values.
22043# This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
22044CFLAGS="$ORG_CFLAGS"
22045CXXFLAGS="$ORG_CXXFLAGS"
22046OBJCFLAGS="$ORG_OBJCFLAGS"
22047
22048LD="$CC"
22049LDEXE="$CC"
22050LDCXX="$CXX"
22051LDEXECXX="$CXX"
22052
22053# LDEXE is the linker to use, when creating executables.
22054
22055# Linking C++ libraries.
22056
22057# Linking C++ executables.
22058
22059
22060if test "x$OPENJDK_TARGET_OS" != xwindows; then
22061    if test -n "$ac_tool_prefix"; then
22062  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
22063set dummy ${ac_tool_prefix}ar; ac_word=$2
22064{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22065$as_echo_n "checking for $ac_word... " >&6; }
22066if ${ac_cv_prog_AR+:} false; then :
22067  $as_echo_n "(cached) " >&6
22068else
22069  if test -n "$AR"; then
22070  ac_cv_prog_AR="$AR" # Let the user override the test.
22071else
22072as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22073for as_dir in $PATH
22074do
22075  IFS=$as_save_IFS
22076  test -z "$as_dir" && as_dir=.
22077    for ac_exec_ext in '' $ac_executable_extensions; do
22078  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22079    ac_cv_prog_AR="${ac_tool_prefix}ar"
22080    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22081    break 2
22082  fi
22083done
22084  done
22085IFS=$as_save_IFS
22086
22087fi
22088fi
22089AR=$ac_cv_prog_AR
22090if test -n "$AR"; then
22091  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
22092$as_echo "$AR" >&6; }
22093else
22094  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22095$as_echo "no" >&6; }
22096fi
22097
22098
22099fi
22100if test -z "$ac_cv_prog_AR"; then
22101  ac_ct_AR=$AR
22102  # Extract the first word of "ar", so it can be a program name with args.
22103set dummy ar; ac_word=$2
22104{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22105$as_echo_n "checking for $ac_word... " >&6; }
22106if ${ac_cv_prog_ac_ct_AR+:} false; then :
22107  $as_echo_n "(cached) " >&6
22108else
22109  if test -n "$ac_ct_AR"; then
22110  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
22111else
22112as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22113for as_dir in $PATH
22114do
22115  IFS=$as_save_IFS
22116  test -z "$as_dir" && as_dir=.
22117    for ac_exec_ext in '' $ac_executable_extensions; do
22118  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22119    ac_cv_prog_ac_ct_AR="ar"
22120    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22121    break 2
22122  fi
22123done
22124  done
22125IFS=$as_save_IFS
22126
22127fi
22128fi
22129ac_ct_AR=$ac_cv_prog_ac_ct_AR
22130if test -n "$ac_ct_AR"; then
22131  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
22132$as_echo "$ac_ct_AR" >&6; }
22133else
22134  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22135$as_echo "no" >&6; }
22136fi
22137
22138  if test "x$ac_ct_AR" = x; then
22139    AR=""
22140  else
22141    case $cross_compiling:$ac_tool_warned in
22142yes:)
22143{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
22144$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
22145ac_tool_warned=yes ;;
22146esac
22147    AR=$ac_ct_AR
22148  fi
22149else
22150  AR="$ac_cv_prog_AR"
22151fi
22152
22153
22154  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22155
22156  # First separate the path from the arguments. This will split at the first
22157  # space.
22158  complete="$AR"
22159  path="${complete%% *}"
22160  tmp="$complete EOL"
22161  arguments="${tmp#* }"
22162
22163  # Input might be given as Windows format, start by converting to
22164  # unix format.
22165  new_path=`$CYGPATH -u "$path"`
22166
22167  # Now try to locate executable using which
22168  new_path=`$WHICH "$new_path" 2> /dev/null`
22169  # bat and cmd files are not always considered executable in cygwin causing which
22170  # to not find them
22171  if test "x$new_path" = x \
22172           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22173           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22174    new_path=`$CYGPATH -u "$path"`
22175  fi
22176  if test "x$new_path" = x; then
22177    # Oops. Which didn't find the executable.
22178    # The splitting of arguments from the executable at a space might have been incorrect,
22179    # since paths with space are more likely in Windows. Give it another try with the whole
22180    # argument.
22181    path="$complete"
22182    arguments="EOL"
22183    new_path=`$CYGPATH -u "$path"`
22184    new_path=`$WHICH "$new_path" 2> /dev/null`
22185    # bat and cmd files are not always considered executable in cygwin causing which
22186    # to not find them
22187    if test "x$new_path" = x \
22188             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22189             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22190      new_path=`$CYGPATH -u "$path"`
22191    fi
22192    if test "x$new_path" = x; then
22193      # It's still not found. Now this is an unrecoverable error.
22194      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
22195$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
22196      has_space=`$ECHO "$complete" | $GREP " "`
22197      if test "x$has_space" != x; then
22198        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22199$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22200      fi
22201      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22202    fi
22203  fi
22204
22205  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22206  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22207  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22208  # "foo.exe" is OK but "foo" is an error.
22209  #
22210  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22211  # It is also a way to make sure we got the proper file name for the real test later on.
22212  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22213  if test "x$test_shortpath" = x; then
22214    # Short path failed, file does not exist as specified.
22215    # Try adding .exe or .cmd
22216    if test -f "${new_path}.exe"; then
22217       input_to_shortpath="${new_path}.exe"
22218    elif test -f "${new_path}.cmd"; then
22219       input_to_shortpath="${new_path}.cmd"
22220    else
22221      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
22222$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
22223      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22224$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22225      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22226    fi
22227  else
22228    input_to_shortpath="$new_path"
22229  fi
22230
22231  # Call helper function which possibly converts this using DOS-style short mode.
22232  # If so, the updated path is stored in $new_path.
22233  new_path="$input_to_shortpath"
22234
22235  input_path="$input_to_shortpath"
22236  # Check if we need to convert this using DOS-style short mode. If the path
22237  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22238  # take no chances and rewrite it.
22239  # Note: m4 eats our [], so we need to use [ and ] instead.
22240  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22241  if test "x$has_forbidden_chars" != x; then
22242    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22243    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22244    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22245    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22246      # Going to short mode and back again did indeed matter. Since short mode is
22247      # case insensitive, let's make it lowercase to improve readability.
22248      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22249      # Now convert it back to Unix-stile (cygpath)
22250      input_path=`$CYGPATH -u "$shortmode_path"`
22251      new_path="$input_path"
22252    fi
22253  fi
22254
22255  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22256  if test "x$test_cygdrive_prefix" = x; then
22257    # As a simple fix, exclude /usr/bin since it's not a real path.
22258    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22259      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22260      # a path prefixed by /cygdrive for fixpath to work.
22261      new_path="$CYGWIN_ROOT_PATH$input_path"
22262    fi
22263  fi
22264
22265  # remove trailing .exe if any
22266  new_path="${new_path/%.exe/}"
22267
22268  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22269
22270  # First separate the path from the arguments. This will split at the first
22271  # space.
22272  complete="$AR"
22273  path="${complete%% *}"
22274  tmp="$complete EOL"
22275  arguments="${tmp#* }"
22276
22277  # Input might be given as Windows format, start by converting to
22278  # unix format.
22279  new_path="$path"
22280
22281  windows_path="$new_path"
22282  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22283    unix_path=`$CYGPATH -u "$windows_path"`
22284    new_path="$unix_path"
22285  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22286    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22287    new_path="$unix_path"
22288  fi
22289
22290
22291  # Now try to locate executable using which
22292  new_path=`$WHICH "$new_path" 2> /dev/null`
22293
22294  if test "x$new_path" = x; then
22295    # Oops. Which didn't find the executable.
22296    # The splitting of arguments from the executable at a space might have been incorrect,
22297    # since paths with space are more likely in Windows. Give it another try with the whole
22298    # argument.
22299    path="$complete"
22300    arguments="EOL"
22301    new_path="$path"
22302
22303  windows_path="$new_path"
22304  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22305    unix_path=`$CYGPATH -u "$windows_path"`
22306    new_path="$unix_path"
22307  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22308    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22309    new_path="$unix_path"
22310  fi
22311
22312
22313    new_path=`$WHICH "$new_path" 2> /dev/null`
22314
22315    if test "x$new_path" = x; then
22316      # It's still not found. Now this is an unrecoverable error.
22317      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
22318$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
22319      has_space=`$ECHO "$complete" | $GREP " "`
22320      if test "x$has_space" != x; then
22321        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22322$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22323      fi
22324      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22325    fi
22326  fi
22327
22328  # Now new_path has a complete unix path to the binary
22329  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22330    # Keep paths in /bin as-is, but remove trailing .exe if any
22331    new_path="${new_path/%.exe/}"
22332    # Do not save /bin paths to all_fixpath_prefixes!
22333  else
22334    # Not in mixed or Windows style, start by that.
22335    new_path=`cmd //c echo $new_path`
22336
22337  input_path="$new_path"
22338  # Check if we need to convert this using DOS-style short mode. If the path
22339  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22340  # take no chances and rewrite it.
22341  # Note: m4 eats our [], so we need to use [ and ] instead.
22342  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22343  if test "x$has_forbidden_chars" != x; then
22344    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22345    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22346  fi
22347
22348    # Output is in $new_path
22349
22350  windows_path="$new_path"
22351  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22352    unix_path=`$CYGPATH -u "$windows_path"`
22353    new_path="$unix_path"
22354  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22355    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22356    new_path="$unix_path"
22357  fi
22358
22359    # remove trailing .exe if any
22360    new_path="${new_path/%.exe/}"
22361
22362    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22363    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22364  fi
22365
22366  else
22367    # We're on a posix platform. Hooray! :)
22368    # First separate the path from the arguments. This will split at the first
22369    # space.
22370    complete="$AR"
22371    path="${complete%% *}"
22372    tmp="$complete EOL"
22373    arguments="${tmp#* }"
22374
22375    # Cannot rely on the command "which" here since it doesn't always work.
22376    is_absolute_path=`$ECHO "$path" | $GREP ^/`
22377    if test -z "$is_absolute_path"; then
22378      # Path to executable is not absolute. Find it.
22379      IFS_save="$IFS"
22380      IFS=:
22381      for p in $PATH; do
22382        if test -f "$p/$path" && test -x "$p/$path"; then
22383          new_path="$p/$path"
22384          break
22385        fi
22386      done
22387      IFS="$IFS_save"
22388    else
22389      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AR (as $path) failed, using $path directly." >&5
22390$as_echo "$as_me: Resolving AR (as $path) failed, using $path directly." >&6;}
22391      new_path="$path"
22392    fi
22393
22394    if test "x$new_path" = x; then
22395        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
22396$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
22397        has_space=`$ECHO "$complete" | $GREP " "`
22398        if test "x$has_space" != x; then
22399          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22400$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22401        fi
22402        as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22403      fi
22404  fi
22405
22406      # Now join together the path and the arguments once again
22407      if test "x$arguments" != xEOL; then
22408        new_complete="$new_path ${arguments% *}"
22409      else
22410        new_complete="$new_path"
22411      fi
22412
22413  if test "x$complete" != "x$new_complete"; then
22414      AR="$new_complete"
22415      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
22416$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
22417    fi
22418
22419fi
22420if test "x$OPENJDK_TARGET_OS" = xmacosx; then
22421    ARFLAGS="-r"
22422else
22423    ARFLAGS=""
22424fi
22425
22426
22427# For hotspot, we need these in Windows mixed path; other platforms keep them the same
22428HOTSPOT_CXX="$CXX"
22429HOTSPOT_LD="$LD"
22430
22431
22432
22433COMPILER_NAME=gcc
22434COMPILER_TYPE=CC
22435if test "x$OPENJDK_TARGET_OS" = xwindows; then :
22436
22437    # For now, assume that we are always compiling using cl.exe.
22438    CC_OUT_OPTION=-Fo
22439    EXE_OUT_OPTION=-out:
22440    LD_OUT_OPTION=-out:
22441    AR_OUT_OPTION=-out:
22442    # On Windows, reject /usr/bin/link (as determined in CYGWIN_LINK), which is a cygwin
22443    # program for something completely different.
22444    # Extract the first word of "link", so it can be a program name with args.
22445set dummy link; ac_word=$2
22446{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22447$as_echo_n "checking for $ac_word... " >&6; }
22448if ${ac_cv_prog_WINLD+:} false; then :
22449  $as_echo_n "(cached) " >&6
22450else
22451  if test -n "$WINLD"; then
22452  ac_cv_prog_WINLD="$WINLD" # Let the user override the test.
22453else
22454  ac_prog_rejected=no
22455as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22456for as_dir in $PATH
22457do
22458  IFS=$as_save_IFS
22459  test -z "$as_dir" && as_dir=.
22460    for ac_exec_ext in '' $ac_executable_extensions; do
22461  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22462    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
22463       ac_prog_rejected=yes
22464       continue
22465     fi
22466    ac_cv_prog_WINLD="link"
22467    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22468    break 2
22469  fi
22470done
22471  done
22472IFS=$as_save_IFS
22473
22474if test $ac_prog_rejected = yes; then
22475  # We found a bogon in the path, so make sure we never use it.
22476  set dummy $ac_cv_prog_WINLD
22477  shift
22478  if test $# != 0; then
22479    # We chose a different compiler from the bogus one.
22480    # However, it has the same basename, so the bogon will be chosen
22481    # first if we set WINLD to just the basename; use the full file name.
22482    shift
22483    ac_cv_prog_WINLD="$as_dir/$ac_word${1+' '}$@"
22484  fi
22485fi
22486fi
22487fi
22488WINLD=$ac_cv_prog_WINLD
22489if test -n "$WINLD"; then
22490  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINLD" >&5
22491$as_echo "$WINLD" >&6; }
22492else
22493  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22494$as_echo "no" >&6; }
22495fi
22496
22497
22498    # Since we must ignore the first found link, WINLD will contain
22499    # the full path to the link.exe program.
22500
22501  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22502
22503  # First separate the path from the arguments. This will split at the first
22504  # space.
22505  complete="$WINLD"
22506  path="${complete%% *}"
22507  tmp="$complete EOL"
22508  arguments="${tmp#* }"
22509
22510  # Input might be given as Windows format, start by converting to
22511  # unix format.
22512  new_path=`$CYGPATH -u "$path"`
22513
22514  # Now try to locate executable using which
22515  new_path=`$WHICH "$new_path" 2> /dev/null`
22516  # bat and cmd files are not always considered executable in cygwin causing which
22517  # to not find them
22518  if test "x$new_path" = x \
22519           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22520           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22521    new_path=`$CYGPATH -u "$path"`
22522  fi
22523  if test "x$new_path" = x; then
22524    # Oops. Which didn't find the executable.
22525    # The splitting of arguments from the executable at a space might have been incorrect,
22526    # since paths with space are more likely in Windows. Give it another try with the whole
22527    # argument.
22528    path="$complete"
22529    arguments="EOL"
22530    new_path=`$CYGPATH -u "$path"`
22531    new_path=`$WHICH "$new_path" 2> /dev/null`
22532    # bat and cmd files are not always considered executable in cygwin causing which
22533    # to not find them
22534    if test "x$new_path" = x \
22535             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22536             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22537      new_path=`$CYGPATH -u "$path"`
22538    fi
22539    if test "x$new_path" = x; then
22540      # It's still not found. Now this is an unrecoverable error.
22541      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
22542$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
22543      has_space=`$ECHO "$complete" | $GREP " "`
22544      if test "x$has_space" != x; then
22545        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22546$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22547      fi
22548      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22549    fi
22550  fi
22551
22552  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22553  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22554  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22555  # "foo.exe" is OK but "foo" is an error.
22556  #
22557  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22558  # It is also a way to make sure we got the proper file name for the real test later on.
22559  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22560  if test "x$test_shortpath" = x; then
22561    # Short path failed, file does not exist as specified.
22562    # Try adding .exe or .cmd
22563    if test -f "${new_path}.exe"; then
22564       input_to_shortpath="${new_path}.exe"
22565    elif test -f "${new_path}.cmd"; then
22566       input_to_shortpath="${new_path}.cmd"
22567    else
22568      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$new_path\", is invalid." >&5
22569$as_echo "$as_me: The path of WINLD, which resolves as \"$new_path\", is invalid." >&6;}
22570      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22571$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22572      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22573    fi
22574  else
22575    input_to_shortpath="$new_path"
22576  fi
22577
22578  # Call helper function which possibly converts this using DOS-style short mode.
22579  # If so, the updated path is stored in $new_path.
22580  new_path="$input_to_shortpath"
22581
22582  input_path="$input_to_shortpath"
22583  # Check if we need to convert this using DOS-style short mode. If the path
22584  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22585  # take no chances and rewrite it.
22586  # Note: m4 eats our [], so we need to use [ and ] instead.
22587  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22588  if test "x$has_forbidden_chars" != x; then
22589    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22590    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22591    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22592    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22593      # Going to short mode and back again did indeed matter. Since short mode is
22594      # case insensitive, let's make it lowercase to improve readability.
22595      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22596      # Now convert it back to Unix-stile (cygpath)
22597      input_path=`$CYGPATH -u "$shortmode_path"`
22598      new_path="$input_path"
22599    fi
22600  fi
22601
22602  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22603  if test "x$test_cygdrive_prefix" = x; then
22604    # As a simple fix, exclude /usr/bin since it's not a real path.
22605    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22606      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22607      # a path prefixed by /cygdrive for fixpath to work.
22608      new_path="$CYGWIN_ROOT_PATH$input_path"
22609    fi
22610  fi
22611
22612  # remove trailing .exe if any
22613  new_path="${new_path/%.exe/}"
22614
22615  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22616
22617  # First separate the path from the arguments. This will split at the first
22618  # space.
22619  complete="$WINLD"
22620  path="${complete%% *}"
22621  tmp="$complete EOL"
22622  arguments="${tmp#* }"
22623
22624  # Input might be given as Windows format, start by converting to
22625  # unix format.
22626  new_path="$path"
22627
22628  windows_path="$new_path"
22629  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22630    unix_path=`$CYGPATH -u "$windows_path"`
22631    new_path="$unix_path"
22632  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22633    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22634    new_path="$unix_path"
22635  fi
22636
22637
22638  # Now try to locate executable using which
22639  new_path=`$WHICH "$new_path" 2> /dev/null`
22640
22641  if test "x$new_path" = x; then
22642    # Oops. Which didn't find the executable.
22643    # The splitting of arguments from the executable at a space might have been incorrect,
22644    # since paths with space are more likely in Windows. Give it another try with the whole
22645    # argument.
22646    path="$complete"
22647    arguments="EOL"
22648    new_path="$path"
22649
22650  windows_path="$new_path"
22651  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22652    unix_path=`$CYGPATH -u "$windows_path"`
22653    new_path="$unix_path"
22654  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22655    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22656    new_path="$unix_path"
22657  fi
22658
22659
22660    new_path=`$WHICH "$new_path" 2> /dev/null`
22661
22662    if test "x$new_path" = x; then
22663      # It's still not found. Now this is an unrecoverable error.
22664      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
22665$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
22666      has_space=`$ECHO "$complete" | $GREP " "`
22667      if test "x$has_space" != x; then
22668        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22669$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22670      fi
22671      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22672    fi
22673  fi
22674
22675  # Now new_path has a complete unix path to the binary
22676  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22677    # Keep paths in /bin as-is, but remove trailing .exe if any
22678    new_path="${new_path/%.exe/}"
22679    # Do not save /bin paths to all_fixpath_prefixes!
22680  else
22681    # Not in mixed or Windows style, start by that.
22682    new_path=`cmd //c echo $new_path`
22683
22684  input_path="$new_path"
22685  # Check if we need to convert this using DOS-style short mode. If the path
22686  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22687  # take no chances and rewrite it.
22688  # Note: m4 eats our [], so we need to use [ and ] instead.
22689  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22690  if test "x$has_forbidden_chars" != x; then
22691    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22692    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22693  fi
22694
22695    # Output is in $new_path
22696
22697  windows_path="$new_path"
22698  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22699    unix_path=`$CYGPATH -u "$windows_path"`
22700    new_path="$unix_path"
22701  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22702    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22703    new_path="$unix_path"
22704  fi
22705
22706    # remove trailing .exe if any
22707    new_path="${new_path/%.exe/}"
22708
22709    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22710    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22711  fi
22712
22713  else
22714    # We're on a posix platform. Hooray! :)
22715    # First separate the path from the arguments. This will split at the first
22716    # space.
22717    complete="$WINLD"
22718    path="${complete%% *}"
22719    tmp="$complete EOL"
22720    arguments="${tmp#* }"
22721
22722    # Cannot rely on the command "which" here since it doesn't always work.
22723    is_absolute_path=`$ECHO "$path" | $GREP ^/`
22724    if test -z "$is_absolute_path"; then
22725      # Path to executable is not absolute. Find it.
22726      IFS_save="$IFS"
22727      IFS=:
22728      for p in $PATH; do
22729        if test -f "$p/$path" && test -x "$p/$path"; then
22730          new_path="$p/$path"
22731          break
22732        fi
22733      done
22734      IFS="$IFS_save"
22735    else
22736      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINLD (as $path) failed, using $path directly." >&5
22737$as_echo "$as_me: Resolving WINLD (as $path) failed, using $path directly." >&6;}
22738      new_path="$path"
22739    fi
22740
22741    if test "x$new_path" = x; then
22742        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
22743$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
22744        has_space=`$ECHO "$complete" | $GREP " "`
22745        if test "x$has_space" != x; then
22746          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22747$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22748        fi
22749        as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22750      fi
22751  fi
22752
22753      # Now join together the path and the arguments once again
22754      if test "x$arguments" != xEOL; then
22755        new_complete="$new_path ${arguments% *}"
22756      else
22757        new_complete="$new_path"
22758      fi
22759
22760  if test "x$complete" != "x$new_complete"; then
22761      WINLD="$new_complete"
22762      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINLD to \"$new_complete\"" >&5
22763$as_echo "$as_me: Rewriting WINLD to \"$new_complete\"" >&6;}
22764    fi
22765
22766    printf "Windows linker was found at $WINLD\n"
22767    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
22768$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
22769    "$WINLD" --version > /dev/null
22770    if test $? -eq 0 ; then
22771      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22772$as_echo "no" >&6; }
22773      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
22774    else
22775      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
22776$as_echo "yes" >&6; }
22777    fi
22778    LD="$WINLD"
22779    LDEXE="$WINLD"
22780    LDCXX="$WINLD"
22781    LDEXECXX="$WINLD"
22782
22783    # Extract the first word of "mt", so it can be a program name with args.
22784set dummy mt; ac_word=$2
22785{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22786$as_echo_n "checking for $ac_word... " >&6; }
22787if ${ac_cv_prog_MT+:} false; then :
22788  $as_echo_n "(cached) " >&6
22789else
22790  if test -n "$MT"; then
22791  ac_cv_prog_MT="$MT" # Let the user override the test.
22792else
22793  ac_prog_rejected=no
22794as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22795for as_dir in $PATH
22796do
22797  IFS=$as_save_IFS
22798  test -z "$as_dir" && as_dir=.
22799    for ac_exec_ext in '' $ac_executable_extensions; do
22800  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22801    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
22802       ac_prog_rejected=yes
22803       continue
22804     fi
22805    ac_cv_prog_MT="mt"
22806    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22807    break 2
22808  fi
22809done
22810  done
22811IFS=$as_save_IFS
22812
22813if test $ac_prog_rejected = yes; then
22814  # We found a bogon in the path, so make sure we never use it.
22815  set dummy $ac_cv_prog_MT
22816  shift
22817  if test $# != 0; then
22818    # We chose a different compiler from the bogus one.
22819    # However, it has the same basename, so the bogon will be chosen
22820    # first if we set MT to just the basename; use the full file name.
22821    shift
22822    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
22823  fi
22824fi
22825fi
22826fi
22827MT=$ac_cv_prog_MT
22828if test -n "$MT"; then
22829  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
22830$as_echo "$MT" >&6; }
22831else
22832  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22833$as_echo "no" >&6; }
22834fi
22835
22836
22837
22838  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22839
22840  # First separate the path from the arguments. This will split at the first
22841  # space.
22842  complete="$MT"
22843  path="${complete%% *}"
22844  tmp="$complete EOL"
22845  arguments="${tmp#* }"
22846
22847  # Input might be given as Windows format, start by converting to
22848  # unix format.
22849  new_path=`$CYGPATH -u "$path"`
22850
22851  # Now try to locate executable using which
22852  new_path=`$WHICH "$new_path" 2> /dev/null`
22853  # bat and cmd files are not always considered executable in cygwin causing which
22854  # to not find them
22855  if test "x$new_path" = x \
22856           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22857           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22858    new_path=`$CYGPATH -u "$path"`
22859  fi
22860  if test "x$new_path" = x; then
22861    # Oops. Which didn't find the executable.
22862    # The splitting of arguments from the executable at a space might have been incorrect,
22863    # since paths with space are more likely in Windows. Give it another try with the whole
22864    # argument.
22865    path="$complete"
22866    arguments="EOL"
22867    new_path=`$CYGPATH -u "$path"`
22868    new_path=`$WHICH "$new_path" 2> /dev/null`
22869    # bat and cmd files are not always considered executable in cygwin causing which
22870    # to not find them
22871    if test "x$new_path" = x \
22872             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22873             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22874      new_path=`$CYGPATH -u "$path"`
22875    fi
22876    if test "x$new_path" = x; then
22877      # It's still not found. Now this is an unrecoverable error.
22878      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
22879$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
22880      has_space=`$ECHO "$complete" | $GREP " "`
22881      if test "x$has_space" != x; then
22882        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22883$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22884      fi
22885      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
22886    fi
22887  fi
22888
22889  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22890  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22891  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22892  # "foo.exe" is OK but "foo" is an error.
22893  #
22894  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22895  # It is also a way to make sure we got the proper file name for the real test later on.
22896  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22897  if test "x$test_shortpath" = x; then
22898    # Short path failed, file does not exist as specified.
22899    # Try adding .exe or .cmd
22900    if test -f "${new_path}.exe"; then
22901       input_to_shortpath="${new_path}.exe"
22902    elif test -f "${new_path}.cmd"; then
22903       input_to_shortpath="${new_path}.cmd"
22904    else
22905      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
22906$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
22907      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22908$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22909      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
22910    fi
22911  else
22912    input_to_shortpath="$new_path"
22913  fi
22914
22915  # Call helper function which possibly converts this using DOS-style short mode.
22916  # If so, the updated path is stored in $new_path.
22917  new_path="$input_to_shortpath"
22918
22919  input_path="$input_to_shortpath"
22920  # Check if we need to convert this using DOS-style short mode. If the path
22921  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22922  # take no chances and rewrite it.
22923  # Note: m4 eats our [], so we need to use [ and ] instead.
22924  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22925  if test "x$has_forbidden_chars" != x; then
22926    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22927    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22928    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22929    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22930      # Going to short mode and back again did indeed matter. Since short mode is
22931      # case insensitive, let's make it lowercase to improve readability.
22932      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22933      # Now convert it back to Unix-stile (cygpath)
22934      input_path=`$CYGPATH -u "$shortmode_path"`
22935      new_path="$input_path"
22936    fi
22937  fi
22938
22939  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22940  if test "x$test_cygdrive_prefix" = x; then
22941    # As a simple fix, exclude /usr/bin since it's not a real path.
22942    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22943      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22944      # a path prefixed by /cygdrive for fixpath to work.
22945      new_path="$CYGWIN_ROOT_PATH$input_path"
22946    fi
22947  fi
22948
22949  # remove trailing .exe if any
22950  new_path="${new_path/%.exe/}"
22951
22952  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22953
22954  # First separate the path from the arguments. This will split at the first
22955  # space.
22956  complete="$MT"
22957  path="${complete%% *}"
22958  tmp="$complete EOL"
22959  arguments="${tmp#* }"
22960
22961  # Input might be given as Windows format, start by converting to
22962  # unix format.
22963  new_path="$path"
22964
22965  windows_path="$new_path"
22966  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22967    unix_path=`$CYGPATH -u "$windows_path"`
22968    new_path="$unix_path"
22969  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22970    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22971    new_path="$unix_path"
22972  fi
22973
22974
22975  # Now try to locate executable using which
22976  new_path=`$WHICH "$new_path" 2> /dev/null`
22977
22978  if test "x$new_path" = x; then
22979    # Oops. Which didn't find the executable.
22980    # The splitting of arguments from the executable at a space might have been incorrect,
22981    # since paths with space are more likely in Windows. Give it another try with the whole
22982    # argument.
22983    path="$complete"
22984    arguments="EOL"
22985    new_path="$path"
22986
22987  windows_path="$new_path"
22988  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22989    unix_path=`$CYGPATH -u "$windows_path"`
22990    new_path="$unix_path"
22991  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22992    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22993    new_path="$unix_path"
22994  fi
22995
22996
22997    new_path=`$WHICH "$new_path" 2> /dev/null`
22998
22999    if test "x$new_path" = x; then
23000      # It's still not found. Now this is an unrecoverable error.
23001      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
23002$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
23003      has_space=`$ECHO "$complete" | $GREP " "`
23004      if test "x$has_space" != x; then
23005        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23006$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23007      fi
23008      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
23009    fi
23010  fi
23011
23012  # Now new_path has a complete unix path to the binary
23013  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23014    # Keep paths in /bin as-is, but remove trailing .exe if any
23015    new_path="${new_path/%.exe/}"
23016    # Do not save /bin paths to all_fixpath_prefixes!
23017  else
23018    # Not in mixed or Windows style, start by that.
23019    new_path=`cmd //c echo $new_path`
23020
23021  input_path="$new_path"
23022  # Check if we need to convert this using DOS-style short mode. If the path
23023  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23024  # take no chances and rewrite it.
23025  # Note: m4 eats our [], so we need to use [ and ] instead.
23026  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23027  if test "x$has_forbidden_chars" != x; then
23028    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23029    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23030  fi
23031
23032    # Output is in $new_path
23033
23034  windows_path="$new_path"
23035  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23036    unix_path=`$CYGPATH -u "$windows_path"`
23037    new_path="$unix_path"
23038  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23039    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23040    new_path="$unix_path"
23041  fi
23042
23043    # remove trailing .exe if any
23044    new_path="${new_path/%.exe/}"
23045
23046    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23047    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23048  fi
23049
23050  else
23051    # We're on a posix platform. Hooray! :)
23052    # First separate the path from the arguments. This will split at the first
23053    # space.
23054    complete="$MT"
23055    path="${complete%% *}"
23056    tmp="$complete EOL"
23057    arguments="${tmp#* }"
23058
23059    # Cannot rely on the command "which" here since it doesn't always work.
23060    is_absolute_path=`$ECHO "$path" | $GREP ^/`
23061    if test -z "$is_absolute_path"; then
23062      # Path to executable is not absolute. Find it.
23063      IFS_save="$IFS"
23064      IFS=:
23065      for p in $PATH; do
23066        if test -f "$p/$path" && test -x "$p/$path"; then
23067          new_path="$p/$path"
23068          break
23069        fi
23070      done
23071      IFS="$IFS_save"
23072    else
23073      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MT (as $path) failed, using $path directly." >&5
23074$as_echo "$as_me: Resolving MT (as $path) failed, using $path directly." >&6;}
23075      new_path="$path"
23076    fi
23077
23078    if test "x$new_path" = x; then
23079        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
23080$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
23081        has_space=`$ECHO "$complete" | $GREP " "`
23082        if test "x$has_space" != x; then
23083          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23084$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23085        fi
23086        as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
23087      fi
23088  fi
23089
23090      # Now join together the path and the arguments once again
23091      if test "x$arguments" != xEOL; then
23092        new_complete="$new_path ${arguments% *}"
23093      else
23094        new_complete="$new_path"
23095      fi
23096
23097  if test "x$complete" != "x$new_complete"; then
23098      MT="$new_complete"
23099      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
23100$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
23101    fi
23102
23103    # The resource compiler
23104    # Extract the first word of "rc", so it can be a program name with args.
23105set dummy rc; ac_word=$2
23106{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23107$as_echo_n "checking for $ac_word... " >&6; }
23108if ${ac_cv_prog_RC+:} false; then :
23109  $as_echo_n "(cached) " >&6
23110else
23111  if test -n "$RC"; then
23112  ac_cv_prog_RC="$RC" # Let the user override the test.
23113else
23114  ac_prog_rejected=no
23115as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23116for as_dir in $PATH
23117do
23118  IFS=$as_save_IFS
23119  test -z "$as_dir" && as_dir=.
23120    for ac_exec_ext in '' $ac_executable_extensions; do
23121  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23122    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
23123       ac_prog_rejected=yes
23124       continue
23125     fi
23126    ac_cv_prog_RC="rc"
23127    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23128    break 2
23129  fi
23130done
23131  done
23132IFS=$as_save_IFS
23133
23134if test $ac_prog_rejected = yes; then
23135  # We found a bogon in the path, so make sure we never use it.
23136  set dummy $ac_cv_prog_RC
23137  shift
23138  if test $# != 0; then
23139    # We chose a different compiler from the bogus one.
23140    # However, it has the same basename, so the bogon will be chosen
23141    # first if we set RC to just the basename; use the full file name.
23142    shift
23143    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
23144  fi
23145fi
23146fi
23147fi
23148RC=$ac_cv_prog_RC
23149if test -n "$RC"; then
23150  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
23151$as_echo "$RC" >&6; }
23152else
23153  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23154$as_echo "no" >&6; }
23155fi
23156
23157
23158
23159  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23160
23161  # First separate the path from the arguments. This will split at the first
23162  # space.
23163  complete="$RC"
23164  path="${complete%% *}"
23165  tmp="$complete EOL"
23166  arguments="${tmp#* }"
23167
23168  # Input might be given as Windows format, start by converting to
23169  # unix format.
23170  new_path=`$CYGPATH -u "$path"`
23171
23172  # Now try to locate executable using which
23173  new_path=`$WHICH "$new_path" 2> /dev/null`
23174  # bat and cmd files are not always considered executable in cygwin causing which
23175  # to not find them
23176  if test "x$new_path" = x \
23177           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23178           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23179    new_path=`$CYGPATH -u "$path"`
23180  fi
23181  if test "x$new_path" = x; then
23182    # Oops. Which didn't find the executable.
23183    # The splitting of arguments from the executable at a space might have been incorrect,
23184    # since paths with space are more likely in Windows. Give it another try with the whole
23185    # argument.
23186    path="$complete"
23187    arguments="EOL"
23188    new_path=`$CYGPATH -u "$path"`
23189    new_path=`$WHICH "$new_path" 2> /dev/null`
23190    # bat and cmd files are not always considered executable in cygwin causing which
23191    # to not find them
23192    if test "x$new_path" = x \
23193             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23194             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23195      new_path=`$CYGPATH -u "$path"`
23196    fi
23197    if test "x$new_path" = x; then
23198      # It's still not found. Now this is an unrecoverable error.
23199      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
23200$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
23201      has_space=`$ECHO "$complete" | $GREP " "`
23202      if test "x$has_space" != x; then
23203        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23204$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23205      fi
23206      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23207    fi
23208  fi
23209
23210  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23211  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23212  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23213  # "foo.exe" is OK but "foo" is an error.
23214  #
23215  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23216  # It is also a way to make sure we got the proper file name for the real test later on.
23217  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23218  if test "x$test_shortpath" = x; then
23219    # Short path failed, file does not exist as specified.
23220    # Try adding .exe or .cmd
23221    if test -f "${new_path}.exe"; then
23222       input_to_shortpath="${new_path}.exe"
23223    elif test -f "${new_path}.cmd"; then
23224       input_to_shortpath="${new_path}.cmd"
23225    else
23226      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
23227$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
23228      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23229$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23230      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23231    fi
23232  else
23233    input_to_shortpath="$new_path"
23234  fi
23235
23236  # Call helper function which possibly converts this using DOS-style short mode.
23237  # If so, the updated path is stored in $new_path.
23238  new_path="$input_to_shortpath"
23239
23240  input_path="$input_to_shortpath"
23241  # Check if we need to convert this using DOS-style short mode. If the path
23242  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23243  # take no chances and rewrite it.
23244  # Note: m4 eats our [], so we need to use [ and ] instead.
23245  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23246  if test "x$has_forbidden_chars" != x; then
23247    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23248    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23249    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23250    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23251      # Going to short mode and back again did indeed matter. Since short mode is
23252      # case insensitive, let's make it lowercase to improve readability.
23253      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23254      # Now convert it back to Unix-stile (cygpath)
23255      input_path=`$CYGPATH -u "$shortmode_path"`
23256      new_path="$input_path"
23257    fi
23258  fi
23259
23260  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23261  if test "x$test_cygdrive_prefix" = x; then
23262    # As a simple fix, exclude /usr/bin since it's not a real path.
23263    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23264      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23265      # a path prefixed by /cygdrive for fixpath to work.
23266      new_path="$CYGWIN_ROOT_PATH$input_path"
23267    fi
23268  fi
23269
23270  # remove trailing .exe if any
23271  new_path="${new_path/%.exe/}"
23272
23273  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23274
23275  # First separate the path from the arguments. This will split at the first
23276  # space.
23277  complete="$RC"
23278  path="${complete%% *}"
23279  tmp="$complete EOL"
23280  arguments="${tmp#* }"
23281
23282  # Input might be given as Windows format, start by converting to
23283  # unix format.
23284  new_path="$path"
23285
23286  windows_path="$new_path"
23287  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23288    unix_path=`$CYGPATH -u "$windows_path"`
23289    new_path="$unix_path"
23290  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23291    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23292    new_path="$unix_path"
23293  fi
23294
23295
23296  # Now try to locate executable using which
23297  new_path=`$WHICH "$new_path" 2> /dev/null`
23298
23299  if test "x$new_path" = x; then
23300    # Oops. Which didn't find the executable.
23301    # The splitting of arguments from the executable at a space might have been incorrect,
23302    # since paths with space are more likely in Windows. Give it another try with the whole
23303    # argument.
23304    path="$complete"
23305    arguments="EOL"
23306    new_path="$path"
23307
23308  windows_path="$new_path"
23309  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23310    unix_path=`$CYGPATH -u "$windows_path"`
23311    new_path="$unix_path"
23312  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23313    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23314    new_path="$unix_path"
23315  fi
23316
23317
23318    new_path=`$WHICH "$new_path" 2> /dev/null`
23319
23320    if test "x$new_path" = x; then
23321      # It's still not found. Now this is an unrecoverable error.
23322      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
23323$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
23324      has_space=`$ECHO "$complete" | $GREP " "`
23325      if test "x$has_space" != x; then
23326        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23327$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23328      fi
23329      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23330    fi
23331  fi
23332
23333  # Now new_path has a complete unix path to the binary
23334  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23335    # Keep paths in /bin as-is, but remove trailing .exe if any
23336    new_path="${new_path/%.exe/}"
23337    # Do not save /bin paths to all_fixpath_prefixes!
23338  else
23339    # Not in mixed or Windows style, start by that.
23340    new_path=`cmd //c echo $new_path`
23341
23342  input_path="$new_path"
23343  # Check if we need to convert this using DOS-style short mode. If the path
23344  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23345  # take no chances and rewrite it.
23346  # Note: m4 eats our [], so we need to use [ and ] instead.
23347  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23348  if test "x$has_forbidden_chars" != x; then
23349    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23350    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23351  fi
23352
23353    # Output is in $new_path
23354
23355  windows_path="$new_path"
23356  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23357    unix_path=`$CYGPATH -u "$windows_path"`
23358    new_path="$unix_path"
23359  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23360    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23361    new_path="$unix_path"
23362  fi
23363
23364    # remove trailing .exe if any
23365    new_path="${new_path/%.exe/}"
23366
23367    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23368    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23369  fi
23370
23371  else
23372    # We're on a posix platform. Hooray! :)
23373    # First separate the path from the arguments. This will split at the first
23374    # space.
23375    complete="$RC"
23376    path="${complete%% *}"
23377    tmp="$complete EOL"
23378    arguments="${tmp#* }"
23379
23380    # Cannot rely on the command "which" here since it doesn't always work.
23381    is_absolute_path=`$ECHO "$path" | $GREP ^/`
23382    if test -z "$is_absolute_path"; then
23383      # Path to executable is not absolute. Find it.
23384      IFS_save="$IFS"
23385      IFS=:
23386      for p in $PATH; do
23387        if test -f "$p/$path" && test -x "$p/$path"; then
23388          new_path="$p/$path"
23389          break
23390        fi
23391      done
23392      IFS="$IFS_save"
23393    else
23394      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving RC (as $path) failed, using $path directly." >&5
23395$as_echo "$as_me: Resolving RC (as $path) failed, using $path directly." >&6;}
23396      new_path="$path"
23397    fi
23398
23399    if test "x$new_path" = x; then
23400        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
23401$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
23402        has_space=`$ECHO "$complete" | $GREP " "`
23403        if test "x$has_space" != x; then
23404          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23405$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23406        fi
23407        as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23408      fi
23409  fi
23410
23411      # Now join together the path and the arguments once again
23412      if test "x$arguments" != xEOL; then
23413        new_complete="$new_path ${arguments% *}"
23414      else
23415        new_complete="$new_path"
23416      fi
23417
23418  if test "x$complete" != "x$new_complete"; then
23419      RC="$new_complete"
23420      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
23421$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
23422    fi
23423
23424
23425    # For hotspot, we need these in Windows mixed path,
23426    # so rewrite them all. Need added .exe suffix.
23427    HOTSPOT_CXX="$CXX.exe"
23428    HOTSPOT_LD="$LD.exe"
23429    HOTSPOT_MT="$MT.exe"
23430    HOTSPOT_RC="$RC.exe"
23431
23432  unix_path="$HOTSPOT_CXX"
23433  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23434    windows_path=`$CYGPATH -m "$unix_path"`
23435    HOTSPOT_CXX="$windows_path"
23436  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23437    windows_path=`cmd //c echo $unix_path`
23438    HOTSPOT_CXX="$windows_path"
23439  fi
23440
23441
23442  unix_path="$HOTSPOT_LD"
23443  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23444    windows_path=`$CYGPATH -m "$unix_path"`
23445    HOTSPOT_LD="$windows_path"
23446  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23447    windows_path=`cmd //c echo $unix_path`
23448    HOTSPOT_LD="$windows_path"
23449  fi
23450
23451
23452  unix_path="$HOTSPOT_MT"
23453  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23454    windows_path=`$CYGPATH -m "$unix_path"`
23455    HOTSPOT_MT="$windows_path"
23456  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23457    windows_path=`cmd //c echo $unix_path`
23458    HOTSPOT_MT="$windows_path"
23459  fi
23460
23461
23462  unix_path="$HOTSPOT_RC"
23463  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23464    windows_path=`$CYGPATH -m "$unix_path"`
23465    HOTSPOT_RC="$windows_path"
23466  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23467    windows_path=`cmd //c echo $unix_path`
23468    HOTSPOT_RC="$windows_path"
23469  fi
23470
23471
23472
23473
23474    RC_FLAGS="-nologo -l 0x409 -r"
23475    if test "x$VARIANT" = xOPT; then :
23476
23477        RC_FLAGS="$RC_FLAGS -d NDEBUG"
23478
23479fi
23480
23481    # The version variables used to create RC_FLAGS may be overridden
23482    # in a custom configure script, or possibly the command line.
23483    # Let those variables be expanded at make time in spec.gmk.
23484    # The \$ are escaped to the shell, and the $(...) variables
23485    # are evaluated by make.
23486    RC_FLAGS="$RC_FLAGS \
23487        -d \"JDK_BUILD_ID=\$(FULL_VERSION)\" \
23488        -d \"JDK_COMPANY=\$(COMPANY_NAME)\" \
23489        -d \"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
23490        -d \"JDK_VER=\$(JDK_MINOR_VERSION).\$(JDK_MICRO_VERSION).\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0).\$(COOKED_BUILD_NUMBER)\" \
23491        -d \"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
23492        -d \"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(JDK_MINOR_VERSION) \$(JDK_UPDATE_META_TAG)\" \
23493        -d \"JDK_FVER=\$(JDK_MINOR_VERSION),\$(JDK_MICRO_VERSION),\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0),\$(COOKED_BUILD_NUMBER)\""
23494
23495    # lib.exe is used to create static libraries.
23496    # Extract the first word of "lib", so it can be a program name with args.
23497set dummy lib; ac_word=$2
23498{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23499$as_echo_n "checking for $ac_word... " >&6; }
23500if ${ac_cv_prog_WINAR+:} false; then :
23501  $as_echo_n "(cached) " >&6
23502else
23503  if test -n "$WINAR"; then
23504  ac_cv_prog_WINAR="$WINAR" # Let the user override the test.
23505else
23506as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23507for as_dir in $PATH
23508do
23509  IFS=$as_save_IFS
23510  test -z "$as_dir" && as_dir=.
23511    for ac_exec_ext in '' $ac_executable_extensions; do
23512  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23513    ac_cv_prog_WINAR="lib"
23514    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23515    break 2
23516  fi
23517done
23518  done
23519IFS=$as_save_IFS
23520
23521fi
23522fi
23523WINAR=$ac_cv_prog_WINAR
23524if test -n "$WINAR"; then
23525  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINAR" >&5
23526$as_echo "$WINAR" >&6; }
23527else
23528  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23529$as_echo "no" >&6; }
23530fi
23531
23532
23533
23534  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23535
23536  # First separate the path from the arguments. This will split at the first
23537  # space.
23538  complete="$WINAR"
23539  path="${complete%% *}"
23540  tmp="$complete EOL"
23541  arguments="${tmp#* }"
23542
23543  # Input might be given as Windows format, start by converting to
23544  # unix format.
23545  new_path=`$CYGPATH -u "$path"`
23546
23547  # Now try to locate executable using which
23548  new_path=`$WHICH "$new_path" 2> /dev/null`
23549  # bat and cmd files are not always considered executable in cygwin causing which
23550  # to not find them
23551  if test "x$new_path" = x \
23552           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23553           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23554    new_path=`$CYGPATH -u "$path"`
23555  fi
23556  if test "x$new_path" = x; then
23557    # Oops. Which didn't find the executable.
23558    # The splitting of arguments from the executable at a space might have been incorrect,
23559    # since paths with space are more likely in Windows. Give it another try with the whole
23560    # argument.
23561    path="$complete"
23562    arguments="EOL"
23563    new_path=`$CYGPATH -u "$path"`
23564    new_path=`$WHICH "$new_path" 2> /dev/null`
23565    # bat and cmd files are not always considered executable in cygwin causing which
23566    # to not find them
23567    if test "x$new_path" = x \
23568             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23569             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23570      new_path=`$CYGPATH -u "$path"`
23571    fi
23572    if test "x$new_path" = x; then
23573      # It's still not found. Now this is an unrecoverable error.
23574      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
23575$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
23576      has_space=`$ECHO "$complete" | $GREP " "`
23577      if test "x$has_space" != x; then
23578        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23579$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23580      fi
23581      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
23582    fi
23583  fi
23584
23585  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23586  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23587  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23588  # "foo.exe" is OK but "foo" is an error.
23589  #
23590  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23591  # It is also a way to make sure we got the proper file name for the real test later on.
23592  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23593  if test "x$test_shortpath" = x; then
23594    # Short path failed, file does not exist as specified.
23595    # Try adding .exe or .cmd
23596    if test -f "${new_path}.exe"; then
23597       input_to_shortpath="${new_path}.exe"
23598    elif test -f "${new_path}.cmd"; then
23599       input_to_shortpath="${new_path}.cmd"
23600    else
23601      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$new_path\", is invalid." >&5
23602$as_echo "$as_me: The path of WINAR, which resolves as \"$new_path\", is invalid." >&6;}
23603      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23604$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23605      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
23606    fi
23607  else
23608    input_to_shortpath="$new_path"
23609  fi
23610
23611  # Call helper function which possibly converts this using DOS-style short mode.
23612  # If so, the updated path is stored in $new_path.
23613  new_path="$input_to_shortpath"
23614
23615  input_path="$input_to_shortpath"
23616  # Check if we need to convert this using DOS-style short mode. If the path
23617  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23618  # take no chances and rewrite it.
23619  # Note: m4 eats our [], so we need to use [ and ] instead.
23620  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23621  if test "x$has_forbidden_chars" != x; then
23622    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23623    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23624    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23625    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23626      # Going to short mode and back again did indeed matter. Since short mode is
23627      # case insensitive, let's make it lowercase to improve readability.
23628      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23629      # Now convert it back to Unix-stile (cygpath)
23630      input_path=`$CYGPATH -u "$shortmode_path"`
23631      new_path="$input_path"
23632    fi
23633  fi
23634
23635  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23636  if test "x$test_cygdrive_prefix" = x; then
23637    # As a simple fix, exclude /usr/bin since it's not a real path.
23638    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23639      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23640      # a path prefixed by /cygdrive for fixpath to work.
23641      new_path="$CYGWIN_ROOT_PATH$input_path"
23642    fi
23643  fi
23644
23645  # remove trailing .exe if any
23646  new_path="${new_path/%.exe/}"
23647
23648  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23649
23650  # First separate the path from the arguments. This will split at the first
23651  # space.
23652  complete="$WINAR"
23653  path="${complete%% *}"
23654  tmp="$complete EOL"
23655  arguments="${tmp#* }"
23656
23657  # Input might be given as Windows format, start by converting to
23658  # unix format.
23659  new_path="$path"
23660
23661  windows_path="$new_path"
23662  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23663    unix_path=`$CYGPATH -u "$windows_path"`
23664    new_path="$unix_path"
23665  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23666    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23667    new_path="$unix_path"
23668  fi
23669
23670
23671  # Now try to locate executable using which
23672  new_path=`$WHICH "$new_path" 2> /dev/null`
23673
23674  if test "x$new_path" = x; then
23675    # Oops. Which didn't find the executable.
23676    # The splitting of arguments from the executable at a space might have been incorrect,
23677    # since paths with space are more likely in Windows. Give it another try with the whole
23678    # argument.
23679    path="$complete"
23680    arguments="EOL"
23681    new_path="$path"
23682
23683  windows_path="$new_path"
23684  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23685    unix_path=`$CYGPATH -u "$windows_path"`
23686    new_path="$unix_path"
23687  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23688    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23689    new_path="$unix_path"
23690  fi
23691
23692
23693    new_path=`$WHICH "$new_path" 2> /dev/null`
23694
23695    if test "x$new_path" = x; then
23696      # It's still not found. Now this is an unrecoverable error.
23697      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
23698$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
23699      has_space=`$ECHO "$complete" | $GREP " "`
23700      if test "x$has_space" != x; then
23701        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23702$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23703      fi
23704      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
23705    fi
23706  fi
23707
23708  # Now new_path has a complete unix path to the binary
23709  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23710    # Keep paths in /bin as-is, but remove trailing .exe if any
23711    new_path="${new_path/%.exe/}"
23712    # Do not save /bin paths to all_fixpath_prefixes!
23713  else
23714    # Not in mixed or Windows style, start by that.
23715    new_path=`cmd //c echo $new_path`
23716
23717  input_path="$new_path"
23718  # Check if we need to convert this using DOS-style short mode. If the path
23719  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23720  # take no chances and rewrite it.
23721  # Note: m4 eats our [], so we need to use [ and ] instead.
23722  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23723  if test "x$has_forbidden_chars" != x; then
23724    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23725    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23726  fi
23727
23728    # Output is in $new_path
23729
23730  windows_path="$new_path"
23731  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23732    unix_path=`$CYGPATH -u "$windows_path"`
23733    new_path="$unix_path"
23734  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23735    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23736    new_path="$unix_path"
23737  fi
23738
23739    # remove trailing .exe if any
23740    new_path="${new_path/%.exe/}"
23741
23742    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23743    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23744  fi
23745
23746  else
23747    # We're on a posix platform. Hooray! :)
23748    # First separate the path from the arguments. This will split at the first
23749    # space.
23750    complete="$WINAR"
23751    path="${complete%% *}"
23752    tmp="$complete EOL"
23753    arguments="${tmp#* }"
23754
23755    # Cannot rely on the command "which" here since it doesn't always work.
23756    is_absolute_path=`$ECHO "$path" | $GREP ^/`
23757    if test -z "$is_absolute_path"; then
23758      # Path to executable is not absolute. Find it.
23759      IFS_save="$IFS"
23760      IFS=:
23761      for p in $PATH; do
23762        if test -f "$p/$path" && test -x "$p/$path"; then
23763          new_path="$p/$path"
23764          break
23765        fi
23766      done
23767      IFS="$IFS_save"
23768    else
23769      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINAR (as $path) failed, using $path directly." >&5
23770$as_echo "$as_me: Resolving WINAR (as $path) failed, using $path directly." >&6;}
23771      new_path="$path"
23772    fi
23773
23774    if test "x$new_path" = x; then
23775        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
23776$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
23777        has_space=`$ECHO "$complete" | $GREP " "`
23778        if test "x$has_space" != x; then
23779          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23780$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23781        fi
23782        as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
23783      fi
23784  fi
23785
23786      # Now join together the path and the arguments once again
23787      if test "x$arguments" != xEOL; then
23788        new_complete="$new_path ${arguments% *}"
23789      else
23790        new_complete="$new_path"
23791      fi
23792
23793  if test "x$complete" != "x$new_complete"; then
23794      WINAR="$new_complete"
23795      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINAR to \"$new_complete\"" >&5
23796$as_echo "$as_me: Rewriting WINAR to \"$new_complete\"" >&6;}
23797    fi
23798
23799    AR="$WINAR"
23800    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
23801
23802    # Extract the first word of "dumpbin", so it can be a program name with args.
23803set dummy dumpbin; ac_word=$2
23804{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23805$as_echo_n "checking for $ac_word... " >&6; }
23806if ${ac_cv_prog_DUMPBIN+:} false; then :
23807  $as_echo_n "(cached) " >&6
23808else
23809  if test -n "$DUMPBIN"; then
23810  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
23811else
23812as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23813for as_dir in $PATH
23814do
23815  IFS=$as_save_IFS
23816  test -z "$as_dir" && as_dir=.
23817    for ac_exec_ext in '' $ac_executable_extensions; do
23818  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23819    ac_cv_prog_DUMPBIN="dumpbin"
23820    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23821    break 2
23822  fi
23823done
23824  done
23825IFS=$as_save_IFS
23826
23827fi
23828fi
23829DUMPBIN=$ac_cv_prog_DUMPBIN
23830if test -n "$DUMPBIN"; then
23831  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
23832$as_echo "$DUMPBIN" >&6; }
23833else
23834  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23835$as_echo "no" >&6; }
23836fi
23837
23838
23839
23840  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23841
23842  # First separate the path from the arguments. This will split at the first
23843  # space.
23844  complete="$DUMPBIN"
23845  path="${complete%% *}"
23846  tmp="$complete EOL"
23847  arguments="${tmp#* }"
23848
23849  # Input might be given as Windows format, start by converting to
23850  # unix format.
23851  new_path=`$CYGPATH -u "$path"`
23852
23853  # Now try to locate executable using which
23854  new_path=`$WHICH "$new_path" 2> /dev/null`
23855  # bat and cmd files are not always considered executable in cygwin causing which
23856  # to not find them
23857  if test "x$new_path" = x \
23858           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23859           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23860    new_path=`$CYGPATH -u "$path"`
23861  fi
23862  if test "x$new_path" = x; then
23863    # Oops. Which didn't find the executable.
23864    # The splitting of arguments from the executable at a space might have been incorrect,
23865    # since paths with space are more likely in Windows. Give it another try with the whole
23866    # argument.
23867    path="$complete"
23868    arguments="EOL"
23869    new_path=`$CYGPATH -u "$path"`
23870    new_path=`$WHICH "$new_path" 2> /dev/null`
23871    # bat and cmd files are not always considered executable in cygwin causing which
23872    # to not find them
23873    if test "x$new_path" = x \
23874             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23875             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23876      new_path=`$CYGPATH -u "$path"`
23877    fi
23878    if test "x$new_path" = x; then
23879      # It's still not found. Now this is an unrecoverable error.
23880      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
23881$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
23882      has_space=`$ECHO "$complete" | $GREP " "`
23883      if test "x$has_space" != x; then
23884        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23885$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23886      fi
23887      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
23888    fi
23889  fi
23890
23891  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23892  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23893  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23894  # "foo.exe" is OK but "foo" is an error.
23895  #
23896  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23897  # It is also a way to make sure we got the proper file name for the real test later on.
23898  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23899  if test "x$test_shortpath" = x; then
23900    # Short path failed, file does not exist as specified.
23901    # Try adding .exe or .cmd
23902    if test -f "${new_path}.exe"; then
23903       input_to_shortpath="${new_path}.exe"
23904    elif test -f "${new_path}.cmd"; then
23905       input_to_shortpath="${new_path}.cmd"
23906    else
23907      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
23908$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
23909      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23910$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23911      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
23912    fi
23913  else
23914    input_to_shortpath="$new_path"
23915  fi
23916
23917  # Call helper function which possibly converts this using DOS-style short mode.
23918  # If so, the updated path is stored in $new_path.
23919  new_path="$input_to_shortpath"
23920
23921  input_path="$input_to_shortpath"
23922  # Check if we need to convert this using DOS-style short mode. If the path
23923  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23924  # take no chances and rewrite it.
23925  # Note: m4 eats our [], so we need to use [ and ] instead.
23926  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23927  if test "x$has_forbidden_chars" != x; then
23928    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23929    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23930    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23931    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23932      # Going to short mode and back again did indeed matter. Since short mode is
23933      # case insensitive, let's make it lowercase to improve readability.
23934      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23935      # Now convert it back to Unix-stile (cygpath)
23936      input_path=`$CYGPATH -u "$shortmode_path"`
23937      new_path="$input_path"
23938    fi
23939  fi
23940
23941  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23942  if test "x$test_cygdrive_prefix" = x; then
23943    # As a simple fix, exclude /usr/bin since it's not a real path.
23944    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23945      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23946      # a path prefixed by /cygdrive for fixpath to work.
23947      new_path="$CYGWIN_ROOT_PATH$input_path"
23948    fi
23949  fi
23950
23951  # remove trailing .exe if any
23952  new_path="${new_path/%.exe/}"
23953
23954  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23955
23956  # First separate the path from the arguments. This will split at the first
23957  # space.
23958  complete="$DUMPBIN"
23959  path="${complete%% *}"
23960  tmp="$complete EOL"
23961  arguments="${tmp#* }"
23962
23963  # Input might be given as Windows format, start by converting to
23964  # unix format.
23965  new_path="$path"
23966
23967  windows_path="$new_path"
23968  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23969    unix_path=`$CYGPATH -u "$windows_path"`
23970    new_path="$unix_path"
23971  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23972    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23973    new_path="$unix_path"
23974  fi
23975
23976
23977  # Now try to locate executable using which
23978  new_path=`$WHICH "$new_path" 2> /dev/null`
23979
23980  if test "x$new_path" = x; then
23981    # Oops. Which didn't find the executable.
23982    # The splitting of arguments from the executable at a space might have been incorrect,
23983    # since paths with space are more likely in Windows. Give it another try with the whole
23984    # argument.
23985    path="$complete"
23986    arguments="EOL"
23987    new_path="$path"
23988
23989  windows_path="$new_path"
23990  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23991    unix_path=`$CYGPATH -u "$windows_path"`
23992    new_path="$unix_path"
23993  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23994    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23995    new_path="$unix_path"
23996  fi
23997
23998
23999    new_path=`$WHICH "$new_path" 2> /dev/null`
24000
24001    if test "x$new_path" = x; then
24002      # It's still not found. Now this is an unrecoverable error.
24003      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
24004$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
24005      has_space=`$ECHO "$complete" | $GREP " "`
24006      if test "x$has_space" != x; then
24007        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24008$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24009      fi
24010      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
24011    fi
24012  fi
24013
24014  # Now new_path has a complete unix path to the binary
24015  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24016    # Keep paths in /bin as-is, but remove trailing .exe if any
24017    new_path="${new_path/%.exe/}"
24018    # Do not save /bin paths to all_fixpath_prefixes!
24019  else
24020    # Not in mixed or Windows style, start by that.
24021    new_path=`cmd //c echo $new_path`
24022
24023  input_path="$new_path"
24024  # Check if we need to convert this using DOS-style short mode. If the path
24025  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24026  # take no chances and rewrite it.
24027  # Note: m4 eats our [], so we need to use [ and ] instead.
24028  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24029  if test "x$has_forbidden_chars" != x; then
24030    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24031    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24032  fi
24033
24034    # Output is in $new_path
24035
24036  windows_path="$new_path"
24037  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24038    unix_path=`$CYGPATH -u "$windows_path"`
24039    new_path="$unix_path"
24040  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24041    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24042    new_path="$unix_path"
24043  fi
24044
24045    # remove trailing .exe if any
24046    new_path="${new_path/%.exe/}"
24047
24048    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24049    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24050  fi
24051
24052  else
24053    # We're on a posix platform. Hooray! :)
24054    # First separate the path from the arguments. This will split at the first
24055    # space.
24056    complete="$DUMPBIN"
24057    path="${complete%% *}"
24058    tmp="$complete EOL"
24059    arguments="${tmp#* }"
24060
24061    # Cannot rely on the command "which" here since it doesn't always work.
24062    is_absolute_path=`$ECHO "$path" | $GREP ^/`
24063    if test -z "$is_absolute_path"; then
24064      # Path to executable is not absolute. Find it.
24065      IFS_save="$IFS"
24066      IFS=:
24067      for p in $PATH; do
24068        if test -f "$p/$path" && test -x "$p/$path"; then
24069          new_path="$p/$path"
24070          break
24071        fi
24072      done
24073      IFS="$IFS_save"
24074    else
24075      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving DUMPBIN (as $path) failed, using $path directly." >&5
24076$as_echo "$as_me: Resolving DUMPBIN (as $path) failed, using $path directly." >&6;}
24077      new_path="$path"
24078    fi
24079
24080    if test "x$new_path" = x; then
24081        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
24082$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
24083        has_space=`$ECHO "$complete" | $GREP " "`
24084        if test "x$has_space" != x; then
24085          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24086$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24087        fi
24088        as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
24089      fi
24090  fi
24091
24092      # Now join together the path and the arguments once again
24093      if test "x$arguments" != xEOL; then
24094        new_complete="$new_path ${arguments% *}"
24095      else
24096        new_complete="$new_path"
24097      fi
24098
24099  if test "x$complete" != "x$new_complete"; then
24100      DUMPBIN="$new_complete"
24101      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
24102$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
24103    fi
24104
24105
24106    COMPILER_TYPE=CL
24107    CCXXFLAGS="$CCXXFLAGS -nologo"
24108
24109fi
24110
24111
24112
24113ac_ext=c
24114ac_cpp='$CPP $CPPFLAGS'
24115ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24116ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24117ac_compiler_gnu=$ac_cv_c_compiler_gnu
24118{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
24119$as_echo_n "checking how to run the C preprocessor... " >&6; }
24120# On Suns, sometimes $CPP names a directory.
24121if test -n "$CPP" && test -d "$CPP"; then
24122  CPP=
24123fi
24124if test -z "$CPP"; then
24125  if ${ac_cv_prog_CPP+:} false; then :
24126  $as_echo_n "(cached) " >&6
24127else
24128      # Double quotes because CPP needs to be expanded
24129    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
24130    do
24131      ac_preproc_ok=false
24132for ac_c_preproc_warn_flag in '' yes
24133do
24134  # Use a header file that comes with gcc, so configuring glibc
24135  # with a fresh cross-compiler works.
24136  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24137  # <limits.h> exists even on freestanding compilers.
24138  # On the NeXT, cc -E runs the code through the compiler's parser,
24139  # not just through cpp. "Syntax error" is here to catch this case.
24140  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24141/* end confdefs.h.  */
24142#ifdef __STDC__
24143# include <limits.h>
24144#else
24145# include <assert.h>
24146#endif
24147		     Syntax error
24148_ACEOF
24149if ac_fn_c_try_cpp "$LINENO"; then :
24150
24151else
24152  # Broken: fails on valid input.
24153continue
24154fi
24155rm -f conftest.err conftest.i conftest.$ac_ext
24156
24157  # OK, works on sane cases.  Now check whether nonexistent headers
24158  # can be detected and how.
24159  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24160/* end confdefs.h.  */
24161#include <ac_nonexistent.h>
24162_ACEOF
24163if ac_fn_c_try_cpp "$LINENO"; then :
24164  # Broken: success on invalid input.
24165continue
24166else
24167  # Passes both tests.
24168ac_preproc_ok=:
24169break
24170fi
24171rm -f conftest.err conftest.i conftest.$ac_ext
24172
24173done
24174# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24175rm -f conftest.i conftest.err conftest.$ac_ext
24176if $ac_preproc_ok; then :
24177  break
24178fi
24179
24180    done
24181    ac_cv_prog_CPP=$CPP
24182
24183fi
24184  CPP=$ac_cv_prog_CPP
24185else
24186  ac_cv_prog_CPP=$CPP
24187fi
24188{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
24189$as_echo "$CPP" >&6; }
24190ac_preproc_ok=false
24191for ac_c_preproc_warn_flag in '' yes
24192do
24193  # Use a header file that comes with gcc, so configuring glibc
24194  # with a fresh cross-compiler works.
24195  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24196  # <limits.h> exists even on freestanding compilers.
24197  # On the NeXT, cc -E runs the code through the compiler's parser,
24198  # not just through cpp. "Syntax error" is here to catch this case.
24199  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24200/* end confdefs.h.  */
24201#ifdef __STDC__
24202# include <limits.h>
24203#else
24204# include <assert.h>
24205#endif
24206		     Syntax error
24207_ACEOF
24208if ac_fn_c_try_cpp "$LINENO"; then :
24209
24210else
24211  # Broken: fails on valid input.
24212continue
24213fi
24214rm -f conftest.err conftest.i conftest.$ac_ext
24215
24216  # OK, works on sane cases.  Now check whether nonexistent headers
24217  # can be detected and how.
24218  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24219/* end confdefs.h.  */
24220#include <ac_nonexistent.h>
24221_ACEOF
24222if ac_fn_c_try_cpp "$LINENO"; then :
24223  # Broken: success on invalid input.
24224continue
24225else
24226  # Passes both tests.
24227ac_preproc_ok=:
24228break
24229fi
24230rm -f conftest.err conftest.i conftest.$ac_ext
24231
24232done
24233# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24234rm -f conftest.i conftest.err conftest.$ac_ext
24235if $ac_preproc_ok; then :
24236
24237else
24238  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
24239$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
24240as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
24241See \`config.log' for more details" "$LINENO" 5; }
24242fi
24243
24244ac_ext=cpp
24245ac_cpp='$CXXCPP $CPPFLAGS'
24246ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24247ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24248ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24249
24250
24251  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24252
24253  # First separate the path from the arguments. This will split at the first
24254  # space.
24255  complete="$CPP"
24256  path="${complete%% *}"
24257  tmp="$complete EOL"
24258  arguments="${tmp#* }"
24259
24260  # Input might be given as Windows format, start by converting to
24261  # unix format.
24262  new_path=`$CYGPATH -u "$path"`
24263
24264  # Now try to locate executable using which
24265  new_path=`$WHICH "$new_path" 2> /dev/null`
24266  # bat and cmd files are not always considered executable in cygwin causing which
24267  # to not find them
24268  if test "x$new_path" = x \
24269           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24270           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24271    new_path=`$CYGPATH -u "$path"`
24272  fi
24273  if test "x$new_path" = x; then
24274    # Oops. Which didn't find the executable.
24275    # The splitting of arguments from the executable at a space might have been incorrect,
24276    # since paths with space are more likely in Windows. Give it another try with the whole
24277    # argument.
24278    path="$complete"
24279    arguments="EOL"
24280    new_path=`$CYGPATH -u "$path"`
24281    new_path=`$WHICH "$new_path" 2> /dev/null`
24282    # bat and cmd files are not always considered executable in cygwin causing which
24283    # to not find them
24284    if test "x$new_path" = x \
24285             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24286             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24287      new_path=`$CYGPATH -u "$path"`
24288    fi
24289    if test "x$new_path" = x; then
24290      # It's still not found. Now this is an unrecoverable error.
24291      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
24292$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
24293      has_space=`$ECHO "$complete" | $GREP " "`
24294      if test "x$has_space" != x; then
24295        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24296$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24297      fi
24298      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24299    fi
24300  fi
24301
24302  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24303  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24304  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24305  # "foo.exe" is OK but "foo" is an error.
24306  #
24307  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24308  # It is also a way to make sure we got the proper file name for the real test later on.
24309  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24310  if test "x$test_shortpath" = x; then
24311    # Short path failed, file does not exist as specified.
24312    # Try adding .exe or .cmd
24313    if test -f "${new_path}.exe"; then
24314       input_to_shortpath="${new_path}.exe"
24315    elif test -f "${new_path}.cmd"; then
24316       input_to_shortpath="${new_path}.cmd"
24317    else
24318      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
24319$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
24320      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24321$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24322      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24323    fi
24324  else
24325    input_to_shortpath="$new_path"
24326  fi
24327
24328  # Call helper function which possibly converts this using DOS-style short mode.
24329  # If so, the updated path is stored in $new_path.
24330  new_path="$input_to_shortpath"
24331
24332  input_path="$input_to_shortpath"
24333  # Check if we need to convert this using DOS-style short mode. If the path
24334  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24335  # take no chances and rewrite it.
24336  # Note: m4 eats our [], so we need to use [ and ] instead.
24337  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24338  if test "x$has_forbidden_chars" != x; then
24339    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24340    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24341    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24342    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24343      # Going to short mode and back again did indeed matter. Since short mode is
24344      # case insensitive, let's make it lowercase to improve readability.
24345      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24346      # Now convert it back to Unix-stile (cygpath)
24347      input_path=`$CYGPATH -u "$shortmode_path"`
24348      new_path="$input_path"
24349    fi
24350  fi
24351
24352  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24353  if test "x$test_cygdrive_prefix" = x; then
24354    # As a simple fix, exclude /usr/bin since it's not a real path.
24355    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24356      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24357      # a path prefixed by /cygdrive for fixpath to work.
24358      new_path="$CYGWIN_ROOT_PATH$input_path"
24359    fi
24360  fi
24361
24362  # remove trailing .exe if any
24363  new_path="${new_path/%.exe/}"
24364
24365  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24366
24367  # First separate the path from the arguments. This will split at the first
24368  # space.
24369  complete="$CPP"
24370  path="${complete%% *}"
24371  tmp="$complete EOL"
24372  arguments="${tmp#* }"
24373
24374  # Input might be given as Windows format, start by converting to
24375  # unix format.
24376  new_path="$path"
24377
24378  windows_path="$new_path"
24379  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24380    unix_path=`$CYGPATH -u "$windows_path"`
24381    new_path="$unix_path"
24382  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24383    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24384    new_path="$unix_path"
24385  fi
24386
24387
24388  # Now try to locate executable using which
24389  new_path=`$WHICH "$new_path" 2> /dev/null`
24390
24391  if test "x$new_path" = x; then
24392    # Oops. Which didn't find the executable.
24393    # The splitting of arguments from the executable at a space might have been incorrect,
24394    # since paths with space are more likely in Windows. Give it another try with the whole
24395    # argument.
24396    path="$complete"
24397    arguments="EOL"
24398    new_path="$path"
24399
24400  windows_path="$new_path"
24401  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24402    unix_path=`$CYGPATH -u "$windows_path"`
24403    new_path="$unix_path"
24404  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24405    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24406    new_path="$unix_path"
24407  fi
24408
24409
24410    new_path=`$WHICH "$new_path" 2> /dev/null`
24411
24412    if test "x$new_path" = x; then
24413      # It's still not found. Now this is an unrecoverable error.
24414      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
24415$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
24416      has_space=`$ECHO "$complete" | $GREP " "`
24417      if test "x$has_space" != x; then
24418        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24419$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24420      fi
24421      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24422    fi
24423  fi
24424
24425  # Now new_path has a complete unix path to the binary
24426  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24427    # Keep paths in /bin as-is, but remove trailing .exe if any
24428    new_path="${new_path/%.exe/}"
24429    # Do not save /bin paths to all_fixpath_prefixes!
24430  else
24431    # Not in mixed or Windows style, start by that.
24432    new_path=`cmd //c echo $new_path`
24433
24434  input_path="$new_path"
24435  # Check if we need to convert this using DOS-style short mode. If the path
24436  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24437  # take no chances and rewrite it.
24438  # Note: m4 eats our [], so we need to use [ and ] instead.
24439  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24440  if test "x$has_forbidden_chars" != x; then
24441    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24442    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24443  fi
24444
24445    # Output is in $new_path
24446
24447  windows_path="$new_path"
24448  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24449    unix_path=`$CYGPATH -u "$windows_path"`
24450    new_path="$unix_path"
24451  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24452    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24453    new_path="$unix_path"
24454  fi
24455
24456    # remove trailing .exe if any
24457    new_path="${new_path/%.exe/}"
24458
24459    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24460    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24461  fi
24462
24463  else
24464    # We're on a posix platform. Hooray! :)
24465    # First separate the path from the arguments. This will split at the first
24466    # space.
24467    complete="$CPP"
24468    path="${complete%% *}"
24469    tmp="$complete EOL"
24470    arguments="${tmp#* }"
24471
24472    # Cannot rely on the command "which" here since it doesn't always work.
24473    is_absolute_path=`$ECHO "$path" | $GREP ^/`
24474    if test -z "$is_absolute_path"; then
24475      # Path to executable is not absolute. Find it.
24476      IFS_save="$IFS"
24477      IFS=:
24478      for p in $PATH; do
24479        if test -f "$p/$path" && test -x "$p/$path"; then
24480          new_path="$p/$path"
24481          break
24482        fi
24483      done
24484      IFS="$IFS_save"
24485    else
24486      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CPP (as $path) failed, using $path directly." >&5
24487$as_echo "$as_me: Resolving CPP (as $path) failed, using $path directly." >&6;}
24488      new_path="$path"
24489    fi
24490
24491    if test "x$new_path" = x; then
24492        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
24493$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
24494        has_space=`$ECHO "$complete" | $GREP " "`
24495        if test "x$has_space" != x; then
24496          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24497$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24498        fi
24499        as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24500      fi
24501  fi
24502
24503      # Now join together the path and the arguments once again
24504      if test "x$arguments" != xEOL; then
24505        new_complete="$new_path ${arguments% *}"
24506      else
24507        new_complete="$new_path"
24508      fi
24509
24510  if test "x$complete" != "x$new_complete"; then
24511      CPP="$new_complete"
24512      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
24513$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
24514    fi
24515
24516
24517ac_ext=cpp
24518ac_cpp='$CXXCPP $CPPFLAGS'
24519ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24520ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24521ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24522{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
24523$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
24524if test -z "$CXXCPP"; then
24525  if ${ac_cv_prog_CXXCPP+:} false; then :
24526  $as_echo_n "(cached) " >&6
24527else
24528      # Double quotes because CXXCPP needs to be expanded
24529    for CXXCPP in "$CXX -E" "/lib/cpp"
24530    do
24531      ac_preproc_ok=false
24532for ac_cxx_preproc_warn_flag in '' yes
24533do
24534  # Use a header file that comes with gcc, so configuring glibc
24535  # with a fresh cross-compiler works.
24536  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24537  # <limits.h> exists even on freestanding compilers.
24538  # On the NeXT, cc -E runs the code through the compiler's parser,
24539  # not just through cpp. "Syntax error" is here to catch this case.
24540  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24541/* end confdefs.h.  */
24542#ifdef __STDC__
24543# include <limits.h>
24544#else
24545# include <assert.h>
24546#endif
24547		     Syntax error
24548_ACEOF
24549if ac_fn_cxx_try_cpp "$LINENO"; then :
24550
24551else
24552  # Broken: fails on valid input.
24553continue
24554fi
24555rm -f conftest.err conftest.i conftest.$ac_ext
24556
24557  # OK, works on sane cases.  Now check whether nonexistent headers
24558  # can be detected and how.
24559  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24560/* end confdefs.h.  */
24561#include <ac_nonexistent.h>
24562_ACEOF
24563if ac_fn_cxx_try_cpp "$LINENO"; then :
24564  # Broken: success on invalid input.
24565continue
24566else
24567  # Passes both tests.
24568ac_preproc_ok=:
24569break
24570fi
24571rm -f conftest.err conftest.i conftest.$ac_ext
24572
24573done
24574# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24575rm -f conftest.i conftest.err conftest.$ac_ext
24576if $ac_preproc_ok; then :
24577  break
24578fi
24579
24580    done
24581    ac_cv_prog_CXXCPP=$CXXCPP
24582
24583fi
24584  CXXCPP=$ac_cv_prog_CXXCPP
24585else
24586  ac_cv_prog_CXXCPP=$CXXCPP
24587fi
24588{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
24589$as_echo "$CXXCPP" >&6; }
24590ac_preproc_ok=false
24591for ac_cxx_preproc_warn_flag in '' yes
24592do
24593  # Use a header file that comes with gcc, so configuring glibc
24594  # with a fresh cross-compiler works.
24595  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24596  # <limits.h> exists even on freestanding compilers.
24597  # On the NeXT, cc -E runs the code through the compiler's parser,
24598  # not just through cpp. "Syntax error" is here to catch this case.
24599  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24600/* end confdefs.h.  */
24601#ifdef __STDC__
24602# include <limits.h>
24603#else
24604# include <assert.h>
24605#endif
24606		     Syntax error
24607_ACEOF
24608if ac_fn_cxx_try_cpp "$LINENO"; then :
24609
24610else
24611  # Broken: fails on valid input.
24612continue
24613fi
24614rm -f conftest.err conftest.i conftest.$ac_ext
24615
24616  # OK, works on sane cases.  Now check whether nonexistent headers
24617  # can be detected and how.
24618  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24619/* end confdefs.h.  */
24620#include <ac_nonexistent.h>
24621_ACEOF
24622if ac_fn_cxx_try_cpp "$LINENO"; then :
24623  # Broken: success on invalid input.
24624continue
24625else
24626  # Passes both tests.
24627ac_preproc_ok=:
24628break
24629fi
24630rm -f conftest.err conftest.i conftest.$ac_ext
24631
24632done
24633# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24634rm -f conftest.i conftest.err conftest.$ac_ext
24635if $ac_preproc_ok; then :
24636
24637else
24638  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
24639$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
24640as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
24641See \`config.log' for more details" "$LINENO" 5; }
24642fi
24643
24644ac_ext=cpp
24645ac_cpp='$CXXCPP $CPPFLAGS'
24646ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24647ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24648ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24649
24650
24651  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24652
24653  # First separate the path from the arguments. This will split at the first
24654  # space.
24655  complete="$CXXCPP"
24656  path="${complete%% *}"
24657  tmp="$complete EOL"
24658  arguments="${tmp#* }"
24659
24660  # Input might be given as Windows format, start by converting to
24661  # unix format.
24662  new_path=`$CYGPATH -u "$path"`
24663
24664  # Now try to locate executable using which
24665  new_path=`$WHICH "$new_path" 2> /dev/null`
24666  # bat and cmd files are not always considered executable in cygwin causing which
24667  # to not find them
24668  if test "x$new_path" = x \
24669           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24670           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24671    new_path=`$CYGPATH -u "$path"`
24672  fi
24673  if test "x$new_path" = x; then
24674    # Oops. Which didn't find the executable.
24675    # The splitting of arguments from the executable at a space might have been incorrect,
24676    # since paths with space are more likely in Windows. Give it another try with the whole
24677    # argument.
24678    path="$complete"
24679    arguments="EOL"
24680    new_path=`$CYGPATH -u "$path"`
24681    new_path=`$WHICH "$new_path" 2> /dev/null`
24682    # bat and cmd files are not always considered executable in cygwin causing which
24683    # to not find them
24684    if test "x$new_path" = x \
24685             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24686             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24687      new_path=`$CYGPATH -u "$path"`
24688    fi
24689    if test "x$new_path" = x; then
24690      # It's still not found. Now this is an unrecoverable error.
24691      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
24692$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
24693      has_space=`$ECHO "$complete" | $GREP " "`
24694      if test "x$has_space" != x; then
24695        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24696$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24697      fi
24698      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
24699    fi
24700  fi
24701
24702  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24703  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24704  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24705  # "foo.exe" is OK but "foo" is an error.
24706  #
24707  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24708  # It is also a way to make sure we got the proper file name for the real test later on.
24709  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24710  if test "x$test_shortpath" = x; then
24711    # Short path failed, file does not exist as specified.
24712    # Try adding .exe or .cmd
24713    if test -f "${new_path}.exe"; then
24714       input_to_shortpath="${new_path}.exe"
24715    elif test -f "${new_path}.cmd"; then
24716       input_to_shortpath="${new_path}.cmd"
24717    else
24718      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
24719$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
24720      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24721$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24722      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
24723    fi
24724  else
24725    input_to_shortpath="$new_path"
24726  fi
24727
24728  # Call helper function which possibly converts this using DOS-style short mode.
24729  # If so, the updated path is stored in $new_path.
24730  new_path="$input_to_shortpath"
24731
24732  input_path="$input_to_shortpath"
24733  # Check if we need to convert this using DOS-style short mode. If the path
24734  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24735  # take no chances and rewrite it.
24736  # Note: m4 eats our [], so we need to use [ and ] instead.
24737  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24738  if test "x$has_forbidden_chars" != x; then
24739    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24740    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24741    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24742    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24743      # Going to short mode and back again did indeed matter. Since short mode is
24744      # case insensitive, let's make it lowercase to improve readability.
24745      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24746      # Now convert it back to Unix-stile (cygpath)
24747      input_path=`$CYGPATH -u "$shortmode_path"`
24748      new_path="$input_path"
24749    fi
24750  fi
24751
24752  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24753  if test "x$test_cygdrive_prefix" = x; then
24754    # As a simple fix, exclude /usr/bin since it's not a real path.
24755    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24756      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24757      # a path prefixed by /cygdrive for fixpath to work.
24758      new_path="$CYGWIN_ROOT_PATH$input_path"
24759    fi
24760  fi
24761
24762  # remove trailing .exe if any
24763  new_path="${new_path/%.exe/}"
24764
24765  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24766
24767  # First separate the path from the arguments. This will split at the first
24768  # space.
24769  complete="$CXXCPP"
24770  path="${complete%% *}"
24771  tmp="$complete EOL"
24772  arguments="${tmp#* }"
24773
24774  # Input might be given as Windows format, start by converting to
24775  # unix format.
24776  new_path="$path"
24777
24778  windows_path="$new_path"
24779  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24780    unix_path=`$CYGPATH -u "$windows_path"`
24781    new_path="$unix_path"
24782  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24783    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24784    new_path="$unix_path"
24785  fi
24786
24787
24788  # Now try to locate executable using which
24789  new_path=`$WHICH "$new_path" 2> /dev/null`
24790
24791  if test "x$new_path" = x; then
24792    # Oops. Which didn't find the executable.
24793    # The splitting of arguments from the executable at a space might have been incorrect,
24794    # since paths with space are more likely in Windows. Give it another try with the whole
24795    # argument.
24796    path="$complete"
24797    arguments="EOL"
24798    new_path="$path"
24799
24800  windows_path="$new_path"
24801  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24802    unix_path=`$CYGPATH -u "$windows_path"`
24803    new_path="$unix_path"
24804  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24805    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24806    new_path="$unix_path"
24807  fi
24808
24809
24810    new_path=`$WHICH "$new_path" 2> /dev/null`
24811
24812    if test "x$new_path" = x; then
24813      # It's still not found. Now this is an unrecoverable error.
24814      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
24815$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
24816      has_space=`$ECHO "$complete" | $GREP " "`
24817      if test "x$has_space" != x; then
24818        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24819$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24820      fi
24821      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
24822    fi
24823  fi
24824
24825  # Now new_path has a complete unix path to the binary
24826  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24827    # Keep paths in /bin as-is, but remove trailing .exe if any
24828    new_path="${new_path/%.exe/}"
24829    # Do not save /bin paths to all_fixpath_prefixes!
24830  else
24831    # Not in mixed or Windows style, start by that.
24832    new_path=`cmd //c echo $new_path`
24833
24834  input_path="$new_path"
24835  # Check if we need to convert this using DOS-style short mode. If the path
24836  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24837  # take no chances and rewrite it.
24838  # Note: m4 eats our [], so we need to use [ and ] instead.
24839  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24840  if test "x$has_forbidden_chars" != x; then
24841    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24842    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24843  fi
24844
24845    # Output is in $new_path
24846
24847  windows_path="$new_path"
24848  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24849    unix_path=`$CYGPATH -u "$windows_path"`
24850    new_path="$unix_path"
24851  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24852    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24853    new_path="$unix_path"
24854  fi
24855
24856    # remove trailing .exe if any
24857    new_path="${new_path/%.exe/}"
24858
24859    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24860    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24861  fi
24862
24863  else
24864    # We're on a posix platform. Hooray! :)
24865    # First separate the path from the arguments. This will split at the first
24866    # space.
24867    complete="$CXXCPP"
24868    path="${complete%% *}"
24869    tmp="$complete EOL"
24870    arguments="${tmp#* }"
24871
24872    # Cannot rely on the command "which" here since it doesn't always work.
24873    is_absolute_path=`$ECHO "$path" | $GREP ^/`
24874    if test -z "$is_absolute_path"; then
24875      # Path to executable is not absolute. Find it.
24876      IFS_save="$IFS"
24877      IFS=:
24878      for p in $PATH; do
24879        if test -f "$p/$path" && test -x "$p/$path"; then
24880          new_path="$p/$path"
24881          break
24882        fi
24883      done
24884      IFS="$IFS_save"
24885    else
24886      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXXCPP (as $path) failed, using $path directly." >&5
24887$as_echo "$as_me: Resolving CXXCPP (as $path) failed, using $path directly." >&6;}
24888      new_path="$path"
24889    fi
24890
24891    if test "x$new_path" = x; then
24892        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
24893$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
24894        has_space=`$ECHO "$complete" | $GREP " "`
24895        if test "x$has_space" != x; then
24896          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24897$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24898        fi
24899        as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
24900      fi
24901  fi
24902
24903      # Now join together the path and the arguments once again
24904      if test "x$arguments" != xEOL; then
24905        new_complete="$new_path ${arguments% *}"
24906      else
24907        new_complete="$new_path"
24908      fi
24909
24910  if test "x$complete" != "x$new_complete"; then
24911      CXXCPP="$new_complete"
24912      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
24913$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
24914    fi
24915
24916
24917if test "x$COMPILE_TYPE" != "xcross"; then
24918    # If we are not cross compiling, use the same compilers for
24919    # building the build platform executables. The cross-compilation
24920    # case needed to be done earlier, but this can only be done after
24921    # the native tools have been localized.
24922    BUILD_CC="$CC"
24923    BUILD_CXX="$CXX"
24924    BUILD_LD="$LD"
24925fi
24926
24927# for solaris we really need solaris tools, and not gnu equivalent
24928#   these seems to normally reside in /usr/ccs/bin so add that to path before
24929#   starting to probe
24930#
24931#   NOTE: I add this /usr/ccs/bin after TOOLS but before OLD_PATH
24932#         so that it can be overriden --with-tools-dir
24933if test "x$OPENJDK_BUILD_OS" = xsolaris; then
24934    PATH="${TOOLS_DIR}:/usr/ccs/bin:${OLD_PATH}"
24935fi
24936
24937# Find the right assembler.
24938if test "x$OPENJDK_TARGET_OS" = xsolaris; then
24939    # Extract the first word of "as", so it can be a program name with args.
24940set dummy as; ac_word=$2
24941{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24942$as_echo_n "checking for $ac_word... " >&6; }
24943if ${ac_cv_path_AS+:} false; then :
24944  $as_echo_n "(cached) " >&6
24945else
24946  case $AS in
24947  [\\/]* | ?:[\\/]*)
24948  ac_cv_path_AS="$AS" # Let the user override the test with a path.
24949  ;;
24950  *)
24951  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24952for as_dir in $PATH
24953do
24954  IFS=$as_save_IFS
24955  test -z "$as_dir" && as_dir=.
24956    for ac_exec_ext in '' $ac_executable_extensions; do
24957  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24958    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
24959    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24960    break 2
24961  fi
24962done
24963  done
24964IFS=$as_save_IFS
24965
24966  ;;
24967esac
24968fi
24969AS=$ac_cv_path_AS
24970if test -n "$AS"; then
24971  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
24972$as_echo "$AS" >&6; }
24973else
24974  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24975$as_echo "no" >&6; }
24976fi
24977
24978
24979
24980  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24981
24982  # First separate the path from the arguments. This will split at the first
24983  # space.
24984  complete="$AS"
24985  path="${complete%% *}"
24986  tmp="$complete EOL"
24987  arguments="${tmp#* }"
24988
24989  # Input might be given as Windows format, start by converting to
24990  # unix format.
24991  new_path=`$CYGPATH -u "$path"`
24992
24993  # Now try to locate executable using which
24994  new_path=`$WHICH "$new_path" 2> /dev/null`
24995  # bat and cmd files are not always considered executable in cygwin causing which
24996  # to not find them
24997  if test "x$new_path" = x \
24998           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24999           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25000    new_path=`$CYGPATH -u "$path"`
25001  fi
25002  if test "x$new_path" = x; then
25003    # Oops. Which didn't find the executable.
25004    # The splitting of arguments from the executable at a space might have been incorrect,
25005    # since paths with space are more likely in Windows. Give it another try with the whole
25006    # argument.
25007    path="$complete"
25008    arguments="EOL"
25009    new_path=`$CYGPATH -u "$path"`
25010    new_path=`$WHICH "$new_path" 2> /dev/null`
25011    # bat and cmd files are not always considered executable in cygwin causing which
25012    # to not find them
25013    if test "x$new_path" = x \
25014             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25015             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25016      new_path=`$CYGPATH -u "$path"`
25017    fi
25018    if test "x$new_path" = x; then
25019      # It's still not found. Now this is an unrecoverable error.
25020      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
25021$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
25022      has_space=`$ECHO "$complete" | $GREP " "`
25023      if test "x$has_space" != x; then
25024        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25025$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25026      fi
25027      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25028    fi
25029  fi
25030
25031  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25032  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25033  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25034  # "foo.exe" is OK but "foo" is an error.
25035  #
25036  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25037  # It is also a way to make sure we got the proper file name for the real test later on.
25038  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25039  if test "x$test_shortpath" = x; then
25040    # Short path failed, file does not exist as specified.
25041    # Try adding .exe or .cmd
25042    if test -f "${new_path}.exe"; then
25043       input_to_shortpath="${new_path}.exe"
25044    elif test -f "${new_path}.cmd"; then
25045       input_to_shortpath="${new_path}.cmd"
25046    else
25047      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
25048$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
25049      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25050$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25051      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25052    fi
25053  else
25054    input_to_shortpath="$new_path"
25055  fi
25056
25057  # Call helper function which possibly converts this using DOS-style short mode.
25058  # If so, the updated path is stored in $new_path.
25059  new_path="$input_to_shortpath"
25060
25061  input_path="$input_to_shortpath"
25062  # Check if we need to convert this using DOS-style short mode. If the path
25063  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25064  # take no chances and rewrite it.
25065  # Note: m4 eats our [], so we need to use [ and ] instead.
25066  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25067  if test "x$has_forbidden_chars" != x; then
25068    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25069    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25070    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25071    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25072      # Going to short mode and back again did indeed matter. Since short mode is
25073      # case insensitive, let's make it lowercase to improve readability.
25074      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25075      # Now convert it back to Unix-stile (cygpath)
25076      input_path=`$CYGPATH -u "$shortmode_path"`
25077      new_path="$input_path"
25078    fi
25079  fi
25080
25081  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25082  if test "x$test_cygdrive_prefix" = x; then
25083    # As a simple fix, exclude /usr/bin since it's not a real path.
25084    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25085      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25086      # a path prefixed by /cygdrive for fixpath to work.
25087      new_path="$CYGWIN_ROOT_PATH$input_path"
25088    fi
25089  fi
25090
25091  # remove trailing .exe if any
25092  new_path="${new_path/%.exe/}"
25093
25094  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25095
25096  # First separate the path from the arguments. This will split at the first
25097  # space.
25098  complete="$AS"
25099  path="${complete%% *}"
25100  tmp="$complete EOL"
25101  arguments="${tmp#* }"
25102
25103  # Input might be given as Windows format, start by converting to
25104  # unix format.
25105  new_path="$path"
25106
25107  windows_path="$new_path"
25108  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25109    unix_path=`$CYGPATH -u "$windows_path"`
25110    new_path="$unix_path"
25111  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25112    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25113    new_path="$unix_path"
25114  fi
25115
25116
25117  # Now try to locate executable using which
25118  new_path=`$WHICH "$new_path" 2> /dev/null`
25119
25120  if test "x$new_path" = x; then
25121    # Oops. Which didn't find the executable.
25122    # The splitting of arguments from the executable at a space might have been incorrect,
25123    # since paths with space are more likely in Windows. Give it another try with the whole
25124    # argument.
25125    path="$complete"
25126    arguments="EOL"
25127    new_path="$path"
25128
25129  windows_path="$new_path"
25130  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25131    unix_path=`$CYGPATH -u "$windows_path"`
25132    new_path="$unix_path"
25133  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25134    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25135    new_path="$unix_path"
25136  fi
25137
25138
25139    new_path=`$WHICH "$new_path" 2> /dev/null`
25140
25141    if test "x$new_path" = x; then
25142      # It's still not found. Now this is an unrecoverable error.
25143      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
25144$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
25145      has_space=`$ECHO "$complete" | $GREP " "`
25146      if test "x$has_space" != x; then
25147        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25148$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25149      fi
25150      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25151    fi
25152  fi
25153
25154  # Now new_path has a complete unix path to the binary
25155  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25156    # Keep paths in /bin as-is, but remove trailing .exe if any
25157    new_path="${new_path/%.exe/}"
25158    # Do not save /bin paths to all_fixpath_prefixes!
25159  else
25160    # Not in mixed or Windows style, start by that.
25161    new_path=`cmd //c echo $new_path`
25162
25163  input_path="$new_path"
25164  # Check if we need to convert this using DOS-style short mode. If the path
25165  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25166  # take no chances and rewrite it.
25167  # Note: m4 eats our [], so we need to use [ and ] instead.
25168  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25169  if test "x$has_forbidden_chars" != x; then
25170    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25171    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25172  fi
25173
25174    # Output is in $new_path
25175
25176  windows_path="$new_path"
25177  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25178    unix_path=`$CYGPATH -u "$windows_path"`
25179    new_path="$unix_path"
25180  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25181    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25182    new_path="$unix_path"
25183  fi
25184
25185    # remove trailing .exe if any
25186    new_path="${new_path/%.exe/}"
25187
25188    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25189    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25190  fi
25191
25192  else
25193    # We're on a posix platform. Hooray! :)
25194    # First separate the path from the arguments. This will split at the first
25195    # space.
25196    complete="$AS"
25197    path="${complete%% *}"
25198    tmp="$complete EOL"
25199    arguments="${tmp#* }"
25200
25201    # Cannot rely on the command "which" here since it doesn't always work.
25202    is_absolute_path=`$ECHO "$path" | $GREP ^/`
25203    if test -z "$is_absolute_path"; then
25204      # Path to executable is not absolute. Find it.
25205      IFS_save="$IFS"
25206      IFS=:
25207      for p in $PATH; do
25208        if test -f "$p/$path" && test -x "$p/$path"; then
25209          new_path="$p/$path"
25210          break
25211        fi
25212      done
25213      IFS="$IFS_save"
25214    else
25215      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AS (as $path) failed, using $path directly." >&5
25216$as_echo "$as_me: Resolving AS (as $path) failed, using $path directly." >&6;}
25217      new_path="$path"
25218    fi
25219
25220    if test "x$new_path" = x; then
25221        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
25222$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
25223        has_space=`$ECHO "$complete" | $GREP " "`
25224        if test "x$has_space" != x; then
25225          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25226$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25227        fi
25228        as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25229      fi
25230  fi
25231
25232      # Now join together the path and the arguments once again
25233      if test "x$arguments" != xEOL; then
25234        new_complete="$new_path ${arguments% *}"
25235      else
25236        new_complete="$new_path"
25237      fi
25238
25239  if test "x$complete" != "x$new_complete"; then
25240      AS="$new_complete"
25241      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
25242$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
25243    fi
25244
25245else
25246    AS="$CC -c"
25247fi
25248
25249
25250if test "x$OPENJDK_TARGET_OS" = xsolaris; then
25251    # Extract the first word of "nm", so it can be a program name with args.
25252set dummy nm; ac_word=$2
25253{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25254$as_echo_n "checking for $ac_word... " >&6; }
25255if ${ac_cv_path_NM+:} false; then :
25256  $as_echo_n "(cached) " >&6
25257else
25258  case $NM in
25259  [\\/]* | ?:[\\/]*)
25260  ac_cv_path_NM="$NM" # Let the user override the test with a path.
25261  ;;
25262  *)
25263  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25264for as_dir in $PATH
25265do
25266  IFS=$as_save_IFS
25267  test -z "$as_dir" && as_dir=.
25268    for ac_exec_ext in '' $ac_executable_extensions; do
25269  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25270    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
25271    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25272    break 2
25273  fi
25274done
25275  done
25276IFS=$as_save_IFS
25277
25278  ;;
25279esac
25280fi
25281NM=$ac_cv_path_NM
25282if test -n "$NM"; then
25283  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
25284$as_echo "$NM" >&6; }
25285else
25286  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25287$as_echo "no" >&6; }
25288fi
25289
25290
25291
25292  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25293
25294  # First separate the path from the arguments. This will split at the first
25295  # space.
25296  complete="$NM"
25297  path="${complete%% *}"
25298  tmp="$complete EOL"
25299  arguments="${tmp#* }"
25300
25301  # Input might be given as Windows format, start by converting to
25302  # unix format.
25303  new_path=`$CYGPATH -u "$path"`
25304
25305  # Now try to locate executable using which
25306  new_path=`$WHICH "$new_path" 2> /dev/null`
25307  # bat and cmd files are not always considered executable in cygwin causing which
25308  # to not find them
25309  if test "x$new_path" = x \
25310           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25311           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25312    new_path=`$CYGPATH -u "$path"`
25313  fi
25314  if test "x$new_path" = x; then
25315    # Oops. Which didn't find the executable.
25316    # The splitting of arguments from the executable at a space might have been incorrect,
25317    # since paths with space are more likely in Windows. Give it another try with the whole
25318    # argument.
25319    path="$complete"
25320    arguments="EOL"
25321    new_path=`$CYGPATH -u "$path"`
25322    new_path=`$WHICH "$new_path" 2> /dev/null`
25323    # bat and cmd files are not always considered executable in cygwin causing which
25324    # to not find them
25325    if test "x$new_path" = x \
25326             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25327             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25328      new_path=`$CYGPATH -u "$path"`
25329    fi
25330    if test "x$new_path" = x; then
25331      # It's still not found. Now this is an unrecoverable error.
25332      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25333$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25334      has_space=`$ECHO "$complete" | $GREP " "`
25335      if test "x$has_space" != x; then
25336        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25337$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25338      fi
25339      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25340    fi
25341  fi
25342
25343  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25344  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25345  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25346  # "foo.exe" is OK but "foo" is an error.
25347  #
25348  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25349  # It is also a way to make sure we got the proper file name for the real test later on.
25350  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25351  if test "x$test_shortpath" = x; then
25352    # Short path failed, file does not exist as specified.
25353    # Try adding .exe or .cmd
25354    if test -f "${new_path}.exe"; then
25355       input_to_shortpath="${new_path}.exe"
25356    elif test -f "${new_path}.cmd"; then
25357       input_to_shortpath="${new_path}.cmd"
25358    else
25359      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
25360$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
25361      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25362$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25363      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25364    fi
25365  else
25366    input_to_shortpath="$new_path"
25367  fi
25368
25369  # Call helper function which possibly converts this using DOS-style short mode.
25370  # If so, the updated path is stored in $new_path.
25371  new_path="$input_to_shortpath"
25372
25373  input_path="$input_to_shortpath"
25374  # Check if we need to convert this using DOS-style short mode. If the path
25375  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25376  # take no chances and rewrite it.
25377  # Note: m4 eats our [], so we need to use [ and ] instead.
25378  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25379  if test "x$has_forbidden_chars" != x; then
25380    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25381    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25382    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25383    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25384      # Going to short mode and back again did indeed matter. Since short mode is
25385      # case insensitive, let's make it lowercase to improve readability.
25386      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25387      # Now convert it back to Unix-stile (cygpath)
25388      input_path=`$CYGPATH -u "$shortmode_path"`
25389      new_path="$input_path"
25390    fi
25391  fi
25392
25393  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25394  if test "x$test_cygdrive_prefix" = x; then
25395    # As a simple fix, exclude /usr/bin since it's not a real path.
25396    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25397      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25398      # a path prefixed by /cygdrive for fixpath to work.
25399      new_path="$CYGWIN_ROOT_PATH$input_path"
25400    fi
25401  fi
25402
25403  # remove trailing .exe if any
25404  new_path="${new_path/%.exe/}"
25405
25406  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25407
25408  # First separate the path from the arguments. This will split at the first
25409  # space.
25410  complete="$NM"
25411  path="${complete%% *}"
25412  tmp="$complete EOL"
25413  arguments="${tmp#* }"
25414
25415  # Input might be given as Windows format, start by converting to
25416  # unix format.
25417  new_path="$path"
25418
25419  windows_path="$new_path"
25420  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25421    unix_path=`$CYGPATH -u "$windows_path"`
25422    new_path="$unix_path"
25423  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25424    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25425    new_path="$unix_path"
25426  fi
25427
25428
25429  # Now try to locate executable using which
25430  new_path=`$WHICH "$new_path" 2> /dev/null`
25431
25432  if test "x$new_path" = x; then
25433    # Oops. Which didn't find the executable.
25434    # The splitting of arguments from the executable at a space might have been incorrect,
25435    # since paths with space are more likely in Windows. Give it another try with the whole
25436    # argument.
25437    path="$complete"
25438    arguments="EOL"
25439    new_path="$path"
25440
25441  windows_path="$new_path"
25442  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25443    unix_path=`$CYGPATH -u "$windows_path"`
25444    new_path="$unix_path"
25445  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25446    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25447    new_path="$unix_path"
25448  fi
25449
25450
25451    new_path=`$WHICH "$new_path" 2> /dev/null`
25452
25453    if test "x$new_path" = x; then
25454      # It's still not found. Now this is an unrecoverable error.
25455      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25456$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25457      has_space=`$ECHO "$complete" | $GREP " "`
25458      if test "x$has_space" != x; then
25459        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25460$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25461      fi
25462      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25463    fi
25464  fi
25465
25466  # Now new_path has a complete unix path to the binary
25467  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25468    # Keep paths in /bin as-is, but remove trailing .exe if any
25469    new_path="${new_path/%.exe/}"
25470    # Do not save /bin paths to all_fixpath_prefixes!
25471  else
25472    # Not in mixed or Windows style, start by that.
25473    new_path=`cmd //c echo $new_path`
25474
25475  input_path="$new_path"
25476  # Check if we need to convert this using DOS-style short mode. If the path
25477  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25478  # take no chances and rewrite it.
25479  # Note: m4 eats our [], so we need to use [ and ] instead.
25480  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25481  if test "x$has_forbidden_chars" != x; then
25482    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25483    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25484  fi
25485
25486    # Output is in $new_path
25487
25488  windows_path="$new_path"
25489  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25490    unix_path=`$CYGPATH -u "$windows_path"`
25491    new_path="$unix_path"
25492  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25493    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25494    new_path="$unix_path"
25495  fi
25496
25497    # remove trailing .exe if any
25498    new_path="${new_path/%.exe/}"
25499
25500    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25501    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25502  fi
25503
25504  else
25505    # We're on a posix platform. Hooray! :)
25506    # First separate the path from the arguments. This will split at the first
25507    # space.
25508    complete="$NM"
25509    path="${complete%% *}"
25510    tmp="$complete EOL"
25511    arguments="${tmp#* }"
25512
25513    # Cannot rely on the command "which" here since it doesn't always work.
25514    is_absolute_path=`$ECHO "$path" | $GREP ^/`
25515    if test -z "$is_absolute_path"; then
25516      # Path to executable is not absolute. Find it.
25517      IFS_save="$IFS"
25518      IFS=:
25519      for p in $PATH; do
25520        if test -f "$p/$path" && test -x "$p/$path"; then
25521          new_path="$p/$path"
25522          break
25523        fi
25524      done
25525      IFS="$IFS_save"
25526    else
25527      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) failed, using $path directly." >&5
25528$as_echo "$as_me: Resolving NM (as $path) failed, using $path directly." >&6;}
25529      new_path="$path"
25530    fi
25531
25532    if test "x$new_path" = x; then
25533        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25534$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25535        has_space=`$ECHO "$complete" | $GREP " "`
25536        if test "x$has_space" != x; then
25537          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25538$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25539        fi
25540        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25541      fi
25542  fi
25543
25544      # Now join together the path and the arguments once again
25545      if test "x$arguments" != xEOL; then
25546        new_complete="$new_path ${arguments% *}"
25547      else
25548        new_complete="$new_path"
25549      fi
25550
25551  if test "x$complete" != "x$new_complete"; then
25552      NM="$new_complete"
25553      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
25554$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
25555    fi
25556
25557    # Extract the first word of "gnm", so it can be a program name with args.
25558set dummy gnm; ac_word=$2
25559{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25560$as_echo_n "checking for $ac_word... " >&6; }
25561if ${ac_cv_path_GNM+:} false; then :
25562  $as_echo_n "(cached) " >&6
25563else
25564  case $GNM in
25565  [\\/]* | ?:[\\/]*)
25566  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
25567  ;;
25568  *)
25569  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25570for as_dir in $PATH
25571do
25572  IFS=$as_save_IFS
25573  test -z "$as_dir" && as_dir=.
25574    for ac_exec_ext in '' $ac_executable_extensions; do
25575  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25576    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
25577    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25578    break 2
25579  fi
25580done
25581  done
25582IFS=$as_save_IFS
25583
25584  ;;
25585esac
25586fi
25587GNM=$ac_cv_path_GNM
25588if test -n "$GNM"; then
25589  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
25590$as_echo "$GNM" >&6; }
25591else
25592  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25593$as_echo "no" >&6; }
25594fi
25595
25596
25597
25598  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25599
25600  # First separate the path from the arguments. This will split at the first
25601  # space.
25602  complete="$GNM"
25603  path="${complete%% *}"
25604  tmp="$complete EOL"
25605  arguments="${tmp#* }"
25606
25607  # Input might be given as Windows format, start by converting to
25608  # unix format.
25609  new_path=`$CYGPATH -u "$path"`
25610
25611  # Now try to locate executable using which
25612  new_path=`$WHICH "$new_path" 2> /dev/null`
25613  # bat and cmd files are not always considered executable in cygwin causing which
25614  # to not find them
25615  if test "x$new_path" = x \
25616           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25617           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25618    new_path=`$CYGPATH -u "$path"`
25619  fi
25620  if test "x$new_path" = x; then
25621    # Oops. Which didn't find the executable.
25622    # The splitting of arguments from the executable at a space might have been incorrect,
25623    # since paths with space are more likely in Windows. Give it another try with the whole
25624    # argument.
25625    path="$complete"
25626    arguments="EOL"
25627    new_path=`$CYGPATH -u "$path"`
25628    new_path=`$WHICH "$new_path" 2> /dev/null`
25629    # bat and cmd files are not always considered executable in cygwin causing which
25630    # to not find them
25631    if test "x$new_path" = x \
25632             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25633             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25634      new_path=`$CYGPATH -u "$path"`
25635    fi
25636    if test "x$new_path" = x; then
25637      # It's still not found. Now this is an unrecoverable error.
25638      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
25639$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
25640      has_space=`$ECHO "$complete" | $GREP " "`
25641      if test "x$has_space" != x; then
25642        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25643$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25644      fi
25645      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
25646    fi
25647  fi
25648
25649  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25650  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25651  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25652  # "foo.exe" is OK but "foo" is an error.
25653  #
25654  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25655  # It is also a way to make sure we got the proper file name for the real test later on.
25656  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25657  if test "x$test_shortpath" = x; then
25658    # Short path failed, file does not exist as specified.
25659    # Try adding .exe or .cmd
25660    if test -f "${new_path}.exe"; then
25661       input_to_shortpath="${new_path}.exe"
25662    elif test -f "${new_path}.cmd"; then
25663       input_to_shortpath="${new_path}.cmd"
25664    else
25665      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
25666$as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
25667      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25668$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25669      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
25670    fi
25671  else
25672    input_to_shortpath="$new_path"
25673  fi
25674
25675  # Call helper function which possibly converts this using DOS-style short mode.
25676  # If so, the updated path is stored in $new_path.
25677  new_path="$input_to_shortpath"
25678
25679  input_path="$input_to_shortpath"
25680  # Check if we need to convert this using DOS-style short mode. If the path
25681  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25682  # take no chances and rewrite it.
25683  # Note: m4 eats our [], so we need to use [ and ] instead.
25684  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25685  if test "x$has_forbidden_chars" != x; then
25686    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25687    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25688    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25689    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25690      # Going to short mode and back again did indeed matter. Since short mode is
25691      # case insensitive, let's make it lowercase to improve readability.
25692      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25693      # Now convert it back to Unix-stile (cygpath)
25694      input_path=`$CYGPATH -u "$shortmode_path"`
25695      new_path="$input_path"
25696    fi
25697  fi
25698
25699  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25700  if test "x$test_cygdrive_prefix" = x; then
25701    # As a simple fix, exclude /usr/bin since it's not a real path.
25702    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25703      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25704      # a path prefixed by /cygdrive for fixpath to work.
25705      new_path="$CYGWIN_ROOT_PATH$input_path"
25706    fi
25707  fi
25708
25709  # remove trailing .exe if any
25710  new_path="${new_path/%.exe/}"
25711
25712  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25713
25714  # First separate the path from the arguments. This will split at the first
25715  # space.
25716  complete="$GNM"
25717  path="${complete%% *}"
25718  tmp="$complete EOL"
25719  arguments="${tmp#* }"
25720
25721  # Input might be given as Windows format, start by converting to
25722  # unix format.
25723  new_path="$path"
25724
25725  windows_path="$new_path"
25726  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25727    unix_path=`$CYGPATH -u "$windows_path"`
25728    new_path="$unix_path"
25729  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25730    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25731    new_path="$unix_path"
25732  fi
25733
25734
25735  # Now try to locate executable using which
25736  new_path=`$WHICH "$new_path" 2> /dev/null`
25737
25738  if test "x$new_path" = x; then
25739    # Oops. Which didn't find the executable.
25740    # The splitting of arguments from the executable at a space might have been incorrect,
25741    # since paths with space are more likely in Windows. Give it another try with the whole
25742    # argument.
25743    path="$complete"
25744    arguments="EOL"
25745    new_path="$path"
25746
25747  windows_path="$new_path"
25748  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25749    unix_path=`$CYGPATH -u "$windows_path"`
25750    new_path="$unix_path"
25751  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25752    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25753    new_path="$unix_path"
25754  fi
25755
25756
25757    new_path=`$WHICH "$new_path" 2> /dev/null`
25758
25759    if test "x$new_path" = x; then
25760      # It's still not found. Now this is an unrecoverable error.
25761      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
25762$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
25763      has_space=`$ECHO "$complete" | $GREP " "`
25764      if test "x$has_space" != x; then
25765        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25766$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25767      fi
25768      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
25769    fi
25770  fi
25771
25772  # Now new_path has a complete unix path to the binary
25773  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25774    # Keep paths in /bin as-is, but remove trailing .exe if any
25775    new_path="${new_path/%.exe/}"
25776    # Do not save /bin paths to all_fixpath_prefixes!
25777  else
25778    # Not in mixed or Windows style, start by that.
25779    new_path=`cmd //c echo $new_path`
25780
25781  input_path="$new_path"
25782  # Check if we need to convert this using DOS-style short mode. If the path
25783  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25784  # take no chances and rewrite it.
25785  # Note: m4 eats our [], so we need to use [ and ] instead.
25786  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25787  if test "x$has_forbidden_chars" != x; then
25788    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25789    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25790  fi
25791
25792    # Output is in $new_path
25793
25794  windows_path="$new_path"
25795  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25796    unix_path=`$CYGPATH -u "$windows_path"`
25797    new_path="$unix_path"
25798  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25799    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25800    new_path="$unix_path"
25801  fi
25802
25803    # remove trailing .exe if any
25804    new_path="${new_path/%.exe/}"
25805
25806    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25807    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25808  fi
25809
25810  else
25811    # We're on a posix platform. Hooray! :)
25812    # First separate the path from the arguments. This will split at the first
25813    # space.
25814    complete="$GNM"
25815    path="${complete%% *}"
25816    tmp="$complete EOL"
25817    arguments="${tmp#* }"
25818
25819    # Cannot rely on the command "which" here since it doesn't always work.
25820    is_absolute_path=`$ECHO "$path" | $GREP ^/`
25821    if test -z "$is_absolute_path"; then
25822      # Path to executable is not absolute. Find it.
25823      IFS_save="$IFS"
25824      IFS=:
25825      for p in $PATH; do
25826        if test -f "$p/$path" && test -x "$p/$path"; then
25827          new_path="$p/$path"
25828          break
25829        fi
25830      done
25831      IFS="$IFS_save"
25832    else
25833      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving GNM (as $path) failed, using $path directly." >&5
25834$as_echo "$as_me: Resolving GNM (as $path) failed, using $path directly." >&6;}
25835      new_path="$path"
25836    fi
25837
25838    if test "x$new_path" = x; then
25839        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
25840$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
25841        has_space=`$ECHO "$complete" | $GREP " "`
25842        if test "x$has_space" != x; then
25843          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25844$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25845        fi
25846        as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
25847      fi
25848  fi
25849
25850      # Now join together the path and the arguments once again
25851      if test "x$arguments" != xEOL; then
25852        new_complete="$new_path ${arguments% *}"
25853      else
25854        new_complete="$new_path"
25855      fi
25856
25857  if test "x$complete" != "x$new_complete"; then
25858      GNM="$new_complete"
25859      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
25860$as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
25861    fi
25862
25863    # Extract the first word of "strip", so it can be a program name with args.
25864set dummy strip; ac_word=$2
25865{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25866$as_echo_n "checking for $ac_word... " >&6; }
25867if ${ac_cv_path_STRIP+:} false; then :
25868  $as_echo_n "(cached) " >&6
25869else
25870  case $STRIP in
25871  [\\/]* | ?:[\\/]*)
25872  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
25873  ;;
25874  *)
25875  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25876for as_dir in $PATH
25877do
25878  IFS=$as_save_IFS
25879  test -z "$as_dir" && as_dir=.
25880    for ac_exec_ext in '' $ac_executable_extensions; do
25881  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25882    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
25883    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25884    break 2
25885  fi
25886done
25887  done
25888IFS=$as_save_IFS
25889
25890  ;;
25891esac
25892fi
25893STRIP=$ac_cv_path_STRIP
25894if test -n "$STRIP"; then
25895  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
25896$as_echo "$STRIP" >&6; }
25897else
25898  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25899$as_echo "no" >&6; }
25900fi
25901
25902
25903
25904  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25905
25906  # First separate the path from the arguments. This will split at the first
25907  # space.
25908  complete="$STRIP"
25909  path="${complete%% *}"
25910  tmp="$complete EOL"
25911  arguments="${tmp#* }"
25912
25913  # Input might be given as Windows format, start by converting to
25914  # unix format.
25915  new_path=`$CYGPATH -u "$path"`
25916
25917  # Now try to locate executable using which
25918  new_path=`$WHICH "$new_path" 2> /dev/null`
25919  # bat and cmd files are not always considered executable in cygwin causing which
25920  # to not find them
25921  if test "x$new_path" = x \
25922           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25923           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25924    new_path=`$CYGPATH -u "$path"`
25925  fi
25926  if test "x$new_path" = x; then
25927    # Oops. Which didn't find the executable.
25928    # The splitting of arguments from the executable at a space might have been incorrect,
25929    # since paths with space are more likely in Windows. Give it another try with the whole
25930    # argument.
25931    path="$complete"
25932    arguments="EOL"
25933    new_path=`$CYGPATH -u "$path"`
25934    new_path=`$WHICH "$new_path" 2> /dev/null`
25935    # bat and cmd files are not always considered executable in cygwin causing which
25936    # to not find them
25937    if test "x$new_path" = x \
25938             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25939             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25940      new_path=`$CYGPATH -u "$path"`
25941    fi
25942    if test "x$new_path" = x; then
25943      # It's still not found. Now this is an unrecoverable error.
25944      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
25945$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
25946      has_space=`$ECHO "$complete" | $GREP " "`
25947      if test "x$has_space" != x; then
25948        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25949$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25950      fi
25951      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
25952    fi
25953  fi
25954
25955  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25956  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25957  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25958  # "foo.exe" is OK but "foo" is an error.
25959  #
25960  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25961  # It is also a way to make sure we got the proper file name for the real test later on.
25962  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25963  if test "x$test_shortpath" = x; then
25964    # Short path failed, file does not exist as specified.
25965    # Try adding .exe or .cmd
25966    if test -f "${new_path}.exe"; then
25967       input_to_shortpath="${new_path}.exe"
25968    elif test -f "${new_path}.cmd"; then
25969       input_to_shortpath="${new_path}.cmd"
25970    else
25971      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
25972$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
25973      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25974$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25975      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
25976    fi
25977  else
25978    input_to_shortpath="$new_path"
25979  fi
25980
25981  # Call helper function which possibly converts this using DOS-style short mode.
25982  # If so, the updated path is stored in $new_path.
25983  new_path="$input_to_shortpath"
25984
25985  input_path="$input_to_shortpath"
25986  # Check if we need to convert this using DOS-style short mode. If the path
25987  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25988  # take no chances and rewrite it.
25989  # Note: m4 eats our [], so we need to use [ and ] instead.
25990  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25991  if test "x$has_forbidden_chars" != x; then
25992    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25993    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25994    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25995    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25996      # Going to short mode and back again did indeed matter. Since short mode is
25997      # case insensitive, let's make it lowercase to improve readability.
25998      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25999      # Now convert it back to Unix-stile (cygpath)
26000      input_path=`$CYGPATH -u "$shortmode_path"`
26001      new_path="$input_path"
26002    fi
26003  fi
26004
26005  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26006  if test "x$test_cygdrive_prefix" = x; then
26007    # As a simple fix, exclude /usr/bin since it's not a real path.
26008    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26009      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26010      # a path prefixed by /cygdrive for fixpath to work.
26011      new_path="$CYGWIN_ROOT_PATH$input_path"
26012    fi
26013  fi
26014
26015  # remove trailing .exe if any
26016  new_path="${new_path/%.exe/}"
26017
26018  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26019
26020  # First separate the path from the arguments. This will split at the first
26021  # space.
26022  complete="$STRIP"
26023  path="${complete%% *}"
26024  tmp="$complete EOL"
26025  arguments="${tmp#* }"
26026
26027  # Input might be given as Windows format, start by converting to
26028  # unix format.
26029  new_path="$path"
26030
26031  windows_path="$new_path"
26032  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26033    unix_path=`$CYGPATH -u "$windows_path"`
26034    new_path="$unix_path"
26035  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26036    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26037    new_path="$unix_path"
26038  fi
26039
26040
26041  # Now try to locate executable using which
26042  new_path=`$WHICH "$new_path" 2> /dev/null`
26043
26044  if test "x$new_path" = x; then
26045    # Oops. Which didn't find the executable.
26046    # The splitting of arguments from the executable at a space might have been incorrect,
26047    # since paths with space are more likely in Windows. Give it another try with the whole
26048    # argument.
26049    path="$complete"
26050    arguments="EOL"
26051    new_path="$path"
26052
26053  windows_path="$new_path"
26054  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26055    unix_path=`$CYGPATH -u "$windows_path"`
26056    new_path="$unix_path"
26057  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26058    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26059    new_path="$unix_path"
26060  fi
26061
26062
26063    new_path=`$WHICH "$new_path" 2> /dev/null`
26064
26065    if test "x$new_path" = x; then
26066      # It's still not found. Now this is an unrecoverable error.
26067      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26068$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26069      has_space=`$ECHO "$complete" | $GREP " "`
26070      if test "x$has_space" != x; then
26071        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26072$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26073      fi
26074      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26075    fi
26076  fi
26077
26078  # Now new_path has a complete unix path to the binary
26079  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26080    # Keep paths in /bin as-is, but remove trailing .exe if any
26081    new_path="${new_path/%.exe/}"
26082    # Do not save /bin paths to all_fixpath_prefixes!
26083  else
26084    # Not in mixed or Windows style, start by that.
26085    new_path=`cmd //c echo $new_path`
26086
26087  input_path="$new_path"
26088  # Check if we need to convert this using DOS-style short mode. If the path
26089  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26090  # take no chances and rewrite it.
26091  # Note: m4 eats our [], so we need to use [ and ] instead.
26092  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26093  if test "x$has_forbidden_chars" != x; then
26094    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26095    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26096  fi
26097
26098    # Output is in $new_path
26099
26100  windows_path="$new_path"
26101  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26102    unix_path=`$CYGPATH -u "$windows_path"`
26103    new_path="$unix_path"
26104  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26105    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26106    new_path="$unix_path"
26107  fi
26108
26109    # remove trailing .exe if any
26110    new_path="${new_path/%.exe/}"
26111
26112    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26113    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26114  fi
26115
26116  else
26117    # We're on a posix platform. Hooray! :)
26118    # First separate the path from the arguments. This will split at the first
26119    # space.
26120    complete="$STRIP"
26121    path="${complete%% *}"
26122    tmp="$complete EOL"
26123    arguments="${tmp#* }"
26124
26125    # Cannot rely on the command "which" here since it doesn't always work.
26126    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26127    if test -z "$is_absolute_path"; then
26128      # Path to executable is not absolute. Find it.
26129      IFS_save="$IFS"
26130      IFS=:
26131      for p in $PATH; do
26132        if test -f "$p/$path" && test -x "$p/$path"; then
26133          new_path="$p/$path"
26134          break
26135        fi
26136      done
26137      IFS="$IFS_save"
26138    else
26139      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) failed, using $path directly." >&5
26140$as_echo "$as_me: Resolving STRIP (as $path) failed, using $path directly." >&6;}
26141      new_path="$path"
26142    fi
26143
26144    if test "x$new_path" = x; then
26145        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26146$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26147        has_space=`$ECHO "$complete" | $GREP " "`
26148        if test "x$has_space" != x; then
26149          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26150$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26151        fi
26152        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26153      fi
26154  fi
26155
26156      # Now join together the path and the arguments once again
26157      if test "x$arguments" != xEOL; then
26158        new_complete="$new_path ${arguments% *}"
26159      else
26160        new_complete="$new_path"
26161      fi
26162
26163  if test "x$complete" != "x$new_complete"; then
26164      STRIP="$new_complete"
26165      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
26166$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
26167    fi
26168
26169    # Extract the first word of "mcs", so it can be a program name with args.
26170set dummy mcs; ac_word=$2
26171{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26172$as_echo_n "checking for $ac_word... " >&6; }
26173if ${ac_cv_path_MCS+:} false; then :
26174  $as_echo_n "(cached) " >&6
26175else
26176  case $MCS in
26177  [\\/]* | ?:[\\/]*)
26178  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
26179  ;;
26180  *)
26181  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26182for as_dir in $PATH
26183do
26184  IFS=$as_save_IFS
26185  test -z "$as_dir" && as_dir=.
26186    for ac_exec_ext in '' $ac_executable_extensions; do
26187  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26188    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
26189    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26190    break 2
26191  fi
26192done
26193  done
26194IFS=$as_save_IFS
26195
26196  ;;
26197esac
26198fi
26199MCS=$ac_cv_path_MCS
26200if test -n "$MCS"; then
26201  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
26202$as_echo "$MCS" >&6; }
26203else
26204  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26205$as_echo "no" >&6; }
26206fi
26207
26208
26209
26210  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26211
26212  # First separate the path from the arguments. This will split at the first
26213  # space.
26214  complete="$MCS"
26215  path="${complete%% *}"
26216  tmp="$complete EOL"
26217  arguments="${tmp#* }"
26218
26219  # Input might be given as Windows format, start by converting to
26220  # unix format.
26221  new_path=`$CYGPATH -u "$path"`
26222
26223  # Now try to locate executable using which
26224  new_path=`$WHICH "$new_path" 2> /dev/null`
26225  # bat and cmd files are not always considered executable in cygwin causing which
26226  # to not find them
26227  if test "x$new_path" = x \
26228           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26229           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26230    new_path=`$CYGPATH -u "$path"`
26231  fi
26232  if test "x$new_path" = x; then
26233    # Oops. Which didn't find the executable.
26234    # The splitting of arguments from the executable at a space might have been incorrect,
26235    # since paths with space are more likely in Windows. Give it another try with the whole
26236    # argument.
26237    path="$complete"
26238    arguments="EOL"
26239    new_path=`$CYGPATH -u "$path"`
26240    new_path=`$WHICH "$new_path" 2> /dev/null`
26241    # bat and cmd files are not always considered executable in cygwin causing which
26242    # to not find them
26243    if test "x$new_path" = x \
26244             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26245             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26246      new_path=`$CYGPATH -u "$path"`
26247    fi
26248    if test "x$new_path" = x; then
26249      # It's still not found. Now this is an unrecoverable error.
26250      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
26251$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
26252      has_space=`$ECHO "$complete" | $GREP " "`
26253      if test "x$has_space" != x; then
26254        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26255$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26256      fi
26257      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
26258    fi
26259  fi
26260
26261  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26262  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26263  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26264  # "foo.exe" is OK but "foo" is an error.
26265  #
26266  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26267  # It is also a way to make sure we got the proper file name for the real test later on.
26268  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26269  if test "x$test_shortpath" = x; then
26270    # Short path failed, file does not exist as specified.
26271    # Try adding .exe or .cmd
26272    if test -f "${new_path}.exe"; then
26273       input_to_shortpath="${new_path}.exe"
26274    elif test -f "${new_path}.cmd"; then
26275       input_to_shortpath="${new_path}.cmd"
26276    else
26277      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$new_path\", is invalid." >&5
26278$as_echo "$as_me: The path of MCS, which resolves as \"$new_path\", is invalid." >&6;}
26279      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26280$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26281      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
26282    fi
26283  else
26284    input_to_shortpath="$new_path"
26285  fi
26286
26287  # Call helper function which possibly converts this using DOS-style short mode.
26288  # If so, the updated path is stored in $new_path.
26289  new_path="$input_to_shortpath"
26290
26291  input_path="$input_to_shortpath"
26292  # Check if we need to convert this using DOS-style short mode. If the path
26293  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26294  # take no chances and rewrite it.
26295  # Note: m4 eats our [], so we need to use [ and ] instead.
26296  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26297  if test "x$has_forbidden_chars" != x; then
26298    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26299    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26300    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26301    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26302      # Going to short mode and back again did indeed matter. Since short mode is
26303      # case insensitive, let's make it lowercase to improve readability.
26304      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26305      # Now convert it back to Unix-stile (cygpath)
26306      input_path=`$CYGPATH -u "$shortmode_path"`
26307      new_path="$input_path"
26308    fi
26309  fi
26310
26311  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26312  if test "x$test_cygdrive_prefix" = x; then
26313    # As a simple fix, exclude /usr/bin since it's not a real path.
26314    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26315      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26316      # a path prefixed by /cygdrive for fixpath to work.
26317      new_path="$CYGWIN_ROOT_PATH$input_path"
26318    fi
26319  fi
26320
26321  # remove trailing .exe if any
26322  new_path="${new_path/%.exe/}"
26323
26324  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26325
26326  # First separate the path from the arguments. This will split at the first
26327  # space.
26328  complete="$MCS"
26329  path="${complete%% *}"
26330  tmp="$complete EOL"
26331  arguments="${tmp#* }"
26332
26333  # Input might be given as Windows format, start by converting to
26334  # unix format.
26335  new_path="$path"
26336
26337  windows_path="$new_path"
26338  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26339    unix_path=`$CYGPATH -u "$windows_path"`
26340    new_path="$unix_path"
26341  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26342    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26343    new_path="$unix_path"
26344  fi
26345
26346
26347  # Now try to locate executable using which
26348  new_path=`$WHICH "$new_path" 2> /dev/null`
26349
26350  if test "x$new_path" = x; then
26351    # Oops. Which didn't find the executable.
26352    # The splitting of arguments from the executable at a space might have been incorrect,
26353    # since paths with space are more likely in Windows. Give it another try with the whole
26354    # argument.
26355    path="$complete"
26356    arguments="EOL"
26357    new_path="$path"
26358
26359  windows_path="$new_path"
26360  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26361    unix_path=`$CYGPATH -u "$windows_path"`
26362    new_path="$unix_path"
26363  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26364    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26365    new_path="$unix_path"
26366  fi
26367
26368
26369    new_path=`$WHICH "$new_path" 2> /dev/null`
26370
26371    if test "x$new_path" = x; then
26372      # It's still not found. Now this is an unrecoverable error.
26373      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
26374$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
26375      has_space=`$ECHO "$complete" | $GREP " "`
26376      if test "x$has_space" != x; then
26377        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26378$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26379      fi
26380      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
26381    fi
26382  fi
26383
26384  # Now new_path has a complete unix path to the binary
26385  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26386    # Keep paths in /bin as-is, but remove trailing .exe if any
26387    new_path="${new_path/%.exe/}"
26388    # Do not save /bin paths to all_fixpath_prefixes!
26389  else
26390    # Not in mixed or Windows style, start by that.
26391    new_path=`cmd //c echo $new_path`
26392
26393  input_path="$new_path"
26394  # Check if we need to convert this using DOS-style short mode. If the path
26395  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26396  # take no chances and rewrite it.
26397  # Note: m4 eats our [], so we need to use [ and ] instead.
26398  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26399  if test "x$has_forbidden_chars" != x; then
26400    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26401    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26402  fi
26403
26404    # Output is in $new_path
26405
26406  windows_path="$new_path"
26407  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26408    unix_path=`$CYGPATH -u "$windows_path"`
26409    new_path="$unix_path"
26410  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26411    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26412    new_path="$unix_path"
26413  fi
26414
26415    # remove trailing .exe if any
26416    new_path="${new_path/%.exe/}"
26417
26418    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26419    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26420  fi
26421
26422  else
26423    # We're on a posix platform. Hooray! :)
26424    # First separate the path from the arguments. This will split at the first
26425    # space.
26426    complete="$MCS"
26427    path="${complete%% *}"
26428    tmp="$complete EOL"
26429    arguments="${tmp#* }"
26430
26431    # Cannot rely on the command "which" here since it doesn't always work.
26432    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26433    if test -z "$is_absolute_path"; then
26434      # Path to executable is not absolute. Find it.
26435      IFS_save="$IFS"
26436      IFS=:
26437      for p in $PATH; do
26438        if test -f "$p/$path" && test -x "$p/$path"; then
26439          new_path="$p/$path"
26440          break
26441        fi
26442      done
26443      IFS="$IFS_save"
26444    else
26445      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MCS (as $path) failed, using $path directly." >&5
26446$as_echo "$as_me: Resolving MCS (as $path) failed, using $path directly." >&6;}
26447      new_path="$path"
26448    fi
26449
26450    if test "x$new_path" = x; then
26451        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
26452$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
26453        has_space=`$ECHO "$complete" | $GREP " "`
26454        if test "x$has_space" != x; then
26455          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26456$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26457        fi
26458        as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
26459      fi
26460  fi
26461
26462      # Now join together the path and the arguments once again
26463      if test "x$arguments" != xEOL; then
26464        new_complete="$new_path ${arguments% *}"
26465      else
26466        new_complete="$new_path"
26467      fi
26468
26469  if test "x$complete" != "x$new_complete"; then
26470      MCS="$new_complete"
26471      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MCS to \"$new_complete\"" >&5
26472$as_echo "$as_me: Rewriting MCS to \"$new_complete\"" >&6;}
26473    fi
26474
26475elif test "x$OPENJDK_TARGET_OS" != xwindows; then
26476    if test -n "$ac_tool_prefix"; then
26477  # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
26478set dummy ${ac_tool_prefix}nm; ac_word=$2
26479{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26480$as_echo_n "checking for $ac_word... " >&6; }
26481if ${ac_cv_prog_NM+:} false; then :
26482  $as_echo_n "(cached) " >&6
26483else
26484  if test -n "$NM"; then
26485  ac_cv_prog_NM="$NM" # Let the user override the test.
26486else
26487as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26488for as_dir in $PATH
26489do
26490  IFS=$as_save_IFS
26491  test -z "$as_dir" && as_dir=.
26492    for ac_exec_ext in '' $ac_executable_extensions; do
26493  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26494    ac_cv_prog_NM="${ac_tool_prefix}nm"
26495    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26496    break 2
26497  fi
26498done
26499  done
26500IFS=$as_save_IFS
26501
26502fi
26503fi
26504NM=$ac_cv_prog_NM
26505if test -n "$NM"; then
26506  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
26507$as_echo "$NM" >&6; }
26508else
26509  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26510$as_echo "no" >&6; }
26511fi
26512
26513
26514fi
26515if test -z "$ac_cv_prog_NM"; then
26516  ac_ct_NM=$NM
26517  # Extract the first word of "nm", so it can be a program name with args.
26518set dummy nm; ac_word=$2
26519{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26520$as_echo_n "checking for $ac_word... " >&6; }
26521if ${ac_cv_prog_ac_ct_NM+:} false; then :
26522  $as_echo_n "(cached) " >&6
26523else
26524  if test -n "$ac_ct_NM"; then
26525  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
26526else
26527as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26528for as_dir in $PATH
26529do
26530  IFS=$as_save_IFS
26531  test -z "$as_dir" && as_dir=.
26532    for ac_exec_ext in '' $ac_executable_extensions; do
26533  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26534    ac_cv_prog_ac_ct_NM="nm"
26535    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26536    break 2
26537  fi
26538done
26539  done
26540IFS=$as_save_IFS
26541
26542fi
26543fi
26544ac_ct_NM=$ac_cv_prog_ac_ct_NM
26545if test -n "$ac_ct_NM"; then
26546  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
26547$as_echo "$ac_ct_NM" >&6; }
26548else
26549  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26550$as_echo "no" >&6; }
26551fi
26552
26553  if test "x$ac_ct_NM" = x; then
26554    NM=""
26555  else
26556    case $cross_compiling:$ac_tool_warned in
26557yes:)
26558{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
26559$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
26560ac_tool_warned=yes ;;
26561esac
26562    NM=$ac_ct_NM
26563  fi
26564else
26565  NM="$ac_cv_prog_NM"
26566fi
26567
26568
26569  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26570
26571  # First separate the path from the arguments. This will split at the first
26572  # space.
26573  complete="$NM"
26574  path="${complete%% *}"
26575  tmp="$complete EOL"
26576  arguments="${tmp#* }"
26577
26578  # Input might be given as Windows format, start by converting to
26579  # unix format.
26580  new_path=`$CYGPATH -u "$path"`
26581
26582  # Now try to locate executable using which
26583  new_path=`$WHICH "$new_path" 2> /dev/null`
26584  # bat and cmd files are not always considered executable in cygwin causing which
26585  # to not find them
26586  if test "x$new_path" = x \
26587           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26588           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26589    new_path=`$CYGPATH -u "$path"`
26590  fi
26591  if test "x$new_path" = x; then
26592    # Oops. Which didn't find the executable.
26593    # The splitting of arguments from the executable at a space might have been incorrect,
26594    # since paths with space are more likely in Windows. Give it another try with the whole
26595    # argument.
26596    path="$complete"
26597    arguments="EOL"
26598    new_path=`$CYGPATH -u "$path"`
26599    new_path=`$WHICH "$new_path" 2> /dev/null`
26600    # bat and cmd files are not always considered executable in cygwin causing which
26601    # to not find them
26602    if test "x$new_path" = x \
26603             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26604             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26605      new_path=`$CYGPATH -u "$path"`
26606    fi
26607    if test "x$new_path" = x; then
26608      # It's still not found. Now this is an unrecoverable error.
26609      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
26610$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
26611      has_space=`$ECHO "$complete" | $GREP " "`
26612      if test "x$has_space" != x; then
26613        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26614$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26615      fi
26616      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
26617    fi
26618  fi
26619
26620  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26621  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26622  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26623  # "foo.exe" is OK but "foo" is an error.
26624  #
26625  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26626  # It is also a way to make sure we got the proper file name for the real test later on.
26627  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26628  if test "x$test_shortpath" = x; then
26629    # Short path failed, file does not exist as specified.
26630    # Try adding .exe or .cmd
26631    if test -f "${new_path}.exe"; then
26632       input_to_shortpath="${new_path}.exe"
26633    elif test -f "${new_path}.cmd"; then
26634       input_to_shortpath="${new_path}.cmd"
26635    else
26636      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
26637$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
26638      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26639$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26640      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
26641    fi
26642  else
26643    input_to_shortpath="$new_path"
26644  fi
26645
26646  # Call helper function which possibly converts this using DOS-style short mode.
26647  # If so, the updated path is stored in $new_path.
26648  new_path="$input_to_shortpath"
26649
26650  input_path="$input_to_shortpath"
26651  # Check if we need to convert this using DOS-style short mode. If the path
26652  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26653  # take no chances and rewrite it.
26654  # Note: m4 eats our [], so we need to use [ and ] instead.
26655  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26656  if test "x$has_forbidden_chars" != x; then
26657    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26658    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26659    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26660    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26661      # Going to short mode and back again did indeed matter. Since short mode is
26662      # case insensitive, let's make it lowercase to improve readability.
26663      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26664      # Now convert it back to Unix-stile (cygpath)
26665      input_path=`$CYGPATH -u "$shortmode_path"`
26666      new_path="$input_path"
26667    fi
26668  fi
26669
26670  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26671  if test "x$test_cygdrive_prefix" = x; then
26672    # As a simple fix, exclude /usr/bin since it's not a real path.
26673    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26674      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26675      # a path prefixed by /cygdrive for fixpath to work.
26676      new_path="$CYGWIN_ROOT_PATH$input_path"
26677    fi
26678  fi
26679
26680  # remove trailing .exe if any
26681  new_path="${new_path/%.exe/}"
26682
26683  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26684
26685  # First separate the path from the arguments. This will split at the first
26686  # space.
26687  complete="$NM"
26688  path="${complete%% *}"
26689  tmp="$complete EOL"
26690  arguments="${tmp#* }"
26691
26692  # Input might be given as Windows format, start by converting to
26693  # unix format.
26694  new_path="$path"
26695
26696  windows_path="$new_path"
26697  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26698    unix_path=`$CYGPATH -u "$windows_path"`
26699    new_path="$unix_path"
26700  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26701    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26702    new_path="$unix_path"
26703  fi
26704
26705
26706  # Now try to locate executable using which
26707  new_path=`$WHICH "$new_path" 2> /dev/null`
26708
26709  if test "x$new_path" = x; then
26710    # Oops. Which didn't find the executable.
26711    # The splitting of arguments from the executable at a space might have been incorrect,
26712    # since paths with space are more likely in Windows. Give it another try with the whole
26713    # argument.
26714    path="$complete"
26715    arguments="EOL"
26716    new_path="$path"
26717
26718  windows_path="$new_path"
26719  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26720    unix_path=`$CYGPATH -u "$windows_path"`
26721    new_path="$unix_path"
26722  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26723    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26724    new_path="$unix_path"
26725  fi
26726
26727
26728    new_path=`$WHICH "$new_path" 2> /dev/null`
26729
26730    if test "x$new_path" = x; then
26731      # It's still not found. Now this is an unrecoverable error.
26732      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
26733$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
26734      has_space=`$ECHO "$complete" | $GREP " "`
26735      if test "x$has_space" != x; then
26736        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26737$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26738      fi
26739      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
26740    fi
26741  fi
26742
26743  # Now new_path has a complete unix path to the binary
26744  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26745    # Keep paths in /bin as-is, but remove trailing .exe if any
26746    new_path="${new_path/%.exe/}"
26747    # Do not save /bin paths to all_fixpath_prefixes!
26748  else
26749    # Not in mixed or Windows style, start by that.
26750    new_path=`cmd //c echo $new_path`
26751
26752  input_path="$new_path"
26753  # Check if we need to convert this using DOS-style short mode. If the path
26754  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26755  # take no chances and rewrite it.
26756  # Note: m4 eats our [], so we need to use [ and ] instead.
26757  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26758  if test "x$has_forbidden_chars" != x; then
26759    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26760    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26761  fi
26762
26763    # Output is in $new_path
26764
26765  windows_path="$new_path"
26766  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26767    unix_path=`$CYGPATH -u "$windows_path"`
26768    new_path="$unix_path"
26769  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26770    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26771    new_path="$unix_path"
26772  fi
26773
26774    # remove trailing .exe if any
26775    new_path="${new_path/%.exe/}"
26776
26777    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26778    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26779  fi
26780
26781  else
26782    # We're on a posix platform. Hooray! :)
26783    # First separate the path from the arguments. This will split at the first
26784    # space.
26785    complete="$NM"
26786    path="${complete%% *}"
26787    tmp="$complete EOL"
26788    arguments="${tmp#* }"
26789
26790    # Cannot rely on the command "which" here since it doesn't always work.
26791    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26792    if test -z "$is_absolute_path"; then
26793      # Path to executable is not absolute. Find it.
26794      IFS_save="$IFS"
26795      IFS=:
26796      for p in $PATH; do
26797        if test -f "$p/$path" && test -x "$p/$path"; then
26798          new_path="$p/$path"
26799          break
26800        fi
26801      done
26802      IFS="$IFS_save"
26803    else
26804      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) failed, using $path directly." >&5
26805$as_echo "$as_me: Resolving NM (as $path) failed, using $path directly." >&6;}
26806      new_path="$path"
26807    fi
26808
26809    if test "x$new_path" = x; then
26810        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
26811$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
26812        has_space=`$ECHO "$complete" | $GREP " "`
26813        if test "x$has_space" != x; then
26814          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26815$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26816        fi
26817        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
26818      fi
26819  fi
26820
26821      # Now join together the path and the arguments once again
26822      if test "x$arguments" != xEOL; then
26823        new_complete="$new_path ${arguments% *}"
26824      else
26825        new_complete="$new_path"
26826      fi
26827
26828  if test "x$complete" != "x$new_complete"; then
26829      NM="$new_complete"
26830      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
26831$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
26832    fi
26833
26834    GNM="$NM"
26835
26836    if test -n "$ac_tool_prefix"; then
26837  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
26838set dummy ${ac_tool_prefix}strip; ac_word=$2
26839{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26840$as_echo_n "checking for $ac_word... " >&6; }
26841if ${ac_cv_prog_STRIP+:} false; then :
26842  $as_echo_n "(cached) " >&6
26843else
26844  if test -n "$STRIP"; then
26845  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
26846else
26847as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26848for as_dir in $PATH
26849do
26850  IFS=$as_save_IFS
26851  test -z "$as_dir" && as_dir=.
26852    for ac_exec_ext in '' $ac_executable_extensions; do
26853  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26854    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
26855    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26856    break 2
26857  fi
26858done
26859  done
26860IFS=$as_save_IFS
26861
26862fi
26863fi
26864STRIP=$ac_cv_prog_STRIP
26865if test -n "$STRIP"; then
26866  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
26867$as_echo "$STRIP" >&6; }
26868else
26869  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26870$as_echo "no" >&6; }
26871fi
26872
26873
26874fi
26875if test -z "$ac_cv_prog_STRIP"; then
26876  ac_ct_STRIP=$STRIP
26877  # Extract the first word of "strip", so it can be a program name with args.
26878set dummy strip; ac_word=$2
26879{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26880$as_echo_n "checking for $ac_word... " >&6; }
26881if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
26882  $as_echo_n "(cached) " >&6
26883else
26884  if test -n "$ac_ct_STRIP"; then
26885  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
26886else
26887as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26888for as_dir in $PATH
26889do
26890  IFS=$as_save_IFS
26891  test -z "$as_dir" && as_dir=.
26892    for ac_exec_ext in '' $ac_executable_extensions; do
26893  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26894    ac_cv_prog_ac_ct_STRIP="strip"
26895    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26896    break 2
26897  fi
26898done
26899  done
26900IFS=$as_save_IFS
26901
26902fi
26903fi
26904ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
26905if test -n "$ac_ct_STRIP"; then
26906  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
26907$as_echo "$ac_ct_STRIP" >&6; }
26908else
26909  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26910$as_echo "no" >&6; }
26911fi
26912
26913  if test "x$ac_ct_STRIP" = x; then
26914    STRIP=""
26915  else
26916    case $cross_compiling:$ac_tool_warned in
26917yes:)
26918{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
26919$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
26920ac_tool_warned=yes ;;
26921esac
26922    STRIP=$ac_ct_STRIP
26923  fi
26924else
26925  STRIP="$ac_cv_prog_STRIP"
26926fi
26927
26928
26929  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26930
26931  # First separate the path from the arguments. This will split at the first
26932  # space.
26933  complete="$STRIP"
26934  path="${complete%% *}"
26935  tmp="$complete EOL"
26936  arguments="${tmp#* }"
26937
26938  # Input might be given as Windows format, start by converting to
26939  # unix format.
26940  new_path=`$CYGPATH -u "$path"`
26941
26942  # Now try to locate executable using which
26943  new_path=`$WHICH "$new_path" 2> /dev/null`
26944  # bat and cmd files are not always considered executable in cygwin causing which
26945  # to not find them
26946  if test "x$new_path" = x \
26947           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26948           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26949    new_path=`$CYGPATH -u "$path"`
26950  fi
26951  if test "x$new_path" = x; then
26952    # Oops. Which didn't find the executable.
26953    # The splitting of arguments from the executable at a space might have been incorrect,
26954    # since paths with space are more likely in Windows. Give it another try with the whole
26955    # argument.
26956    path="$complete"
26957    arguments="EOL"
26958    new_path=`$CYGPATH -u "$path"`
26959    new_path=`$WHICH "$new_path" 2> /dev/null`
26960    # bat and cmd files are not always considered executable in cygwin causing which
26961    # to not find them
26962    if test "x$new_path" = x \
26963             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26964             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26965      new_path=`$CYGPATH -u "$path"`
26966    fi
26967    if test "x$new_path" = x; then
26968      # It's still not found. Now this is an unrecoverable error.
26969      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26970$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26971      has_space=`$ECHO "$complete" | $GREP " "`
26972      if test "x$has_space" != x; then
26973        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26974$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26975      fi
26976      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26977    fi
26978  fi
26979
26980  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26981  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26982  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26983  # "foo.exe" is OK but "foo" is an error.
26984  #
26985  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26986  # It is also a way to make sure we got the proper file name for the real test later on.
26987  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26988  if test "x$test_shortpath" = x; then
26989    # Short path failed, file does not exist as specified.
26990    # Try adding .exe or .cmd
26991    if test -f "${new_path}.exe"; then
26992       input_to_shortpath="${new_path}.exe"
26993    elif test -f "${new_path}.cmd"; then
26994       input_to_shortpath="${new_path}.cmd"
26995    else
26996      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
26997$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
26998      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26999$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27000      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
27001    fi
27002  else
27003    input_to_shortpath="$new_path"
27004  fi
27005
27006  # Call helper function which possibly converts this using DOS-style short mode.
27007  # If so, the updated path is stored in $new_path.
27008  new_path="$input_to_shortpath"
27009
27010  input_path="$input_to_shortpath"
27011  # Check if we need to convert this using DOS-style short mode. If the path
27012  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27013  # take no chances and rewrite it.
27014  # Note: m4 eats our [], so we need to use [ and ] instead.
27015  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27016  if test "x$has_forbidden_chars" != x; then
27017    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27018    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27019    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27020    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27021      # Going to short mode and back again did indeed matter. Since short mode is
27022      # case insensitive, let's make it lowercase to improve readability.
27023      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27024      # Now convert it back to Unix-stile (cygpath)
27025      input_path=`$CYGPATH -u "$shortmode_path"`
27026      new_path="$input_path"
27027    fi
27028  fi
27029
27030  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27031  if test "x$test_cygdrive_prefix" = x; then
27032    # As a simple fix, exclude /usr/bin since it's not a real path.
27033    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27034      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27035      # a path prefixed by /cygdrive for fixpath to work.
27036      new_path="$CYGWIN_ROOT_PATH$input_path"
27037    fi
27038  fi
27039
27040  # remove trailing .exe if any
27041  new_path="${new_path/%.exe/}"
27042
27043  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27044
27045  # First separate the path from the arguments. This will split at the first
27046  # space.
27047  complete="$STRIP"
27048  path="${complete%% *}"
27049  tmp="$complete EOL"
27050  arguments="${tmp#* }"
27051
27052  # Input might be given as Windows format, start by converting to
27053  # unix format.
27054  new_path="$path"
27055
27056  windows_path="$new_path"
27057  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27058    unix_path=`$CYGPATH -u "$windows_path"`
27059    new_path="$unix_path"
27060  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27061    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27062    new_path="$unix_path"
27063  fi
27064
27065
27066  # Now try to locate executable using which
27067  new_path=`$WHICH "$new_path" 2> /dev/null`
27068
27069  if test "x$new_path" = x; then
27070    # Oops. Which didn't find the executable.
27071    # The splitting of arguments from the executable at a space might have been incorrect,
27072    # since paths with space are more likely in Windows. Give it another try with the whole
27073    # argument.
27074    path="$complete"
27075    arguments="EOL"
27076    new_path="$path"
27077
27078  windows_path="$new_path"
27079  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27080    unix_path=`$CYGPATH -u "$windows_path"`
27081    new_path="$unix_path"
27082  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27083    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27084    new_path="$unix_path"
27085  fi
27086
27087
27088    new_path=`$WHICH "$new_path" 2> /dev/null`
27089
27090    if test "x$new_path" = x; then
27091      # It's still not found. Now this is an unrecoverable error.
27092      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
27093$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
27094      has_space=`$ECHO "$complete" | $GREP " "`
27095      if test "x$has_space" != x; then
27096        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27097$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27098      fi
27099      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
27100    fi
27101  fi
27102
27103  # Now new_path has a complete unix path to the binary
27104  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27105    # Keep paths in /bin as-is, but remove trailing .exe if any
27106    new_path="${new_path/%.exe/}"
27107    # Do not save /bin paths to all_fixpath_prefixes!
27108  else
27109    # Not in mixed or Windows style, start by that.
27110    new_path=`cmd //c echo $new_path`
27111
27112  input_path="$new_path"
27113  # Check if we need to convert this using DOS-style short mode. If the path
27114  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27115  # take no chances and rewrite it.
27116  # Note: m4 eats our [], so we need to use [ and ] instead.
27117  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27118  if test "x$has_forbidden_chars" != x; then
27119    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27120    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27121  fi
27122
27123    # Output is in $new_path
27124
27125  windows_path="$new_path"
27126  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27127    unix_path=`$CYGPATH -u "$windows_path"`
27128    new_path="$unix_path"
27129  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27130    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27131    new_path="$unix_path"
27132  fi
27133
27134    # remove trailing .exe if any
27135    new_path="${new_path/%.exe/}"
27136
27137    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27138    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27139  fi
27140
27141  else
27142    # We're on a posix platform. Hooray! :)
27143    # First separate the path from the arguments. This will split at the first
27144    # space.
27145    complete="$STRIP"
27146    path="${complete%% *}"
27147    tmp="$complete EOL"
27148    arguments="${tmp#* }"
27149
27150    # Cannot rely on the command "which" here since it doesn't always work.
27151    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27152    if test -z "$is_absolute_path"; then
27153      # Path to executable is not absolute. Find it.
27154      IFS_save="$IFS"
27155      IFS=:
27156      for p in $PATH; do
27157        if test -f "$p/$path" && test -x "$p/$path"; then
27158          new_path="$p/$path"
27159          break
27160        fi
27161      done
27162      IFS="$IFS_save"
27163    else
27164      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) failed, using $path directly." >&5
27165$as_echo "$as_me: Resolving STRIP (as $path) failed, using $path directly." >&6;}
27166      new_path="$path"
27167    fi
27168
27169    if test "x$new_path" = x; then
27170        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
27171$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
27172        has_space=`$ECHO "$complete" | $GREP " "`
27173        if test "x$has_space" != x; then
27174          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27175$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27176        fi
27177        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
27178      fi
27179  fi
27180
27181      # Now join together the path and the arguments once again
27182      if test "x$arguments" != xEOL; then
27183        new_complete="$new_path ${arguments% *}"
27184      else
27185        new_complete="$new_path"
27186      fi
27187
27188  if test "x$complete" != "x$new_complete"; then
27189      STRIP="$new_complete"
27190      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
27191$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
27192    fi
27193
27194fi
27195
27196# objcopy is used for moving debug symbols to separate files when
27197# full debug symbols are enabled.
27198if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
27199    if test -n "$ac_tool_prefix"; then
27200  for ac_prog in gobjcopy objcopy
27201  do
27202    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
27203set dummy $ac_tool_prefix$ac_prog; ac_word=$2
27204{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27205$as_echo_n "checking for $ac_word... " >&6; }
27206if ${ac_cv_prog_OBJCOPY+:} false; then :
27207  $as_echo_n "(cached) " >&6
27208else
27209  if test -n "$OBJCOPY"; then
27210  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
27211else
27212as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27213for as_dir in $PATH
27214do
27215  IFS=$as_save_IFS
27216  test -z "$as_dir" && as_dir=.
27217    for ac_exec_ext in '' $ac_executable_extensions; do
27218  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27219    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
27220    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27221    break 2
27222  fi
27223done
27224  done
27225IFS=$as_save_IFS
27226
27227fi
27228fi
27229OBJCOPY=$ac_cv_prog_OBJCOPY
27230if test -n "$OBJCOPY"; then
27231  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
27232$as_echo "$OBJCOPY" >&6; }
27233else
27234  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27235$as_echo "no" >&6; }
27236fi
27237
27238
27239    test -n "$OBJCOPY" && break
27240  done
27241fi
27242if test -z "$OBJCOPY"; then
27243  ac_ct_OBJCOPY=$OBJCOPY
27244  for ac_prog in gobjcopy objcopy
27245do
27246  # Extract the first word of "$ac_prog", so it can be a program name with args.
27247set dummy $ac_prog; ac_word=$2
27248{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27249$as_echo_n "checking for $ac_word... " >&6; }
27250if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
27251  $as_echo_n "(cached) " >&6
27252else
27253  if test -n "$ac_ct_OBJCOPY"; then
27254  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
27255else
27256as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27257for as_dir in $PATH
27258do
27259  IFS=$as_save_IFS
27260  test -z "$as_dir" && as_dir=.
27261    for ac_exec_ext in '' $ac_executable_extensions; do
27262  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27263    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
27264    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27265    break 2
27266  fi
27267done
27268  done
27269IFS=$as_save_IFS
27270
27271fi
27272fi
27273ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
27274if test -n "$ac_ct_OBJCOPY"; then
27275  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
27276$as_echo "$ac_ct_OBJCOPY" >&6; }
27277else
27278  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27279$as_echo "no" >&6; }
27280fi
27281
27282
27283  test -n "$ac_ct_OBJCOPY" && break
27284done
27285
27286  if test "x$ac_ct_OBJCOPY" = x; then
27287    OBJCOPY=""
27288  else
27289    case $cross_compiling:$ac_tool_warned in
27290yes:)
27291{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
27292$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
27293ac_tool_warned=yes ;;
27294esac
27295    OBJCOPY=$ac_ct_OBJCOPY
27296  fi
27297fi
27298
27299    # Only call fixup if objcopy was found.
27300    if test -n "$OBJCOPY"; then
27301
27302  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27303
27304  # First separate the path from the arguments. This will split at the first
27305  # space.
27306  complete="$OBJCOPY"
27307  path="${complete%% *}"
27308  tmp="$complete EOL"
27309  arguments="${tmp#* }"
27310
27311  # Input might be given as Windows format, start by converting to
27312  # unix format.
27313  new_path=`$CYGPATH -u "$path"`
27314
27315  # Now try to locate executable using which
27316  new_path=`$WHICH "$new_path" 2> /dev/null`
27317  # bat and cmd files are not always considered executable in cygwin causing which
27318  # to not find them
27319  if test "x$new_path" = x \
27320           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27321           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27322    new_path=`$CYGPATH -u "$path"`
27323  fi
27324  if test "x$new_path" = x; then
27325    # Oops. Which didn't find the executable.
27326    # The splitting of arguments from the executable at a space might have been incorrect,
27327    # since paths with space are more likely in Windows. Give it another try with the whole
27328    # argument.
27329    path="$complete"
27330    arguments="EOL"
27331    new_path=`$CYGPATH -u "$path"`
27332    new_path=`$WHICH "$new_path" 2> /dev/null`
27333    # bat and cmd files are not always considered executable in cygwin causing which
27334    # to not find them
27335    if test "x$new_path" = x \
27336             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27337             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27338      new_path=`$CYGPATH -u "$path"`
27339    fi
27340    if test "x$new_path" = x; then
27341      # It's still not found. Now this is an unrecoverable error.
27342      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
27343$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
27344      has_space=`$ECHO "$complete" | $GREP " "`
27345      if test "x$has_space" != x; then
27346        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27347$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27348      fi
27349      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
27350    fi
27351  fi
27352
27353  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27354  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27355  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27356  # "foo.exe" is OK but "foo" is an error.
27357  #
27358  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27359  # It is also a way to make sure we got the proper file name for the real test later on.
27360  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27361  if test "x$test_shortpath" = x; then
27362    # Short path failed, file does not exist as specified.
27363    # Try adding .exe or .cmd
27364    if test -f "${new_path}.exe"; then
27365       input_to_shortpath="${new_path}.exe"
27366    elif test -f "${new_path}.cmd"; then
27367       input_to_shortpath="${new_path}.cmd"
27368    else
27369      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
27370$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
27371      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27372$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27373      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
27374    fi
27375  else
27376    input_to_shortpath="$new_path"
27377  fi
27378
27379  # Call helper function which possibly converts this using DOS-style short mode.
27380  # If so, the updated path is stored in $new_path.
27381  new_path="$input_to_shortpath"
27382
27383  input_path="$input_to_shortpath"
27384  # Check if we need to convert this using DOS-style short mode. If the path
27385  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27386  # take no chances and rewrite it.
27387  # Note: m4 eats our [], so we need to use [ and ] instead.
27388  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27389  if test "x$has_forbidden_chars" != x; then
27390    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27391    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27392    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27393    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27394      # Going to short mode and back again did indeed matter. Since short mode is
27395      # case insensitive, let's make it lowercase to improve readability.
27396      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27397      # Now convert it back to Unix-stile (cygpath)
27398      input_path=`$CYGPATH -u "$shortmode_path"`
27399      new_path="$input_path"
27400    fi
27401  fi
27402
27403  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27404  if test "x$test_cygdrive_prefix" = x; then
27405    # As a simple fix, exclude /usr/bin since it's not a real path.
27406    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27407      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27408      # a path prefixed by /cygdrive for fixpath to work.
27409      new_path="$CYGWIN_ROOT_PATH$input_path"
27410    fi
27411  fi
27412
27413  # remove trailing .exe if any
27414  new_path="${new_path/%.exe/}"
27415
27416  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27417
27418  # First separate the path from the arguments. This will split at the first
27419  # space.
27420  complete="$OBJCOPY"
27421  path="${complete%% *}"
27422  tmp="$complete EOL"
27423  arguments="${tmp#* }"
27424
27425  # Input might be given as Windows format, start by converting to
27426  # unix format.
27427  new_path="$path"
27428
27429  windows_path="$new_path"
27430  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27431    unix_path=`$CYGPATH -u "$windows_path"`
27432    new_path="$unix_path"
27433  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27434    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27435    new_path="$unix_path"
27436  fi
27437
27438
27439  # Now try to locate executable using which
27440  new_path=`$WHICH "$new_path" 2> /dev/null`
27441
27442  if test "x$new_path" = x; then
27443    # Oops. Which didn't find the executable.
27444    # The splitting of arguments from the executable at a space might have been incorrect,
27445    # since paths with space are more likely in Windows. Give it another try with the whole
27446    # argument.
27447    path="$complete"
27448    arguments="EOL"
27449    new_path="$path"
27450
27451  windows_path="$new_path"
27452  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27453    unix_path=`$CYGPATH -u "$windows_path"`
27454    new_path="$unix_path"
27455  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27456    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27457    new_path="$unix_path"
27458  fi
27459
27460
27461    new_path=`$WHICH "$new_path" 2> /dev/null`
27462
27463    if test "x$new_path" = x; then
27464      # It's still not found. Now this is an unrecoverable error.
27465      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
27466$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
27467      has_space=`$ECHO "$complete" | $GREP " "`
27468      if test "x$has_space" != x; then
27469        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27470$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27471      fi
27472      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
27473    fi
27474  fi
27475
27476  # Now new_path has a complete unix path to the binary
27477  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27478    # Keep paths in /bin as-is, but remove trailing .exe if any
27479    new_path="${new_path/%.exe/}"
27480    # Do not save /bin paths to all_fixpath_prefixes!
27481  else
27482    # Not in mixed or Windows style, start by that.
27483    new_path=`cmd //c echo $new_path`
27484
27485  input_path="$new_path"
27486  # Check if we need to convert this using DOS-style short mode. If the path
27487  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27488  # take no chances and rewrite it.
27489  # Note: m4 eats our [], so we need to use [ and ] instead.
27490  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27491  if test "x$has_forbidden_chars" != x; then
27492    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27493    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27494  fi
27495
27496    # Output is in $new_path
27497
27498  windows_path="$new_path"
27499  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27500    unix_path=`$CYGPATH -u "$windows_path"`
27501    new_path="$unix_path"
27502  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27503    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27504    new_path="$unix_path"
27505  fi
27506
27507    # remove trailing .exe if any
27508    new_path="${new_path/%.exe/}"
27509
27510    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27511    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27512  fi
27513
27514  else
27515    # We're on a posix platform. Hooray! :)
27516    # First separate the path from the arguments. This will split at the first
27517    # space.
27518    complete="$OBJCOPY"
27519    path="${complete%% *}"
27520    tmp="$complete EOL"
27521    arguments="${tmp#* }"
27522
27523    # Cannot rely on the command "which" here since it doesn't always work.
27524    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27525    if test -z "$is_absolute_path"; then
27526      # Path to executable is not absolute. Find it.
27527      IFS_save="$IFS"
27528      IFS=:
27529      for p in $PATH; do
27530        if test -f "$p/$path" && test -x "$p/$path"; then
27531          new_path="$p/$path"
27532          break
27533        fi
27534      done
27535      IFS="$IFS_save"
27536    else
27537      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJCOPY (as $path) failed, using $path directly." >&5
27538$as_echo "$as_me: Resolving OBJCOPY (as $path) failed, using $path directly." >&6;}
27539      new_path="$path"
27540    fi
27541
27542    if test "x$new_path" = x; then
27543        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
27544$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
27545        has_space=`$ECHO "$complete" | $GREP " "`
27546        if test "x$has_space" != x; then
27547          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27548$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27549        fi
27550        as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
27551      fi
27552  fi
27553
27554      # Now join together the path and the arguments once again
27555      if test "x$arguments" != xEOL; then
27556        new_complete="$new_path ${arguments% *}"
27557      else
27558        new_complete="$new_path"
27559      fi
27560
27561  if test "x$complete" != "x$new_complete"; then
27562      OBJCOPY="$new_complete"
27563      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
27564$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
27565    fi
27566
27567    fi
27568fi
27569
27570if test -n "$ac_tool_prefix"; then
27571  for ac_prog in gobjdump objdump
27572  do
27573    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
27574set dummy $ac_tool_prefix$ac_prog; ac_word=$2
27575{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27576$as_echo_n "checking for $ac_word... " >&6; }
27577if ${ac_cv_prog_OBJDUMP+:} false; then :
27578  $as_echo_n "(cached) " >&6
27579else
27580  if test -n "$OBJDUMP"; then
27581  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
27582else
27583as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27584for as_dir in $PATH
27585do
27586  IFS=$as_save_IFS
27587  test -z "$as_dir" && as_dir=.
27588    for ac_exec_ext in '' $ac_executable_extensions; do
27589  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27590    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
27591    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27592    break 2
27593  fi
27594done
27595  done
27596IFS=$as_save_IFS
27597
27598fi
27599fi
27600OBJDUMP=$ac_cv_prog_OBJDUMP
27601if test -n "$OBJDUMP"; then
27602  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
27603$as_echo "$OBJDUMP" >&6; }
27604else
27605  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27606$as_echo "no" >&6; }
27607fi
27608
27609
27610    test -n "$OBJDUMP" && break
27611  done
27612fi
27613if test -z "$OBJDUMP"; then
27614  ac_ct_OBJDUMP=$OBJDUMP
27615  for ac_prog in gobjdump objdump
27616do
27617  # Extract the first word of "$ac_prog", so it can be a program name with args.
27618set dummy $ac_prog; ac_word=$2
27619{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27620$as_echo_n "checking for $ac_word... " >&6; }
27621if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
27622  $as_echo_n "(cached) " >&6
27623else
27624  if test -n "$ac_ct_OBJDUMP"; then
27625  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
27626else
27627as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27628for as_dir in $PATH
27629do
27630  IFS=$as_save_IFS
27631  test -z "$as_dir" && as_dir=.
27632    for ac_exec_ext in '' $ac_executable_extensions; do
27633  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27634    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
27635    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27636    break 2
27637  fi
27638done
27639  done
27640IFS=$as_save_IFS
27641
27642fi
27643fi
27644ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
27645if test -n "$ac_ct_OBJDUMP"; then
27646  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
27647$as_echo "$ac_ct_OBJDUMP" >&6; }
27648else
27649  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27650$as_echo "no" >&6; }
27651fi
27652
27653
27654  test -n "$ac_ct_OBJDUMP" && break
27655done
27656
27657  if test "x$ac_ct_OBJDUMP" = x; then
27658    OBJDUMP=""
27659  else
27660    case $cross_compiling:$ac_tool_warned in
27661yes:)
27662{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
27663$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
27664ac_tool_warned=yes ;;
27665esac
27666    OBJDUMP=$ac_ct_OBJDUMP
27667  fi
27668fi
27669
27670if test "x$OBJDUMP" != x; then
27671  # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE bails if argument is missing.
27672
27673  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27674
27675  # First separate the path from the arguments. This will split at the first
27676  # space.
27677  complete="$OBJDUMP"
27678  path="${complete%% *}"
27679  tmp="$complete EOL"
27680  arguments="${tmp#* }"
27681
27682  # Input might be given as Windows format, start by converting to
27683  # unix format.
27684  new_path=`$CYGPATH -u "$path"`
27685
27686  # Now try to locate executable using which
27687  new_path=`$WHICH "$new_path" 2> /dev/null`
27688  # bat and cmd files are not always considered executable in cygwin causing which
27689  # to not find them
27690  if test "x$new_path" = x \
27691           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27692           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27693    new_path=`$CYGPATH -u "$path"`
27694  fi
27695  if test "x$new_path" = x; then
27696    # Oops. Which didn't find the executable.
27697    # The splitting of arguments from the executable at a space might have been incorrect,
27698    # since paths with space are more likely in Windows. Give it another try with the whole
27699    # argument.
27700    path="$complete"
27701    arguments="EOL"
27702    new_path=`$CYGPATH -u "$path"`
27703    new_path=`$WHICH "$new_path" 2> /dev/null`
27704    # bat and cmd files are not always considered executable in cygwin causing which
27705    # to not find them
27706    if test "x$new_path" = x \
27707             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27708             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27709      new_path=`$CYGPATH -u "$path"`
27710    fi
27711    if test "x$new_path" = x; then
27712      # It's still not found. Now this is an unrecoverable error.
27713      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
27714$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
27715      has_space=`$ECHO "$complete" | $GREP " "`
27716      if test "x$has_space" != x; then
27717        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27718$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27719      fi
27720      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
27721    fi
27722  fi
27723
27724  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27725  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27726  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27727  # "foo.exe" is OK but "foo" is an error.
27728  #
27729  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27730  # It is also a way to make sure we got the proper file name for the real test later on.
27731  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27732  if test "x$test_shortpath" = x; then
27733    # Short path failed, file does not exist as specified.
27734    # Try adding .exe or .cmd
27735    if test -f "${new_path}.exe"; then
27736       input_to_shortpath="${new_path}.exe"
27737    elif test -f "${new_path}.cmd"; then
27738       input_to_shortpath="${new_path}.cmd"
27739    else
27740      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
27741$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
27742      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27743$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27744      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
27745    fi
27746  else
27747    input_to_shortpath="$new_path"
27748  fi
27749
27750  # Call helper function which possibly converts this using DOS-style short mode.
27751  # If so, the updated path is stored in $new_path.
27752  new_path="$input_to_shortpath"
27753
27754  input_path="$input_to_shortpath"
27755  # Check if we need to convert this using DOS-style short mode. If the path
27756  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27757  # take no chances and rewrite it.
27758  # Note: m4 eats our [], so we need to use [ and ] instead.
27759  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27760  if test "x$has_forbidden_chars" != x; then
27761    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27762    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27763    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27764    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27765      # Going to short mode and back again did indeed matter. Since short mode is
27766      # case insensitive, let's make it lowercase to improve readability.
27767      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27768      # Now convert it back to Unix-stile (cygpath)
27769      input_path=`$CYGPATH -u "$shortmode_path"`
27770      new_path="$input_path"
27771    fi
27772  fi
27773
27774  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27775  if test "x$test_cygdrive_prefix" = x; then
27776    # As a simple fix, exclude /usr/bin since it's not a real path.
27777    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27778      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27779      # a path prefixed by /cygdrive for fixpath to work.
27780      new_path="$CYGWIN_ROOT_PATH$input_path"
27781    fi
27782  fi
27783
27784  # remove trailing .exe if any
27785  new_path="${new_path/%.exe/}"
27786
27787  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27788
27789  # First separate the path from the arguments. This will split at the first
27790  # space.
27791  complete="$OBJDUMP"
27792  path="${complete%% *}"
27793  tmp="$complete EOL"
27794  arguments="${tmp#* }"
27795
27796  # Input might be given as Windows format, start by converting to
27797  # unix format.
27798  new_path="$path"
27799
27800  windows_path="$new_path"
27801  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27802    unix_path=`$CYGPATH -u "$windows_path"`
27803    new_path="$unix_path"
27804  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27805    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27806    new_path="$unix_path"
27807  fi
27808
27809
27810  # Now try to locate executable using which
27811  new_path=`$WHICH "$new_path" 2> /dev/null`
27812
27813  if test "x$new_path" = x; then
27814    # Oops. Which didn't find the executable.
27815    # The splitting of arguments from the executable at a space might have been incorrect,
27816    # since paths with space are more likely in Windows. Give it another try with the whole
27817    # argument.
27818    path="$complete"
27819    arguments="EOL"
27820    new_path="$path"
27821
27822  windows_path="$new_path"
27823  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27824    unix_path=`$CYGPATH -u "$windows_path"`
27825    new_path="$unix_path"
27826  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27827    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27828    new_path="$unix_path"
27829  fi
27830
27831
27832    new_path=`$WHICH "$new_path" 2> /dev/null`
27833
27834    if test "x$new_path" = x; then
27835      # It's still not found. Now this is an unrecoverable error.
27836      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
27837$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
27838      has_space=`$ECHO "$complete" | $GREP " "`
27839      if test "x$has_space" != x; then
27840        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27841$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27842      fi
27843      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
27844    fi
27845  fi
27846
27847  # Now new_path has a complete unix path to the binary
27848  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27849    # Keep paths in /bin as-is, but remove trailing .exe if any
27850    new_path="${new_path/%.exe/}"
27851    # Do not save /bin paths to all_fixpath_prefixes!
27852  else
27853    # Not in mixed or Windows style, start by that.
27854    new_path=`cmd //c echo $new_path`
27855
27856  input_path="$new_path"
27857  # Check if we need to convert this using DOS-style short mode. If the path
27858  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27859  # take no chances and rewrite it.
27860  # Note: m4 eats our [], so we need to use [ and ] instead.
27861  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27862  if test "x$has_forbidden_chars" != x; then
27863    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27864    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27865  fi
27866
27867    # Output is in $new_path
27868
27869  windows_path="$new_path"
27870  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27871    unix_path=`$CYGPATH -u "$windows_path"`
27872    new_path="$unix_path"
27873  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27874    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27875    new_path="$unix_path"
27876  fi
27877
27878    # remove trailing .exe if any
27879    new_path="${new_path/%.exe/}"
27880
27881    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27882    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27883  fi
27884
27885  else
27886    # We're on a posix platform. Hooray! :)
27887    # First separate the path from the arguments. This will split at the first
27888    # space.
27889    complete="$OBJDUMP"
27890    path="${complete%% *}"
27891    tmp="$complete EOL"
27892    arguments="${tmp#* }"
27893
27894    # Cannot rely on the command "which" here since it doesn't always work.
27895    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27896    if test -z "$is_absolute_path"; then
27897      # Path to executable is not absolute. Find it.
27898      IFS_save="$IFS"
27899      IFS=:
27900      for p in $PATH; do
27901        if test -f "$p/$path" && test -x "$p/$path"; then
27902          new_path="$p/$path"
27903          break
27904        fi
27905      done
27906      IFS="$IFS_save"
27907    else
27908      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJDUMP (as $path) failed, using $path directly." >&5
27909$as_echo "$as_me: Resolving OBJDUMP (as $path) failed, using $path directly." >&6;}
27910      new_path="$path"
27911    fi
27912
27913    if test "x$new_path" = x; then
27914        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
27915$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
27916        has_space=`$ECHO "$complete" | $GREP " "`
27917        if test "x$has_space" != x; then
27918          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27919$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27920        fi
27921        as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
27922      fi
27923  fi
27924
27925      # Now join together the path and the arguments once again
27926      if test "x$arguments" != xEOL; then
27927        new_complete="$new_path ${arguments% *}"
27928      else
27929        new_complete="$new_path"
27930      fi
27931
27932  if test "x$complete" != "x$new_complete"; then
27933      OBJDUMP="$new_complete"
27934      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
27935$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
27936    fi
27937
27938fi
27939
27940if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
27941   # Extract the first word of "lipo", so it can be a program name with args.
27942set dummy lipo; ac_word=$2
27943{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27944$as_echo_n "checking for $ac_word... " >&6; }
27945if ${ac_cv_path_LIPO+:} false; then :
27946  $as_echo_n "(cached) " >&6
27947else
27948  case $LIPO in
27949  [\\/]* | ?:[\\/]*)
27950  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
27951  ;;
27952  *)
27953  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27954for as_dir in $PATH
27955do
27956  IFS=$as_save_IFS
27957  test -z "$as_dir" && as_dir=.
27958    for ac_exec_ext in '' $ac_executable_extensions; do
27959  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27960    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
27961    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27962    break 2
27963  fi
27964done
27965  done
27966IFS=$as_save_IFS
27967
27968  ;;
27969esac
27970fi
27971LIPO=$ac_cv_path_LIPO
27972if test -n "$LIPO"; then
27973  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
27974$as_echo "$LIPO" >&6; }
27975else
27976  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27977$as_echo "no" >&6; }
27978fi
27979
27980
27981
27982  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27983
27984  # First separate the path from the arguments. This will split at the first
27985  # space.
27986  complete="$LIPO"
27987  path="${complete%% *}"
27988  tmp="$complete EOL"
27989  arguments="${tmp#* }"
27990
27991  # Input might be given as Windows format, start by converting to
27992  # unix format.
27993  new_path=`$CYGPATH -u "$path"`
27994
27995  # Now try to locate executable using which
27996  new_path=`$WHICH "$new_path" 2> /dev/null`
27997  # bat and cmd files are not always considered executable in cygwin causing which
27998  # to not find them
27999  if test "x$new_path" = x \
28000           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28001           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28002    new_path=`$CYGPATH -u "$path"`
28003  fi
28004  if test "x$new_path" = x; then
28005    # Oops. Which didn't find the executable.
28006    # The splitting of arguments from the executable at a space might have been incorrect,
28007    # since paths with space are more likely in Windows. Give it another try with the whole
28008    # argument.
28009    path="$complete"
28010    arguments="EOL"
28011    new_path=`$CYGPATH -u "$path"`
28012    new_path=`$WHICH "$new_path" 2> /dev/null`
28013    # bat and cmd files are not always considered executable in cygwin causing which
28014    # to not find them
28015    if test "x$new_path" = x \
28016             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28017             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28018      new_path=`$CYGPATH -u "$path"`
28019    fi
28020    if test "x$new_path" = x; then
28021      # It's still not found. Now this is an unrecoverable error.
28022      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
28023$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
28024      has_space=`$ECHO "$complete" | $GREP " "`
28025      if test "x$has_space" != x; then
28026        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28027$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28028      fi
28029      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
28030    fi
28031  fi
28032
28033  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28034  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28035  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28036  # "foo.exe" is OK but "foo" is an error.
28037  #
28038  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28039  # It is also a way to make sure we got the proper file name for the real test later on.
28040  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28041  if test "x$test_shortpath" = x; then
28042    # Short path failed, file does not exist as specified.
28043    # Try adding .exe or .cmd
28044    if test -f "${new_path}.exe"; then
28045       input_to_shortpath="${new_path}.exe"
28046    elif test -f "${new_path}.cmd"; then
28047       input_to_shortpath="${new_path}.cmd"
28048    else
28049      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
28050$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
28051      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
28052$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
28053      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
28054    fi
28055  else
28056    input_to_shortpath="$new_path"
28057  fi
28058
28059  # Call helper function which possibly converts this using DOS-style short mode.
28060  # If so, the updated path is stored in $new_path.
28061  new_path="$input_to_shortpath"
28062
28063  input_path="$input_to_shortpath"
28064  # Check if we need to convert this using DOS-style short mode. If the path
28065  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28066  # take no chances and rewrite it.
28067  # Note: m4 eats our [], so we need to use [ and ] instead.
28068  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28069  if test "x$has_forbidden_chars" != x; then
28070    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28071    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28072    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28073    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28074      # Going to short mode and back again did indeed matter. Since short mode is
28075      # case insensitive, let's make it lowercase to improve readability.
28076      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28077      # Now convert it back to Unix-stile (cygpath)
28078      input_path=`$CYGPATH -u "$shortmode_path"`
28079      new_path="$input_path"
28080    fi
28081  fi
28082
28083  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28084  if test "x$test_cygdrive_prefix" = x; then
28085    # As a simple fix, exclude /usr/bin since it's not a real path.
28086    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28087      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28088      # a path prefixed by /cygdrive for fixpath to work.
28089      new_path="$CYGWIN_ROOT_PATH$input_path"
28090    fi
28091  fi
28092
28093  # remove trailing .exe if any
28094  new_path="${new_path/%.exe/}"
28095
28096  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28097
28098  # First separate the path from the arguments. This will split at the first
28099  # space.
28100  complete="$LIPO"
28101  path="${complete%% *}"
28102  tmp="$complete EOL"
28103  arguments="${tmp#* }"
28104
28105  # Input might be given as Windows format, start by converting to
28106  # unix format.
28107  new_path="$path"
28108
28109  windows_path="$new_path"
28110  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28111    unix_path=`$CYGPATH -u "$windows_path"`
28112    new_path="$unix_path"
28113  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28114    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28115    new_path="$unix_path"
28116  fi
28117
28118
28119  # Now try to locate executable using which
28120  new_path=`$WHICH "$new_path" 2> /dev/null`
28121
28122  if test "x$new_path" = x; then
28123    # Oops. Which didn't find the executable.
28124    # The splitting of arguments from the executable at a space might have been incorrect,
28125    # since paths with space are more likely in Windows. Give it another try with the whole
28126    # argument.
28127    path="$complete"
28128    arguments="EOL"
28129    new_path="$path"
28130
28131  windows_path="$new_path"
28132  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28133    unix_path=`$CYGPATH -u "$windows_path"`
28134    new_path="$unix_path"
28135  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28136    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28137    new_path="$unix_path"
28138  fi
28139
28140
28141    new_path=`$WHICH "$new_path" 2> /dev/null`
28142
28143    if test "x$new_path" = x; then
28144      # It's still not found. Now this is an unrecoverable error.
28145      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
28146$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
28147      has_space=`$ECHO "$complete" | $GREP " "`
28148      if test "x$has_space" != x; then
28149        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28150$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28151      fi
28152      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
28153    fi
28154  fi
28155
28156  # Now new_path has a complete unix path to the binary
28157  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28158    # Keep paths in /bin as-is, but remove trailing .exe if any
28159    new_path="${new_path/%.exe/}"
28160    # Do not save /bin paths to all_fixpath_prefixes!
28161  else
28162    # Not in mixed or Windows style, start by that.
28163    new_path=`cmd //c echo $new_path`
28164
28165  input_path="$new_path"
28166  # Check if we need to convert this using DOS-style short mode. If the path
28167  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28168  # take no chances and rewrite it.
28169  # Note: m4 eats our [], so we need to use [ and ] instead.
28170  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28171  if test "x$has_forbidden_chars" != x; then
28172    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28173    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28174  fi
28175
28176    # Output is in $new_path
28177
28178  windows_path="$new_path"
28179  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28180    unix_path=`$CYGPATH -u "$windows_path"`
28181    new_path="$unix_path"
28182  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28183    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28184    new_path="$unix_path"
28185  fi
28186
28187    # remove trailing .exe if any
28188    new_path="${new_path/%.exe/}"
28189
28190    # Save the first 10 bytes of this path to the storage, so fixpath can work.
28191    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28192  fi
28193
28194  else
28195    # We're on a posix platform. Hooray! :)
28196    # First separate the path from the arguments. This will split at the first
28197    # space.
28198    complete="$LIPO"
28199    path="${complete%% *}"
28200    tmp="$complete EOL"
28201    arguments="${tmp#* }"
28202
28203    # Cannot rely on the command "which" here since it doesn't always work.
28204    is_absolute_path=`$ECHO "$path" | $GREP ^/`
28205    if test -z "$is_absolute_path"; then
28206      # Path to executable is not absolute. Find it.
28207      IFS_save="$IFS"
28208      IFS=:
28209      for p in $PATH; do
28210        if test -f "$p/$path" && test -x "$p/$path"; then
28211          new_path="$p/$path"
28212          break
28213        fi
28214      done
28215      IFS="$IFS_save"
28216    else
28217      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving LIPO (as $path) failed, using $path directly." >&5
28218$as_echo "$as_me: Resolving LIPO (as $path) failed, using $path directly." >&6;}
28219      new_path="$path"
28220    fi
28221
28222    if test "x$new_path" = x; then
28223        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
28224$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
28225        has_space=`$ECHO "$complete" | $GREP " "`
28226        if test "x$has_space" != x; then
28227          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28228$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28229        fi
28230        as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
28231      fi
28232  fi
28233
28234      # Now join together the path and the arguments once again
28235      if test "x$arguments" != xEOL; then
28236        new_complete="$new_path ${arguments% *}"
28237      else
28238        new_complete="$new_path"
28239      fi
28240
28241  if test "x$complete" != "x$new_complete"; then
28242      LIPO="$new_complete"
28243      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
28244$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
28245    fi
28246
28247fi
28248
28249
28250
28251# Restore old path without tools dir
28252PATH="$OLD_PATH"
28253
28254
28255# FIXME: Currently we must test this after paths but before flags. Fix!
28256
28257# And we can test some aspects on the target using configure macros.
28258
28259
28260{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
28261$as_echo_n "checking for ANSI C header files... " >&6; }
28262if ${ac_cv_header_stdc+:} false; then :
28263  $as_echo_n "(cached) " >&6
28264else
28265  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28266/* end confdefs.h.  */
28267#include <stdlib.h>
28268#include <stdarg.h>
28269#include <string.h>
28270#include <float.h>
28271
28272int
28273main ()
28274{
28275
28276  ;
28277  return 0;
28278}
28279_ACEOF
28280if ac_fn_cxx_try_compile "$LINENO"; then :
28281  ac_cv_header_stdc=yes
28282else
28283  ac_cv_header_stdc=no
28284fi
28285rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28286
28287if test $ac_cv_header_stdc = yes; then
28288  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
28289  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28290/* end confdefs.h.  */
28291#include <string.h>
28292
28293_ACEOF
28294if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28295  $EGREP "memchr" >/dev/null 2>&1; then :
28296
28297else
28298  ac_cv_header_stdc=no
28299fi
28300rm -f conftest*
28301
28302fi
28303
28304if test $ac_cv_header_stdc = yes; then
28305  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
28306  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28307/* end confdefs.h.  */
28308#include <stdlib.h>
28309
28310_ACEOF
28311if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28312  $EGREP "free" >/dev/null 2>&1; then :
28313
28314else
28315  ac_cv_header_stdc=no
28316fi
28317rm -f conftest*
28318
28319fi
28320
28321if test $ac_cv_header_stdc = yes; then
28322  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
28323  if test "$cross_compiling" = yes; then :
28324  :
28325else
28326  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28327/* end confdefs.h.  */
28328#include <ctype.h>
28329#include <stdlib.h>
28330#if ((' ' & 0x0FF) == 0x020)
28331# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
28332# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
28333#else
28334# define ISLOWER(c) \
28335		   (('a' <= (c) && (c) <= 'i') \
28336		     || ('j' <= (c) && (c) <= 'r') \
28337		     || ('s' <= (c) && (c) <= 'z'))
28338# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
28339#endif
28340
28341#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
28342int
28343main ()
28344{
28345  int i;
28346  for (i = 0; i < 256; i++)
28347    if (XOR (islower (i), ISLOWER (i))
28348	|| toupper (i) != TOUPPER (i))
28349      return 2;
28350  return 0;
28351}
28352_ACEOF
28353if ac_fn_cxx_try_run "$LINENO"; then :
28354
28355else
28356  ac_cv_header_stdc=no
28357fi
28358rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28359  conftest.$ac_objext conftest.beam conftest.$ac_ext
28360fi
28361
28362fi
28363fi
28364{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
28365$as_echo "$ac_cv_header_stdc" >&6; }
28366if test $ac_cv_header_stdc = yes; then
28367
28368$as_echo "#define STDC_HEADERS 1" >>confdefs.h
28369
28370fi
28371
28372# On IRIX 5.3, sys/types and inttypes.h are conflicting.
28373for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
28374		  inttypes.h stdint.h unistd.h
28375do :
28376  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
28377ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
28378"
28379if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
28380  cat >>confdefs.h <<_ACEOF
28381#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
28382_ACEOF
28383
28384fi
28385
28386done
28387
28388
28389
28390###############################################################################
28391#
28392# Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
28393# (The JVM can use 32 or 64 bit Java pointers but that decision
28394# is made at runtime.)
28395#
28396
28397if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28398  # Always specify -m flags on Solaris
28399
28400  # When we add flags to the "official" CFLAGS etc, we need to
28401  # keep track of these additions in ADDED_CFLAGS etc. These
28402  # will later be checked to make sure only controlled additions
28403  # have been made to CFLAGS etc.
28404  ADDED_CFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28405  ADDED_CXXFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28406  ADDED_LDFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28407
28408  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
28409  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
28410  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
28411
28412  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
28413  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
28414  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
28415
28416elif test "x$COMPILE_TYPE" = xreduced; then
28417  if test "x$OPENJDK_TARGET_OS" != xwindows; then
28418    # Specify -m if running reduced on other Posix platforms
28419
28420  # When we add flags to the "official" CFLAGS etc, we need to
28421  # keep track of these additions in ADDED_CFLAGS etc. These
28422  # will later be checked to make sure only controlled additions
28423  # have been made to CFLAGS etc.
28424  ADDED_CFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28425  ADDED_CXXFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28426  ADDED_LDFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28427
28428  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
28429  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
28430  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
28431
28432  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
28433  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
28434  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
28435
28436  fi
28437fi
28438
28439# Make compilation sanity check
28440for ac_header in stdio.h
28441do :
28442  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
28443if test "x$ac_cv_header_stdio_h" = xyes; then :
28444  cat >>confdefs.h <<_ACEOF
28445#define HAVE_STDIO_H 1
28446_ACEOF
28447
28448else
28449
28450  { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
28451$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
28452  if test "x$COMPILE_TYPE" = xreduced; then
28453    { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed." >&5
28454$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed." >&6;}
28455  elif test "x$COMPILE_TYPE" = xcross; then
28456    { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
28457$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
28458  fi
28459  as_fn_error $? "Cannot continue." "$LINENO" 5
28460
28461fi
28462
28463done
28464
28465
28466# The cast to long int works around a bug in the HP C Compiler
28467# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
28468# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
28469# This bug is HP SR number 8606223364.
28470{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
28471$as_echo_n "checking size of int *... " >&6; }
28472if ${ac_cv_sizeof_int_p+:} false; then :
28473  $as_echo_n "(cached) " >&6
28474else
28475  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
28476
28477else
28478  if test "$ac_cv_type_int_p" = yes; then
28479     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
28480$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
28481as_fn_error 77 "cannot compute sizeof (int *)
28482See \`config.log' for more details" "$LINENO" 5; }
28483   else
28484     ac_cv_sizeof_int_p=0
28485   fi
28486fi
28487
28488fi
28489{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
28490$as_echo "$ac_cv_sizeof_int_p" >&6; }
28491
28492
28493
28494cat >>confdefs.h <<_ACEOF
28495#define SIZEOF_INT_P $ac_cv_sizeof_int_p
28496_ACEOF
28497
28498
28499
28500if test "x$SIZEOF_INT_P" != "x$ac_cv_sizeof_int_p"; then
28501  # Workaround autoconf bug, see http://lists.gnu.org/archive/html/autoconf/2010-07/msg00004.html
28502  SIZEOF_INT_P="$ac_cv_sizeof_int_p"
28503fi
28504
28505if test "x$SIZEOF_INT_P" = x; then
28506    # The test failed, lets stick to the assumed value.
28507    { $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
28508$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
28509else
28510    TESTED_TARGET_CPU_BITS=`expr 8 \* $SIZEOF_INT_P`
28511
28512    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
28513        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
28514    fi
28515fi
28516
28517{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
28518$as_echo_n "checking for target address size... " >&6; }
28519{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
28520$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
28521
28522
28523###############################################################################
28524#
28525# Is the target little of big endian?
28526#
28527 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
28528$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
28529if ${ac_cv_c_bigendian+:} false; then :
28530  $as_echo_n "(cached) " >&6
28531else
28532  ac_cv_c_bigendian=unknown
28533    # See if we're dealing with a universal compiler.
28534    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28535/* end confdefs.h.  */
28536#ifndef __APPLE_CC__
28537	       not a universal capable compiler
28538	     #endif
28539	     typedef int dummy;
28540
28541_ACEOF
28542if ac_fn_cxx_try_compile "$LINENO"; then :
28543
28544	# Check for potential -arch flags.  It is not universal unless
28545	# there are at least two -arch flags with different values.
28546	ac_arch=
28547	ac_prev=
28548	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
28549	 if test -n "$ac_prev"; then
28550	   case $ac_word in
28551	     i?86 | x86_64 | ppc | ppc64)
28552	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
28553		 ac_arch=$ac_word
28554	       else
28555		 ac_cv_c_bigendian=universal
28556		 break
28557	       fi
28558	       ;;
28559	   esac
28560	   ac_prev=
28561	 elif test "x$ac_word" = "x-arch"; then
28562	   ac_prev=arch
28563	 fi
28564       done
28565fi
28566rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28567    if test $ac_cv_c_bigendian = unknown; then
28568      # See if sys/param.h defines the BYTE_ORDER macro.
28569      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28570/* end confdefs.h.  */
28571#include <sys/types.h>
28572	     #include <sys/param.h>
28573
28574int
28575main ()
28576{
28577#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
28578		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
28579		     && LITTLE_ENDIAN)
28580	      bogus endian macros
28581	     #endif
28582
28583  ;
28584  return 0;
28585}
28586_ACEOF
28587if ac_fn_cxx_try_compile "$LINENO"; then :
28588  # It does; now see whether it defined to BIG_ENDIAN or not.
28589	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28590/* end confdefs.h.  */
28591#include <sys/types.h>
28592		#include <sys/param.h>
28593
28594int
28595main ()
28596{
28597#if BYTE_ORDER != BIG_ENDIAN
28598		 not big endian
28599		#endif
28600
28601  ;
28602  return 0;
28603}
28604_ACEOF
28605if ac_fn_cxx_try_compile "$LINENO"; then :
28606  ac_cv_c_bigendian=yes
28607else
28608  ac_cv_c_bigendian=no
28609fi
28610rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28611fi
28612rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28613    fi
28614    if test $ac_cv_c_bigendian = unknown; then
28615      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
28616      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28617/* end confdefs.h.  */
28618#include <limits.h>
28619
28620int
28621main ()
28622{
28623#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
28624	      bogus endian macros
28625	     #endif
28626
28627  ;
28628  return 0;
28629}
28630_ACEOF
28631if ac_fn_cxx_try_compile "$LINENO"; then :
28632  # It does; now see whether it defined to _BIG_ENDIAN or not.
28633	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28634/* end confdefs.h.  */
28635#include <limits.h>
28636
28637int
28638main ()
28639{
28640#ifndef _BIG_ENDIAN
28641		 not big endian
28642		#endif
28643
28644  ;
28645  return 0;
28646}
28647_ACEOF
28648if ac_fn_cxx_try_compile "$LINENO"; then :
28649  ac_cv_c_bigendian=yes
28650else
28651  ac_cv_c_bigendian=no
28652fi
28653rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28654fi
28655rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28656    fi
28657    if test $ac_cv_c_bigendian = unknown; then
28658      # Compile a test program.
28659      if test "$cross_compiling" = yes; then :
28660  # Try to guess by grepping values from an object file.
28661	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28662/* end confdefs.h.  */
28663short int ascii_mm[] =
28664		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
28665		short int ascii_ii[] =
28666		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
28667		int use_ascii (int i) {
28668		  return ascii_mm[i] + ascii_ii[i];
28669		}
28670		short int ebcdic_ii[] =
28671		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
28672		short int ebcdic_mm[] =
28673		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
28674		int use_ebcdic (int i) {
28675		  return ebcdic_mm[i] + ebcdic_ii[i];
28676		}
28677		extern int foo;
28678
28679int
28680main ()
28681{
28682return use_ascii (foo) == use_ebcdic (foo);
28683  ;
28684  return 0;
28685}
28686_ACEOF
28687if ac_fn_cxx_try_compile "$LINENO"; then :
28688  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
28689	      ac_cv_c_bigendian=yes
28690	    fi
28691	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
28692	      if test "$ac_cv_c_bigendian" = unknown; then
28693		ac_cv_c_bigendian=no
28694	      else
28695		# finding both strings is unlikely to happen, but who knows?
28696		ac_cv_c_bigendian=unknown
28697	      fi
28698	    fi
28699fi
28700rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28701else
28702  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28703/* end confdefs.h.  */
28704$ac_includes_default
28705int
28706main ()
28707{
28708
28709	     /* Are we little or big endian?  From Harbison&Steele.  */
28710	     union
28711	     {
28712	       long int l;
28713	       char c[sizeof (long int)];
28714	     } u;
28715	     u.l = 1;
28716	     return u.c[sizeof (long int) - 1] == 1;
28717
28718  ;
28719  return 0;
28720}
28721_ACEOF
28722if ac_fn_cxx_try_run "$LINENO"; then :
28723  ac_cv_c_bigendian=no
28724else
28725  ac_cv_c_bigendian=yes
28726fi
28727rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28728  conftest.$ac_objext conftest.beam conftest.$ac_ext
28729fi
28730
28731    fi
28732fi
28733{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
28734$as_echo "$ac_cv_c_bigendian" >&6; }
28735 case $ac_cv_c_bigendian in #(
28736   yes)
28737     ENDIAN="big";; #(
28738   no)
28739     ENDIAN="little" ;; #(
28740   universal)
28741     ENDIAN="universal_endianness"
28742     ;; #(
28743   *)
28744     ENDIAN="unknown" ;;
28745 esac
28746
28747
28748if test "x$ENDIAN" = xuniversal_endianness; then
28749    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
28750fi
28751if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
28752    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
28753fi
28754
28755
28756# Configure flags for the tools
28757
28758
28759###############################################################################
28760#
28761# How to compile shared libraries.
28762#
28763
28764if test "x$GCC" = xyes; then
28765    COMPILER_NAME=gcc
28766    PICFLAG="-fPIC"
28767    LIBRARY_PREFIX=lib
28768    SHARED_LIBRARY='lib$1.so'
28769    STATIC_LIBRARY='lib$1.a'
28770    SHARED_LIBRARY_FLAGS="-shared"
28771    SHARED_LIBRARY_SUFFIX='.so'
28772    STATIC_LIBRARY_SUFFIX='.a'
28773    OBJ_SUFFIX='.o'
28774    EXE_SUFFIX=''
28775    SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
28776    SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
28777    C_FLAG_REORDER=''
28778    CXX_FLAG_REORDER=''
28779    SET_SHARED_LIBRARY_ORIGIN='-Xlinker -z -Xlinker origin -Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
28780    SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
28781    LD="$CC"
28782    LDEXE="$CC"
28783    LDCXX="$CXX"
28784    LDEXECXX="$CXX"
28785    POST_STRIP_CMD="$STRIP -g"
28786
28787    # Linking is different on MacOSX
28788    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
28789        # Might change in the future to clang.
28790        COMPILER_NAME=gcc
28791        SHARED_LIBRARY='lib$1.dylib'
28792        SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
28793        SHARED_LIBRARY_SUFFIX='.dylib'
28794        EXE_SUFFIX=''
28795        SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
28796        SET_SHARED_LIBRARY_MAPFILE=''
28797        SET_SHARED_LIBRARY_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
28798        SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
28799        POST_STRIP_CMD="$STRIP -S"
28800    fi
28801else
28802    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28803        # If it is not gcc, then assume it is the Oracle Solaris Studio Compiler
28804        COMPILER_NAME=ossc
28805        PICFLAG="-KPIC"
28806        LIBRARY_PREFIX=lib
28807        SHARED_LIBRARY='lib$1.so'
28808        STATIC_LIBRARY='lib$1.a'
28809        SHARED_LIBRARY_FLAGS="-G"
28810        SHARED_LIBRARY_SUFFIX='.so'
28811        STATIC_LIBRARY_SUFFIX='.a'
28812        OBJ_SUFFIX='.o'
28813        EXE_SUFFIX=''
28814        SET_SHARED_LIBRARY_NAME=''
28815        SET_SHARED_LIBRARY_MAPFILE='-M$1'
28816	C_FLAG_REORDER='-xF'
28817	CXX_FLAG_REORDER='-xF'
28818        SET_SHARED_LIBRARY_ORIGIN='-R\$$$$ORIGIN$1'
28819        SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
28820        CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
28821        CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
28822        CFLAGS_JDKLIB_EXTRA='-xstrconst'
28823        POST_STRIP_CMD="$STRIP -x"
28824        POST_MCS_CMD="$MCS -d -a \"JDK $FULL_VERSION\""
28825    fi
28826    if test "x$OPENJDK_TARGET_OS" = xwindows; then
28827        # If it is not gcc, then assume it is the MS Visual Studio compiler
28828        COMPILER_NAME=cl
28829        PICFLAG=""
28830        LIBRARY_PREFIX=
28831        SHARED_LIBRARY='$1.dll'
28832        STATIC_LIBRARY='$1.lib'
28833        SHARED_LIBRARY_FLAGS="-LD"
28834        SHARED_LIBRARY_SUFFIX='.dll'
28835        STATIC_LIBRARY_SUFFIX='.lib'
28836        OBJ_SUFFIX='.obj'
28837        EXE_SUFFIX='.exe'
28838        SET_SHARED_LIBRARY_NAME=''
28839        SET_SHARED_LIBRARY_MAPFILE=''
28840        SET_SHARED_LIBRARY_ORIGIN=''
28841        SET_EXECUTABLE_ORIGIN=''
28842    fi
28843fi
28844
28845
28846
28847
28848
28849
28850
28851
28852
28853
28854
28855
28856
28857
28858
28859
28860
28861
28862
28863# The (cross) compiler is now configured, we can now test capabilities
28864# of the target platform.
28865
28866
28867
28868###############################################################################
28869#
28870# Setup the opt flags for different compilers
28871# and different operating systems.
28872#
28873
28874#
28875# NOTE: check for -mstackrealign needs to be below potential addition of -m32
28876#
28877if test "x$OPENJDK_TARGET_CPU_BITS" = x32 && test "x$OPENJDK_TARGET_OS" = xmacosx; then
28878    # On 32-bit MacOSX the OS requires C-entry points to be 16 byte aligned.
28879    # While waiting for a better solution, the current workaround is to use -mstackrealign.
28880    CFLAGS="$CFLAGS -mstackrealign"
28881    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if 32-bit compiler supports -mstackrealign" >&5
28882$as_echo_n "checking if 32-bit compiler supports -mstackrealign... " >&6; }
28883    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28884/* end confdefs.h.  */
28885int main() { return 0; }
28886_ACEOF
28887if ac_fn_cxx_try_link "$LINENO"; then :
28888
28889		        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
28890$as_echo "yes" >&6; }
28891
28892else
28893
28894		        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28895$as_echo "no" >&6; }
28896	                as_fn_error $? "The selected compiler $CXX does not support -mstackrealign! Try to put another compiler in the path." "$LINENO" 5
28897
28898fi
28899rm -f core conftest.err conftest.$ac_objext \
28900    conftest$ac_exeext conftest.$ac_ext
28901fi
28902
28903C_FLAG_DEPS="-MMD -MF"
28904CXX_FLAG_DEPS="-MMD -MF"
28905
28906case $COMPILER_TYPE in
28907  CC )
28908    case $COMPILER_NAME in
28909      gcc )
28910      	case $OPENJDK_TARGET_OS in
28911	  macosx )
28912	    # On MacOSX we optimize for size, something
28913	    # we should do for all platforms?
28914	    C_O_FLAG_HI="-Os"
28915	    C_O_FLAG_NORM="-Os"
28916	    C_O_FLAG_NONE=""
28917	    ;;
28918	  *)
28919	    C_O_FLAG_HI="-O3"
28920	    C_O_FLAG_NORM="-O2"
28921	    C_O_FLAG_NONE="-O0"
28922	    ;;
28923	esac
28924        CXX_O_FLAG_HI="$C_O_FLAG_HI"
28925        CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
28926        CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
28927        CFLAGS_DEBUG_SYMBOLS="-g"
28928        CXXFLAGS_DEBUG_SYMBOLS="-g"
28929        if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
28930            CFLAGS_DEBUG_SYMBOLS="-g1"
28931            CXXFLAGS_DEBUG_SYMBOLS="-g1"
28932        fi
28933        ;;
28934      ossc )
28935        #
28936        # Forte has different names for this with their C++ compiler...
28937        #
28938        C_FLAG_DEPS="-xMMD -xMF"
28939        CXX_FLAG_DEPS="-xMMD -xMF"
28940
28941        # Extra options used with HIGHEST
28942        #
28943        # WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
28944        #          done with care, there are some assumptions below that need to
28945        #          be understood about the use of pointers, and IEEE behavior.
28946        #
28947        # Use non-standard floating point mode (not IEEE 754)
28948        CC_HIGHEST="$CC_HIGHEST -fns"
28949        # Do some simplification of floating point arithmetic (not IEEE 754)
28950        CC_HIGHEST="$CC_HIGHEST -fsimple"
28951        # Use single precision floating point with 'float'
28952        CC_HIGHEST="$CC_HIGHEST -fsingle"
28953        # Assume memory references via basic pointer types do not alias
28954        #   (Source with excessing pointer casting and data access with mixed
28955        #    pointer types are not recommended)
28956        CC_HIGHEST="$CC_HIGHEST -xalias_level=basic"
28957        # Use intrinsic or inline versions for math/std functions
28958        #   (If you expect perfect errno behavior, do not use this)
28959        CC_HIGHEST="$CC_HIGHEST -xbuiltin=%all"
28960        # Loop data dependency optimizations (need -xO3 or higher)
28961        CC_HIGHEST="$CC_HIGHEST -xdepend"
28962        # Pointer parameters to functions do not overlap
28963        #   (Similar to -xalias_level=basic usage, but less obvious sometimes.
28964        #    If you pass in multiple pointers to the same data, do not use this)
28965        CC_HIGHEST="$CC_HIGHEST -xrestrict"
28966        # Inline some library routines
28967        #   (If you expect perfect errno behavior, do not use this)
28968        CC_HIGHEST="$CC_HIGHEST -xlibmil"
28969        # Use optimized math routines
28970        #   (If you expect perfect errno behavior, do not use this)
28971        #  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
28972        #CC_HIGHEST="$CC_HIGHEST -xlibmopt"
28973
28974        if test "x$OPENJDK_TARGET_CPU" = xsparc; then
28975          CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
28976          CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
28977        fi
28978
28979        case $OPENJDK_TARGET_CPU_ARCH in
28980          x86)
28981            C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xregs=no%frameptr"
28982            C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
28983            C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
28984            C_O_FLAG_NONE="-xregs=no%frameptr"
28985            CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
28986            CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
28987            CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
28988            CXX_O_FLAG_NONE="-xregs=no%frameptr"
28989            if test "x$OPENJDK_TARGET_CPU" = xx86; then
28990               C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
28991               CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
28992            fi
28993            ;;
28994          sparc)
28995            CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
28996            CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
28997            C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
28998            C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
28999            C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
29000            C_O_FLAG_NONE=""
29001            CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
29002            CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
29003            CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
29004            CXX_O_FLAG_NONE=""
29005            ;;
29006        esac
29007
29008    CFLAGS_DEBUG_SYMBOLS="-g -xs"
29009    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
29010    esac
29011    ;;
29012  CL )
29013    C_O_FLAG_HIGHEST="-O2"
29014    C_O_FLAG_HI="-O1"
29015    C_O_FLAG_NORM="-O1"
29016    C_O_FLAG_NONE="-Od"
29017    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
29018    CXX_O_FLAG_HI="$C_O_FLAG_HI"
29019    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
29020    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
29021    ;;
29022esac
29023
29024if test -z "$C_O_FLAG_HIGHEST"; then
29025   C_O_FLAG_HIGHEST="$C_O_FLAG_HI"
29026fi
29027
29028if test -z "$CXX_O_FLAG_HIGHEST"; then
29029   CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HI"
29030fi
29031
29032
29033
29034
29035
29036
29037
29038
29039
29040
29041
29042
29043
29044
29045if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
29046   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
29047$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
29048fi
29049
29050if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
29051   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
29052$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
29053fi
29054
29055if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
29056   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
29057$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
29058fi
29059
29060
29061# Check whether --with-extra-cflags was given.
29062if test "${with_extra_cflags+set}" = set; then :
29063  withval=$with_extra_cflags;
29064fi
29065
29066
29067
29068# Check whether --with-extra-cxxflags was given.
29069if test "${with_extra_cxxflags+set}" = set; then :
29070  withval=$with_extra_cxxflags;
29071fi
29072
29073
29074
29075# Check whether --with-extra-ldflags was given.
29076if test "${with_extra_ldflags+set}" = set; then :
29077  withval=$with_extra_ldflags;
29078fi
29079
29080
29081CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags"
29082CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags"
29083LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags"
29084
29085# Hotspot needs these set in their legacy form
29086LEGACY_EXTRA_CFLAGS=$with_extra_cflags
29087LEGACY_EXTRA_CXXFLAGS=$with_extra_cxxflags
29088LEGACY_EXTRA_LDFLAGS=$with_extra_ldflags
29089
29090
29091
29092
29093
29094###############################################################################
29095#
29096# Now setup the CFLAGS and LDFLAGS for the JDK build.
29097# Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
29098#
29099case $COMPILER_NAME in
29100      gcc )
29101      	  CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -W -Wall -Wno-unused -Wno-parentheses \
29102                          -pipe \
29103                          -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
29104	  case $OPENJDK_TARGET_CPU_ARCH in
29105	  arm )
29106            # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
29107	    CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
29108	  ;;
29109	  ppc )
29110            # on ppc we don't prevent gcc to omit frame pointer nor strict-aliasing
29111	  ;;
29112	  * )
29113	    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -fno-omit-frame-pointer"
29114	    CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
29115          ;;
29116	  esac
29117          ;;
29118      ossc )
29119          CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
29120          case $OPENJDK_TARGET_CPU_ARCH in
29121          x86 )
29122            CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
29123       	    CFLAGS_JDK="$CFLAGS_JDK -erroff=E_BAD_PRAGMA_PACK_VALUE"
29124          ;;
29125          esac
29126
29127      	  CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
29128      	  CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
29129
29130          LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
29131          LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
29132          ;;
29133      cl )
29134          CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
29135               -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB -DWIN32_LEAN_AND_MEAN \
29136	       -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
29137	       -DWIN32 -DIAL"
29138          case $OPENJDK_TARGET_CPU in
29139              x86 )
29140                  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_X86_ -Dx86"
29141                  ;;
29142              x86_64 )
29143                  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_AMD64_ -Damd64"
29144                  ;;
29145          esac
29146          ;;
29147esac
29148
29149###############################################################################
29150
29151# Adjust flags according to debug level.
29152case $DEBUG_LEVEL in
29153      fastdebug )
29154              CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS"
29155              CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS"
29156	      C_O_FLAG_HI="$C_O_FLAG_NORM"
29157	      C_O_FLAG_NORM="$C_O_FLAG_NORM"
29158	      CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
29159	      CXX_O_FLAG_NORM="$CXX_O_FLAG_NORM"
29160              JAVAC_FLAGS="$JAVAC_FLAGS -g"
29161              ;;
29162      slowdebug )
29163              CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS"
29164              CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS"
29165	      C_O_FLAG_HI="$C_O_FLAG_NONE"
29166	      C_O_FLAG_NORM="$C_O_FLAG_NONE"
29167	      CXX_O_FLAG_HI="$CXX_O_FLAG_NONE"
29168	      CXX_O_FLAG_NORM="$CXX_O_FLAG_NONE"
29169              JAVAC_FLAGS="$JAVAC_FLAGS -g"
29170              ;;
29171esac
29172
29173CCXXFLAGS_JDK="$CCXXFLAGS_JDK $ADD_LP64"
29174
29175# The package path is used only on macosx?
29176PACKAGE_PATH=/opt/local
29177
29178
29179if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
29180    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
29181    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
29182    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
29183    #   Note: -Dmacro         is the same as    #define macro 1
29184    #         -Dmacro=	    is the same as    #define macro
29185    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29186        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
29187    else
29188        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
29189    fi
29190else
29191    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_BIG_ENDIAN"
29192fi
29193if test "x$OPENJDK_TARGET_OS" = xlinux; then
29194    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DLINUX"
29195fi
29196if test "x$OPENJDK_TARGET_OS" = xwindows; then
29197    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DWINDOWS"
29198fi
29199if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29200    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DSOLARIS"
29201fi
29202if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29203    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMACOSX -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
29204    # Setting these parameters makes it an error to link to macosx APIs that are
29205    # newer than the given OS version and makes the linked binaries compatible even
29206    # if built on a newer version of the OS.
29207    # The expected format is X.Y.Z
29208    MACOSX_VERSION_MIN=10.7.0
29209
29210    # The macro takes the version with no dots, ex: 1070
29211    # Let the flags variables get resolved in make for easier override on make
29212    # command line.
29213    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
29214    LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
29215fi
29216if test "x$OPENJDK_TARGET_OS" = xbsd; then
29217    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DBSD -D_ALLBSD_SOURCE"
29218fi
29219if test "x$DEBUG_LEVEL" = xrelease; then
29220    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DNDEBUG"
29221    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29222        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DTRIMMED"
29223    fi
29224else
29225    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DDEBUG"
29226fi
29227
29228CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
29229CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DRELEASE='\"$RELEASE\"'"
29230
29231CCXXFLAGS_JDK="$CCXXFLAGS_JDK \
29232        -I${JDK_OUTPUTDIR}/include \
29233        -I${JDK_OUTPUTDIR}/include/$OPENJDK_TARGET_OS \
29234        -I${JDK_TOPDIR}/src/share/javavm/export \
29235        -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/javavm/export \
29236        -I${JDK_TOPDIR}/src/share/native/common \
29237        -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/native/common"
29238
29239# The shared libraries are compiled using the picflag.
29240CFLAGS_JDKLIB="$CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
29241CXXFLAGS_JDKLIB="$CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA "
29242
29243# Executable flags
29244CFLAGS_JDKEXE="$CCXXFLAGS_JDK $CFLAGS_JDK"
29245CXXFLAGS_JDKEXE="$CCXXFLAGS_JDK $CXXFLAGS_JDK"
29246
29247# Now this is odd. The JDK native libraries have to link against libjvm.so
29248# On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
29249# Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
29250# is identical for client and server? Yes. Which is picked at runtime (client or server)?
29251# Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
29252# libraries will link to whatever is in memory. Yuck.
29253#
29254# Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
29255if test "x$COMPILER_NAME" = xcl; then
29256    LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
29257    if test "x$OPENJDK_TARGET_CPU" = xx86; then
29258        LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
29259    fi
29260    # TODO: make -debug optional "--disable-full-debug-symbols"
29261    LDFLAGS_JDK="$LDFLAGS_JDK -debug"
29262    LDFLAGS_JDKLIB="${LDFLAGS_JDK} -dll -libpath:${JDK_OUTPUTDIR}/lib"
29263    LDFLAGS_JDKLIB_SUFFIX=""
29264    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
29265        LDFLAGS_STACK_SIZE=1048576
29266    else
29267        LDFLAGS_STACK_SIZE=327680
29268    fi
29269    LDFLAGS_JDKEXE="${LDFLAGS_JDK} /STACK:$LDFLAGS_STACK_SIZE"
29270else
29271    if test "x$COMPILER_NAME" = xgcc; then
29272        # If this is a --hash-style=gnu system, use --hash-style=both, why?
29273        HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
29274        if test -n "$HAS_GNU_HASH"; then
29275            LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both "
29276        fi
29277        if test "x$OPENJDK_TARGET_OS" = xlinux; then
29278          # And since we now know that the linker is gnu, then add -z defs, to forbid
29279          # undefined symbols in object files.
29280          LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs"
29281          if test "x$DEBUG_LEVEL" = "xrelease"; then
29282              # When building release libraries, tell the linker optimize them.
29283              # Should this be supplied to the OSS linker as well?
29284              LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
29285          fi
29286        fi
29287    fi
29288    LDFLAGS_JDKLIB="${LDFLAGS_JDK} $SHARED_LIBRARY_FLAGS \
29289                    -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}"
29290
29291    # On some platforms (mac) the linker warns about non existing -L dirs.
29292    # Add server first if available. Linking aginst client does not always produce the same results.
29293    # Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
29294    # Default to server for other variants.
29295    if test "x$JVM_VARIANT_SERVER" = xtrue; then
29296        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
29297    elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
29298        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/client"
29299    elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
29300        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
29301    else
29302        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
29303    fi
29304
29305    LDFLAGS_JDKLIB_SUFFIX="-ljava -ljvm"
29306    if test "x$COMPILER_NAME" = xossc; then
29307        LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc"
29308    fi
29309
29310    LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
29311    if test "x$OPENJDK_TARGET_OS" = xlinux; then
29312        LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
29313    fi
29314fi
29315
29316
29317
29318
29319
29320
29321
29322
29323
29324
29325
29326
29327
29328
29329
29330  # Some Zero and Shark settings.
29331  # ZERO_ARCHFLAG tells the compiler which mode to build for
29332  case "${OPENJDK_TARGET_CPU}" in
29333    s390)
29334      ZERO_ARCHFLAG="-m31"
29335      ;;
29336    *)
29337      ZERO_ARCHFLAG="-m${OPENJDK_TARGET_CPU_BITS}"
29338  esac
29339
29340  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$ZERO_ARCHFLAG\"" >&5
29341$as_echo_n "checking if compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
29342  supports=yes
29343
29344  saved_cflags="$CFLAGS"
29345  CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
29346  ac_ext=c
29347ac_cpp='$CPP $CPPFLAGS'
29348ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29349ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29350ac_compiler_gnu=$ac_cv_c_compiler_gnu
29351
29352  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29353/* end confdefs.h.  */
29354
29355    int i;
29356
29357_ACEOF
29358if ac_fn_c_try_compile "$LINENO"; then :
29359
29360else
29361  supports=no
29362fi
29363rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29364  ac_ext=cpp
29365ac_cpp='$CXXCPP $CPPFLAGS'
29366ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29367ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29368ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29369
29370  CFLAGS="$saved_cflags"
29371
29372  saved_cxxflags="$CXXFLAGS"
29373  CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
29374  ac_ext=cpp
29375ac_cpp='$CXXCPP $CPPFLAGS'
29376ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29377ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29378ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29379
29380  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29381/* end confdefs.h.  */
29382
29383    int i;
29384
29385_ACEOF
29386if ac_fn_cxx_try_compile "$LINENO"; then :
29387
29388else
29389  supports=no
29390fi
29391rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29392  ac_ext=cpp
29393ac_cpp='$CXXCPP $CPPFLAGS'
29394ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29395ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29396ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29397
29398  CXXFLAGS="$saved_cxxflags"
29399
29400  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
29401$as_echo "$supports" >&6; }
29402  if test "x$supports" = "xyes" ; then
29403    :
29404  else
29405    ZERO_ARCHFLAG=""
29406  fi
29407
29408
29409
29410  # Check that the compiler supports -mX flags
29411  # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
29412
29413  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"-m${OPENJDK_TARGET_CPU_BITS}\"" >&5
29414$as_echo_n "checking if compiler supports \"-m${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
29415  supports=yes
29416
29417  saved_cflags="$CFLAGS"
29418  CFLAGS="$CFLAGS -m${OPENJDK_TARGET_CPU_BITS}"
29419  ac_ext=c
29420ac_cpp='$CPP $CPPFLAGS'
29421ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29422ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29423ac_compiler_gnu=$ac_cv_c_compiler_gnu
29424
29425  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29426/* end confdefs.h.  */
29427
29428    int i;
29429
29430_ACEOF
29431if ac_fn_c_try_compile "$LINENO"; then :
29432
29433else
29434  supports=no
29435fi
29436rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29437  ac_ext=cpp
29438ac_cpp='$CXXCPP $CPPFLAGS'
29439ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29440ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29441ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29442
29443  CFLAGS="$saved_cflags"
29444
29445  saved_cxxflags="$CXXFLAGS"
29446  CXXFLAGS="$CXXFLAG -m${OPENJDK_TARGET_CPU_BITS}"
29447  ac_ext=cpp
29448ac_cpp='$CXXCPP $CPPFLAGS'
29449ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29450ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29451ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29452
29453  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29454/* end confdefs.h.  */
29455
29456    int i;
29457
29458_ACEOF
29459if ac_fn_cxx_try_compile "$LINENO"; then :
29460
29461else
29462  supports=no
29463fi
29464rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29465  ac_ext=cpp
29466ac_cpp='$CXXCPP $CPPFLAGS'
29467ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29468ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29469ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29470
29471  CXXFLAGS="$saved_cxxflags"
29472
29473  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
29474$as_echo "$supports" >&6; }
29475  if test "x$supports" = "xyes" ; then
29476    COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
29477  else
29478    COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
29479  fi
29480
29481
29482
29483
29484# Setup debug symbols (need objcopy from the toolchain for that)
29485
29486#
29487# ENABLE_DEBUG_SYMBOLS
29488# This must be done after the toolchain is setup, since we're looking at objcopy.
29489#
29490# Check whether --enable-debug-symbols was given.
29491if test "${enable_debug_symbols+set}" = set; then :
29492  enableval=$enable_debug_symbols;
29493fi
29494
29495
29496{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should generate debug symbols" >&5
29497$as_echo_n "checking if we should generate debug symbols... " >&6; }
29498
29499if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then
29500   # explicit enabling of enable-debug-symbols and can't find objcopy
29501   #   this is an error
29502   as_fn_error $? "Unable to find objcopy, cannot enable debug-symbols" "$LINENO" 5
29503fi
29504
29505if test "x$enable_debug_symbols" = "xyes"; then
29506  ENABLE_DEBUG_SYMBOLS=true
29507elif test "x$enable_debug_symbols" = "xno"; then
29508  ENABLE_DEBUG_SYMBOLS=false
29509else
29510  # default on macosx is false
29511  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29512    ENABLE_DEBUG_SYMBOLS=false
29513  # Default is on if objcopy is found, otherwise off
29514  elif test "x$OBJCOPY" != x || test "x$OPENJDK_TARGET_OS" = xwindows; then
29515    ENABLE_DEBUG_SYMBOLS=true
29516  else
29517    ENABLE_DEBUG_SYMBOLS=false
29518  fi
29519fi
29520
29521{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_DEBUG_SYMBOLS" >&5
29522$as_echo "$ENABLE_DEBUG_SYMBOLS" >&6; }
29523
29524#
29525# ZIP_DEBUGINFO_FILES
29526#
29527{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should zip debug-info files" >&5
29528$as_echo_n "checking if we should zip debug-info files... " >&6; }
29529# Check whether --enable-zip-debug-info was given.
29530if test "${enable_zip_debug_info+set}" = set; then :
29531  enableval=$enable_zip_debug_info; enable_zip_debug_info="${enableval}"
29532else
29533  enable_zip_debug_info="yes"
29534fi
29535
29536{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_zip_debug_info}" >&5
29537$as_echo "${enable_zip_debug_info}" >&6; }
29538
29539if test "x${enable_zip_debug_info}" = "xno"; then
29540   ZIP_DEBUGINFO_FILES=false
29541else
29542   ZIP_DEBUGINFO_FILES=true
29543fi
29544
29545
29546
29547
29548
29549
29550
29551###############################################################################
29552#
29553# Check dependencies for external and internal libraries.
29554#
29555###############################################################################
29556
29557
29558
29559###############################################################################
29560#
29561# OS specific settings that we never will need to probe.
29562#
29563if test "x$OPENJDK_TARGET_OS" = xlinux; then
29564    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Linux?" >&5
29565$as_echo_n "checking what is not needed on Linux?... " >&6; }
29566    PULSE_NOT_NEEDED=yes
29567    { $as_echo "$as_me:${as_lineno-$LINENO}: result: pulse" >&5
29568$as_echo "pulse" >&6; }
29569fi
29570
29571if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29572    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Solaris?" >&5
29573$as_echo_n "checking what is not needed on Solaris?... " >&6; }
29574    ALSA_NOT_NEEDED=yes
29575    PULSE_NOT_NEEDED=yes
29576    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
29577$as_echo "alsa pulse" >&6; }
29578fi
29579
29580if test "x$OPENJDK_TARGET_OS" = xwindows; then
29581    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Windows?" >&5
29582$as_echo_n "checking what is not needed on Windows?... " >&6; }
29583    CUPS_NOT_NEEDED=yes
29584    ALSA_NOT_NEEDED=yes
29585    PULSE_NOT_NEEDED=yes
29586    X11_NOT_NEEDED=yes
29587    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa cups pulse x11" >&5
29588$as_echo "alsa cups pulse x11" >&6; }
29589fi
29590
29591if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29592    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on MacOSX?" >&5
29593$as_echo_n "checking what is not needed on MacOSX?... " >&6; }
29594    ALSA_NOT_NEEDED=yes
29595    PULSE_NOT_NEEDED=yes
29596    X11_NOT_NEEDED=yes
29597    FREETYPE2_NOT_NEEDED=yes
29598    # If the java runtime framework is disabled, then we need X11.
29599    # This will be adjusted below.
29600    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse x11" >&5
29601$as_echo "alsa pulse x11" >&6; }
29602fi
29603
29604if test "x$OPENJDK_TARGET_OS" = xbsd; then
29605    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on bsd?" >&5
29606$as_echo_n "checking what is not needed on bsd?... " >&6; }
29607    ALSA_NOT_NEEDED=yes
29608    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa" >&5
29609$as_echo "alsa" >&6; }
29610fi
29611
29612if test "x$OPENJDK" = "xfalse"; then
29613    FREETYPE2_NOT_NEEDED=yes
29614fi
29615
29616if test "x$SUPPORT_HEADFUL" = xno; then
29617    X11_NOT_NEEDED=yes
29618fi
29619
29620###############################################################################
29621#
29622# Check for MacOSX support for OpenJDK. If this exists, try to build a JVM
29623# that uses this API.
29624#
29625# Check whether --enable-macosx-runtime-support was given.
29626if test "${enable_macosx_runtime_support+set}" = set; then :
29627  enableval=$enable_macosx_runtime_support; MACOSX_RUNTIME_SUPPORT="${enableval}"
29628else
29629  MACOSX_RUNTIME_SUPPORT="no"
29630fi
29631
29632
29633USE_MACOSX_RUNTIME_SUPPORT=no
29634{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for explicit Java runtime support in the OS" >&5
29635$as_echo_n "checking for explicit Java runtime support in the OS... " >&6; }
29636if test -f /System/Library/Frameworks/JavaVM.framework/Frameworks/JavaRuntimeSupport.framework/Headers/JavaRuntimeSupport.h; then
29637    if test "x$MACOSX_RUNTIME_SUPPORT" != xno; then
29638        MACOSX_RUNTIME_SUPPORT=yes
29639        USE_MACOSX_RUNTIME_SUPPORT=yes
29640        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, does not need alsa freetype2 pulse and X11" >&5
29641$as_echo "yes, does not need alsa freetype2 pulse and X11" >&6; }
29642    else
29643        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, but explicitly disabled." >&5
29644$as_echo "yes, but explicitly disabled." >&6; }
29645    fi
29646else
29647    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29648$as_echo "no" >&6; }
29649fi
29650
29651if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$USE_MACOSX_RUNTIME_SUPPORT" = xno; then
29652    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on an X11 build on MacOSX?" >&5
29653$as_echo_n "checking what is not needed on an X11 build on MacOSX?... " >&6; }
29654    X11_NOT_NEEDED=
29655    FREETYPE2_NOT_NEEDED=
29656    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
29657$as_echo "alsa pulse" >&6; }
29658fi
29659
29660
29661
29662###############################################################################
29663#
29664# Check for X Windows
29665#
29666
29667# Check if the user has specified sysroot, but not --x-includes or --x-libraries.
29668# Make a simple check for the libraries at the sysroot, and setup --x-includes and
29669# --x-libraries for the sysroot, if that seems to be correct.
29670if test "x$SYS_ROOT" != "x/"; then
29671  if test "x$x_includes" = xNONE; then
29672    if test -f "$SYS_ROOT/usr/X11R6/include/X11/Xlib.h"; then
29673      x_includes="$SYS_ROOT/usr/X11R6/include"
29674    elif test -f "$SYS_ROOT/usr/include/X11/Xlib.h"; then
29675      x_includes="$SYS_ROOT/usr/include"
29676    fi
29677  fi
29678  if test "x$x_libraries" = xNONE; then
29679    if test -f "$SYS_ROOT/usr/X11R6/lib/libX11.so"; then
29680      x_libraries="$SYS_ROOT/usr/X11R6/lib"
29681    elif test "$SYS_ROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
29682      x_libraries="$SYS_ROOT/usr/lib64"
29683    elif test -f "$SYS_ROOT/usr/lib/libX11.so"; then
29684      x_libraries="$SYS_ROOT/usr/lib"
29685    fi
29686  fi
29687fi
29688
29689# Now let autoconf do it's magic
29690{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
29691$as_echo_n "checking for X... " >&6; }
29692
29693
29694# Check whether --with-x was given.
29695if test "${with_x+set}" = set; then :
29696  withval=$with_x;
29697fi
29698
29699# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
29700if test "x$with_x" = xno; then
29701  # The user explicitly disabled X.
29702  have_x=disabled
29703else
29704  case $x_includes,$x_libraries in #(
29705    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
29706    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
29707  $as_echo_n "(cached) " >&6
29708else
29709  # One or both of the vars are not set, and there is no cached value.
29710ac_x_includes=no ac_x_libraries=no
29711rm -f -r conftest.dir
29712if mkdir conftest.dir; then
29713  cd conftest.dir
29714  cat >Imakefile <<'_ACEOF'
29715incroot:
29716	@echo incroot='${INCROOT}'
29717usrlibdir:
29718	@echo usrlibdir='${USRLIBDIR}'
29719libdir:
29720	@echo libdir='${LIBDIR}'
29721_ACEOF
29722  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
29723    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
29724    for ac_var in incroot usrlibdir libdir; do
29725      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
29726    done
29727    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
29728    for ac_extension in a so sl dylib la dll; do
29729      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
29730	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
29731	ac_im_usrlibdir=$ac_im_libdir; break
29732      fi
29733    done
29734    # Screen out bogus values from the imake configuration.  They are
29735    # bogus both because they are the default anyway, and because
29736    # using them would break gcc on systems where it needs fixed includes.
29737    case $ac_im_incroot in
29738	/usr/include) ac_x_includes= ;;
29739	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
29740    esac
29741    case $ac_im_usrlibdir in
29742	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
29743	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
29744    esac
29745  fi
29746  cd ..
29747  rm -f -r conftest.dir
29748fi
29749
29750# Standard set of common directories for X headers.
29751# Check X11 before X11Rn because it is often a symlink to the current release.
29752ac_x_header_dirs='
29753/usr/X11/include
29754/usr/X11R7/include
29755/usr/X11R6/include
29756/usr/X11R5/include
29757/usr/X11R4/include
29758
29759/usr/include/X11
29760/usr/include/X11R7
29761/usr/include/X11R6
29762/usr/include/X11R5
29763/usr/include/X11R4
29764
29765/usr/local/X11/include
29766/usr/local/X11R7/include
29767/usr/local/X11R6/include
29768/usr/local/X11R5/include
29769/usr/local/X11R4/include
29770
29771/usr/local/include/X11
29772/usr/local/include/X11R7
29773/usr/local/include/X11R6
29774/usr/local/include/X11R5
29775/usr/local/include/X11R4
29776
29777/usr/X386/include
29778/usr/x386/include
29779/usr/XFree86/include/X11
29780
29781/usr/include
29782/usr/local/include
29783/usr/unsupported/include
29784/usr/athena/include
29785/usr/local/x11r5/include
29786/usr/lpp/Xamples/include
29787
29788/usr/openwin/include
29789/usr/openwin/share/include'
29790
29791if test "$ac_x_includes" = no; then
29792  # Guess where to find include files, by looking for Xlib.h.
29793  # First, try using that file with no special directory specified.
29794  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29795/* end confdefs.h.  */
29796#include <X11/Xlib.h>
29797_ACEOF
29798if ac_fn_cxx_try_cpp "$LINENO"; then :
29799  # We can compile using X headers with no special include directory.
29800ac_x_includes=
29801else
29802  for ac_dir in $ac_x_header_dirs; do
29803  if test -r "$ac_dir/X11/Xlib.h"; then
29804    ac_x_includes=$ac_dir
29805    break
29806  fi
29807done
29808fi
29809rm -f conftest.err conftest.i conftest.$ac_ext
29810fi # $ac_x_includes = no
29811
29812if test "$ac_x_libraries" = no; then
29813  # Check for the libraries.
29814  # See if we find them without any special options.
29815  # Don't add to $LIBS permanently.
29816  ac_save_LIBS=$LIBS
29817  LIBS="-lX11 $LIBS"
29818  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29819/* end confdefs.h.  */
29820#include <X11/Xlib.h>
29821int
29822main ()
29823{
29824XrmInitialize ()
29825  ;
29826  return 0;
29827}
29828_ACEOF
29829if ac_fn_cxx_try_link "$LINENO"; then :
29830  LIBS=$ac_save_LIBS
29831# We can link X programs with no special library path.
29832ac_x_libraries=
29833else
29834  LIBS=$ac_save_LIBS
29835for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
29836do
29837  # Don't even attempt the hair of trying to link an X program!
29838  for ac_extension in a so sl dylib la dll; do
29839    if test -r "$ac_dir/libX11.$ac_extension"; then
29840      ac_x_libraries=$ac_dir
29841      break 2
29842    fi
29843  done
29844done
29845fi
29846rm -f core conftest.err conftest.$ac_objext \
29847    conftest$ac_exeext conftest.$ac_ext
29848fi # $ac_x_libraries = no
29849
29850case $ac_x_includes,$ac_x_libraries in #(
29851  no,* | *,no | *\'*)
29852    # Didn't find X, or a directory has "'" in its name.
29853    ac_cv_have_x="have_x=no";; #(
29854  *)
29855    # Record where we found X for the cache.
29856    ac_cv_have_x="have_x=yes\
29857	ac_x_includes='$ac_x_includes'\
29858	ac_x_libraries='$ac_x_libraries'"
29859esac
29860fi
29861;; #(
29862    *) have_x=yes;;
29863  esac
29864  eval "$ac_cv_have_x"
29865fi # $with_x != no
29866
29867if test "$have_x" != yes; then
29868  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
29869$as_echo "$have_x" >&6; }
29870  no_x=yes
29871else
29872  # If each of the values was on the command line, it overrides each guess.
29873  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
29874  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
29875  # Update the cache value to reflect the command line values.
29876  ac_cv_have_x="have_x=yes\
29877	ac_x_includes='$x_includes'\
29878	ac_x_libraries='$x_libraries'"
29879  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
29880$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
29881fi
29882
29883if test "$no_x" = yes; then
29884  # Not all programs may use this symbol, but it does not hurt to define it.
29885
29886$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
29887
29888  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
29889else
29890  if test -n "$x_includes"; then
29891    X_CFLAGS="$X_CFLAGS -I$x_includes"
29892  fi
29893
29894  # It would also be nice to do this for all -L options, not just this one.
29895  if test -n "$x_libraries"; then
29896    X_LIBS="$X_LIBS -L$x_libraries"
29897    # For Solaris; some versions of Sun CC require a space after -R and
29898    # others require no space.  Words are not sufficient . . . .
29899    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
29900$as_echo_n "checking whether -R must be followed by a space... " >&6; }
29901    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
29902    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
29903    ac_cxx_werror_flag=yes
29904    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29905/* end confdefs.h.  */
29906
29907int
29908main ()
29909{
29910
29911  ;
29912  return 0;
29913}
29914_ACEOF
29915if ac_fn_cxx_try_link "$LINENO"; then :
29916  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29917$as_echo "no" >&6; }
29918       X_LIBS="$X_LIBS -R$x_libraries"
29919else
29920  LIBS="$ac_xsave_LIBS -R $x_libraries"
29921       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29922/* end confdefs.h.  */
29923
29924int
29925main ()
29926{
29927
29928  ;
29929  return 0;
29930}
29931_ACEOF
29932if ac_fn_cxx_try_link "$LINENO"; then :
29933  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
29934$as_echo "yes" >&6; }
29935	  X_LIBS="$X_LIBS -R $x_libraries"
29936else
29937  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
29938$as_echo "neither works" >&6; }
29939fi
29940rm -f core conftest.err conftest.$ac_objext \
29941    conftest$ac_exeext conftest.$ac_ext
29942fi
29943rm -f core conftest.err conftest.$ac_objext \
29944    conftest$ac_exeext conftest.$ac_ext
29945    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
29946    LIBS=$ac_xsave_LIBS
29947  fi
29948
29949  # Check for system-dependent libraries X programs must link with.
29950  # Do this before checking for the system-independent R6 libraries
29951  # (-lICE), since we may need -lsocket or whatever for X linking.
29952
29953  if test "$ISC" = yes; then
29954    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
29955  else
29956    # Martyn Johnson says this is needed for Ultrix, if the X
29957    # libraries were built with DECnet support.  And Karl Berry says
29958    # the Alpha needs dnet_stub (dnet does not exist).
29959    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
29960    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29961/* end confdefs.h.  */
29962
29963/* Override any GCC internal prototype to avoid an error.
29964   Use char because int might match the return type of a GCC
29965   builtin and then its argument prototype would still apply.  */
29966#ifdef __cplusplus
29967extern "C"
29968#endif
29969char XOpenDisplay ();
29970int
29971main ()
29972{
29973return XOpenDisplay ();
29974  ;
29975  return 0;
29976}
29977_ACEOF
29978if ac_fn_cxx_try_link "$LINENO"; then :
29979
29980else
29981  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
29982$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
29983if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
29984  $as_echo_n "(cached) " >&6
29985else
29986  ac_check_lib_save_LIBS=$LIBS
29987LIBS="-ldnet  $LIBS"
29988cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29989/* end confdefs.h.  */
29990
29991/* Override any GCC internal prototype to avoid an error.
29992   Use char because int might match the return type of a GCC
29993   builtin and then its argument prototype would still apply.  */
29994#ifdef __cplusplus
29995extern "C"
29996#endif
29997char dnet_ntoa ();
29998int
29999main ()
30000{
30001return dnet_ntoa ();
30002  ;
30003  return 0;
30004}
30005_ACEOF
30006if ac_fn_cxx_try_link "$LINENO"; then :
30007  ac_cv_lib_dnet_dnet_ntoa=yes
30008else
30009  ac_cv_lib_dnet_dnet_ntoa=no
30010fi
30011rm -f core conftest.err conftest.$ac_objext \
30012    conftest$ac_exeext conftest.$ac_ext
30013LIBS=$ac_check_lib_save_LIBS
30014fi
30015{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
30016$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
30017if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
30018  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
30019fi
30020
30021    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
30022      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
30023$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
30024if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
30025  $as_echo_n "(cached) " >&6
30026else
30027  ac_check_lib_save_LIBS=$LIBS
30028LIBS="-ldnet_stub  $LIBS"
30029cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30030/* end confdefs.h.  */
30031
30032/* Override any GCC internal prototype to avoid an error.
30033   Use char because int might match the return type of a GCC
30034   builtin and then its argument prototype would still apply.  */
30035#ifdef __cplusplus
30036extern "C"
30037#endif
30038char dnet_ntoa ();
30039int
30040main ()
30041{
30042return dnet_ntoa ();
30043  ;
30044  return 0;
30045}
30046_ACEOF
30047if ac_fn_cxx_try_link "$LINENO"; then :
30048  ac_cv_lib_dnet_stub_dnet_ntoa=yes
30049else
30050  ac_cv_lib_dnet_stub_dnet_ntoa=no
30051fi
30052rm -f core conftest.err conftest.$ac_objext \
30053    conftest$ac_exeext conftest.$ac_ext
30054LIBS=$ac_check_lib_save_LIBS
30055fi
30056{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
30057$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
30058if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
30059  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
30060fi
30061
30062    fi
30063fi
30064rm -f core conftest.err conftest.$ac_objext \
30065    conftest$ac_exeext conftest.$ac_ext
30066    LIBS="$ac_xsave_LIBS"
30067
30068    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
30069    # to get the SysV transport functions.
30070    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
30071    # needs -lnsl.
30072    # The nsl library prevents programs from opening the X display
30073    # on Irix 5.2, according to T.E. Dickey.
30074    # The functions gethostbyname, getservbyname, and inet_addr are
30075    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
30076    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
30077if test "x$ac_cv_func_gethostbyname" = xyes; then :
30078
30079fi
30080
30081    if test $ac_cv_func_gethostbyname = no; then
30082      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
30083$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
30084if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
30085  $as_echo_n "(cached) " >&6
30086else
30087  ac_check_lib_save_LIBS=$LIBS
30088LIBS="-lnsl  $LIBS"
30089cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30090/* end confdefs.h.  */
30091
30092/* Override any GCC internal prototype to avoid an error.
30093   Use char because int might match the return type of a GCC
30094   builtin and then its argument prototype would still apply.  */
30095#ifdef __cplusplus
30096extern "C"
30097#endif
30098char gethostbyname ();
30099int
30100main ()
30101{
30102return gethostbyname ();
30103  ;
30104  return 0;
30105}
30106_ACEOF
30107if ac_fn_cxx_try_link "$LINENO"; then :
30108  ac_cv_lib_nsl_gethostbyname=yes
30109else
30110  ac_cv_lib_nsl_gethostbyname=no
30111fi
30112rm -f core conftest.err conftest.$ac_objext \
30113    conftest$ac_exeext conftest.$ac_ext
30114LIBS=$ac_check_lib_save_LIBS
30115fi
30116{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
30117$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
30118if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
30119  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
30120fi
30121
30122      if test $ac_cv_lib_nsl_gethostbyname = no; then
30123	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
30124$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
30125if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
30126  $as_echo_n "(cached) " >&6
30127else
30128  ac_check_lib_save_LIBS=$LIBS
30129LIBS="-lbsd  $LIBS"
30130cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30131/* end confdefs.h.  */
30132
30133/* Override any GCC internal prototype to avoid an error.
30134   Use char because int might match the return type of a GCC
30135   builtin and then its argument prototype would still apply.  */
30136#ifdef __cplusplus
30137extern "C"
30138#endif
30139char gethostbyname ();
30140int
30141main ()
30142{
30143return gethostbyname ();
30144  ;
30145  return 0;
30146}
30147_ACEOF
30148if ac_fn_cxx_try_link "$LINENO"; then :
30149  ac_cv_lib_bsd_gethostbyname=yes
30150else
30151  ac_cv_lib_bsd_gethostbyname=no
30152fi
30153rm -f core conftest.err conftest.$ac_objext \
30154    conftest$ac_exeext conftest.$ac_ext
30155LIBS=$ac_check_lib_save_LIBS
30156fi
30157{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
30158$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
30159if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
30160  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
30161fi
30162
30163      fi
30164    fi
30165
30166    # lieder@skyler.mavd.honeywell.com says without -lsocket,
30167    # socket/setsockopt and other routines are undefined under SCO ODT
30168    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
30169    # on later versions), says Simon Leinen: it contains gethostby*
30170    # variants that don't use the name server (or something).  -lsocket
30171    # must be given before -lnsl if both are needed.  We assume that
30172    # if connect needs -lnsl, so does gethostbyname.
30173    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
30174if test "x$ac_cv_func_connect" = xyes; then :
30175
30176fi
30177
30178    if test $ac_cv_func_connect = no; then
30179      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
30180$as_echo_n "checking for connect in -lsocket... " >&6; }
30181if ${ac_cv_lib_socket_connect+:} false; then :
30182  $as_echo_n "(cached) " >&6
30183else
30184  ac_check_lib_save_LIBS=$LIBS
30185LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
30186cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30187/* end confdefs.h.  */
30188
30189/* Override any GCC internal prototype to avoid an error.
30190   Use char because int might match the return type of a GCC
30191   builtin and then its argument prototype would still apply.  */
30192#ifdef __cplusplus
30193extern "C"
30194#endif
30195char connect ();
30196int
30197main ()
30198{
30199return connect ();
30200  ;
30201  return 0;
30202}
30203_ACEOF
30204if ac_fn_cxx_try_link "$LINENO"; then :
30205  ac_cv_lib_socket_connect=yes
30206else
30207  ac_cv_lib_socket_connect=no
30208fi
30209rm -f core conftest.err conftest.$ac_objext \
30210    conftest$ac_exeext conftest.$ac_ext
30211LIBS=$ac_check_lib_save_LIBS
30212fi
30213{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
30214$as_echo "$ac_cv_lib_socket_connect" >&6; }
30215if test "x$ac_cv_lib_socket_connect" = xyes; then :
30216  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
30217fi
30218
30219    fi
30220
30221    # Guillermo Gomez says -lposix is necessary on A/UX.
30222    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
30223if test "x$ac_cv_func_remove" = xyes; then :
30224
30225fi
30226
30227    if test $ac_cv_func_remove = no; then
30228      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
30229$as_echo_n "checking for remove in -lposix... " >&6; }
30230if ${ac_cv_lib_posix_remove+:} false; then :
30231  $as_echo_n "(cached) " >&6
30232else
30233  ac_check_lib_save_LIBS=$LIBS
30234LIBS="-lposix  $LIBS"
30235cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30236/* end confdefs.h.  */
30237
30238/* Override any GCC internal prototype to avoid an error.
30239   Use char because int might match the return type of a GCC
30240   builtin and then its argument prototype would still apply.  */
30241#ifdef __cplusplus
30242extern "C"
30243#endif
30244char remove ();
30245int
30246main ()
30247{
30248return remove ();
30249  ;
30250  return 0;
30251}
30252_ACEOF
30253if ac_fn_cxx_try_link "$LINENO"; then :
30254  ac_cv_lib_posix_remove=yes
30255else
30256  ac_cv_lib_posix_remove=no
30257fi
30258rm -f core conftest.err conftest.$ac_objext \
30259    conftest$ac_exeext conftest.$ac_ext
30260LIBS=$ac_check_lib_save_LIBS
30261fi
30262{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
30263$as_echo "$ac_cv_lib_posix_remove" >&6; }
30264if test "x$ac_cv_lib_posix_remove" = xyes; then :
30265  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
30266fi
30267
30268    fi
30269
30270    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
30271    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
30272if test "x$ac_cv_func_shmat" = xyes; then :
30273
30274fi
30275
30276    if test $ac_cv_func_shmat = no; then
30277      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
30278$as_echo_n "checking for shmat in -lipc... " >&6; }
30279if ${ac_cv_lib_ipc_shmat+:} false; then :
30280  $as_echo_n "(cached) " >&6
30281else
30282  ac_check_lib_save_LIBS=$LIBS
30283LIBS="-lipc  $LIBS"
30284cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30285/* end confdefs.h.  */
30286
30287/* Override any GCC internal prototype to avoid an error.
30288   Use char because int might match the return type of a GCC
30289   builtin and then its argument prototype would still apply.  */
30290#ifdef __cplusplus
30291extern "C"
30292#endif
30293char shmat ();
30294int
30295main ()
30296{
30297return shmat ();
30298  ;
30299  return 0;
30300}
30301_ACEOF
30302if ac_fn_cxx_try_link "$LINENO"; then :
30303  ac_cv_lib_ipc_shmat=yes
30304else
30305  ac_cv_lib_ipc_shmat=no
30306fi
30307rm -f core conftest.err conftest.$ac_objext \
30308    conftest$ac_exeext conftest.$ac_ext
30309LIBS=$ac_check_lib_save_LIBS
30310fi
30311{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
30312$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
30313if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
30314  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
30315fi
30316
30317    fi
30318  fi
30319
30320  # Check for libraries that X11R6 Xt/Xaw programs need.
30321  ac_save_LDFLAGS=$LDFLAGS
30322  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
30323  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
30324  # check for ICE first), but we must link in the order -lSM -lICE or
30325  # we get undefined symbols.  So assume we have SM if we have ICE.
30326  # These have to be linked with before -lX11, unlike the other
30327  # libraries we check for below, so use a different variable.
30328  # John Interrante, Karl Berry
30329  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
30330$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
30331if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
30332  $as_echo_n "(cached) " >&6
30333else
30334  ac_check_lib_save_LIBS=$LIBS
30335LIBS="-lICE $X_EXTRA_LIBS $LIBS"
30336cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30337/* end confdefs.h.  */
30338
30339/* Override any GCC internal prototype to avoid an error.
30340   Use char because int might match the return type of a GCC
30341   builtin and then its argument prototype would still apply.  */
30342#ifdef __cplusplus
30343extern "C"
30344#endif
30345char IceConnectionNumber ();
30346int
30347main ()
30348{
30349return IceConnectionNumber ();
30350  ;
30351  return 0;
30352}
30353_ACEOF
30354if ac_fn_cxx_try_link "$LINENO"; then :
30355  ac_cv_lib_ICE_IceConnectionNumber=yes
30356else
30357  ac_cv_lib_ICE_IceConnectionNumber=no
30358fi
30359rm -f core conftest.err conftest.$ac_objext \
30360    conftest$ac_exeext conftest.$ac_ext
30361LIBS=$ac_check_lib_save_LIBS
30362fi
30363{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
30364$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
30365if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
30366  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
30367fi
30368
30369  LDFLAGS=$ac_save_LDFLAGS
30370
30371fi
30372
30373
30374# AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
30375# this doesn't make sense so we remove it.
30376if test "x$COMPILE_TYPE" = xcross; then
30377  X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
30378fi
30379
30380if test "x$no_x" = xyes && test "x$X11_NOT_NEEDED" != xyes; then
30381
30382    # Print a helpful message on how to acquire the necessary build dependency.
30383    # x11 is the help tag: freetyp2, cups, pulse, alsa etc
30384    MISSING_DEPENDENCY=x11
30385    PKGHANDLER_COMMAND=
30386
30387    case $PKGHANDLER in
30388	apt-get)
30389                apt_help     $MISSING_DEPENDENCY ;;
30390    yum)
30391                yum_help     $MISSING_DEPENDENCY ;;
30392	port)
30393                port_help    $MISSING_DEPENDENCY ;;
30394	pkgutil)
30395                pkgutil_help $MISSING_DEPENDENCY ;;
30396	pkgadd)
30397                pkgadd_help  $MISSING_DEPENDENCY ;;
30398    * )
30399      break ;;
30400    esac
30401
30402    if test "x$PKGHANDLER_COMMAND" != x; then
30403        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30404    fi
30405
30406    as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
30407fi
30408
30409# Some of the old makefiles require a setting of OPENWIN_HOME
30410# Since the X11R6 directory has disappeared on later Linuxes,
30411# we need to probe for it.
30412if test "x$OPENJDK_TARGET_OS" = xlinux; then
30413    if test -d "$SYS_ROOT/usr/X11R6"; then
30414        OPENWIN_HOME="$SYS_ROOT/usr/X11R6"
30415    elif test -d "$SYS_ROOT/usr/include/X11"; then
30416        OPENWIN_HOME="$SYS_ROOT/usr"
30417    fi
30418fi
30419if test "x$OPENJDK_TARGET_OS" = xsolaris; then
30420    OPENWIN_HOME="/usr/openwin"
30421fi
30422
30423
30424
30425#
30426# Weird Sol10 something check...TODO change to try compile
30427#
30428if test "x${OPENJDK_TARGET_OS}" = xsolaris; then
30429  if test "`uname -r`" = "5.10"; then
30430     if test "`${EGREP} -c XLinearGradient ${OPENWIN_HOME}/share/include/X11/extensions/Xrender.h`" = "0"; then
30431     	X_CFLAGS="${X_CFLAGS} -DSOLARIS10_NO_XRENDER_STRUCTS"
30432     fi
30433  fi
30434fi
30435
30436ac_ext=c
30437ac_cpp='$CPP $CPPFLAGS'
30438ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30439ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30440ac_compiler_gnu=$ac_cv_c_compiler_gnu
30441
30442OLD_CFLAGS="$CFLAGS"
30443CFLAGS="$CFLAGS $X_CFLAGS"
30444
30445# Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
30446for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
30447do :
30448  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
30449ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" " # include <X11/Xlib.h>
30450                   # include <X11/Xutil.h>
30451
30452"
30453if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
30454  cat >>confdefs.h <<_ACEOF
30455#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
30456_ACEOF
30457 X11_A_OK=yes
30458else
30459  X11_A_OK=no; break
30460fi
30461
30462done
30463
30464
30465CFLAGS="$OLD_CFLAGS"
30466ac_ext=cpp
30467ac_cpp='$CXXCPP $CPPFLAGS'
30468ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30469ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30470ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30471
30472
30473if test "x$X11_A_OK" = xno && test "x$X11_NOT_NEEDED" != xyes; then
30474
30475    # Print a helpful message on how to acquire the necessary build dependency.
30476    # x11 is the help tag: freetyp2, cups, pulse, alsa etc
30477    MISSING_DEPENDENCY=x11
30478    PKGHANDLER_COMMAND=
30479
30480    case $PKGHANDLER in
30481	apt-get)
30482                apt_help     $MISSING_DEPENDENCY ;;
30483    yum)
30484                yum_help     $MISSING_DEPENDENCY ;;
30485	port)
30486                port_help    $MISSING_DEPENDENCY ;;
30487	pkgutil)
30488                pkgutil_help $MISSING_DEPENDENCY ;;
30489	pkgadd)
30490                pkgadd_help  $MISSING_DEPENDENCY ;;
30491    * )
30492      break ;;
30493    esac
30494
30495    if test "x$PKGHANDLER_COMMAND" != x; then
30496        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30497    fi
30498
30499    as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
30500fi
30501
30502
30503
30504
30505
30506
30507###############################################################################
30508#
30509# The common unix printing system cups is used to print from java.
30510#
30511
30512# Check whether --with-cups was given.
30513if test "${with_cups+set}" = set; then :
30514  withval=$with_cups;
30515fi
30516
30517
30518# Check whether --with-cups-include was given.
30519if test "${with_cups_include+set}" = set; then :
30520  withval=$with_cups_include;
30521fi
30522
30523
30524if test "x$CUPS_NOT_NEEDED" = xyes; then
30525	if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then
30526		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups is ignored" >&5
30527$as_echo "$as_me: WARNING: cups not used, so --with-cups is ignored" >&2;}
30528	fi
30529	CUPS_CFLAGS=
30530else
30531	CUPS_FOUND=no
30532
30533	if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
30534	    as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
30535	fi
30536
30537	if test "x${with_cups}" != x; then
30538	    CUPS_CFLAGS="-I${with_cups}/include"
30539	    CUPS_FOUND=yes
30540	fi
30541	if test "x${with_cups_include}" != x; then
30542	    CUPS_CFLAGS="-I${with_cups_include}"
30543	    CUPS_FOUND=yes
30544	fi
30545	if test "x$CUPS_FOUND" = xno; then
30546
30547
30548    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
30549        # Source the builddeps file again, to make sure it uses the latest variables!
30550        . $builddepsfile
30551        # Look for a target and build machine specific resource!
30552        eval resource=\${builddep_cups_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
30553        if test "x$resource" = x; then
30554            # Ok, lets instead look for a target specific resource
30555            eval resource=\${builddep_cups_TARGET_${rewritten_target_var}}
30556        fi
30557        if test "x$resource" = x; then
30558            # Ok, lets instead look for a build specific resource
30559            eval resource=\${builddep_cups_BUILD_${rewritten_build_var}}
30560        fi
30561        if test "x$resource" = x; then
30562            # Ok, lets instead look for a generic resource
30563            # (The cups comes from M4 and not the shell, thus no need for eval here.)
30564            resource=${builddep_cups}
30565        fi
30566        if test "x$resource" != x; then
30567            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for cups" >&5
30568$as_echo "$as_me: Using builddeps $resource for cups" >&6;}
30569	    # If the resource in the builddeps.conf file is an existing directory,
30570	    # for example /java/linux/cups
30571	    if test -d ${resource}; then
30572	       depdir=${resource}
30573	    else
30574
30575# cups is for example mymodule
30576# $resource is for example libs/general/libmymod_1_2_3.zip
30577# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
30578# $with_builddeps_dir is for example /localhome/builddeps
30579# depdir is the name of the variable into which we store the depdir, eg MYMOD
30580# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
30581# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
30582    filename=`basename $resource`
30583    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
30584    filebase=${filename%%.*}
30585    extension=${filename#*.}
30586    installdir=$with_builddeps_dir/$filebase
30587    if test ! -f $installdir/$filename.unpacked; then
30588        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&5
30589$as_echo "$as_me: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&6;}
30590        if test ! -d $installdir; then
30591            mkdir -p $installdir
30592        fi
30593        if test ! -d $installdir; then
30594            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
30595        fi
30596        tmpfile=`mktemp $installdir/cups.XXXXXXXXX`
30597        touch $tmpfile
30598        if test ! -f $tmpfile; then
30599            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
30600        fi
30601
30602    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
30603    # $tmpfile is the local file name for the downloaded file.
30604    VALID_TOOL=no
30605    if test "x$BDEPS_FTP" = xwget; then
30606       VALID_TOOL=yes
30607       wget -O $tmpfile $with_builddeps_server/$resource
30608    fi
30609    if test "x$BDEPS_FTP" = xlftp; then
30610       VALID_TOOL=yes
30611       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
30612    fi
30613    if test "x$BDEPS_FTP" = xftp; then
30614        VALID_TOOL=yes
30615        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
30616        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
30617        FTPUSERPWD=${FTPSERVER%%@*}
30618        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
30619            FTPUSER=${userpwd%%:*}
30620            FTPPWD=${userpwd#*@}
30621            FTPSERVER=${FTPSERVER#*@}
30622        else
30623            FTPUSER=ftp
30624            FTPPWD=ftp
30625        fi
30626        # the "pass" command does not work on some
30627        # ftp clients (read ftp.exe) but if it works,
30628        # passive mode is better!
30629        (\
30630            echo "user $FTPUSER $FTPPWD"        ;\
30631            echo "pass"                         ;\
30632            echo "bin"                          ;\
30633            echo "get $FTPPATH $tmpfile"              ;\
30634        ) | ftp -in $FTPSERVER
30635    fi
30636    if test "x$VALID_TOOL" != xyes; then
30637       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
30638    fi
30639
30640        mv $tmpfile $installdir/$filename
30641        if test ! -s $installdir/$filename; then
30642            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
30643        fi
30644        case "$extension" in
30645            zip)  echo "Unzipping $installdir/$filename..."
30646               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
30647            ;;
30648            tar.gz) echo "Untaring $installdir/$filename..."
30649               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
30650            ;;
30651            tgz) echo "Untaring $installdir/$filename..."
30652               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
30653            ;;
30654            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
30655            ;;
30656        esac
30657    fi
30658    if test -f $installdir/$filename.unpacked; then
30659        depdir=$installdir
30660    fi
30661
30662	    fi
30663            # Source the builddeps file again, because in the previous command, the depdir
30664            # was updated to point at the current build dependency install directory.
30665            . $builddepsfile
30666            # Now extract variables from the builddeps.conf files.
30667            theroot=${builddep_cups_ROOT}
30668            thecflags=${builddep_cups_CFLAGS}
30669            thelibs=${builddep_cups_LIBS}
30670            if test "x$depdir" = x; then
30671                as_fn_error $? "Could not download build dependency cups" "$LINENO" 5
30672            fi
30673            CUPS=$depdir
30674            if test "x$theroot" != x; then
30675               CUPS="$theroot"
30676            fi
30677            if test "x$thecflags" != x; then
30678               CUPS_CFLAGS="$thecflags"
30679            fi
30680            if test "x$thelibs" != x; then
30681               CUPS_LIBS="$thelibs"
30682            fi
30683            CUPS_FOUND=yes
30684
30685        fi
30686
30687    fi
30688
30689	fi
30690	if test "x$CUPS_FOUND" = xno; then
30691	    # Are the cups headers installed in the default /usr/include location?
30692	    for ac_header in cups/cups.h cups/ppd.h
30693do :
30694  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
30695ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
30696if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
30697  cat >>confdefs.h <<_ACEOF
30698#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
30699_ACEOF
30700 CUPS_FOUND=yes
30701	                      CUPS_CFLAGS=
30702	                      DEFAULT_CUPS=yes
30703fi
30704
30705done
30706
30707	fi
30708	if test "x$CUPS_FOUND" = xno; then
30709	    # Getting nervous now? Lets poke around for standard Solaris third-party
30710	    # package installation locations.
30711	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
30712$as_echo_n "checking for cups headers... " >&6; }
30713	    if test -s /opt/sfw/cups/include/cups/cups.h; then
30714	       # An SFW package seems to be installed!
30715	       CUPS_FOUND=yes
30716	       CUPS_CFLAGS="-I/opt/sfw/cups/include"
30717	    elif test -s /opt/csw/include/cups/cups.h; then
30718	       # A CSW package seems to be installed!
30719	       CUPS_FOUND=yes
30720	       CUPS_CFLAGS="-I/opt/csw/include"
30721	    fi
30722	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
30723$as_echo "$CUPS_FOUND" >&6; }
30724	fi
30725	if test "x$CUPS_FOUND" = xno; then
30726
30727    # Print a helpful message on how to acquire the necessary build dependency.
30728    # cups is the help tag: freetyp2, cups, pulse, alsa etc
30729    MISSING_DEPENDENCY=cups
30730    PKGHANDLER_COMMAND=
30731
30732    case $PKGHANDLER in
30733	apt-get)
30734                apt_help     $MISSING_DEPENDENCY ;;
30735    yum)
30736                yum_help     $MISSING_DEPENDENCY ;;
30737	port)
30738                port_help    $MISSING_DEPENDENCY ;;
30739	pkgutil)
30740                pkgutil_help $MISSING_DEPENDENCY ;;
30741	pkgadd)
30742                pkgadd_help  $MISSING_DEPENDENCY ;;
30743    * )
30744      break ;;
30745    esac
30746
30747    if test "x$PKGHANDLER_COMMAND" != x; then
30748        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30749    fi
30750
30751	    as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
30752	fi
30753fi
30754
30755
30756
30757
30758
30759
30760###############################################################################
30761#
30762# The ubiquitous freetype2 library is used to render fonts.
30763#
30764
30765# Check whether --with-freetype was given.
30766if test "${with_freetype+set}" = set; then :
30767  withval=$with_freetype;
30768fi
30769
30770
30771# If we are using the OS installed system lib for freetype, then we do not need to copy it to the build tree
30772USING_SYSTEM_FT_LIB=false
30773
30774if test "x$FREETYPE2_NOT_NEEDED" = xyes; then
30775	if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
30776		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype is ignored" >&5
30777$as_echo "$as_me: WARNING: freetype not used, so --with-freetype is ignored" >&2;}
30778	fi
30779	FREETYPE2_CFLAGS=
30780	FREETYPE2_LIBS=
30781        FREETYPE2_LIB_PATH=
30782else
30783	FREETYPE2_FOUND=no
30784
30785	if test "x$with_freetype" != x; then
30786
30787  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30788
30789  # Input might be given as Windows format, start by converting to
30790  # unix format.
30791  path="$with_freetype"
30792  new_path=`$CYGPATH -u "$path"`
30793
30794  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30795  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30796  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30797  # "foo.exe" is OK but "foo" is an error.
30798  #
30799  # This test is therefore slightly more accurate than "test -f" to check for file precense.
30800  # It is also a way to make sure we got the proper file name for the real test later on.
30801  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30802  if test "x$test_shortpath" = x; then
30803    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_freetype, which resolves as \"$path\", is invalid." >&5
30804$as_echo "$as_me: The path of with_freetype, which resolves as \"$path\", is invalid." >&6;}
30805    as_fn_error $? "Cannot locate the the path of with_freetype" "$LINENO" 5
30806  fi
30807
30808  # Call helper function which possibly converts this using DOS-style short mode.
30809  # If so, the updated path is stored in $new_path.
30810
30811  input_path="$new_path"
30812  # Check if we need to convert this using DOS-style short mode. If the path
30813  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30814  # take no chances and rewrite it.
30815  # Note: m4 eats our [], so we need to use [ and ] instead.
30816  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30817  if test "x$has_forbidden_chars" != x; then
30818    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30819    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30820    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30821    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30822      # Going to short mode and back again did indeed matter. Since short mode is
30823      # case insensitive, let's make it lowercase to improve readability.
30824      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30825      # Now convert it back to Unix-stile (cygpath)
30826      input_path=`$CYGPATH -u "$shortmode_path"`
30827      new_path="$input_path"
30828    fi
30829  fi
30830
30831  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30832  if test "x$test_cygdrive_prefix" = x; then
30833    # As a simple fix, exclude /usr/bin since it's not a real path.
30834    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30835      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30836      # a path prefixed by /cygdrive for fixpath to work.
30837      new_path="$CYGWIN_ROOT_PATH$input_path"
30838    fi
30839  fi
30840
30841
30842  if test "x$path" != "x$new_path"; then
30843    with_freetype="$new_path"
30844    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_freetype to \"$new_path\"" >&5
30845$as_echo "$as_me: Rewriting with_freetype to \"$new_path\"" >&6;}
30846  fi
30847
30848  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30849
30850  path="$with_freetype"
30851  has_colon=`$ECHO $path | $GREP ^.:`
30852  new_path="$path"
30853  if test "x$has_colon" = x; then
30854    # Not in mixed or Windows style, start by that.
30855    new_path=`cmd //c echo $path`
30856  fi
30857
30858
30859  input_path="$new_path"
30860  # Check if we need to convert this using DOS-style short mode. If the path
30861  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30862  # take no chances and rewrite it.
30863  # Note: m4 eats our [], so we need to use [ and ] instead.
30864  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30865  if test "x$has_forbidden_chars" != x; then
30866    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30867    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30868  fi
30869
30870
30871  windows_path="$new_path"
30872  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30873    unix_path=`$CYGPATH -u "$windows_path"`
30874    new_path="$unix_path"
30875  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30876    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30877    new_path="$unix_path"
30878  fi
30879
30880  if test "x$path" != "x$new_path"; then
30881    with_freetype="$new_path"
30882    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_freetype to \"$new_path\"" >&5
30883$as_echo "$as_me: Rewriting with_freetype to \"$new_path\"" >&6;}
30884  fi
30885
30886  # Save the first 10 bytes of this path to the storage, so fixpath can work.
30887  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30888
30889  else
30890    # We're on a posix platform. Hooray! :)
30891    path="$with_freetype"
30892    has_space=`$ECHO "$path" | $GREP " "`
30893    if test "x$has_space" != x; then
30894      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_freetype, which resolves as \"$path\", is invalid." >&5
30895$as_echo "$as_me: The path of with_freetype, which resolves as \"$path\", is invalid." >&6;}
30896      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30897    fi
30898
30899    # Use eval to expand a potential ~
30900    eval path="$path"
30901    if test ! -f "$path" && test ! -d "$path"; then
30902      as_fn_error $? "The path of with_freetype, which resolves as \"$path\", is not found." "$LINENO" 5
30903    fi
30904
30905    with_freetype="`cd "$path"; $THEPWDCMD -L`"
30906  fi
30907
30908	    FREETYPE2_LIBS="-L$with_freetype/lib -lfreetype"
30909            FREETYPE2_LIB_PATH="$with_freetype/lib"
30910            if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -d "$with_freetype/lib/amd64"; then
30911                FREETYPE2_LIBS="-L$with_freetype/lib/amd64 -lfreetype"
30912                FREETYPE2_LIB_PATH="$with_freetype/lib/amd64"
30913            fi
30914            if test "x$OPENJDK_TARGET_OS" = xwindows; then
30915                FREETYPE2_LIBS="$with_freetype/lib/freetype.lib"
30916            fi
30917	    FREETYPE2_CFLAGS="-I$with_freetype/include"
30918            if test -s $with_freetype/include/ft2build.h && test -d $with_freetype/include/freetype2/freetype; then
30919                FREETYPE2_CFLAGS="-I$with_freetype/include/freetype2 -I$with_freetype/include"
30920            fi
30921 	    FREETYPE2_FOUND=yes
30922   	    if test "x$FREETYPE2_FOUND" = xyes; then
30923	        # Verify that the directories exist
30924                if ! test -d "$with_freetype/lib" || ! test -d "$with_freetype/include"; then
30925		   as_fn_error $? "Could not find the expected directories $with_freetype/lib and $with_freetype/include" "$LINENO" 5
30926		fi
30927	        # List the contents of the lib.
30928		FREETYPELIB=`ls $with_freetype/lib/libfreetype.so $with_freetype/lib/freetype.dll 2> /dev/null`
30929                if test "x$FREETYPELIB" = x; then
30930		   as_fn_error $? "Could not find libfreetype.so nor freetype.dll in $with_freetype/lib" "$LINENO" 5
30931		fi
30932	        # Check one h-file
30933                if ! test -s "$with_freetype/include/ft2build.h"; then
30934		   as_fn_error $? "Could not find $with_freetype/include/ft2build.h" "$LINENO" 5
30935		fi
30936            fi
30937        fi
30938	if test "x$FREETYPE2_FOUND" = xno; then
30939
30940
30941    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
30942        # Source the builddeps file again, to make sure it uses the latest variables!
30943        . $builddepsfile
30944        # Look for a target and build machine specific resource!
30945        eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
30946        if test "x$resource" = x; then
30947            # Ok, lets instead look for a target specific resource
30948            eval resource=\${builddep_freetype2_TARGET_${rewritten_target_var}}
30949        fi
30950        if test "x$resource" = x; then
30951            # Ok, lets instead look for a build specific resource
30952            eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}}
30953        fi
30954        if test "x$resource" = x; then
30955            # Ok, lets instead look for a generic resource
30956            # (The freetype2 comes from M4 and not the shell, thus no need for eval here.)
30957            resource=${builddep_freetype2}
30958        fi
30959        if test "x$resource" != x; then
30960            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for freetype2" >&5
30961$as_echo "$as_me: Using builddeps $resource for freetype2" >&6;}
30962	    # If the resource in the builddeps.conf file is an existing directory,
30963	    # for example /java/linux/cups
30964	    if test -d ${resource}; then
30965	       depdir=${resource}
30966	    else
30967
30968# freetype2 is for example mymodule
30969# $resource is for example libs/general/libmymod_1_2_3.zip
30970# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
30971# $with_builddeps_dir is for example /localhome/builddeps
30972# depdir is the name of the variable into which we store the depdir, eg MYMOD
30973# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
30974# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
30975    filename=`basename $resource`
30976    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
30977    filebase=${filename%%.*}
30978    extension=${filename#*.}
30979    installdir=$with_builddeps_dir/$filebase
30980    if test ! -f $installdir/$filename.unpacked; then
30981        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&5
30982$as_echo "$as_me: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&6;}
30983        if test ! -d $installdir; then
30984            mkdir -p $installdir
30985        fi
30986        if test ! -d $installdir; then
30987            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
30988        fi
30989        tmpfile=`mktemp $installdir/freetype2.XXXXXXXXX`
30990        touch $tmpfile
30991        if test ! -f $tmpfile; then
30992            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
30993        fi
30994
30995    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
30996    # $tmpfile is the local file name for the downloaded file.
30997    VALID_TOOL=no
30998    if test "x$BDEPS_FTP" = xwget; then
30999       VALID_TOOL=yes
31000       wget -O $tmpfile $with_builddeps_server/$resource
31001    fi
31002    if test "x$BDEPS_FTP" = xlftp; then
31003       VALID_TOOL=yes
31004       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
31005    fi
31006    if test "x$BDEPS_FTP" = xftp; then
31007        VALID_TOOL=yes
31008        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
31009        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
31010        FTPUSERPWD=${FTPSERVER%%@*}
31011        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
31012            FTPUSER=${userpwd%%:*}
31013            FTPPWD=${userpwd#*@}
31014            FTPSERVER=${FTPSERVER#*@}
31015        else
31016            FTPUSER=ftp
31017            FTPPWD=ftp
31018        fi
31019        # the "pass" command does not work on some
31020        # ftp clients (read ftp.exe) but if it works,
31021        # passive mode is better!
31022        (\
31023            echo "user $FTPUSER $FTPPWD"        ;\
31024            echo "pass"                         ;\
31025            echo "bin"                          ;\
31026            echo "get $FTPPATH $tmpfile"              ;\
31027        ) | ftp -in $FTPSERVER
31028    fi
31029    if test "x$VALID_TOOL" != xyes; then
31030       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
31031    fi
31032
31033        mv $tmpfile $installdir/$filename
31034        if test ! -s $installdir/$filename; then
31035            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
31036        fi
31037        case "$extension" in
31038            zip)  echo "Unzipping $installdir/$filename..."
31039               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
31040            ;;
31041            tar.gz) echo "Untaring $installdir/$filename..."
31042               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31043            ;;
31044            tgz) echo "Untaring $installdir/$filename..."
31045               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31046            ;;
31047            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
31048            ;;
31049        esac
31050    fi
31051    if test -f $installdir/$filename.unpacked; then
31052        depdir=$installdir
31053    fi
31054
31055	    fi
31056            # Source the builddeps file again, because in the previous command, the depdir
31057            # was updated to point at the current build dependency install directory.
31058            . $builddepsfile
31059            # Now extract variables from the builddeps.conf files.
31060            theroot=${builddep_freetype2_ROOT}
31061            thecflags=${builddep_freetype2_CFLAGS}
31062            thelibs=${builddep_freetype2_LIBS}
31063            if test "x$depdir" = x; then
31064                as_fn_error $? "Could not download build dependency freetype2" "$LINENO" 5
31065            fi
31066            FREETYPE2=$depdir
31067            if test "x$theroot" != x; then
31068               FREETYPE2="$theroot"
31069            fi
31070            if test "x$thecflags" != x; then
31071               FREETYPE2_CFLAGS="$thecflags"
31072            fi
31073            if test "x$thelibs" != x; then
31074               FREETYPE2_LIBS="$thelibs"
31075            fi
31076            FREETYPE2_FOUND=yes
31077            else FREETYPE2_FOUND=no
31078
31079        fi
31080        else FREETYPE2_FOUND=no
31081
31082    fi
31083
31084            USING_SYSTEM_FT_LIB=true
31085	fi
31086	if test "x$FREETYPE2_FOUND" = xno && test "x$OPENJDK_TARGET_OS" = xwindows; then
31087            FREETYPELOCATION="$PROGRAMFILES/GnuWin32"
31088
31089  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31090
31091  # Input might be given as Windows format, start by converting to
31092  # unix format.
31093  path="$FREETYPELOCATION"
31094  new_path=`$CYGPATH -u "$path"`
31095
31096  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31097  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31098  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31099  # "foo.exe" is OK but "foo" is an error.
31100  #
31101  # This test is therefore slightly more accurate than "test -f" to check for file precense.
31102  # It is also a way to make sure we got the proper file name for the real test later on.
31103  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31104  if test "x$test_shortpath" = x; then
31105    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&5
31106$as_echo "$as_me: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&6;}
31107    as_fn_error $? "Cannot locate the the path of FREETYPELOCATION" "$LINENO" 5
31108  fi
31109
31110  # Call helper function which possibly converts this using DOS-style short mode.
31111  # If so, the updated path is stored in $new_path.
31112
31113  input_path="$new_path"
31114  # Check if we need to convert this using DOS-style short mode. If the path
31115  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31116  # take no chances and rewrite it.
31117  # Note: m4 eats our [], so we need to use [ and ] instead.
31118  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31119  if test "x$has_forbidden_chars" != x; then
31120    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31121    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31122    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31123    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31124      # Going to short mode and back again did indeed matter. Since short mode is
31125      # case insensitive, let's make it lowercase to improve readability.
31126      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31127      # Now convert it back to Unix-stile (cygpath)
31128      input_path=`$CYGPATH -u "$shortmode_path"`
31129      new_path="$input_path"
31130    fi
31131  fi
31132
31133  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31134  if test "x$test_cygdrive_prefix" = x; then
31135    # As a simple fix, exclude /usr/bin since it's not a real path.
31136    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31137      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31138      # a path prefixed by /cygdrive for fixpath to work.
31139      new_path="$CYGWIN_ROOT_PATH$input_path"
31140    fi
31141  fi
31142
31143
31144  if test "x$path" != "x$new_path"; then
31145    FREETYPELOCATION="$new_path"
31146    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPELOCATION to \"$new_path\"" >&5
31147$as_echo "$as_me: Rewriting FREETYPELOCATION to \"$new_path\"" >&6;}
31148  fi
31149
31150  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31151
31152  path="$FREETYPELOCATION"
31153  has_colon=`$ECHO $path | $GREP ^.:`
31154  new_path="$path"
31155  if test "x$has_colon" = x; then
31156    # Not in mixed or Windows style, start by that.
31157    new_path=`cmd //c echo $path`
31158  fi
31159
31160
31161  input_path="$new_path"
31162  # Check if we need to convert this using DOS-style short mode. If the path
31163  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31164  # take no chances and rewrite it.
31165  # Note: m4 eats our [], so we need to use [ and ] instead.
31166  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31167  if test "x$has_forbidden_chars" != x; then
31168    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31169    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31170  fi
31171
31172
31173  windows_path="$new_path"
31174  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31175    unix_path=`$CYGPATH -u "$windows_path"`
31176    new_path="$unix_path"
31177  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31178    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31179    new_path="$unix_path"
31180  fi
31181
31182  if test "x$path" != "x$new_path"; then
31183    FREETYPELOCATION="$new_path"
31184    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPELOCATION to \"$new_path\"" >&5
31185$as_echo "$as_me: Rewriting FREETYPELOCATION to \"$new_path\"" >&6;}
31186  fi
31187
31188  # Save the first 10 bytes of this path to the storage, so fixpath can work.
31189  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31190
31191  else
31192    # We're on a posix platform. Hooray! :)
31193    path="$FREETYPELOCATION"
31194    has_space=`$ECHO "$path" | $GREP " "`
31195    if test "x$has_space" != x; then
31196      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&5
31197$as_echo "$as_me: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&6;}
31198      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31199    fi
31200
31201    # Use eval to expand a potential ~
31202    eval path="$path"
31203    if test ! -f "$path" && test ! -d "$path"; then
31204      as_fn_error $? "The path of FREETYPELOCATION, which resolves as \"$path\", is not found." "$LINENO" 5
31205    fi
31206
31207    FREETYPELOCATION="`cd "$path"; $THEPWDCMD -L`"
31208  fi
31209
31210	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype in some standard windows locations" >&5
31211$as_echo_n "checking for freetype in some standard windows locations... " >&6; }
31212	    if test -s "$FREETYPELOCATION/include/ft2build.h" && test -d "$FREETYPELOCATION/include/freetype2/freetype"; then
31213	        FREETYPE2_CFLAGS="-I$FREETYPELOCATION/include/freetype2 -I$FREETYPELOCATION/include"
31214	        FREETYPE2_LIBS="$FREETYPELOCATION/lib/freetype.lib"
31215 	        FREETYPE2_LIB_PATH="$FREETYPELOCATION/lib"
31216                if ! test -s "$FREETYPE2_LIBS"; then
31217		   as_fn_error $? "Could not find $FREETYPE2_LIBS" "$LINENO" 5
31218		fi
31219                if ! test -s "$FREETYPE2_LIB_PATH/freetype.dll"; then
31220		   as_fn_error $? "Could not find $FREETYPE2_LIB_PATH/freetype.dll" "$LINENO" 5
31221		fi
31222                USING_SYSTEM_FT_LIB=true
31223                FREETYPE2_FOUND=yes
31224	    fi
31225	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE2_FOUND" >&5
31226$as_echo "$FREETYPE2_FOUND" >&6; }
31227        fi
31228	if test "x$FREETYPE2_FOUND" = xno; then
31229
31230pkg_failed=no
31231{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE2" >&5
31232$as_echo_n "checking for FREETYPE2... " >&6; }
31233
31234if test -n "$FREETYPE2_CFLAGS"; then
31235    pkg_cv_FREETYPE2_CFLAGS="$FREETYPE2_CFLAGS"
31236 elif test -n "$PKG_CONFIG"; then
31237    if test -n "$PKG_CONFIG" && \
31238    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
31239  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
31240  ac_status=$?
31241  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31242  test $ac_status = 0; }; then
31243  pkg_cv_FREETYPE2_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
31244else
31245  pkg_failed=yes
31246fi
31247 else
31248    pkg_failed=untried
31249fi
31250if test -n "$FREETYPE2_LIBS"; then
31251    pkg_cv_FREETYPE2_LIBS="$FREETYPE2_LIBS"
31252 elif test -n "$PKG_CONFIG"; then
31253    if test -n "$PKG_CONFIG" && \
31254    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
31255  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
31256  ac_status=$?
31257  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31258  test $ac_status = 0; }; then
31259  pkg_cv_FREETYPE2_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
31260else
31261  pkg_failed=yes
31262fi
31263 else
31264    pkg_failed=untried
31265fi
31266
31267
31268
31269if test $pkg_failed = yes; then
31270
31271if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
31272        _pkg_short_errors_supported=yes
31273else
31274        _pkg_short_errors_supported=no
31275fi
31276        if test $_pkg_short_errors_supported = yes; then
31277	        FREETYPE2_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
31278        else
31279	        FREETYPE2_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
31280        fi
31281	# Put the nasty error message in config.log where it belongs
31282	echo "$FREETYPE2_PKG_ERRORS" >&5
31283
31284	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31285$as_echo "no" >&6; }
31286                FREETYPE2_FOUND=no
31287elif test $pkg_failed = untried; then
31288	FREETYPE2_FOUND=no
31289else
31290	FREETYPE2_CFLAGS=$pkg_cv_FREETYPE2_CFLAGS
31291	FREETYPE2_LIBS=$pkg_cv_FREETYPE2_LIBS
31292        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31293$as_echo "yes" >&6; }
31294	FREETYPE2_FOUND=yes
31295fi
31296            # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
31297            FREETYPE2_LIBS=`$ECHO $FREETYPE2_LIBS | $SED 's/-lz//g'`
31298            USING_SYSTEM_FT_LIB=true
31299            # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
31300            if test "x$FREETYPE2_FOUND" = xyes && test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
31301              FREETYPE2_LIBS=`$ECHO $FREETYPE2_LIBS | $SED 's?/lib?/lib/amd64?g'`
31302            fi
31303	fi
31304	if test "x$FREETYPE2_FOUND" = xno; then
31305	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype in some standard locations" >&5
31306$as_echo_n "checking for freetype in some standard locations... " >&6; }
31307
31308	    if test -s $SYS_ROOT/usr/X11/include/ft2build.h && test -d $SYS_ROOT/usr/X11/include/freetype2/freetype; then
31309	        DEFAULT_FREETYPE_CFLAGS="-I$SYS_ROOT/usr/X11/include/freetype2 -I$SYS_ROOT/usr/X11/include"
31310	        DEFAULT_FREETYPE_LIBS="-L$SYS_ROOT/usr/X11/lib -lfreetype"
31311	    fi
31312	    if test -s $SYS_ROOT/usr/include/ft2build.h && test -d $SYS_ROOT/usr/include/freetype2/freetype; then
31313	        DEFAULT_FREETYPE_CFLAGS="-I$SYS_ROOT/usr/include/freetype2"
31314	        DEFAULT_FREETYPE_LIBS="-lfreetype"
31315	    fi
31316
31317	    PREV_CXXCFLAGS="$CXXFLAGS"
31318	    PREV_LDFLAGS="$LDFLAGS"
31319	    CXXFLAGS="$CXXFLAGS $DEFAULT_FREETYPE_CFLAGS"
31320	    LDFLAGS="$LDFLAGS $DEFAULT_FREETYPE_LIBS"
31321	    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31322/* end confdefs.h.  */
31323#include<ft2build.h>
31324	                    #include FT_FREETYPE_H
31325	                   int main() { return 0; }
31326
31327_ACEOF
31328if ac_fn_cxx_try_link "$LINENO"; then :
31329
31330	                      # Yes, the default cflags and libs did the trick.
31331	                      FREETYPE2_FOUND=yes
31332	                      FREETYPE2_CFLAGS="$DEFAULT_FREETYPE_CFLAGS"
31333	                      FREETYPE2_LIBS="$DEFAULT_FREETYPE_LIBS"
31334
31335else
31336
31337	                      FREETYPE2_FOUND=no
31338
31339fi
31340rm -f core conftest.err conftest.$ac_objext \
31341    conftest$ac_exeext conftest.$ac_ext
31342            CXXCFLAGS="$PREV_CXXFLAGS"
31343	    LDFLAGS="$PREV_LDFLAGS"
31344	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE2_FOUND" >&5
31345$as_echo "$FREETYPE2_FOUND" >&6; }
31346            USING_SYSTEM_FT_LIB=true
31347	fi
31348	if test "x$FREETYPE2_FOUND" = xno; then
31349
31350    # Print a helpful message on how to acquire the necessary build dependency.
31351    # freetype2 is the help tag: freetyp2, cups, pulse, alsa etc
31352    MISSING_DEPENDENCY=freetype2
31353    PKGHANDLER_COMMAND=
31354
31355    case $PKGHANDLER in
31356	apt-get)
31357                apt_help     $MISSING_DEPENDENCY ;;
31358    yum)
31359                yum_help     $MISSING_DEPENDENCY ;;
31360	port)
31361                port_help    $MISSING_DEPENDENCY ;;
31362	pkgutil)
31363                pkgutil_help $MISSING_DEPENDENCY ;;
31364	pkgadd)
31365                pkgadd_help  $MISSING_DEPENDENCY ;;
31366    * )
31367      break ;;
31368    esac
31369
31370    if test "x$PKGHANDLER_COMMAND" != x; then
31371        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
31372    fi
31373
31374		as_fn_error $? "Could not find freetype2! $HELP_MSG " "$LINENO" 5
31375	fi
31376
31377        if test "x$OPENJDK_TARGET_OS" != xwindows; then
31378            # AC_CHECK_LIB does not support use of cl.exe
31379            PREV_LDFLAGS="$LDFLAGS"
31380            LDFLAGS="$FREETYPE2_LIBS"
31381            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FT_Init_FreeType in -lfreetype" >&5
31382$as_echo_n "checking for FT_Init_FreeType in -lfreetype... " >&6; }
31383if ${ac_cv_lib_freetype_FT_Init_FreeType+:} false; then :
31384  $as_echo_n "(cached) " >&6
31385else
31386  ac_check_lib_save_LIBS=$LIBS
31387LIBS="-lfreetype  $LIBS"
31388cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31389/* end confdefs.h.  */
31390
31391/* Override any GCC internal prototype to avoid an error.
31392   Use char because int might match the return type of a GCC
31393   builtin and then its argument prototype would still apply.  */
31394#ifdef __cplusplus
31395extern "C"
31396#endif
31397char FT_Init_FreeType ();
31398int
31399main ()
31400{
31401return FT_Init_FreeType ();
31402  ;
31403  return 0;
31404}
31405_ACEOF
31406if ac_fn_cxx_try_link "$LINENO"; then :
31407  ac_cv_lib_freetype_FT_Init_FreeType=yes
31408else
31409  ac_cv_lib_freetype_FT_Init_FreeType=no
31410fi
31411rm -f core conftest.err conftest.$ac_objext \
31412    conftest$ac_exeext conftest.$ac_ext
31413LIBS=$ac_check_lib_save_LIBS
31414fi
31415{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_freetype_FT_Init_FreeType" >&5
31416$as_echo "$ac_cv_lib_freetype_FT_Init_FreeType" >&6; }
31417if test "x$ac_cv_lib_freetype_FT_Init_FreeType" = xyes; then :
31418  FREETYPE2_FOUND=true
31419else
31420  as_fn_error $? "Could not find freetype2! $HELP_MSG " "$LINENO" 5
31421fi
31422
31423            LDFLAGS="$PREV_LDFLAGS"
31424        fi
31425fi
31426
31427
31428
31429
31430
31431
31432
31433
31434
31435###############################################################################
31436#
31437# Check for alsa headers and libraries. Used on Linux/GNU systems.
31438#
31439
31440# Check whether --with-alsa was given.
31441if test "${with_alsa+set}" = set; then :
31442  withval=$with_alsa;
31443fi
31444
31445
31446# Check whether --with-alsa-include was given.
31447if test "${with_alsa_include+set}" = set; then :
31448  withval=$with_alsa_include;
31449fi
31450
31451
31452# Check whether --with-alsa-lib was given.
31453if test "${with_alsa_lib+set}" = set; then :
31454  withval=$with_alsa_lib;
31455fi
31456
31457
31458if test "x$ALSA_NOT_NEEDED" = xyes; then
31459	if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then
31460		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa is ignored" >&5
31461$as_echo "$as_me: WARNING: alsa not used, so --with-alsa is ignored" >&2;}
31462	fi
31463	ALSA_CFLAGS=
31464	ALSA_LIBS=
31465else
31466	ALSA_FOUND=no
31467
31468	if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
31469	    as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
31470	fi
31471
31472	if test "x${with_alsa}" != x; then
31473	    ALSA_LIBS="-L${with_alsa}/lib -lalsa"
31474	    ALSA_CFLAGS="-I${with_alsa}/include"
31475	    ALSA_FOUND=yes
31476	fi
31477	if test "x${with_alsa_include}" != x; then
31478	    ALSA_CFLAGS="-I${with_alsa_include}"
31479	    ALSA_FOUND=yes
31480	fi
31481	if test "x${with_alsa_lib}" != x; then
31482	    ALSA_LIBS="-L${with_alsa_lib} -lalsa"
31483	    ALSA_FOUND=yes
31484	fi
31485	if test "x$ALSA_FOUND" = xno; then
31486
31487
31488    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
31489        # Source the builddeps file again, to make sure it uses the latest variables!
31490        . $builddepsfile
31491        # Look for a target and build machine specific resource!
31492        eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
31493        if test "x$resource" = x; then
31494            # Ok, lets instead look for a target specific resource
31495            eval resource=\${builddep_alsa_TARGET_${rewritten_target_var}}
31496        fi
31497        if test "x$resource" = x; then
31498            # Ok, lets instead look for a build specific resource
31499            eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}}
31500        fi
31501        if test "x$resource" = x; then
31502            # Ok, lets instead look for a generic resource
31503            # (The alsa comes from M4 and not the shell, thus no need for eval here.)
31504            resource=${builddep_alsa}
31505        fi
31506        if test "x$resource" != x; then
31507            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for alsa" >&5
31508$as_echo "$as_me: Using builddeps $resource for alsa" >&6;}
31509	    # If the resource in the builddeps.conf file is an existing directory,
31510	    # for example /java/linux/cups
31511	    if test -d ${resource}; then
31512	       depdir=${resource}
31513	    else
31514
31515# alsa is for example mymodule
31516# $resource is for example libs/general/libmymod_1_2_3.zip
31517# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
31518# $with_builddeps_dir is for example /localhome/builddeps
31519# depdir is the name of the variable into which we store the depdir, eg MYMOD
31520# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
31521# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
31522    filename=`basename $resource`
31523    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
31524    filebase=${filename%%.*}
31525    extension=${filename#*.}
31526    installdir=$with_builddeps_dir/$filebase
31527    if test ! -f $installdir/$filename.unpacked; then
31528        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&5
31529$as_echo "$as_me: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&6;}
31530        if test ! -d $installdir; then
31531            mkdir -p $installdir
31532        fi
31533        if test ! -d $installdir; then
31534            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
31535        fi
31536        tmpfile=`mktemp $installdir/alsa.XXXXXXXXX`
31537        touch $tmpfile
31538        if test ! -f $tmpfile; then
31539            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
31540        fi
31541
31542    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
31543    # $tmpfile is the local file name for the downloaded file.
31544    VALID_TOOL=no
31545    if test "x$BDEPS_FTP" = xwget; then
31546       VALID_TOOL=yes
31547       wget -O $tmpfile $with_builddeps_server/$resource
31548    fi
31549    if test "x$BDEPS_FTP" = xlftp; then
31550       VALID_TOOL=yes
31551       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
31552    fi
31553    if test "x$BDEPS_FTP" = xftp; then
31554        VALID_TOOL=yes
31555        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
31556        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
31557        FTPUSERPWD=${FTPSERVER%%@*}
31558        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
31559            FTPUSER=${userpwd%%:*}
31560            FTPPWD=${userpwd#*@}
31561            FTPSERVER=${FTPSERVER#*@}
31562        else
31563            FTPUSER=ftp
31564            FTPPWD=ftp
31565        fi
31566        # the "pass" command does not work on some
31567        # ftp clients (read ftp.exe) but if it works,
31568        # passive mode is better!
31569        (\
31570            echo "user $FTPUSER $FTPPWD"        ;\
31571            echo "pass"                         ;\
31572            echo "bin"                          ;\
31573            echo "get $FTPPATH $tmpfile"              ;\
31574        ) | ftp -in $FTPSERVER
31575    fi
31576    if test "x$VALID_TOOL" != xyes; then
31577       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
31578    fi
31579
31580        mv $tmpfile $installdir/$filename
31581        if test ! -s $installdir/$filename; then
31582            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
31583        fi
31584        case "$extension" in
31585            zip)  echo "Unzipping $installdir/$filename..."
31586               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
31587            ;;
31588            tar.gz) echo "Untaring $installdir/$filename..."
31589               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31590            ;;
31591            tgz) echo "Untaring $installdir/$filename..."
31592               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31593            ;;
31594            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
31595            ;;
31596        esac
31597    fi
31598    if test -f $installdir/$filename.unpacked; then
31599        depdir=$installdir
31600    fi
31601
31602	    fi
31603            # Source the builddeps file again, because in the previous command, the depdir
31604            # was updated to point at the current build dependency install directory.
31605            . $builddepsfile
31606            # Now extract variables from the builddeps.conf files.
31607            theroot=${builddep_alsa_ROOT}
31608            thecflags=${builddep_alsa_CFLAGS}
31609            thelibs=${builddep_alsa_LIBS}
31610            if test "x$depdir" = x; then
31611                as_fn_error $? "Could not download build dependency alsa" "$LINENO" 5
31612            fi
31613            ALSA=$depdir
31614            if test "x$theroot" != x; then
31615               ALSA="$theroot"
31616            fi
31617            if test "x$thecflags" != x; then
31618               ALSA_CFLAGS="$thecflags"
31619            fi
31620            if test "x$thelibs" != x; then
31621               ALSA_LIBS="$thelibs"
31622            fi
31623            ALSA_FOUND=yes
31624            else ALSA_FOUND=no
31625
31626        fi
31627        else ALSA_FOUND=no
31628
31629    fi
31630
31631	fi
31632	if test "x$ALSA_FOUND" = xno; then
31633
31634pkg_failed=no
31635{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
31636$as_echo_n "checking for ALSA... " >&6; }
31637
31638if test -n "$ALSA_CFLAGS"; then
31639    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
31640 elif test -n "$PKG_CONFIG"; then
31641    if test -n "$PKG_CONFIG" && \
31642    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
31643  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
31644  ac_status=$?
31645  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31646  test $ac_status = 0; }; then
31647  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
31648else
31649  pkg_failed=yes
31650fi
31651 else
31652    pkg_failed=untried
31653fi
31654if test -n "$ALSA_LIBS"; then
31655    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
31656 elif test -n "$PKG_CONFIG"; then
31657    if test -n "$PKG_CONFIG" && \
31658    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
31659  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
31660  ac_status=$?
31661  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31662  test $ac_status = 0; }; then
31663  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
31664else
31665  pkg_failed=yes
31666fi
31667 else
31668    pkg_failed=untried
31669fi
31670
31671
31672
31673if test $pkg_failed = yes; then
31674
31675if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
31676        _pkg_short_errors_supported=yes
31677else
31678        _pkg_short_errors_supported=no
31679fi
31680        if test $_pkg_short_errors_supported = yes; then
31681	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
31682        else
31683	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
31684        fi
31685	# Put the nasty error message in config.log where it belongs
31686	echo "$ALSA_PKG_ERRORS" >&5
31687
31688	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31689$as_echo "no" >&6; }
31690                ALSA_FOUND=no
31691elif test $pkg_failed = untried; then
31692	ALSA_FOUND=no
31693else
31694	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
31695	ALSA_LIBS=$pkg_cv_ALSA_LIBS
31696        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31697$as_echo "yes" >&6; }
31698	ALSA_FOUND=yes
31699fi
31700	fi
31701	if test "x$ALSA_FOUND" = xno; then
31702	    for ac_header in alsa/asoundlib.h
31703do :
31704  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
31705if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
31706  cat >>confdefs.h <<_ACEOF
31707#define HAVE_ALSA_ASOUNDLIB_H 1
31708_ACEOF
31709 ALSA_FOUND=yes
31710	                      ALSA_CFLAGS=-Iignoreme
31711	                      ALSA_LIBS=-lasound
31712	                      DEFAULT_ALSA=yes
31713else
31714  ALSA_FOUND=no
31715fi
31716
31717done
31718
31719	fi
31720	if test "x$ALSA_FOUND" = xno; then
31721
31722    # Print a helpful message on how to acquire the necessary build dependency.
31723    # alsa is the help tag: freetyp2, cups, pulse, alsa etc
31724    MISSING_DEPENDENCY=alsa
31725    PKGHANDLER_COMMAND=
31726
31727    case $PKGHANDLER in
31728	apt-get)
31729                apt_help     $MISSING_DEPENDENCY ;;
31730    yum)
31731                yum_help     $MISSING_DEPENDENCY ;;
31732	port)
31733                port_help    $MISSING_DEPENDENCY ;;
31734	pkgutil)
31735                pkgutil_help $MISSING_DEPENDENCY ;;
31736	pkgadd)
31737                pkgadd_help  $MISSING_DEPENDENCY ;;
31738    * )
31739      break ;;
31740    esac
31741
31742    if test "x$PKGHANDLER_COMMAND" != x; then
31743        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
31744    fi
31745
31746	    as_fn_error $? "Could not find alsa! $HELP_MSG " "$LINENO" 5
31747	fi
31748fi
31749
31750
31751
31752
31753
31754
31755
31756###############################################################################
31757#
31758# Check for the jpeg library
31759#
31760
31761USE_EXTERNAL_LIBJPEG=true
31762{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -ljpeg" >&5
31763$as_echo_n "checking for main in -ljpeg... " >&6; }
31764if ${ac_cv_lib_jpeg_main+:} false; then :
31765  $as_echo_n "(cached) " >&6
31766else
31767  ac_check_lib_save_LIBS=$LIBS
31768LIBS="-ljpeg  $LIBS"
31769cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31770/* end confdefs.h.  */
31771
31772
31773int
31774main ()
31775{
31776return main ();
31777  ;
31778  return 0;
31779}
31780_ACEOF
31781if ac_fn_cxx_try_link "$LINENO"; then :
31782  ac_cv_lib_jpeg_main=yes
31783else
31784  ac_cv_lib_jpeg_main=no
31785fi
31786rm -f core conftest.err conftest.$ac_objext \
31787    conftest$ac_exeext conftest.$ac_ext
31788LIBS=$ac_check_lib_save_LIBS
31789fi
31790{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_main" >&5
31791$as_echo "$ac_cv_lib_jpeg_main" >&6; }
31792if test "x$ac_cv_lib_jpeg_main" = xyes; then :
31793  cat >>confdefs.h <<_ACEOF
31794#define HAVE_LIBJPEG 1
31795_ACEOF
31796
31797  LIBS="-ljpeg $LIBS"
31798
31799else
31800   USE_EXTERNAL_LIBJPEG=false
31801               { $as_echo "$as_me:${as_lineno-$LINENO}: Will use jpeg decoder bundled with the OpenJDK source" >&5
31802$as_echo "$as_me: Will use jpeg decoder bundled with the OpenJDK source" >&6;}
31803
31804fi
31805
31806
31807
31808###############################################################################
31809#
31810# Check for the gif library
31811#
31812
31813
31814# Check whether --with-giflib was given.
31815if test "${with_giflib+set}" = set; then :
31816  withval=$with_giflib;
31817fi
31818
31819
31820
31821{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
31822$as_echo_n "checking for which giflib to use... " >&6; }
31823
31824# default is bundled
31825DEFAULT_GIFLIB=bundled
31826
31827#
31828# if user didn't specify, use DEFAULT_GIFLIB
31829#
31830if test "x${with_giflib}" = "x"; then
31831    with_giflib=${DEFAULT_GIFLIB}
31832fi
31833
31834{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
31835$as_echo "${with_giflib}" >&6; }
31836
31837if test "x${with_giflib}" = "xbundled"; then
31838    USE_EXTERNAL_LIBGIF=false
31839elif test "x${with_giflib}" = "xsystem"; then
31840    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
31841if test "x$ac_cv_header_gif_lib_h" = xyes; then :
31842
31843else
31844   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
31845fi
31846
31847
31848    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
31849$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
31850if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
31851  $as_echo_n "(cached) " >&6
31852else
31853  ac_check_lib_save_LIBS=$LIBS
31854LIBS="-lgif  $LIBS"
31855cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31856/* end confdefs.h.  */
31857
31858/* Override any GCC internal prototype to avoid an error.
31859   Use char because int might match the return type of a GCC
31860   builtin and then its argument prototype would still apply.  */
31861#ifdef __cplusplus
31862extern "C"
31863#endif
31864char DGifGetCode ();
31865int
31866main ()
31867{
31868return DGifGetCode ();
31869  ;
31870  return 0;
31871}
31872_ACEOF
31873if ac_fn_cxx_try_link "$LINENO"; then :
31874  ac_cv_lib_gif_DGifGetCode=yes
31875else
31876  ac_cv_lib_gif_DGifGetCode=no
31877fi
31878rm -f core conftest.err conftest.$ac_objext \
31879    conftest$ac_exeext conftest.$ac_ext
31880LIBS=$ac_check_lib_save_LIBS
31881fi
31882{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
31883$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
31884if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
31885  cat >>confdefs.h <<_ACEOF
31886#define HAVE_LIBGIF 1
31887_ACEOF
31888
31889  LIBS="-lgif $LIBS"
31890
31891else
31892   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
31893fi
31894
31895
31896    USE_EXTERNAL_LIBGIF=true
31897else
31898    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
31899fi
31900
31901
31902###############################################################################
31903#
31904# Check for the zlib library
31905#
31906
31907
31908# Check whether --with-zlib was given.
31909if test "${with_zlib+set}" = set; then :
31910  withval=$with_zlib;
31911fi
31912
31913
31914{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
31915$as_echo_n "checking for compress in -lz... " >&6; }
31916if ${ac_cv_lib_z_compress+:} false; then :
31917  $as_echo_n "(cached) " >&6
31918else
31919  ac_check_lib_save_LIBS=$LIBS
31920LIBS="-lz  $LIBS"
31921cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31922/* end confdefs.h.  */
31923
31924/* Override any GCC internal prototype to avoid an error.
31925   Use char because int might match the return type of a GCC
31926   builtin and then its argument prototype would still apply.  */
31927#ifdef __cplusplus
31928extern "C"
31929#endif
31930char compress ();
31931int
31932main ()
31933{
31934return compress ();
31935  ;
31936  return 0;
31937}
31938_ACEOF
31939if ac_fn_cxx_try_link "$LINENO"; then :
31940  ac_cv_lib_z_compress=yes
31941else
31942  ac_cv_lib_z_compress=no
31943fi
31944rm -f core conftest.err conftest.$ac_objext \
31945    conftest$ac_exeext conftest.$ac_ext
31946LIBS=$ac_check_lib_save_LIBS
31947fi
31948{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
31949$as_echo "$ac_cv_lib_z_compress" >&6; }
31950if test "x$ac_cv_lib_z_compress" = xyes; then :
31951   ZLIB_FOUND=yes
31952else
31953   ZLIB_FOUND=no
31954fi
31955
31956
31957{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
31958$as_echo_n "checking for which zlib to use... " >&6; }
31959
31960DEFAULT_ZLIB=bundled
31961if test "x$OPENJDK_TARGET_OS" = xmacosx; then
31962#
31963# On macosx default is system...on others default is
31964#
31965    DEFAULT_ZLIB=system
31966fi
31967
31968if test "x${ZLIB_FOUND}" != "xyes"; then
31969#
31970# If we don't find any system...set default to bundled
31971#
31972    DEFAULT_ZLIB=bundled
31973fi
31974
31975#
31976# If user didn't specify, use DEFAULT_ZLIB
31977#
31978if test "x${with_zlib}" = "x"; then
31979    with_zlib=${DEFAULT_ZLIB}
31980fi
31981
31982if test "x${with_zlib}" = "xbundled"; then
31983    USE_EXTERNAL_LIBZ=false
31984    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
31985$as_echo "bundled" >&6; }
31986elif test "x${with_zlib}" = "xsystem"; then
31987    if test "x${ZLIB_FOUND}" = "xyes"; then
31988        USE_EXTERNAL_LIBZ=true
31989        { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
31990$as_echo "system" >&6; }
31991    else
31992        { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
31993$as_echo "system not found" >&6; }
31994        as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
31995    fi
31996else
31997    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
31998fi
31999
32000
32001
32002###############################################################################
32003LIBZIP_CAN_USE_MMAP=true
32004
32005
32006
32007###############################################################################
32008#
32009# Check if altzone exists in time.h
32010#
32011
32012cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32013/* end confdefs.h.  */
32014#include <time.h>
32015int
32016main ()
32017{
32018return (int)altzone;
32019  ;
32020  return 0;
32021}
32022_ACEOF
32023if ac_fn_cxx_try_link "$LINENO"; then :
32024  has_altzone=yes
32025else
32026  has_altzone=no
32027fi
32028rm -f core conftest.err conftest.$ac_objext \
32029    conftest$ac_exeext conftest.$ac_ext
32030if test "x$has_altzone" = xyes; then
32031
32032$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
32033
32034fi
32035
32036###############################################################################
32037#
32038# Check the maths library
32039#
32040
32041{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
32042$as_echo_n "checking for cos in -lm... " >&6; }
32043if ${ac_cv_lib_m_cos+:} false; then :
32044  $as_echo_n "(cached) " >&6
32045else
32046  ac_check_lib_save_LIBS=$LIBS
32047LIBS="-lm  $LIBS"
32048cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32049/* end confdefs.h.  */
32050
32051/* Override any GCC internal prototype to avoid an error.
32052   Use char because int might match the return type of a GCC
32053   builtin and then its argument prototype would still apply.  */
32054#ifdef __cplusplus
32055extern "C"
32056#endif
32057char cos ();
32058int
32059main ()
32060{
32061return cos ();
32062  ;
32063  return 0;
32064}
32065_ACEOF
32066if ac_fn_cxx_try_link "$LINENO"; then :
32067  ac_cv_lib_m_cos=yes
32068else
32069  ac_cv_lib_m_cos=no
32070fi
32071rm -f core conftest.err conftest.$ac_objext \
32072    conftest$ac_exeext conftest.$ac_ext
32073LIBS=$ac_check_lib_save_LIBS
32074fi
32075{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
32076$as_echo "$ac_cv_lib_m_cos" >&6; }
32077if test "x$ac_cv_lib_m_cos" = xyes; then :
32078  cat >>confdefs.h <<_ACEOF
32079#define HAVE_LIBM 1
32080_ACEOF
32081
32082  LIBS="-lm $LIBS"
32083
32084else
32085
32086                  { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
32087$as_echo "$as_me: Maths library was not found" >&6;}
32088
32089fi
32090
32091
32092
32093###############################################################################
32094#
32095# Check for libdl.so
32096
32097save_LIBS="$LIBS"
32098LIBS=""
32099{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
32100$as_echo_n "checking for dlopen in -ldl... " >&6; }
32101if ${ac_cv_lib_dl_dlopen+:} false; then :
32102  $as_echo_n "(cached) " >&6
32103else
32104  ac_check_lib_save_LIBS=$LIBS
32105LIBS="-ldl  $LIBS"
32106cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32107/* end confdefs.h.  */
32108
32109/* Override any GCC internal prototype to avoid an error.
32110   Use char because int might match the return type of a GCC
32111   builtin and then its argument prototype would still apply.  */
32112#ifdef __cplusplus
32113extern "C"
32114#endif
32115char dlopen ();
32116int
32117main ()
32118{
32119return dlopen ();
32120  ;
32121  return 0;
32122}
32123_ACEOF
32124if ac_fn_cxx_try_link "$LINENO"; then :
32125  ac_cv_lib_dl_dlopen=yes
32126else
32127  ac_cv_lib_dl_dlopen=no
32128fi
32129rm -f core conftest.err conftest.$ac_objext \
32130    conftest$ac_exeext conftest.$ac_ext
32131LIBS=$ac_check_lib_save_LIBS
32132fi
32133{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
32134$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
32135if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
32136  cat >>confdefs.h <<_ACEOF
32137#define HAVE_LIBDL 1
32138_ACEOF
32139
32140  LIBS="-ldl $LIBS"
32141
32142fi
32143
32144LIBDL="$LIBS"
32145
32146LIBS="$save_LIBS"
32147
32148
32149
32150###############################################################################
32151#
32152# statically link libstdc++ before C++ ABI is stablized on Linux unless
32153# dynamic build is configured on command line.
32154#
32155
32156# Check whether --with-stdc++lib was given.
32157if test "${with_stdc__lib+set}" = set; then :
32158  withval=$with_stdc__lib;
32159    if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
32160        && test "x$with_stdc__lib" != xdefault; then
32161      as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
32162    fi
32163
32164else
32165  with_stdc__lib=default
32166
32167fi
32168
32169
32170if test "x$OPENJDK_TARGET_OS" = xlinux; then
32171    # Test if -lstdc++ works.
32172    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
32173$as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
32174    ac_ext=cpp
32175ac_cpp='$CXXCPP $CPPFLAGS'
32176ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32177ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32178ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32179
32180    OLD_CXXFLAGS="$CXXFLAGS"
32181    CXXFLAGS="$CXXFLAGS -lstdc++"
32182    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32183/* end confdefs.h.  */
32184
32185int
32186main ()
32187{
32188return 0;
32189  ;
32190  return 0;
32191}
32192_ACEOF
32193if ac_fn_cxx_try_link "$LINENO"; then :
32194  has_dynamic_libstdcxx=yes
32195else
32196  has_dynamic_libstdcxx=no
32197fi
32198rm -f core conftest.err conftest.$ac_objext \
32199    conftest$ac_exeext conftest.$ac_ext
32200    CXXFLAGS="$OLD_CXXFLAGS"
32201    ac_ext=cpp
32202ac_cpp='$CXXCPP $CPPFLAGS'
32203ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32204ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32205ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32206
32207    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
32208$as_echo "$has_dynamic_libstdcxx" >&6; }
32209
32210    # Test if stdc++ can be linked statically.
32211    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
32212$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
32213    STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
32214    ac_ext=cpp
32215ac_cpp='$CXXCPP $CPPFLAGS'
32216ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32217ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32218ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32219
32220    OLD_LIBS="$LIBS"
32221    OLD_CXX="$CXX"
32222    LIBS="$STATIC_STDCXX_FLAGS"
32223    CXX="$CC"
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_static_libstdcxx=yes
32237else
32238  has_static_libstdcxx=no
32239fi
32240rm -f core conftest.err conftest.$ac_objext \
32241    conftest$ac_exeext conftest.$ac_ext
32242    LIBS="$OLD_LIBS"
32243    CXX="$OLD_CXX"
32244    ac_ext=cpp
32245ac_cpp='$CXXCPP $CPPFLAGS'
32246ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32247ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32248ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32249
32250    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
32251$as_echo "$has_static_libstdcxx" >&6; }
32252
32253    if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
32254        as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
32255    fi
32256
32257    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
32258        as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
32259    fi
32260
32261    if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
32262        as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
32263    fi
32264
32265    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
32266$as_echo_n "checking how to link with libstdc++... " >&6; }
32267    # If dynamic was requested, it's available since it would fail above otherwise.
32268    # If dynamic wasn't requested, go with static unless it isn't available.
32269    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
32270        LIBCXX="$LIBCXX -lstdc++"
32271        LDCXX="$CXX"
32272        STATIC_CXX_SETTING="STATIC_CXX=false"
32273        { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
32274$as_echo "dynamic" >&6; }
32275    else
32276        LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
32277        LDCXX="$CC"
32278        STATIC_CXX_SETTING="STATIC_CXX=true"
32279        { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
32280$as_echo "static" >&6; }
32281    fi
32282fi
32283
32284
32285if test "x$JVM_VARIANT_ZERO" = xtrue || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
32286    # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
32287
32288pkg_failed=no
32289{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
32290$as_echo_n "checking for LIBFFI... " >&6; }
32291
32292if test -n "$LIBFFI_CFLAGS"; then
32293    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
32294 elif test -n "$PKG_CONFIG"; then
32295    if test -n "$PKG_CONFIG" && \
32296    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
32297  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
32298  ac_status=$?
32299  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32300  test $ac_status = 0; }; then
32301  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
32302else
32303  pkg_failed=yes
32304fi
32305 else
32306    pkg_failed=untried
32307fi
32308if test -n "$LIBFFI_LIBS"; then
32309    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
32310 elif test -n "$PKG_CONFIG"; then
32311    if test -n "$PKG_CONFIG" && \
32312    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
32313  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
32314  ac_status=$?
32315  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32316  test $ac_status = 0; }; then
32317  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
32318else
32319  pkg_failed=yes
32320fi
32321 else
32322    pkg_failed=untried
32323fi
32324
32325
32326
32327if test $pkg_failed = yes; then
32328
32329if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
32330        _pkg_short_errors_supported=yes
32331else
32332        _pkg_short_errors_supported=no
32333fi
32334        if test $_pkg_short_errors_supported = yes; then
32335	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
32336        else
32337	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
32338        fi
32339	# Put the nasty error message in config.log where it belongs
32340	echo "$LIBFFI_PKG_ERRORS" >&5
32341
32342	as_fn_error $? "Package requirements (libffi) were not met:
32343
32344$LIBFFI_PKG_ERRORS
32345
32346Consider adjusting the PKG_CONFIG_PATH environment variable if you
32347installed software in a non-standard prefix.
32348
32349Alternatively, you may set the environment variables LIBFFI_CFLAGS
32350and LIBFFI_LIBS to avoid the need to call pkg-config.
32351See the pkg-config man page for more details.
32352" "$LINENO" 5
32353elif test $pkg_failed = untried; then
32354	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32355$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32356as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
32357is in your PATH or set the PKG_CONFIG environment variable to the full
32358path to pkg-config.
32359
32360Alternatively, you may set the environment variables LIBFFI_CFLAGS
32361and LIBFFI_LIBS to avoid the need to call pkg-config.
32362See the pkg-config man page for more details.
32363
32364To get pkg-config, see <http://pkg-config.freedesktop.org/>.
32365See \`config.log' for more details" "$LINENO" 5; }
32366else
32367	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
32368	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
32369        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32370$as_echo "yes" >&6; }
32371	:
32372fi
32373
32374fi
32375
32376if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
32377    # Extract the first word of "llvm-config", so it can be a program name with args.
32378set dummy llvm-config; ac_word=$2
32379{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32380$as_echo_n "checking for $ac_word... " >&6; }
32381if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
32382  $as_echo_n "(cached) " >&6
32383else
32384  if test -n "$LLVM_CONFIG"; then
32385  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
32386else
32387as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32388for as_dir in $PATH
32389do
32390  IFS=$as_save_IFS
32391  test -z "$as_dir" && as_dir=.
32392    for ac_exec_ext in '' $ac_executable_extensions; do
32393  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32394    ac_cv_prog_LLVM_CONFIG="llvm-config"
32395    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32396    break 2
32397  fi
32398done
32399  done
32400IFS=$as_save_IFS
32401
32402fi
32403fi
32404LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
32405if test -n "$LLVM_CONFIG"; then
32406  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
32407$as_echo "$LLVM_CONFIG" >&6; }
32408else
32409  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32410$as_echo "no" >&6; }
32411fi
32412
32413
32414
32415    if test "x$LLVM_CONFIG" != xllvm-config; then
32416        as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
32417    fi
32418
32419    llvm_components="jit mcjit engine nativecodegen native"
32420    unset LLVM_CFLAGS
32421    for flag in $("$LLVM_CONFIG" --cxxflags); do
32422      if echo "${flag}" | grep -q '^-[ID]'; then
32423        if test "${flag}" != "-D_DEBUG" ; then
32424          if test "${LLVM_CFLAGS}" != "" ; then
32425            LLVM_CFLAGS="${LLVM_CFLAGS} "
32426          fi
32427          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
32428        fi
32429      fi
32430    done
32431    llvm_version=$("${LLVM_CONFIG}" --version | sed 's/\.//; s/svn.*//')
32432    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
32433
32434    unset LLVM_LDFLAGS
32435    for flag in $("${LLVM_CONFIG}" --ldflags); do
32436      if echo "${flag}" | grep -q '^-L'; then
32437        if test "${LLVM_LDFLAGS}" != ""; then
32438          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
32439        fi
32440        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
32441      fi
32442    done
32443
32444    unset LLVM_LIBS
32445    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
32446      if echo "${flag}" | grep -q '^-l'; then
32447        if test "${LLVM_LIBS}" != ""; then
32448          LLVM_LIBS="${LLVM_LIBS} "
32449        fi
32450        LLVM_LIBS="${LLVM_LIBS}${flag}"
32451      fi
32452    done
32453
32454
32455
32456
32457fi
32458
32459# libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
32460if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$LIBCXX" = x; then
32461    LIBCXX="/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
32462fi
32463
32464# TODO better (platform agnostic) test
32465if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$GCC" = xyes; then
32466    LIBCXX="-lstdc++"
32467fi
32468
32469
32470
32471
32472
32473# After we have toolchain and the paths to all libraries (needed by msys), we can compile the fixpath helper
32474
32475# When using cygwin or msys, we need a wrapper binary that renames
32476# /cygdrive/c/ arguments into c:/ arguments and peeks into
32477# @files and rewrites these too! This wrapper binary is
32478# called fixpath.
32479FIXPATH=
32480if test "x$OPENJDK_BUILD_OS" = xwindows; then
32481    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
32482$as_echo_n "checking if fixpath can be created... " >&6; }
32483    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
32484    FIXPATH_BIN="$OUTPUT_ROOT/fixpath.exe"
32485    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
32486      FIXPATH_SRC=`$CYGPATH -m $FIXPATH_SRC`
32487      FIXPATH_BIN=`$CYGPATH -m $FIXPATH_BIN`
32488      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
32489      FIXPATH="$OUTPUT_ROOT/fixpath.exe -c"
32490    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
32491      FIXPATH_SRC=`cmd //c echo $FIXPATH_SRC`
32492      FIXPATH_BIN=`cmd //c echo $FIXPATH_BIN`
32493
32494      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
32495      # @ was chosen as separator to minimize risk of other tools messing around with it
32496      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" | tr ' ' '\n' | grep '^/./' | sort | uniq`
32497      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
32498
32499      FIXPATH="$OUTPUT_ROOT/fixpath -m$fixpath_argument_list"
32500    fi
32501    rm -f $OUTPUT_ROOT/fixpath*
32502    cd $OUTPUT_ROOT
32503    $CC $FIXPATH_SRC -Fe$FIXPATH_BIN > $OUTPUT_ROOT/fixpath1.log 2>&1
32504    cd $CURDIR
32505
32506    if test ! -x $OUTPUT_ROOT/fixpath.exe; then
32507        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32508$as_echo "no" >&6; }
32509        cat $OUTPUT_ROOT/fixpath1.log
32510        as_fn_error $? "Could not create $OUTPUT_ROOT/fixpath.exe" "$LINENO" 5
32511    fi
32512    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32513$as_echo "yes" >&6; }
32514    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
32515$as_echo_n "checking if fixpath.exe works... " >&6; }
32516    cd $OUTPUT_ROOT
32517    $FIXPATH $CC $SRC_ROOT/common/src/fixpath.c -Fe$OUTPUT_ROOT/fixpath2.exe > $OUTPUT_ROOT/fixpath2.log 2>&1
32518    cd $CURDIR
32519    if test ! -x $OUTPUT_ROOT/fixpath2.exe; then
32520        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32521$as_echo "no" >&6; }
32522        cat $OUTPUT_ROOT/fixpath2.log
32523        as_fn_error $? "fixpath did not work!" "$LINENO" 5
32524    fi
32525    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32526$as_echo "yes" >&6; }
32527    rm -f $OUTPUT_ROOT/fixpath?.??? $OUTPUT_ROOT/fixpath.obj
32528fi
32529
32530
32531
32532
32533###############################################################################
32534#
32535# We need to do some final tweaking, when everything else is done.
32536#
32537###############################################################################
32538
32539
32540HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
32541
32542
32543# The name of the Service Agent jar.
32544SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
32545if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
32546  SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
32547fi
32548
32549
32550
32551
32552{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
32553$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
32554
32555if test -d "${SRC_ROOT}/jdk/src/share/native/sun/security/ec/impl"; then
32556    ENABLE_INTREE_EC=yes
32557    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32558$as_echo "yes" >&6; }
32559else
32560    ENABLE_INTREE_EC=no
32561    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32562$as_echo "no" >&6; }
32563fi
32564
32565
32566
32567
32568###############################################################################
32569#
32570# Configure parts of the build that only affect the build performance,
32571# not the result.
32572#
32573###############################################################################
32574
32575
32576  # How many cores do we have on this build system?
32577
32578# Check whether --with-num-cores was given.
32579if test "${with_num_cores+set}" = set; then :
32580  withval=$with_num_cores;
32581fi
32582
32583  if test "x$with_num_cores" = x; then
32584    # The number of cores were not specified, try to probe them.
32585
32586    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
32587$as_echo_n "checking for number of cores... " >&6; }
32588    NUM_CORES=1
32589    FOUND_CORES=no
32590
32591    if test -f /proc/cpuinfo; then
32592        # Looks like a Linux (or cygwin) system
32593        NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
32594        FOUND_CORES=yes
32595    elif test -x /usr/sbin/psrinfo; then
32596        # Looks like a Solaris system
32597        NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
32598        FOUND_CORES=yes
32599    elif test -x /usr/sbin/system_profiler; then
32600        # Looks like a MacOSX system
32601        NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print $5}'`
32602        FOUND_CORES=yes
32603    elif test -n "$NUMBER_OF_PROCESSORS"; then
32604        # On windows, look in the env
32605        NUM_CORES=$NUMBER_OF_PROCESSORS
32606        FOUND_CORES=yes
32607    fi
32608
32609    if test "x$FOUND_CORES" = xyes; then
32610        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
32611$as_echo "$NUM_CORES" >&6; }
32612    else
32613        { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
32614$as_echo "could not detect number of cores, defaulting to 1" >&6; }
32615        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
32616$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
32617    fi
32618
32619
32620  else
32621    NUM_CORES=$with_num_cores
32622  fi
32623
32624
32625
32626  # How much memory do we have on this build system?
32627
32628# Check whether --with-memory-size was given.
32629if test "${with_memory_size+set}" = set; then :
32630  withval=$with_memory_size;
32631fi
32632
32633  if test "x$with_memory_size" = x; then
32634    # The memory size was not specified, try to probe it.
32635
32636    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
32637$as_echo_n "checking for memory size... " >&6; }
32638    # Default to 1024 MB
32639    MEMORY_SIZE=1024
32640    FOUND_MEM=no
32641
32642    if test -f /proc/meminfo; then
32643        # Looks like a Linux (or cygwin) system
32644        MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
32645        MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
32646        FOUND_MEM=yes
32647    elif test -x /usr/sbin/prtconf; then
32648        # Looks like a Solaris system
32649        MEMORY_SIZE=`/usr/sbin/prtconf | grep "Memory size" | awk '{ print $3 }'`
32650        FOUND_MEM=yes
32651    elif test -x /usr/sbin/system_profiler; then
32652        # Looks like a MacOSX system
32653        MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print $2}'`
32654        MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
32655        FOUND_MEM=yes
32656    elif test "x$OPENJDK_BUILD_OS" = xwindows; then
32657        # Windows, but without cygwin
32658        MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
32659        MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
32660        FOUND_MEM=yes
32661    fi
32662
32663    if test "x$FOUND_MEM" = xyes; then
32664        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
32665$as_echo "$MEMORY_SIZE MB" >&6; }
32666    else
32667        { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to 1024 MB" >&5
32668$as_echo "could not detect memory size, defaulting to 1024 MB" >&6; }
32669        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
32670$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
32671    fi
32672
32673  else
32674    MEMORY_SIZE=$with_memory_size
32675  fi
32676
32677
32678
32679  # Provide a decent default number of parallel jobs for make depending on
32680  # number of cores, amount of memory and machine architecture.
32681
32682# Check whether --with-jobs was given.
32683if test "${with_jobs+set}" = set; then :
32684  withval=$with_jobs;
32685fi
32686
32687  if test "x$with_jobs" = x; then
32688    # Number of jobs was not specified, calculate.
32689    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
32690$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
32691    # Approximate memory in GB, rounding up a bit.
32692    memory_gb=`expr $MEMORY_SIZE / 1100`
32693    # Pick the lowest of memory in gb and number of cores.
32694    if test "$memory_gb" -lt "$NUM_CORES"; then
32695      JOBS="$memory_gb"
32696    else
32697      JOBS="$NUM_CORES"
32698      # On bigger machines, leave some room for other processes to run
32699      if test "$JOBS" -gt "4"; then
32700        JOBS=`expr $JOBS '*' 90 / 100`
32701      fi
32702    fi
32703    # Cap number of jobs to 16
32704    if test "$JOBS" -gt "16"; then
32705      JOBS=16
32706    fi
32707    if test "$JOBS" -eq "0"; then
32708      JOBS=1
32709    fi
32710    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
32711$as_echo "$JOBS" >&6; }
32712  else
32713    JOBS=$with_jobs
32714  fi
32715
32716
32717
32718# Setup smart javac (after cores and memory have been setup)
32719
32720
32721# Check whether --with-sjavac-server-java was given.
32722if test "${with_sjavac_server_java+set}" = set; then :
32723  withval=$with_sjavac_server_java;
32724fi
32725
32726
32727if test "x$with_sjavac_server_java" != x; then
32728    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
32729    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
32730    if test "x$FOUND_VERSION" = x; then
32731        as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
32732    fi
32733else
32734    SJAVAC_SERVER_JAVA=""
32735    # Hotspot specific options.
32736
32737    $ECHO "Check if jvm arg is ok: -verbosegc" >&5
32738    $ECHO "Command: $JAVA -verbosegc -version" >&5
32739    OUTPUT=`$JAVA -verbosegc -version 2>&1`
32740    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
32741    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
32742    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32743        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -verbosegc"
32744	JVM_ARG_OK=true
32745    else
32746	$ECHO "Arg failed:" >&5
32747	$ECHO "$OUTPUT" >&5
32748	JVM_ARG_OK=false
32749    fi
32750
32751    # JRockit specific options.
32752
32753    $ECHO "Check if jvm arg is ok: -Xverbose:gc" >&5
32754    $ECHO "Command: $JAVA -Xverbose:gc -version" >&5
32755    OUTPUT=`$JAVA -Xverbose:gc -version 2>&1`
32756    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
32757    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
32758    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32759        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xverbose:gc"
32760	JVM_ARG_OK=true
32761    else
32762	$ECHO "Arg failed:" >&5
32763	$ECHO "$OUTPUT" >&5
32764	JVM_ARG_OK=false
32765    fi
32766
32767    SJAVAC_SERVER_JAVA="$JAVA $SJAVAC_SERVER_JAVA"
32768fi
32769
32770
32771if test "$MEMORY_SIZE" -gt "2500"; then
32772
32773    $ECHO "Check if jvm arg is ok: -d64" >&5
32774    $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
32775    OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
32776    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
32777    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
32778    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32779        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
32780	JVM_ARG_OK=true
32781    else
32782	$ECHO "Arg failed:" >&5
32783	$ECHO "$OUTPUT" >&5
32784	JVM_ARG_OK=false
32785    fi
32786
32787    if test "$JVM_ARG_OK" = true; then
32788        JVM_64BIT=true
32789	JVM_ARG_OK=false
32790    fi
32791    fi
32792
32793if test "$JVM_64BIT" = true; then
32794    if test "$MEMORY_SIZE" -gt "17000"; then
32795
32796    $ECHO "Check if jvm arg is ok: -Xms10G -Xmx10G" >&5
32797    $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version" >&5
32798    OUTPUT=`$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version 2>&1`
32799    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
32800    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
32801    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32802        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G"
32803	JVM_ARG_OK=true
32804    else
32805	$ECHO "Arg failed:" >&5
32806	$ECHO "$OUTPUT" >&5
32807	JVM_ARG_OK=false
32808    fi
32809
32810    fi
32811    if test "$MEMORY_SIZE" -gt "10000" && test "$JVM_ARG_OK" = false; then
32812
32813    $ECHO "Check if jvm arg is ok: -Xms6G -Xmx6G" >&5
32814    $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version" >&5
32815    OUTPUT=`$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version 2>&1`
32816    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
32817    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
32818    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32819        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G"
32820	JVM_ARG_OK=true
32821    else
32822	$ECHO "Arg failed:" >&5
32823	$ECHO "$OUTPUT" >&5
32824	JVM_ARG_OK=false
32825    fi
32826
32827    fi
32828    if test "$MEMORY_SIZE" -gt "5000" && test "$JVM_ARG_OK" = false; then
32829
32830    $ECHO "Check if jvm arg is ok: -Xms1G -Xmx3G" >&5
32831    $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version" >&5
32832    OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version 2>&1`
32833    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
32834    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
32835    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32836        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G"
32837	JVM_ARG_OK=true
32838    else
32839	$ECHO "Arg failed:" >&5
32840	$ECHO "$OUTPUT" >&5
32841	JVM_ARG_OK=false
32842    fi
32843
32844    fi
32845    if test "$MEMORY_SIZE" -gt "3800" && test "$JVM_ARG_OK" = false; then
32846
32847    $ECHO "Check if jvm arg is ok: -Xms1G -Xmx2500M" >&5
32848    $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version" >&5
32849    OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version 2>&1`
32850    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
32851    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
32852    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32853        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M"
32854	JVM_ARG_OK=true
32855    else
32856	$ECHO "Arg failed:" >&5
32857	$ECHO "$OUTPUT" >&5
32858	JVM_ARG_OK=false
32859    fi
32860
32861    fi
32862fi
32863if test "$MEMORY_SIZE" -gt "2500" && test "$JVM_ARG_OK" = false; then
32864
32865    $ECHO "Check if jvm arg is ok: -Xms1000M -Xmx1500M" >&5
32866    $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M -version" >&5
32867    OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M -version 2>&1`
32868    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
32869    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
32870    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32871        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M"
32872	JVM_ARG_OK=true
32873    else
32874	$ECHO "Arg failed:" >&5
32875	$ECHO "$OUTPUT" >&5
32876	JVM_ARG_OK=false
32877    fi
32878
32879fi
32880if test "$MEMORY_SIZE" -gt "1000" && test "$JVM_ARG_OK" = false; then
32881
32882    $ECHO "Check if jvm arg is ok: -Xms400M -Xmx1100M" >&5
32883    $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version" >&5
32884    OUTPUT=`$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version 2>&1`
32885    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
32886    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
32887    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32888        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M"
32889	JVM_ARG_OK=true
32890    else
32891	$ECHO "Arg failed:" >&5
32892	$ECHO "$OUTPUT" >&5
32893	JVM_ARG_OK=false
32894    fi
32895
32896fi
32897if test "$JVM_ARG_OK" = false; then
32898
32899    $ECHO "Check if jvm arg is ok: -Xms256M -Xmx512M" >&5
32900    $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version" >&5
32901    OUTPUT=`$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version 2>&1`
32902    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
32903    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
32904    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32905        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M"
32906	JVM_ARG_OK=true
32907    else
32908	$ECHO "Arg failed:" >&5
32909	$ECHO "$OUTPUT" >&5
32910	JVM_ARG_OK=false
32911    fi
32912
32913fi
32914
32915{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
32916$as_echo_n "checking whether to use sjavac... " >&6; }
32917# Check whether --enable-sjavac was given.
32918if test "${enable_sjavac+set}" = set; then :
32919  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
32920else
32921  ENABLE_SJAVAC='no'
32922fi
32923
32924{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
32925$as_echo "$ENABLE_SJAVAC" >&6; }
32926
32927
32928if test "x$ENABLE_SJAVAC" = xyes; then
32929    SJAVAC_SERVER_DIR="$OUTPUT_ROOT/javacservers"
32930else
32931    SJAVAC_SERVER_DIR=
32932fi
32933
32934
32935
32936
32937# Can the C/C++ compiler use precompiled headers?
32938
32939
32940###############################################################################
32941#
32942# Can the C/C++ compiler use precompiled headers?
32943#
32944# Check whether --enable-precompiled-headers was given.
32945if test "${enable_precompiled_headers+set}" = set; then :
32946  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
32947else
32948  ENABLE_PRECOMPH=yes
32949fi
32950
32951
32952USE_PRECOMPILED_HEADER=1
32953if test "x$ENABLE_PRECOMPH" = xno; then
32954    USE_PRECOMPILED_HEADER=0
32955fi
32956
32957if test "x$ENABLE_PRECOMPH" = xyes; then
32958    # Check that the compiler actually supports precomp headers.
32959    if test "x$GCC" = xyes; then
32960         { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
32961$as_echo_n "checking that precompiled headers work... " >&6; }
32962         echo "int alfa();" > conftest.h
32963         $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
32964         if test ! -f conftest.hpp.gch; then
32965             USE_PRECOMPILED_HEADER=0
32966             { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32967$as_echo "no" >&6; }
32968         else
32969             { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32970$as_echo "yes" >&6; }
32971         fi
32972         rm -f conftest.h conftest.hpp.gch
32973    fi
32974fi
32975
32976
32977
32978
32979# Setup use of ccache, if available
32980
32981    # Check whether --enable-ccache was given.
32982if test "${enable_ccache+set}" = set; then :
32983  enableval=$enable_ccache; ENABLE_CCACHE=${enable_ccache}
32984else
32985  ENABLE_CCACHE=yes
32986fi
32987
32988    if test "x$ENABLE_CCACHE" = xyes; then
32989        OLD_PATH="$PATH"
32990        if test "x$TOOLS_DIR" != x; then
32991          PATH=$TOOLS_DIR:$PATH
32992        fi
32993        # Extract the first word of "ccache", so it can be a program name with args.
32994set dummy ccache; ac_word=$2
32995{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32996$as_echo_n "checking for $ac_word... " >&6; }
32997if ${ac_cv_path_CCACHE+:} false; then :
32998  $as_echo_n "(cached) " >&6
32999else
33000  case $CCACHE in
33001  [\\/]* | ?:[\\/]*)
33002  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
33003  ;;
33004  *)
33005  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33006for as_dir in $PATH
33007do
33008  IFS=$as_save_IFS
33009  test -z "$as_dir" && as_dir=.
33010    for ac_exec_ext in '' $ac_executable_extensions; do
33011  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33012    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
33013    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33014    break 2
33015  fi
33016done
33017  done
33018IFS=$as_save_IFS
33019
33020  ;;
33021esac
33022fi
33023CCACHE=$ac_cv_path_CCACHE
33024if test -n "$CCACHE"; then
33025  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
33026$as_echo "$CCACHE" >&6; }
33027else
33028  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33029$as_echo "no" >&6; }
33030fi
33031
33032
33033        PATH="$OLD_PATH"
33034    else
33035        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ccache" >&5
33036$as_echo_n "checking for ccache... " >&6; }
33037        { $as_echo "$as_me:${as_lineno-$LINENO}: result: explicitly disabled" >&5
33038$as_echo "explicitly disabled" >&6; }
33039        CCACHE=
33040    fi
33041
33042
33043
33044# Check whether --with-ccache-dir was given.
33045if test "${with_ccache_dir+set}" = set; then :
33046  withval=$with_ccache_dir;
33047fi
33048
33049
33050    if test "x$with_ccache_dir" != x; then
33051        # When using a non home ccache directory, assume the use is to share ccache files
33052        # with other users. Thus change the umask.
33053        SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
33054    fi
33055    CCACHE_FOUND=""
33056    if test "x$CCACHE" != x; then
33057
33058    if test "x$CCACHE" != x; then
33059        CCACHE_FOUND="true"
33060        # Only use ccache if it is 3.1.4 or later, which supports
33061        # precompiled headers.
33062        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ccache supports precompiled headers" >&5
33063$as_echo_n "checking if ccache supports precompiled headers... " >&6; }
33064        HAS_GOOD_CCACHE=`($CCACHE --version | head -n 1 | grep -E 3.1.[456789]) 2> /dev/null`
33065        if test "x$HAS_GOOD_CCACHE" = x; then
33066            { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccache" >&5
33067$as_echo "no, disabling ccache" >&6; }
33068            CCACHE=
33069        else
33070            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
33071$as_echo "yes" >&6; }
33072            { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
33073$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
33074            PUSHED_FLAGS="$CXXFLAGS"
33075            CXXFLAGS="-fpch-preprocess $CXXFLAGS"
33076            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33077/* end confdefs.h.  */
33078
33079int
33080main ()
33081{
33082
33083  ;
33084  return 0;
33085}
33086_ACEOF
33087if ac_fn_cxx_try_compile "$LINENO"; then :
33088  CC_KNOWS_CCACHE_TRICK=yes
33089else
33090  CC_KNOWS_CCACHE_TRICK=no
33091fi
33092rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33093            CXXFLAGS="$PUSHED_FLAGS"
33094            if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
33095                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
33096$as_echo "yes" >&6; }
33097            else
33098                { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccaching of precompiled headers" >&5
33099$as_echo "no, disabling ccaching of precompiled headers" >&6; }
33100                CCACHE=
33101            fi
33102        fi
33103    fi
33104
33105    if test "x$CCACHE" != x; then
33106        CCACHE_SLOPPINESS=time_macros
33107        CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS $CCACHE"
33108        CCACHE_FLAGS=-fpch-preprocess
33109
33110        if test "x$SET_CCACHE_DIR" != x; then
33111            mkdir -p $CCACHE_DIR > /dev/null 2>&1
33112	    chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
33113        fi
33114    fi
33115
33116    fi
33117
33118
33119###############################################################################
33120#
33121# And now the finish...
33122#
33123###############################################################################
33124
33125# Check for some common pitfalls
33126
33127  if test x"$OPENJDK_BUILD_OS" = xwindows; then
33128    file_to_test="$SRC_ROOT/LICENSE"
33129    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
33130      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
33131    fi
33132  fi
33133
33134
33135
33136{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
33137$as_echo_n "checking if build directory is on local disk... " >&6; }
33138
33139	# df -l lists only local disks; if the given directory is not found then
33140	# a non-zero exit code is given
33141  if test "x$DF" = x; then
33142    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33143      # msys does not have df; use Windows "net use" instead.
33144      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
33145      if test "x$IS_NETWORK_DISK" = x; then
33146        OUTPUT_DIR_IS_LOCAL="yes"
33147      else
33148        OUTPUT_DIR_IS_LOCAL="no"
33149      fi
33150    else
33151      # No df here, say it's local
33152      OUTPUT_DIR_IS_LOCAL="yes"
33153    fi
33154  else
33155    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
33156      OUTPUT_DIR_IS_LOCAL="yes"
33157    else
33158      OUTPUT_DIR_IS_LOCAL="no"
33159    fi
33160  fi
33161
33162{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
33163$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
33164
33165
33166
33167# Check if the user has any old-style ALT_ variables set.
33168FOUND_ALT_VARIABLES=`env | grep ^ALT_`
33169
33170# Before generating output files, test if they exist. If they do, this is a reconfigure.
33171# Since we can't properly handle the dependencies for this, warn the user about the situation
33172if test -e $OUTPUT_ROOT/spec.gmk; then
33173  IS_RECONFIGURE=yes
33174else
33175  IS_RECONFIGURE=no
33176fi
33177
33178if test -e $SRC_ROOT/build/.hide-configure-performance-hints; then
33179  HIDE_PERFORMANCE_HINTS=yes
33180else
33181  HIDE_PERFORMANCE_HINTS=no
33182  # Hide it the next time around...
33183  $TOUCH $SRC_ROOT/build/.hide-configure-performance-hints > /dev/null 2>&1
33184fi
33185
33186
33187
33188# At the end, call the custom hook. (Dummy macro if no custom sources available)
33189
33190
33191# We're messing a bit with internal autoconf variables to put the config.status
33192# in the output directory instead of the current directory.
33193CONFIG_STATUS="$OUTPUT_ROOT/config.status"
33194
33195# Create the actual output files. Now the main work of configure is done.
33196cat >confcache <<\_ACEOF
33197# This file is a shell script that caches the results of configure
33198# tests run on this system so they can be shared between configure
33199# scripts and configure runs, see configure's option --config-cache.
33200# It is not useful on other systems.  If it contains results you don't
33201# want to keep, you may remove or edit it.
33202#
33203# config.status only pays attention to the cache file if you give it
33204# the --recheck option to rerun configure.
33205#
33206# `ac_cv_env_foo' variables (set or unset) will be overridden when
33207# loading this file, other *unset* `ac_cv_foo' will be assigned the
33208# following values.
33209
33210_ACEOF
33211
33212# The following way of writing the cache mishandles newlines in values,
33213# but we know of no workaround that is simple, portable, and efficient.
33214# So, we kill variables containing newlines.
33215# Ultrix sh set writes to stderr and can't be redirected directly,
33216# and sets the high bit in the cache file unless we assign to the vars.
33217(
33218  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
33219    eval ac_val=\$$ac_var
33220    case $ac_val in #(
33221    *${as_nl}*)
33222      case $ac_var in #(
33223      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
33224$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
33225      esac
33226      case $ac_var in #(
33227      _ | IFS | as_nl) ;; #(
33228      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
33229      *) { eval $ac_var=; unset $ac_var;} ;;
33230      esac ;;
33231    esac
33232  done
33233
33234  (set) 2>&1 |
33235    case $as_nl`(ac_space=' '; set) 2>&1` in #(
33236    *${as_nl}ac_space=\ *)
33237      # `set' does not quote correctly, so add quotes: double-quote
33238      # substitution turns \\\\ into \\, and sed turns \\ into \.
33239      sed -n \
33240	"s/'/'\\\\''/g;
33241	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
33242      ;; #(
33243    *)
33244      # `set' quotes correctly as required by POSIX, so do not add quotes.
33245      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
33246      ;;
33247    esac |
33248    sort
33249) |
33250  sed '
33251     /^ac_cv_env_/b end
33252     t clear
33253     :clear
33254     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
33255     t end
33256     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
33257     :end' >>confcache
33258if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
33259  if test -w "$cache_file"; then
33260    if test "x$cache_file" != "x/dev/null"; then
33261      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
33262$as_echo "$as_me: updating cache $cache_file" >&6;}
33263      if test ! -f "$cache_file" || test -h "$cache_file"; then
33264	cat confcache >"$cache_file"
33265      else
33266        case $cache_file in #(
33267        */* | ?:*)
33268	  mv -f confcache "$cache_file"$$ &&
33269	  mv -f "$cache_file"$$ "$cache_file" ;; #(
33270        *)
33271	  mv -f confcache "$cache_file" ;;
33272	esac
33273      fi
33274    fi
33275  else
33276    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
33277$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
33278  fi
33279fi
33280rm -f confcache
33281
33282test "x$prefix" = xNONE && prefix=$ac_default_prefix
33283# Let make expand exec_prefix.
33284test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
33285
33286DEFS=-DHAVE_CONFIG_H
33287
33288ac_libobjs=
33289ac_ltlibobjs=
33290U=
33291for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
33292  # 1. Remove the extension, and $U if already installed.
33293  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
33294  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
33295  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
33296  #    will be set to the directory where LIBOBJS objects are built.
33297  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
33298  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
33299done
33300LIBOBJS=$ac_libobjs
33301
33302LTLIBOBJS=$ac_ltlibobjs
33303
33304
33305
33306: "${CONFIG_STATUS=./config.status}"
33307ac_write_fail=0
33308ac_clean_files_save=$ac_clean_files
33309ac_clean_files="$ac_clean_files $CONFIG_STATUS"
33310{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
33311$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
33312as_write_fail=0
33313cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
33314#! $SHELL
33315# Generated by $as_me.
33316# Run this file to recreate the current configuration.
33317# Compiler output produced by configure, useful for debugging
33318# configure, is in config.log if it exists.
33319
33320debug=false
33321ac_cs_recheck=false
33322ac_cs_silent=false
33323
33324SHELL=\${CONFIG_SHELL-$SHELL}
33325export SHELL
33326_ASEOF
33327cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
33328## -------------------- ##
33329## M4sh Initialization. ##
33330## -------------------- ##
33331
33332# Be more Bourne compatible
33333DUALCASE=1; export DUALCASE # for MKS sh
33334if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
33335  emulate sh
33336  NULLCMD=:
33337  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
33338  # is contrary to our usage.  Disable this feature.
33339  alias -g '${1+"$@"}'='"$@"'
33340  setopt NO_GLOB_SUBST
33341else
33342  case `(set -o) 2>/dev/null` in #(
33343  *posix*) :
33344    set -o posix ;; #(
33345  *) :
33346     ;;
33347esac
33348fi
33349
33350
33351as_nl='
33352'
33353export as_nl
33354# Printing a long string crashes Solaris 7 /usr/bin/printf.
33355as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
33356as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
33357as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
33358# Prefer a ksh shell builtin over an external printf program on Solaris,
33359# but without wasting forks for bash or zsh.
33360if test -z "$BASH_VERSION$ZSH_VERSION" \
33361    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
33362  as_echo='print -r --'
33363  as_echo_n='print -rn --'
33364elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
33365  as_echo='printf %s\n'
33366  as_echo_n='printf %s'
33367else
33368  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
33369    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
33370    as_echo_n='/usr/ucb/echo -n'
33371  else
33372    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
33373    as_echo_n_body='eval
33374      arg=$1;
33375      case $arg in #(
33376      *"$as_nl"*)
33377	expr "X$arg" : "X\\(.*\\)$as_nl";
33378	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
33379      esac;
33380      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
33381    '
33382    export as_echo_n_body
33383    as_echo_n='sh -c $as_echo_n_body as_echo'
33384  fi
33385  export as_echo_body
33386  as_echo='sh -c $as_echo_body as_echo'
33387fi
33388
33389# The user is always right.
33390if test "${PATH_SEPARATOR+set}" != set; then
33391  PATH_SEPARATOR=:
33392  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
33393    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
33394      PATH_SEPARATOR=';'
33395  }
33396fi
33397
33398
33399# IFS
33400# We need space, tab and new line, in precisely that order.  Quoting is
33401# there to prevent editors from complaining about space-tab.
33402# (If _AS_PATH_WALK were called with IFS unset, it would disable word
33403# splitting by setting IFS to empty value.)
33404IFS=" ""	$as_nl"
33405
33406# Find who we are.  Look in the path if we contain no directory separator.
33407as_myself=
33408case $0 in #((
33409  *[\\/]* ) as_myself=$0 ;;
33410  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33411for as_dir in $PATH
33412do
33413  IFS=$as_save_IFS
33414  test -z "$as_dir" && as_dir=.
33415    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
33416  done
33417IFS=$as_save_IFS
33418
33419     ;;
33420esac
33421# We did not find ourselves, most probably we were run as `sh COMMAND'
33422# in which case we are not to be found in the path.
33423if test "x$as_myself" = x; then
33424  as_myself=$0
33425fi
33426if test ! -f "$as_myself"; then
33427  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
33428  exit 1
33429fi
33430
33431# Unset variables that we do not need and which cause bugs (e.g. in
33432# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
33433# suppresses any "Segmentation fault" message there.  '((' could
33434# trigger a bug in pdksh 5.2.14.
33435for as_var in BASH_ENV ENV MAIL MAILPATH
33436do eval test x\${$as_var+set} = xset \
33437  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
33438done
33439PS1='$ '
33440PS2='> '
33441PS4='+ '
33442
33443# NLS nuisances.
33444LC_ALL=C
33445export LC_ALL
33446LANGUAGE=C
33447export LANGUAGE
33448
33449# CDPATH.
33450(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
33451
33452
33453# as_fn_error STATUS ERROR [LINENO LOG_FD]
33454# ----------------------------------------
33455# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
33456# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
33457# script with STATUS, using 1 if that was 0.
33458as_fn_error ()
33459{
33460  as_status=$1; test $as_status -eq 0 && as_status=1
33461  if test "$4"; then
33462    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
33463    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
33464  fi
33465  $as_echo "$as_me: error: $2" >&2
33466  as_fn_exit $as_status
33467} # as_fn_error
33468
33469
33470# as_fn_set_status STATUS
33471# -----------------------
33472# Set $? to STATUS, without forking.
33473as_fn_set_status ()
33474{
33475  return $1
33476} # as_fn_set_status
33477
33478# as_fn_exit STATUS
33479# -----------------
33480# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
33481as_fn_exit ()
33482{
33483  set +e
33484  as_fn_set_status $1
33485  exit $1
33486} # as_fn_exit
33487
33488# as_fn_unset VAR
33489# ---------------
33490# Portably unset VAR.
33491as_fn_unset ()
33492{
33493  { eval $1=; unset $1;}
33494}
33495as_unset=as_fn_unset
33496# as_fn_append VAR VALUE
33497# ----------------------
33498# Append the text in VALUE to the end of the definition contained in VAR. Take
33499# advantage of any shell optimizations that allow amortized linear growth over
33500# repeated appends, instead of the typical quadratic growth present in naive
33501# implementations.
33502if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
33503  eval 'as_fn_append ()
33504  {
33505    eval $1+=\$2
33506  }'
33507else
33508  as_fn_append ()
33509  {
33510    eval $1=\$$1\$2
33511  }
33512fi # as_fn_append
33513
33514# as_fn_arith ARG...
33515# ------------------
33516# Perform arithmetic evaluation on the ARGs, and store the result in the
33517# global $as_val. Take advantage of shells that can avoid forks. The arguments
33518# must be portable across $(()) and expr.
33519if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
33520  eval 'as_fn_arith ()
33521  {
33522    as_val=$(( $* ))
33523  }'
33524else
33525  as_fn_arith ()
33526  {
33527    as_val=`expr "$@" || test $? -eq 1`
33528  }
33529fi # as_fn_arith
33530
33531
33532if expr a : '\(a\)' >/dev/null 2>&1 &&
33533   test "X`expr 00001 : '.*\(...\)'`" = X001; then
33534  as_expr=expr
33535else
33536  as_expr=false
33537fi
33538
33539if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
33540  as_basename=basename
33541else
33542  as_basename=false
33543fi
33544
33545if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
33546  as_dirname=dirname
33547else
33548  as_dirname=false
33549fi
33550
33551as_me=`$as_basename -- "$0" ||
33552$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
33553	 X"$0" : 'X\(//\)$' \| \
33554	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
33555$as_echo X/"$0" |
33556    sed '/^.*\/\([^/][^/]*\)\/*$/{
33557	    s//\1/
33558	    q
33559	  }
33560	  /^X\/\(\/\/\)$/{
33561	    s//\1/
33562	    q
33563	  }
33564	  /^X\/\(\/\).*/{
33565	    s//\1/
33566	    q
33567	  }
33568	  s/.*/./; q'`
33569
33570# Avoid depending upon Character Ranges.
33571as_cr_letters='abcdefghijklmnopqrstuvwxyz'
33572as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
33573as_cr_Letters=$as_cr_letters$as_cr_LETTERS
33574as_cr_digits='0123456789'
33575as_cr_alnum=$as_cr_Letters$as_cr_digits
33576
33577ECHO_C= ECHO_N= ECHO_T=
33578case `echo -n x` in #(((((
33579-n*)
33580  case `echo 'xy\c'` in
33581  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
33582  xy)  ECHO_C='\c';;
33583  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
33584       ECHO_T='	';;
33585  esac;;
33586*)
33587  ECHO_N='-n';;
33588esac
33589
33590rm -f conf$$ conf$$.exe conf$$.file
33591if test -d conf$$.dir; then
33592  rm -f conf$$.dir/conf$$.file
33593else
33594  rm -f conf$$.dir
33595  mkdir conf$$.dir 2>/dev/null
33596fi
33597if (echo >conf$$.file) 2>/dev/null; then
33598  if ln -s conf$$.file conf$$ 2>/dev/null; then
33599    as_ln_s='ln -s'
33600    # ... but there are two gotchas:
33601    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
33602    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
33603    # In both cases, we have to default to `cp -pR'.
33604    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
33605      as_ln_s='cp -pR'
33606  elif ln conf$$.file conf$$ 2>/dev/null; then
33607    as_ln_s=ln
33608  else
33609    as_ln_s='cp -pR'
33610  fi
33611else
33612  as_ln_s='cp -pR'
33613fi
33614rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
33615rmdir conf$$.dir 2>/dev/null
33616
33617
33618# as_fn_mkdir_p
33619# -------------
33620# Create "$as_dir" as a directory, including parents if necessary.
33621as_fn_mkdir_p ()
33622{
33623
33624  case $as_dir in #(
33625  -*) as_dir=./$as_dir;;
33626  esac
33627  test -d "$as_dir" || eval $as_mkdir_p || {
33628    as_dirs=
33629    while :; do
33630      case $as_dir in #(
33631      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
33632      *) as_qdir=$as_dir;;
33633      esac
33634      as_dirs="'$as_qdir' $as_dirs"
33635      as_dir=`$as_dirname -- "$as_dir" ||
33636$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
33637	 X"$as_dir" : 'X\(//\)[^/]' \| \
33638	 X"$as_dir" : 'X\(//\)$' \| \
33639	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
33640$as_echo X"$as_dir" |
33641    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
33642	    s//\1/
33643	    q
33644	  }
33645	  /^X\(\/\/\)[^/].*/{
33646	    s//\1/
33647	    q
33648	  }
33649	  /^X\(\/\/\)$/{
33650	    s//\1/
33651	    q
33652	  }
33653	  /^X\(\/\).*/{
33654	    s//\1/
33655	    q
33656	  }
33657	  s/.*/./; q'`
33658      test -d "$as_dir" && break
33659    done
33660    test -z "$as_dirs" || eval "mkdir $as_dirs"
33661  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
33662
33663
33664} # as_fn_mkdir_p
33665if mkdir -p . 2>/dev/null; then
33666  as_mkdir_p='mkdir -p "$as_dir"'
33667else
33668  test -d ./-p && rmdir ./-p
33669  as_mkdir_p=false
33670fi
33671
33672
33673# as_fn_executable_p FILE
33674# -----------------------
33675# Test if FILE is an executable regular file.
33676as_fn_executable_p ()
33677{
33678  test -f "$1" && test -x "$1"
33679} # as_fn_executable_p
33680as_test_x='test -x'
33681as_executable_p=as_fn_executable_p
33682
33683# Sed expression to map a string onto a valid CPP name.
33684as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
33685
33686# Sed expression to map a string onto a valid variable name.
33687as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
33688
33689
33690exec 6>&1
33691## ----------------------------------- ##
33692## Main body of $CONFIG_STATUS script. ##
33693## ----------------------------------- ##
33694_ASEOF
33695test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
33696
33697cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
33698# Save the log message, to keep $0 and so on meaningful, and to
33699# report actual input values of CONFIG_FILES etc. instead of their
33700# values after options handling.
33701ac_log="
33702This file was extended by OpenJDK $as_me jdk8, which was
33703generated by GNU Autoconf 2.69.  Invocation command line was
33704
33705  CONFIG_FILES    = $CONFIG_FILES
33706  CONFIG_HEADERS  = $CONFIG_HEADERS
33707  CONFIG_LINKS    = $CONFIG_LINKS
33708  CONFIG_COMMANDS = $CONFIG_COMMANDS
33709  $ $0 $@
33710
33711on `(hostname || uname -n) 2>/dev/null | sed 1q`
33712"
33713
33714_ACEOF
33715
33716case $ac_config_files in *"
33717"*) set x $ac_config_files; shift; ac_config_files=$*;;
33718esac
33719
33720case $ac_config_headers in *"
33721"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
33722esac
33723
33724
33725cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
33726# Files that config.status was made for.
33727config_files="$ac_config_files"
33728config_headers="$ac_config_headers"
33729
33730_ACEOF
33731
33732cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
33733ac_cs_usage="\
33734\`$as_me' instantiates files and other configuration actions
33735from templates according to the current configuration.  Unless the files
33736and actions are specified as TAGs, all are instantiated by default.
33737
33738Usage: $0 [OPTION]... [TAG]...
33739
33740  -h, --help       print this help, then exit
33741  -V, --version    print version number and configuration settings, then exit
33742      --config     print configuration, then exit
33743  -q, --quiet, --silent
33744                   do not print progress messages
33745  -d, --debug      don't remove temporary files
33746      --recheck    update $as_me by reconfiguring in the same conditions
33747      --file=FILE[:TEMPLATE]
33748                   instantiate the configuration file FILE
33749      --header=FILE[:TEMPLATE]
33750                   instantiate the configuration header FILE
33751
33752Configuration files:
33753$config_files
33754
33755Configuration headers:
33756$config_headers
33757
33758Report bugs to <build-dev@openjdk.java.net>.
33759OpenJDK home page: <http://openjdk.java.net>."
33760
33761_ACEOF
33762cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
33763ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
33764ac_cs_version="\\
33765OpenJDK config.status jdk8
33766configured by $0, generated by GNU Autoconf 2.69,
33767  with options \\"\$ac_cs_config\\"
33768
33769Copyright (C) 2012 Free Software Foundation, Inc.
33770This config.status script is free software; the Free Software Foundation
33771gives unlimited permission to copy, distribute and modify it."
33772
33773ac_pwd='$ac_pwd'
33774srcdir='$srcdir'
33775AWK='$AWK'
33776test -n "\$AWK" || AWK=awk
33777_ACEOF
33778
33779cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
33780# The default lists apply if the user does not specify any file.
33781ac_need_defaults=:
33782while test $# != 0
33783do
33784  case $1 in
33785  --*=?*)
33786    ac_option=`expr "X$1" : 'X\([^=]*\)='`
33787    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
33788    ac_shift=:
33789    ;;
33790  --*=)
33791    ac_option=`expr "X$1" : 'X\([^=]*\)='`
33792    ac_optarg=
33793    ac_shift=:
33794    ;;
33795  *)
33796    ac_option=$1
33797    ac_optarg=$2
33798    ac_shift=shift
33799    ;;
33800  esac
33801
33802  case $ac_option in
33803  # Handling of the options.
33804  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
33805    ac_cs_recheck=: ;;
33806  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
33807    $as_echo "$ac_cs_version"; exit ;;
33808  --config | --confi | --conf | --con | --co | --c )
33809    $as_echo "$ac_cs_config"; exit ;;
33810  --debug | --debu | --deb | --de | --d | -d )
33811    debug=: ;;
33812  --file | --fil | --fi | --f )
33813    $ac_shift
33814    case $ac_optarg in
33815    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
33816    '') as_fn_error $? "missing file argument" ;;
33817    esac
33818    as_fn_append CONFIG_FILES " '$ac_optarg'"
33819    ac_need_defaults=false;;
33820  --header | --heade | --head | --hea )
33821    $ac_shift
33822    case $ac_optarg in
33823    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
33824    esac
33825    as_fn_append CONFIG_HEADERS " '$ac_optarg'"
33826    ac_need_defaults=false;;
33827  --he | --h)
33828    # Conflict between --help and --header
33829    as_fn_error $? "ambiguous option: \`$1'
33830Try \`$0 --help' for more information.";;
33831  --help | --hel | -h )
33832    $as_echo "$ac_cs_usage"; exit ;;
33833  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
33834  | -silent | --silent | --silen | --sile | --sil | --si | --s)
33835    ac_cs_silent=: ;;
33836
33837  # This is an error.
33838  -*) as_fn_error $? "unrecognized option: \`$1'
33839Try \`$0 --help' for more information." ;;
33840
33841  *) as_fn_append ac_config_targets " $1"
33842     ac_need_defaults=false ;;
33843
33844  esac
33845  shift
33846done
33847
33848ac_configure_extra_args=
33849
33850if $ac_cs_silent; then
33851  exec 6>/dev/null
33852  ac_configure_extra_args="$ac_configure_extra_args --silent"
33853fi
33854
33855_ACEOF
33856cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
33857if \$ac_cs_recheck; then
33858  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
33859  shift
33860  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
33861  CONFIG_SHELL='$SHELL'
33862  export CONFIG_SHELL
33863  exec "\$@"
33864fi
33865
33866_ACEOF
33867cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
33868exec 5>>config.log
33869{
33870  echo
33871  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
33872## Running $as_me. ##
33873_ASBOX
33874  $as_echo "$ac_log"
33875} >&5
33876
33877_ACEOF
33878cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
33879_ACEOF
33880
33881cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
33882
33883# Handling of arguments.
33884for ac_config_target in $ac_config_targets
33885do
33886  case $ac_config_target in
33887    "$OUTPUT_ROOT/config.h") CONFIG_HEADERS="$CONFIG_HEADERS $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in" ;;
33888    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
33889    "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
33890    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
33891    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
33892    "$OUTPUT_ROOT/spec.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in" ;;
33893    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
33894
33895  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
33896  esac
33897done
33898
33899
33900# If the user did not use the arguments to specify the items to instantiate,
33901# then the envvar interface is used.  Set only those that are not.
33902# We use the long form for the default assignment because of an extremely
33903# bizarre bug on SunOS 4.1.3.
33904if $ac_need_defaults; then
33905  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
33906  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
33907fi
33908
33909# Have a temporary directory for convenience.  Make it in the build tree
33910# simply because there is no reason against having it here, and in addition,
33911# creating and moving files from /tmp can sometimes cause problems.
33912# Hook for its removal unless debugging.
33913# Note that there is a small window in which the directory will not be cleaned:
33914# after its creation but before its name has been assigned to `$tmp'.
33915$debug ||
33916{
33917  tmp= ac_tmp=
33918  trap 'exit_status=$?
33919  : "${ac_tmp:=$tmp}"
33920  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
33921' 0
33922  trap 'as_fn_exit 1' 1 2 13 15
33923}
33924# Create a (secure) tmp directory for tmp files.
33925
33926{
33927  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
33928  test -d "$tmp"
33929}  ||
33930{
33931  tmp=./conf$$-$RANDOM
33932  (umask 077 && mkdir "$tmp")
33933} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
33934ac_tmp=$tmp
33935
33936# Set up the scripts for CONFIG_FILES section.
33937# No need to generate them if there are no CONFIG_FILES.
33938# This happens for instance with `./config.status config.h'.
33939if test -n "$CONFIG_FILES"; then
33940
33941
33942ac_cr=`echo X | tr X '\015'`
33943# On cygwin, bash can eat \r inside `` if the user requested igncr.
33944# But we know of no other shell where ac_cr would be empty at this
33945# point, so we can use a bashism as a fallback.
33946if test "x$ac_cr" = x; then
33947  eval ac_cr=\$\'\\r\'
33948fi
33949ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
33950if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
33951  ac_cs_awk_cr='\\r'
33952else
33953  ac_cs_awk_cr=$ac_cr
33954fi
33955
33956echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
33957_ACEOF
33958
33959
33960{
33961  echo "cat >conf$$subs.awk <<_ACEOF" &&
33962  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
33963  echo "_ACEOF"
33964} >conf$$subs.sh ||
33965  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
33966ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
33967ac_delim='%!_!# '
33968for ac_last_try in false false false false false :; do
33969  . ./conf$$subs.sh ||
33970    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
33971
33972  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
33973  if test $ac_delim_n = $ac_delim_num; then
33974    break
33975  elif $ac_last_try; then
33976    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
33977  else
33978    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
33979  fi
33980done
33981rm -f conf$$subs.sh
33982
33983cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
33984cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
33985_ACEOF
33986sed -n '
33987h
33988s/^/S["/; s/!.*/"]=/
33989p
33990g
33991s/^[^!]*!//
33992:repl
33993t repl
33994s/'"$ac_delim"'$//
33995t delim
33996:nl
33997h
33998s/\(.\{148\}\)..*/\1/
33999t more1
34000s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
34001p
34002n
34003b repl
34004:more1
34005s/["\\]/\\&/g; s/^/"/; s/$/"\\/
34006p
34007g
34008s/.\{148\}//
34009t nl
34010:delim
34011h
34012s/\(.\{148\}\)..*/\1/
34013t more2
34014s/["\\]/\\&/g; s/^/"/; s/$/"/
34015p
34016b
34017:more2
34018s/["\\]/\\&/g; s/^/"/; s/$/"\\/
34019p
34020g
34021s/.\{148\}//
34022t delim
34023' <conf$$subs.awk | sed '
34024/^[^""]/{
34025  N
34026  s/\n//
34027}
34028' >>$CONFIG_STATUS || ac_write_fail=1
34029rm -f conf$$subs.awk
34030cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34031_ACAWK
34032cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
34033  for (key in S) S_is_set[key] = 1
34034  FS = ""
34035
34036}
34037{
34038  line = $ 0
34039  nfields = split(line, field, "@")
34040  substed = 0
34041  len = length(field[1])
34042  for (i = 2; i < nfields; i++) {
34043    key = field[i]
34044    keylen = length(key)
34045    if (S_is_set[key]) {
34046      value = S[key]
34047      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
34048      len += length(value) + length(field[++i])
34049      substed = 1
34050    } else
34051      len += 1 + keylen
34052  }
34053
34054  print line
34055}
34056
34057_ACAWK
34058_ACEOF
34059cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34060if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
34061  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
34062else
34063  cat
34064fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
34065  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
34066_ACEOF
34067
34068# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
34069# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
34070# trailing colons and then remove the whole line if VPATH becomes empty
34071# (actually we leave an empty line to preserve line numbers).
34072if test "x$srcdir" = x.; then
34073  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
34074h
34075s///
34076s/^/:/
34077s/[	 ]*$/:/
34078s/:\$(srcdir):/:/g
34079s/:\${srcdir}:/:/g
34080s/:@srcdir@:/:/g
34081s/^:*//
34082s/:*$//
34083x
34084s/\(=[	 ]*\).*/\1/
34085G
34086s/\n//
34087s/^[^=]*=[	 ]*$//
34088}'
34089fi
34090
34091cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34092fi # test -n "$CONFIG_FILES"
34093
34094# Set up the scripts for CONFIG_HEADERS section.
34095# No need to generate them if there are no CONFIG_HEADERS.
34096# This happens for instance with `./config.status Makefile'.
34097if test -n "$CONFIG_HEADERS"; then
34098cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
34099BEGIN {
34100_ACEOF
34101
34102# Transform confdefs.h into an awk script `defines.awk', embedded as
34103# here-document in config.status, that substitutes the proper values into
34104# config.h.in to produce config.h.
34105
34106# Create a delimiter string that does not exist in confdefs.h, to ease
34107# handling of long lines.
34108ac_delim='%!_!# '
34109for ac_last_try in false false :; do
34110  ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
34111  if test -z "$ac_tt"; then
34112    break
34113  elif $ac_last_try; then
34114    as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
34115  else
34116    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
34117  fi
34118done
34119
34120# For the awk script, D is an array of macro values keyed by name,
34121# likewise P contains macro parameters if any.  Preserve backslash
34122# newline sequences.
34123
34124ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
34125sed -n '
34126s/.\{148\}/&'"$ac_delim"'/g
34127t rset
34128:rset
34129s/^[	 ]*#[	 ]*define[	 ][	 ]*/ /
34130t def
34131d
34132:def
34133s/\\$//
34134t bsnl
34135s/["\\]/\\&/g
34136s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
34137D["\1"]=" \3"/p
34138s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2"/p
34139d
34140:bsnl
34141s/["\\]/\\&/g
34142s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
34143D["\1"]=" \3\\\\\\n"\\/p
34144t cont
34145s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
34146t cont
34147d
34148:cont
34149n
34150s/.\{148\}/&'"$ac_delim"'/g
34151t clear
34152:clear
34153s/\\$//
34154t bsnlc
34155s/["\\]/\\&/g; s/^/"/; s/$/"/p
34156d
34157:bsnlc
34158s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
34159b cont
34160' <confdefs.h | sed '
34161s/'"$ac_delim"'/"\\\
34162"/g' >>$CONFIG_STATUS || ac_write_fail=1
34163
34164cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34165  for (key in D) D_is_set[key] = 1
34166  FS = ""
34167}
34168/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
34169  line = \$ 0
34170  split(line, arg, " ")
34171  if (arg[1] == "#") {
34172    defundef = arg[2]
34173    mac1 = arg[3]
34174  } else {
34175    defundef = substr(arg[1], 2)
34176    mac1 = arg[2]
34177  }
34178  split(mac1, mac2, "(") #)
34179  macro = mac2[1]
34180  prefix = substr(line, 1, index(line, defundef) - 1)
34181  if (D_is_set[macro]) {
34182    # Preserve the white space surrounding the "#".
34183    print prefix "define", macro P[macro] D[macro]
34184    next
34185  } else {
34186    # Replace #undef with comments.  This is necessary, for example,
34187    # in the case of _POSIX_SOURCE, which is predefined and required
34188    # on some systems where configure will not decide to define it.
34189    if (defundef == "undef") {
34190      print "/*", prefix defundef, macro, "*/"
34191      next
34192    }
34193  }
34194}
34195{ print }
34196_ACAWK
34197_ACEOF
34198cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34199  as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
34200fi # test -n "$CONFIG_HEADERS"
34201
34202
34203eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    "
34204shift
34205for ac_tag
34206do
34207  case $ac_tag in
34208  :[FHLC]) ac_mode=$ac_tag; continue;;
34209  esac
34210  case $ac_mode$ac_tag in
34211  :[FHL]*:*);;
34212  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
34213  :[FH]-) ac_tag=-:-;;
34214  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
34215  esac
34216  ac_save_IFS=$IFS
34217  IFS=:
34218  set x $ac_tag
34219  IFS=$ac_save_IFS
34220  shift
34221  ac_file=$1
34222  shift
34223
34224  case $ac_mode in
34225  :L) ac_source=$1;;
34226  :[FH])
34227    ac_file_inputs=
34228    for ac_f
34229    do
34230      case $ac_f in
34231      -) ac_f="$ac_tmp/stdin";;
34232      *) # Look for the file first in the build tree, then in the source tree
34233	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
34234	 # because $ac_f cannot contain `:'.
34235	 test -f "$ac_f" ||
34236	   case $ac_f in
34237	   [\\/$]*) false;;
34238	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
34239	   esac ||
34240	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
34241      esac
34242      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
34243      as_fn_append ac_file_inputs " '$ac_f'"
34244    done
34245
34246    # Let's still pretend it is `configure' which instantiates (i.e., don't
34247    # use $as_me), people would be surprised to read:
34248    #    /* config.h.  Generated by config.status.  */
34249    configure_input='Generated from '`
34250	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
34251	`' by configure.'
34252    if test x"$ac_file" != x-; then
34253      configure_input="$ac_file.  $configure_input"
34254      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
34255$as_echo "$as_me: creating $ac_file" >&6;}
34256    fi
34257    # Neutralize special characters interpreted by sed in replacement strings.
34258    case $configure_input in #(
34259    *\&* | *\|* | *\\* )
34260       ac_sed_conf_input=`$as_echo "$configure_input" |
34261       sed 's/[\\\\&|]/\\\\&/g'`;; #(
34262    *) ac_sed_conf_input=$configure_input;;
34263    esac
34264
34265    case $ac_tag in
34266    *:-:* | *:-) cat >"$ac_tmp/stdin" \
34267      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
34268    esac
34269    ;;
34270  esac
34271
34272  ac_dir=`$as_dirname -- "$ac_file" ||
34273$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
34274	 X"$ac_file" : 'X\(//\)[^/]' \| \
34275	 X"$ac_file" : 'X\(//\)$' \| \
34276	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
34277$as_echo X"$ac_file" |
34278    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
34279	    s//\1/
34280	    q
34281	  }
34282	  /^X\(\/\/\)[^/].*/{
34283	    s//\1/
34284	    q
34285	  }
34286	  /^X\(\/\/\)$/{
34287	    s//\1/
34288	    q
34289	  }
34290	  /^X\(\/\).*/{
34291	    s//\1/
34292	    q
34293	  }
34294	  s/.*/./; q'`
34295  as_dir="$ac_dir"; as_fn_mkdir_p
34296  ac_builddir=.
34297
34298case "$ac_dir" in
34299.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
34300*)
34301  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
34302  # A ".." for each directory in $ac_dir_suffix.
34303  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
34304  case $ac_top_builddir_sub in
34305  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
34306  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
34307  esac ;;
34308esac
34309ac_abs_top_builddir=$ac_pwd
34310ac_abs_builddir=$ac_pwd$ac_dir_suffix
34311# for backward compatibility:
34312ac_top_builddir=$ac_top_build_prefix
34313
34314case $srcdir in
34315  .)  # We are building in place.
34316    ac_srcdir=.
34317    ac_top_srcdir=$ac_top_builddir_sub
34318    ac_abs_top_srcdir=$ac_pwd ;;
34319  [\\/]* | ?:[\\/]* )  # Absolute name.
34320    ac_srcdir=$srcdir$ac_dir_suffix;
34321    ac_top_srcdir=$srcdir
34322    ac_abs_top_srcdir=$srcdir ;;
34323  *) # Relative name.
34324    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
34325    ac_top_srcdir=$ac_top_build_prefix$srcdir
34326    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
34327esac
34328ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
34329
34330
34331  case $ac_mode in
34332  :F)
34333  #
34334  # CONFIG_FILE
34335  #
34336
34337_ACEOF
34338
34339cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34340# If the template does not know about datarootdir, expand it.
34341# FIXME: This hack should be removed a few years after 2.60.
34342ac_datarootdir_hack=; ac_datarootdir_seen=
34343ac_sed_dataroot='
34344/datarootdir/ {
34345  p
34346  q
34347}
34348/@datadir@/p
34349/@docdir@/p
34350/@infodir@/p
34351/@localedir@/p
34352/@mandir@/p'
34353case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
34354*datarootdir*) ac_datarootdir_seen=yes;;
34355*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
34356  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
34357$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
34358_ACEOF
34359cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34360  ac_datarootdir_hack='
34361  s&@datadir@&$datadir&g
34362  s&@docdir@&$docdir&g
34363  s&@infodir@&$infodir&g
34364  s&@localedir@&$localedir&g
34365  s&@mandir@&$mandir&g
34366  s&\\\${datarootdir}&$datarootdir&g' ;;
34367esac
34368_ACEOF
34369
34370# Neutralize VPATH when `$srcdir' = `.'.
34371# Shell code in configure.ac might set extrasub.
34372# FIXME: do we really want to maintain this feature?
34373cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34374ac_sed_extra="$ac_vpsub
34375$extrasub
34376_ACEOF
34377cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34378:t
34379/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
34380s|@configure_input@|$ac_sed_conf_input|;t t
34381s&@top_builddir@&$ac_top_builddir_sub&;t t
34382s&@top_build_prefix@&$ac_top_build_prefix&;t t
34383s&@srcdir@&$ac_srcdir&;t t
34384s&@abs_srcdir@&$ac_abs_srcdir&;t t
34385s&@top_srcdir@&$ac_top_srcdir&;t t
34386s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
34387s&@builddir@&$ac_builddir&;t t
34388s&@abs_builddir@&$ac_abs_builddir&;t t
34389s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
34390$ac_datarootdir_hack
34391"
34392eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
34393  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
34394
34395test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
34396  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
34397  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
34398      "$ac_tmp/out"`; test -z "$ac_out"; } &&
34399  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
34400which seems to be undefined.  Please make sure it is defined" >&5
34401$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
34402which seems to be undefined.  Please make sure it is defined" >&2;}
34403
34404  rm -f "$ac_tmp/stdin"
34405  case $ac_file in
34406  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
34407  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
34408  esac \
34409  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
34410 ;;
34411  :H)
34412  #
34413  # CONFIG_HEADER
34414  #
34415  if test x"$ac_file" != x-; then
34416    {
34417      $as_echo "/* $configure_input  */" \
34418      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
34419    } >"$ac_tmp/config.h" \
34420      || as_fn_error $? "could not create $ac_file" "$LINENO" 5
34421    if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
34422      { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
34423$as_echo "$as_me: $ac_file is unchanged" >&6;}
34424    else
34425      rm -f "$ac_file"
34426      mv "$ac_tmp/config.h" "$ac_file" \
34427	|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
34428    fi
34429  else
34430    $as_echo "/* $configure_input  */" \
34431      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
34432      || as_fn_error $? "could not create -" "$LINENO" 5
34433  fi
34434 ;;
34435
34436
34437  esac
34438
34439done # for ac_tag
34440
34441
34442as_fn_exit 0
34443_ACEOF
34444ac_clean_files=$ac_clean_files_save
34445
34446test $ac_write_fail = 0 ||
34447  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
34448
34449
34450# configure is writing to config.log, and then calls config.status.
34451# config.status does its own redirection, appending to config.log.
34452# Unfortunately, on DOS this fails, as config.log is still kept open
34453# by configure, so config.status won't be able to write to it; its
34454# output is simply discarded.  So we exec the FD to /dev/null,
34455# effectively closing config.log, so it can be properly (re)opened and
34456# appended to by config.status.  When coming back to configure, we
34457# need to make the FD available again.
34458if test "$no_create" != yes; then
34459  ac_cs_success=:
34460  ac_config_status_args=
34461  test "$silent" = yes &&
34462    ac_config_status_args="$ac_config_status_args --quiet"
34463  exec 5>/dev/null
34464  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
34465  exec 5>>config.log
34466  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
34467  # would make configure fail if this is the last instruction.
34468  $ac_cs_success || as_fn_exit 1
34469fi
34470if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
34471  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
34472$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
34473fi
34474
34475
34476# Try to move the config.log file to the output directory.
34477if test -e ./config.log; then
34478  $MV -f ./config.log "$OUTPUT_ROOT/config.log" 2> /dev/null
34479fi
34480
34481# Make the compare script executable
34482$CHMOD +x $OUTPUT_ROOT/compare.sh
34483
34484# Finally output some useful information to the user
34485
34486# Finally output some useful information to the user
34487
34488if test "x$CCACHE_FOUND" != x; then
34489	if  test "x$HAS_GOOD_CCACHE" = x; then
34490		CCACHE_STATUS="installed, but disabled (version older than 3.1.4)"
34491		CCACHE_HELP_MSG="You have ccache installed, but it is a version prior to 3.1.4. Try upgrading."
34492	else
34493		CCACHE_STATUS="installed and in use"
34494	fi
34495else
34496	if test "x$GCC" = xyes; then
34497		CCACHE_STATUS="not installed (consider installing)"
34498		CCACHE_HELP_MSG="You do not have ccache installed. Try installing it."
34499	else
34500		CCACHE_STATUS="not available for your system"
34501	fi
34502fi
34503
34504printf "\n"
34505printf "====================================================\n"
34506printf "A new configuration has been successfully created in\n"
34507printf "$OUTPUT_ROOT\n"
34508if test "x$CONFIGURE_COMMAND_LINE" != x; then
34509	printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
34510else
34511	printf "using default settings.\n"
34512fi
34513
34514printf "\n"
34515printf "Configuration summary:\n"
34516printf "* Debug level:    $DEBUG_LEVEL\n"
34517printf "* JDK variant:    $JDK_VARIANT\n"
34518printf "* JVM variants:   $with_jvm_variants\n"
34519printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
34520
34521printf "\n"
34522printf "Tools summary:\n"
34523if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
34524  printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
34525fi
34526printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
34527printf "* C Compiler:     $CC_VENDOR version $CC_VERSION (at $CC)\n"
34528printf "* C++ Compiler:   $CXX_VENDOR version $CXX_VERSION (at $CXX)\n"
34529
34530printf "\n"
34531printf "Build performance summary:\n"
34532printf "* Cores to use:   $JOBS\n"
34533printf "* Memory limit:   $MEMORY_SIZE MB\n"
34534printf "* ccache status:  $CCACHE_STATUS\n"
34535printf "\n"
34536
34537if test "x$CCACHE_HELP_MSG" != x && test "x$HIDE_PERFORMANCE_HINTS" = "xno"; then
34538	printf "Build performance tip: ccache gives a tremendous speedup for C++ recompilations.\n"
34539	printf "$CCACHE_HELP_MSG\n"
34540
34541    # Print a helpful message on how to acquire the necessary build dependency.
34542    # ccache is the help tag: freetyp2, cups, pulse, alsa etc
34543    MISSING_DEPENDENCY=ccache
34544    PKGHANDLER_COMMAND=
34545
34546    case $PKGHANDLER in
34547	apt-get)
34548                apt_help     $MISSING_DEPENDENCY ;;
34549    yum)
34550                yum_help     $MISSING_DEPENDENCY ;;
34551	port)
34552                port_help    $MISSING_DEPENDENCY ;;
34553	pkgutil)
34554                pkgutil_help $MISSING_DEPENDENCY ;;
34555	pkgadd)
34556                pkgadd_help  $MISSING_DEPENDENCY ;;
34557    * )
34558      break ;;
34559    esac
34560
34561    if test "x$PKGHANDLER_COMMAND" != x; then
34562        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
34563    fi
34564
34565	printf "$HELP_MSG\n"
34566	printf "\n"
34567fi
34568
34569if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
34570	printf "NOTE: You have requested to build more than one version of the JVM, which\n"
34571	printf "will result in longer build times.\n"
34572	printf "\n"
34573fi
34574
34575if test "x$FOUND_ALT_VARIABLES" != "x"; then
34576	printf "WARNING: You have old-style ALT_ environment variables set.\n"
34577	printf "These are not respected, and will be ignored. It is recommended\n"
34578	printf "that you clean your environment. The following variables are set:\n"
34579	printf "$FOUND_ALT_VARIABLES\n"
34580	printf "\n"
34581fi
34582
34583if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
34584	printf "WARNING: Your build output directory is not on a local disk.\n"
34585	printf "This will severely degrade build performance!\n"
34586	printf "It is recommended that you create an output directory on a local disk,\n"
34587	printf "and run the configure script again from that directory.\n"
34588	printf "\n"
34589fi
34590
34591if test "x$IS_RECONFIGURE" = "xyes"; then
34592	printf "WARNING: The result of this configuration has overridden an older\n"
34593	printf "configuration. You *should* run 'make clean' to make sure you get a\n"
34594	printf "proper build. Failure to do so might result in strange build problems.\n"
34595	printf "\n"
34596fi
34597
34598